From 877d4b61cfebafe6d683e78e7643ef221c54354e Mon Sep 17 00:00:00 2001 From: kasperg Date: Mon, 15 Jul 2024 20:43:20 +0000 Subject: [PATCH] deploy: 21385a07af70c828144d0bcfc7624149d41a5a17 --- iframe.html | 2 +- ....30cfb497.iframe.bundle.js => main.8ba0eff4.iframe.bundle.js | 2 +- project.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename main.30cfb497.iframe.bundle.js => main.8ba0eff4.iframe.bundle.js (99%) diff --git a/iframe.html b/iframe.html index e0b32f46da..647c37bdf2 100644 --- a/iframe.html +++ b/iframe.html @@ -361,4 +361,4 @@ - window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.dev.@(jsx|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.dev\\.(jsx|tsx))$"}]; \ No newline at end of file + window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.dev.@(jsx|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.dev\\.(jsx|tsx))$"}]; \ No newline at end of file diff --git a/main.30cfb497.iframe.bundle.js b/main.8ba0eff4.iframe.bundle.js similarity index 99% rename from main.30cfb497.iframe.bundle.js rename to main.8ba0eff4.iframe.bundle.js index 427c3d12e7..fa8d900ca6 100644 --- a/main.30cfb497.iframe.bundle.js +++ b/main.8ba0eff4.iframe.bundle.js @@ -1 +1 @@ -(globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react=globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react||[]).push([[792],{"./.storybook/preview.js-generated-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject),__webpack_require__.d(preview_namespaceObject,{decorators:()=>decorators,parameters:()=>parameters});var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),styleDomAPI=__webpack_require__("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),styleDomAPI_default=__webpack_require__.n(styleDomAPI),insertBySelector=__webpack_require__("./node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),setAttributesWithoutAttributes=__webpack_require__("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),setAttributesWithoutAttributes_default=__webpack_require__.n(setAttributesWithoutAttributes),insertStyleElement=__webpack_require__("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),insertStyleElement_default=__webpack_require__.n(insertStyleElement),styleTagTransform=__webpack_require__("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),styleTagTransform_default=__webpack_require__.n(styleTagTransform),components=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss"),options={};options.styleTagTransform=styleTagTransform_default(),options.setAttributes=setAttributesWithoutAttributes_default(),options.insert=insertBySelector_default().bind(null,"head"),options.domAPI=styleDomAPI_default(),options.insertStyleElement=insertStyleElement_default();injectStylesIntoStyleTag_default()(components.A,options);components.A&&components.A.locals&&components.A.locals;__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/css/base.css");var token=__webpack_require__("./src/core/token.js"),react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),react_error_boundary_umd=__webpack_require__("./node_modules/react-error-boundary/dist/react-error-boundary.umd.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),integration_react=__webpack_require__("./node_modules/redux-persist/es/integration/react.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),store=__webpack_require__("./src/core/store.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts"),FetcherError=__webpack_require__("./src/core/fetchers/FetcherError.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts"),InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts");const queryErrorHandler=error=>!(error instanceof FetcherHttpError.A||error instanceof FetcherCriticalHttpError.A||error instanceof FetcherError.A||error instanceof InvalidUrlError.A)||error.useErrorBoundary,queryClient=new react_query_es.QueryClient({defaultOptions:{queries:{staleTime:12e4,useErrorBoundary:queryErrorHandler},mutations:{useErrorBoundary:queryErrorHandler}}}),Store=({children})=>react.createElement(es.Kq,{store:store.M_},react.createElement(react_query_es.QueryClientProvider,{client:queryClient},react.createElement(integration_react.Q,{persistor:store.qj},children)));Store.propTypes={children:prop_types_default().node.isRequired};const components_store=Store;var utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),ErrorBoundaryAlertBody=__webpack_require__("./src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx");const ErrorBoundaryAlert=({resetErrorBoundary})=>{const t=(0,utils_text.F)(),errorMessagesConfig=(0,utils_config.UK)()("errorMessagesConfig",{transformer:"jsonParse"});if(void 0===errorMessagesConfig.containerId)return null;const{containerId}=errorMessagesConfig,container=document.getElementById(containerId),shouldOnlyShowOneError=void 0===errorMessagesConfig.shouldOnlyShowOneError||errorMessagesConfig.shouldOnlyShowOneError;return container?shouldOnlyShowOneError&&((null==container?void 0:container.textContent)??"").trim().length>0?null:react_dom.createPortal(react.createElement(ErrorBoundaryAlertBody.A,{message:t("alertErrorMessageText"),resetErrorBoundary,showCloseButton:(null==errorMessagesConfig?void 0:errorMessagesConfig.showCloseButton)??!1}),container):null},error_boundary_alert_ErrorBoundaryAlert=ErrorBoundaryAlert;try{ErrorBoundaryAlert.displayName="ErrorBoundaryAlert",ErrorBoundaryAlert.__docgenInfo={description:"A simple alert that serves as the foundation of all alerts.",displayName:"ErrorBoundaryAlert",props:{resetErrorBoundary:{defaultValue:null,description:"",name:"resetErrorBoundary",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"]={docgenInfo:ErrorBoundaryAlert.__docgenInfo,name:"ErrorBoundaryAlert",path:"src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"})}catch(__react_docgen_typescript_loader_error){}var modal_slice=__webpack_require__("./src/core/modal.slice.ts");const utils_extractErrorDetails=stack=>(stack||"").split("\n").map((line=>{const parts=line.match(/(?:\()?(.*?):(\d+):(\d+)(?:\))?/);if(parts){const[,filename,lineNumber,column]=parts;return{filename,lineNumber,column}}return null})).find((m=>m))||{filename:"unknown",lineNumber:"0",column:"0"},utils_forwardError=(error,info)=>{const{filename,lineNumber,column}=utils_extractErrorDetails(info.componentStack);window.onerror&&window.onerror(`${error.name}: ${error.message}`,filename,lineNumber,column,{...info,stack:info.componentStack})};function mount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((app=>setTimeout((()=>function mountApp(container){var _container$dataset,_window$dplReact,_window$dplReact$apps;const appName=null==container||null===(_container$dataset=container.dataset)||void 0===_container$dataset?void 0:_container$dataset.dplApp,app=null===(_window$dplReact=window.dplReact)||void 0===_window$dplReact||null===(_window$dplReact$apps=_window$dplReact.apps)||void 0===_window$dplReact$apps?void 0:_window$dplReact$apps[appName];app&&(0,react_dom.render)((0,react.createElement)(components_store,{},(0,react.createElement)((0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info),utils_forwardError(error,info)}}),{...container.dataset})),container)}(app)),0)))}function unmount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((function unMountApp(container){container.innerHTML=""}))}function mount_reset(){return store.qj.purge()}!function init(){document.addEventListener("keydown",(e=>{"Escape"===e.key&&store.M_.dispatch((0,modal_slice.ch)())}));const initial={apps:{},setToken:token.WG,mount,unmount,reset:mount_reset};window.dplReact={...window.dplReact||{},...initial}}();__webpack_require__("./src/core/user.slice.js");var process=__webpack_require__("./node_modules/process/browser.js");const getSessionStorage=type=>window.sessionStorage.getItem(type),userToken=process.env.STORYBOOK_USER_TOKEN??getSessionStorage(token.CI),libraryToken=process.env.STORYBOOK_LIBRARY_TOKEN??getSessionStorage(token._L);userToken&&(0,token.WG)(token.CI,userToken),libraryToken&&(0,token.WG)(token._L,libraryToken),!libraryToken&&userToken&&(0,token.WG)(token._L,userToken);const App=({story})=>{return react.createElement(components_store,null,(app=story,(0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info)}})));var app},decorators=[Story=>react.createElement(react.Fragment,null,react.createElement(App,{story:Story}))],parameters={layout:"fullscreen"};function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":return(0,ClientApi.FQ)(value);case"argTypes":return(0,ClientApi.hA)(value);case"decorators":return value.forEach((function(decorator){return(0,ClientApi.dK)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,ClientApi.$K)(loader,!1)}));case"parameters":return(0,ClientApi.Gu)(function _objectSpread(target){for(var i=1;i{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SignIn:()=>SignIn,default:()=>auth_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),unfetch_module=__webpack_require__("./node_modules/unfetch/dist/unfetch.module.js"),core_token=__webpack_require__("./src/core/token.js"),user_slice=__webpack_require__("./src/core/user.slice.js");const ORIGIN=window.location.origin,PATHNAME=window.location.pathname.replace("/iframe.html","/"),REDIRECT_URL=`${ORIGIN}${PATHNAME}?path=/story/sb-utilities-adgangsplatformen--sign-in`;const auth=function Auth(){const dispatch=(0,es.wA)(),status=(0,es.d4)((s=>s.user.status)),handleCleanUp=(0,react.useCallback)((()=>{window.sessionStorage.removeItem(core_token.CI),dispatch((0,user_slice.xE)())}),[dispatch]);return react.useEffect((()=>{const code=new URLSearchParams(window.location.search).get("code");code&&(0,unfetch_module.A)("https://login.bib.dk/oauth/token",{method:"POST",headers:{},body:new URLSearchParams({grant_type:"authorization_code",code,client_id:"",client_secret:"secret",redirect_uri:REDIRECT_URL})}).then((res=>res.json())).then((res=>{if(null==res||!res.access_token)throw res;window.sessionStorage.setItem(core_token.CI,res.access_token),(0,core_token.WG)(core_token.CI,res.access_token),(0,core_token.WG)(core_token._L,res.access_token),dispatch((0,user_slice.Qn)())})).catch((err=>{console.error(err),handleCleanUp()}))}),[dispatch,handleCleanUp]),react.createElement("div",{style:{width:"300px"}},react.createElement("h2",null,"Adgangsplatformen"),react.createElement("h5",null,"Status:","authenticated"===status?react.createElement("span",{style:{color:"green"}}," Signed in"):react.createElement("span",{style:{color:"red"}}," Signed out")),react.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gridColumnGap:10}},react.createElement("button",{type:"button",onClick:()=>{window.parent.location.href=`https://login.bib.dk/oauth/authorize?response_type=code&client_id=&redirect_uri=${REDIRECT_URL}`},style:{width:"100%"}},"Sign in"),react.createElement("button",{type:"button",onClick:()=>{handleCleanUp();const token=(0,core_token.gf)(core_token.CI);window.parent.location.href=`https://login.bib.dk/logout/?access_token=${token}`},style:{width:"100%"}},"Sign out")))},auth_dev={title:"SB Utilities / Adgangsplatformen"},SignIn=(args=>react.createElement(auth,args)).bind({})},"./src/apps/adgangsplatformen/library-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LibraryTokenApp:()=>LibraryTokenApp,default:()=>library_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const library_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setLibraryTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token._L,inputValue),(0,token.WG)(token._L,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert Library token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setLibraryTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for anonymous users,",react.createElement("br",null),"you can insert a library token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{librarytoken.displayName="librarytoken",librarytoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current library token.",displayName:"librarytoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/library-token.tsx#librarytoken"]={docgenInfo:librarytoken.__docgenInfo,name:"librarytoken",path:"src/apps/adgangsplatformen/library-token.tsx#librarytoken"})}catch(__react_docgen_typescript_loader_error){}const library_token_dev={title:"SB Utilities / Set Library Token",component:library_token},LibraryTokenApp=()=>react.createElement(library_token,null)},"./src/apps/adgangsplatformen/user-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserTokenApp:()=>UserTokenApp,default:()=>user_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const user_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setUserTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token.CI,inputValue),(0,token.WG)(token.CI,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert User token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setUserTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for logged in users,",react.createElement("br",null),"you can insert a user token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{usertoken.displayName="usertoken",usertoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current user token.",displayName:"usertoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/user-token.tsx#usertoken"]={docgenInfo:usertoken.__docgenInfo,name:"usertoken",path:"src/apps/adgangsplatformen/user-token.tsx#usertoken"})}catch(__react_docgen_typescript_loader_error){}const user_token_dev={title:"SB Utilities / Set User Token",component:user_token},UserTokenApp=()=>react.createElement(user_token,null)},"./src/apps/advanced-search/AdvancedSearch.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AdvancedSearch:()=>AdvancedSearch_dev_AdvancedSearch,default:()=>AdvancedSearch_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),useEffectOnce=__webpack_require__("./node_modules/react-use/esm/useEffectOnce.js"),ExpandMore=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg")),ExpandMore_default=__webpack_require__.n(ExpandMore),MinusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/MinusButton.svg"),MinusButton_default=__webpack_require__.n(MinusButton),PlusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/PlusButton.svg"),PlusButton_default=__webpack_require__.n(PlusButton),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const advancedSearchIndexes=["all","term.creatorcontributor","term.subject","term.genreandform","term.mainlanguage","datefirstedition","term.creator","term.title","term.source","dk5","term.specificmaterialtype","term.childrenoradults","term.publisher","term.isbn"],advancedSearchIndexTranslations={all:"advancedSearchAllIndexesText","term.creatorcontributor":"advancedSearchCreatorText","term.subject":"advancedSearchSubjectText","term.genreandform":"advancedSearchGenreText","term.mainlanguage":"advancedSearchLanguageText",datefirstedition:"advancedSearchDateText","term.creator":"advancedSearchMainCreatorText","term.title":"advancedSearchMainTitleText","term.source":"advancedSearchSourceText",dk5:"advancedSearchDecimalDk5Text","term.specificmaterialtype":"advancedSearchTypeText","term.childrenoradults":"advancedSearchAudienceText","term.publisher":"advancedSearchPublisherText","term.isbn":"advancedSearchIdentifierText"},advancedSearchClauses=[{value:"AND",translation:"clauseAndText"},{value:"OR",translation:"clauseOrText"},{value:"NOT",translation:"clauseNotText"}],initialAdvancedSearchQuery={rows:[{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:0},{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:1}],filters:{materialTypes:[{item:"multiselectAllOptionText",value:"all"}],fiction:[{item:"multiselectAllOptionText",value:"all"}],accessibility:[{item:"multiselectAllOptionText",value:"all"}]}},advancedSearchMaterialTypes=[{item:"advancedSearchFilterBookText",value:"bøger"},{item:"advancedSearchFilterEbookText",value:"e-bøger"},{item:"advancedSearchFilterAudioBookText",value:"lydbøger"},{item:"advancedSearchFilterArticleText",value:"artikler"},{item:"advancedSearchFilterMovieText",value:"film"},{item:"advancedSearchFilterMusicText",value:"musik"}],advancedSearchAccessibility=[{item:"advancedSearchFilterPhysicalText",value:"fysisk"},{item:"advancedSearchFilterOnlineText",value:"online"}],advancedSearchFiction=[{item:"advancedSearchFilterFictionText",value:"fiction"},{item:"advancedSearchFilterNonFictionText",value:"nonfiction"}],advancedSearchFilters={materialTypes:"term.generalmaterialtype",fiction:"term.fictionnonfiction",accessibility:"term.accesstype"},AdvancedSearchRow=({dataCy="advanced-search-row",data,rowIndex,isFocused,setSearchObject,setFocusedRow})=>{const t=(0,utils_text.F)(),updateRowData=(rowAspect,update,updateData)=>{const newData={...data};newData.rows[rowIndex][rowAspect]=update,updateData(newData)},inputElement=(0,react.useRef)(null);return(0,react.useEffect)((()=>{var _inputElement$current;isFocused&&(null===(_inputElement$current=inputElement.current)||void 0===_inputElement$current||_inputElement$current.focus())}),[isFocused]),react.createElement(react.Fragment,null,rowIndex>0&&react.createElement("div",{className:"advanced-search__clauses","data-cy":"clauses"},advancedSearchClauses.map((clause=>{return react.createElement("button",{key:`${rowIndex}-${clause.value}`,"data-cy":`clause-${clause.value}`,type:"button",className:(clickedClause=clause.value,currentClause=data.rows[rowIndex].clause.value,(0,clsx.A)("advanced-search__clause focus-styling cursor-pointer capitalize-all",{"advanced-search__clause--grey":currentClause!==clickedClause})),onClick:()=>{updateRowData("clause",clause,setSearchObject)}},t(clause.translation));var clickedClause,currentClause}))),react.createElement("div",{className:"input-with-dropdown","data-cy":dataCy},react.createElement("label",{htmlFor:`advanced-search-input-${rowIndex}`,className:"hide-visually"},t("advancedSearchInputLabelText",{placeholders:{"@inputNumber":rowIndex+1}})),react.createElement("input",{id:`advanced-search-input-${rowIndex}`,ref:inputElement,className:"input-with-dropdown__input focus-styling__input capitalize-first",type:"text",placeholder:t("advancedSearchInputPlaceholderText"),value:data.rows[rowIndex].term,onChange:e=>{updateRowData("term",e.target.value,setSearchObject)}}),react.createElement("div",{className:"dropdown dropdown--grey-borders input-with-dropdown__dropdown"},react.createElement("select",{className:"dropdown__select dropdown__select--inline focus-styling","aria-label":"input field dropdown",value:data.rows[rowIndex].searchIndex,onChange:e=>{updateRowData("searchIndex",e.target.value,setSearchObject)}},advancedSearchIndexes.map((index=>react.createElement("option",{key:index,className:"dropdown__option",value:index},t(advancedSearchIndexTranslations[index]))))),react.createElement("div",{className:"dropdown__arrows dropdown__arrows--inline"},react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}))),data.rows.length>1&&react.createElement("button",{type:"button",onClick:()=>{((index,updateData)=>{const newData={...data};newData.rows.splice(index,1),updateData(newData),newData.rows.length===index?setFocusedRow(index-1):setFocusedRow(index)})(rowIndex,setSearchObject)}},react.createElement("img",{className:"input-with-dropdown__icon",src:MinusButton_default(),alt:""}))),rowIndex===data.rows.length-1&&react.createElement("button",{type:"button",className:"advanced-search__clauses cursor-pointer",onClick:()=>{(updateData=>{const newData={...data};newData.rows.push(structuredClone(initialAdvancedSearchQuery.rows.at(0))),newData.rows[newData.rows.length-1].id=newData.rows[newData.rows.length-2].id+1,updateData(newData),setFocusedRow(rowIndex+1)})(setSearchObject)},"data-cy":"advanced-search-add-row"},react.createElement("img",{className:"mr-8",src:PlusButton_default(),alt:""}),t("advancedSearchAddRowText")))},advanced_search_AdvancedSearchRow=AdvancedSearchRow;try{AdvancedSearchRow.displayName="AdvancedSearchRow",AdvancedSearchRow.__docgenInfo={description:"",displayName:"AdvancedSearchRow",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"AdvancedSearchQuery"}},dataCy:{defaultValue:{value:"advanced-search-row"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},rowIndex:{defaultValue:null,description:"",name:"rowIndex",required:!0,type:{name:"number"}},isFocused:{defaultValue:null,description:"",name:"isFocused",required:!1,type:{name:"boolean | undefined"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery) => void"}},setFocusedRow:{defaultValue:null,description:"",name:"setFocusedRow",required:!0,type:{name:"(rowIndex: number) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"]={docgenInfo:AdvancedSearchRow.__docgenInfo,name:"AdvancedSearchRow",path:"src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"})}catch(__react_docgen_typescript_loader_error){}var useCopyToClipboard=__webpack_require__("./node_modules/react-use/esm/useCopyToClipboard.js"),Check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),Check_default=__webpack_require__.n(Check);const PreviewSection=({dataCy="preview-section",translatedCql,reset,isMobile,setIsFormMode})=>{const t=(0,utils_text.F)(),[,copy]=(0,useCopyToClipboard.A)(),[copiedToClipboard,setCopiedToClipboard]=(0,react.useState)(!1);return(0,react.useEffect)((()=>(copiedToClipboard&&setTimeout((()=>{setCopiedToClipboard(!1)}),2e3),()=>{})),[copiedToClipboard]),react.createElement("div",{"data-cy":dataCy,className:(0,clsx.A)("pagefold-parent--large input-and-preview__preview",{"input-and-preview__preview--mobile":isMobile})},react.createElement("div",{className:"pagefold-triangle--large pagefold-inherit-parent"}),react.createElement("h3",{className:"text-body-medium-medium mb-24 capitalize-first"},t("advancedSearchPreviewHeadlineText")),react.createElement("p",{"data-cy":`${dataCy}-preview`,className:"text-body-medium-regular mb-32"},translatedCql||t("advancedSearchPreviewEmptyText")),react.createElement("section",null,react.createElement("button",{type:"button",className:"link-tag mr-16 cursor-pointer capitalize-first",onClick:()=>reset(),"data-cy":"advanced-search-reset"},t("advancedSearchResetText")),translatedCql&&react.createElement("button",{type:"button",className:(0,clsx.A)("link-tag mr-16 capitalize-first",{"cursor-pointer":!copiedToClipboard}),onClick:()=>{copy(translatedCql),setCopiedToClipboard(!0)},onKeyUp:e=>{"Enter"===e.key&&(copy(translatedCql),setCopiedToClipboard(!0))}},copiedToClipboard&&react.createElement(react.Fragment,null,t("copiedToClipboardText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})),!copiedToClipboard&&t("advancedSearchCopyStringText")),react.createElement("button",{type:"button",className:"link-tag link-tag cursor-pointer capitalize-first",onClick:()=>setIsFormMode(!1),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1),"data-cy":"advanced-search-edit-cql"},t("advancedSearchEditCqlText"))))},advanced_search_PreviewSection=PreviewSection;try{PreviewSection.displayName="PreviewSection",PreviewSection.__docgenInfo={description:"",displayName:"PreviewSection",props:{dataCy:{defaultValue:{value:"preview-section"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},translatedCql:{defaultValue:null,description:"",name:"translatedCql",required:!0,type:{name:"string"}},reset:{defaultValue:null,description:"",name:"reset",required:!0,type:{name:"() => void"}},isMobile:{defaultValue:null,description:"",name:"isMobile",required:!1,type:{name:"boolean | undefined"}},setIsFormMode:{defaultValue:null,description:"",name:"setIsFormMode",required:!0,type:{name:"(newState: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/PreviewSection.tsx#PreviewSection"]={docgenInfo:PreviewSection.__docgenInfo,name:"PreviewSection",path:"src/apps/advanced-search/PreviewSection.tsx#PreviewSection"})}catch(__react_docgen_typescript_loader_error){}var Multiselect=__webpack_require__("./src/components/multiselect/Multiselect.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),TextInput=__webpack_require__("./src/components/atoms/input/TextInput.tsx");const CqlSearchHeader=({dataCy="cql-search-header",initialCql,setCql,onShelf,handleOnShelfChange,onLocationChange,onSublocationChange})=>{const t=(0,utils_text.F)();return(0,react.useEffect)((()=>{""!==initialCql.trim()&&setCql(initialCql)}),[initialCql,setCql]),react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first","data-cy":dataCy},t("cqlSearchTitleText")),react.createElement("textarea",{className:"advanced-search__cql-input focus-styling__input",cols:100,rows:5,placeholder:"e.g. title=snemand*","data-cy":`${dataCy}-input`,onChange:e=>setCql(e.target.value),defaultValue:initialCql}),react.createElement(TextInput.A,{id:"location",label:"Location",type:"text",onChange:location=>onLocationChange(location)}),react.createElement(TextInput.A,{id:"location",label:"Sublocation",type:"text",onChange:sublocation=>onSublocationChange(sublocation)}),react.createElement(Checkbox.A,{id:"on-shelf",selected:onShelf,onChecked:handleOnShelfChange,label:t("advancedSearchFilterHoldingStatusText")}))},advanced_search_CqlSearchHeader=CqlSearchHeader;try{CqlSearchHeader.displayName="CqlSearchHeader",CqlSearchHeader.__docgenInfo={description:"",displayName:"CqlSearchHeader",props:{dataCy:{defaultValue:{value:"cql-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},initialCql:{defaultValue:null,description:"",name:"initialCql",required:!0,type:{name:"string"}},setCql:{defaultValue:null,description:"",name:"setCql",required:!0,type:{name:"(newState: string) => void"}},onShelf:{defaultValue:null,description:"",name:"onShelf",required:!0,type:{name:"boolean"}},handleOnShelfChange:{defaultValue:null,description:"",name:"handleOnShelfChange",required:!0,type:{name:"(newState: boolean) => void"}},onLocationChange:{defaultValue:null,description:"",name:"onLocationChange",required:!0,type:{name:"(location: string) => void"}},onSublocationChange:{defaultValue:null,description:"",name:"onSublocationChange",required:!0,type:{name:"(sublocation: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"]={docgenInfo:CqlSearchHeader.__docgenInfo,name:"CqlSearchHeader",path:"src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"})}catch(__react_docgen_typescript_loader_error){}const translateFiltersToCql=filtersToTranslate=>Object.keys(filtersToTranslate).map((key=>filtersToTranslate[key])).reduce(((acc,curr,index)=>acc+((filterToTranslate,cqlKey)=>{let translation=filterToTranslate.reduce(((acc,curr)=>{let filterTranslation="";const relation=""===acc.trim()?" AND":" OR";return"all"===curr.value?`${acc}`:(filterTranslation=filterTranslation.concat(relation,` ${advancedSearchFilters[cqlKey]}=`,`'${curr.value}'`),acc+filterTranslation)}),"");return filterToTranslate.length>1&&(translation=` AND (${translation.split(" AND")[1]})`),translation})(curr,Object.keys(filtersToTranslate)[index])),""),wrapFiltersInParentheses=filters=>{if(""===filters.trim())return"";if(!filters.includes(" OR "))return filters;return`${filters.split(" AND",2).join(" AND (")})`},translateSearchObjectToCql=searchObject=>`${searchObject.rows.reduce(((acc,curr)=>{let rowTranslation="";return""!==acc&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.clause.value)),"all"!==curr.searchIndex&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.searchIndex,"=")),""!==curr.term&&(rowTranslation=rowTranslation.concat((currentText=>{let space="";switch(currentText.trim()){case"":space="";break;default:if(currentText.trim().endsWith("=")){space="";break}space=" "}return space})(acc),"'",curr.term,"'")),acc+rowTranslation}),"")}${translateFiltersToCql(searchObject.filters)}`;try{wrapFiltersInParentheses.displayName="wrapFiltersInParentheses",wrapFiltersInParentheses.__docgenInfo={description:"",displayName:"wrapFiltersInParentheses",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/helpers.tsx#wrapFiltersInParentheses"]={docgenInfo:wrapFiltersInParentheses.__docgenInfo,name:"wrapFiltersInParentheses",path:"src/apps/advanced-search/helpers.tsx#wrapFiltersInParentheses"})}catch(__react_docgen_typescript_loader_error){}try{translateSearchObjectToCql.displayName="translateSearchObjectToCql",translateSearchObjectToCql.__docgenInfo={description:"",displayName:"translateSearchObjectToCql",props:{rows:{defaultValue:null,description:"",name:"rows",required:!0,type:{name:"AdvancedSearchRowData[]"}},filters:{defaultValue:null,description:"",name:"filters",required:!0,type:{name:"AdvancedSearchFilterData"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"]={docgenInfo:translateSearchObjectToCql.__docgenInfo,name:"translateSearchObjectToCql",path:"src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const AdvancedSearchHeader=({dataCy="advanced-search-header",searchQuery,setSearchQuery,searchObject,setSearchObject,onShelf,setOnShelf,onLocationChange,onSublocationChange})=>{const t=(0,utils_text.F)(),[isFormMode,setIsFormMode]=(0,react.useState)(!0),[internalSearchObject,setInternalSearchObject]=(0,react.useState)(searchObject||structuredClone(initialAdvancedSearchQuery)),[previewCql,setPreviewCql]=(0,react.useState)(searchQuery||""),[rawCql,setRawCql]=(0,react.useState)(""),[focusedRow,setFocusedRow]=(0,react.useState)(null),handleOnShelfChange=checked=>{setOnShelf(checked)};(0,react.useEffect)((()=>{null!==searchObject&&setInternalSearchObject(searchObject)}),[searchObject]),(0,react.useEffect)((()=>{const cql=translateSearchObjectToCql(internalSearchObject);setPreviewCql(cql)}),[internalSearchObject]);const updateFiltersData=filtersUpdate=>{if(null==internalSearchObject||!internalSearchObject.filters[filtersUpdate.key].length)return;const newSearchObject={...internalSearchObject};newSearchObject.filters={...newSearchObject.filters,[filtersUpdate.key]:filtersUpdate.value},setInternalSearchObject(newSearchObject)},reset=()=>{setSearchObject(structuredClone(initialAdvancedSearchQuery))},scrollToResults=()=>{const element=document.getElementById("advanced-search-result");element&&element.scrollIntoView({behavior:"smooth"})},[isSearchButtonDisabled,setIsSearchButtonDisabled]=(0,react.useState)(!0),translatedCql=previewCql||searchQuery||"";return(0,react.useEffect)((()=>{searchQuery&&!searchObject&&setIsFormMode(!1)}),[searchObject,searchQuery]),(0,react.useEffect)((()=>{var object,cql;setIsSearchButtonDisabled((object=internalSearchObject,cql=rawCql,!0===isFormMode?!(object&&object.rows.find((row=>""!==row.term))):""===cql.trim()))}),[internalSearchObject,rawCql,isFormMode]),react.createElement(react.Fragment,null,isFormMode&&react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first"},t("advancedSearchTitleText")),react.createElement("div",{className:"input-and-preview"},react.createElement("div",{className:"input-and-preview__input"},internalSearchObject.rows.map(((row,index)=>react.createElement(advanced_search_AdvancedSearchRow,{key:row.id,data:internalSearchObject,rowIndex:index,setSearchObject:setInternalSearchObject,dataCy:`${dataCy}-row`,setFocusedRow,isFocused:focusedRow===index})))),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,setIsFormMode})),react.createElement("section",{className:"advanced-search__filters"},react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.A,{caption:t("advancedSearchFilterMaterialTypeText"),options:advancedSearchMaterialTypes,defaultValue:internalSearchObject.filters.materialTypes,updateExternalState:{key:"materialTypes",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-material-types"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.A,{caption:t("advancedSearchFilterLiteratureFormText"),options:advancedSearchFiction,defaultValue:internalSearchObject.filters.fiction,updateExternalState:{key:"fiction",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-fiction"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.A,{caption:t("advancedSearchFilterAccessText"),options:advancedSearchAccessibility,defaultValue:internalSearchObject.filters.accessibility,updateExternalState:{key:"accessibility",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-accessibility"}))),react.createElement(Checkbox.A,{id:"on-shelf",selected:onShelf,onChecked:handleOnShelfChange,label:t("advancedSearchFilterHoldingStatusText")}),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,isMobile:!0,setIsFormMode})),!isFormMode&&react.createElement(advanced_search_CqlSearchHeader,{initialCql:translatedCql,setCql:setRawCql,onShelf,handleOnShelfChange,onLocationChange,onSublocationChange}),react.createElement("section",{className:"advanced-search__footer"},!isFormMode&&react.createElement("button",{type:"button",className:"link-tag advanced-search__back-button cursor-pointer",onClick:()=>setIsFormMode(!0),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1)},t("toAdvancedSearchButtonText")),react.createElement(Button.$,{dataCy:"search-button",buttonType:"none",disabled:isSearchButtonDisabled,size:"xlarge",variant:"filled",classNames:"advanced-search__search-button",collapsible:!0,label:t("advancedSearchSearchButtonText"),onClick:()=>{if(""!==rawCql.trim()&&!isFormMode)return setSearchQuery(rawCql),void setTimeout((()=>{scrollToResults()}),500);setSearchObject(internalSearchObject),setTimeout((()=>{scrollToResults()}),500)}})))},advanced_search_AdvancedSearchHeader=AdvancedSearchHeader;try{AdvancedSearchHeader.displayName="AdvancedSearchHeader",AdvancedSearchHeader.__docgenInfo={description:"",displayName:"AdvancedSearchHeader",props:{dataCy:{defaultValue:{value:"advanced-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},searchQuery:{defaultValue:null,description:"",name:"searchQuery",required:!0,type:{name:"string | null"}},setSearchQuery:{defaultValue:null,description:"",name:"setSearchQuery",required:!0,type:{name:"(searchQuery: string | null) => void"}},searchObject:{defaultValue:null,description:"",name:"searchObject",required:!0,type:{name:"AdvancedSearchQuery | null"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery | null) => void"}},onShelf:{defaultValue:null,description:"",name:"onShelf",required:!0,type:{name:"boolean"}},setOnShelf:{defaultValue:null,description:"",name:"setOnShelf",required:!0,type:{name:"(checked: boolean) => void"}},onLocationChange:{defaultValue:null,description:"",name:"onLocationChange",required:!0,type:{name:"(location: string) => void"}},onSublocationChange:{defaultValue:null,description:"",name:"onSublocationChange",required:!0,type:{name:"(sublocation: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"]={docgenInfo:AdvancedSearchHeader.__docgenInfo,name:"AdvancedSearchHeader",path:"src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"})}catch(__react_docgen_typescript_loader_error){}var branches=__webpack_require__("./src/core/utils/branches.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const advanced_search_AdvancedSearchResults=({q,pageSize,showContentOnly,onShelf,locationFilter})=>{const t=(0,utils_text.F)(),[copiedLinkToSearch,setCopiedLinkToSearch]=(0,react.useState)(!1),cleanBranches=(0,branches.Ay)(),[resultItems,setResultItems]=(0,react.useState)([]),[hitcount,setHitCount]=(0,react.useState)(0),{PagerComponent,page}=(0,use_pager.A)({hitcount,pageSize}),[cql,setCql]=(0,react.useState)(q),[,copy]=(0,useCopyToClipboard.A)();(0,react.useEffect)((()=>{setCql(q)}),[q]),(0,react.useEffect)((()=>{const searchParams=new URLSearchParams(window.location.search);searchParams.get("q")&&setCql((prev=>searchParams.get("q")||prev))}),[]),(0,react.useEffect)((()=>{setResultItems([])}),[q,pageSize]);const{data,isLoading}=(0,graphql.YP)({cql,offset:page*pageSize,limit:pageSize,filters:{branchId:cleanBranches,status:onShelf?[graphql.Fl.OnShelf]:[],...(null==locationFilter?void 0:locationFilter.location)&&{location:locationFilter.location},...(null==locationFilter?void 0:locationFilter.sublocation)&&{sublocation:locationFilter.sublocation}}});(0,react.useEffect)((()=>{if(!data)return;const{complexSearch:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>[...prev,...resultWorks]:resultWorks)}),[data,locationFilter,page]);const shouldShowSearchResults=isLoading||!isLoading&&hitcount>0,shouldShowResultHeadline=!(!hitcount||isLoading);return(0,react.useEffect)((()=>{copiedLinkToSearch&&setTimeout((()=>{setCopiedLinkToSearch(!1)}),2e3)}),[copiedLinkToSearch]),react.createElement(react.Fragment,null,!showContentOnly&&react.createElement("div",{className:"advanced-search__divider"}),react.createElement("h2",{className:"text-header-h2 advanced-search__title capitalize-first",id:"advanced-search-result","aria-live":"polite"},isLoading&&react.createElement(react.Fragment,null,t("loadingResultsText")),shouldShowResultHeadline&&react.createElement(react.Fragment,null,t("showingMaterialsText",{placeholders:{"@hitcount":hitcount}}))),!showContentOnly&&react.createElement("button",{type:"button",className:(0,clsx.A)("link-tag mb-16 capitalize-first",{"cursor-pointer":!copiedLinkToSearch}),onClick:()=>{copy((0,helpers_url.gG)({linked:"true"}).href),setCopiedLinkToSearch(!0)}},!copiedLinkToSearch&&t("advancedSearchLinkToThisSearchText"),copiedLinkToSearch&&react.createElement(react.Fragment,null,t("copiedLinkToThisSearchText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})," ")),shouldShowSearchResults&&react.createElement(react.Fragment,null,react.createElement(SearchResultList.A,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading})),!isLoading&&0===hitcount&&react.createElement(search_result_zero_hits.A,null))};try{AdvancedSearchResults.displayName="AdvancedSearchResults",AdvancedSearchResults.__docgenInfo={description:"",displayName:"AdvancedSearchResults",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},showContentOnly:{defaultValue:null,description:"",name:"showContentOnly",required:!0,type:{name:"boolean"}},onShelf:{defaultValue:null,description:"",name:"onShelf",required:!0,type:{name:"boolean"}},locationFilter:{defaultValue:null,description:"",name:"locationFilter",required:!0,type:{name:"LocationFilter"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"]={docgenInfo:AdvancedSearchResults.__docgenInfo,name:"AdvancedSearchResults",path:"src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch=({pageSize})=>{const[searchQuery,setSearchQuery]=(0,react.useState)(null),[searchObject,setSearchObject]=(0,react.useState)(null),[showResultOnly,setShowResultOnly]=(0,react.useState)(!1),[executedQuery,setExecutedQuery]=(0,react.useState)(null),[locationFilter,setLocationFilter]=(0,react.useState)({}),[onShelf,setOnShelf]=(0,react.useState)(!1);return(0,useEffectOnce.A)((()=>{var _getUrlQueryParam;const advancedSearchQuery=null===(_getUrlQueryParam=(0,helpers_url.d6)("advancedSearchQuery"))||void 0===_getUrlQueryParam?void 0:_getUrlQueryParam.replace("(","").replace(")","");if(advancedSearchQuery){const queryObject=JSON.parse(advancedSearchQuery);setSearchObject(queryObject)}const advancedSearchCql=(0,helpers_url.d6)("advancedSearchCql");advancedSearchCql&&setSearchQuery(advancedSearchCql),"true"===(0,helpers_url.d6)("linked")&&setShowResultOnly(!0),"true"===(0,helpers_url.d6)("onshelf")&&setOnShelf(!0)})),(0,react.useEffect)((()=>{if(!searchObject)return;const cql=translateSearchObjectToCql(searchObject);""!==cql.trim()&&((0,helpers_url.$u)({advancedSearchQuery:JSON.stringify(searchObject)}),(0,helpers_url.MR)("advancedSearchCql"),setExecutedQuery(cql))}),[searchObject]),(0,react.useEffect)((()=>{searchQuery&&((0,helpers_url.$u)({advancedSearchCql:searchQuery}),(0,helpers_url.MR)("advancedSearchQuery"),setExecutedQuery(searchQuery))}),[searchQuery]),react.createElement("div",{className:"advanced-search"},!showResultOnly&&react.createElement(advanced_search_AdvancedSearchHeader,{searchObject,setSearchObject,searchQuery,setSearchQuery,onShelf,setOnShelf:checked=>{setOnShelf(checked),checked?(0,helpers_url.$u)({onshelf:"true"}):(0,helpers_url.MR)("onshelf")},onLocationChange:location=>{setLocationFilter((prevFilter=>({...prevFilter,location:[location]})))},onSublocationChange:sublocation=>{setLocationFilter((prevFilter=>({...prevFilter,sublocation:[sublocation]})))}}),executedQuery&&react.createElement(advanced_search_AdvancedSearchResults,{q:executedQuery,pageSize,showContentOnly:showResultOnly,onShelf,locationFilter}))},advanced_search_AdvancedSearch=AdvancedSearch;try{AdvancedSearch.displayName="AdvancedSearch",AdvancedSearch.__docgenInfo={description:"",displayName:"AdvancedSearch",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"]={docgenInfo:AdvancedSearch.__docgenInfo,name:"AdvancedSearch",path:"src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,react.createElement(guarded_app.A,{app:"advanced-search"},react.createElement(advanced_search_AdvancedSearch,{pageSize})))}))));try{AdvancedSearchentry.displayName="AdvancedSearchentry",AdvancedSearchentry.__docgenInfo={description:"",displayName:"AdvancedSearchentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showingResultsForWithoutQueryText:{defaultValue:null,description:"",name:"showingResultsForWithoutQueryText",required:!0,type:{name:"string"}},advancedSearchLinkToThisSearchText:{defaultValue:null,description:"",name:"advancedSearchLinkToThisSearchText",required:!0,type:{name:"string"}},advancedSearchAllIndexesText:{defaultValue:null,description:"",name:"advancedSearchAllIndexesText",required:!0,type:{name:"string"}},advancedSearchCreatorText:{defaultValue:null,description:"",name:"advancedSearchCreatorText",required:!0,type:{name:"string"}},advancedSearchSubjectText:{defaultValue:null,description:"",name:"advancedSearchSubjectText",required:!0,type:{name:"string"}},advancedSearchGenreText:{defaultValue:null,description:"",name:"advancedSearchGenreText",required:!0,type:{name:"string"}},advancedSearchLanguageText:{defaultValue:null,description:"",name:"advancedSearchLanguageText",required:!0,type:{name:"string"}},advancedSearchDateText:{defaultValue:null,description:"",name:"advancedSearchDateText",required:!0,type:{name:"string"}},advancedSearchMainCreatorText:{defaultValue:null,description:"",name:"advancedSearchMainCreatorText",required:!0,type:{name:"string"}},advancedSearchMainTitleText:{defaultValue:null,description:"",name:"advancedSearchMainTitleText",required:!0,type:{name:"string"}},advancedSearchSourceText:{defaultValue:null,description:"",name:"advancedSearchSourceText",required:!0,type:{name:"string"}},advancedSearchDateFirstEditionText:{defaultValue:null,description:"",name:"advancedSearchDateFirstEditionText",required:!0,type:{name:"string"}},advancedSearchDecimalDk5Text:{defaultValue:null,description:"",name:"advancedSearchDecimalDk5Text",required:!0,type:{name:"string"}},advancedSearchTypeText:{defaultValue:null,description:"",name:"advancedSearchTypeText",required:!0,type:{name:"string"}},advancedSearchAudienceText:{defaultValue:null,description:"",name:"advancedSearchAudienceText",required:!0,type:{name:"string"}},advancedSearchPublisherText:{defaultValue:null,description:"",name:"advancedSearchPublisherText",required:!0,type:{name:"string"}},advancedSearchIdentifierText:{defaultValue:null,description:"",name:"advancedSearchIdentifierText",required:!0,type:{name:"string"}},advancedSearchAcSourceText:{defaultValue:null,description:"",name:"advancedSearchAcSourceText",required:!0,type:{name:"string"}},advancedSearchAddRowText:{defaultValue:null,description:"",name:"advancedSearchAddRowText",required:!0,type:{name:"string"}},advancedSearchTitleText:{defaultValue:null,description:"",name:"advancedSearchTitleText",required:!0,type:{name:"string"}},advancedSearchPreviewHeadlineText:{defaultValue:null,description:"",name:"advancedSearchPreviewHeadlineText",required:!0,type:{name:"string"}},advancedSearchPreviewEmptyText:{defaultValue:null,description:"",name:"advancedSearchPreviewEmptyText",required:!0,type:{name:"string"}},advancedSearchResetText:{defaultValue:null,description:"",name:"advancedSearchResetText",required:!0,type:{name:"string"}},advancedSearchCopyStringText:{defaultValue:null,description:"",name:"advancedSearchCopyStringText",required:!0,type:{name:"string"}},advancedSearchEditCqlText:{defaultValue:null,description:"",name:"advancedSearchEditCqlText",required:!0,type:{name:"string"}},advancedSearchSearchButtonText:{defaultValue:null,description:"",name:"advancedSearchSearchButtonText",required:!0,type:{name:"string"}},loadingResultsText:{defaultValue:null,description:"",name:"loadingResultsText",required:!0,type:{name:"string"}},toAdvancedSearchButtonText:{defaultValue:null,description:"",name:"toAdvancedSearchButtonText",required:!0,type:{name:"string"}},cqlSearchTitleText:{defaultValue:null,description:"",name:"cqlSearchTitleText",required:!0,type:{name:"string"}},copiedToClipboardText:{defaultValue:null,description:"",name:"copiedToClipboardText",required:!0,type:{name:"string"}},copiedLinkToThisSearchText:{defaultValue:null,description:"",name:"copiedLinkToThisSearchText",required:!0,type:{name:"string"}},clauseAndText:{defaultValue:null,description:"",name:"clauseAndText",required:!0,type:{name:"string"}},clauseOrText:{defaultValue:null,description:"",name:"clauseOrText",required:!0,type:{name:"string"}},clauseNotText:{defaultValue:null,description:"",name:"clauseNotText",required:!0,type:{name:"string"}},advancedSearchFilterMaterialTypeText:{defaultValue:null,description:"",name:"advancedSearchFilterMaterialTypeText",required:!0,type:{name:"string"}},advancedSearchFilterLiteratureFormText:{defaultValue:null,description:"",name:"advancedSearchFilterLiteratureFormText",required:!0,type:{name:"string"}},advancedSearchFilterAccessText:{defaultValue:null,description:"",name:"advancedSearchFilterAccessText",required:!0,type:{name:"string"}},advancedSearchFilterBookText:{defaultValue:null,description:"",name:"advancedSearchFilterBookText",required:!0,type:{name:"string"}},advancedSearchFilterEbookText:{defaultValue:null,description:"",name:"advancedSearchFilterEbookText",required:!0,type:{name:"string"}},advancedSearchFilterAudioBookText:{defaultValue:null,description:"",name:"advancedSearchFilterAudioBookText",required:!0,type:{name:"string"}},advancedSearchFilterArticleText:{defaultValue:null,description:"",name:"advancedSearchFilterArticleText",required:!0,type:{name:"string"}},advancedSearchFilterMovieText:{defaultValue:null,description:"",name:"advancedSearchFilterMovieText",required:!0,type:{name:"string"}},advancedSearchFilterMusicText:{defaultValue:null,description:"",name:"advancedSearchFilterMusicText",required:!0,type:{name:"string"}},advancedSearchFilterPhysicalText:{defaultValue:null,description:"",name:"advancedSearchFilterPhysicalText",required:!0,type:{name:"string"}},advancedSearchFilterOnlineText:{defaultValue:null,description:"",name:"advancedSearchFilterOnlineText",required:!0,type:{name:"string"}},advancedSearchFilterFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterFictionText",required:!0,type:{name:"string"}},advancedSearchFilterNonFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterNonFictionText",required:!0,type:{name:"string"}},advancedSearchFilterHoldingStatusText:{defaultValue:null,description:"",name:"advancedSearchFilterHoldingStatusText",required:!0,type:{name:"string"}},advancedSearchInputLabelText:{defaultValue:null,description:"",name:"advancedSearchInputLabelText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"]={docgenInfo:AdvancedSearchentry.__docgenInfo,name:"AdvancedSearchentry",path:"src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_dev={title:"Apps / Advanced Search",component:AdvancedSearch_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},advancedSearchInputLabelText:{name:"Advanced search input label",defaultValue:"Input field @inputNumber",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingMaterialsText:{name:"Showing materials",defaultValue:"Showing materials (@hitcount)",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},advancedSearchLinkToThisSearchText:{name:"Advanced search copy to clipboard button text",defaultValue:"Link to this search",control:{type:"text"}},advancedSearchAllIndexesText:{name:"Advanced search indexes - all",defaultValue:"All indexes",control:{type:"text"}},advancedSearchCreatorText:{name:"Advanced search indexes - creator",defaultValue:"Creator",control:{type:"text"}},advancedSearchSubjectText:{name:"Advanced search indexes - subject",defaultValue:"Subject",control:{type:"text"}},advancedSearchGenreText:{name:"Advanced search indexes - genre",defaultValue:"Genre",control:{type:"text"}},advancedSearchLanguageText:{name:"Advanced search indexes - language",defaultValue:"Language",control:{type:"text"}},advancedSearchDateText:{name:"Advanced search indexes - date",defaultValue:"Date",control:{type:"text"}},advancedSearchMainCreatorText:{name:"Advanced search indexes - main creator",defaultValue:"Main creator",control:{type:"text"}},advancedSearchMainTitleText:{name:"Advanced search indexes - main title",defaultValue:"Main title",control:{type:"text"}},advancedSearchSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchDateFirstEditionText:{name:"Advanced search indexes - edition",defaultValue:"Edition",control:{type:"text"}},advancedSearchDecimalDk5Text:{name:"Advanced search indexes - DK5",defaultValue:"DK5",control:{type:"text"}},advancedSearchTypeText:{name:"Advanced search indexes - type",defaultValue:"Type",control:{type:"text"}},advancedSearchAudienceText:{name:"Advanced search indexes - audience",defaultValue:"Audience",control:{type:"text"}},advancedSearchPublisherText:{name:"Advanced search indexes - publisher",defaultValue:"Publisher",control:{type:"text"}},advancedSearchIdentifierText:{name:"Advanced search indexes - identifier",defaultValue:"Identifier",control:{type:"text"}},advancedSearchAcSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchAddRowText:{name:"Add row",defaultValue:"Add row",control:{type:"text"}},advancedSearchInputPlaceholderText:{name:"Advanced search input placeholder",defaultValue:"Search term",control:{type:"text"}},advancedSearchTitleText:{name:"Advanced search page title",defaultValue:"Advanced search",control:{type:"text"}},advancedSearchPreviewHeadlineText:{name:"Advanced search CQL preview headline",defaultValue:"CQL search string",control:{type:"text"}},advancedSearchPreviewEmptyText:{name:"Advanced search empty preview",defaultValue:"-",control:{type:"text"}},advancedSearchResetText:{name:"Advanced search reset button text",defaultValue:"Reset",control:{type:"text"}},advancedSearchCopyStringText:{name:"Advanced search page copy string button text",defaultValue:"Copy CQL",control:{type:"text"}},advancedSearchEditCqlText:{name:"Advanced search page edit CQL button text",defaultValue:"Edit CQL",control:{type:"text"}},advancedSearchSearchButtonText:{name:"Advanced search search button text",defaultValue:"Search",control:{type:"text"}},loadingResultsText:{name:"Advanced search loading results text",defaultValue:"Loading results...",control:{type:"text"}},toAdvancedSearchButtonText:{name:"To advanced search button text",defaultValue:"Back to advanced search",control:{type:"text"}},cqlSearchTitleText:{name:"CQL search title text",defaultValue:"CQL search",control:{type:"text"}},copiedToClipboardText:{name:"Text that appears after copying to clipboard",defaultValue:"Copied",control:{type:"text"}},copiedLinkToThisSearchText:{name:"Text that appears after getting link to a search copied to clipboard",defaultValue:"Link copied to clipboard",control:{type:"text"}},clauseAndText:{name:"Advanced search clause - AND",defaultValue:"AND",control:{type:"text"}},clauseOrText:{name:"Advanced search clause - OR",defaultValue:"OR",control:{type:"text"}},clauseNotText:{name:"Advanced search clause - NOT",defaultValue:"NOT",control:{type:"text"}},advancedSearchFilterMaterialTypeText:{name:"Advanced search filter - material type",defaultValue:"Material Type",control:{type:"text"}},advancedSearchFilterLiteratureFormText:{name:"Advanced search filter - literature form",defaultValue:"Literature form",control:{type:"text"}},advancedSearchFilterAccessText:{name:"Advanced search filter - access",defaultValue:"Accessibility",control:{type:"text"}},advancedSearchFilterBookText:{name:"Advanced search filter - book",defaultValue:"Book",control:{type:"text"}},advancedSearchFilterEbookText:{name:"Advanced search filter - ebook",defaultValue:"Ebook",control:{type:"text"}},advancedSearchFilterAudioBookText:{name:"Advanced search filter - audio book",defaultValue:"Audio book",control:{type:"text"}},advancedSearchFilterArticleText:{name:"Advanced search filter - article",defaultValue:"Article",control:{type:"text"}},advancedSearchFilterMovieText:{name:"Advanced search filter - movie",defaultValue:"Movie",control:{type:"text"}},advancedSearchFilterMusicText:{name:"Advanced search filter - music",defaultValue:"Music",control:{type:"text"}},advancedSearchFilterPhysicalText:{name:"Advanced search filter - physical access",defaultValue:"Physical",control:{type:"text"}},advancedSearchFilterOnlineText:{name:"Advanced search filter - online access",defaultValue:"Online",control:{type:"text"}},advancedSearchFilterFictionText:{name:"Advanced search filter - fiction",defaultValue:"Fiction",control:{type:"text"}},advancedSearchFilterNonFictionText:{name:"Advanced search filter - non-fiction",defaultValue:"Non-fiction",control:{type:"text"}},advancedSearchFilterHoldingStatusText:{name:"Advanced search filter - holding status",defaultValue:"Holding Status On Shelf",control:{type:"text"}}}},AdvancedSearch_dev_AdvancedSearch=args=>react.createElement(AdvancedSearch_entry,args)},"./src/apps/create-patron-user-info/CreatePatron.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CreatePatronEntry:()=>CreatePatron_dev_CreatePatronEntry,default:()=>CreatePatron_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx"),ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const UserInfo=({cpr,registerSuccessCallback})=>{const t=(0,utils_text.F)(),logoutUrl=(0,utils_url.Ik)()("logoutUrl"),config=(0,utils_config.UK)(),formRef=(0,react.useRef)(null),[pin,setPin]=(0,react.useState)(null),minAge=parseInt(config("minAgeConfig"),10),[validCpr]=(0,react.useState)((0,general.AQ)(cpr,minAge)),{mutate}=(0,fbs.AQ)(),[patron,setPatron]=(0,react.useState)({preferredPickupBranch:"",receiveEmail:!0,receivePostalMail:!1,receiveSms:!1,phoneNumber:"",emailAddress:""}),[isLoading,setIsLoading]=(0,react.useState)(!1),[isSubmitError,setIsSubmitError]=(0,react.useState)(!1),[isPinValid,setIsPinValid]=(0,react.useState)(!0),changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)};return react.createElement(react.Fragment,null,validCpr&&react.createElement("div",{className:"create-patron-page"},react.createElement("h1",{className:"create-patron-page__title"},t("createPatronHeaderText")),react.createElement("form",{onSubmit:e=>(e=>{e.preventDefault(),setIsLoading(!0);const{preferredPickupBranch,emailAddress}=patron;pin&&preferredPickupBranch&&emailAddress&&mutate({data:{cprNumber:cpr,patron,pincode:pin}},{onSuccess:()=>{setIsLoading(!1),registerSuccessCallback(!0)},onError:()=>{setIsLoading(!1),setIsSubmitError(!0)}})})(e),ref:formRef},react.createElement(ContactInfoSection.A,{showCheckboxes:!1,isDouble:!0,inLine:!0,changePatron,patron,requiredFields:["email"]}),react.createElement(PincodeSection.A,{required:!0,changePincode:setPin,isFlex:!0,setIsPinValid}),react.createElement(BranchesDropdown.A,{classNames:"dropdown--grey-borders",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch"),required:!0,footnote:t("createPatronBranchDropdownNoteText")}),react.createElement("div",{className:"create-patron-page__buttons"},react.createElement("button",{type:"submit",className:"btn-primary btn-filled btn-small","data-cy":"complete-user-registration-button",disabled:!isPinValid},((t,isLoading,isSubmitError)=>t(isLoading?"createPatronButtonLoadingText":isSubmitError?"createPatronButtonErrorText":"createPatronConfirmButtonText"))(t,isLoading,isSubmitError)),react.createElement(Link.A,{href:logoutUrl,className:"link-tag mx-16 mt-8",dataCy:"cancel-user-registration-button"},t("createPatronCancelButtonText"))))),!validCpr&&react.createElement("div",{className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 mb-48"},t("createPatronInvalidSsnHeaderText")),react.createElement("p",null,t("createPatronInvalidSsnBodyText"))))},create_patron_user_info_UserInfo=UserInfo;try{UserInfo.displayName="UserInfo",UserInfo.__docgenInfo={description:"",displayName:"UserInfo",props:{cpr:{defaultValue:null,description:"",name:"cpr",required:!0,type:{name:"string"}},registerSuccessCallback:{defaultValue:null,description:"",name:"registerSuccessCallback",required:!0,type:{name:"(success: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"]={docgenInfo:UserInfo.__docgenInfo,name:"UserInfo",path:"src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class AdgangsPlatformenServiceHttpError extends FetcherCriticalHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","AdgangsPlatformenServiceHttpError")}}const adgangsplatformen_useUserInfo=queryOptions=>{const userinfoUrl=(0,utils_url.Ik)()("userinfoUrl"),url=String(userinfoUrl),queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(url=>{const userToken=(0,user.dG)();if(!userToken)throw new Error("User token is missing");return`${url}:${userToken}`})(url),getUserInfo=(infoUrl,signal)=>(async({url,method,headers,data})=>{const userToken=(0,user.dG)();if(!userToken)throw new Error("User token is missing");const authHeaders=userToken?{Authorization:`Bearer ${userToken}`}:{},body=data?JSON.stringify(data):null;try{const response=await fetch(url,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new AdgangsPlatformenServiceHttpError(response.status,response.statusText,url);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof AdgangsPlatformenServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,url)}return null})({url:infoUrl,method:"get",signal});return{queryKey,...(0,es.useQuery)(queryKey,(()=>getUserInfo(url)),queryOptions)}};var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const RedirectToLoginMessage=()=>{const t=(0,utils_text.F)(),u=(0,utils_url.Ik)(),redirectUrl=(({loginUrl,logoutUrl,redirectOnUserCreatedUrl})=>(0,url.xl)(logoutUrl,{"current-path":`${loginUrl.pathname}?current-path=${redirectOnUserCreatedUrl.pathname}`}))({loginUrl:u("authUrl"),logoutUrl:u("logoutUrl"),redirectOnUserCreatedUrl:u("redirectOnUserCreatedUrl")}),[seconds,setseconds]=(0,react.useState)(10);return(0,react.useEffect)((()=>{seconds>0&&setTimeout((()=>setseconds(seconds-1)),1e3),0===seconds&&(0,url.SE)(redirectUrl)}),[redirectUrl,seconds]),react.createElement("section",{className:"redirect-to-login-message"},react.createElement("p",{className:"redirect-to-login-message__top"},t("postRegisterRedirectInfoTopText")),react.createElement("p",{className:"redirect-to-login-message__bottom"},t("postRegisterRedirectInfoBottomText",{placeholders:{"@seconds":`${seconds}`}})),react.createElement(Button.$,{buttonType:"default",size:"small",collapsible:!1,disabled:!1,variant:"outline",onClick:()=>{(0,url.SE)(redirectUrl)},classNames:"mt-32",label:t("postRegisterRedirectButtonText")}))},create_patron_user_info_RedirectToLoginMessage=RedirectToLoginMessage;try{RedirectToLoginMessage.displayName="RedirectToLoginMessage",RedirectToLoginMessage.__docgenInfo={description:"",displayName:"RedirectToLoginMessage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/RedirectToLoginMessage.tsx#RedirectToLoginMessage"]={docgenInfo:RedirectToLoginMessage.__docgenInfo,name:"RedirectToLoginMessage",path:"src/apps/create-patron-user-info/RedirectToLoginMessage.tsx#RedirectToLoginMessage"})}catch(__react_docgen_typescript_loader_error){}const CreatePatron=({cpr})=>{const[userInfoCpr,setCpr]=(0,react.useState)(null),[patronIsRegistered,setPpatronIsRegistered]=(0,react.useState)(null),config=(0,utils_config.UK)(),t=(0,utils_text.F)(),{id:agencyId}=config("agencyConfig",{transformer:"jsonParse"}),{data:userInfo,isLoading}=adgangsplatformen_useUserInfo({enabled:!cpr});return(0,react.useEffect)((()=>{if(isLoading||!userInfo||cpr)return;const{attributes:{cpr:userCpr}}=userInfo;setCpr(String(userCpr))}),[agencyId,isLoading,userInfo,cpr]),cpr?react.createElement(create_patron_user_info_UserInfo,{cpr,registerSuccessCallback:setPpatronIsRegistered}):isLoading?react.createElement("div",null,t("loadingText")):userInfoCpr?patronIsRegistered?react.createElement(create_patron_user_info_RedirectToLoginMessage,null):react.createElement(create_patron_user_info_UserInfo,{cpr:userInfoCpr,registerSuccessCallback:setPpatronIsRegistered}):null},create_patron_user_info_CreatePatron=CreatePatron;try{CreatePatron.displayName="CreatePatron",CreatePatron.__docgenInfo={description:"",displayName:"CreatePatron",props:{cpr:{defaultValue:null,description:"",name:"cpr",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"]={docgenInfo:CreatePatron.__docgenInfo,name:"CreatePatron",path:"src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"})}catch(__react_docgen_typescript_loader_error){}const CreatePatron_entry=(0,utils_config.NV)((0,utils_text.i)((0,utils_url.nU)((({fakeCpr})=>{const dashboardUrl=(0,utils_url.Ik)()("dashboardUrl");return(0,react.useEffect)((()=>{(0,user.u7)()||(0,url.SE)(dashboardUrl)}),[dashboardUrl]),(0,user.u7)()?react.createElement(create_patron_user_info_CreatePatron,{cpr:fakeCpr}):null}))));try{CreatePatronentry.displayName="CreatePatronentry",CreatePatronentry.__docgenInfo={description:"",displayName:"CreatePatronentry",props:{fakeCpr:{defaultValue:null,description:"",name:"fakeCpr",required:!1,type:{name:"string | undefined"}},agencyConfig:{defaultValue:null,description:"",name:"agencyConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},loginUrl:{defaultValue:null,description:"",name:"loginUrl",required:!0,type:{name:"string"}},redirectOnUserCreatedUrl:{defaultValue:null,description:"",name:"redirectOnUserCreatedUrl",required:!0,type:{name:"string"}},logoutUrl:{defaultValue:null,description:"",name:"logoutUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dashboardUrl:{defaultValue:null,description:"",name:"dashboardUrl",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},createPatronCancelButtonText:{defaultValue:null,description:"",name:"createPatronCancelButtonText",required:!0,type:{name:"string"}},patronPagePhoneInputMessageText:{defaultValue:null,description:"",name:"patronPagePhoneInputMessageText",required:!0,type:{name:"string"}},createPatronConfirmButtonText:{defaultValue:null,description:"",name:"createPatronConfirmButtonText",required:!0,type:{name:"string"}},createPatronHeaderText:{defaultValue:null,description:"",name:"createPatronHeaderText",required:!0,type:{name:"string"}},createPatronInvalidSsnBodyText:{defaultValue:null,description:"",name:"createPatronInvalidSsnBodyText",required:!0,type:{name:"string"}},createPatronInvalidSsnHeaderText:{defaultValue:null,description:"",name:"createPatronInvalidSsnHeaderText",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactNameLabelText:{defaultValue:null,description:"",name:"patronContactNameLabelText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},phoneInputMessageText:{defaultValue:null,description:"",name:"phoneInputMessageText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}},createPatronButtonLoadingText:{defaultValue:null,description:"",name:"createPatronButtonLoadingText",required:!0,type:{name:"string"}},createPatronButtonErrorText:{defaultValue:null,description:"",name:"createPatronButtonErrorText",required:!0,type:{name:"string"}},createPatronBranchDropdownNoteText:{defaultValue:null,description:"",name:"createPatronBranchDropdownNoteText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"]={docgenInfo:CreatePatronentry.__docgenInfo,name:"CreatePatronentry",path:"src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),token=__webpack_require__("./src/core/token.js");const CreatePatron_dev={title:"Apps / Create patron",component:CreatePatron_entry,argTypes:{...serviceUrlArgs.A,...pincodeArgs.A,...globalTextArgs.A,...globalConfigArgs.A,authUrl:{name:"Url where user can authenticate",defaultValue:"/login",control:{type:"text"}},logoutUrl:{name:"Url where user can logout",defaultValue:"/logout",control:{type:"text"}},blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},minAgeConfig:{defaultValue:"18",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},userinfoUrl:{defaultValue:"https://login.bib.dk/userinfo",control:{type:"text"}},dashboardUrl:{defaultValue:"/user/me/dashboard",control:{type:"text"}},agencyConfig:{defaultValue:'{ "id": "999999" }',control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronContactNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},createPatronHeaderText:{defaultValue:"Register as patron",control:{type:"text"}},createPatronInvalidSsnHeaderText:{defaultValue:"Invalid SSN",control:{type:"text"}},createPatronInvalidSsnBodyText:{defaultValue:"This SSN is invalid",control:{type:"text"}},redirectOnUserCreatedUrl:{defaultValue:"https://unsplash.com/photos/KRztl5I6xac",control:{type:"text"}},createPatronConfirmButtonText:{defaultValue:"Confirm",control:{type:"text"}},phoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}},fakeCpr:{name:"Storybook context cpr",defaultValue:"0101901111",control:{type:"text"}},createPatronCancelButtonText:{name:"create patron cancel button text",defaultValue:"Cancel",control:{type:"text"}},patronPagePhoneInputMessageText:{name:"patron page phone input message text",defaultValue:"Phone number",control:{type:"text"}},createPatronButtonLoadingText:{name:"create patron button loading text",defaultValue:"Loading",control:{type:"text"}},createPatronButtonErrorText:{name:"create patron button error text",defaultValue:"Error occurred",control:{type:"text"}},createPatronBranchDropdownNoteText:{name:"create patron branch dropdown note text",defaultValue:"Choose preferred library for pickup of your future reservations.",control:{type:"text"}},postRegisterRedirectInfoTopText:{name:"Redirect info top text",defaultValue:"You are now registered as a user and need to log in again to be able to use the application.",control:{type:"text"}},postRegisterRedirectInfoBottomText:{name:"Redirect info bottom text",defaultValue:"You will be sent to the Adgangsplatformen to log in again in @seconds seconds.",control:{type:"text"}},postRegisterRedirectButtonText:{name:"Redirect button text",defaultValue:"Log in again",control:{type:"text"}}}},CreatePatron_dev_CreatePatronEntry=(props=>((0,token.WG)(token.g2,"123456"),react.createElement(CreatePatron_entry,props))).bind({});CreatePatron_dev_CreatePatronEntry.args={}},"./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>dashboard_notification_list});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const yesterday=dayjs_min_default()().subtract(1,"day").format(date_format.n2),soon=dayjs_min_default()().add(7,"days").format(date_format.n2),longer=dayjs_min_default()().add(1,"year").format(date_format.n2);var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const dashboard_notification=({notificationNumber,notificationText,dataCy,notificationColor,notificationClickEvent,showStatusLabel=!1,badge})=>0===notificationNumber?null:react.createElement("button",{type:"button","data-cy":dataCy,onClick:notificationClickEvent,className:"mb-16"},react.createElement("div",{className:"list-dashboard shadow-medium-hover arrow__hover--right-small"},react.createElement("div",{className:`color-secondary-gray number number--${notificationColor}`},notificationNumber),react.createElement("span",{className:"list-dashboard__title text-header-h4 color-secondary-gray"},notificationText),showStatusLabel&&react.createElement(react.Fragment,null,"danger"===notificationColor&&react.createElement(status_badge.A,{dangerText:badge}),"warning"===notificationColor&&react.createElement(status_badge.A,{warningText:badge}),"info"===notificationColor&&react.createElement(status_badge.A,{infoText:badge})),react.createElement("div",{className:"list-dashboard__arrow"},react.createElement(arrow.A,null))));try{dashboardnotification.displayName="dashboardnotification",dashboardnotification.__docgenInfo={description:"",displayName:"dashboardnotification",props:{notificationNumber:{defaultValue:null,description:"",name:"notificationNumber",required:!0,type:{name:"number"}},showStatusLabel:{defaultValue:{value:"false"},description:"",name:"showStatusLabel",required:!1,type:{name:"boolean | undefined"}},notificationText:{defaultValue:null,description:"",name:"notificationText",required:!0,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},notificationColor:{defaultValue:null,description:"",name:"notificationColor",required:!0,type:{name:"string"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"string | undefined"}},notificationClickEvent:{defaultValue:null,description:"",name:"notificationClickEvent",required:!0,type:{name:"() => void"}},notificationClickEventParam:{defaultValue:null,description:"",name:"notificationClickEventParam",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"]={docgenInfo:dashboardnotification.__docgenInfo,name:"dashboardnotification",path:"src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"})}catch(__react_docgen_typescript_loader_error){}const notification_skeleton=()=>react.createElement("div",{className:"list-dashboard ssc mb-16"},react.createElement("div",{className:"ssc-circle"}),react.createElement("div",{className:"ssc-head-line w-40"}));try{notificationskeleton.displayName="notificationskeleton",notificationskeleton.__docgenInfo={description:"",displayName:"notificationskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification/notification-skeleton.tsx#notificationskeleton"]={docgenInfo:notificationskeleton.__docgenInfo,name:"notificationskeleton",path:"src/apps/dashboard/dashboard-notification/notification-skeleton.tsx#notificationskeleton"})}catch(__react_docgen_typescript_loader_error){}const Notifications=({materials,showOnlyNotifications=!1,showStatusLabel=!1,isLoading=!1})=>{const displayedNotifications=showOnlyNotifications?materials.filter((({showNotificationDot})=>showNotificationDot)):materials;return isLoading&&0===displayedNotifications.length?react.createElement(react.Fragment,null,[0,1].map((()=>react.createElement(notification_skeleton,null)))):react.createElement(react.Fragment,null,displayedNotifications.map((({listLength,header:headerNotification,color,notificationClickEvent,badge,dataCy})=>react.createElement(dashboard_notification,{notificationNumber:listLength,notificationText:headerNotification,badge,dataCy,key:headerNotification,notificationColor:color,notificationClickEvent,showStatusLabel}))))},dashboard_notification_list_Notifications=Notifications;try{Notifications.displayName="Notifications",Notifications.__docgenInfo={description:"",displayName:"Notifications",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},showOnlyNotifications:{defaultValue:{value:"false"},description:"",name:"showOnlyNotifications",required:!1,type:{name:"boolean | undefined"}},showStatusLabel:{defaultValue:{value:"false"},description:"",name:"showStatusLabel",required:!1,type:{name:"boolean | undefined"}},isLoading:{defaultValue:{value:"false"},description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"]={docgenInfo:Notifications.__docgenInfo,name:"Notifications",path:"src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const NotificationColumn=({materials,materialsCount,emptyListText,header,isLoading=!1,linkText,linkUrl})=>react.createElement("div",{className:"status-userprofile__column my-64"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper mb-16"},react.createElement("h2",{"data-cy":`dashboard-${header.toLowerCase()}-header`,className:"text-header-h3"},header))),isLoading&&0===materialsCount&&react.createElement(notification_skeleton,null),!isLoading&&0===materialsCount&&react.createElement(empty_list.A,{emptyListText}),0!==materialsCount&&react.createElement(dashboard_notification_list_Notifications,{materials,showStatusLabel:!0}),linkText&&linkUrl&&react.createElement("div",{className:"mt-8"},react.createElement(Link.A,{href:linkUrl,className:"link-tag link-tag link-filters__tag"},linkText),react.createElement("span",{className:"link-filters__counter"},materialsCount))),dashboard_notification_list_NotificationColumn=NotificationColumn;try{NotificationColumn.displayName="NotificationColumn",NotificationColumn.__docgenInfo={description:"",displayName:"NotificationColumn",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},materialsCount:{defaultValue:null,description:"",name:"materialsCount",required:!0,type:{name:"number"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}},isLoading:{defaultValue:{value:"false"},description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}},linkText:{defaultValue:null,description:"",name:"linkText",required:!1,type:{name:"string | undefined"}},linkUrl:{defaultValue:null,description:"",name:"linkUrl",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"]={docgenInfo:NotificationColumn.__docgenInfo,name:"NotificationColumn",path:"src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"})}catch(__react_docgen_typescript_loader_error){}var modal=__webpack_require__("./src/core/utils/modal.tsx"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const GroupModalReservationsList=({materials,selectedMaterials,selectMaterials,pageSize,header,marginBottonPager,openDetailsModal})=>{const t=(0,utils_text.F)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:materials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...materials].splice(0,itemsShown))}),[itemsShown,materials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.findIndex((obj=>null!==item.faust?obj.faust===item.faust:void 0!==item.identifier?obj.identifier===item.identifier:-1));indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return 0===displayedMaterials.length?null:react.createElement(react.Fragment,null,react.createElement("h3",{className:"text-body-medium-regular"},header),react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((material,i)=>{const{expiryDate,faust,identifier,reservationIds}=material,selected=null==selectedMaterials?void 0:selectedMaterials.some((selectedMaterial=>isEqual_default()(selectedMaterial,material))),statusText=(0,helpers.Iw)(material,t),statusBadgeComponent=statusText?react.createElement(status_badge.A,{badgeDate:expiryDate,neutralText:statusText,infoText:""}):null;return(identifier||reservationIds||faust)&&react.createElement(selectable_material.A,{item:material,displayedMaterial:material,focused:i===firstInNewPage,statusBadgeComponent,openDetailsModal,key:(0,reservation_type.OQ)(material),selected,onMaterialChecked,disabled:!1,statusMessageComponentMobile:null,statusMessageComponentDesktop:null})}))),react.createElement(PagerComponent,{classNames:marginBottonPager?"result-pager--margin-bottom":""}))},GroupModal_GroupModalReservationsList=GroupModalReservationsList;try{GroupModalReservationsList.displayName="GroupModalReservationsList",GroupModalReservationsList.__docgenInfo={description:"",displayName:"GroupModalReservationsList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"Nullable>[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>; }>>[]) => void"}},marginBottonPager:{defaultValue:null,description:"",name:"marginBottonPager",required:!0,type:{name:"boolean"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"]={docgenInfo:GroupModalReservationsList.__docgenInfo,name:"GroupModalReservationsList",path:"src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"})}catch(__react_docgen_typescript_loader_error){}var StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const modal_ReservationsGroupModal=({pageSize,modalId,setReservationsToDelete,openDetailsModal})=>{const{fbs,publizon}=(0,useReservations.A)(),t=(0,utils_text.F)(),{reservationsReady,reservationsQueued}=(0,modal_helpers.c6)(),[materialsToDelete,setMaterialsToDelete]=(0,react.useState)([]);let physicalReservations=[],digitalReservations=[];modalId===reservationsReady&&(physicalReservations=fbs.readyToLoan,digitalReservations=publizon.readyToLoan),modalId===reservationsQueued&&(physicalReservations=fbs.queued,digitalReservations=publizon.queued),(0,react.useEffect)((()=>{setMaterialsToDelete([])}),[modalId]);const selectableReservations=[...physicalReservations,...digitalReservations],selectMaterials=materials=>{setMaterialsToDelete(materials)};return react.createElement(modal.A,{modalId,closeModalAriaLabelText:t("groupModalReservationsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalReservationsLoansAriaDescriptionText")},react.createElement("div",{className:"modal-loan"},react.createElement("div",{className:"modal-loan__list"},modalId===reservationsQueued&&react.createElement(SimpleModalHeader.A,{header:t("queuedReservationsText")}),modalId===reservationsReady&&react.createElement(StatusCircleModalHeader.A,{header:t("reservationsReadyForPickupText"),statusCircleComponent:react.createElement(status_circle.A,{loanDate:""})}),react.createElement(GroupModalContent.A,{buttonComponent:react.createElement(Button.$,{label:t("removeAllReservationsText",{count:materialsToDelete.length,placeholders:{"@amount":materialsToDelete.length}}),buttonType:"none",disabled:!materialsToDelete.length,collapsible:!1,size:"small",variant:"filled",onClick:()=>(setReservationsToDelete(materialsToDelete),void setMaterialsToDelete([])),dataCy:"remove-reservations-button"}),amountOfSelectableMaterials:selectableReservations.length,selectableMaterials:selectableReservations,selectedMaterials:materialsToDelete,selectMaterials},react.createElement(GroupModal_GroupModalReservationsList,{openDetailsModal,header:t("physicalReservationsHeaderText"),materials:physicalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials,marginBottonPager:0===digitalReservations.length}),react.createElement(GroupModal_GroupModalReservationsList,{marginBottonPager:!0,openDetailsModal,header:t("digitalReservationsHeaderText"),materials:digitalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials})))))};try{ReservationsGroupModal.displayName="ReservationsGroupModal",ReservationsGroupModal.__docgenInfo={description:"",displayName:"ReservationsGroupModal",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setReservationsToDelete:{defaultValue:null,description:"",name:"setReservationsToDelete",required:!0,type:{name:"(reservations: Nullable>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"]={docgenInfo:ReservationsGroupModal.__docgenInfo,name:"ReservationsGroupModal",path:"src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"})}catch(__react_docgen_typescript_loader_error){}var reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const dashboard_notification_list=({pageSize,columns})=>{const t=(0,utils_text.F)(),u=(0,url.Ik)(),physicalLoansUrl=u("physicalLoansUrl"),reservationsUrl=u("reservationsUrl"),{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:reservationsQueued,isLoading:isLoadingReservations}}=(0,useReservations.A)(),{all:{loans,isLoading:isLoadingLoans},fbs:{overdue:loansOverduePhysical,soonOverdue:loansSoonOverduePhysical,farFromOverdue:loansFarFromOverduePhysical,isLoading:isLoadingLoansPhysical},publizon:{soonOverdue:loansSoonOverdueDigital,farFromOverdue:loansFarFromOverdueDigital,isLoading:isLoadingLoansDigital}}=(0,useLoans.A)(),[reservationsForDeleting,setReservationsForDeleting]=(0,react.useState)([]),[loansToDisplay,setLoansToDisplay]=(0,react.useState)(null),[modalHeader,setModalHeader]=(0,react.useState)(""),{open}=(0,modal.X)(),{dueDateModal,deleteReservations}=(0,modal_helpers.c6)(),[dueDate,setDueDate]=(0,react.useState)(null),[modalLoan,setModalLoan]=(0,react.useState)(null),[reservationForModal,setReservationForModal]=(0,react.useState)(null),[reservationModalId,setReservationModalId]=(0,react.useState)(""),openModalHandler=(0,react.useCallback)((modalId=>{setReservationModalId(modalId),open(modalId)}),[open]),{reservationsReady:reservationsReadyID,reservationsQueued:reservationsQueueID}=(0,modal_helpers.c6)(),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.B0)(loan))}),[open]),openReservationDetailsModal=(0,react.useCallback)((reservation=>{setReservationForModal(reservation),open((0,material_details_modal.bk)(reservation))}),[open]),openReservationDeleteModal=(0,react.useCallback)((()=>{reservationForModal&&open((0,delete_reservation_modal.g)(reservationForModal))}),[open,reservationForModal]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{switch(setDueDate(dueDateInput),dueDateInput){case yesterday:setLoansToDisplay(loansOverduePhysical),setModalHeader(t("loansOverdueText"));break;case soon:setLoansToDisplay(loansSoonOverduePhysical.concat(loansSoonOverdueDigital)),setModalHeader(t("loansSoonOverdueText"));break;case longer:setLoansToDisplay(loansFarFromOverduePhysical.concat(loansFarFromOverdueDigital)),setModalHeader(t("loansNotOverdueText"));break;default:throw new Error("Invalid due date input")}open((0,modal_helpers.Q0)(dueDateModal,[dueDateInput]))}),[dueDateModal,open,loansFarFromOverduePhysical,loansOverduePhysical,loansSoonOverduePhysical,loansSoonOverdueDigital,loansFarFromOverdueDigital,t]),dashboardNotificationsLoan=[{listLength:loansOverduePhysical.length,badge:t("materialDetailsOverdueText"),header:t("loansOverdueText"),color:"danger",dataCy:"physical-loans-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansOverduePhysical.length?openLoanDetailsModal(loansOverduePhysical[0]):openDueDateModal(yesterday)},{listLength:loansSoonOverduePhysical.length+loansSoonOverdueDigital.length,badge:t("statusBadgeWarningText"),header:t("loansSoonOverdueText"),color:"warning",dataCy:"physical-loans-soon-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansSoonOverduePhysical.length?openLoanDetailsModal(loansSoonOverduePhysical[0]):openDueDateModal(soon)},{listLength:loansFarFromOverduePhysical.length+loansFarFromOverdueDigital.length,header:t("loansNotOverdueText"),dataCy:"loans-not-overdue",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===loansFarFromOverduePhysical.length?openLoanDetailsModal(loansFarFromOverduePhysical[0]):openDueDateModal(longer)}],dashboardNotificationsReservations=[{listLength:reservationsReadyToLoan.length,header:t("reservationsReadyText"),badge:t("readyForLoanText"),dataCy:"reservations-ready",showNotificationDot:!0,color:"info",notificationClickEvent:()=>1===reservationsReadyToLoan.length?openReservationDetailsModal(reservationsReadyToLoan[0]):openModalHandler(reservationsReadyID)},{listLength:reservationsQueued.length,header:t("reservationsStillInQueueForText"),dataCy:"reservations-queued",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===reservationsQueued.length?openReservationDetailsModal(reservationsQueued[0]):openModalHandler(reservationsQueueID)}];return react.createElement(react.Fragment,null,react.createElement("div",{className:"status-userprofile"},columns&&react.createElement(react.Fragment,null,react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsLoan,materialsCount:loans.length,header:t("physicalLoansText"),emptyListText:t("noPhysicalLoansText"),isLoading:isLoadingLoans||isLoadingLoansPhysical||isLoadingLoansDigital,linkText:t("dashboardLoansLinkText"),linkUrl:physicalLoansUrl}),react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsReservations,materialsCount:reservations.length,header:t("reservationsText"),emptyListText:t("noReservationsText"),isLoading:isLoadingReservations,linkText:t("dashboardReservationsLinkText"),linkUrl:reservationsUrl}))),!columns&&react.createElement(dashboard_notification_list_Notifications,{showOnlyNotifications:!0,materials:[...dashboardNotificationsLoan,...dashboardNotificationsReservations],isLoading:isLoadingLoans||isLoadingLoansPhysical||isLoadingLoansDigital||isLoadingReservations}),modalLoan&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.B0)(modalLoan)},react.createElement(material_details.A,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.B0)(modalLoan)})),dueDate&&loans&&loansToDisplay&&react.createElement(LoansGroupModal.A,{pageSize,openDetailsModal:openLoanDetailsModal,dueDate,loansModal:loansToDisplay},react.createElement(SimpleModalHeader.A,{header:modalHeader})),reservations&&react.createElement(modal_ReservationsGroupModal,{openDetailsModal:openReservationDetailsModal,modalId:reservationModalId,setReservationsToDelete:resForDeleting=>{setReservationsForDeleting(resForDeleting),open(deleteReservations)},pageSize}),reservationForModal&&react.createElement(delete_reservation_modal.A,{modalId:(0,delete_reservation_modal.g)(reservationForModal),reservations:[reservationForModal]}),reservationsForDeleting&&react.createElement(delete_reservation_modal.A,{modalId:`${deleteReservations}`,reservations:reservationsForDeleting}),reservationForModal&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.bk)(reservationForModal)},react.createElement(reservation_details.A,{openReservationDeleteModal,item:reservationForModal,reservation:reservationForModal})))};try{dashboardnotificationlist.displayName="dashboardnotificationlist",dashboardnotificationlist.__docgenInfo={description:"",displayName:"dashboardnotificationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},columns:{defaultValue:null,description:"",name:"columns",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"]={docgenInfo:dashboardnotificationlist.__docgenInfo,name:"dashboardnotificationlist",path:"src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/dashboard/dashboard.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DashboardEntry:()=>dashboard_dev_DashboardEntry,default:()=>dashboard_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx");const dashboard_fees=()=>{const t=(0,utils_text.F)(),feesPageUrl=(0,url.Ik)()("feesPageUrl"),{data:fbsFees=[],isLoading}=(0,fbs.J2)({includepaid:!1,includenonpayable:!0}),[totalFeeAmount,setTotalFeeAmount]=(0,react.useState)("0");return(0,react.useEffect)((()=>{fbsFees&&Array.isArray(fbsFees)&&setTotalFeeAmount((0,general.ZG)(fbsFees))}),[fbsFees,totalFeeAmount]),isLoading||!isLoading&&0===fbsFees.length?null:react.createElement("div",{className:"fee-container"},react.createElement("div",null,react.createElement("div",{className:"status-userprofile__column"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("h2",{className:"text-header-h3 mb-16","data-cy":"dashboard-fees-header"},t("feesText")))),react.createElement(warning_bar.A,{overdueText:`${t("totalOwedText")} ${t("totalAmountFeeText",{placeholders:{"@total":totalFeeAmount}})}`,rightButtonText:t("dashboardSeeMoreFeesText"),rightButtonAriaLabelText:t("dashboardSeeMoreFeesAriaLabelText"),rightLink:feesPageUrl}))))};try{dashboardfees.displayName="dashboardfees",dashboardfees.__docgenInfo={description:"",displayName:"dashboardfees",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"]={docgenInfo:dashboardfees.__docgenInfo,name:"dashboardfees",path:"src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"})}catch(__react_docgen_typescript_loader_error){}var dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx");const dashboard_dashboard=({pageSize})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"dashboard-page"},react.createElement("h1",{className:"text-header-h1 mt-32 mb-64","data-cy":"dashboard-header"},t("yourProfileText")),react.createElement(dashboard_fees,null),react.createElement(dashboard_notification_list.A,{columns:!0,pageSize}))};try{dashboard.displayName="dashboard",dashboard.__docgenInfo={description:"",displayName:"dashboard",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.tsx#dashboard"]={docgenInfo:dashboard.__docgenInfo,name:"dashboard",path:"src/apps/dashboard/dashboard.tsx#dashboard"})}catch(__react_docgen_typescript_loader_error){}const dashboard_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(dashboard_dashboard,{pageSize})})))));try{dashboardentry.displayName="dashboardentry",dashboardentry.__docgenInfo={description:"",displayName:"dashboardentry",props:{loansOverdueUrl:{defaultValue:null,description:"",name:"loansOverdueUrl",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},dashboardNumberInLineText:{defaultValue:null,description:"",name:"dashboardNumberInLineText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalDeleteProcessingText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteProcessingText",required:!0,type:{name:"string"}},deleteReservationModalErrorsStatusText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsStatusText",required:!0,type:{name:"string"}},deleteReservationModalErrorsTitleText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsTitleText",required:!0,type:{name:"string"}},deleteReservationModalSuccessStatusText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessStatusText",required:!0,type:{name:"string"}},deleteReservationModalSuccessTitleText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessTitleText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},feesText:{defaultValue:null,description:"",name:"feesText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},noPhysicalLoansText:{defaultValue:null,description:"",name:"noPhysicalLoansText",required:!0,type:{name:"string"}},noReservationsText:{defaultValue:null,description:"",name:"noReservationsText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesAriaLabelText",required:!0,type:{name:"string"}},physicalLoansText:{defaultValue:null,description:"",name:"physicalLoansText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},queuedReservationsText:{defaultValue:null,description:"",name:"queuedReservationsText",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},reservationsText:{defaultValue:null,description:"",name:"reservationsText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},statusBadgeWarningText:{defaultValue:null,description:"",name:"statusBadgeWarningText",required:!0,type:{name:"string"}},totalAmountFeeText:{defaultValue:null,description:"",name:"totalAmountFeeText",required:!0,type:{name:"string"}},totalOwedText:{defaultValue:null,description:"",name:"totalOwedText",required:!0,type:{name:"string"}},yourProfileText:{defaultValue:null,description:"",name:"yourProfileText",required:!0,type:{name:"string"}},dashboardLoansLinkText:{defaultValue:null,description:"",name:"dashboardLoansLinkText",required:!0,type:{name:"string"}},dashboardReservationsLinkText:{defaultValue:null,description:"",name:"dashboardReservationsLinkText",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.entry.tsx#dashboardentry"]={docgenInfo:dashboardentry.__docgenInfo,name:"dashboardentry",path:"src/apps/dashboard/dashboard.entry.tsx#dashboardentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const dashboard_dev={title:"Apps / Dashboard",argTypes:{...serviceUrlArgs.A,...groupModalArgs.A,...loanGroupModalArgs.A,...renewalArgs.A,...reservationGroupModalArgs.A,...reservationMaterialDetailsArgs.A,...materialDetailsModalArgs.A,...deleteReservationModalArgs.A,...reservationListArgs.A,...globalTextArgs.A,...globalConfigArgs.A,physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},yourProfileText:{defaultValue:"Your profile",control:{type:"text"}},feesText:{defaultValue:"Fees",control:{type:"text"}},totalOwedText:{defaultValue:"You owe in total",control:{type:"text"}},dashboardSeeMoreFeesText:{defaultValue:"See more",control:{type:"text"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:"See your fees and how to pay",control:{type:"text"}},totalAmountFeeText:{defaultValue:"@total",control:{type:"text"}},physicalLoansText:{defaultValue:"Loans",control:{type:"text"}},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},reservationsText:{defaultValue:"Reservations",control:{type:"text"}},queuedReservationsText:{defaultValue:"Queued reservations",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},noPhysicalLoansText:{defaultValue:"At the moment, you have 0 physical loans",control:{type:"text"}},noReservationsText:{defaultValue:"At the moment, you have 0 reservations",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},dashboardNumberInLineText:{control:{type:"text"},defaultValue:"Number @count in line"},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},dashboardLoansLinkText:{defaultValue:"All loans",control:{type:"text"}},dashboardReservationsLinkText:{defaultValue:"All reservations",control:{type:"text"}}},component:dashboard_entry},dashboard_dev_DashboardEntry=(props=>react.createElement(dashboard_entry,props)).bind({});dashboard_dev_DashboardEntry.args={}},"./src/apps/demo-modal/demo-modal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>demo_modal_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const demo_modal=(0,utils_text.i)((()=>{const{open}=(0,modal.X)(),t=(0,utils_text.F)(),modalIdOne="demo-modal-one",modalIdTwo="demo-modal-two",onClick=modalId=>()=>{open(modalId)};return react.createElement(react.Fragment,null,react.createElement(modal.A,{modalId:modalIdTwo,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalTwoText")},react.createElement("h1",{id:`${modalIdTwo}-header`},modalIdTwo)),react.createElement(modal.A,{modalId:modalIdOne,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalOneText")},react.createElement("h1",{id:`${modalIdOne}-header`},modalIdOne),react.createElement("button",{type:"button",id:`${modalIdTwo}-button`,onClick:onClick(modalIdTwo)},"Show Modal 2")),react.createElement("button",{type:"button",id:`${modalIdOne}-button`,onClick:onClick(modalIdOne)},"Show Modal 1"))}));try{demomodal.displayName="demomodal",demomodal.__docgenInfo={description:"",displayName:"demomodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.tsx#demomodal"]={docgenInfo:demomodal.__docgenInfo,name:"demomodal",path:"src/apps/demo-modal/demo-modal.tsx#demomodal"})}catch(__react_docgen_typescript_loader_error){}const demo_modal_entry=(0,utils_text.i)((props=>react.createElement(demo_modal,null)));try{demomodalentry.displayName="demomodalentry",demomodalentry.__docgenInfo={description:"",displayName:"demomodalentry",props:{ariaLabelModalOneText:{defaultValue:null,description:"",name:"ariaLabelModalOneText",required:!0,type:{name:"string"}},ariaLabelModalTwoText:{defaultValue:null,description:"",name:"ariaLabelModalTwoText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"]={docgenInfo:demomodalentry.__docgenInfo,name:"demomodalentry",path:"src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts");const demo_modal_dev={title:"Apps / Demo modal",component:demo_modal_entry,decorators:[esm.V],parameters:{query:{modal:"demo-modal-one"}},argTypes:{...globalTextArgs.A,ariaLabelModalOneText:{defaultValue:"Luk dialog et"},ariaLabelModalTwoText:{defaultValue:"Luk dialog to"},screenReaderModalDescriptionText:{defaultValue:"Denne modal dækker sidens indhold, og er en demo"}}},App=props=>react.createElement(demo_modal_entry,props)},"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesListMaterialComponentEntry:()=>FavoritesListMaterialComponentEntry,default:()=>FavoritesListMaterialComponent_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const SimpleMaterialAdapter=({pid,app,bright})=>{var _data$work;const{data}=(0,graphql.OZ)({id:pid});return react.createElement("div",null,data&&data.work&&react.createElement(SimpleMaterial.A,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,work:data.work,app,bright}))},simple_material_SimpleMaterialAdapter=SimpleMaterialAdapter;try{SimpleMaterialAdapter.displayName="SimpleMaterialAdapter",SimpleMaterialAdapter.__docgenInfo={description:"",displayName:"SimpleMaterialAdapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'},{value:'"recommended-material"'},{value:'"recommendation"'},{value:'"material-grid-automatic"'},{value:'"material-grid-manual"'}]}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"]={docgenInfo:SimpleMaterialAdapter.__docgenInfo,name:"SimpleMaterialAdapter",path:"src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const FavoritesListMaterialComponent=()=>{const t=(0,utils_text.F)(),[materials,setMaterials]=(0,react.useState)([]),favoritesListMaterialComponentGoToListUrl=(0,url.Ik)()("favoritesListMaterialComponentGoToListUrl"),{data}=(0,material_list.M7)("default"),{collections}=data||[];return(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections.slice(0,4))}),[collections,data]),0===materials.length?null:react.createElement("div",{className:"recommender recommender--bright"},react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("favoritesListMaterialComponentTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement(Link.A,{href:favoritesListMaterialComponentGoToListUrl,className:"button-link button-link--bright button-link--selected"},t("favoritesListMaterialComponentGoToListText"))),react.createElement("ul",{className:"recommender__grid"},materials.map((pid=>react.createElement(simple_material_SimpleMaterialAdapter,{app:"favorites-list-mc",bright:!0,pid})))))},favorites_list_material_component_FavoritesListMaterialComponent=FavoritesListMaterialComponent;try{FavoritesListMaterialComponent.displayName="FavoritesListMaterialComponent",FavoritesListMaterialComponent.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponent",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"]={docgenInfo:FavoritesListMaterialComponent.__docgenInfo,name:"FavoritesListMaterialComponent",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const FavoritesListMaterialComponent_entry=(0,url.nU)((0,config.NV)((0,utils_text.i)((()=>react.createElement(favorites_list_material_component_FavoritesListMaterialComponent,null)))));try{FavoritesListMaterialComponententry.displayName="FavoritesListMaterialComponententry",FavoritesListMaterialComponententry.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponententry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},favoritesListMaterialComponentTitleText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListUrl:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"]={docgenInfo:FavoritesListMaterialComponententry.__docgenInfo,name:"FavoritesListMaterialComponententry",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const FavoritesListMaterialComponent_dev={title:"Apps / Favorites list material component",component:FavoritesListMaterialComponent_entry,decorators:[esm.V],argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,favoritesListMaterialComponentTitleText:{control:{type:"text"},defaultValue:"Your list"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},favoritesListMaterialComponentGoToListText:{control:{type:"text"},defaultValue:"Go to My list"},favoritesListMaterialComponentGoToListUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8"}}},FavoritesListMaterialComponentEntry=(props=>react.createElement(FavoritesListMaterialComponent_entry,props)).bind({})},"./src/apps/favorites-list/FavoritesList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesList:()=>FavoritesList_dev_FavoritesList,default:()=>FavoritesList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),card_list_item=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const card_list_item_adapter=({pid})=>{var _data$work;const{data,isLoading}=(0,graphql.OZ)({id:pid});return isLoading?react.createElement(card_list_item_skeleton.A,null):react.createElement("div",null,data&&data.work&&react.createElement(card_list_item.A,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,item:data.work,coverTint:"100",resultNumber:0}))};try{cardlistitemadapter.displayName="cardlistitemadapter",cardlistitemadapter.__docgenInfo={description:"",displayName:"cardlistitemadapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"]={docgenInfo:cardlistitemadapter.__docgenInfo,name:"cardlistitemadapter",path:"src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"})}catch(__react_docgen_typescript_loader_error){}var MaterialListItem=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const FavoritesList=({pageSize})=>{const t=(0,utils_text.F)(),{data,isLoading}=(0,material_list.M7)("default"),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),[materials,setMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,page}=(0,use_pager.A)({hitcount:materials.length,pageSize}),{collections}=data||[],lastItemRef=(0,react.useRef)(null);(0,react.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,displayedMaterials]),(0,react.useEffect)((()=>setDisplayedMaterials([...materials].splice(0,itemsShown))),[itemsShown,materials]),(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections)}),[collections,data]);const skeletonList=react.createElement(react.Fragment,null,react.createElement("div",{className:"ssc"},react.createElement("div",{className:"ssc-line w-10 my-32"}," ")),react.createElement("ul",{className:"card-list-page__list my-32"},[...Array(5)].map((()=>react.createElement("li",null,react.createElement(card_list_item_skeleton.A,null)))))),materialsCount=materials.length>0&&react.createElement("p",{className:"text-small-caption my-32"},t("favoritesListMaterialsText",{placeholders:{"@count":materials.length}}));return react.createElement("div",{className:"card-list-page"},react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title"},t("favoritesListHeaderText")),isLoading?skeletonList:react.createElement(react.Fragment,null,materialsCount,displayedMaterials.length>0?react.createElement("ul",{className:"card-list-page__list my-32"},displayedMaterials.map(((pid,i)=>{const isFirstNewItem=i===page*pageSize;return react.createElement(MaterialListItem.A,{key:pid,ref:isFirstNewItem?lastItemRef:null},react.createElement(card_list_item_adapter,{pid}))}))):react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("favoritesListEmptyText")}),react.createElement(PagerComponent,null)))},favorites_list_FavoritesList=FavoritesList;try{FavoritesList.displayName="FavoritesList",FavoritesList.__docgenInfo={description:"",displayName:"FavoritesList",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.tsx#FavoritesList"]={docgenInfo:FavoritesList.__docgenInfo,name:"FavoritesList",path:"src/apps/favorites-list/FavoritesList.tsx#FavoritesList"})}catch(__react_docgen_typescript_loader_error){}const FavoritesList_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement(favorites_list_FavoritesList,{pageSize})}))));try{FavoritesListentry.displayName="FavoritesListentry",FavoritesListentry.__docgenInfo={description:"",displayName:"FavoritesListentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},fbsBaseUrlConfig:{defaultValue:null,description:"",name:"fbsBaseUrlConfig",required:!0,type:{name:"string"}},favoritesListMaterialsText:{defaultValue:null,description:"",name:"favoritesListMaterialsText",required:!0,type:{name:"string"}},favoritesListHeaderText:{defaultValue:null,description:"",name:"favoritesListHeaderText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},favoritesListEmptyText:{defaultValue:null,description:"",name:"favoritesListEmptyText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"]={docgenInfo:FavoritesListentry.__docgenInfo,name:"FavoritesListentry",path:"src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const FavoritesList_dev={title:"Apps / Favorite list",component:FavoritesList_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,pageSizeDesktop:{name:"Number of favorite items on desktop",defaultValue:50,control:{type:"number"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},pageSizeMobile:{name:"Number of favorite items on mobile",defaultValue:20,control:{type:"number"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},favoritesListMaterialsText:{defaultValue:"@count materials",control:{type:"text"}},favoritesListHeaderText:{defaultValue:"Favorites",control:{type:"text"}},byAuthorText:{defaultValue:"By",control:{type:"text"}},etAlText:{defaultValue:"...",control:{type:"text"}},favoritesListEmptyText:{defaultValue:"Your favorites list is empty",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}}},decorators:[esm.V]},FavoritesList_dev_FavoritesList=args=>react.createElement(FavoritesList_entry,args)},"./src/apps/fee-list/FeeList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FeeListEntry:()=>FeeList_dev_FeeListEntry,FeeListFeeDetailsModal:()=>FeeListFeeDetailsModal,default:()=>FeeList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx");const list_header=({header,amount,buttons,dataCy="list-header"})=>react.createElement("div",{className:"dpl-list-buttons"},react.createElement("h2",{"data-cy":dataCy,className:"dpl-list-buttons__header"},header,null!==amount&&react.createElement("span",{className:"dpl-list-buttons__power"},amount)),buttons&&react.createElement("div",{className:"dpl-list-buttons__buttons"},buttons));try{listheader.displayName="listheader",listheader.__docgenInfo={description:"",displayName:"listheader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"ReactNode"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number | null"}},buttons:{defaultValue:null,description:"",name:"buttons",required:!1,type:{name:"ReactNode"}},dataCy:{defaultValue:{value:"list-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-header/list-header.tsx#listheader"]={docgenInfo:listheader.__docgenInfo,name:"listheader",path:"src/components/list-header/list-header.tsx#listheader"})}catch(__react_docgen_typescript_loader_error){}var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx");const fee_info=({material,materialItemNumber,children})=>{const{authorsShort="",materialType="",year="",title="",description="",pid,series=""}=material,t=(0,utils_text.F)();return react.createElement("div",{className:"list-reservation__material"},react.createElement("div",null,react.createElement(cover.Y,{ids:[pid],idType:"pid",size:"small",animate:!1,alt:description||""})),react.createElement("div",{className:"list-reservation__information"},react.createElement("div",null,react.createElement("div",{className:"status-label status-label--outline"},materialType)),react.createElement("div",{className:"list-reservation__about"},react.createElement("h3",{className:"text-header-h4"},title),react.createElement("p",{className:"text-small-caption color-secondary-gray"},react.createElement(authorYear.A,{author:authorsShort,year:year||""})),react.createElement("p",{className:"text-small-caption color-secondary-gray"},series)),react.createElement("div",null),react.createElement("p",{className:"text-small-caption color-secondary-gray"},t("feeListMaterialNumberText",{placeholders:{"@materialNumber":materialItemNumber}})),children))};try{feeinfo.displayName="feeinfo",feeinfo.__docgenInfo={description:"",displayName:"feeinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"]={docgenInfo:feeinfo.__docgenInfo,name:"feeinfo",path:"src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const fee_status=({dueDate,reasonMessage})=>{const t=(0,utils_text.F)(),dueDateFormatted=dayjs_min_default()(dueDate).format(date_format.$k);return react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},react.createElement("div",{className:"status-label status-label--danger"},reasonMessage),react.createElement("p",{className:"text-small-caption"},t("feeCreatedText",{placeholders:{"@date":dueDateFormatted}}))))};try{feestatus.displayName="feestatus",feestatus.__docgenInfo={description:"",displayName:"feestatus",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string"}},reasonMessage:{defaultValue:null,description:"",name:"reasonMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"]={docgenInfo:feestatus.__docgenInfo,name:"feestatus",path:"src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"})}catch(__react_docgen_typescript_loader_error){}var currency=__webpack_require__("./src/core/utils/helpers/currency.ts");const FeeListItemSkeleton=()=>react.createElement("button",{type:"button",className:"ssc list-reservation my-32","aria-label":"Fee card"},react.createElement("div",{className:"list-reservation__material"},react.createElement("div",null,react.createElement("div",{className:"ssc-square cover--size-small"})),react.createElement("div",{className:"list-reservation__information"},react.createElement("div",{className:"ssc-head-line w-30 mb-24"}),react.createElement("div",{className:"ssc-head-line w-100 mb-4"}),react.createElement("div",{className:"ssc-line w-70 mb-4"}),react.createElement("div",{className:"ssc-line w-60 mb-4"}))),react.createElement("div",{className:"list-reservation__status"},react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},react.createElement("div",{className:"ssc-head-line w-30"}),react.createElement("div",{className:"ssc-line w-80 mb-4"}))),react.createElement("div",{className:"list-reservation__fee flex justify-end"},react.createElement("div",{className:"ssc-head-line w-30"})))),fee_list_FeeListItemSkeleton=FeeListItemSkeleton;try{FeeListItemSkeleton.displayName="FeeListItemSkeleton",FeeListItemSkeleton.__docgenInfo={description:"",displayName:"FeeListItemSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeListItemSkeleton.tsx#FeeListItemSkeleton"]={docgenInfo:FeeListItemSkeleton.__docgenInfo,name:"FeeListItemSkeleton",path:"src/apps/fee-list/FeeListItemSkeleton.tsx#FeeListItemSkeleton"})}catch(__react_docgen_typescript_loader_error){}const stackable_fees=(0,material_fetch_hoc.A)((({amountOfMaterialsWithDueDate,material={},feeData,materialItemNumber,openDetailsModalClickEvent})=>{const t=(0,utils_text.F)(),{amount=0,creationDate="",reasonMessage=""}=feeData,stackSize=amountOfMaterialsWithDueDate-1,listReservationClass=(0,clsx.A)(["list-reservation","my-32"],{"list-reservation--stacked":stackSize>0});return feeData?react.createElement("button",{type:"button",onClick:()=>openDetailsModalClickEvent(feeData.feeId),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDetailsModalClickEvent(feeData.feeId)},className:listReservationClass},react.createElement(fee_info,{materialItemNumber,material},stackSize>0&&react.createElement("p",{className:"text-small-caption color-secondary-gray mt-8","data-cy":"stack-size"},t("plusXOtherMaterialsText",{placeholders:{"@amount":stackSize}}))),react.createElement("div",{className:"list-reservation__status"},react.createElement(fee_status,{dueDate:creationDate,reasonMessage}),react.createElement("div",{className:"list-reservation__fee"},react.createElement("p",{className:"text-body-medium-regular"},t("itemFeeAmountText",{placeholders:{"@fee":(0,currency.v)(amount)}}))))):null}),fee_list_FeeListItemSkeleton);try{stackablefees.displayName="stackablefees",stackablefees.__docgenInfo={description:"",displayName:"stackablefees",props:{amountOfMaterialsWithDueDate:{defaultValue:null,description:"",name:"amountOfMaterialsWithDueDate",required:!0,type:{name:"number"}},material:{defaultValue:{value:"{}"},description:"",name:"material",required:!1,type:{name:"Nullable> | undefined"}},feeData:{defaultValue:null,description:"",name:"feeData",required:!0,type:{name:"FeeV2"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}},openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(feeId: number) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"]={docgenInfo:stackablefees.__docgenInfo,name:"stackablefees",path:"src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"})}catch(__react_docgen_typescript_loader_error){}const fee_list_list=({openDetailsModalClickEvent,fees,listHeader,dataCy,totalText,className,alreadyPaidText})=>react.createElement("div",null,fees&&react.createElement("div",{className,"data-cy":dataCy},react.createElement(list_header,{header:listHeader,amount:fees.length}),fees.map((itemData=>react.createElement(stackable_fees,{amountOfMaterialsWithDueDate:itemData.materials.length,item:{faust:itemData.materials[0].recordId},materialItemNumber:itemData.materials[0].materialItemNumber,feeData:itemData,openDetailsModalClickEvent,key:itemData.feeId}))),react.createElement("div",{className:"fee-list-bottom"},react.createElement("div",{className:"fee-list-bottom__paymenttypes"}),react.createElement("div",{className:"fee-list-bottom__actions"},react.createElement("p",{className:"text-small-caption color-secondary-gray"},alreadyPaidText),react.createElement("p",{className:"text-body-small-medium mt-16"},totalText)))));try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(feeId: number) => void"}},fees:{defaultValue:null,description:"",name:"fees",required:!0,type:{name:"FeeV2[] | null"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},listHeader:{defaultValue:null,description:"",name:"listHeader",required:!0,type:{name:"ReactNode"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},alreadyPaidText:{defaultValue:null,description:"",name:"alreadyPaidText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/fee-list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const fee_details_modal=({modalId,children})=>{const t=(0,utils_text.F)();return react.createElement(modal.A,{modalId:modalId||"",classNames:"modal-details",closeModalAriaLabelText:t("feeDetailsModalCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("feeDetailsModalDescriptionText")},children)};try{feedetailsmodal.displayName="feedetailsmodal",feedetailsmodal.__docgenInfo={description:"",displayName:"feedetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"]={docgenInfo:feedetailsmodal.__docgenInfo,name:"feedetailsmodal",path:"src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link);const my_payment_overview_modal=()=>{const t=(0,utils_text.F)(),feeListPaymentSiteUrl=(0,utils_url.Ik)()("feeListPaymentSiteUrl",!0),{close}=(0,modal.X)();return react.createElement(modal.A,{modalId:"intermediate-payment-modal",closeModalAriaLabelText:"test",screenReaderModalDescriptionText:"test",classNames:"modal-cta"},react.createElement("div",{className:"modal-cta__container"},react.createElement("h2",{className:"text-header-h2"},t("feePaymentModalHeaderText")),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("feePaymentModalBodyText")),react.createElement("p",{className:"text-body-medium-regular mt-24"},t("feePaymentModalNoticeText"))),react.createElement("div",{className:"modal-cta__buttons mt-48"},feeListPaymentSiteUrl&&react.createElement(Link.A,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:feeListPaymentSiteUrl,isNewTab:!0},t("feePaymentModalGotoText")," ",react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})),react.createElement("div",{className:"modal-cta__link"},react.createElement("button",{className:"link-tag color-secondary-gray ml-8",type:"button",onClick:()=>{close("intermediate-payment-modal")}},t("feePaymentModalCancelText"))))))};try{mypaymentoverviewmodal.displayName="mypaymentoverviewmodal",mypaymentoverviewmodal.__docgenInfo={description:"",displayName:"mypaymentoverviewmodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"]={docgenInfo:mypaymentoverviewmodal.__docgenInfo,name:"mypaymentoverviewmodal",path:"src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"})}catch(__react_docgen_typescript_loader_error){}var selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const stackable_fees_list=({materials,reasonForFee})=>{const t=(0,utils_text.F)();return react.createElement("ul",{className:"modal-loan__list-materials"},materials.map((({recordId,materialItemNumber})=>react.createElement(selectable_material.A,{focused:!1,disabled:!0,statusBadgeComponent:react.createElement(status_badge.A,{dangerText:reasonForFee}),item:{faust:recordId},key:recordId,statusMessageComponentMobile:react.createElement("div",{className:"list-materials__status__note-mobile"},t("feeListMaterialNumberText",{placeholders:{"@materialNumber":materialItemNumber}})),statusMessageComponentDesktop:react.createElement("div",{className:"list-materials__status__note-desktop"},t("feeListMaterialNumberText",{placeholders:{"@materialNumber":materialItemNumber}})),noHoverEffect:!0}))))};try{stackablefeeslist.displayName="stackablefeeslist",stackablefeeslist.__docgenInfo={description:"",displayName:"stackablefeeslist",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"FeeMaterialV2[]"}},reasonForFee:{defaultValue:null,description:"",name:"reasonForFee",required:!0,type:{name:"string"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"]={docgenInfo:stackablefeeslist.__docgenInfo,name:"stackablefeeslist",path:"src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"})}catch(__react_docgen_typescript_loader_error){}var GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx");const fee_details_content=({feeDetailsData})=>{const t=(0,utils_text.F)(),{amount=0,creationDate="",materials=[],reasonMessage}=feeDetailsData,creationDateFormatted=dayjs_min_default()(creationDate).format(date_format.rX);return react.createElement("div",{className:"modal-loan__container"},react.createElement("div",{className:"modal-loan__header"},react.createElement("div",null,react.createElement("h2",{className:"modal-loan__title text-header-h2"},t("turnedInText",{placeholders:{"@date":creationDateFormatted}})))),react.createElement(GroupModalContent.A,{amountOfSelectableMaterials:0,buttonComponent:react.createElement("div",null,react.createElement("p",{className:"text-body-small-medium"},t("totalText",{placeholders:{"@total":(0,currency.v)(amount)}})))},react.createElement("div",null)),react.createElement(stackable_fees_list,{reasonForFee:reasonMessage,materials}))};try{feedetailscontent.displayName="feedetailscontent",feedetailscontent.__docgenInfo={description:"",displayName:"feedetailscontent",props:{feeDetailsData:{defaultValue:null,description:"",name:"feeDetailsData",required:!0,type:{name:"FeeV2"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"]={docgenInfo:feedetailscontent.__docgenInfo,name:"feedetailscontent",path:"src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"})}catch(__react_docgen_typescript_loader_error){}var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json");const getFeesBasedOnPayableByClient=(fees,payableByClient)=>fees.filter((fee=>fee.payableByClient===payableByClient)),calculateFeeAmount=(fees,payableByClient)=>()=>getFeesBasedOnPayableByClient(fees,payableByClient).reduce(((accumulator,{amount})=>accumulator+amount),0);var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const FeePaymentButton=({dataCy="fee-payment-button"})=>{const config=(0,utils_config.UK)(),u=(0,utils_url.Ik)(),{paymentSiteButtonLabel}=config("feeListConfig",{transformer:"jsonParse"}),url=u("feeListPaymentSiteUrl",!0);return url?react.createElement(LinkButton.A,{dataCy,url,buttonType:"external-link",size:"small",variant:"outline"},paymentSiteButtonLabel):null},fee_list_FeePaymentButton=FeePaymentButton;try{FeePaymentButton.displayName="FeePaymentButton",FeePaymentButton.__docgenInfo={description:"",displayName:"FeePaymentButton",props:{dataCy:{defaultValue:{value:"fee-payment-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeePaymentButton.tsx#FeePaymentButton"]={docgenInfo:FeePaymentButton.__docgenInfo,name:"FeePaymentButton",path:"src/apps/fee-list/FeePaymentButton.tsx#FeePaymentButton"})}catch(__react_docgen_typescript_loader_error){}const FeeListSkeleton=()=>react.createElement("section",{className:"ssc fee-list"},react.createElement("h2",{className:"dpl-list-buttons__header","aria-label":"Fee payment info"},react.createElement("div",{className:"ssc-head-line w-20 mt-10"})),react.createElement(fee_list_FeeListItemSkeleton,null),react.createElement(fee_list_FeeListItemSkeleton,null),react.createElement("div",{className:"ssc-head-line w-20 mt-48"}),react.createElement(fee_list_FeeListItemSkeleton,null),react.createElement(fee_list_FeeListItemSkeleton,null)),fee_list_FeeListSkeleton=FeeListSkeleton;try{FeeListSkeleton.displayName="FeeListSkeleton",FeeListSkeleton.__docgenInfo={description:"",displayName:"FeeListSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeListSkeleton.tsx#FeeListSkeleton"]={docgenInfo:FeeListSkeleton.__docgenInfo,name:"FeeListSkeleton",path:"src/apps/fee-list/FeeListSkeleton.tsx#FeeListSkeleton"})}catch(__react_docgen_typescript_loader_error){}var warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx");const FeeList=({pageSize})=>{const t=(0,utils_text.F)(),viewFeesAndCompensationRatesUrl=(0,utils_url.Ik)()("viewFeesAndCompensationRatesUrl"),[feeDetailsModalId,setFeeDetailsModalId]=(0,react.useState)(""),{open}=(0,modal.X)(),{data:fbsFees=[],isLoading}=(0,fbs.J2)({includepaid:!1,includenonpayable:!0}),{fbs:{overdue:loansOverduePhysical,isLoading:isLoadingFbs},publizon:{overdue:loansOverdueDigital,isLoading:isLoadingPublizon}}=(0,useLoans.A)(),[overdueLoans,setOverdueLoans]=(0,react.useState)([]),[feeDetailsData,setFeeDetailsData]=(0,react.useState)(),{dueDateModal,allLoansId}=(0,modal_helpers.c6)(),[modalLoan,setModalLoan]=(0,react.useState)(null),openDetailsModalClickEvent=(0,react.useCallback)((feeId=>{feeId&&(fbsFees.length>0&&setFeeDetailsData(((feeObj,feeId)=>feeObj.filter((item=>item.feeId===feeId)))(fbsFees,feeId)),setFeeDetailsModalId(modal_ids.feeDetails+feeId),open(modal_ids.feeDetails+feeId||""))}),[fbsFees,open]),totalFeeAmountPayableByClient=(0,react.useMemo)((()=>calculateFeeAmount(fbsFees,!0)),[fbsFees]),totalFeeAmountNotPayableByClient=(0,react.useMemo)((()=>calculateFeeAmount(fbsFees,!1)),[fbsFees]),shouldShowWarningBar=overdueLoans.length>0&&!isLoadingFbs&&!isLoadingPublizon,openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.B0)(loan))}),[open]);(0,react.useEffect)((()=>{isLoadingFbs||isLoadingPublizon||setOverdueLoans([...loansOverduePhysical,...loansOverdueDigital])}),[isLoadingFbs,isLoadingPublizon]);const openLoanModal=(0,react.useCallback)((loans=>{1===loans.length?openLoanDetailsModal(loans[0]):open((0,LoansGroupModal.D)("yesterday",dueDateModal,allLoansId))}),[openLoanDetailsModal,open,allLoansId,dueDateModal]);return react.createElement(react.Fragment,null,react.createElement("div",{className:"fee-list-page","data-cy":"fee-list-page"},react.createElement("h1",{"data-cy":"fee-list-headline",className:"text-header-h1 my-32"},t("feeListHeadlineText")),react.createElement("div",{"data-cy":"fee-list-body"},react.createElement("div",{className:"fee-list-body__text"},t("feeListBodyText")),react.createElement("div",{className:"fee-list-body__payment-info-link"},react.createElement(Link.A,{className:"link-tag",href:viewFeesAndCompensationRatesUrl},t("viewFeesAndCompensationRatesText")))),shouldShowWarningBar&&react.createElement(warning_bar.A,{overdueText:t("feeListYouHaveOverdueLoansText",{count:overdueLoans.length}),rightButtonText:t("feeListSeeYourOverdueLoansText"),rightButtonAriaLabelText:t("feeListSeeYourOverdueLoansAriaText"),classNames:"my-64",rightAction:()=>openLoanModal(overdueLoans)}),react.createElement("div",{className:"fee-list-body__payment-button"},react.createElement(fee_list_FeePaymentButton,null)),isLoading&&react.createElement(fee_list_FeeListSkeleton,null),!isLoading&&!fbsFees.length&&react.createElement(react.Fragment,null,react.createElement(list_header,{header:react.createElement(react.Fragment,null,t("unpaidFeesPayableByClientHeadlineText")),amount:0}),react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("emptyFeeListText")})),getFeesBasedOnPayableByClient(fbsFees,!0).length>0&&react.createElement(fee_list_list,{dataCy:"fee-list",className:"fee-list",listHeader:t("unpaidFeesPayableByClientHeadlineText"),openDetailsModalClickEvent,fees:getFeesBasedOnPayableByClient(fbsFees,!0),totalText:t("totalText",{placeholders:{"@total":(0,currency.v)(totalFeeAmountPayableByClient())}}),alreadyPaidText:t("feeListAlreadyPaidInfoText")}),getFeesBasedOnPayableByClient(fbsFees,!1).length>0&&react.createElement(fee_list_list,{dataCy:"fee-list",className:"fee-list",listHeader:t("unpaidFeesNotPayableByClientHeadlineText"),openDetailsModalClickEvent,fees:getFeesBasedOnPayableByClient(fbsFees,!1),totalText:t("totalText",{placeholders:{"@total":(0,currency.v)(totalFeeAmountNotPayableByClient())}}),alreadyPaidText:t("feeListAlreadyPaidSecondInfoText")})),react.createElement(fee_details_modal,{modalId:feeDetailsModalId,material:{}},feeDetailsData&&react.createElement(fee_details_content,{feeDetailsData:feeDetailsData[0]})),react.createElement(my_payment_overview_modal,null),!isLoadingFbs&&react.createElement(LoansGroupModal.A,{pageSize,openDetailsModal:openLoanDetailsModal,dueDate:"yesterday",loansModal:loansOverduePhysical},react.createElement(SimpleModalHeader.A,{header:t("loansOverdueText")})),modalLoan&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.B0)(modalLoan)},react.createElement(material_details.A,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.B0)(modalLoan)})))},fee_list_FeeList=FeeList;try{FeeList.displayName="FeeList",FeeList.__docgenInfo={description:"",displayName:"FeeList",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.tsx#FeeList"]={docgenInfo:FeeList.__docgenInfo,name:"FeeList",path:"src/apps/fee-list/FeeList.tsx#FeeList"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts");const FeeList_entry=(0,utils_url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((0,utils_config.NV)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(fee_list_FeeList,{pageSize})})))));try{FeeListentry.displayName="FeeListentry",FeeListentry.__docgenInfo={description:"",displayName:"FeeListentry",props:{alreadyPaidText:{defaultValue:null,description:"",name:"alreadyPaidText",required:!0,type:{name:"string"}},availablePaymentTypesUrl:{defaultValue:null,description:"",name:"availablePaymentTypesUrl",required:!0,type:{name:"string"}},emptyFeeListText:{defaultValue:null,description:"",name:"emptyFeeListText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},feeCreatedText:{defaultValue:null,description:"",name:"feeCreatedText",required:!0,type:{name:"string"}},feeDetailsModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"feeDetailsModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},feeDetailsModalDescriptionText:{defaultValue:null,description:"",name:"feeDetailsModalDescriptionText",required:!0,type:{name:"string"}},feeDetailsModalScreenReaderText:{defaultValue:null,description:"",name:"feeDetailsModalScreenReaderText",required:!0,type:{name:"string"}},feeListBodyText:{defaultValue:null,description:"",name:"feeListBodyText",required:!0,type:{name:"string"}},feeListConfig:{defaultValue:null,description:"",name:"feeListConfig",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},feeListHeadlineText:{defaultValue:null,description:"",name:"feeListHeadlineText",required:!0,type:{name:"string"}},feeListPaymentSiteUrl:{defaultValue:null,description:"",name:"feeListPaymentSiteUrl",required:!0,type:{name:"string"}},feePaymentModalBodyText:{defaultValue:null,description:"",name:"feePaymentModalBodyText",required:!0,type:{name:"string"}},feePaymentModalCancelText:{defaultValue:null,description:"",name:"feePaymentModalCancelText",required:!0,type:{name:"string"}},feePaymentModalGotoText:{defaultValue:null,description:"",name:"feePaymentModalGotoText",required:!0,type:{name:"string"}},feePaymentModalHeaderText:{defaultValue:null,description:"",name:"feePaymentModalHeaderText",required:!0,type:{name:"string"}},feePaymentModalNoticeText:{defaultValue:null,description:"",name:"feePaymentModalNoticeText",required:!0,type:{name:"string"}},iAcceptText:{defaultValue:null,description:"",name:"iAcceptText",required:!0,type:{name:"string"}},itemFeeAmountText:{defaultValue:null,description:"",name:"itemFeeAmountText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialNumberText:{defaultValue:null,description:"",name:"materialNumberText",required:!0,type:{name:"string"}},otherMaterialsText:{defaultValue:null,description:"",name:"otherMaterialsText",required:!0,type:{name:"string"}},paymentOverviewUrl:{defaultValue:null,description:"",name:"paymentOverviewUrl",required:!0,type:{name:"string"}},payText:{defaultValue:null,description:"",name:"payText",required:!0,type:{name:"string"}},plusXOtherMaterialsText:{defaultValue:null,description:"",name:"plusXOtherMaterialsText",required:!0,type:{name:"string"}},termsOfTradeText:{defaultValue:null,description:"",name:"termsOfTradeText",required:!0,type:{name:"string"}},termsOfTradeUrl:{defaultValue:null,description:"",name:"termsOfTradeUrl",required:!0,type:{name:"string"}},totalFeeAmountText:{defaultValue:null,description:"",name:"totalFeeAmountText",required:!0,type:{name:"string"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}},turnedInText:{defaultValue:null,description:"",name:"turnedInText",required:!0,type:{name:"string"}},unpaidFeesNotPayableByClientHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesNotPayableByClientHeadlineText",required:!0,type:{name:"string"}},unpaidFeesPayableByClientHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesPayableByClientHeadlineText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesText:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesUrl:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesUrl",required:!0,type:{name:"string"}},feeListAlreadyPaidInfoText:{defaultValue:null,description:"",name:"feeListAlreadyPaidInfoText",required:!0,type:{name:"string"}},feeListAlreadyPaidSecondInfoText:{defaultValue:null,description:"",name:"feeListAlreadyPaidSecondInfoText",required:!0,type:{name:"string"}},feeListYouHaveOverdueLoansText:{defaultValue:null,description:"",name:"feeListYouHaveOverdueLoansText",required:!0,type:{name:"string"}},feeListSeeYourOverdueLoansText:{defaultValue:null,description:"",name:"feeListSeeYourOverdueLoansText",required:!0,type:{name:"string"}},feeListSeeYourOverdueLoansAriaText:{defaultValue:null,description:"",name:"feeListSeeYourOverdueLoansAriaText",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.entry.tsx#FeeListentry"]={docgenInfo:FeeListentry.__docgenInfo,name:"FeeListentry",path:"src/apps/fee-list/FeeList.entry.tsx#FeeListentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts");const FeeList_dev={title:"Apps / Fee list",component:FeeList_entry,argTypes:{...serviceUrlArgs.A,...blockedArgs.A,...globalTextArgs.A,...globalConfigArgs.A,...groupModalArgs.A,...loanGroupModalArgs.A,...materialDetailsModalArgs.A,...renewalArgs.A,feeListHeadlineText:{defaultValue:"Fees & Replacement costs",control:{type:"text"}},feeListBodyText:{defaultValue:"Overdue fees and replacement costs that were created before 27/10/2020 can still be paid on this page.",control:{type:"text"}},viewFeesAndCompensationRatesText:{defaultValue:"See our fees and replacement costs",control:{type:"text"}},etAlText:{control:{type:"text"},defaultValue:"et al."},totalFeeAmountText:{defaultValue:"Fee",control:{type:"text"}},otherMaterialsText:{defaultValue:"Other materials",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},feeListDaysText:{defaultValue:"Days",control:{type:"text"}},payText:{defaultValue:"Pay",control:{type:"text"}},totalText:{defaultValue:"Total @total",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},iAcceptText:{defaultValue:"I accept the",control:{type:"text"}},termsOfTradeText:{defaultValue:"Terms of trade",control:{type:"text"}},unpaidFeesPayableByClientHeadlineText:{defaultValue:"Unsettled debt - paid on site",control:{type:"text"}},unpaidFeesNotPayableByClientHeadlineText:{defaultValue:"Unsettled debt - paid externally",control:{type:"text"}},alreadyPaidText:{defaultValue:"Please note that paid fees are not registered up until 72 hours after your payment after which your debt is updated and your user unblocked if it has been blocked.",control:{type:"text"}},feePaymentModalHeaderText:{defaultValue:"Unpaid fees post 27/10 2020",control:{type:"text"}},feePaymentModalBodyText:{defaultValue:"You will be redirected to Mit Betalingsoverblik.",control:{type:"text"}},feePaymentModalNoticeText:{defaultValue:"Paid fees can take up to 24 hours to registrer.",control:{type:"text"}},feePaymentModalGotoText:{defaultValue:"Go to Mit Betalingsoverblik",control:{type:"text"}},feePaymentModalCancelText:{defaultValue:"Cancel",control:{type:"text"}},feeDetailsModalScreenReaderText:{defaultValue:"A modal containing details about a fee",control:{type:"text"}},emptyFeeListText:{defaultValue:"You have 0 unpaid fees or replacement costs",control:{type:"text"}},feeDetailsModalCloseModalAriaLabelText:{defaultValue:"Close fee details modal",control:{type:"text"}},feeDetailsModalDescriptionText:{defaultValue:"Modal containing information about this element or group of elements fees",control:{type:"text"}},turnedInText:{control:{type:"text"},defaultValue:"Turned in @date"},plusXOtherMaterialsText:{control:{type:"text"},defaultValue:"+ @amount other materials"},itemFeeAmountText:{control:{type:"text"},defaultValue:"Fee @fee"},feeCreatedText:{control:{type:"text"},defaultValue:"Fees charged @date"},feeListAlreadyPaidInfoText:{defaultValue:"Already paid? It can take up to 72 hours to register the transaction.",control:{type:"text"}},feeListAlreadyPaidSecondInfoText:{defaultValue:"Already paid? It can take up to 72 hours to register the transaction. (not payable by user)",control:{type:"text"}},feeListMaterialNumberText:{defaultValue:"# @materialNumber",control:{type:"text"}},feeListConfig:{defaultValue:'{ "paymentSiteButtonLabel": "Go to payment page" }',control:{type:"text"}},feeListYouHaveOverdueLoansText:{defaultValue:'{"type":"plural","text":["You have an overdue loan. You may be charged fees upon handing in or renewing it.","You have overdue loans. You may be charged fees upon handing in or renewing them."]}',control:{type:"text"}},feeListSeeYourOverdueLoansText:{defaultValue:"See your overdue loans",control:{type:"text"}},feeListSeeYourOverdueLoansAriaText:{defaultValue:"Go to the loan list page to see your overdue loans",control:{type:"text"}},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},feeListPaymentSiteUrl:{defaultValue:"https://google.com",control:{type:"text"}},availablePaymentTypesUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},termsOfTradeUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/NEJcmvLFcws",control:{type:"text"}}},decorators:[esm.V]},Template=props=>react.createElement(FeeList_entry,props),FeeList_dev_FeeListEntry=Template.bind({});FeeList_dev_FeeListEntry.args={};const{feeDetails}=(0,modal_helpers.c6)(),FeeListFeeDetailsModal=Template.bind({});FeeListFeeDetailsModal.parameters={query:{modal:`${feeDetails}48724566`}}},"./src/apps/hello-world/hello-world.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>hello_world_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),hello=__webpack_require__("./src/components/hello/hello.tsx");const hello_world=()=>{const t=(0,utils_text.F)();return react.createElement("article",null,react.createElement("h2",null,t("titleText")),react.createElement("p",null,t("introductionText")),react.createElement("p",null,react.createElement(hello.F,{shouldBeEmphasized:!0})))};try{helloworld.displayName="helloworld",helloworld.__docgenInfo={description:"",displayName:"helloworld",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.tsx#helloworld"]={docgenInfo:helloworld.__docgenInfo,name:"helloworld",path:"src/apps/hello-world/hello-world.tsx#helloworld"})}catch(__react_docgen_typescript_loader_error){}const hello_world_entry=(0,utils_text.i)((()=>react.createElement(hello_world,null)));try{helloworldentry.displayName="helloworldentry",helloworldentry.__docgenInfo={description:"",displayName:"helloworldentry",props:{titleText:{defaultValue:null,description:"",name:"titleText",required:!0,type:{name:"string"}},introductionText:{defaultValue:null,description:"",name:"introductionText",required:!0,type:{name:"string"}},whatText:{defaultValue:null,description:"",name:"whatText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.entry.tsx#helloworldentry"]={docgenInfo:helloworldentry.__docgenInfo,name:"helloworldentry",path:"src/apps/hello-world/hello-world.entry.tsx#helloworldentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts");const hello_world_dev={title:"Apps / Hello World",component:hello_world_entry,argTypes:{...globalTextArgs.A,titleText:{defaultValue:"Greetings",control:{type:"text"}},introductionText:{defaultValue:"We warmly welcome everybody by saying:",control:{type:"text"}},whatText:{defaultValue:"world",control:{type:"text"}}}},App=args=>react.createElement(hello_world_entry,args)},"./src/apps/loan-list/list/loan-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LoanListDetailsModal:()=>LoanListDetailsModal,LoanListDueDateModal:()=>LoanListDueDateModal,LoanListEntry:()=>loan_list_dev_LoanListEntry,LoanListRenewLoansModal:()=>LoanListRenewLoansModal,default:()=>loan_list_dev});var esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),general=__webpack_require__("./src/core/utils/helpers/general.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx");const material_overdue_link=({dueDate,showOn})=>{const t=(0,utils_text.F)(),viewFeesAndCompensationRatesUrl=(0,utils_url.Ik)()("viewFeesAndCompensationRatesUrl");return!dueDate||dueDate&&!(0,general.El)(dueDate)?null:react.createElement(Link.A,{href:viewFeesAndCompensationRatesUrl,className:`list-reservation__note list-reservation__note--${showOn} color-signal-alert`},t("loanListMaterialLateFeeText"))};try{materialoverduelink.displayName="materialoverduelink",materialoverduelink.__docgenInfo={description:"",displayName:"materialoverduelink",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string | null | undefined"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"]={docgenInfo:materialoverduelink.__docgenInfo,name:"materialoverduelink",path:"src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"})}catch(__react_docgen_typescript_loader_error){}const additional_materials_button=({additionalMaterials,openDueDateModal,showOn})=>{const t=(0,utils_text.F)(),openDueDateModalCallBack=(0,react.useCallback)((e=>{e.stopPropagation(),openDueDateModal()}),[openDueDateModal]);return additionalMaterials<1?react.createElement("div",null):react.createElement("button",{type:"button",onClick:e=>openDueDateModalCallBack(e),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDueDateModalCallBack(e)},"aria-describedby":"materials-modal-text",className:`list-reservation__note list-reservation__note--${showOn}`},t("loanListAdditionalMaterialsText",{count:additionalMaterials,placeholders:{"@count":additionalMaterials}}))};try{additionalmaterialsbutton.displayName="additionalmaterialsbutton",additionalmaterialsbutton.__docgenInfo={description:"",displayName:"additionalmaterialsbutton",props:{additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"() => void"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"]={docgenInfo:additionalmaterialsbutton.__docgenInfo,name:"additionalmaterialsbutton",path:"src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"})}catch(__react_docgen_typescript_loader_error){}var material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),StatusMessage=__webpack_require__("./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx");const material_status=({loan,children,additionalMaterials,openDetailsModal,openDueDateModal,arrowLabelledBy})=>{const t=(0,utils_text.F)(),{dueDate,loanDate}=loan,isStacked=(0,helpers.Qo)(additionalMaterials),notificationClickEventHandler=()=>{isStacked&&openDueDateModal&&dueDate&&openDueDateModal(dueDate),isStacked||openDetailsModal(loan)};return dueDate&&loanDate?react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"},react.createElement(status_circle.A,{loanDate,dueDate})),react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},dueDate&&react.createElement(status_badge.A,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("loanListStatusBadgeDangerText"),warningText:t("loanListStatusBadgeWarningText")}),react.createElement("p",{className:"text-small-caption color-secondary-gray"},(0,helpers.X4)(loan)?t("loanListToBeDeliveredDigitalMaterialText",{placeholders:{"@date":(0,date.r6)(dueDate)}}):t("loanListToBeDeliveredText",{placeholders:{"@date":(0,date.Yq)(dueDate)}})),!(0,helpers.X4)(loan)&&react.createElement("p",{className:"text-small-caption color-secondary-gray mt-4"},react.createElement(StatusMessage.A,{className:"mr-4",loanType:loan.loanType,renewalStatusList:loan.renewalStatusList})),children)),react.createElement(ArrowButton.A,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler})):react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"}),react.createElement("div",{className:"list-reservation__deadline"}),react.createElement(ArrowButton.A,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler}))};try{materialstatus.displayName="materialstatus",materialstatus.__docgenInfo={description:"",displayName:"materialstatus",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"]={docgenInfo:materialstatus.__docgenInfo,name:"materialstatus",path:"src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"})}catch(__react_docgen_typescript_loader_error){}var list_material_skeleton=__webpack_require__("./src/apps/reservation-list/reservation-material/list-material-skeleton.tsx");const stackable_material=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({additionalMaterials,material,loan,openDueDateModal,openLoanDetailsModal,focused,loanId})=>{const{dueDate,identifier,periodical}=loan,handleOpenDueDateModal=()=>{openDueDateModal&&dueDate?openDueDateModal(dueDate):openLoanDetailsModal(loan)};return react.createElement("div",{className:(0,clsx.A)("list-reservation my-32 cursor-pointer arrow__hover--right-small",{"list-reservation--stacked":additionalMaterials>0}),role:"button",onClick:handleOpenDueDateModal,onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||focused||handleOpenDueDateModal()},tabIndex:0},material&&react.createElement(material_info.A,{arrowLabelledBy:`${loanId||identifier}-title`,openDetailsModal:handleOpenDueDateModal,periodical,material,focused,isbnForCover:identifier||""},react.createElement(additional_materials_button,{showOn:"desktop",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"desktop",dueDate})),react.createElement(material_status,{arrowLabelledBy:`${loanId||identifier}-title`,loan,openDetailsModal:openLoanDetailsModal,openDueDateModal:handleOpenDueDateModal,additionalMaterials},react.createElement(additional_materials_button,{showOn:"mobile",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"mobile",dueDate})))}),list_material_skeleton.A),list_material_skeleton.A);try{stackablematerial.displayName="stackablematerial",stackablematerial.__docgenInfo={description:"",displayName:"stackablematerial",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"]={docgenInfo:stackablematerial.__docgenInfo,name:"stackablematerial",path:"src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"})}catch(__react_docgen_typescript_loader_error){}var loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts");const loan_list_items=({loans,view,dueDates,openDueDateModal,openLoanDetailsModal,indexOfFocus,dataCy="loan-list-items"})=>{const t=(0,utils_text.F)();return react.createElement("div",{"data-cy":dataCy,className:"list-reservation-container my-32"},react.createElement("div",{className:"list-reservation__hidden-explanation",id:"materials-modal-text"},t("loanListDueDateModalAriaLabelText")),"stack"===view&&dueDates&&dueDates.map(((uniqueDueDate,i)=>{const loansUniqueDueDate=(0,helpers.nZ)(uniqueDueDate,loans),loan=loansUniqueDueDate[0]||{};return react.createElement("ul",null,loan&&react.createElement(stackable_material,{focused:i===indexOfFocus,openDueDateModal,openLoanDetailsModal,loan,item:loan,loanId:loan.loanId,key:loan.faust||loan.identifier,additionalMaterials:loansUniqueDueDate.length-1}))})),"list"===view&&react.createElement("ul",null,loans.map(((loan,i)=>react.createElement(stackable_material,{focused:i===indexOfFocus,openLoanDetailsModal,item:loan,loanId:loan.loanId,key:(0,loan_type.G)(loan),loan,additionalMaterials:0})))))};try{loanlistitems.displayName="loanlistitems",loanlistitems.__docgenInfo={description:"",displayName:"loanlistitems",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}},indexOfFocus:{defaultValue:null,description:"",name:"indexOfFocus",required:!0,type:{name:"number | null"}},dataCy:{defaultValue:{value:"loan-list-items"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"]={docgenInfo:loanlistitems.__docgenInfo,name:"loanlistitems",path:"src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx");const list_list=({loans,dueDates,view,emptyListLabel,pageSize,openLoanDetailsModal,openDueDateModal,children})=>{const[displayedLoans,setDisplayedLoans]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:loans.length,pageSize,overrideItemsShown:"list"===view?void 0:()=>displayedLoans.length});return(0,react.useEffect)((()=>{if("list"===view)setDisplayedLoans((0,general.L1)(loans,itemsShown));else{const stackedLoans=(0,helpers.e8)(view,loans,itemsShown,dueDates);setDisplayedLoans([...stackedLoans])}}),[dueDates,loans,itemsShown,view]),react.createElement(react.Fragment,null,children,loans.length>0&&react.createElement(react.Fragment,null,react.createElement(loan_list_items,{indexOfFocus:firstInNewPage,openLoanDetailsModal,openDueDateModal,dueDates,loans:displayedLoans,view}),react.createElement(PagerComponent,null)),0===loans.length&&react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:emptyListLabel}))};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/loan-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const icon_list=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 16C5.55228 16 6 16.4477 6 17V19C6 19.5523 5.55228 20 5 20H3C2.44772 20 2 19.5523 2 19V17C2 16.4477 2.44772 16 3 16H5ZM21 17.25C21.4142 17.25 21.75 17.5858 21.75 18C21.75 18.3797 21.4678 18.6935 21.1018 18.7432L21 18.75H9C8.58579 18.75 8.25 18.4142 8.25 18C8.25 17.6203 8.53215 17.3065 8.89823 17.2568L9 17.25H21ZM5 10C5.55228 10 6 10.4477 6 11V13C6 13.5523 5.55228 14 5 14H3C2.44772 14 2 13.5523 2 13V11C2 10.4477 2.44772 10 3 10H5ZM21 11.25C21.4142 11.25 21.75 11.5858 21.75 12C21.75 12.3797 21.4678 12.6935 21.1018 12.7432L21 12.75H9C8.58579 12.75 8.25 12.4142 8.25 12C8.25 11.6203 8.53215 11.3065 8.89823 11.2568L9 11.25H21ZM5 4C5.55228 4 6 4.44772 6 5V7C6 7.55228 5.55228 8 5 8H3C2.44772 8 2 7.55228 2 7V5C2 4.44772 2.44772 4 3 4H5ZM21 5.25C21.4142 5.25 21.75 5.58579 21.75 6C21.75 6.3797 21.4678 6.69349 21.1018 6.74315L21 6.75H9C8.58579 6.75 8.25 6.41421 8.25 6C8.25 5.6203 8.53215 5.30651 8.89823 5.25685L9 5.25H21Z"})),icon_stack=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1291 2.78217C11.6687 2.47235 12.3323 2.47235 12.8719 2.78217L19.5721 6.62914C20.4103 7.11038 20.6996 8.17997 20.2184 9.01814C20.064 9.28701 19.841 9.51004 19.5721 9.66442L18.861 10.0718L19.5721 10.481C20.4103 10.9622 20.6996 12.0318 20.2184 12.87C20.0949 13.0851 19.9274 13.2708 19.7277 13.4156L19.5721 13.5163L18.861 13.9238L19.5721 14.3328C20.4103 14.8141 20.6996 15.8837 20.2184 16.7218C20.0949 16.9369 19.9274 17.1227 19.7277 17.2674L19.5721 17.3681L12.8719 21.2151C12.3772 21.4991 11.7785 21.5228 11.2665 21.2861L11.1291 21.2151L4.42892 17.3681C3.59075 16.8869 3.3014 15.8173 3.78264 14.9791C3.90614 14.764 4.07358 14.5783 4.27328 14.4335L4.42892 14.3328L5.13899 13.9238L4.42892 13.5163C3.59075 13.035 3.3014 11.9654 3.78264 11.1273C3.90614 10.9122 4.07358 10.7264 4.27328 10.5817L4.42892 10.481L5.13899 10.0718L4.42892 9.66442C3.63732 9.20991 3.33525 8.23061 3.70953 7.41711L3.78264 7.27541C3.93702 7.00654 4.16005 6.78351 4.42892 6.62914L11.1291 2.78217ZM17.354 14.7888L12.8719 17.3632C12.3772 17.6472 11.7785 17.6709 11.2665 17.4342L11.1291 17.3632L6.64599 14.7888L5.1758 15.6337C5.13739 15.6557 5.10553 15.6876 5.08348 15.726C5.02455 15.8286 5.0465 15.9556 5.12938 16.033L5.1758 16.0673L11.876 19.9143C11.9338 19.9475 12.0016 19.9557 12.0644 19.9392L12.125 19.9143L18.8252 16.0673C18.8636 16.0452 18.8955 16.0134 18.9175 15.975C18.9765 15.8723 18.9545 15.7454 18.8716 15.6679L18.8252 15.6337L17.354 14.7888ZM17.354 10.9368L12.8719 13.5114C12.3323 13.8212 11.6687 13.8212 11.1291 13.5114L6.64599 10.9368L5.1758 11.7818C5.13739 11.8039 5.10553 11.8357 5.08348 11.8741C5.02455 11.9768 5.0465 12.1037 5.12938 12.1812L5.1758 12.2154L11.876 16.0624C11.9338 16.0956 12.0016 16.1039 12.0644 16.0873L12.125 16.0624L18.8252 12.2154C18.8636 12.1934 18.8955 12.1615 18.9175 12.1231C18.9765 12.0205 18.9545 11.8936 18.8716 11.8161L18.8252 11.7818L17.354 10.9368ZM12.125 4.083C12.0479 4.03874 11.9531 4.03874 11.876 4.083L5.1758 7.92997C5.13739 7.95202 5.10553 7.98389 5.08348 8.0223C5.01473 8.14203 5.05607 8.29483 5.1758 8.36358L11.876 12.2106C11.9531 12.2548 12.0479 12.2548 12.125 12.2106L18.8252 8.36358C18.8636 8.34153 18.8955 8.30967 18.9175 8.27126C18.9863 8.15152 18.945 7.99872 18.8252 7.92997L12.125 4.083Z"}));var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const ToggleListViewButtons=({setView,view,disableRenewLoansButton,openRenewLoansModal})=>{const t=(0,utils_text.F)(),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.$u)({listview:inputView}),setView(inputView)}),[setView]),renewLoansButtonText=t(disableRenewLoansButton?"loanListNoItemsCanBeRenewedText":"loanListRenewMultipleButtonText");return react.createElement("div",{className:"dpl-list-buttons__buttons"},react.createElement("div",{id:"renew-multiple-modal",className:"dpl-list-buttons__screen-reader-description"},t("loanListRenewMultipleButtonExplanationText")),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{onClick:()=>setViewHandler("list"),"aria-pressed":"list"===view,className:"dpl-icon-button "+("list"===view?"dpl-icon-button--selected":""),id:"test-list",type:"button","aria-label":t("loanListAriaLabelListButtonText")},react.createElement(icon_list,null))),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{"aria-pressed":"stack"===view,className:"dpl-icon-button "+("stack"===view?"dpl-icon-button--selected":""),"data-cy":"stack",onClick:()=>setViewHandler("stack"),type:"button","aria-label":t("loanListAriaLabelStackButtonText")},react.createElement(icon_stack,null))),react.createElement("div",{className:"dpl-list-buttons__buttons__button dpl-list-buttons__buttons__button--hide-on-mobile"},react.createElement("button",{type:"button",onClick:()=>{openRenewLoansModal()},disabled:disableRenewLoansButton,className:"btn-primary btn-filled btn-small arrow__hover--right-small "+(disableRenewLoansButton?"btn-outline":""),id:"test-renew-button","aria-describedby":"renew-multiple-modal"},renewLoansButtonText)),react.createElement("div",{className:"hide-on-desktop button-box button-box--sticky-bottom"},react.createElement(Button.$,{label:renewLoansButtonText,buttonType:"none",disabled:disableRenewLoansButton,collapsible:!1,size:"small",variant:disableRenewLoansButton?"outline":"filled",onClick:()=>{openRenewLoansModal()}})))},list_ToggleListViewButtons=ToggleListViewButtons;try{ToggleListViewButtons.displayName="ToggleListViewButtons",ToggleListViewButtons.__docgenInfo={description:"",displayName:"ToggleListViewButtons",props:{setView:{defaultValue:null,description:"",name:"setView",required:!0,type:{name:"(view: ListView) => void"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},disableRenewLoansButton:{defaultValue:null,description:"",name:"disableRenewLoansButton",required:!0,type:{name:"boolean"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},openRenewLoansModal:{defaultValue:null,description:"",name:"openRenewLoansModal",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"]={docgenInfo:ToggleListViewButtons.__docgenInfo,name:"ToggleListViewButtons",path:"src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"})}catch(__react_docgen_typescript_loader_error){}const ListHeader=({header,amount,children})=>react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{className:"dpl-list-buttons__header"},header,react.createElement("span",{className:"dpl-list-buttons__power"},amount)),children),list_ListHeader=ListHeader;try{ListHeader.displayName="ListHeader",ListHeader.__docgenInfo={description:"",displayName:"ListHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ListHeader.tsx#ListHeader"]={docgenInfo:ListHeader.__docgenInfo,name:"ListHeader",path:"src/apps/loan-list/list/ListHeader.tsx#ListHeader"})}catch(__react_docgen_typescript_loader_error){}var material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const loan_list_skeleton=()=>react.createElement(react.Fragment,null,react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-64 mb-35"}),react.createElement(list_material_skeleton.A,null),react.createElement(list_material_skeleton.A,null)),react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-64 mb-35"}),react.createElement(list_material_skeleton.A,null),react.createElement(list_material_skeleton.A,null)));try{loanlistskeleton.displayName="loanlistskeleton",loanlistskeleton.__docgenInfo={description:"",displayName:"loanlistskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list-skeleton.tsx#loanlistskeleton"]={docgenInfo:loanlistskeleton.__docgenInfo,name:"loanlistskeleton",path:"src/apps/loan-list/list/loan-list-skeleton.tsx#loanlistskeleton"})}catch(__react_docgen_typescript_loader_error){}const loan_list=({pageSize})=>{const{modalIds}=(0,es.d4)((s=>s.modal)),{open}=(0,modal.X)(),{loanDetails,allLoansId,dueDateModal}=(0,modal_helpers.c6)(),t=(0,utils_text.F)(),[view,setView]=(0,react.useState)("list"),[dueDate,setDueDate]=(0,react.useState)(null),[modalLoan,setModalLoan]=(0,react.useState)(null),{fbs:{loans:loansPhysical,stackedMaterialsDueDates:stackedMaterialsDueDatesFbs,isLoading:isLoadingFbs},publizon:{loans:loansDigital,isLoading:isLoadingPublizon}}=(0,useLoans.A)(),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.B0)(loan))}),[open]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{setDueDate(dueDateInput),open((0,modal_helpers.Q0)(dueDateModal,[dueDateInput]))}),[dueDateModal,open]),openRenewLoansModal=(0,react.useCallback)((()=>{setDueDate(null),open(allLoansId)}),[allLoansId,open]);(0,react.useEffect)((()=>{const modalUrlParam=(0,url.d6)("modal"),loanDetailsString=loanDetails;if(modalUrlParam&&modalUrlParam.includes(loanDetails)){const loanIdFromModalId=(0,modal_helpers.dI)(modalUrlParam,loanDetailsString);if(loanIdFromModalId&&loansPhysical){const loan=[...(0,helpers.nB)(loansPhysical,"loanId",loanIdFromModalId),...(0,helpers.nB)(loansDigital,"identifier",loanIdFromModalId)].filter(loan_type.R).at(0);loan&&setModalLoan(loan)}}if(modalUrlParam&&(0,modal_helpers.eF)(modalUrlParam)){const dateFromQueryParam=(0,modal_helpers.xx)(modalUrlParam);setDueDate(dateFromQueryParam)}}),[loansPhysical,loansDigital,loanDetails,openDueDateModal]);const shouldShowSkeletons=isLoadingFbs&&isLoadingPublizon&&0===loansPhysical.length&&0===loansDigital.length;return react.createElement(react.Fragment,null,react.createElement("div",{className:`loan-list-page ${(0,general.eD)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 my-32"},t("loanListTitleText")),shouldShowSkeletons&&react.createElement(loan_list_skeleton,null),!shouldShowSkeletons&&(!(0,helpers.VL)(loansPhysical)||!(0,helpers.VL)(loansDigital))&&react.createElement(react.Fragment,null,loansPhysical&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListPhysicalLoansEmptyListText"),loans:loansPhysical,dueDates:stackedMaterialsDueDatesFbs,view,openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListPhysicalLoansTitleText"),amount:loansPhysical.length},react.createElement(list_ToggleListViewButtons,{disableRenewLoansButton:0===(0,general.oq)(loansPhysical),view,setView,loans:loansPhysical,pageSize,openRenewLoansModal}))),loansDigital&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListDigitalLoansEmptyListText"),loans:loansDigital,view:"list",openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListDigitalLoansTitleText"),amount:loansDigital.length}))),!isLoadingFbs&&!isLoadingPublizon&&(0,helpers.VL)(loansPhysical)&&(0,helpers.VL)(loansDigital)&&react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("loanListDigitalPhysicalLoansEmptyListText")})),modalLoan&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.B0)(modalLoan)},react.createElement(material_details.A,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.B0)(modalLoan)})),loansPhysical&&react.createElement(LoansGroupModal.A,{pageSize,openDetailsModal:openLoanDetailsModal,dueDate,loansModal:dueDate?(0,helpers.nZ)(dueDate,loansPhysical):loansPhysical},dueDate&&react.createElement(StatusCircleModalHeader.A,{header:t("groupModalDueDateHeaderText",{placeholders:{"@date":(0,date.Yq)(dueDate)}}),dueDate,statusCircleComponent:react.createElement(status_circle.A,{loanDate:dayjs_min_default()().subtract(1,"month").format("YYYY-MM-DD"),dueDate})}),!dueDate&&react.createElement(SimpleModalHeader.A,{header:t("groupModalHeaderText")})))};try{loanlist.displayName="loanlist",loanlist.__docgenInfo={description:"",displayName:"loanlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.tsx#loanlist"]={docgenInfo:loanlist.__docgenInfo,name:"loanlist",path:"src/apps/loan-list/list/loan-list.tsx#loanlist"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const loan_list_entry=(0,__webpack_require__("./src/core/utils/config.tsx").NV)((0,utils_url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(loan_list,{pageSize})})))));try{loanlistentry.displayName="loanlistentry",loanlistentry.__docgenInfo={description:"",displayName:"loanlistentry",props:{blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},loanListAriaLabelListButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelListButtonText",required:!0,type:{name:"string"}},loanListAriaLabelStackButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelStackButtonText",required:!0,type:{name:"string"}},loanListDigitalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDigitalLoansTitleText:{defaultValue:null,description:"",name:"loanListDigitalLoansTitleText",required:!0,type:{name:"string"}},loanListDigitalPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDueDateModalAriaLabelText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaLabelText",required:!0,type:{name:"string"}},loanListDueDateModalAriaDescribeMobileText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaDescribeMobileText",required:!0,type:{name:"string"}},loanListLateFeeDesktopText:{defaultValue:null,description:"",name:"loanListLateFeeDesktopText",required:!0,type:{name:"string"}},loanListLateFeeMobileText:{defaultValue:null,description:"",name:"loanListLateFeeMobileText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loanListAdditionalMaterialsText:{defaultValue:null,description:"",name:"loanListAdditionalMaterialsText",required:!0,type:{name:"string"}},loanListPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListPhysicalLoansTitleText:{defaultValue:null,description:"",name:"loanListPhysicalLoansTitleText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonExplanationText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonExplanationText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonText",required:!0,type:{name:"string"}},loanListNoItemsCanBeRenewedText:{defaultValue:null,description:"",name:"loanListNoItemsCanBeRenewedText",required:!0,type:{name:"string"}},loanListStatusBadgeDangerText:{defaultValue:null,description:"",name:"loanListStatusBadgeDangerText",required:!0,type:{name:"string"}},loanListStatusBadgeWarningText:{defaultValue:null,description:"",name:"loanListStatusBadgeWarningText",required:!0,type:{name:"string"}},loanListTitleText:{defaultValue:null,description:"",name:"loanListTitleText",required:!0,type:{name:"string"}},loanListToBeDeliveredDigitalMaterialText:{defaultValue:null,description:"",name:"loanListToBeDeliveredDigitalMaterialText",required:!0,type:{name:"string"}},loanListToBeDeliveredText:{defaultValue:null,description:"",name:"loanListToBeDeliveredText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},loanListMaterialLateFeeText:{defaultValue:null,description:"",name:"loanListMaterialLateFeeText",required:!0,type:{name:"string"}},loanListMaterialDayText:{defaultValue:null,description:"",name:"loanListMaterialDayText",required:!0,type:{name:"string"}},loanListStatusCircleAriaLabelText:{defaultValue:null,description:"",name:"loanListStatusCircleAriaLabelText",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"]={docgenInfo:loanlistentry.__docgenInfo,name:"loanlistentry",path:"src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const loan_list_dev={title:"Apps / Loan list",component:loan_list_entry,argTypes:{...serviceUrlArgs.A,...groupModalArgs.A,...globalTextArgs.A,...globalConfigArgs.A,...loanGroupModalArgs.A,...renewalArgs.A,...materialDetailsModalArgs.A,...blockedArgs.A,pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},loanListAriaLabelListButtonText:{control:{type:"text"},defaultValue:"This button shows all loans in the list"},loanListAriaLabelStackButtonText:{control:{type:"text"},defaultValue:"This button filters the list, so only one the materials that have the same due date is shown"},loanListDigitalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no digital loans at the moment"},loanListDigitalLoansTitleText:{control:{type:"text"},defaultValue:"Digital loans"},loanListDigitalPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have 0 loans at the moment"},loanListDueDateModalAriaLabelText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with the same due date as the loan currently in focus"},loanListMaterialLateFeeText:{control:{type:"text"},defaultValue:"You will be charged a fee, when the item is returned"},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},loanListMaterialDayText:{control:{type:"text"},defaultValue:"day"},loanListAdditionalMaterialsText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["+ 1 other material","+ @count other materials"]}'},loanListPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no physical loans at the moment"},loanListPhysicalLoansTitleText:{control:{type:"text"},defaultValue:"Physical loans"},loanListRenewMultipleButtonExplanationText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with different due dates, if some of the loans in the modal are renewable you can renew them"},loanListRenewMultipleButtonText:{control:{type:"text"},defaultValue:"Renew several"},loanListNoItemsCanBeRenewedText:{control:{type:"text"},defaultValue:"No materials can be renewed"},loanListStatusBadgeDangerText:{control:{type:"text"},defaultValue:"Expired"},loanListStatusBadgeWarningText:{control:{type:"text"},defaultValue:"Expiring soon"},loanListStatusCircleAriaLabelText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["This material is due in one day","This material is due in @count days"]}'},loanListTitleText:{control:{type:"text"},defaultValue:"Your loans"},loanListToBeDeliveredDigitalMaterialText:{control:{type:"text"},defaultValue:"Due date @date"},loanListToBeDeliveredText:{control:{type:"text"},defaultValue:"Due date @date"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},groupModalHeaderText:{control:{type:"text"},defaultValue:"Renew several"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount loans",control:{type:"text"}}},decorators:[esm.V]},Template=props=>react.createElement(loan_list_entry,props),loan_list_dev_LoanListEntry=Template.bind({});loan_list_dev_LoanListEntry.args={};const{dueDateModal,loanDetails,allLoansId}=(0,modal_helpers.c6)(),LoanListDetailsModal=Template.bind({});LoanListDetailsModal.parameters={query:{modal:`${loanDetails}9562505082`}};const LoanListDueDateModal=Template.bind({});LoanListDueDateModal.parameters={query:{modal:`${dueDateModal}2022-12-15`}};const LoanListRenewLoansModal=Template.bind({});LoanListRenewLoansModal.parameters={query:{modal:allLoansId}}},"./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_utils_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx");const StatusMessage=({className,loanType,renewalStatusList})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,renewalStatusList&&renewalStatusList.map((text=>"deniedOtherReason"!==text?react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className},(0,_utils_helpers__WEBPACK_IMPORTED_MODULE_1__.Iw)(text,t)):null)),"interLibraryLoan"===loanType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className},t("groupModalRenewLoanDeniedInterLibraryLoanText")))},__WEBPACK_DEFAULT_EXPORT__=StatusMessage;try{StatusMessage.displayName="StatusMessage",StatusMessage.__docgenInfo={description:"",displayName:"StatusMessage",props:{className:{defaultValue:null,description:"",name:"className",required:!0,type:{name:"string"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"]={docgenInfo:StatusMessage.__docgenInfo,name:"StatusMessage",path:"src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/selectable-material/selectable-material.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>selectable_material});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");function listId(listItem){var _listItem$reservation;if(null!=listItem&&listItem.reservationIds&&listItem.reservationIds.length>0)return null==listItem||null===(_listItem$reservation=listItem.reservationIds)||void 0===_listItem$reservation?void 0:_listItem$reservation.join("-");if(listItem.loanId)return String(listItem.loanId);if(listItem.identifier)return listItem.identifier;if(listItem.faust)return String(listItem.faust);throw new Error("Unable to determine id for list item")}const selectable_material_skeleton=({withoutLeftOffset=!1})=>react.createElement("li",{className:"ssc"},react.createElement("div",{className:"list-materials list-materials--disabled"},!withoutLeftOffset&&react.createElement("div",{className:"list-materials__checkbox mr-16"},react.createElement(Checkbox.A,{id:"",disabled:!0,isVisualOnly:!0})),react.createElement("div",{className:"list-materials__content"},react.createElement("div",{className:"list-materials__content-status"},react.createElement("div",{className:"ssc-head-line status-label w-10"})),react.createElement("div",{className:"ssc-head-line status-label w-60 mt-8"}),react.createElement("div",{className:"ssc-head-line status-label w-50"}),react.createElement("div",{className:"ssc-line w-30"})),react.createElement("div",{className:"list-materials__status"},react.createElement("div",null,react.createElement("div",{className:"ssc-head-line status-label w-100 mt-8"}),react.createElement("div",{className:"ssc-line w-100"})))));try{selectablematerialskeleton.displayName="selectablematerialskeleton",selectablematerialskeleton.__docgenInfo={description:"",displayName:"selectablematerialskeleton",props:{withoutLeftOffset:{defaultValue:{value:"false"},description:"",name:"withoutLeftOffset",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/selectable-material-skeleton.tsx#selectablematerialskeleton"]={docgenInfo:selectablematerialskeleton.__docgenInfo,name:"selectablematerialskeleton",path:"src/apps/loan-list/materials/selectable-material/selectable-material-skeleton.tsx#selectablematerialskeleton"})}catch(__react_docgen_typescript_loader_error){}const selectable_material=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({material,disabled,onMaterialChecked,selected,openDetailsModal,item,statusMessageComponentMobile,statusMessageComponentDesktop,statusBadgeComponent,statusBadgeComponentMobile,focused,displayedMaterial,noHoverEffect=!1})=>{const t=(0,utils_text.F)();if(!item)return null;const{authorsShort="",materialType,year="",title="",lang}=material||{},handleOnClick=()=>{openDetailsModal&&openDetailsModal(item)},handleOnKeyUp=e=>{!openDetailsModal||"Enter"!==e.key&&"Space"!==e.key||openDetailsModal(item)};return react.createElement("li",{className:(0,clsx.A)({"arrow__hover--right-small":openDetailsModal})},react.createElement("div",{className:(0,clsx.A)("list-materials",[{"list-materials--disabled":disabled},{"list-materials--no-hover":noHoverEffect}])},onMaterialChecked&&react.createElement("div",{className:"list-materials__checkbox mr-16"},!disabled&&title&&react.createElement(Checkbox.A,{onChecked:()=>onMaterialChecked(item),id:listId(item),selected,disabled,focused,label:t("groupModalHiddenLabelCheckboxOnMaterialText",{placeholders:{"@label":title}}),hideLabel:!0}),disabled&&react.createElement(Checkbox.A,{id:listId(item),disabled})),react.createElement("div",{className:(0,clsx.A)("list-materials__content",{"cursor-pointer":openDetailsModal}),onClick:handleOnClick,onKeyUp:handleOnKeyUp,role:"button",tabIndex:0},materialType&&react.createElement("div",{className:"list-materials__content-status"},react.createElement("div",{className:"status-label status-label--outline "},materialType)),statusBadgeComponentMobile||null,react.createElement("p",{className:"list-materials__content__header mt-8",lang:lang||""},title),react.createElement("p",{className:"text-small-caption"},react.createElement(authorYear.A,{author:authorsShort,year})),react.createElement("div",{className:"list-materials__status list-materials__status--mobile"},statusMessageComponentMobile)),react.createElement("div",{className:"list-materials__status list-materials__status--desktop"},statusBadgeComponent,displayedMaterial&&react.createElement(reservation_info.A,{reservationInfo:displayedMaterial,showArrow:!1,showStatusCircleIcon:!1,reservationStatusClassNameOverride:"",isDigital:(0,helpers.X4)(displayedMaterial)}),statusMessageComponentDesktop),openDetailsModal&&react.createElement(ArrowButton.A,{arrowLabelledBy:listId(item),cursorPointer:!0,clickEventHandler:handleOnClick,keyUpEventHandler:handleOnKeyUp,classNames:"list-materials__arrow arrow-button"})))}),selectable_material_skeleton),selectable_material_skeleton);try{selectablematerial.displayName="selectablematerial",selectablematerial.__docgenInfo={description:"",displayName:"selectablematerial",props:{identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}},onMaterialChecked:{defaultValue:null,description:"",name:"onMaterialChecked",required:!1,type:{name:"((listItem: Nullable>; }>>) => void) | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!1,type:{name:"((item: Nullable>; }>>) => void) | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},statusMessageComponentMobile:{defaultValue:null,description:"",name:"statusMessageComponentMobile",required:!0,type:{name:"ReactNode"}},statusMessageComponentDesktop:{defaultValue:null,description:"",name:"statusMessageComponentDesktop",required:!0,type:{name:"ReactNode"}},statusBadgeComponent:{defaultValue:null,description:"",name:"statusBadgeComponent",required:!0,type:{name:"ReactNode"}},statusBadgeComponentMobile:{defaultValue:null,description:"",name:"statusBadgeComponentMobile",required:!1,type:{name:"ReactNode"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},displayedMaterial:{defaultValue:null,description:"",name:"displayedMaterial",required:!1,type:{name:"Nullable> | undefined"}},noHoverEffect:{defaultValue:{value:"false"},description:"",name:"noHoverEffect",required:!1,type:{name:"boolean | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"]={docgenInfo:selectablematerial.__docgenInfo,name:"selectablematerial",path:"src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/stackable-material/material-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/author-year/authorYear.tsx"),_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({material,isbnForCover,periodical,openDetailsModal,focused,arrowLabelledBy,children})=>{const{authorsShort,materialType,year,title,description,pid,series,lang}=material||{},coverId=pid||isbnForCover,handleDetailsModal=event=>{event.stopPropagation(),openDetailsModal()};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__.Y,{ids:[coverId],idType:pid?"pid":"isbn",size:"small",animate:!1,alt:description||""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__information"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,materialType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__about"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:e=>{handleDetailsModal(e)},onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||focused||handleDetailsModal(e)},type:"button",autoFocus:focused,lang:lang||"",className:"list-reservation__header color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{id:arrowLabelledBy,className:"list-reservation__header__text"},title)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-author",className:"text-small-caption color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__.A,{author:authorsShort||"",year:year||""})),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-periodical",className:"text-small-caption color-secondary-gray"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-series",className:"text-small-caption color-secondary-gray"},series)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,children)))};try{materialinfo.displayName="materialinfo",materialinfo.__docgenInfo={description:"",displayName:"materialinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"() => void"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"]={docgenInfo:materialinfo.__docgenInfo,name:"materialinfo",path:"src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/publizon/publizon.ts"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e({item,...props})=>{if(item.faust)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(item.identifier){const[digitalMaterial,setDigitalMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),{data:productsData,isSuccess:isSuccessDigital,isLoading}=(0,_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__.wK)(item.identifier);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{productsData&&isSuccessDigital&&productsData.product&&setDigitalMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.z7)(productsData.product))}),[productsData,isSuccessDigital]),isLoading?LoadingComponent?react__WEBPACK_IMPORTED_MODULE_0__.createElement(LoadingComponent,null):null:digitalMaterial?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material:digitalMaterial})):null}return null}},"./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e({item,...props})=>{if(null!=item&&item.identifier)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(null!=item&&item.faust){const[material,setMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();let isLoadingAnything=!1,manifestation=null;if(item.reservationIds&&item.reservationIds.length>1){const{isSuccess,data,isLoading}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.NM)({faust:item.faust});isLoadingAnything=isLoading,isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation.ownerWork.manifestations.bestRepresentation)}else{const{isSuccess,data,isLoading}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.V3)({faust:item.faust});isLoadingAnything=isLoading,isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation)}return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{manifestation?setMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.Ml)(manifestation)):item.details&&setMaterial(item.details)}),[manifestation,item.details]),isLoadingAnything?FallbackComponent?react__WEBPACK_IMPORTED_MODULE_0__.createElement(FallbackComponent,null):null:material?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material})):null}return null}},"./src/apps/loan-list/materials/utils/status-badge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>status_badge});var react=__webpack_require__("./node_modules/react/index.js"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),useLoanThresholds=__webpack_require__("./src/core/utils/useLoanThresholds.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const status_badge_content=({statusLabelType,text,isMobileVersion=!1})=>react.createElement("div",{className:(0,clsx.A)(`status-label status-label--${statusLabelType}`,[{"hide-on-desktop ml-16":isMobileVersion}])},text);try{statusbadgecontent.displayName="statusbadgecontent",statusbadgecontent.__docgenInfo={description:"",displayName:"statusbadgecontent",props:{statusLabelType:{defaultValue:null,description:"",name:"statusLabelType",required:!0,type:{name:"enum",value:[{value:'"danger"'},{value:'"warning"'},{value:'"neutral"'},{value:'"info"'}]}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},isMobileVersion:{defaultValue:{value:"false"},description:"",name:"isMobileVersion",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-badge-content.tsx#statusbadgecontent"]={docgenInfo:statusbadgecontent.__docgenInfo,name:"statusbadgecontent",path:"src/apps/loan-list/materials/utils/status-badge-content.tsx#statusbadgecontent"})}catch(__react_docgen_typescript_loader_error){}const status_badge=({badgeDate,warningText,showBadgeWithDueDate=!1,dangerText,infoText,neutralText,mobileVersion=!1})=>{const threshold=(0,useLoanThresholds.A)(),daysBetweenTodayAndDue=badgeDate?(0,general.m2)(badgeDate):0;return daysBetweenTodayAndDue{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts");const __WEBPACK_DEFAULT_EXPORT__=({color,percent,children})=>{const{default:defaultColor}=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.jM)(),usedColor=color||defaultColor;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"counter",style:{background:`radial-gradient( closest-side, var(--parent-bg-color) calc(100% - 3px), transparent calc(100% - 2px), transparent 0 100% ), conic-gradient(${usedColor} ${percent}%, #DBDBDB 0)`}},children)};try{statuscircleicon.displayName="statuscircleicon",statuscircleicon.__docgenInfo={description:"",displayName:"statuscircleicon",props:{color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"]={docgenInfo:statuscircleicon.__docgenInfo,name:"statuscircleicon",path:"src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/status-circle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__),_status_circle_icon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const __WEBPACK_DEFAULT_EXPORT__=({loanDate,dueDate})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.F)(),colors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.jM)(),threshold=(0,_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__.A)();let color=colors.default,percent=100,daysBetweenTodayAndDue=null,daysBetweenLoanAndDue=null;return dueDate?(daysBetweenTodayAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.m2)(dueDate),daysBetweenLoanAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.X6)(dueDate,loanDate),percent=100-daysBetweenTodayAndDue/daysBetweenLoanAndDue*100,percent<0&&(percent=100),daysBetweenTodayAndDue0?daysBetweenTodayAndDue:0," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndDue?"loanListMaterialDayText":"loanListMaterialDaysText"))),null===daysBetweenTodayAndDue&&null===daysBetweenTodayAndDue&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"counter__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label"},t("readyForLoanCounterLabelText"))))};try{statuscircle.displayName="statuscircle",statuscircle.__docgenInfo={description:"",displayName:"statuscircle",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"]={docgenInfo:statuscircle.__docgenInfo,name:"statuscircle",path:"src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/warning-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__),_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/LinkButton.tsx"),_components_Buttons_Button__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/Buttons/Button.tsx");const __WEBPACK_DEFAULT_EXPORT__=({linkText,overdueText,rightText,rightButtonText,rightButtonAriaLabelText,leftLink,rightLink,classNames,rightAction})=>{const labelId=(0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:`warning-bar bg-global-secondary ${classNames}`,"data-cy":"warning-bar"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__left"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"warning-bar__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular color-primary-black","data-cy":"warning-bar-text"},overdueText,leftLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__.A,{href:leftLink,className:"link-tag color-secondary-gray ml-8"},linkText)))),(rightText||rightLink||rightAction)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__right"},rightText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-medium warning-bar__owes","data-cy":"warning-bar-right-text"},rightText)," ",rightLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"hide-visually",id:labelId},rightButtonAriaLabelText),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__.A,{dataCy:"warning-bar-right-link",url:rightLink,size:"small",variant:"filled",ariaLabelledBy:labelId},rightButtonText)),!!rightAction&&!!rightButtonText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Buttons_Button__WEBPACK_IMPORTED_MODULE_4__.$,{size:"small",variant:"filled",buttonType:"none",collapsible:!1,disabled:!1,label:rightButtonText,onClick:rightAction})))};try{warningbar.displayName="warningbar",warningbar.__docgenInfo={description:"",displayName:"warningbar",props:{linkText:{defaultValue:null,description:"",name:"linkText",required:!1,type:{name:"string | undefined"}},overdueText:{defaultValue:null,description:"",name:"overdueText",required:!1,type:{name:"string | undefined"}},rightButtonText:{defaultValue:null,description:"",name:"rightButtonText",required:!1,type:{name:"string | undefined"}},rightButtonAriaLabelText:{defaultValue:null,description:"",name:"rightButtonAriaLabelText",required:!1,type:{name:"string | undefined"}},rightText:{defaultValue:null,description:"",name:"rightText",required:!1,type:{name:"string | undefined"}},leftLink:{defaultValue:null,description:"",name:"leftLink",required:!1,type:{name:"URL | undefined"}},rightLink:{defaultValue:null,description:"",name:"rightLink",required:!1,type:{name:"URL | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},rightAction:{defaultValue:null,description:"",name:"rightAction",required:!1,type:{name:"(() => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"]={docgenInfo:warningbar.__docgenInfo,name:"warningbar",path:"src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,B0:()=>loanDetailsModalId,bk:()=>reservationDetailsModalId});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/types/loan-type.ts"),_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function reservationDetailsModalId(reservation){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.c6)().reservationDetails)}${String(reservation.identifier||reservation.faust)}`}function loanDetailsModalId(loan){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.c6)().loanDetails)}${(0,_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__.G)(loan)}`}const __WEBPACK_DEFAULT_EXPORT__=({modalId,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)();return modalId?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.A,{modalId,classNames:"modal-details",closeModalAriaLabelText:t("materialDetailsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("materialDetailsModalAriaDescriptionText")},children):null};try{reservationDetailsModalId.displayName="reservationDetailsModalId",reservationDetailsModalId.__docgenInfo={description:"",displayName:"reservationDetailsModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},reservationType:{defaultValue:null,description:"",name:"reservationType",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"string | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"]={docgenInfo:reservationDetailsModalId.__docgenInfo,name:"reservationDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{loanDetailsModalId.displayName="loanDetailsModalId",loanDetailsModalId.__docgenInfo={description:"",displayName:"loanDetailsModalId",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},isRenewable:{defaultValue:null,description:"",name:"isRenewable",required:!0,type:{name:"boolean"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!1,type:{name:"string | null | undefined"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"string | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"]={docgenInfo:loanDetailsModalId.__docgenInfo,name:"loanDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{materialdetailsmodal.displayName="materialdetailsmodal",materialdetailsmodal.__docgenInfo={description:"",displayName:"materialdetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"]={docgenInfo:materialdetailsmodal.__docgenInfo,name:"materialdetailsmodal",path:"src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>material_details});var react=__webpack_require__("./node_modules/react/index.js"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),utils_text=__webpack_require__("./src/core/utils/text.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),StatusMessage=__webpack_require__("./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx");const renew_button=({loanId,renewable,classNames,hideOnMobile,setRenewingStatus,renewingStatus,renewalStatusList,loanType,setRenewingResponse})=>{const t=(0,utils_text.F)(),{track}=(0,useStatistics.B)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.Oc)(),label=(0,renewal.OX)({isRenewable:renewable,renewingStatus,t}),renew=(0,react.useCallback)((renewId=>{setRenewingStatus("pending"),mutate({data:[renewId]},{onSuccess:result=>{result&&(queryClient.invalidateQueries((0,fbs.$4)()),setRenewingResponse(result),setRenewingStatus("success"))},onError:()=>{setRenewingStatus("error")}})}),[mutate,queryClient,setRenewingResponse,setRenewingStatus]);return react.createElement("div",{className:`${hideOnMobile&&"modal-details__buttons--hide-on-mobile"} modal-details__buttons`},react.createElement(StatusMessage.A,{className:"list-materials__status__note-desktop mt-48 mr-16",loanType,renewalStatusList}),react.createElement(Button.$,{dataCy:"material-renew-button",size:"small",variant:"filled",disabled:!renewable||"pending"===renewingStatus,onClick:()=>{track("click",{id:statistics.o.renewSelectedMaterials.id,name:statistics.o.renewSelectedMaterials.name,trackedData:"Forny_valgte_materialer"}),renew(loanId)},classNames,label,buttonType:"none",collapsible:!1}),react.createElement(StatusMessage.A,{className:"list-materials__status__note-mobile mt-8",loanType,renewalStatusList}))};try{renewbutton.displayName="renewbutton",renewbutton.__docgenInfo={description:"",displayName:"renewbutton",props:{loanId:{defaultValue:null,description:"",name:"loanId",required:!0,type:{name:"number"}},renewable:{defaultValue:null,description:"",name:"renewable",required:!0,type:{name:"boolean"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},hideOnMobile:{defaultValue:null,description:"",name:"hideOnMobile",required:!0,type:{name:"boolean"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"idle"'},{value:'"pending"'},{value:'"success"'},{value:'"error"'}]}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string"}},setRenewingResponse:{defaultValue:null,description:"",name:"setRenewingResponse",required:!0,type:{name:"(response: RenewedLoanV2[] | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/renew-button.tsx#renewbutton"]={docgenInfo:renewbutton.__docgenInfo,name:"renewbutton",path:"src/apps/loan-list/modal/renew-button.tsx#renewbutton"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const material_details=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({loan,material,modalId})=>{const[renewingStatus,setRenewingStatus]=(0,react.useState)("idle"),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),t=(0,utils_text.F)(),u=(0,url.Ik)(),ereolenMyPageUrl=u("ereolenMyPageUrl"),viewFeesAndCompensationRatesUrl=u("viewFeesAndCompensationRatesUrl");if(!loan)return null;const{dueDate,faust,loanId,identifier,isRenewable,materialItemNumber,loanDate,loanType,periodical,renewalStatusList}=loan,{authors,materialType,year,title,pid,description,series}=material||{};return react.createElement(react.Fragment,null,!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.A,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId,setRenewingStatus,texts:{successTitleText:t("renewMaterialLoanSuccessTitleText"),successStatusText:t("renewMaterialLoanSuccessStatusText"),noRenewalsPossibleErrorTitleText:t("renewMaterialLoanNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewMaterialLoanNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewMaterialLoanErrorTitleText"),errorStatusText:t("renewMaterialLoanErrorStatusText"),buttonText:t("renewMaterialLoanButtonText")}}),["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-details__container"},react.createElement(modal_details_header.A,{year,authors,title,periodical,series,pid,description,materialType,isbnForCover:identifier||""},dueDate&&react.createElement(status_badge.A,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("materialDetailsOverdueText")})),!(0,helpers.X4)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons modal-details__buttons--hide-on-mobile",loanId,renewable:isRenewable,hideOnMobile:!0,renewingStatus,loanType:loanType||"",setRenewingStatus,setRenewingResponse,renewalStatusList}),(0,helpers.X4)(loan)&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(Link.A,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""}))),dueDate&&(0,general.El)(dueDate)&&react.createElement("div",{className:"modal-details__warning"},react.createElement(warning_bar.A,{leftLink:viewFeesAndCompensationRatesUrl,linkText:t("materialDetailsLinkToPageWithFeesText"),overdueText:t("materialDetailsWarningLoanOverdueText")})),react.createElement("div",{className:"modal-details__list"},dueDate&&!(0,helpers.X4)(loan)&&react.createElement(list_details.A,{icon:Loans_default(),labels:(0,date.Yq)(dueDate),title:t("materialDetailsPhysicalDueDateLabelText")}),dueDate&&(0,helpers.X4)(loan)&&react.createElement(list_details.A,{icon:Loans_default(),labels:(0,date.Yq)(dueDate),title:t("materialDetailsDigitalDueDateLabelText")}),loanDate&&react.createElement(list_details.A,{icon:Reservations_default(),labels:(0,date.Yq)(loanDate),title:t("materialDetailsLoanDateLabelText")}),materialItemNumber&&react.createElement(list_details.A,{icon:Ebook_default(),labels:materialItemNumber,title:t("materialDetailsMaterialNumberLabelText")})),!(0,helpers.X4)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons__full-width",loanId,renewable:isRenewable,hideOnMobile:!1,loanType:loanType||"",renewingStatus,setRenewingStatus,setRenewingResponse,renewalStatusList}),(0,helpers.X4)(loan)&&react.createElement("div",{className:"modal-details__buttons"},react.createElement(Link.A,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small modal-details__buttons__full-width"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))))})));try{materialdetails.displayName="materialdetails",materialdetails.__docgenInfo={description:"",displayName:"materialdetails",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details.tsx#materialdetails"]={docgenInfo:materialdetails.__docgenInfo,name:"materialdetails",path:"src/apps/loan-list/modal/material-details.tsx#materialdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Iw:()=>getStatusText,Qo:()=>materialsAreStacked,VL:()=>loansAreEmpty,V_:()=>getLoanDeliveryDate,X4:()=>isDigital,e8:()=>getStackedItems,nB:()=>getFromListByKey,nZ:()=>removeLoansWithDuplicateDueDate});const removeLoansWithDuplicateDueDate=(date,list)=>list.filter((({dueDate})=>dueDate===date)),loansAreEmpty=list=>Array.isArray(list)&&0===list.length,materialsAreStacked=materialsInStack=>materialsInStack>0,getFromListByKey=(list,key,value)=>list.filter((loan=>String(loan[key])===value)),getStatusText=(status,t)=>{switch(status){case"deniedMaxRenewalsReached":return t("groupModalRenewLoanDeniedMaxRenewalsReachedText");case"deniedReserved":return t("groupModalRenewLoanDeniedReservedText");default:return""}},isDigital=loan=>Boolean(loan.identifier),getStackedItems=(view,list,itemsShown,dueDates)=>{let returnLoans=[];if("stack"===view&&dueDates){let dueDatesCopy=[...dueDates,null];dueDatesCopy=dueDatesCopy.slice(0,itemsShown),dueDatesCopy.forEach((uniqueDueDate=>{returnLoans=returnLoans.concat(list.filter((({dueDate})=>dueDate===uniqueDueDate)))}))}return returnLoans},getLoanDeliveryDate=(loanType,formatDate,t)=>loanType.dueDate?t(isDigital(loanType)?"groupModalDueDateDigitalMaterialText":"groupModalDueDateMaterialText",{placeholders:{"@date":formatDate(loanType.dueDate)}}):""},"./src/apps/material-grid/MaterialGrid.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_card_item_list_MaterialListItem__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_recommended_material_RecommendedMaterial__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/apps/recommended-material/RecommendedMaterial.tsx"),_materiel_grid_util__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/apps/material-grid/materiel-grid-util.ts");const MaterialGrid=({materials,title,description,selectedAmountOfMaterialsForDisplay})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)(),firstNewItemRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),initialMaximumDisplay=_materiel_grid_util__WEBPACK_IMPORTED_MODULE_4__.E[0],maximumCalculatedDisplay=(0,_materiel_grid_util__WEBPACK_IMPORTED_MODULE_4__.i)(materials.length,selectedAmountOfMaterialsForDisplay),moreMaterialsThanInitialMaximum=maximumCalculatedDisplay>initialMaximumDisplay,[currentAmountOfDisplayedMaterials,setCurrentMaterialsDisplayedMaterials]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialMaximumDisplay);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{firstNewItemRef.current&&firstNewItemRef.current.focus()}),[currentAmountOfDisplayedMaterials]);const[showAllMaterials,setShowAllMaterials]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);const titleClasses=(0,clsx__WEBPACK_IMPORTED_MODULE_5__.A)("material-grid__title",{"material-grid__title--no-description":!description});return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid"},(title||description)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__text-wrapper"},title&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:titleClasses},title),description&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"material-grid__description"},description)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"material-grid__items"},materials.slice(0,currentAmountOfDisplayedMaterials).map(((material,index)=>{const{wid,materialType}=material;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_card_item_list_MaterialListItem__WEBPACK_IMPORTED_MODULE_1__.A,{key:wid,ref:index===initialMaximumDisplay?firstNewItemRef:null},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_recommended_material_RecommendedMaterial__WEBPACK_IMPORTED_MODULE_3__.A,{partOfGrid:!0,wid,materialType}))}))),moreMaterialsThanInitialMaximum&&!showAllMaterials&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"material-grid__show-more btn-primary btn-outline btn-medium","data-show-more":!0,"aria-expanded":showAllMaterials?"true":"false",type:"button",onClick:()=>function handleShowAllMaterials(){setCurrentMaterialsDisplayedMaterials(maximumCalculatedDisplay),setShowAllMaterials(!showAllMaterials)}()},t("buttonText")))},__WEBPACK_DEFAULT_EXPORT__=MaterialGrid;try{MaterialGrid.displayName="MaterialGrid",MaterialGrid.__docgenInfo={description:"",displayName:"MaterialGrid",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"MaterialGridItemProps[]"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},selectedAmountOfMaterialsForDisplay:{defaultValue:null,description:"",name:"selectedAmountOfMaterialsForDisplay",required:!0,type:{name:"enum",value:[{value:"20"},{value:"12"},{value:"4"},{value:"8"},{value:"16"},{value:"24"},{value:"28"},{value:"32"}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/MaterialGrid.tsx#MaterialGrid"]={docgenInfo:MaterialGrid.__docgenInfo,name:"MaterialGrid",path:"src/apps/material-grid/MaterialGrid.tsx#MaterialGrid"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/material-grid/MaterialGridSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_recommended_material_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx");const MaterialGridSkeleton=({title})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid"},title&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__title"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__items"},[...Array(4)].map((()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_recommended_material_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_1__.A,{partOfGrid:!0})))))),__WEBPACK_DEFAULT_EXPORT__=MaterialGridSkeleton;try{MaterialGridSkeleton.displayName="MaterialGridSkeleton",MaterialGridSkeleton.__docgenInfo={description:"",displayName:"MaterialGridSkeleton",props:{title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/MaterialGridSkeleton.tsx#MaterialGridSkeleton"]={docgenInfo:MaterialGridSkeleton.__docgenInfo,name:"MaterialGridSkeleton",path:"src/apps/material-grid/MaterialGridSkeleton.tsx#MaterialGridSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/material-grid/automatic/MaterialGridAutomatic.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,Skeleton:()=>Skeleton,default:()=>MaterialGridAutomatic_dev});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),branches=__webpack_require__("./src/core/utils/branches.tsx"),MaterialGrid=__webpack_require__("./src/apps/material-grid/MaterialGrid.tsx"),MaterialGridSkeleton=__webpack_require__("./src/apps/material-grid/MaterialGridSkeleton.tsx");const MaterialGridAutomatic=({cql,title,description,selectedAmountOfMaterialsForDisplay})=>{const cleanBranches=(0,branches.Ay)(),{data,isLoading}=(0,graphql.YP)({cql,offset:0,limit:selectedAmountOfMaterialsForDisplay,filters:{branchId:cleanBranches}});if(isLoading||!data)return react.createElement(MaterialGridSkeleton.A,{title});const materials=data.complexSearch.works.map((work=>({wid:work.workId})));return react.createElement(MaterialGrid.A,{title,materials,description,selectedAmountOfMaterialsForDisplay})},automatic_MaterialGridAutomatic=MaterialGridAutomatic;try{MaterialGridAutomatic.displayName="MaterialGridAutomatic",MaterialGridAutomatic.__docgenInfo={description:"",displayName:"MaterialGridAutomatic",props:{cql:{defaultValue:null,description:"",name:"cql",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},selectedAmountOfMaterialsForDisplay:{defaultValue:null,description:"",name:"selectedAmountOfMaterialsForDisplay",required:!0,type:{name:"enum",value:[{value:"20"},{value:"12"},{value:"4"},{value:"8"},{value:"16"},{value:"24"},{value:"28"},{value:"32"}]}},buttonText:{defaultValue:null,description:"",name:"buttonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/automatic/MaterialGridAutomatic.tsx#MaterialGridAutomatic"]={docgenInfo:MaterialGridAutomatic.__docgenInfo,name:"MaterialGridAutomatic",path:"src/apps/material-grid/automatic/MaterialGridAutomatic.tsx#MaterialGridAutomatic"})}catch(__react_docgen_typescript_loader_error){}const MaterialGridAutomatic_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({cql,title,description,selectedAmountOfMaterialsForDisplay,buttonText})=>react.createElement(guarded_app.A,{app:"material-grid-automatic"},react.createElement(automatic_MaterialGridAutomatic,{cql,title,description,selectedAmountOfMaterialsForDisplay,buttonText}))))));try{MaterialGridAutomaticentry.displayName="MaterialGridAutomaticentry",MaterialGridAutomaticentry.__docgenInfo={description:"",displayName:"MaterialGridAutomaticentry",props:{cql:{defaultValue:null,description:"",name:"cql",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},selectedAmountOfMaterialsForDisplay:{defaultValue:null,description:"",name:"selectedAmountOfMaterialsForDisplay",required:!0,type:{name:"enum",value:[{value:"20"},{value:"12"},{value:"4"},{value:"8"},{value:"16"},{value:"24"},{value:"28"},{value:"32"}]}},buttonText:{defaultValue:null,description:"",name:"buttonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/automatic/MaterialGridAutomatic.entry.tsx#MaterialGridAutomaticentry"]={docgenInfo:MaterialGridAutomaticentry.__docgenInfo,name:"MaterialGridAutomaticentry",path:"src/apps/material-grid/automatic/MaterialGridAutomatic.entry.tsx#MaterialGridAutomaticentry"})}catch(__react_docgen_typescript_loader_error){}const MaterialGridAutomatic_dev={title:"Apps / Material Grid / Automatic",component:MaterialGridAutomatic_entry,argTypes:{title:{name:"Title",defaultValue:"Recommended materials",control:{type:"text"}},description:{name:"Description",defaultValue:"This is a long description of the materials selected, or whatever else you want to put in here",control:{type:"text"}},cql:{name:"CQL Search String",defaultValue:"'heste' OR 'PIPPI'",control:{type:"text"},description:"CQL search string to use for the material grid, search for a result and copy the CQL string from an advanced search"},selectedAmountOfMaterialsForDisplay:{name:"Amount of materials to show",defaultValue:12,control:{type:"select",options:[4,8,12,16,20,24,28,32]}},buttonText:{name:"Button text",defaultValue:"Show all",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A,blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}}}},App=args=>react.createElement(MaterialGridAutomatic_entry,args),Skeleton=(()=>react.createElement(MaterialGridSkeleton.A,null)).bind({})},"./src/apps/material-grid/manual/MaterialGridManual.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,Skeleton:()=>Skeleton,default:()=>MaterialGridManual_dev});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),MaterialGrid=__webpack_require__("./src/apps/material-grid/MaterialGrid.tsx"),materiel_grid_util=__webpack_require__("./src/apps/material-grid/materiel-grid-util.ts");const MaterialGridManual=({materials,title,description})=>{const selectedAmountOfMaterialsForDisplay=(0,materiel_grid_util.i)(materials.length);return react.createElement(MaterialGrid.A,{title,description,materials,selectedAmountOfMaterialsForDisplay})},manual_MaterialGridManual=MaterialGridManual;try{MaterialGridManual.displayName="MaterialGridManual",MaterialGridManual.__docgenInfo={description:"",displayName:"MaterialGridManual",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"MaterialGridItemProps[]"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/manual/MaterialGridManual.tsx#MaterialGridManual"]={docgenInfo:MaterialGridManual.__docgenInfo,name:"MaterialGridManual",path:"src/apps/material-grid/manual/MaterialGridManual.tsx#MaterialGridManual"})}catch(__react_docgen_typescript_loader_error){}const MaterialGridManual_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({materials,title,description})=>{const parsedMaterials=JSON.parse(materials).map((work=>({wid:work.wid,materialType:work.materialType})));return react.createElement(guarded_app.A,{app:"material-grid-manual"},react.createElement(manual_MaterialGridManual,{materials:parsedMaterials,title,description}))}))));try{MaterialGridManualentry.displayName="MaterialGridManualentry",MaterialGridManualentry.__docgenInfo={description:"",displayName:"MaterialGridManualentry",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/manual/MaterialGridManual.entry.tsx#MaterialGridManualentry"]={docgenInfo:MaterialGridManualentry.__docgenInfo,name:"MaterialGridManualentry",path:"src/apps/material-grid/manual/MaterialGridManual.entry.tsx#MaterialGridManualentry"})}catch(__react_docgen_typescript_loader_error){}var MaterialGridSkeleton=__webpack_require__("./src/apps/material-grid/MaterialGridSkeleton.tsx");const MaterialGridManual_dev={title:"Apps / Material Grid / Manual",component:MaterialGridManual_entry,argTypes:{title:{name:"Title",defaultValue:"Recommended materials",control:{type:"text"}},description:{name:"Description",defaultValue:"This is a long description of the materials selected, or whatever else you want to put in here",control:{type:"text"}},buttonText:{name:"Button text",defaultValue:"Show all",control:{type:"text"}},materials:{name:"Materials",defaultValue:JSON.stringify([{wid:"work-of:870970-basis:25660722",materialType:"bog"},{wid:"work-of:870970-basis:22383590",materialType:"e-bog"},{wid:"work-of:870970-basis:25932625",materialType:"film"},{wid:"work-of:870970-basis:26264340",materialType:"musik (online)"},{wid:"work-of:870970-basis:52646251",materialType:"lydbog"},{wid:"work-of:870970-basis:26856353",materialType:"artikel"},{wid:"work-of:870970-basis:27275745",materialType:"tegneserie (online)"},{wid:"work-of:870970-basis:22383590",materialType:"tidsskrift"},{wid:"work-of:870970-basis:29788596",materialType:"cd"},{wid:"work-of:870970-basis:52646251",materialType:"podcast"},{wid:"work-of:870970-basis:50689360",materialType:"film (online)"},{wid:"work-of:870970-basis:22383590",materialType:"lydbog (cd-mp3)"},{wid:"work-of:870970-basis:46510534",materialType:"artikel (online)"},{wid:"work-of:870970-basis:134877804",materialType:"tegneserie"},{wid:"work-of:870970-basis:54129807",materialType:"tidsskrift (online)"},{wid:"work-of:870970-basis:52646251",materialType:"billedbog"},{wid:"work-of:870970-basis:25660722",materialType:"billedbog (online)"},{wid:"work-of:870970-basis:25932625",materialType:"lydbog (online)"},{wid:"work-of:870970-basis:26264340",materialType:"musik (online)"},{wid:"work-of:870970-basis:22383590",materialType:"artikel"},{wid:"work-of:870970-basis:26856353",materialType:"film"},{wid:"work-of:870970-basis:27275745",materialType:"e-bog"},{wid:"work-of:870970-basis:45363899",materialType:"cd"},{wid:"work-of:870970-basis:29788596",materialType:"podcast"},{wid:"work-of:870970-basis:52646251",materialType:"film (online)"},{wid:"work-of:870970-basis:50689360",materialType:"lydbog"},{wid:"work-of:870970-basis:53045650",materialType:"tegneserie (online)"},{wid:"work-of:870970-basis:46510534",materialType:"tidsskrift"},{wid:"work-of:870970-basis:134877804",materialType:"cd"},{wid:"work-of:870970-basis:54129807",materialType:"podcast"},{wid:"work-of:870970-basis:52646251",materialType:"film (online)"}]),control:{type:"array"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A,blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}}}},App=args=>react.createElement(MaterialGridManual_entry,args),Skeleton=(()=>react.createElement(MaterialGridSkeleton.A,null)).bind({})},"./src/apps/material-grid/materiel-grid-util.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E:()=>MaterialGridValidIncrements,i:()=>calculateAmountToDisplay});const MaterialGridValidIncrements=[4,8,12,16,20,24,28,32];function calculateAmountToDisplay(availableAmount,selectedAmount){if(selectedAmount&&availableAmount>=selectedAmount)return selectedAmount;return[...MaterialGridValidIncrements].reverse().find((increment=>increment<=availableAmount))||MaterialGridValidIncrements[0]}},"./src/apps/material-search/MaterialSearch.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithPreviouslySelectedValues:()=>WithPreviouslySelectedValues,default:()=>MaterialSearch_dev,materialWithInvalidType:()=>materialWithInvalidType,materialWithInvalidWorkId:()=>materialWithInvalidWorkId});var react=__webpack_require__("./node_modules/react/index.js"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),icon_warning=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg"),icon_warning_default=__webpack_require__.n(icon_warning);const MaterialSearchBaseError=({headingText,children})=>react.createElement("div",{className:"material-search__error"},react.createElement("div",{className:"material-search__error-header"},react.createElement("img",{src:icon_warning_default(),className:"material-search__error-icon",alt:""}),react.createElement("h3",{className:"material-search__error-header-text"},headingText)),children),Errors_MaterialSearchBaseError=MaterialSearchBaseError;try{MaterialSearchBaseError.displayName="MaterialSearchBaseError",MaterialSearchBaseError.__docgenInfo={description:"",displayName:"MaterialSearchBaseError",props:{headingText:{defaultValue:null,description:"",name:"headingText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/MaterialSearchBaseError.tsx#MaterialSearchBaseError"]={docgenInfo:MaterialSearchBaseError.__docgenInfo,name:"MaterialSearchBaseError",path:"src/apps/material-search/Errors/MaterialSearchBaseError.tsx#MaterialSearchBaseError"})}catch(__react_docgen_typescript_loader_error){}const HiddenInputsNotFoundError=()=>{const t=(0,utils_text.F)();return react.createElement(Errors_MaterialSearchBaseError,{headingText:t("materialSearchErrorHiddenInputsNotFoundHeadingText")},react.createElement("div",{className:"material-search__error-content"},react.createElement("p",{className:"material-search__error-description"},t("materialSearchErrorHiddenInputsNotFoundDescriptionText"))))},Errors_HiddenInputsNotFoundError=HiddenInputsNotFoundError;try{HiddenInputsNotFoundError.displayName="HiddenInputsNotFoundError",HiddenInputsNotFoundError.__docgenInfo={description:"",displayName:"HiddenInputsNotFoundError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/HiddenInputsNotFoundError.tsx#HiddenInputsNotFoundError"]={docgenInfo:HiddenInputsNotFoundError.__docgenInfo,name:"HiddenInputsNotFoundError",path:"src/apps/material-search/Errors/HiddenInputsNotFoundError.tsx#HiddenInputsNotFoundError"})}catch(__react_docgen_typescript_loader_error){}var ErrorState=function(ErrorState){return ErrorState.NoError="NoError",ErrorState.WorkError="WorkError",ErrorState.MaterialTypeError="MaterialTypeError",ErrorState.hiddenInputsNotFoundError="hiddenInputsNotFoundError",ErrorState}(ErrorState||{});const Errors_errorState=ErrorState,MaterialSearchInputs=({searchInput,setSearchInput,availableMaterialTypes,selectedMaterialType,handleUpdateMaterialType,work,uniqueIdentifier})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"material-search__inputs-container"},react.createElement("label",{className:"material-search__label",htmlFor:"material-search-input"},t("materialSearchSearchInputText"),react.createElement("input",{id:`material-search-input-${uniqueIdentifier}`,type:"search",value:searchInput,onChange:e=>setSearchInput(e.target.value),placeholder:t("materialSearchSearchInputPlaceholderText"),className:"material-search__input"})),react.createElement("label",{className:"material-search__label",htmlFor:"material-type-selector"},t("materialSearchMaterialTypeSelectorText"),react.createElement("select",{id:`material-type-selector-${uniqueIdentifier}`,className:"material-search__selector",disabled:!work||!availableMaterialTypes||0===availableMaterialTypes.length,onChange:e=>handleUpdateMaterialType(e.target.value),value:selectedMaterialType||""},react.createElement("option",{value:"",disabled:!0},t("materialSearchMaterialTypeSelectorNoneOptionText")),availableMaterialTypes&&availableMaterialTypes.map((type=>react.createElement("option",{key:type,value:type},type))))))},material_search_MaterialSearchInputs=MaterialSearchInputs;try{MaterialSearchInputs.displayName="MaterialSearchInputs",MaterialSearchInputs.__docgenInfo={description:"",displayName:"MaterialSearchInputs",props:{searchInput:{defaultValue:null,description:"",name:"searchInput",required:!0,type:{name:"string"}},setSearchInput:{defaultValue:null,description:"",name:"setSearchInput",required:!0,type:{name:"(value: string) => void"}},availableMaterialTypes:{defaultValue:null,description:"",name:"availableMaterialTypes",required:!0,type:{name:"ManifestationMaterialType[] | null"}},selectedMaterialType:{defaultValue:null,description:"",name:"selectedMaterialType",required:!0,type:{name:"ManifestationMaterialType | null"}},handleUpdateMaterialType:{defaultValue:null,description:"",name:"handleUpdateMaterialType",required:!0,type:{name:"(newValue: ManifestationMaterialType) => void"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work | null"}},uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchInputs.tsx#MaterialSearchInputs"]={docgenInfo:MaterialSearchInputs.__docgenInfo,name:"MaterialSearchInputs",path:"src/apps/material-search/MaterialSearchInputs.tsx#MaterialSearchInputs"})}catch(__react_docgen_typescript_loader_error){}var cover=__webpack_require__("./src/components/cover/cover.tsx"),reload_logo_black=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/reload_logo_black.svg"),reload_logo_black_default=__webpack_require__.n(reload_logo_black);const MaterialSearchLoading=({loadingText})=>react.createElement("div",{className:"material-search__loading"},react.createElement("img",{src:reload_logo_black_default(),alt:"",className:"material-search__loading-spinner"}),react.createElement("span",{className:"material-search__loading-text"},loadingText)),material_search_MaterialSearchLoading=MaterialSearchLoading;try{MaterialSearchLoading.displayName="MaterialSearchLoading",MaterialSearchLoading.__docgenInfo={description:"",displayName:"MaterialSearchLoading",props:{loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchLoading.tsx#MaterialSearchLoading"]={docgenInfo:MaterialSearchLoading.__docgenInfo,name:"MaterialSearchLoading",path:"src/apps/material-search/MaterialSearchLoading.tsx#MaterialSearchLoading"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts"),useIntersection=__webpack_require__("./node_modules/react-use/esm/useIntersection.js"),useKeyPressEvent=__webpack_require__("./node_modules/react-use/esm/useKeyPressEvent.js");const useInfiteScrollLoading=({data,loadMore,hitCount,onWorkIdSelect})=>{const containerRef=(0,react.useRef)(null),lastItemRef=(0,react.useRef)(null),lastItemFocusRef=(0,react.useRef)(null),handleScroll=(0,react.useCallback)((()=>{if(containerRef.current){const{scrollTop,scrollHeight,clientHeight}=containerRef.current;scrollTop+clientHeight>=scrollHeight-5&&data.length{const currentContainer=containerRef.current;return currentContainer&¤tContainer.addEventListener("scroll",handleScroll),()=>{currentContainer&¤tContainer.removeEventListener("scroll",handleScroll)}}),[handleScroll]);const intersection=(0,useIntersection.A)(lastItemRef,{root:containerRef.current,rootMargin:"0px",threshold:1});(0,react.useEffect)((()=>{intersection&&1===intersection.intersectionRatio&&data.length{lastItemFocusRef.current&&(e.preventDefault(),onWorkIdSelect(lastItemFocusRef.current.dataset.workId))}),[onWorkIdSelect]);(0,useKeyPressEvent.A)("Enter",handleKeySelect),(0,useKeyPressEvent.A)(" ",handleKeySelect),(0,useKeyPressEvent.A)("Tab",(()=>{lastItemFocusRef.current&&loadMore()}));const handleFocus=(0,react.useCallback)(((index,itemRef)=>{index===data.length-1?lastItemFocusRef.current=itemRef:lastItemFocusRef.current=null}),[data.length]);return(0,react.useEffect)((()=>{lastItemFocusRef.current&&lastItemFocusRef.current.focus()}),[data]),{containerRef,lastItemRef,handleFocus}},material_search_MaterialSearchList=({data,isLoading,onWorkIdSelect,selectedWorkId,loadMore,hitCount})=>{const t=(0,utils_text.F)(),{containerRef,lastItemRef,handleFocus}=useInfiteScrollLoading({data,isLoading,loadMore,hitCount,onWorkIdSelect});return isLoading&&0===data.length?react.createElement("div",{className:"material-search-list"},react.createElement("div",{className:"material-search-list__header"}),react.createElement("ul",{className:"material-search-list__results"},react.createElement("li",{className:"material-search-list__loading"},react.createElement(material_search_MaterialSearchLoading,{loadingText:t("materialSearchLoadingText")})))):data&&0!==data.length?react.createElement("div",{className:"material-search-list",ref:containerRef},react.createElement("div",{className:"material-search-list__header"},t("materialSearchAmountOfResultsText"),":",react.createElement("span",null,hitCount)),react.createElement("ol",{className:"material-search-list__results"},data.map(((work,index)=>{const authors=(0,general.UV)(work.creators),isLastItem=index===data.length-1;return react.createElement("li",{className:"material-search-list__item "+(selectedWorkId===work.workId?"material-search-list__item--highlighted":""),key:work.workId,ref:isLastItem?lastItemRef:null},react.createElement("button",{className:"material-search-list__button",type:"button",tabIndex:0,onClick:e=>{e.preventDefault(),onWorkIdSelect(work.workId)},onFocus:e=>handleFocus(index,e.currentTarget),"aria-label":t("materialSearchAriaButtonSelectWorkWithText",{placeholders:{"@title":`${work.titles.full}`}})},react.createElement(cover.Y,{size:"large",displaySize:"2xsmall",ids:[work.manifestations.bestRepresentation.pid],animate:!0}),react.createElement("div",null,react.createElement("div",{className:"material-search-list__detail-item"},react.createElement("span",{className:"material-search-list__term"},t("materialSearchPreviewTitleText"),":"),react.createElement("span",{className:"material-search-list__detail"},work.titles.full)),react.createElement("div",{className:"material-search-list__detail-item"},react.createElement("span",{className:"material-search-list__term"},t("materialSearchPreviewAuthorText"),":"),react.createElement("span",{className:"material-search-list__detail"},authors)))))})),isLoading&&react.createElement("li",{className:"material-search-list__loading"},react.createElement(material_search_MaterialSearchLoading,{loadingText:t("materialSearchLoadingText")})))):null};try{MaterialSearchList.displayName="MaterialSearchList",MaterialSearchList.__docgenInfo={description:"",displayName:"MaterialSearchList",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:'{ __typename?: "Work" | undefined; workId: string; abstract?: string[] | null | undefined; genreAndForm: string[]; titles: { __typename?: "WorkTitles" | undefined; full: string[]; original?: string[] | null | undefined; }; ... 4 more ...; manifestations: { ...; }; }[]'}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},onWorkIdSelect:{defaultValue:null,description:"",name:"onWorkIdSelect",required:!0,type:{name:"(workId: `work-of:${number}-${string}:${string}`) => void"}},selectedWorkId:{defaultValue:null,description:"",name:"selectedWorkId",required:!1,type:{name:"string | undefined"}},loadMore:{defaultValue:null,description:"",name:"loadMore",required:!0,type:{name:"() => void"}},hitCount:{defaultValue:null,description:"",name:"hitCount",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchList.tsx#MaterialSearchList"]={docgenInfo:MaterialSearchList.__docgenInfo,name:"MaterialSearchList",path:"src/apps/material-search/MaterialSearchList.tsx#MaterialSearchList"})}catch(__react_docgen_typescript_loader_error){}var helper=__webpack_require__("./src/apps/material/helper.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const MaterialTypeNotFoundError=({work:{titles:{full:fullTitle},creators,workId:wid}})=>{const u=(0,utils_url.Ik)(),t=(0,utils_text.F)(),materialUrl=u("materialUrl"),url=(0,helpers_url.Qj)(materialUrl,wid),authors=(0,general.sP)((0,general.UV)(creators),t);return react.createElement(Errors_MaterialSearchBaseError,{headingText:t("materialSearchErrorHeaderText")},react.createElement("div",{className:"material-search__error-content"},react.createElement("p",{className:"material-search__error-description"},t("materialSearchErrorMaterialTypeNotFoundText")),react.createElement("div",{className:"material-search__error-material-content"},react.createElement("div",{className:"material-search__error-item"},react.createElement("span",{className:"material-search__error-term"},t("materialSearchErrorTitleText"),":"),react.createElement("span",{className:"material-search__error-detail"},fullTitle)),react.createElement("div",{className:"material-search__error-item"},react.createElement("span",{className:"material-search__error-term"},t("materialSearchErrorAuthorText"),":"),react.createElement("span",{className:"material-search__error-detail"},authors)),react.createElement("div",{className:"material-search__error-item"},react.createElement("span",{className:"material-search__error-term"},t("materialSearchErrorLinkText"),":"),react.createElement("a",{href:url.href,target:"_blank",className:"material-search__error-link",rel:"noreferrer noopener"},url.href)))))},Errors_MaterialTypeNotFoundError=MaterialTypeNotFoundError;try{MaterialTypeNotFoundError.displayName="MaterialTypeNotFoundError",MaterialTypeNotFoundError.__docgenInfo={description:"",displayName:"MaterialTypeNotFoundError",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/MaterialTypeNotFoundError.tsx#MaterialTypeNotFoundError"]={docgenInfo:MaterialTypeNotFoundError.__docgenInfo,name:"MaterialTypeNotFoundError",path:"src/apps/material-search/Errors/MaterialTypeNotFoundError.tsx#MaterialTypeNotFoundError"})}catch(__react_docgen_typescript_loader_error){}const WorkNotFoundError=()=>{const t=(0,utils_text.F)();return react.createElement(Errors_MaterialSearchBaseError,{headingText:t("materialSearchErrorHeaderText")},react.createElement("div",{className:"material-search__error-content"},react.createElement("p",{className:"material-search__error-description"},t("materialSearchErrorWorkNotFoundText"))))},Errors_WorkNotFoundError=WorkNotFoundError;try{WorkNotFoundError.displayName="WorkNotFoundError",WorkNotFoundError.__docgenInfo={description:"",displayName:"WorkNotFoundError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/WorkNotFoundError.tsx#WorkNotFoundError"]={docgenInfo:WorkNotFoundError.__docgenInfo,name:"WorkNotFoundError",path:"src/apps/material-search/Errors/WorkNotFoundError.tsx#WorkNotFoundError"})}catch(__react_docgen_typescript_loader_error){}const MaterialSearchPreview=({work,selectedMaterialType,isLoading,errorState})=>{var _materialForDisplay$e,_materialForDisplay$e2;const t=(0,utils_text.F)(),[materialForDisplay,setMaterialForDisplay]=(0,react.useState)(null);if((0,react.useEffect)((()=>{if(!work)return;if(!selectedMaterialType)return void setMaterialForDisplay(work.manifestations.bestRepresentation);const manifestation=(0,helper.xb)(work,selectedMaterialType);setMaterialForDisplay(manifestation)}),[work,selectedMaterialType]),isLoading)return react.createElement("div",{className:"material-search__preview"},react.createElement("div",{className:"material-search__preview-loading"},react.createElement(material_search_MaterialSearchLoading,{loadingText:t("materialSearchLoadingText")})));if(errorState===Errors_errorState.WorkError)return react.createElement(Errors_WorkNotFoundError,null);if(work&&errorState===Errors_errorState.MaterialTypeError)return react.createElement(Errors_MaterialTypeNotFoundError,{work});if(!work||!materialForDisplay)return react.createElement("div",{className:"material-search__preview"},react.createElement("div",{className:"material-search__preview-empty"},t("materialSearchNoMaterialSelectedText")));const author=(0,general.sP)((0,general.UV)(work.creators),t);return react.createElement("div",{className:"material-search__preview"},react.createElement("div",{className:"material-search__preview-material"},react.createElement(cover.Y,{ids:[materialForDisplay.pid],size:"large",displaySize:"small",animate:!0,alt:`Cover for ${materialForDisplay.titles.main}`,shadow:"small"}),react.createElement("div",null,react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewTitleText"),":"),react.createElement("span",{className:"material-search__preview-detail"},materialForDisplay.titles.main)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewAuthorText"),":"),react.createElement("span",{className:"material-search__preview-detail"},author)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewPublicationYearText"),":"),react.createElement("span",{className:"material-search__preview-detail"},null===(_materialForDisplay$e=materialForDisplay.edition)||void 0===_materialForDisplay$e||null===(_materialForDisplay$e2=_materialForDisplay$e.publicationYear)||void 0===_materialForDisplay$e2?void 0:_materialForDisplay$e2.display)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewSourceText"),":"),react.createElement("span",{className:"material-search__preview-detail"},materialForDisplay.source)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewWorkIdText"),":"),react.createElement("span",{className:"material-search__preview-detail"},work.workId)))))},material_search_MaterialSearchPreview=MaterialSearchPreview;try{MaterialSearchPreview.displayName="MaterialSearchPreview",MaterialSearchPreview.__docgenInfo={description:"",displayName:"MaterialSearchPreview",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work | null"}},selectedMaterialType:{defaultValue:null,description:"",name:"selectedMaterialType",required:!0,type:{name:"ManifestationMaterialType | null"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},errorState:{defaultValue:null,description:"",name:"errorState",required:!0,type:{name:"enum",value:[{value:'"NoError"'},{value:'"WorkError"'},{value:'"MaterialTypeError"'},{value:'"hiddenInputsNotFoundError"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchPreview.tsx#MaterialSearchPreview"]={docgenInfo:MaterialSearchPreview.__docgenInfo,name:"MaterialSearchPreview",path:"src/apps/material-search/MaterialSearchPreview.tsx#MaterialSearchPreview"})}catch(__react_docgen_typescript_loader_error){}var graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const material_search_useGetMaterialListSearch=()=>{const[state,setState]=(0,react.useState)({searchInput:"",page:1}),[searchListData,setSearchListData]=(0,react.useState)([]),[hitCount,setHitCount]=(0,react.useState)(0),{searchInput,page}=state,queryVariables={q:{all:searchInput},offset:10*(page-1),limit:10},{data,isLoading}=(0,graphql.KG)(queryVariables);(0,react.useEffect)((()=>{var _data$search;null!=data&&null!==(_data$search=data.search)&&void 0!==_data$search&&_data$search.works&&(setSearchListData((prevData=>1===page?data.search.works:[...prevData,...data.search.works])),setHitCount(data.search.hitcount))}),[data,page]);return{searchListData,isLoading,searchInput,setSearchInput:(0,react.useCallback)((input=>{setState({searchInput:input,page:1})}),[]),loadMore:(0,react.useCallback)((()=>{setState((prevState=>({...prevState,page:prevState.page+1})))}),[]),hitCount}},material_search_useGetSelectedWork=()=>{const[selectedWorkId,setSelectedWorkId]=(0,react.useState)(""),[selectedMaterialType,setSelectedMaterialType]=(0,react.useState)(null),[errorState,setErrorState]=(0,react.useState)(Errors_errorState.NoError),{data,isLoading:isSelectedWorkLoading,refetch}=(0,graphql.RR)({wid:selectedWorkId},{enabled:!!selectedWorkId&&selectedWorkId.length>0,onSuccess:responseData=>{if(responseData.work){if(selectedMaterialType&&responseData.work){const work=responseData.work,availableMaterialTypes=work?(0,general.JB)(work.manifestations.all,!1):null;if(availableMaterialTypes&&!availableMaterialTypes.includes(selectedMaterialType))return void setErrorState(Errors_errorState.MaterialTypeError)}setErrorState(Errors_errorState.NoError)}else setErrorState(Errors_errorState.WorkError)}});(0,react.useEffect)((()=>{selectedWorkId&&refetch()}),[selectedWorkId,selectedMaterialType,refetch]);const work=(null==data?void 0:data.work)??null;return{work,availableMaterialTypes:work?(0,general.JB)(work.manifestations.all,!1):null,selectedWorkId,setSelectedMaterialType,isSelectedWorkLoading,setSelectedWorkId,selectedMaterialType,errorState}},useGetHiddenInputs=uniqueIdentifier=>{const[workIdElement,setWorkIdElement]=(0,react.useState)(null),[materialTypeElement,setMaterialTypeElement]=(0,react.useState)(null),[errorState,setErrorState]=(0,react.useState)(Errors_errorState.NoError);return(0,react.useEffect)((()=>{const workElement=document.querySelector(`[data-field-input-work-id="${uniqueIdentifier}"]`),materialElement=document.querySelector(`[data-field-input-material-type-id="${uniqueIdentifier}"]`);workElement?setWorkIdElement(workElement):(console.debug(`Could not find input for work ID with unique identifier: ${uniqueIdentifier}`),setErrorState(Errors_errorState.hiddenInputsNotFoundError)),materialElement?setMaterialTypeElement(materialElement):(console.debug(`Could not find input for material type with unique identifier: ${uniqueIdentifier}`),setErrorState(Errors_errorState.hiddenInputsNotFoundError)),workElement&&materialElement&&setErrorState(Errors_errorState.NoError)}),[uniqueIdentifier]),{workIdElement,materialTypeElement,errorState}},material_search_useGetHiddenInputs=useGetHiddenInputs;try{useGetHiddenInputs.displayName="useGetHiddenInputs",useGetHiddenInputs.__docgenInfo={description:"",displayName:"useGetHiddenInputs",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/useGetHiddenInputs.tsx#useGetHiddenInputs"]={docgenInfo:useGetHiddenInputs.__docgenInfo,name:"useGetHiddenInputs",path:"src/apps/material-search/useGetHiddenInputs.tsx#useGetHiddenInputs"})}catch(__react_docgen_typescript_loader_error){}const material_search_useUpdateFields=({updateSelectedWorkId,updateSelectedMaterialType,uniqueIdentifier})=>{const workIdRef=(0,react.useRef)(null),materialTypeRef=(0,react.useRef)(null);(0,react.useEffect)((()=>{workIdRef.current=document.querySelector(`[data-field-input-work-id="${uniqueIdentifier}"]`),materialTypeRef.current=document.querySelector(`[data-field-input-material-type-id="${uniqueIdentifier}"]`)}),[uniqueIdentifier]);const updateInputValue=(0,react.useCallback)(((inputElement,newValue)=>{if(inputElement){return inputElement.value=newValue,!0}return console.debug(`Could not find input element to update with ID: ${uniqueIdentifier}`),!1}),[uniqueIdentifier]);return{handleUpdateWorkId:(0,react.useCallback)((wid=>{const workIdUpdateSuccess=updateInputValue(workIdRef.current,`${wid}`),materialTypeUpdateSuccess=updateInputValue(materialTypeRef.current,"");workIdUpdateSuccess&&materialTypeUpdateSuccess&&(updateSelectedWorkId(wid),updateSelectedMaterialType(null))}),[updateInputValue,updateSelectedWorkId,updateSelectedMaterialType]),handleUpdateMaterialType:(0,react.useCallback)((newValue=>{updateInputValue(materialTypeRef.current,newValue)&&updateSelectedMaterialType(newValue)}),[updateInputValue,updateSelectedMaterialType])}},MaterialSearch=({uniqueIdentifier})=>{const{availableMaterialTypes,work,isSelectedWorkLoading,selectedWorkId,setSelectedWorkId,selectedMaterialType,setSelectedMaterialType,errorState}=material_search_useGetSelectedWork(),{searchInput,setSearchInput,searchListData,isLoading:isSearchResultsLoading,hitCount,loadMore}=material_search_useGetMaterialListSearch(),{handleUpdateWorkId,handleUpdateMaterialType}=material_search_useUpdateFields({updateSelectedWorkId:setSelectedWorkId,updateSelectedMaterialType:setSelectedMaterialType,uniqueIdentifier}),{workIdElement,materialTypeElement,errorState:hiddenInputErrorState}=material_search_useGetHiddenInputs(uniqueIdentifier);return(0,react.useEffect)((()=>{workIdElement&&workIdElement.value&&setSelectedWorkId(null==workIdElement?void 0:workIdElement.value),materialTypeElement&&materialTypeElement.value&&setSelectedMaterialType(null==materialTypeElement?void 0:materialTypeElement.value)}),[workIdElement,materialTypeElement,setSelectedWorkId,setSelectedMaterialType]),hiddenInputErrorState===Errors_errorState.hiddenInputsNotFoundError?react.createElement(Errors_HiddenInputsNotFoundError,null):react.createElement("div",{className:"material-search"},react.createElement(material_search_MaterialSearchInputs,{searchInput,setSearchInput,availableMaterialTypes,selectedMaterialType,handleUpdateMaterialType,work,uniqueIdentifier}),react.createElement(material_search_MaterialSearchPreview,{work,isLoading:isSelectedWorkLoading,selectedMaterialType,errorState}),react.createElement(material_search_MaterialSearchList,{data:searchListData,isLoading:isSearchResultsLoading,onWorkIdSelect:id=>handleUpdateWorkId(id),selectedWorkId,loadMore,hitCount}))},material_search_MaterialSearch=MaterialSearch;try{MaterialSearch.displayName="MaterialSearch",MaterialSearch.__docgenInfo={description:"",displayName:"MaterialSearch",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.tsx#MaterialSearch"]={docgenInfo:MaterialSearch.__docgenInfo,name:"MaterialSearch",path:"src/apps/material-search/MaterialSearch.tsx#MaterialSearch"})}catch(__react_docgen_typescript_loader_error){}const MaterialSearch_entry=(0,config.NV)((0,utils_url.nU)((0,utils_text.i)((({uniqueIdentifier})=>react.createElement(material_search_MaterialSearch,{uniqueIdentifier})))));try{MaterialSearchentry.displayName="MaterialSearchentry",MaterialSearchentry.__docgenInfo={description:"",displayName:"MaterialSearchentry",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.entry.tsx#MaterialSearchentry"]={docgenInfo:MaterialSearchentry.__docgenInfo,name:"MaterialSearchentry",path:"src/apps/material-search/MaterialSearch.entry.tsx#MaterialSearchentry"})}catch(__react_docgen_typescript_loader_error){}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;ereact.createElement("div",{className:"material-search"},react.createElement("span",null,"Input fields only shown in storybook. They are used to reflect how the hidden workId and materialType fields are updated."),react.createElement("div",{className:"material-search__inputs-container"},react.createElement("label",{className:"material-search__label",htmlFor:"material-search-input"},"Work id",react.createElement("input",{"data-field-input-work-id":uniqueIdentifier,type:"text",placeholder:"Enter search terms",className:"material-search__input",tabIndex:-1,defaultValue:defaultWorkId})),react.createElement("label",{className:"material-search__label",htmlFor:"material-type-selector"},"Material type",react.createElement("input",{"data-field-input-material-type-id":uniqueIdentifier,type:"text",className:"material-search__selector",tabIndex:-1,defaultValue:defaultMaterialType}))),react.createElement(MaterialSearch_entry,_extends({uniqueIdentifier},args))),MaterialSearch_dev={title:"Apps / Material Search",component:MaterialSearchHiddenInputs,argTypes:{uniqueIdentifier:{defaultValue:uniqueIdentifierValue,control:{type:"number"}},previouslySelectedWorkId:{defaultValue:"work-of:800010-katalog:99122475830405763",control:{type:"text"}},previouslySelectedMaterialType:{defaultValue:"lydbog (cd-mp3)",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialSearchSearchInputText:{defaultValue:"Search for material",control:{type:"text"}},materialSearchMaterialTypeSelectorText:{defaultValue:"Select material type",control:{type:"text"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:"Select material type",control:{type:"text"}},materialSearchNoMaterialSelectedText:{defaultValue:"No material selected",control:{type:"text"}},materialSearchPreviewTitle:{defaultValue:"Title",control:{type:"text"}},materialSearchPreviewAuthor:{defaultValue:"Author",control:{type:"text"}},materialSearchPreviewPublicationYear:{defaultValue:"Publication year",control:{type:"text"}},materialSearchPreviewSource:{defaultValue:"Source",control:{type:"text"}},materialSearchPreviewWorkId:{defaultValue:"Work ID",control:{type:"text"}},materialSearchLoadingText:{defaultValue:"Loading...",control:{type:"text"}},materialSearchAmountOfResultsText:{defaultValue:"Amount of hits",control:{type:"text"}},materialSearchNoResultsText:{defaultValue:"No results",control:{type:"text"}},materialSearchAriaButtonSelectWorkWithText:{defaultValue:"Select work with title @title",control:{type:"text"}},materialSearchSearchInputPlaceholderText:{defaultValue:"Enter search terms",control:{type:"text"}},materialSearchPreviewTitleText:{defaultValue:"Title",control:{type:"text"}},materialSearchPreviewAuthorText:{defaultValue:"Author",control:{type:"text"}},materialSearchPreviewPublicationYearText:{defaultValue:"Publication year",control:{type:"text"}},materialSearchPreviewSourceText:{defaultValue:"Source",control:{type:"text"}},materialSearchPreviewWorkIdText:{defaultValue:"Work ID",control:{type:"text"}},materialSearchErrorTitleText:{defaultValue:"Title",control:{type:"text"}},materialSearchErrorAuthorText:{defaultValue:"Author",control:{type:"text"}},materialSearchErrorLinkText:{defaultValue:"Link",control:{type:"text"}},materialSearchErrorHeaderText:{defaultValue:"This material needs to be updated.",control:{type:"text"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:"The currently selected type of the material is no longer available in the system. As a result of this, the link is likely broken. Use the title or link underneath to find and update the material and its type, or replace / delete it.",control:{type:"text"}},materialSearchErrorWorkNotFoundText:{defaultValue:"The material that was previously selected is no longer available in the system. Either delete this entry or search for a new material to replace it.",control:{type:"text"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:"Error retrieving saved data. Inputs not found.",control:{type:"text"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:"Something went wrong when trying to find the previously saved values. Please try again. If the problem persists, something could be wrong with the app.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A,...globalConfigArgs.A}},createStory=(defaultWorkId,defaultMaterialType)=>args=>react.createElement(MaterialSearchHiddenInputs,_extends({defaultWorkId,defaultMaterialType},args)),Default=createStory("",""),WithPreviouslySelectedValues=createStory("work-of:800010-katalog:99122475830405763","lydbog (cd-mp3)"),materialWithInvalidType=createStory("work-of:800010-katalog:99122475830405763","invalid-type"),materialWithInvalidWorkId=createStory("invalid-work-id","lydbog (cd-mp3)");try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/apps/material-search/MaterialSearch.dev.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{WithPreviouslySelectedValues.displayName="WithPreviouslySelectedValues",WithPreviouslySelectedValues.__docgenInfo={description:"",displayName:"WithPreviouslySelectedValues",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#WithPreviouslySelectedValues"]={docgenInfo:WithPreviouslySelectedValues.__docgenInfo,name:"WithPreviouslySelectedValues",path:"src/apps/material-search/MaterialSearch.dev.tsx#WithPreviouslySelectedValues"})}catch(__react_docgen_typescript_loader_error){}try{materialWithInvalidType.displayName="materialWithInvalidType",materialWithInvalidType.__docgenInfo={description:"",displayName:"materialWithInvalidType",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidType"]={docgenInfo:materialWithInvalidType.__docgenInfo,name:"materialWithInvalidType",path:"src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidType"})}catch(__react_docgen_typescript_loader_error){}try{materialWithInvalidWorkId.displayName="materialWithInvalidWorkId",materialWithInvalidWorkId.__docgenInfo={description:"",displayName:"materialWithInvalidWorkId",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidWorkId"]={docgenInfo:materialWithInvalidWorkId.__docgenInfo,name:"materialWithInvalidWorkId",path:"src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidWorkId"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/material/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Zh:()=>divideManifestationsByMaterialType,Xf:()=>filterManifestationsByType,AC:()=>getAllIdentifiers,QL:()=>getAvailability,SL:()=>getBestMaterialTypeForWork,We:()=>getBlacklistedQueryArgs,$0:()=>getDbcVerifiedSubjectsFirst,nW:()=>getDetailsListData,oj:()=>getFirstBookManifestation,LX:()=>getInfomediaIds,DH:()=>getManifestationAudience,x4:()=>getManifestationAuthors,xb:()=>getManifestationBasedOnType,v9:()=>getManifestationContributors,jC:()=>getManifestationEdition,f$:()=>getManifestationGenreAndForm,L_:()=>getManifestationIsbn,PG:()=>getManifestationLanguageIsoCode,gG:()=>getManifestationLanguages,TU:()=>getManifestationMaterialTypes,KA:()=>getManifestationNotes,n5:()=>getManifestationNumberOfPages,ub:()=>getManifestationOriginalTitle,mI:()=>getManifestationPhysicalDescription,Zs:()=>getManifestationPublisher,Cb:()=>getManifestationSource,zi:()=>getManifestationsOrderByTypeAndYear,w2:()=>getNumberedSeries,Rr:()=>getTotalHoldings,_i:()=>getTotalReservations,d8:()=>getUniqueMovies,XX:()=>isAnyManifestationAvailableOnBranch,E1:()=>isParallelReservation,bE:()=>reservationModalId,Uc:()=>totalAvailableMaterials,CL:()=>totalBranchesHaveMaterial,us:()=>useGetHoldings});var uniqBy=__webpack_require__("./node_modules/lodash/uniqBy.js"),uniqBy_default=__webpack_require__.n(uniqBy),uniq=__webpack_require__("./node_modules/lodash/uniq.js"),uniq_default=__webpack_require__.n(uniq),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),first=__webpack_require__("./node_modules/lodash/first.js"),first_default=__webpack_require__.n(first),compact=__webpack_require__("./node_modules/lodash/compact.js"),compact_default=__webpack_require__.n(compact),MaterialDetailsList=__webpack_require__("./src/components/material/MaterialDetailsList.tsx"),helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const getManifestationsOrderByTypeAndYear=manifestations=>{const orderedByYear=(0,general.Sy)(manifestations),materialsMappedBytype=groupBy_default()(orderedByYear,(m=>{var _m$materialTypes$;return(null==m||null===(_m$materialTypes$=m.materialTypes[0])||void 0===_m$materialTypes$?void 0:_m$materialTypes$.materialTypeSpecific.display)??"unknown"}));return Object.keys(materialsMappedBytype).sort().reduce(((acc,key)=>[...acc,...materialsMappedBytype[key]]),[])},filterManifestationsByType=(type,manifestations)=>manifestations.filter((item=>(0,general.VZ)([item])===type)),getManifestationPlayingTime=manifestation=>{var _manifestation$physic,_manifestation$physic2;return(null===(_manifestation$physic=manifestation.physicalDescriptions)||void 0===_manifestation$physic||null===(_manifestation$physic2=_manifestation$physic[0])||void 0===_manifestation$physic2?void 0:_manifestation$physic2.playingTime)??""},getManifestationEdition=manifestation=>{var _manifestation$editio;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary)??""},getManifestationGenreAndForm=manifestation=>manifestation.genreAndForm.join(" / ")??"",getManifestationPublisher=manifestation=>manifestation.publisher.join(" / ")??"",getManifestationMaterialTypes=manifestation=>{var _manifestation$materi,_manifestation$materi2;return(null===(_manifestation$materi=manifestation.materialTypes)||void 0===_manifestation$materi||null===(_manifestation$materi2=_manifestation$materi[0].materialTypeSpecific)||void 0===_manifestation$materi2?void 0:_manifestation$materi2.display)??""},getManifestationNumberOfPages=manifestation=>{var _manifestation$physic3,_manifestation$physic4,_manifestation$physic5;return null!==(_manifestation$physic3=manifestation.physicalDescriptions)&&void 0!==_manifestation$physic3&&null!==(_manifestation$physic4=_manifestation$physic3[0])&&void 0!==_manifestation$physic4&&_manifestation$physic4.numberOfPages?String(null===(_manifestation$physic5=manifestation.physicalDescriptions)||void 0===_manifestation$physic5?void 0:_manifestation$physic5[0].numberOfPages):""},getManifestationAudience=(manifestation,t)=>{var _manifestation$audien,_manifestation$audien2,_manifestation$audien3;const generalAudience=(null===(_manifestation$audien=manifestation.audience)||void 0===_manifestation$audien?void 0:_manifestation$audien.generalAudience[0])??"",agesDisplay=(null===(_manifestation$audien2=manifestation.audience)||void 0===_manifestation$audien2||null===(_manifestation$audien3=_manifestation$audien2.ages[0])||void 0===_manifestation$audien3?void 0:_manifestation$audien3.display)??"",formattedAges=agesDisplay?t("detailsListAgeRangeText",{placeholders:{"@ageRange":agesDisplay}}):"";return generalAudience&&formattedAges?`${generalAudience}, ${formattedAges}`:generalAudience||formattedAges},getManifestationIsbn=manifestation=>{var _manifestation$identi,_manifestation$identi2;return(null===(_manifestation$identi=manifestation.identifiers)||void 0===_manifestation$identi||null===(_manifestation$identi2=_manifestation$identi[0])||void 0===_manifestation$identi2?void 0:_manifestation$identi2.value)??""},getManifestationSource=manifestation=>manifestation.source??"",getManifestationLanguages=manifestation=>{var _languages$notes,_languages$main;const{languages}=manifestation;if(null!=languages&&null!==(_languages$notes=languages.notes)&&void 0!==_languages$notes&&_languages$notes.length)return languages.notes.join(", ");return(null==languages||null===(_languages$main=languages.main)||void 0===_languages$main?void 0:_languages$main.map((language=>language.display)).join(", "))??""},getManifestationLanguageIsoCode=manifestations=>{var _head2;const mainLanguages=manifestations.map((({languages})=>languages)).flatMap((language=>null==language?void 0:language.main)),uniqueLanguagesWithIsoCode=uniqBy_default()(mainLanguages,"isoCode"),uniqIsoCode=1===uniqueLanguagesWithIsoCode.length&&(null===(_head2=head_default()(uniqueLanguagesWithIsoCode))||void 0===_head2?void 0:_head2.isoCode);if(uniqIsoCode)return uniqIsoCode},getManifestationOriginalTitle=manifestation=>{var _manifestation$titles,_manifestation$titles2;return(null===(_manifestation$titles=manifestation.titles)||void 0===_manifestation$titles||null===(_manifestation$titles2=_manifestation$titles.original)||void 0===_manifestation$titles2?void 0:_manifestation$titles2[0])??""},getManifestationContributors=manifestation=>manifestation.contributors.map((contributor=>{if(contributor.roles.length>0){const roleNames=contributor.roles.map((role=>role.function.singular)).join(", ");return`${contributor.display} (${roleNames})`}return contributor.display})).join(" / ")??"",getManifestationAuthors=manifestation=>(0,general.UV)(manifestation.creators).join(", ")??"",getManifestationNotes=manifestation=>{var _manifestation$notes,_manifestation$notes$,_manifestation$notes$2;return(null===(_manifestation$notes=manifestation.notes)||void 0===_manifestation$notes||null===(_manifestation$notes$=_manifestation$notes[0])||void 0===_manifestation$notes$||null===(_manifestation$notes$2=_manifestation$notes$.display)||void 0===_manifestation$notes$2?void 0:_manifestation$notes$2.join(", "))??""},getManifestationPhysicalDescription=manifestation=>{var _manifestation$physic6,_manifestation$physic7;return(null===(_manifestation$physic6=manifestation.physicalDescriptions)||void 0===_manifestation$physic6||null===(_manifestation$physic7=_manifestation$physic6[0])||void 0===_manifestation$physic7?void 0:_manifestation$physic7.summary)??""},getManifestationHostPublication=manifestation=>{var _manifestation$hostPu;return(null===(_manifestation$hostPu=manifestation.hostPublication)||void 0===_manifestation$hostPu?void 0:_manifestation$hostPu.summary)??""},getManifestationParts=manifestation=>{var _manifestation$manife,_manifestation$manife2;return(null===(_manifestation$manife=manifestation.manifestationParts)||void 0===_manifestation$manife||null===(_manifestation$manife2=_manifestation$manife.parts)||void 0===_manifestation$manife2?void 0:_manifestation$manife2.map((item=>item.title)))||""},getDetailsListData=({manifestation,work,t})=>{const workFirstEditionYear=(work=>{var _work$workYear;return null!==(_work$workYear=work.workYear)&&void 0!==_work$workYear&&_work$workYear.year?String(work.workYear.year):""})(work),fallBackManifestation=((work,type)=>work.manifestations[type])(work,"bestRepresentation");return[{label:t("detailsListLanguageText"),value:getManifestationLanguages(manifestation??fallBackManifestation)},{label:t("detailsListPlayTimeText"),value:getManifestationPlayingTime(manifestation??fallBackManifestation)},{label:t("detailsListEditionText"),value:getManifestationEdition(manifestation??fallBackManifestation)},{label:t("detailsListGenreAndFormText"),value:getManifestationGenreAndForm(manifestation??fallBackManifestation)},{label:t("detailsListOriginalTitleText"),value:getManifestationOriginalTitle(manifestation??fallBackManifestation)},{label:t("detailsListPublisherText"),value:getManifestationPublisher(manifestation??fallBackManifestation)},{label:t("detailsListFirstEditionYearText"),value:workFirstEditionYear},{label:t("detailsListTypeText"),value:getManifestationMaterialTypes(manifestation??fallBackManifestation)},{label:t("detailsListContributorsText"),value:getManifestationContributors(manifestation??fallBackManifestation)},{label:t("detailsListScopeText"),value:getManifestationNumberOfPages(manifestation??fallBackManifestation)},{label:t("detailsListAudienceText"),value:getManifestationAudience(manifestation??fallBackManifestation,t)},{label:t("detailsListPhysicalDescriptionText"),value:getManifestationPhysicalDescription(manifestation??fallBackManifestation)},{label:t("detailsListHostPublicationText"),value:getManifestationHostPublication(manifestation??fallBackManifestation)},{label:t("detailsListPartsText"),value:getManifestationParts(manifestation??fallBackManifestation),type:MaterialDetailsList.w.List}]},getTotalHoldings=holdings=>holdings.reduce(((acc,curr)=>acc+curr.holdings.reduce(((accumulator,current)=>accumulator+current.materials.length),0)),0),getTotalReservations=holdings=>holdings.reduce(((acc,curr)=>acc+curr.reservations),0),totalAvailableMaterials=materials=>materials.reduce(((acc,curr)=>curr.available?acc+1:acc),0),isAnyManifestationAvailableOnBranch=libraryBranches=>libraryBranches.some((libraryBranch=>libraryBranch.holding.materials.some((material=>material.available)))),totalBranchesHaveMaterial=manifestationHoldings=>manifestationHoldings.filter((branchManifestationHoldings=>isAnyManifestationAvailableOnBranch(branchManifestationHoldings))).length,getInfomediaIds=manifestations=>{const infomediaIds=manifestations.map((manifestation=>manifestation.access.map((currentAccess=>"InfomediaService"===currentAccess.__typename?currentAccess.id:null)))).flat();return compact_default()(infomediaIds)},divideManifestationsByMaterialType=manifestations=>manifestations.reduce(((result,manifestation)=>{var _manifestation$materi3;if(!manifestation.materialTypes.length||null===(_manifestation$materi3=manifestation.materialTypes[0].materialTypeSpecific)||void 0===_manifestation$materi3||!_manifestation$materi3.display)return result;const type=manifestation.materialTypes[0].materialTypeSpecific.display;return{...result,[type]:[...result[type]??[],manifestation]}}),{}),getAllIdentifiers=manifestations=>manifestations.map((manifestation=>manifestation.identifiers.map((identifier=>identifier.value)))).flat(),getFirstBookManifestation=manifestations=>{const dividedManifestations=divideManifestationsByMaterialType(manifestations);return first_default()(dividedManifestations[material_type.sN.book])??null},isABook=manifestations=>manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>materialType.materialTypeSpecific.display.toLowerCase()===material_type.sN.book)))),getBestMaterialTypeForManifestation=manifestation=>isABook([manifestation])?material_type.sN.book:manifestation.materialTypes[0].materialTypeSpecific.display,getBestMaterialTypeForWork=work=>{return work.manifestations.bestRepresentation?getBestMaterialTypeForManifestation(work.manifestations.bestRepresentation):work.manifestations.latest?getBestMaterialTypeForManifestation(work.manifestations.latest):work.manifestations.first?getBestMaterialTypeForManifestation(work.manifestations.first):isABook(work.manifestations.all)?material_type.sN.book:(manifestations=work.manifestations.all,manifestations.filter((manifestation=>manifestation.materialTypes.length>0)))[0].materialTypes[0].materialTypeSpecific.display;var manifestations},reservationModalId=faustIds=>(0,modal_helpers.Q0)("reservation-modal",faustIds.sort()),getNumberedSeries=series=>series.filter((seriesEntry=>{var _seriesEntry$numberIn;return null===(_seriesEntry$numberIn=seriesEntry.numberInSeries)||void 0===_seriesEntry$numberIn?void 0:_seriesEntry$numberIn.number})),getUniqueMovies=relations=>{const movies=relations.hasAdaptation.filter((item=>item.ownerWork.workTypes.includes(graphql.CY.Movie)));return uniqBy_default()(movies,(item=>item.ownerWork.workId))},getDbcVerifiedSubjectsFirst=subjects=>uniq_default()([...subjects.dbcVerified.map((item=>item.display)),...subjects.all.map((item=>item.display))]),isParallelReservation=manifestations=>manifestations.length>1&&(0,helper.D7)(graphql.cs.Physical,manifestations)&&!(0,helper.BG)(manifestations),getBlacklistedQueryArgs=(faustIds,config,blacklist)=>{const configKey={availability:"blacklistedAvailabilityBranchesConfig",pickup:"blacklistedPickupBranchesConfig",both:"blacklistedAvailabilityBranchesConfig"};let blacklistBranches=config(configKey[blacklist],{transformer:"stringToArray"});if("both"===blacklist){const additionalBlacklistBranches=config(configKey.pickup,{transformer:"stringToArray"});blacklistBranches=blacklistBranches.concat(additionalBlacklistBranches)}return{recordid:faustIds,...blacklistBranches?{exclude:blacklistBranches}:{}}},getAvailability=async({faustIds,config})=>(0,fbs.PC)(getBlacklistedQueryArgs(faustIds,config,"availability")),useGetHoldings=({faustIds,config,useAvailabilityBlacklist=!1,options})=>{const blacklistedBranches=useAvailabilityBlacklist?"both":"pickup",{data,isLoading,isError}=(0,fbs.pF)(getBlacklistedQueryArgs(faustIds,config,blacklistedBranches),options);return{data,isLoading,isError}},getManifestationBasedOnType=(work,materialType)=>{const{bestRepresentation,all}=work.manifestations;if(materialType===getManifestationMaterialTypes(bestRepresentation))return bestRepresentation;const sortedManifestations=getManifestationsOrderByTypeAndYear(all),filteredAndSortedManifestations=filterManifestationsByType(materialType,sortedManifestations),newestFilteredAndSortedManifestation=first_default()(filteredAndSortedManifestations);return newestFilteredAndSortedManifestation||bestRepresentation}},"./src/apps/material/material.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Digital:()=>Digital,Dinosaurierfedern:()=>Dinosaurierfedern,EBogBlaTitle:()=>EBogBlaTitle,EBogPrinsenHarry:()=>EBogPrinsenHarry,HarryPotter:()=>HarryPotter,Infomedia:()=>Infomedia,InstantLoan:()=>material_dev_InstantLoan,LangePeter:()=>LangePeter,Periodical:()=>Periodical,TurenGårTilRom:()=>TurenGårTilRom,Underverden:()=>Underverden,default:()=>material_dev,digitalArticle:()=>digitalArticle,globalMaterial:()=>globalMaterial,inLargeSameSeriesAndIrregularFaustId:()=>inLargeSameSeriesAndIrregularFaustId,onlyOneEdition:()=>onlyOneEdition,overbygningsMatriale:()=>overbygningsMatriale});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),Create=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Create.svg"),Create_default=__webpack_require__.n(Create),Receipt=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Receipt.svg"),Receipt_default=__webpack_require__.n(Receipt),Various=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Various.svg"),Various_default=__webpack_require__.n(Various),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx"),TextInput=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),ReservationForm=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx");const DigitalModalBody=({userEmail,handleSubmit,isLoading})=>{const t=(0,utils_text.F)(),[email,setEmail]=(0,react.useState)(userEmail);return react.createElement(ReservationForm.A,{cyData:"order-digital",title:t("orderDigitalCopyTitleText"),description:[t("orderDigitalCopyDescriptionText")],onSubmit:()=>{handleSubmit(email)},buttonLabel:t(isLoading?"orderDigitalCopyButtonLoadingText":"orderDigitalCopyButtonText"),disabledButton:isLoading},react.createElement(TextInput.A,{type:"email",label:t("orderDigitalCopyEmailLabelText"),id:"email-order-digital-copy",value:email,onChange:setEmail}))},digital_modal_DigitalModalBody=DigitalModalBody;try{DigitalModalBody.displayName="DigitalModalBody",DigitalModalBody.__docgenInfo={description:"",displayName:"DigitalModalBody",props:{userEmail:{defaultValue:null,description:"",name:"userEmail",required:!0,type:{name:"string"}},handleSubmit:{defaultValue:null,description:"",name:"handleSubmit",required:!0,type:{name:"(email: string) => void"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"]={docgenInfo:DigitalModalBody.__docgenInfo,name:"DigitalModalBody",path:"src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"})}catch(__react_docgen_typescript_loader_error){}const DigitalModalFeedback=({modalId,feedbackMessage})=>{const t=(0,utils_text.F)(),{close}=(0,modal.X)();return react.createElement(ReservationForm.A,{cyData:"order-digital-feedback",title:t("orderDigitalCopyFeedbackTitleText"),description:[feedbackMessage??""],onSubmit:()=>close(modalId),buttonLabel:t("orderDigitalCopyFeedbackButtonText")})},digital_modal_DigitalModalFeedback=DigitalModalFeedback;try{DigitalModalFeedback.displayName="DigitalModalFeedback",DigitalModalFeedback.__docgenInfo={description:"",displayName:"DigitalModalFeedback",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},feedbackMessage:{defaultValue:null,description:"",name:"feedbackMessage",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"]={docgenInfo:DigitalModalFeedback.__docgenInfo,name:"DigitalModalFeedback",path:"src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"})}catch(__react_docgen_typescript_loader_error){}const createDigitalModalId=id=>`digital-modal-${id}`;var user=__webpack_require__("./src/core/utils/helpers/user.ts"),usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const DigitalModal=({pid,workId})=>{const modalId=createDigitalModalId(pid),t=(0,utils_text.F)(),[userEmail,setUserEmail]=(0,react.useState)(null),{track}=(0,useStatistics.B)(),{mutate:articleOrder,isLoading:articleOrderLoading,data:articleResponse}=(0,graphql.Dp)(),responseMessage=((articleResponse,t)=>articleResponse?Object.values(graphql.nm).reduce(((acc,current)=>{return{...acc,[current]:t(`orderDigitalCopyFeedback${string=current,string.toLowerCase().split("_").map((word=>word.charAt(0).toUpperCase()+word.slice(1))).join("")}Text`)};var string}),{})[articleResponse.elba.placeCopyRequest.status]:null)(articleResponse,t),{data:patronData}=(0,usePatronData.I)();return(0,react.useEffect)((()=>{var _patronData$patron;patronData&&(null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.emailAddress?setUserEmail(patronData.patron.emailAddress):setUserEmail(""))}),[patronData]),(0,user.ok)()?null:react.createElement(modal.A,{modalId,screenReaderModalDescriptionText:t("orderDigitalCopyModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("orderDigitalCopyModalCloseModalAriaLabelText")},responseMessage?react.createElement(digital_modal_DigitalModalFeedback,{modalId,feedbackMessage:responseMessage}):null!==userEmail&&react.createElement(digital_modal_DigitalModalBody,{userEmail,handleSubmit:email=>{articleOrder({input:{pid,userMail:email}},{onSuccess:()=>{track("click",{id:statistics.o.reservation.id,name:statistics.o.reservation.name,trackedData:workId})}})},isLoading:articleOrderLoading}))},digital_modal_DigitalModal=DigitalModal;try{DigitalModal.displayName="DigitalModal",DigitalModal.__docgenInfo={description:"",displayName:"DigitalModal",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"]={docgenInfo:DigitalModal.__docgenInfo,name:"DigitalModal",path:"src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"})}catch(__react_docgen_typescript_loader_error){}var infomedia_logo=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/infomedia-logo.svg"),infomedia_logo_default=__webpack_require__.n(infomedia_logo);const InfomediaModalBody=({headline,text})=>react.createElement("article",{className:"infomedia-article"},react.createElement("img",{className:"infomedia-logo",src:infomedia_logo_default(),alt:""}),react.createElement("h2",null,headline),react.createElement("div",{dangerouslySetInnerHTML:{__html:text}})),infomedia_InfomediaModalBody=InfomediaModalBody;try{InfomediaModalBody.displayName="InfomediaModalBody",InfomediaModalBody.__docgenInfo={description:"",displayName:"InfomediaModalBody",props:{headline:{defaultValue:null,description:"",name:"headline",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"]={docgenInfo:InfomediaModalBody.__docgenInfo,name:"InfomediaModalBody",path:"src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"})}catch(__react_docgen_typescript_loader_error){}const InfomediaSkeleton=()=>react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line"})),infomedia_InfomediaSkeleton=InfomediaSkeleton;try{InfomediaSkeleton.displayName="InfomediaSkeleton",InfomediaSkeleton.__docgenInfo={description:"",displayName:"InfomediaSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"]={docgenInfo:InfomediaSkeleton.__docgenInfo,name:"InfomediaSkeleton",path:"src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"})}catch(__react_docgen_typescript_loader_error){}const infomediaModalId=pid=>`infomedia-modal-${pid}`,InfomediaModal=({selectedManifestations,infoMediaId})=>{const t=(0,utils_text.F)(),[shouldFetchData,setShouldFetchData]=(0,react.useState)(!1),[infomediaData,setInfomediaData]=(0,react.useState)(null),{data:patronData,isLoading:isLoadingPatron}=(0,usePatronData.I)();(0,react.useEffect)((()=>{var _patronData$patron;void 0!==(null==patronData||null===(_patronData$patron=patronData.patron)||void 0===_patronData$patron?void 0:_patronData$patron.resident)&&setShouldFetchData(patronData.patron.resident)}),[patronData]);const{data,error,isLoading:isLoadingInfomedia}=(0,graphql.ET)({id:infoMediaId},{enabled:shouldFetchData,onSuccess:response=>{var _response$infomedia,_response$infomedia$a,_response$infomedia2,_response$infomedia2$;const infomedia={headline:null==response||null===(_response$infomedia=response.infomedia)||void 0===_response$infomedia||null===(_response$infomedia$a=_response$infomedia.article)||void 0===_response$infomedia$a?void 0:_response$infomedia$a.headLine,text:null==response||null===(_response$infomedia2=response.infomedia)||void 0===_response$infomedia2||null===(_response$infomedia2$=_response$infomedia2.article)||void 0===_response$infomedia2$?void 0:_response$infomedia2$.text};setInfomediaData(infomedia)}});return!data||error?null:react.createElement(modal.A,{modalId:infomediaModalId(selectedManifestations[0].pid),screenReaderModalDescriptionText:t("infomediaModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("infomediaModalCloseModalAriaLabelText"),dataCy:"infomedia-modal"},isLoadingPatron||isLoadingInfomedia&&react.createElement(infomedia_InfomediaSkeleton,null),(null==infomediaData?void 0:infomediaData.headline)&&(null==infomediaData?void 0:infomediaData.text)&&react.createElement(infomedia_InfomediaModalBody,{headline:infomediaData.headline,text:infomediaData.text}))},infomedia_InfomediaModal=InfomediaModal;try{infomediaModalId.displayName="infomediaModalId",infomediaModalId.__docgenInfo={description:"",displayName:"infomediaModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"]={docgenInfo:infomediaModalId.__docgenInfo,name:"infomediaModalId",path:"src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"})}catch(__react_docgen_typescript_loader_error){}try{InfomediaModal.displayName="InfomediaModal",InfomediaModal.__docgenInfo={description:"",displayName:"InfomediaModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},infoMediaId:{defaultValue:null,description:"",name:"infoMediaId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"]={docgenInfo:InfomediaModal.__docgenInfo,name:"InfomediaModal",path:"src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"})}catch(__react_docgen_typescript_loader_error){}var material_buttons_helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),material_helper=__webpack_require__("./src/apps/material/helper.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts");const MaterialDescription=({work})=>{const{itemRef,hasBeenVisible:showItem}=(0,lazy_load.H)(),t=(0,utils_text.F)(),u=(0,url.Ik)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{fictionNonfiction,series,subjects,seriesMembers,relations,dk5MainEntry}=work,isFiction=(0,general.G)(work),seriesList=(0,material_helper.w2)(series),seriesMembersList=seriesMembers.map((item=>({url:(0,helpers_url.Qj)(materialUrl,item.workId),term:item.titles.main[0]}))),subjectsList=(0,material_helper.$0)(subjects).map((item=>({url:(0,helpers_url.zy)(searchUrl,item),term:item}))),filmAdaptationsList=(0,material_helper.d8)(relations).map((item=>({url:(0,helpers_url.Qj)(materialUrl,item.ownerWork.workId),term:item.ownerWork.titles.main[0]}))),fictionNonfictionList=fictionNonfiction?[{url:(0,helpers_url.zy)(searchUrl,fictionNonfiction.display),term:fictionNonfiction.display}]:[];return react.createElement("section",{ref:itemRef,className:"material-description","data-cy":"material-description"},showItem&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 pb-24"},t("descriptionHeadlineText")),work.abstract&&react.createElement("p",{className:"text-body-large material-description__content"},work.abstract[0]),react.createElement("div",{className:"material-description__links mt-32"},!isFiction&&dk5MainEntry&&react.createElement(HorizontalTermLine.A,{title:t("subjectNumberText"),linkList:[{url:(0,helpers_url.zy)(searchUrl,dk5MainEntry.display),term:dk5MainEntry.display}]}),seriesList.map(((item,i)=>{var _item$numberInSeries;return react.createElement(HorizontalTermLine.A,{title:`${t("numberDescriptionText")} ${null===(_item$numberInSeries=item.numberInSeries)||void 0===_item$numberInSeries?void 0:_item$numberInSeries.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.zy)(searchUrl,item.title),term:item.title}],dataCy:`material-description-series-${i}`})})),react.createElement(HorizontalTermLine.A,{title:t("inSameSeriesText"),linkList:seriesMembersList,dataCy:"material-description-series-members"}),react.createElement(HorizontalTermLine.A,{title:t("identifierText"),linkList:subjectsList,dataCy:"material-description-identifier"}),react.createElement(HorizontalTermLine.A,{title:t("fictionNonfictionText"),linkList:fictionNonfictionList,dataCy:"material-description-fiction-nonfiction"}),react.createElement(HorizontalTermLine.A,{title:t("filmAdaptationsText"),linkList:filmAdaptationsList,dataCy:"material-description-film-adaptations"}))))},material_MaterialDescription=MaterialDescription;try{MaterialDescription.displayName="MaterialDescription",MaterialDescription.__docgenInfo={description:"",displayName:"MaterialDescription",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDescription.tsx#MaterialDescription"]={docgenInfo:MaterialDescription.__docgenInfo,name:"MaterialDescription",path:"src/components/material/MaterialDescription.tsx#MaterialDescription"})}catch(__react_docgen_typescript_loader_error){}var MaterialDetailsList=__webpack_require__("./src/components/material/MaterialDetailsList.tsx"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const MaterialAvailabilityTextParagraph=({children})=>react.createElement("p",{className:"mt-16 text-small-caption"},children),generic_MaterialAvailabilityTextParagraph=MaterialAvailabilityTextParagraph;try{MaterialAvailabilityTextParagraph.displayName="MaterialAvailabilityTextParagraph",MaterialAvailabilityTextParagraph.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextParagraph",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"]={docgenInfo:MaterialAvailabilityTextParagraph.__docgenInfo,name:"MaterialAvailabilityTextParagraph",path:"src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"})}catch(__react_docgen_typescript_loader_error){}var material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const MaterialAvailabilityTextOnline=({isbns,materialType})=>{var _loansData$userData,_loansData$userData2,_productsData$product;const t=(0,utils_text.F)(),{data:productsData}=(0,publizon.wK)(isbns[0]),{data:libraryProfileData}=(0,publizon.PF)(),{data:loansData}=(0,publizon.VM)();if(!libraryProfileData||!loansData||!productsData)return null;const totalEbookLoans=null==loansData||null===(_loansData$userData=loansData.userData)||void 0===_loansData$userData?void 0:_loansData$userData.totalEbookLoans,totalAudioLoans=null==loansData||null===(_loansData$userData2=loansData.userData)||void 0===_loansData$userData2?void 0:_loansData$userData2.totalAudioLoans,{maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioLoansPerBorrower}=libraryProfileData,availabilityTextMap={[material_type.sN.ebook]:{text:"onlineLimitMonthEbookInfoText",count:totalEbookLoans,limit:maxConcurrentEbookLoansPerBorrower},[material_type.sN.audioBook]:{text:"onlineLimitMonthAudiobookInfoText",count:totalAudioLoans,limit:maxConcurrentAudioLoansPerBorrower},materialIsIncluded:{text:"materialIsIncludedText"}},availabilityText=(({type,map,t})=>{if(!map||!map[type])return null;const{text,count,limit}=map[type];return void 0===count&&void 0===limit&&text?t(text):void 0!==count&&void 0!==limit&&void 0!==text?t(text,{placeholders:{"@count":count,"@limit":limit}}):null})({type:null!==(_productsData$product=productsData.product)&&void 0!==_productsData$product&&_productsData$product.costFree?"materialIsIncluded":materialType,map:availabilityTextMap,t});return react.createElement(generic_MaterialAvailabilityTextParagraph,null,availabilityText)},online_MaterialAvailabilityTextOnline=MaterialAvailabilityTextOnline;try{MaterialAvailabilityTextOnline.displayName="MaterialAvailabilityTextOnline",MaterialAvailabilityTextOnline.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextOnline",props:{isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"enum",value:[{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"]={docgenInfo:MaterialAvailabilityTextOnline.__docgenInfo,name:"MaterialAvailabilityTextOnline",path:"src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"})}catch(__react_docgen_typescript_loader_error){}const StockAndReservationInfo=({stockCount,reservationCount,numberInQueue})=>{const t=(0,utils_text.F)(),materialsInStockInfoText=t("materialsInStockInfoText",{count:stockCount,placeholders:{"@count":stockCount}}),materialReservationInfoText=t("materialReservationInfoText",{count:reservationCount,placeholders:{"@count":reservationCount||0}}),numberInQueueText=!!numberInQueue&&t("numberInQueueText",{placeholders:{"@number":numberInQueue}});return react.createElement(react.Fragment,null,numberInQueueText&&`${numberInQueueText} `,materialsInStockInfoText&&`${materialsInStockInfoText} `,!!reservationCount&&materialReservationInfoText)},material_StockAndReservationInfo=StockAndReservationInfo;try{StockAndReservationInfo.displayName="StockAndReservationInfo",StockAndReservationInfo.__docgenInfo={description:"",displayName:"StockAndReservationInfo",props:{stockCount:{defaultValue:null,description:"",name:"stockCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!1,type:{name:"number | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"]={docgenInfo:StockAndReservationInfo.__docgenInfo,name:"StockAndReservationInfo",path:"src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityTextPhysical=({pids})=>{const config=(0,utils_config.UK)(),faustIds=(0,general.OH)(pids),{data,isLoading,isError}=(0,material_helper.us)({faustIds,config});if(isLoading||isError||!data)return null;const holdings=(0,material_helper.Rr)(data),reservations=(0,material_helper._i)(data);return react.createElement(generic_MaterialAvailabilityTextParagraph,null,react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations}))},physical_MaterialAvailabilityTextPhysical=MaterialAvailabilityTextPhysical;try{MaterialAvailabilityTextPhysical.displayName="MaterialAvailabilityTextPhysical",MaterialAvailabilityTextPhysical.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextPhysical",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${string}`[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"]={docgenInfo:MaterialAvailabilityTextPhysical.__docgenInfo,name:"MaterialAvailabilityTextPhysical",path:"src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"})}catch(__react_docgen_typescript_loader_error){}const useReservableFromAnotherLibrary=manifestations=>{const config=(0,utils_config.UK)(),{data:holdingsData}=(0,material_helper.us)({faustIds:(0,general.bn)(manifestations),useAvailabilityBlacklist:!0,config});if(null!=holdingsData&&holdingsData.some((({reservable})=>!0===reservable)))return{reservablePidsFromAnotherLibrary:[],materialIsReservableFromAnotherLibrary:!1};const reservablePidsFromAnotherLibrary=manifestations.filter((({catalogueCodes})=>null==catalogueCodes?void 0:catalogueCodes.otherCatalogues.some((code=>code.startsWith("OVE"))))).map((({pid})=>pid));return{reservablePidsFromAnotherLibrary,materialIsReservableFromAnotherLibrary:Boolean(reservablePidsFromAnotherLibrary.length)}},utils_useReservableFromAnotherLibrary=useReservableFromAnotherLibrary;try{useReservableFromAnotherLibrary.displayName="useReservableFromAnotherLibrary",useReservableFromAnotherLibrary.__docgenInfo={description:"",displayName:"useReservableFromAnotherLibrary",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useReservableFromAnotherLibrary.tsx#useReservableFromAnotherLibrary"]={docgenInfo:useReservableFromAnotherLibrary.__docgenInfo,name:"useReservableFromAnotherLibrary",path:"src/core/utils/useReservableFromAnotherLibrary.tsx#useReservableFromAnotherLibrary"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityText=({manifestations})=>{const t=(0,utils_text.F)(),materialType=head_default()((0,general.JB)(manifestations)),isbns=(0,material_helper.AC)(manifestations),{materialIsReservableFromAnotherLibrary}=utils_useReservableFromAnotherLibrary(manifestations);if((0,material_buttons_helper.D7)(graphql.cs.Physical,manifestations)){const pids=(0,general.Y5)(manifestations);return materialIsReservableFromAnotherLibrary?react.createElement(generic_MaterialAvailabilityTextParagraph,null,t("reservableFromAnotherLibraryText")):react.createElement(physical_MaterialAvailabilityTextPhysical,{pids})}return(0,material_buttons_helper.D7)(graphql.cs.Online,manifestations)&&isbns.length>0&&materialType?react.createElement(online_MaterialAvailabilityTextOnline,{isbns,materialType}):null},MaterialAvailabilityText_MaterialAvailabilityText=MaterialAvailabilityText;try{MaterialAvailabilityText.displayName="MaterialAvailabilityText",MaterialAvailabilityText.__docgenInfo={description:"",displayName:"MaterialAvailabilityText",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"]={docgenInfo:MaterialAvailabilityText.__docgenInfo,name:"MaterialAvailabilityText",path:"src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"})}catch(__react_docgen_typescript_loader_error){}var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const MaterialHeaderText=({title,author,languageIsoCode,materialTitleId})=>{const t=(0,utils_text.F)(),searchUrl=(0,url.Ik)()("searchUrl");return react.createElement(react.Fragment,null,react.createElement("h1",{id:materialTitleId,lang:languageIsoCode,className:"text-header-h1 mb-16"},title),author&&react.createElement("p",{"data-cy":"material-header-author-text",className:"text-body-large"},react.createElement("span",null,t("materialHeaderAuthorByText")," "),react.createElement(LinkNoStyle.A,{url:(0,helpers_url.zy)(searchUrl,author),className:"arrow__link"},author)))},material_MaterialHeaderText=MaterialHeaderText;try{MaterialHeaderText.displayName="MaterialHeaderText",MaterialHeaderText.__docgenInfo={description:"",displayName:"MaterialHeaderText",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string"}},languageIsoCode:{defaultValue:null,description:"",name:"languageIsoCode",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"]={docgenInfo:MaterialHeaderText.__docgenInfo,name:"MaterialHeaderText",path:"src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"})}catch(__react_docgen_typescript_loader_error){}var InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx");const MaterialButtonDisabled=({label,reason,size,dataCy="material-header-buttons-cant-reserve"})=>react.createElement(react.Fragment,null,react.createElement(Button.$,{label,buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy}),reason&&react.createElement("p",{className:"text-small-caption mt-16",role:"alert"},reason)),generic_MaterialButtonDisabled=MaterialButtonDisabled;try{MaterialButtonDisabled.displayName="MaterialButtonDisabled",MaterialButtonDisabled.__docgenInfo={description:"",displayName:"MaterialButtonDisabled",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},reason:{defaultValue:null,description:"",name:"reason",required:!1,type:{name:"string | undefined"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-header-buttons-cant-reserve"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"]={docgenInfo:MaterialButtonDisabled.__docgenInfo,name:"MaterialButtonDisabled",path:"src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonOnlineDigitalArticle=({pid,size,dataCy="material-button-online-digital-article"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),[isUserResident,setIsUserResident]=(0,react.useState)(null),{isLoading,data:userData}=(0,usePatronData.I)(),{openGuarded}=(0,modal.X)();(0,useDeepCompareEffect.A)((()=>{userData&&userData.patron&&setIsUserResident((0,user.vn)(null==userData?void 0:userData.patron))}),[userData]);return isLoading?react.createElement(MaterialButtonLoading.A,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{label:t("cantViewText"),reason:t("notLivingInMunicipalityText"),size}):react.createElement(Button.$,{label:t("orderDigitalCopyButtonText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:createDigitalModalId(pid)})},dataCy})},online_MaterialButtonOnlineDigitalArticle=MaterialButtonOnlineDigitalArticle;try{MaterialButtonOnlineDigitalArticle.displayName="MaterialButtonOnlineDigitalArticle",MaterialButtonOnlineDigitalArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineDigitalArticle",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button-online-digital-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"]={docgenInfo:MaterialButtonOnlineDigitalArticle.__docgenInfo,name:"MaterialButtonOnlineDigitalArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"})}catch(__react_docgen_typescript_loader_error){}var dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const MaterialButtonOnlineExternal=({externalUrl="",origin,size,trackOnlineView,manifestations,dataCy="material-button-online-external",ariaLabelledBy})=>{const[translatedUrl,setTranslatedUrl]=(0,react.useState)(new URL(externalUrl)),[urlWasTranslated,setUrlWasTranslated]=(0,react.useState)(null),t=(0,utils_text.F)(),{data,error}=(0,dpl_cms.vS)({url:externalUrl},{enabled:null===urlWasTranslated&&externalUrl.length>0});(0,react.useEffect)((()=>{setTranslatedUrl(new URL(externalUrl)),setUrlWasTranslated(null)}),[externalUrl]),(0,react.useEffect)((()=>{var _data$data;!1===urlWasTranslated&&!error&&null!=data&&null!==(_data$data=data.data)&&void 0!==_data$data&&_data$data.url&&(setTranslatedUrl(new URL(data.data.url)),setUrlWasTranslated(!0))}),[data,error,urlWasTranslated]);return react.createElement(LinkButton.A,{url:translatedUrl,buttonType:"external-link",variant:"filled",size:size||"large",iconClassNames:"invert",trackClick:trackOnlineView,dataCy,ariaLabelledBy},((sourceName,materialTypes)=>{const onlineMaterialType=((sourceName,materialTypes)=>sourceName.toLowerCase().includes("ereol")?"ebook":sourceName.toLowerCase().includes("filmstriben")?"emovie":materialTypes.find((element=>element.toLowerCase().includes(material_type.sN.audioBookGeneric)))?"audiobook":"unknown")(sourceName,materialTypes);switch(onlineMaterialType){case"ebook":return t("goToText",{placeholders:{"@source":"ereolen"}});case"emovie":return t("goToText",{placeholders:{"@source":"filmstriben"}});case"audiobook":return t("listenOnlineText");default:return t("seeOnlineText")}})(origin,(0,general.JB)(manifestations)))},online_MaterialButtonOnlineExternal=MaterialButtonOnlineExternal;try{MaterialButtonOnlineExternal.displayName="MaterialButtonOnlineExternal",MaterialButtonOnlineExternal.__docgenInfo={description:"",displayName:"MaterialButtonOnlineExternal",props:{externalUrl:{defaultValue:{value:""},description:"",name:"externalUrl",required:!1,type:{name:"string"}},origin:{defaultValue:null,description:"",name:"origin",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},dataCy:{defaultValue:{value:"material-button-online-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"]={docgenInfo:MaterialButtonOnlineExternal.__docgenInfo,name:"MaterialButtonOnlineExternal",path:"src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonOnlineInfomediaArticle=({size,manifestations,trackOnlineView,dataCy="material-button-online-infomedia-article"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),{isLoading,data:userData}=(0,usePatronData.I)(),{openGuarded}=(0,modal.X)(),isUserResident=userData&&null!=userData&&userData.patron?(0,user.vn)(userData.patron):null;if(manifestations.length<1)return null;return isLoading?react.createElement(MaterialButtonLoading.A,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantViewText"),reason:t("notLivingInMunicipalityText")}):react.createElement(Button.$,{label:t("readArticleText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:infomediaModalId(manifestations[0].pid),trackOnlineView})},dataCy})},online_MaterialButtonOnlineInfomediaArticle=MaterialButtonOnlineInfomediaArticle;try{MaterialButtonOnlineInfomediaArticle.displayName="MaterialButtonOnlineInfomediaArticle",MaterialButtonOnlineInfomediaArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineInfomediaArticle",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},dataCy:{defaultValue:{value:"material-button-online-infomedia-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"]={docgenInfo:MaterialButtonOnlineInfomediaArticle.__docgenInfo,name:"MaterialButtonOnlineInfomediaArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonsOnline=({manifestations,size,workId,dataCy="material-buttons-online",ariaLabelledBy})=>{const{track}=(0,useStatistics.B)(),trackOnlineView=()=>track("click",{id:statistics.o.onlineReservation.id,name:statistics.o.onlineReservation.name,trackedData:workId}),accessElement=manifestations[0].access.find((item=>"Ereol"===item.__typename))||manifestations[0].access[0];if((0,material_buttons_helper.ft)("Ereol",manifestations)||(0,material_buttons_helper.ft)("AccessUrl",manifestations)){const{origin,url:externalUrl}=accessElement;if(!(0,helpers_url.Ks)(externalUrl))throw new InvalidUrlError.A(`The external url is not valid. ( ${externalUrl} )`);return react.createElement(online_MaterialButtonOnlineExternal,{externalUrl,origin,size,trackOnlineView,manifestations,dataCy:`${dataCy}-external`,ariaLabelledBy})}return(0,material_buttons_helper.ft)("DigitalArticleService",manifestations)&&(0,material_buttons_helper.S5)(material_type.sN.article,manifestations)?react.createElement(online_MaterialButtonOnlineDigitalArticle,{pid:manifestations[0].pid,size,dataCy:`${dataCy}-digital-article`}):(0,material_buttons_helper.ft)("InfomediaService",manifestations)?react.createElement(online_MaterialButtonOnlineInfomediaArticle,{size,manifestations,trackOnlineView,dataCy:`${dataCy}-infomedia-article`}):null},online_MaterialButtonsOnline=MaterialButtonsOnline;try{MaterialButtonsOnline.displayName="MaterialButtonsOnline",MaterialButtonsOnline.__docgenInfo={description:"",displayName:"MaterialButtonsOnline",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},dataCy:{defaultValue:{value:"material-buttons-online"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"]={docgenInfo:MaterialButtonsOnline.__docgenInfo,name:"MaterialButtonsOnline",path:"src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx");const UseReservableManifestations=({manifestations,type})=>{const config=(0,utils_config.UK)(),faustIds=(0,general.bn)(manifestations),[reservableManifestations,setReservableManifestations]=(0,react.useState)(null),[unReservableManifestations,setUnReservableManifestations]=(0,react.useState)(null);return(0,react.useEffect)((()=>{if(!manifestations.length||reservableManifestations||unReservableManifestations)return;(async m=>{const data=await(0,material_helper.QL)({faustIds,config});if(!data)return{reservable:[],unReservable:[]};const filterableManifestations=type?(0,material_helper.Xf)(type,m):m;return{reservable:filterableManifestations.filter((manifestation=>data.some((item=>item.reservable&&item.recordId===(0,general.G_)(manifestation.pid))))),unReservable:filterableManifestations.filter((manifestation=>data.some((item=>!item.reservable&&item.recordId===(0,general.G_)(manifestation.pid)))))}})(manifestations).then((({reservable,unReservable})=>{setReservableManifestations(reservable),setUnReservableManifestations(unReservable)}))}),[manifestations,faustIds,type,reservableManifestations,unReservableManifestations,config]),{reservableManifestations,unReservableManifestations}},utils_UseReservableManifestations=UseReservableManifestations;try{UseReservableManifestations.displayName="UseReservableManifestations",UseReservableManifestations.__docgenInfo={description:"",displayName:"UseReservableManifestations",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"]={docgenInfo:UseReservableManifestations.__docgenInfo,name:"UseReservableManifestations",path:"src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonUserBlocked=({size,dataCy="material-button"})=>{const t=(0,utils_text.F)();return react.createElement(Button.$,{label:t("blockedButtonText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy:`${dataCy}-user-blocked`})},generic_MaterialButtonUserBlocked=MaterialButtonUserBlocked;try{MaterialButtonUserBlocked.displayName="MaterialButtonUserBlocked",MaterialButtonUserBlocked.__docgenInfo={description:"",displayName:"MaterialButtonUserBlocked",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"]={docgenInfo:MaterialButtonUserBlocked.__docgenInfo,name:"MaterialButtonUserBlocked",path:"src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonPhysical=({manifestationMaterialType,faustIds,size,dataCy="material-button-physical"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),{openGuarded}=(0,modal.X)();return react.createElement(Button.$,{dataCy,label:"small"===size?t("reserveText"):`${t("reserveWithMaterialTypeText",{placeholders:{"@materialType":manifestationMaterialType}})}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,material_helper.bE)(faustIds)})}})},physical_MaterialButtonPhysical=MaterialButtonPhysical;try{MaterialButtonPhysical.displayName="MaterialButtonPhysical",MaterialButtonPhysical.__docgenInfo={description:"",displayName:"MaterialButtonPhysical",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},dataCy:{defaultValue:{value:"material-button-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"]={docgenInfo:MaterialButtonPhysical.__docgenInfo,name:"MaterialButtonPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"})}catch(__react_docgen_typescript_loader_error){}var useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const MaterialButtonsPhysical=({manifestations,size,dataCy="material-buttons-physical"})=>{const t=(0,utils_text.F)(),config=(0,utils_config.UK)(),faustIds=(0,general.bn)(manifestations),{isLoading:isLoadingAvailability}=(0,useGetAvailability.A)({faustIds,config}),{reservableManifestations}=utils_UseReservableManifestations({manifestations}),{data:userData,isLoading}=(0,usePatronData.I)(),isUserBlocked=!(null==userData||!userData.patron||!(0,user.lT)(null==userData?void 0:userData.patron));return isLoading||isLoadingAvailability?react.createElement(MaterialButtonLoading.A,null):!reservableManifestations||reservableManifestations.length<1?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantReserveText")}):isUserBlocked?react.createElement(generic_MaterialButtonUserBlocked,{size,dataCy}):userData&&isUserBlocked?null:react.createElement(physical_MaterialButtonPhysical,{dataCy,manifestationMaterialType:(0,general.VZ)(manifestations),faustIds,size})},physical_MaterialButtonsPhysical=MaterialButtonsPhysical;try{MaterialButtonsPhysical.displayName="MaterialButtonsPhysical",MaterialButtonsPhysical.__docgenInfo={description:"",displayName:"MaterialButtonsPhysical",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-buttons-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"]={docgenInfo:MaterialButtonsPhysical.__docgenInfo,name:"MaterialButtonsPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonReservableFromAnotherLibrary=({manifestationMaterialType,faustIds,size,dataCy="material-button-reservable-on-another-library"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),{openGuarded}=(0,modal.X)();return react.createElement(Button.$,{dataCy,label:"small"===size?t("reserveText"):`${t("reserveWithMaterialTypeText",{placeholders:{"@materialType":manifestationMaterialType}})}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,material_helper.bE)(faustIds)})}})},physical_MaterialButtonReservableFromAnotherLibrary=MaterialButtonReservableFromAnotherLibrary;try{MaterialButtonReservableFromAnotherLibrary.displayName="MaterialButtonReservableFromAnotherLibrary",MaterialButtonReservableFromAnotherLibrary.__docgenInfo={description:"",displayName:"MaterialButtonReservableFromAnotherLibrary",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},dataCy:{defaultValue:{value:"material-button-reservable-on-another-library"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"]={docgenInfo:MaterialButtonReservableFromAnotherLibrary.__docgenInfo,name:"MaterialButtonReservableFromAnotherLibrary",path:"src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtons=({manifestations,size,workId,dataCy="material-buttons",materialTitleId})=>{const faustIds=(0,general.bn)(manifestations),{materialIsReservableFromAnotherLibrary}=utils_useReservableFromAnotherLibrary(manifestations);return materialIsReservableFromAnotherLibrary?react.createElement(physical_MaterialButtonReservableFromAnotherLibrary,{size,manifestationMaterialType:(0,general.VZ)(manifestations),faustIds}):react.createElement(react.Fragment,null,(0,material_buttons_helper.D7)(graphql.cs.Physical,manifestations)&&!(0,material_buttons_helper.BG)(manifestations)&&react.createElement(react.Fragment,null,react.createElement(physical_MaterialButtonsPhysical,{manifestations,size,dataCy:`${dataCy}-physical`}),react.createElement(MaterialButtonsFindOnShelf.A,{size,faustIds,dataCy:`${dataCy}-find-on-shelf`})),((0,material_buttons_helper.D7)(graphql.cs.Online,manifestations)||(0,material_buttons_helper.ft)("DigitalArticleService",manifestations))&&react.createElement(online_MaterialButtonsOnline,{manifestations,size,workId,dataCy:`${dataCy}-online`,ariaLabelledBy:materialTitleId}))},material_buttons_MaterialButtons=MaterialButtons;try{MaterialButtons.displayName="MaterialButtons",MaterialButtons.__docgenInfo={description:"",displayName:"MaterialButtons",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},dataCy:{defaultValue:{value:"material-buttons"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"]={docgenInfo:MaterialButtons.__docgenInfo,name:"MaterialButtons",path:"src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"})}catch(__react_docgen_typescript_loader_error){}var isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const MaterialPeriodicalSelect=({groupList,selectedPeriodical,selectPeriodicalHandler})=>{const t=(0,utils_text.F)(),lastYear=Object.keys(groupList).sort().pop()||"",[year,setYear]=(0,react.useState)(lastYear),periodicalEditions=(0,periodical_helper.LM)(groupList);(0,react.useEffect)((()=>{if(selectedPeriodical)return;const firstEdition=(0,periodical_helper.Vf)(year,periodicalEditions),firstFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===firstEdition));firstFullPeriodicalEdition&&selectPeriodicalHandler(firstFullPeriodicalEdition)}),[selectPeriodicalHandler,selectedPeriodical,year,periodicalEditions,groupList]);return react.createElement("div",{className:"text-small-caption material-periodical"},react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"year"},t("periodicalSelectYearText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"year",defaultValue:year,onChange:event=>{(0,periodical_helper.yF)(event.target.value,setYear,selectPeriodicalHandler,periodicalEditions,groupList)}},Object.keys(periodicalEditions).sort().map((item=>react.createElement("option",{key:item,value:item},item)))))),year&&react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"editions"},t("periodicalSelectEditionText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"editions",value:null==selectedPeriodical?void 0:selectedPeriodical.volumeNumber,onChange:event=>{(0,periodical_helper.HO)(groupList,year,event.target.value,selectPeriodicalHandler)}},periodicalEditions[year].map((item=>react.createElement("option",{key:item,value:item},item)))))))},periodical_MaterialPeriodicalSelect=MaterialPeriodicalSelect;try{MaterialPeriodicalSelect.displayName="MaterialPeriodicalSelect",MaterialPeriodicalSelect.__docgenInfo={description:"",displayName:"MaterialPeriodicalSelect",props:{groupList:{defaultValue:null,description:"",name:"groupList",required:!0,type:{name:"GroupList"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"]={docgenInfo:MaterialPeriodicalSelect.__docgenInfo,name:"MaterialPeriodicalSelect",path:"src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"})}catch(__react_docgen_typescript_loader_error){}const MaterialPeriodical=({faustId,selectedPeriodical,selectPeriodicalHandler})=>{const config=(0,utils_config.UK)(),{data,isLoading,isError}=(0,material_helper.us)({faustIds:[faustId],config});if(isLoading||isError||!data)return null;const materialsPeriodical=data[0].holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat(),groupByVolumeYear=(0,general.kj)(materialsPeriodical,"volumeYear");return groupByVolumeYear&&selectPeriodicalHandler&&!isEmpty_default()(groupByVolumeYear)?react.createElement(periodical_MaterialPeriodicalSelect,{groupList:groupByVolumeYear,selectedPeriodical,selectPeriodicalHandler}):null},periodical_MaterialPeriodical=MaterialPeriodical;try{MaterialPeriodical.displayName="MaterialPeriodical",MaterialPeriodical.__docgenInfo={description:"",displayName:"MaterialPeriodical",props:{faustId:{defaultValue:null,description:"",name:"faustId",required:!0,type:{name:"string"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"]={docgenInfo:MaterialPeriodical.__docgenInfo,name:"MaterialPeriodical",path:"src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"})}catch(__react_docgen_typescript_loader_error){}const MaterialHeader=({work:{titles:{full:fullTitle},creators,manifestations:{all:manifestations,bestRepresentation},mainLanguages,workId:wid},work,selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler,children,isGlobalMaterial=!1})=>{const materialTitleId=(0,react.useId)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.H)(),t=(0,utils_text.F)(),dispatch=(0,es.wA)(),queryClient=(0,react_query_es.useQueryClient)(),author=(0,general.sP)((0,general.UV)(creators),t),isPeriodical=(0,material_buttons_helper.S5)(material_type.sN.magazine,selectedManifestations),containsDanish=mainLanguages.some((language=>null==language?void 0:language.isoCode.toLowerCase().includes("dan"))),allLanguages=mainLanguages.map((language=>language.display)).join(", "),title=containsDanish?fullTitle:`${fullTitle} (${allLanguages})`,pid=(0,general.hh)(work),coverPids=(0,general.e$)(selectedManifestations),{track}=(0,useStatistics.B)(),manifestationMaterialTypes=(0,general.JB)(selectedManifestations),languageIsoCode=(0,material_helper.PG)(selectedManifestations);return(0,useDeepCompareEffect.A)((()=>{track("click",{id:statistics.o.materialType.id,name:statistics.o.materialType.name,trackedData:manifestationMaterialTypes.join(", ")}),track("click",{id:statistics.o.materialSource.id,name:statistics.o.materialSource.name,trackedData:selectedManifestations.map((manifestation=>manifestation.source.join(", "))).join(", ")})}),[manifestationMaterialTypes]),react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement(cover.Y,{ids:coverPids,bestRepresentation,size:"xlarge",animate:!0,shadow:"small"})),react.createElement("div",{"data-cy":"material-header-content",className:"material-header__content"},react.createElement(button_favourite.A,{title:String(title),id:wid,addToListRequest:id=>{dispatch((0,guardedRequests_slice.A5)({type:"addFavorite",args:{id,queryClient},app:"material"}))}}),react.createElement(material_MaterialHeaderText,{title:String(title),author,languageIsoCode,materialTitleId}),react.createElement("div",{ref:itemRef,className:"material-header__availability-label"},!isGlobalMaterial&&showItem&&react.createElement(availability_labels.F,{cursorPointer:!0,workId:wid,manifestations,selectedManifestations,setSelectedManifestations})),!isGlobalMaterial&&showItem&&react.createElement(react.Fragment,null,isPeriodical&&react.createElement(periodical_MaterialPeriodical,{faustId:(0,general.G_)(pid),selectedPeriodical,selectPeriodicalHandler}),selectedManifestations&&react.createElement(react.Fragment,null,react.createElement("div",{className:"material-header__button"},react.createElement(material_buttons_MaterialButtons,{manifestations:selectedManifestations,workId:wid,dataCy:"material-header-buttons",materialTitleId})),!(0,user.ok)()&&react.createElement(MaterialAvailabilityText_MaterialAvailabilityText,{manifestations:selectedManifestations})),children)))},material_MaterialHeader=MaterialHeader;try{MaterialHeader.displayName="MaterialHeader",MaterialHeader.__docgenInfo={description:"",displayName:"MaterialHeader",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!0,type:{name:"(manifestations: Manifestation[]) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}},isGlobalMaterial:{defaultValue:{value:"false"},description:"",name:"isGlobalMaterial",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeader.tsx#MaterialHeader"]={docgenInfo:MaterialHeader.__docgenInfo,name:"MaterialHeader",path:"src/components/material/MaterialHeader.tsx#MaterialHeader"})}catch(__react_docgen_typescript_loader_error){}var ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),availability_label=__webpack_require__("./src/components/availability-label/availability-label.tsx");const MaterialMainfestationItem=({manifestation:{materialTypes,pid,titles,creators,identifiers,edition},manifestation,workId})=>{var _materialTypes$,_edition$publicationY;const mainfestationTitleId=(0,react.useId)(),t=(0,utils_text.F)(),[isOpen,setIsOpen]=(0,react.useState)(!1),faustId=(0,general.G_)(pid),author=(0,general.sP)((0,general.UV)(creators),t),languageIsoCode=(0,material_helper.PG)([manifestation]),detailsListData=[{label:t("detailsListTypeText"),value:(0,material_helper.TU)(manifestation)},{label:t("detailsListLanguageText"),value:(0,material_helper.gG)(manifestation)},{label:t("detailsListGenreAndFormText"),value:(0,material_helper.f$)(manifestation)},{label:t("detailsListContributorsText"),value:(0,material_helper.v9)(manifestation)},{label:t("detailsListOriginalTitleText"),value:(0,material_helper.ub)(manifestation)},{label:t("detailsListIsbnText"),value:(0,material_helper.L_)(manifestation)},{label:t("detailsListEditionText"),value:(0,material_helper.jC)(manifestation)},{label:t("detailsListScopeText"),value:(0,material_helper.n5)(manifestation)},{label:t("detailsListPublisherText"),value:(0,material_helper.Zs)(manifestation)},{label:t("detailsListAudienceText"),value:(0,material_helper.DH)(manifestation,t)},{label:t("detailsListAuthorsText"),value:(0,material_helper.x4)(manifestation)},{label:t("detailsListPhysicalDescriptionText"),value:(0,material_helper.mI)(manifestation)},{label:t("detailsListNotesText"),value:(0,material_helper.KA)(manifestation)},{label:t("detailsListSourceText"),value:(0,material_helper.Cb)(manifestation)}],accessTypesCodes=manifestation.accessTypes.map((item=>item.code)),access=manifestation.access.map((acc=>acc.__typename)),detailsId=`material-details-${pid}`;return react.createElement("div",{className:"material-manifestation-item"},react.createElement("div",{className:"material-manifestation-item__availability"},react.createElement(availability_label.Y,{manifestText:null===(_materialTypes$=materialTypes[0])||void 0===_materialTypes$?void 0:_materialTypes$.materialTypeSpecific.display,faustIds:[faustId],isbns:identifiers.map((identifier=>identifier.value)),accessTypes:accessTypesCodes,access,isVisualOnly:!0})),react.createElement("div",{className:"material-manifestation-item__cover"},react.createElement(cover.Y,{ids:[pid],size:"small",animate:!1})),react.createElement("div",{className:"material-manifestation-item__text"},react.createElement("h3",{lang:languageIsoCode,id:mainfestationTitleId,className:"material-manifestation-item__title text-header-h4"},null==titles?void 0:titles.main[0]),react.createElement("p",{className:"text-small-caption"},t("materialHeaderAuthorByText")," ",author,(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)&&` (${edition.publicationYear.display})`),react.createElement("div",{className:"material-manifestation-item__details "+(isOpen?"expanded":""),onClick:()=>{setIsOpen(!isOpen)},onKeyPress:()=>{setIsOpen(!isOpen)},role:"button",tabIndex:0,"aria-controls":detailsId,"aria-expanded":isOpen},react.createElement("p",{className:"link-tag text-small-caption"},t("detailsOfTheMaterialText")),react.createElement("img",{src:ExpandMore_default(),alt:""})),isOpen&&react.createElement(MaterialDetailsList.A,{id:detailsId,className:"mt-24",data:detailsListData})),react.createElement("div",{className:"material-manifestation-item__buttons"},react.createElement(material_buttons_MaterialButtons,{manifestations:[manifestation],size:"small",workId,materialTitleId:mainfestationTitleId})))},material_MaterialMainfestationItem=MaterialMainfestationItem;try{MaterialMainfestationItem.displayName="MaterialMainfestationItem",MaterialMainfestationItem.__docgenInfo={description:"",displayName:"MaterialMainfestationItem",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"]={docgenInfo:MaterialMainfestationItem.__docgenInfo,name:"MaterialMainfestationItem",path:"src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"})}catch(__react_docgen_typescript_loader_error){}__webpack_require__("./node_modules/dayjs/dayjs.min.js"),__webpack_require__("./node_modules/dayjs/plugin/customParseFormat.js");const usDateStringToDateObj=date=>(dayjs.extend(customParseFormat),dayjs(date,"YYYY-MM-DD").toDate()),ReviewMetadata=({author,date,publication,url})=>{const metaDataText=(returnAuthor,returnHost,returnDate)=>{const authorText=returnAuthor||"",hostText=returnHost||"";return`\n ${authorText}${authorText&&hostText?" - ":""}${hostText}${returnDate&&`, ${returnDate}`}\n `};return url?react.createElement(LinkNoStyle.A,{url,className:"link-tag text-small-caption mb-8"},metaDataText(author,publication,date)):react.createElement("div",{className:"review__meta mb-8"},metaDataText(author,publication,date))},material_ReviewMetadata=ReviewMetadata;try{usDateStringToDateObj.displayName="usDateStringToDateObj",usDateStringToDateObj.__docgenInfo={description:"",displayName:"usDateStringToDateObj",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"]={docgenInfo:usDateStringToDateObj.__docgenInfo,name:"usDateStringToDateObj",path:"src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"})}catch(__react_docgen_typescript_loader_error){}try{ReviewMetadata.displayName="ReviewMetadata",ReviewMetadata.__docgenInfo={description:"",displayName:"ReviewMetadata",props:{author:{defaultValue:null,description:"",name:"author",required:!1,type:{name:"string | null | undefined"}},date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"string | null | undefined"}},publication:{defaultValue:null,description:"",name:"publication",required:!1,type:{name:"string | null | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#ReviewMetadata"]={docgenInfo:ReviewMetadata.__docgenInfo,name:"ReviewMetadata",path:"src/components/material/ReviewMetadata.tsx#ReviewMetadata"})}catch(__react_docgen_typescript_loader_error){}var icon_heart_filled=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-filled.svg"),icon_heart_filled_default=__webpack_require__.n(icon_heart_filled),icon_heart_grey=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-grey.svg"),icon_heart_grey_default=__webpack_require__.n(icon_heart_grey);const ReviewHearts=({amountOfHearts})=>{const t=(0,utils_text.F)(),heartArray=amountOfHearts.split("/"),filledHeartsArray=Array.from({length:Number(heartArray[0])},((_,i)=>i+1)),emptyHeartsArray=Array.from({length:Number(heartArray[1])-Number(heartArray[0])},((_,i)=>i+1)),ariaLabel=t("ratingIsText",{placeholders:{"@heartCount":filledHeartsArray.length,"@numberOfHeartsPossible":heartArray[1]}});return react.createElement("div",{className:"mb-4",role:"figure","aria-label":ariaLabel},filledHeartsArray.map((()=>react.createElement("img",{src:icon_heart_filled_default(),className:"review__heart",alt:""}))),emptyHeartsArray.map((()=>react.createElement("img",{src:icon_heart_grey_default(),className:"review__heart",alt:""}))))},material_ReviewHearts=ReviewHearts;try{ReviewHearts.displayName="ReviewHearts",ReviewHearts.__docgenInfo={description:"",displayName:"ReviewHearts",props:{amountOfHearts:{defaultValue:null,description:"",name:"amountOfHearts",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewHearts.tsx#ReviewHearts"]={docgenInfo:ReviewHearts.__docgenInfo,name:"ReviewHearts",path:"src/components/material/ReviewHearts.tsx#ReviewHearts"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const ReviewExternal=({review:{workYear,dateFirstEdition,creators,review,access,edition,hostPublication},dataCy="review-external"})=>{const date=(0,general.IN)(dateFirstEdition,workYear,edition),authors=(0,general.Gm)(creators),publication=(0,general.yy)(hostPublication),accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),accessUrls&&accessUrls.map((({url,origin},index)=>react.createElement(react.Fragment,null,react.createElement("span",null,index>0?", ":""),react.createElement(Link.A,{href:new URL(url),className:"link-tag text-small-caption mb-8"},origin)))))},material_ReviewExternal=ReviewExternal;try{ReviewExternal.displayName="ReviewExternal",ReviewExternal.__docgenInfo={description:"",displayName:"ReviewExternal",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewExternal.tsx#ReviewExternal"]={docgenInfo:ReviewExternal.__docgenInfo,name:"ReviewExternal",path:"src/components/material/ReviewExternal.tsx#ReviewExternal"})}catch(__react_docgen_typescript_loader_error){}const useScrollToLocation=dependency=>{const[scrolledAlready,setScrolledAlready]=(0,react.useState)(!1),urlAnchor=window.location.hash;(0,react.useEffect)((()=>{if(urlAnchor&&!scrolledAlready){const anchorId=urlAnchor.replace("#",""),element=document.getElementById(anchorId);element&&(element.scrollIntoView({behavior:"smooth"}),setScrolledAlready(!0))}}),[urlAnchor,dependency,scrolledAlready])};try{useScrollToLocation.displayName="useScrollToLocation",useScrollToLocation.__docgenInfo={description:"",displayName:"useScrollToLocation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"]={docgenInfo:useScrollToLocation.__docgenInfo,name:"useScrollToLocation",path:"src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"})}catch(__react_docgen_typescript_loader_error){}const ReviewInfomedia=({review:{workYear,dateFirstEdition,access,creators,review,edition,hostPublication},dataCy="review-infomedia"})=>{var _infomedia$article,_infomedia$article2,_infomedia$article3;const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),date=(0,general.IN)(dateFirstEdition,workYear,edition),authors=(0,general.Gm)(creators),publication=(0,general.yy)(hostPublication),infomediaId=access.filter((accessItem=>"InfomediaService"===accessItem.__typename))[0].id,{data,error}=(0,graphql.ET)({id:infomediaId});if(useScrollToLocation(data),error)return null;if(!data)return null;const{infomedia}=data;if(infomedia.error)return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),react.createElement("div",{className:"review__headline mb-8"},"BORROWER_NOT_LOGGED_IN"===infomedia.error?react.createElement(Button.$,{label:t("loginToSeeReviewText"),buttonType:"none",disabled:!1,collapsible:!1,size:"xsmall",variant:"outline",onClick:()=>{(reviewId=>{const returnUrl=(0,helpers_url.gG)({disclosure:"disclosure-reviews"});returnUrl.hash=reviewId,(0,helpers_url.bX)({authUrl,returnUrl})})(infomediaId)}}):t("cantViewReviewText")));const accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption",id:infomediaId},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),(null===(_infomedia$article=infomedia.article)||void 0===_infomedia$article?void 0:_infomedia$article.headLine)&&react.createElement("h3",{className:"review__headline mb-8"},infomedia.article.headLine),(null===(_infomedia$article2=infomedia.article)||void 0===_infomedia$article2?void 0:_infomedia$article2.text)&&react.createElement("p",{className:"review__body mb-8",dangerouslySetInnerHTML:{__html:null===(_infomedia$article3=infomedia.article)||void 0===_infomedia$article3?void 0:_infomedia$article3.text}}),access.some((a=>"AccessUrl"===a.__typename))&&(0,helpers_url.Ks)(accessUrls[0].url)&&react.createElement(material_ReviewMetadata,{author:authors,date,url:new URL(accessUrls[0].url)}))},material_ReviewInfomedia=ReviewInfomedia;try{ReviewInfomedia.displayName="ReviewInfomedia",ReviewInfomedia.__docgenInfo={description:"",displayName:"ReviewInfomedia",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-infomedia"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"]={docgenInfo:ReviewInfomedia.__docgenInfo,name:"ReviewInfomedia",path:"src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"})}catch(__react_docgen_typescript_loader_error){}const ReviewLibrarian=({review:{workYear,dateFirstEdition,creators,review,edition,hostPublication},dataCy="review-librarian"})=>{const date=(0,general.IN)(dateFirstEdition,workYear,edition),authors=(0,general.Gm)(creators),publication=(0,general.yy)(hostPublication);return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.reviewByLibrarians)&&review.reviewByLibrarians.map((librarianReview=>react.createElement(react.Fragment,null,(null==librarianReview?void 0:librarianReview.heading)&&react.createElement("h3",{className:"review__headline mb-8"},librarianReview.heading),(null==librarianReview?void 0:librarianReview.content)&&react.createElement("div",{className:"review__body mb-8"},librarianReview.content)))))},material_ReviewLibrarian=ReviewLibrarian;try{ReviewLibrarian.displayName="ReviewLibrarian",ReviewLibrarian.__docgenInfo={description:"",displayName:"ReviewLibrarian",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-librarian"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"]={docgenInfo:ReviewLibrarian.__docgenInfo,name:"ReviewLibrarian",path:"src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"})}catch(__react_docgen_typescript_loader_error){}const ReviewSkeleton=()=>react.createElement("div",{className:"ssc my-48 mx-32"},react.createElement("div",{className:"ssc-head-line w-40 my-8"}),react.createElement("div",{className:"ssc-line my-8"}),react.createElement("div",{className:"ssc-line my-8"})),material_ReviewSkeleton=ReviewSkeleton;try{ReviewSkeleton.displayName="ReviewSkeleton",ReviewSkeleton.__docgenInfo={description:"",displayName:"ReviewSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"]={docgenInfo:ReviewSkeleton.__docgenInfo,name:"ReviewSkeleton",path:"src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"})}catch(__react_docgen_typescript_loader_error){}const MaterialReviews=({pids,dataCy="material-reviews"})=>{const{data,isLoading}=(0,graphql.BG)({pid:pids});if(isLoading)return react.createElement(material_ReviewSkeleton,null);if(!data)return null;const{manifestations:reviews}=data;return react.createElement("ul",{className:"reviews","data-cy":dataCy},reviews.map((review=>review?((reviewType,review)=>{switch(reviewType){case null:default:return null;case"infomedia":return react.createElement(material_ReviewInfomedia,{review,dataCy:`${dataCy}-infomedia`});case"external":return react.createElement(material_ReviewExternal,{review,dataCy:`${dataCy}-external`});case"librarian":return react.createElement(material_ReviewLibrarian,{review,dataCy:`${dataCy}-librarian`})}})((review=>null!=review&&review.access.some((access=>"InfomediaService"===access.__typename))?"infomedia":null!=review&&review.access.some((access=>"AccessUrl"===access.__typename))?"external":null!=review&&review.access.some((access=>"InterLibraryLoan"===access.__typename))?"librarian":null)(review),review):null)))};try{MaterialReviews.displayName="MaterialReviews",MaterialReviews.__docgenInfo={description:"",displayName:"MaterialReviews",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${string}`[]"}},dataCy:{defaultValue:{value:"material-reviews"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialReviews.tsx#MaterialReviews"]={docgenInfo:MaterialReviews.__docgenInfo,name:"MaterialReviews",path:"src/components/material/MaterialReviews.tsx#MaterialReviews"})}catch(__react_docgen_typescript_loader_error){}const MaterialSkeleton=()=>react.createElement("section",{className:"material-page ssc"},react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement("div",{className:"ssc-square cover cover--size-xlarge cover--aspect-xlarge"})),react.createElement("div",{className:"material-header__content"},react.createElement("div",null,react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mb-48"}),react.createElement("div",{className:"ssc-line w-30"}," ")),react.createElement("div",{className:"scc-wrapper pt-48"},react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-line"}))))),react.createElement("section",{className:"material-description"},react.createElement("div",{className:"ssc-head-line w-20 mb"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mb"}),react.createElement("div",{className:"scc-wrapper pt-16"},react.createElement("div",{className:"ssc-head-line w-10 mt mb"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"})))),material_MaterialSkeleton=MaterialSkeleton;try{MaterialSkeleton.displayName="MaterialSkeleton",MaterialSkeleton.__docgenInfo={description:"",displayName:"MaterialSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"]={docgenInfo:MaterialSkeleton.__docgenInfo,name:"MaterialSkeleton",path:"src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"})}catch(__react_docgen_typescript_loader_error){}const getData=(response,type)=>{var _response$data;return!response.isLoading&&null!==(_response$data=response.data)&&void 0!==_response$data&&_response$data.work?{...response,workType:type}:null};var disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const MaterialDisclosure=({title,icon,children,dataCy})=>react.createElement(disclosure.A,{dataCy,summary:react.createElement(DisclosureSummary.A,{title,mainIconPath:icon})},children),material_MaterialDisclosure=MaterialDisclosure;try{MaterialDisclosure.displayName="MaterialDisclosure",MaterialDisclosure.__docgenInfo={description:"",displayName:"MaterialDisclosure",props:{dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"]={docgenInfo:MaterialDisclosure.__docgenInfo,name:"MaterialDisclosure",path:"src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"})}catch(__react_docgen_typescript_loader_error){}var ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),Subtitles=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Subtitles.svg"),Subtitles_default=__webpack_require__.n(Subtitles),Message=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Message.svg"),Message_default=__webpack_require__.n(Message),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),reservation_helper=__webpack_require__("./src/components/reservation/helper.ts"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts"),useSavePatron=__webpack_require__("./src/core/utils/useSavePatron.tsx");const ModalReservationFormText=({type,defaultText,header,inputField,patron})=>{const{close}=(0,modal.X)(),t=(0,utils_text.F)(),[text,setText]=(0,react.useState)((0,general.ng)(defaultText)),{savePatron}=(0,useSavePatron.A)({patron,fetchHandlers:{savePatron:{onSuccess:()=>{close((0,forms_helper.zW)(type))},onError:()=>{setText((0,general.ng)(defaultText)),close((0,forms_helper.zW)(type))}}}}),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,forms_helper.zW)(type),screenReaderModalDescriptionText:t((0,reservation_helper.He)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,reservation_helper.He)(type,"closeModalAriaLabelText"))}))(type,t);return react.createElement(modal.A,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText},react.createElement(ReservationForm.A,{title:header.title,description:header.description,onSubmit:()=>{(0,forms_helper.L8)({type,changedText:text,savedText:defaultText,patron,savePatron})}},react.createElement(TextInput.A,{id:type,label:inputField.label,type:(0,reservation_helper.B6)(type),onChange:input=>{setText(input)},value:text})))},forms_ModalReservationFormText=(0,react.memo)(ModalReservationFormText,isEqual_default());try{ModalReservationFormText.displayName="ModalReservationFormText",ModalReservationFormText.__docgenInfo={description:"",displayName:"ModalReservationFormText",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},defaultText:{defaultValue:null,description:"",name:"defaultText",required:!1,type:{name:"string | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},inputField:{defaultValue:null,description:"",name:"inputField",required:!0,type:{name:"{ description: string; label: string; }"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"]={docgenInfo:ModalReservationFormText.__docgenInfo,name:"ModalReservationFormText",path:"src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"})}catch(__react_docgen_typescript_loader_error){}const EmailModal=({patron,patron:{emailAddress}})=>{const t=(0,utils_text.F)();return react.createElement(forms_ModalReservationFormText,{type:"email",defaultText:emailAddress,header:{title:t("modalReservationFormEmailHeaderTitleText"),description:[t("modalReservationFormEmailHeaderDescriptionText")]},inputField:{label:t("modalReservationFormEmailInputFieldLabelText"),description:t("modalReservationFormEmailInputFieldDescriptionText")},patron})},forms_EmailModal=EmailModal;try{EmailModal.displayName="EmailModal",EmailModal.__docgenInfo={description:"",displayName:"EmailModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/EmailModal.tsx#EmailModal"]={docgenInfo:EmailModal.__docgenInfo,name:"EmailModal",path:"src/components/reservation/forms/EmailModal.tsx#EmailModal"})}catch(__react_docgen_typescript_loader_error){}const SmsModal=({patron,patron:{phoneNumber}})=>{const t=(0,utils_text.F)();return react.createElement(forms_ModalReservationFormText,{type:"sms",defaultText:phoneNumber,header:{title:t("modalReservationFormSmsHeaderTitleText"),description:[t("modalReservationFormSmsHeaderDescriptionText")]},inputField:{label:t("modalReservationFormSmsInputFieldLabelText"),description:t("modalReservationFormSmsInputFieldDescriptionText")},patron})},forms_SmsModal=SmsModal;try{SmsModal.displayName="SmsModal",SmsModal.__docgenInfo={description:"",displayName:"SmsModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/SmsModal.tsx#SmsModal"]={docgenInfo:SmsModal.__docgenInfo,name:"SmsModal",path:"src/components/reservation/forms/SmsModal.tsx#SmsModal"})}catch(__react_docgen_typescript_loader_error){}var PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx");const UserListItems=({patron,patron:{preferredPickupBranch,phoneNumber,emailAddress},branches,selectedBranch,selectBranchHandler,selectedInterest,setSelectedInterest,whitelistBranches})=>{const t=(0,utils_text.F)(),config=(0,utils_config.UK)(),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),{open}=(0,modal.X)(),openModal=type=>()=>{open((0,forms_helper.zW)(type))},interestPeriod=selectedInterest?(0,reservation_helper.En)(selectedInterest,interestPeriods,t):(0,reservation_helper.En)(Number(interestPeriods.defaultInterestPeriod.value),interestPeriods,t),pickupBranch=selectedBranch?(0,reservation_helper.C4)(selectedBranch,branches):(0,reservation_helper.C4)(preferredPickupBranch,branches);return react.createElement(react.Fragment,null,interestPeriods&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:interestPeriod,changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText")}),react.createElement(NoInterestAfterModal.A,{selectedInterest:selectedInterest??interestPeriods.defaultInterestPeriod.value,setSelectedInterest})),preferredPickupBranch&&whitelistBranches&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:pickupBranch,changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText")}),react.createElement(PickupModal.A,{branches:whitelistBranches,defaultBranch:selectedBranch??preferredPickupBranch,selectBranchHandler})),react.createElement(react.Fragment,null,(0,reservation_helper.Qr)(config("smsNotificationsForReservationsEnabledConfig"))&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:Subtitles_default(),title:t("receiveSmsWhenMaterialReadyText"),text:(0,general.ng)(phoneNumber),changeHandler:openModal("sms"),buttonAriaLabel:t("changeSmsNumberText")}),react.createElement(forms_SmsModal,{patron})),react.createElement(ReservationFormListItem.A,{icon:Message_default(),title:t("receiveEmailWhenMaterialReadyText"),text:(0,general.ng)(emailAddress),changeHandler:openModal("email"),buttonAriaLabel:t("changeEmailText")}),react.createElement(forms_EmailModal,{patron})))},reservation_UserListItems=UserListItems;try{UserListItems.displayName="UserListItems",UserListItems.__docgenInfo={description:"",displayName:"UserListItems",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},selectedBranch:{defaultValue:null,description:"",name:"selectedBranch",required:!0,type:{name:"string | null"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number | null"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},whitelistBranches:{defaultValue:null,description:"",name:"whitelistBranches",required:!0,type:{name:"AgencyBranch[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/UserListItems.tsx#UserListItems"]={docgenInfo:UserListItems.__docgenInfo,name:"UserListItems",path:"src/components/reservation/UserListItems.tsx#UserListItems"})}catch(__react_docgen_typescript_loader_error){}var focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts");const ReservationSucces=({modalId,title,preferredPickupBranch,numberInQueue,holdings})=>{const dispatch=(0,es.wA)(),t=(0,utils_text.F)();return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{"data-cy":"reservation-success-title-text",className:"text-header-h3 pb-48"},t("reservationSuccesTitleText")),react.createElement("p",{"data-cy":"reservation-success-is-reserved-for-you-text",className:"text-body-medium-regular pb-24"},title," ",t("reservationSuccesIsReservedForYouText")),react.createElement("p",{"data-cy":"number-in-queue-text",className:"text-body-medium-regular pb-24"},react.createElement(material_StockAndReservationInfo,{stockCount:holdings,numberInQueue})),react.createElement("p",{"data-cy":"reservation-success-preferred-pickup-branch-text",className:"text-body-medium-regular pb-48"},t("reservationSuccessPreferredPickupBranchText",{placeholders:{"@branch":preferredPickupBranch}}),"."),react.createElement(Button.$,{dataCy:"reservation-success-close-button",classNames:"reservation-modal__confirm-button",label:t("okButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{dispatch((0,modal_slice.Oo)({modalId}))}})))},reservation_ReservationSucces=ReservationSucces;try{ReservationSucces.displayName="ReservationSucces",ReservationSucces.__docgenInfo={description:"",displayName:"ReservationSucces",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},preferredPickupBranch:{defaultValue:null,description:"",name:"preferredPickupBranch",required:!0,type:{name:"string"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}},holdings:{defaultValue:null,description:"",name:"holdings",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationSucces.tsx#ReservationSucces"]={docgenInfo:ReservationSucces.__docgenInfo,name:"ReservationSucces",path:"src/components/reservation/ReservationSucces.tsx#ReservationSucces"})}catch(__react_docgen_typescript_loader_error){}const ReservationError=({reservationResults,setReservationResponse})=>{const t=(0,utils_text.F)(),reservationErrorInfo=reservationResults.some((({result})=>"already_reserved"===result))?{title:t("alreadyReservedText"),description:"",buttonText:t("closeText")}:{title:t("reservationErrorsTitleText"),description:t("reservationErrorsDescriptionText"),buttonText:t("tryAginButtonText")};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{className:"text-header-h3 pb-48"},reservationErrorInfo.title),reservationErrorInfo.description&&react.createElement("p",{className:"text-body-medium-regular pb-48"},reservationErrorInfo.description),react.createElement(Button.$,{classNames:"reservation-modal__confirm-button",label:reservationErrorInfo.buttonText,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>setReservationResponse(null)})))},reservation_ReservationError=ReservationError;try{ReservationError.displayName="ReservationError",ReservationError.__docgenInfo={description:"",displayName:"ReservationError",props:{reservationResults:{defaultValue:null,description:"",name:"reservationResults",required:!0,type:{name:"ReservationResultV2[]"}},setReservationResponse:{defaultValue:null,description:"",name:"setReservationResponse",required:!0,type:{name:"(reservationResponse: ReservationResponseV2 | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationError.tsx#ReservationError"]={docgenInfo:ReservationError.__docgenInfo,name:"ReservationError",path:"src/components/reservation/ReservationError.tsx#ReservationError"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts");const reservation_useAlternativeAvailableManifestation=(work,currentManifestationPids)=>{const config=(0,utils_config.UK)(),[isOtherManifestationPreferred,setIsOtherManifestationPreferred]=(0,react.useState)(!1),[otherManifestationPreferred,setOtherManifestationPreferred]=(0,react.useState)(null),faustIds=(0,general.bn)(work.manifestations.all),{data:availabilityData}=(0,useGetAvailability.A)({faustIds,config});return(0,useDeepCompareEffect.A)((()=>{if(availabilityData){const leastReservedData=availabilityData.filter((manifestation=>manifestation.reservable)).sort(((a,b)=>a.reservations-b.reservations)).shift();if(!leastReservedData)return;const leastReservedManifestation=work.manifestations.all.find((manifestation=>(0,general.G_)(manifestation.pid)===leastReservedData.recordId));if(!leastReservedManifestation)return;currentManifestationPids.includes(leastReservedManifestation.pid)||(setIsOtherManifestationPreferred(!0),setOtherManifestationPreferred({...leastReservedManifestation,...leastReservedData}))}}),[availabilityData,currentManifestationPids,work]),{isOtherManifestationPreferred,otherManifestationPreferred}};var PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const InstantLoanSummary=({pid,className})=>{const t=(0,utils_text.F)();return react.createElement("div",{className},react.createElement("div",{className:"pagefold-triangle--small"}),react.createElement(cover.Y,{ids:[pid],size:"small",animate:!0}),react.createElement("div",null,react.createElement("h2",{className:"text-header-h4 mt-22 mb-4"},t("instantLoanTitleText")),react.createElement("p",{className:"text-small-caption"},t("instantLoanSubTitleText")),react.createElement("div",{className:"instant-loan-underline mt-35"},react.createElement("p",{className:"link-tag text-small-caption"},t("instantLoanUnderlineDescriptionText")),react.createElement("img",{className:"instant-loan-arrow",src:ExpandMore_default(),alt:""}))))},instant_loan_InstantLoanSummary=InstantLoanSummary;try{InstantLoanSummary.displayName="InstantLoanSummary",InstantLoanSummary.__docgenInfo={description:"",displayName:"InstantLoanSummary",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"]={docgenInfo:InstantLoanSummary.__docgenInfo,name:"InstantLoanSummary",path:"src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"})}catch(__react_docgen_typescript_loader_error){}var availability_label_inside=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx"),availability_label_helper=__webpack_require__("./src/components/availability-label/helper.ts");const availability_label_visual=({manifestText,selected,cursorPointer,isAvailable,quantity,availabilityText})=>{const t=(0,utils_text.F)(),getAvailabilityText=availabilityText||t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");return react.createElement("div",{className:(0,availability_label_helper.Mk)({selected,cursorPointer})},react.createElement(availability_label_inside.A,{selected,isAvailable,manifestText,availabilityText:getAvailabilityText,quantity,isLoading:!1}))};try{availabilitylabelvisual.displayName="availabilitylabelvisual",availabilitylabelvisual.__docgenInfo={description:"",displayName:"availabilitylabelvisual",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}},cursorPointer:{defaultValue:null,description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"]={docgenInfo:availabilitylabelvisual.__docgenInfo,name:"availabilitylabelvisual",path:"src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"})}catch(__react_docgen_typescript_loader_error){}const InstantLoanBranch=({branch:{branch:{title},materials},materialType})=>react.createElement("div",{className:"instant-loan-branch px-24","data-cy":"instant-loan-branch"},react.createElement("p",{className:"text-header-h5"},title),react.createElement(availability_label_visual,{manifestText:materialType,isAvailable:!0,quantity:materials.length})),instant_loan_InstantLoanBranch=InstantLoanBranch;try{InstantLoanBranch.displayName="InstantLoanBranch",InstantLoanBranch.__docgenInfo={description:"",displayName:"InstantLoanBranch",props:{branch:{defaultValue:null,description:"",name:"branch",required:!0,type:{name:"HoldingsV3"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"]={docgenInfo:InstantLoanBranch.__docgenInfo,name:"InstantLoanBranch",path:"src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"})}catch(__react_docgen_typescript_loader_error){}const InstantLoan=({manifestation,instantLoanBranchHoldings})=>{const{pid,materialTypes}=manifestation,materialType=materialTypes[0].materialTypeSpecific.display;return react.createElement(DisclosureControllable.A,{id:"instant-loan",className:"pagefold-parent--small disclosure--full-width",summary:react.createElement(instant_loan_InstantLoanSummary,{pid,className:"instant-loan-summary cursor-pointer p-24"}),cyData:"instant-loan"},react.createElement("ul",{className:"instant-loan-branches","data-cy":"instant-loan-branches"},instantLoanBranchHoldings.map((branch=>react.createElement("li",{key:branch.branch.branchId},react.createElement(instant_loan_InstantLoanBranch,{branch,materialType}))))))},instant_loan_InstantLoan=InstantLoan;try{InstantLoan.displayName="InstantLoan",InstantLoan.__docgenInfo={description:"",displayName:"InstantLoan",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},instantLoanBranchHoldings:{defaultValue:null,description:"",name:"instantLoanBranchHoldings",required:!0,type:{name:"HoldingsV3[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoan.tsx#InstantLoan"]={docgenInfo:InstantLoan.__docgenInfo,name:"InstantLoan",path:"src/components/instant-loan/InstantLoan.tsx#InstantLoan"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),configuration=__webpack_require__("./src/core/configuration/index.ts");const ReservationModalBody=({selectedManifestations,selectedPeriodical,work})=>{var _reservationResponse$,_manifestation$editio,_openOrderResponse$su,_openOrderResponse$su2;const t=(0,utils_text.F)(),config=(0,utils_config.UK)(),{defaultInterestDaysForOpenOrder}=(0,configuration.FI)("reservation",configuration.Ay),{matchStrings:instantLoanMatchStrings,threshold:instantLoanThreshold,enabled:instantLoanEnabled}=config("instantLoanConfig",{transformer:"jsonParse"}),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranchesInstantLoan=config("blacklistedInstantLoanBranchesConfig",{transformer:"stringToArray"}),blacklistPickupBranches=config("blacklistedPickupBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.z5)(branches,blacklistBranchesInstantLoan.concat(blacklistPickupBranches)),mainManifestationType=(0,general.VZ)(selectedManifestations),{reservableManifestations}=utils_UseReservableManifestations({manifestations:selectedManifestations,type:mainManifestationType}),queryClient=(0,react_query_es.useQueryClient)(),[reservationResponse,setReservationResponse]=(0,react.useState)(null),[openOrderResponse,setOpenOrderResponse]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(null),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),allPids=(0,general.Y5)(selectedManifestations),faustIds=(0,general.OH)(allPids),{mutate:mutateAddReservations}=(0,fbs.eu)(),{mutate:mutateOpenOrder}=(0,graphql.Bv)(),userResponse=(0,usePatronData.I)(),holdingsResponse=(0,material_helper.us)({faustIds,config}),{track}=(0,useStatistics.B)(),{otherManifestationPreferred}=reservation_useAlternativeAvailableManifestation(work,allPids),manifestationsToReserve=(0,reservation_helper.hn)(reservableManifestations??[],!!selectedPeriodical),{reservablePidsFromAnotherLibrary,materialIsReservableFromAnotherLibrary}=utils_useReservableFromAnotherLibrary(selectedManifestations);if(!userResponse.data||!holdingsResponse.data)return null;const{data:userData}=userResponse,{data:holdingsData}=holdingsResponse,holdings=(0,material_helper.Rr)(holdingsData),reservations=(0,material_helper._i)(holdingsData),{patron}=userData,authorLine=(0,reservation_helper.CF)(selectedManifestations[0],t),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),interestPeriod=selectedInterest||interestPeriods.defaultInterestPeriod.value,expiryDate=(0,reservation_helper.ZI)(interestPeriod),reservationSuccess=(null==reservationResponse?void 0:reservationResponse.success)||!1,reservationResults=null==reservationResponse?void 0:reservationResponse.reservationResults,reservationDetails=null==reservationResponse||null===(_reservationResponse$=reservationResponse.reservationResults[0])||void 0===_reservationResponse$?void 0:_reservationResponse$.reservationDetails,manifestation=(null==manifestationsToReserve?void 0:manifestationsToReserve[0])||selectedManifestations[0],editionText=(0,general.G)(work)&&1!==(null==manifestationsToReserve?void 0:manifestationsToReserve.length)?t("firstAvailableEditionText"):null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary,instantLoanBranchHoldings=(0,reservation_helper.QW)(holdingsData[0].holdings,whitelistBranches,instantLoanMatchStrings??[]),instantLoanBranchHoldingsAboveThreshold=(0,reservation_helper.mR)(instantLoanBranchHoldings,instantLoanThreshold);return react.createElement(react.Fragment,null,!reservationResults&&!openOrderResponse&&react.createElement("section",{className:"reservation-modal"},react.createElement("header",{className:"reservation-modal-header"},react.createElement(cover.Y,{ids:[manifestation.pid],size:"medium",animate:!0}),react.createElement("div",{className:"reservation-modal-description"},react.createElement("div",{className:"reservation-modal-tag"},(0,general.JB)(selectedManifestations)[0]),react.createElement("h2",{className:"text-header-h2 mt-22 mb-8"},manifestation.titles.main,selectedPeriodical&&` ${selectedPeriodical.displayText}`),authorLine&&react.createElement("p",{className:"text-body-medium-regular"},authorLine))),react.createElement("div",null,react.createElement("div",{className:"reservation-modal-submit"},react.createElement(generic_MaterialAvailabilityTextParagraph,null,materialIsReservableFromAnotherLibrary?t("reservableFromAnotherLibraryText"):react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations})),react.createElement(Button.$,{dataCy:"reservation-modal-submit-button",label:t("approveReservationText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:"small",onClick:()=>{if(null!=manifestationsToReserve&&manifestationsToReserve.length&&mutateAddReservations({data:(0,reservation_helper.wT)({manifestations:manifestationsToReserve,selectedBranch,expiryDate,periodical:selectedPeriodical})},{onSuccess:res=>{track("click",{id:statistics.o.reservation.id,name:statistics.o.reservation.name,trackedData:work.workId}),setReservationResponse(res),queryClient.invalidateQueries((0,fbs.BK)({recordid:faustIds}))}}),materialIsReservableFromAnotherLibrary&&patron){const{patronId,name,emailAddress,preferredPickupBranch}=patron;mutateOpenOrder({input:{pids:reservablePidsFromAnotherLibrary,pickUpBranch:selectedBranch?(0,reservation_helper.kd)(selectedBranch):(0,reservation_helper.kd)(preferredPickupBranch),expires:(0,reservation_helper.c8)(Number(selectedInterest??defaultInterestDaysForOpenOrder)),userParameters:{userId:patronId.toString(),userName:name,userMail:emailAddress}}},{onSuccess:res=>{setOpenOrderResponse(res)}})}}})),react.createElement("div",{className:"reservation-modal-list"},react.createElement(ReservationFormListItem.A,{icon:Various_default(),title:t("editionText"),text:(null==selectedPeriodical?void 0:selectedPeriodical.displayText)||editionText||""}),!(0,general.G)(work)&&otherManifestationPreferred&&react.createElement(PromoBar.A,{classNames:"px-35",sticky:!0,type:"info",text:t("materialIsAvailableInAnotherEditionText",{placeholders:{"@title":otherManifestationPreferred.titles.main[0],"@authorAndYear":(0,reservation_helper.CF)(otherManifestationPreferred,t)??"","@reservations":otherManifestationPreferred.reservations}})}),patron&&react.createElement(reservation_UserListItems,{whitelistBranches,patron,branches,selectedBranch,selectBranchHandler:setSelectedBranch,selectedInterest:materialIsReservableFromAnotherLibrary&&null===selectedInterest?Number(defaultInterestDaysForOpenOrder):selectedInterest,setSelectedInterest}),instantLoanEnabled&&instantLoanBranchHoldingsAboveThreshold.length>0&&react.createElement(instant_loan_InstantLoan,{manifestation,instantLoanBranchHoldings:instantLoanBranchHoldingsAboveThreshold})))),(null==openOrderResponse||null===(_openOrderResponse$su=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su?void 0:_openOrderResponse$su.status)&&react.createElement(ModalMessage.A,{title:t("openOrderResponseTitleText"),subTitle:manifestation.titles.main[0],ctaButton:{text:t("okButtonText"),modalId:(0,material_helper.bE)(faustIds),dataCy:"reservation-success-close-button"}},openOrderResponse.submitOrder.status&&react.createElement("p",{"data-cy":"open-oprder-response-status-text",className:"text-body-medium-regular pt-24"},(0,reservation_helper.pS)(null===(_openOrderResponse$su2=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su2?void 0:_openOrderResponse$su2.status,t))),reservationSuccess&&reservationDetails&&react.createElement(reservation_ReservationSucces,{modalId:(0,material_helper.bE)(faustIds),title:manifestation.titles.main[0],preferredPickupBranch:(0,reservation_helper.C4)(reservationDetails.pickupBranch,branches),holdings,numberInQueue:reservationDetails.numberInQueue}),!reservationSuccess&&reservationResults&&react.createElement(reservation_ReservationError,{reservationResults,setReservationResponse}))};try{ReservationModalBody.displayName="ReservationModalBody",ReservationModalBody.__docgenInfo={description:"",displayName:"ReservationModalBody",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"]={docgenInfo:ReservationModalBody.__docgenInfo,name:"ReservationModalBody",path:"src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"})}catch(__react_docgen_typescript_loader_error){}const ReservationModal=({selectedManifestations,selectedPeriodical=null,work,dataCy})=>{const t=(0,utils_text.F)(),faustIds=(0,general.bn)(selectedManifestations);return react.createElement(modal.A,{modalId:(0,material_helper.bE)(faustIds),screenReaderModalDescriptionText:t("reservationModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("reservationModalCloseModalAriaLabelText"),dataCy:dataCy||"reservation-modal"},react.createElement(ReservationModalBody,{selectedManifestations,selectedPeriodical,work}))},reservation_ReservationModal=ReservationModal;try{ReservationModal.displayName="ReservationModal",ReservationModal.__docgenInfo={description:"",displayName:"ReservationModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:{value:"null"},description:"",name:"selectedPeriodical",required:!1,type:{name:"PeriodicalEdition | null | undefined"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModal.tsx#ReservationModal"]={docgenInfo:ReservationModal.__docgenInfo,name:"ReservationModal",path:"src/components/reservation/ReservationModal.tsx#ReservationModal"})}catch(__react_docgen_typescript_loader_error){}var FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const ReservationFindOnShelfModals=({patron,manifestations,selectedPeriodical,setSelectedPeriodical,work})=>{const isUserBlocked=!(!patron||!(0,user.lT)(patron)),titles=manifestations.length>1?work.titles.full:manifestations[0].titles.main,authors=manifestations.length>1?work.creators:manifestations[0].creators;return react.createElement(react.Fragment,null,!(0,user.ok)()&&!isUserBlocked&&react.createElement(reservation_ReservationModal,{selectedManifestations:manifestations,selectedPeriodical,work,dataCy:manifestations.length>1?"reservation-modal-parallel":void 0}),react.createElement(FindOnShelfModal.A,{manifestations,workTitles:titles,authors,selectedPeriodical,setSelectedPeriodical}))},material_ReservationFindOnShelfModals=ReservationFindOnShelfModals;try{ReservationFindOnShelfModals.displayName="ReservationFindOnShelfModals",ReservationFindOnShelfModals.__docgenInfo={description:"",displayName:"ReservationFindOnShelfModals",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | undefined"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"Dispatch>"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"]={docgenInfo:ReservationFindOnShelfModals.__docgenInfo,name:"ReservationFindOnShelfModals",path:"src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"})}catch(__react_docgen_typescript_loader_error){}const material_material=({wid})=>{const t=(0,utils_text.F)(),[selectedManifestations,setSelectedManifestations]=(0,react.useState)(null),[selectedPeriodical,setSelectedPeriodical]=(0,react.useState)(null),{data,isLoading,workType}=(wid=>{const localWork=(0,graphql.RR)({wid}),globalWork=(0,graphql.VL)({wid},{enabled:localWork.isSuccess&&!localWork.data.work}),localWorkData=getData(localWork,"local");if(localWorkData)return localWorkData;return getData(globalWork,"global")||{data:null,isLoading:!0,error:null,workType:"unknown"}})(wid),{data:userData}=(0,usePatronData.I)(),[isUserBlocked,setIsUserBlocked]=(0,react.useState)(null),{track}=(0,useStatistics.B)();if((0,react.useEffect)((()=>{setIsUserBlocked(!(null==userData||!userData.patron||!(0,user.lT)(userData.patron)))}),[userData]),(0,useDeepCompareEffect.A)((()=>{var _data$work,_data$work2,_data$work3,_data$work4,_data$work4$manifesta,_data$work5;null!=data&&null!==(_data$work=data.work)&&void 0!==_data$work&&_data$work.genreAndForm&&track("click",{id:statistics.o.materialGenre.id,name:statistics.o.materialGenre.name,trackedData:data.work.genreAndForm.join(", ")}),null!=data&&null!==(_data$work2=data.work)&&void 0!==_data$work2&&_data$work2.mainLanguages&&track("click",{id:statistics.o.materialLanguage.id,name:statistics.o.materialLanguage.name,trackedData:data.work.mainLanguages.map((language=>language.display)).join(", ")}),null!=data&&null!==(_data$work3=data.work)&&void 0!==_data$work3&&_data$work3.dk5MainEntry&&track("click",{id:statistics.o.materialTopicNumber.id,name:statistics.o.materialTopicNumber.name,trackedData:data.work.dk5MainEntry.display}),null!=data&&null!==(_data$work4=data.work)&&void 0!==_data$work4&&null!==(_data$work4$manifesta=_data$work4.manifestations.latest.audience)&&void 0!==_data$work4$manifesta&&_data$work4$manifesta.generalAudience&&track("click",{id:statistics.o.materialTopicNumber.id,name:statistics.o.materialTopicNumber.name,trackedData:data.work.manifestations.latest.audience.generalAudience.join(", ")}),null!=data&&null!==(_data$work5=data.work)&&void 0!==_data$work5&&_data$work5.fictionNonfiction&&track("click",{id:statistics.o.materialFictionNonFiction.id,name:statistics.o.materialFictionNonFiction.name,trackedData:data.work.fictionNonfiction.display})}),[data]),(0,react.useEffect)((()=>{var _manifestationsByMate;if(null==data||!data.work)return;const{work}=data,urlType=(0,helpers_url.d6)("type"),manifestationsByMaterialType=(0,material_helper.Zh)(work.manifestations.all);if(urlType&&(null===(_manifestationsByMate=manifestationsByMaterialType[urlType])||void 0===_manifestationsByMate?void 0:_manifestationsByMate.length)>0)setSelectedManifestations(manifestationsByMaterialType[urlType]);else{const bestMaterialType=(0,material_helper.SL)(work);setSelectedManifestations(manifestationsByMaterialType[bestMaterialType]),(0,helpers_url.$u)({type:bestMaterialType})}}),[data]),isLoading||null==data||!data.work||!selectedManifestations)return react.createElement(material_MaterialSkeleton,null);const{work,work:{manifestations:{all:manifestations},relations:{hasReview}}}=data,pid=(0,general.hh)(work),detailsListData=(0,material_helper.nW)({manifestation:selectedManifestations[0],work,t}),infomediaIds=(0,material_helper.LX)(selectedManifestations),shouldOpenReviewDisclosure=!!(0,helpers_url.d6)("disclosure");return react.createElement("section",{className:"material-page"},react.createElement(material_MaterialHeader,{wid,work,selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler:setSelectedPeriodical,isGlobalMaterial:"global"===workType},manifestations.map((manifestation=>react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:[manifestation],selectedPeriodical,work,setSelectedPeriodical}))),infomediaIds.length>0&&!(0,user.ok)()&&!isUserBlocked&&react.createElement(infomedia_InfomediaModal,{selectedManifestations,infoMediaId:infomediaIds[0]}),(0,material_buttons_helper.ft)("DigitalArticleService",selectedManifestations)&&!(0,user.ok)()&&!isUserBlocked&&react.createElement(digital_modal_DigitalModal,{pid:selectedManifestations[0].pid,workId:wid}),(0,material_helper.E1)(selectedManifestations)&&react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:selectedManifestations,selectedPeriodical,work,setSelectedPeriodical})),react.createElement(material_MaterialDescription,{pid,work}),"local"===workType&&react.createElement(material_MaterialDisclosure,{title:`${t("editionsText")} (${manifestations.length})`,icon:Various_default(),dataCy:"material-editions-disclosure"},react.createElement(react.Fragment,null,(0,material_helper.zi)(manifestations).map((manifestation=>react.createElement(material_MaterialMainfestationItem,{key:manifestation.pid,manifestation,workId:wid}))))),react.createElement(material_MaterialDisclosure,{dataCy:"material-details-disclosure",title:t("detailsText"),icon:Receipt_default()},react.createElement(MaterialDetailsList.A,{id:`material-details-${wid}`,className:"pl-80 pb-48",data:detailsListData})),hasReview&&hasReview.length>0&&react.createElement(DisclosureControllable.A,{id:"reviews",showContent:shouldOpenReviewDisclosure,cyData:"material-reviews-disclosure",summary:react.createElement(DisclosureSummary.A,{title:t("reviewsText"),mainIconPath:Create_default()})},react.createElement(MaterialReviews,{pids:hasReview.map((review=>review.pid))})))};try{material.displayName="material",material.__docgenInfo={description:"",displayName:"material",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.tsx#material"]={docgenInfo:material.__docgenInfo,name:"material",path:"src/apps/material/material.tsx#material"})}catch(__react_docgen_typescript_loader_error){}const material_entry=(0,utils_config.NV)((0,url.nU)((0,utils_text.i)((({wid})=>react.createElement(guarded_app.A,{app:"material"},react.createElement(material_material,{wid}))))));try{materialentry.displayName="materialentry",materialentry.__docgenInfo={description:"",displayName:"materialentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},alreadyReservedText:{defaultValue:null,description:"",name:"alreadyReservedText",required:!0,type:{name:"string"}},approveReservationText:{defaultValue:null,description:"",name:"approveReservationText",required:!0,type:{name:"string"}},blockedButtonText:{defaultValue:null,description:"",name:"blockedButtonText",required:!0,type:{name:"string"}},cantReserveText:{defaultValue:null,description:"",name:"cantReserveText",required:!0,type:{name:"string"}},cantViewReviewText:{defaultValue:null,description:"",name:"cantViewReviewText",required:!0,type:{name:"string"}},cantViewText:{defaultValue:null,description:"",name:"cantViewText",required:!0,type:{name:"string"}},changeEmailText:{defaultValue:null,description:"",name:"changeEmailText",required:!0,type:{name:"string"}},changeSmsNumberText:{defaultValue:null,description:"",name:"changeSmsNumberText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},closeText:{defaultValue:null,description:"",name:"closeText",required:!0,type:{name:"string"}},daysText:{defaultValue:null,description:"",name:"daysText",required:!0,type:{name:"string"}},descriptionHeadlineText:{defaultValue:null,description:"",name:"descriptionHeadlineText",required:!0,type:{name:"string"}},detailsListAudienceText:{defaultValue:null,description:"",name:"detailsListAudienceText",required:!0,type:{name:"string"}},detailsListAgeRangeText:{defaultValue:null,description:"",name:"detailsListAgeRangeText",required:!0,type:{name:"string"}},detailsListAuthorsText:{defaultValue:null,description:"",name:"detailsListAuthorsText",required:!0,type:{name:"string"}},detailsListNotesText:{defaultValue:null,description:"",name:"detailsListNotesText",required:!0,type:{name:"string"}},detailsListPhysicalDescriptionText:{defaultValue:null,description:"",name:"detailsListPhysicalDescriptionText",required:!0,type:{name:"string"}},detailsListHostPublicationText:{defaultValue:null,description:"",name:"detailsListHostPublicationText",required:!0,type:{name:"string"}},detailsListSourceText:{defaultValue:null,description:"",name:"detailsListSourceText",required:!0,type:{name:"string"}},detailsListPartsText:{defaultValue:null,description:"",name:"detailsListPartsText",required:!0,type:{name:"string"}},detailsListContributorsText:{defaultValue:null,description:"",name:"detailsListContributorsText",required:!0,type:{name:"string"}},detailsListEditionText:{defaultValue:null,description:"",name:"detailsListEditionText",required:!0,type:{name:"string"}},detailsListFirstEditionYearText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearText",required:!0,type:{name:"string"}},detailsListFirstEditionYearUnknownText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearUnknownText",required:!0,type:{name:"string"}},detailsListGenreAndFormText:{defaultValue:null,description:"",name:"detailsListGenreAndFormText",required:!0,type:{name:"string"}},detailsListIsbnText:{defaultValue:null,description:"",name:"detailsListIsbnText",required:!0,type:{name:"string"}},detailsListLanguageText:{defaultValue:null,description:"",name:"detailsListLanguageText",required:!0,type:{name:"string"}},detailsListOriginalTitleText:{defaultValue:null,description:"",name:"detailsListOriginalTitleText",required:!0,type:{name:"string"}},detailsListPlayTimeText:{defaultValue:null,description:"",name:"detailsListPlayTimeText",required:!0,type:{name:"string"}},detailsListPublisherText:{defaultValue:null,description:"",name:"detailsListPublisherText",required:!0,type:{name:"string"}},detailsListScopeText:{defaultValue:null,description:"",name:"detailsListScopeText",required:!0,type:{name:"string"}},detailsListTypeText:{defaultValue:null,description:"",name:"detailsListTypeText",required:!0,type:{name:"string"}},detailsOfTheMaterialText:{defaultValue:null,description:"",name:"detailsOfTheMaterialText",required:!0,type:{name:"string"}},detailsText:{defaultValue:null,description:"",name:"detailsText",required:!0,type:{name:"string"}},editionsText:{defaultValue:null,description:"",name:"editionsText",required:!0,type:{name:"string"}},editionText:{defaultValue:null,description:"",name:"editionText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},expandMoreText:{defaultValue:null,description:"",name:"expandMoreText",required:!0,type:{name:"string"}},fictionNonfictionText:{defaultValue:null,description:"",name:"fictionNonfictionText",required:!0,type:{name:"string"}},filmAdaptationsText:{defaultValue:null,description:"",name:"filmAdaptationsText",required:!0,type:{name:"string"}},findOnBookshelfText:{defaultValue:null,description:"",name:"findOnBookshelfText",required:!0,type:{name:"string"}},findOnShelfModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"findOnShelfModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfModalListFindOnShelfText:{defaultValue:null,description:"",name:"findOnShelfModalListFindOnShelfText",required:!0,type:{name:"string"}},findOnShelfModalListItemCountText:{defaultValue:null,description:"",name:"findOnShelfModalListItemCountText",required:!0,type:{name:"string"}},findOnShelfModalListMaterialText:{defaultValue:null,description:"",name:"findOnShelfModalListMaterialText",required:!0,type:{name:"string"}},findOnShelfModalNoLocationSpecifiedText:{defaultValue:null,description:"",name:"findOnShelfModalNoLocationSpecifiedText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalEditionDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalEditionDropdownText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalYearDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalYearDropdownText",required:!0,type:{name:"string"}},findOnShelfModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"findOnShelfModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},findOnShelfTableDescriptionText:{defaultValue:null,description:"",name:"findOnShelfTableDescriptionText",required:!0,type:{name:"string"}},firstAvailableEditionText:{defaultValue:null,description:"",name:"firstAvailableEditionText",required:!0,type:{name:"string"}},getOnlineText:{defaultValue:null,description:"",name:"getOnlineText",required:!0,type:{name:"string"}},goToText:{defaultValue:null,description:"",name:"goToText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},identifierText:{defaultValue:null,description:"",name:"identifierText",required:!0,type:{name:"string"}},infomediaModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"infomediaModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},infomediaModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"infomediaModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},inSameSeriesText:{defaultValue:null,description:"",name:"inSameSeriesText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},instantLoanSubTitleText:{defaultValue:null,description:"",name:"instantLoanSubTitleText",required:!0,type:{name:"string"}},instantLoanTitleText:{defaultValue:null,description:"",name:"instantLoanTitleText",required:!0,type:{name:"string"}},instantLoanUnderlineDescriptionText:{defaultValue:null,description:"",name:"instantLoanUnderlineDescriptionText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},librariesHaveTheMaterialText:{defaultValue:null,description:"",name:"librariesHaveTheMaterialText",required:!0,type:{name:"string"}},listenOnlineText:{defaultValue:null,description:"",name:"listenOnlineText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},loginToSeeReviewText:{defaultValue:null,description:"",name:"loginToSeeReviewText",required:!0,type:{name:"string"}},materialHeaderAllEditionsText:{defaultValue:null,description:"",name:"materialHeaderAllEditionsText",required:!0,type:{name:"string"}},materialHeaderAuthorByText:{defaultValue:null,description:"",name:"materialHeaderAuthorByText",required:!0,type:{name:"string"}},materialIsAvailableInAnotherEditionText:{defaultValue:null,description:"",name:"materialIsAvailableInAnotherEditionText",required:!0,type:{name:"string"}},materialIsIncludedText:{defaultValue:null,description:"",name:"materialIsIncludedText",required:!0,type:{name:"string"}},materialIsLoanedOutText:{defaultValue:null,description:"",name:"materialIsLoanedOutText",required:!0,type:{name:"string"}},materialReservationInfoText:{defaultValue:null,description:"",name:"materialReservationInfoText",required:!0,type:{name:"string"}},materialsInStockInfoText:{defaultValue:null,description:"",name:"materialsInStockInfoText",required:!0,type:{name:"string"}},missingDataText:{defaultValue:null,description:"",name:"missingDataText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldLabelText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldLabelText",required:!0,type:{name:"string"}},notLivingInMunicipalityText:{defaultValue:null,description:"",name:"notLivingInMunicipalityText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},numberInQueueText:{defaultValue:null,description:"",name:"numberInQueueText",required:!0,type:{name:"string"}},okButtonText:{defaultValue:null,description:"",name:"okButtonText",required:!0,type:{name:"string"}},onlineLimitMonthAudiobookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthAudiobookInfoText",required:!0,type:{name:"string"}},onlineLimitMonthEbookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthEbookInfoText",required:!0,type:{name:"string"}},openOrderAuthenticationErrorText:{defaultValue:null,description:"",name:"openOrderAuthenticationErrorText",required:!0,type:{name:"string"}},openOrderErrorMissingPincodeText:{defaultValue:null,description:"",name:"openOrderErrorMissingPincodeText",required:!0,type:{name:"string"}},openOrderInvalidOrderText:{defaultValue:null,description:"",name:"openOrderInvalidOrderText",required:!0,type:{name:"string"}},openOrderNoServicerequesterText:{defaultValue:null,description:"",name:"openOrderNoServicerequesterText",required:!0,type:{name:"string"}},openOrderNotOwnedIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedNoIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedNoIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedWrongIllMediumtypeText:{defaultValue:null,description:"",name:"openOrderNotOwnedWrongIllMediumtypeText",required:!0,type:{name:"string"}},openOrderOrsErrorText:{defaultValue:null,description:"",name:"openOrderOrsErrorText",required:!0,type:{name:"string"}},openOrderOwnedOwnCatalogueText:{defaultValue:null,description:"",name:"openOrderOwnedOwnCatalogueText",required:!0,type:{name:"string"}},openOrderOwnedWrongMediumtypeText:{defaultValue:null,description:"",name:"openOrderOwnedWrongMediumtypeText",required:!0,type:{name:"string"}},openOrderResponseTitleText:{defaultValue:null,description:"",name:"openOrderResponseTitleText",required:!0,type:{name:"string"}},openOrderServiceUnavailableText:{defaultValue:null,description:"",name:"openOrderServiceUnavailableText",required:!0,type:{name:"string"}},openOrderStatusOwnedAcceptedText:{defaultValue:null,description:"",name:"openOrderStatusOwnedAcceptedText",required:!0,type:{name:"string"}},openOrderUnknownErrorText:{defaultValue:null,description:"",name:"openOrderUnknownErrorText",required:!0,type:{name:"string"}},openOrderUnknownPickupagencyText:{defaultValue:null,description:"",name:"openOrderUnknownPickupagencyText",required:!0,type:{name:"string"}},openOrderUnknownUserText:{defaultValue:null,description:"",name:"openOrderUnknownUserText",required:!0,type:{name:"string"}},openOrderUserBlockedByAgencyText:{defaultValue:null,description:"",name:"openOrderUserBlockedByAgencyText",required:!0,type:{name:"string"}},openOrderUserNoLongerExistOnAgencyText:{defaultValue:null,description:"",name:"openOrderUserNoLongerExistOnAgencyText",required:!0,type:{name:"string"}},openOrderUserNotVerifiedText:{defaultValue:null,description:"",name:"openOrderUserNotVerifiedText",required:!0,type:{name:"string"}},orderDigitalCopyButtonLoadingText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonLoadingText",required:!0,type:{name:"string"}},orderDigitalCopyButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonText",required:!0,type:{name:"string"}},orderDigitalCopyDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyEmailLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyEmailLabelText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackButtonText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorAgencyNotSubscribedText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorInvalidPickupBranchText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMissingClientConfigurationText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorPidNotReservableText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorUnauthenticatedUserText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackOkText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackOkText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackTitleText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackBorchkUserNotVerifiedText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackBorchkUserNotVerifiedText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackUnknownUserText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackUnknownUserText",required:!0,type:{name:"string"}},orderDigitalCopyModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMissingMunicipalityagencyidText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMissingMunicipalityagencyidText",required:!0,type:{name:"string"}},orderDigitalCopyTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyTitleText",required:!0,type:{name:"string"}},outOfText:{defaultValue:null,description:"",name:"outOfText",required:!0,type:{name:"string"}},periodicalSelectEditionText:{defaultValue:null,description:"",name:"periodicalSelectEditionText",required:!0,type:{name:"string"}},periodicalSelectYearText:{defaultValue:null,description:"",name:"periodicalSelectYearText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},queueText:{defaultValue:null,description:"",name:"queueText",required:!0,type:{name:"string"}},ratingIsText:{defaultValue:null,description:"",name:"ratingIsText",required:!0,type:{name:"string"}},readArticleText:{defaultValue:null,description:"",name:"readArticleText",required:!0,type:{name:"string"}},receiveEmailWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveEmailWhenMaterialReadyText",required:!0,type:{name:"string"}},receiveSmsWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveSmsWhenMaterialReadyText",required:!0,type:{name:"string"}},reservableFromAnotherLibraryText:{defaultValue:null,description:"",name:"reservableFromAnotherLibraryText",required:!0,type:{name:"string"}},reservationErrorsDescriptionText:{defaultValue:null,description:"",name:"reservationErrorsDescriptionText",required:!0,type:{name:"string"}},reservationErrorsTitleText:{defaultValue:null,description:"",name:"reservationErrorsTitleText",required:!0,type:{name:"string"}},reservationModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"reservationModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},reservationModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"reservationModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},reservationSuccesIsReservedForYouText:{defaultValue:null,description:"",name:"reservationSuccesIsReservedForYouText",required:!0,type:{name:"string"}},reservationSuccessPreferredPickupBranchText:{defaultValue:null,description:"",name:"reservationSuccessPreferredPickupBranchText",required:!0,type:{name:"string"}},reservationSuccesTitleText:{defaultValue:null,description:"",name:"reservationSuccesTitleText",required:!0,type:{name:"string"}},reserveBookText:{defaultValue:null,description:"",name:"reserveBookText",required:!0,type:{name:"string"}},reserveText:{defaultValue:null,description:"",name:"reserveText",required:!0,type:{name:"string"}},reserveWithMaterialTypeText:{defaultValue:null,description:"",name:"reserveWithMaterialTypeText",required:!0,type:{name:"string"}},reviewsText:{defaultValue:null,description:"",name:"reviewsText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},seeOnlineText:{defaultValue:null,description:"",name:"seeOnlineText",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},subjectNumberText:{defaultValue:null,description:"",name:"subjectNumberText",required:!0,type:{name:"string"}},tryAginButtonText:{defaultValue:null,description:"",name:"tryAginButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedInstantLoanBranchesConfig:{defaultValue:null,description:"",name:"blacklistedInstantLoanBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},instantLoanConfig:{defaultValue:null,description:"",name:"instantLoanConfig",required:!0,type:{name:"string"}},smsNotificationsForReservationsEnabledConfig:{defaultValue:null,description:"",name:"smsNotificationsForReservationsEnabledConfig",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.entry.tsx#materialentry"]={docgenInfo:materialentry.__docgenInfo,name:"materialentry",path:"src/apps/material/material.entry.tsx#materialentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const material_dev={title:"Apps / Material",component:material_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},wid:{name:"Work ID",defaultValue:"work-of:870970-basis:52557240",control:{type:"text"}},smsNotificationsForReservationsEnabledConfig:{name:"SMS notifications for reservations is enabled",defaultValue:"1",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedInstantLoanBranchesConfig:{name:"Blacklisted Instant Loan branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},materialHeaderAllEditionsText:{name:"Text for the fiction edition text",defaultValue:"All editions",control:{type:"text"}},materialHeaderAuthorByText:{name:"By (author)",defaultValue:"By",control:{type:"text"}},periodicalSelectYearText:{name:"Year",defaultValue:"Year",control:{type:"text"}},periodicalSelectEditionText:{name:"Edition/Week",defaultValue:"Edition",control:{type:"text"}},reserveBookText:{name:"Reserve",defaultValue:"Reserve book",control:{type:"text"}},reserveText:{name:"Reserve",defaultValue:"Reserve",control:{type:"text"}},reserveWithMaterialTypeText:{name:"Reserve",defaultValue:"Reserve @materialType",control:{type:"text"}},reservableFromAnotherLibraryText:{name:"Reservable on another library",defaultValue:"Ordered from another library.",control:{type:"text"}},findOnBookshelfText:{name:"Find on bookshelf",defaultValue:"Find on shelf",control:{type:"text"}},descriptionHeadlineText:{name:"Description headline",defaultValue:"Description",control:{type:"text"}},identifierText:{name:"Identifier/topic text",defaultValue:"Tags",control:{type:"text"}},inSameSeriesText:{name:"In same series as",defaultValue:"In the same series",control:{type:"text"}},numberDescriptionText:{name:"Number",defaultValue:"Nr.",control:{type:"text"}},subjectNumberText:{name:"Subject number (Emnetal)",defaultValue:"Emnetal",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},loginToSeeReviewText:{name:"Login to see Review",defaultValue:"Login to see the review.",control:{type:"text"}},cantViewReviewText:{name:"Cannot view Review",defaultValue:"Cannot view the review.",control:{type:"text"}},ratingIsText:{name:"Rating is",defaultValue:"Rating of this item is @heartCount out of @numberOfHeartsPossible hearts",control:{type:"text"}},outOfText:{name:"X 'out of' Y",defaultValue:"out of",control:{type:"text"}},detailsOfTheMaterialText:{name:"Details of the material",defaultValue:"Details about the material",control:{type:"text"}},editionsText:{name:"Editions",defaultValue:"Editions",control:{type:"text"}},fictionNonfictionText:{name:"Fiction Nonfiction",defaultValue:"Fictional",control:{type:"text"}},detailsText:{name:"Details",defaultValue:"Details",control:{type:"text"}},reviewsText:{name:"Reviews",defaultValue:"Reviews",control:{type:"text"}},detailsListTypeText:{name:"Type",defaultValue:"Type",control:{type:"text"}},detailsListLanguageText:{name:"Language",defaultValue:"Language",control:{type:"text"}},detailsListContributorsText:{name:"Contributors",defaultValue:"Contributors",control:{type:"text"}},detailsListOriginalTitleText:{name:"Original title",defaultValue:"Original title",control:{type:"text"}},detailsListIsbnText:{name:"ISBN",defaultValue:"ISBN",control:{type:"text"}},detailsListScopeText:{name:"Scope",defaultValue:"Scope",control:{type:"text"}},detailsListPublisherText:{name:"Publisher",defaultValue:"Publisher",control:{type:"text"}},detailsListAudienceText:{name:"Audience",defaultValue:"Audience",control:{type:"text"}},detailsListAgeRangeText:{name:"Age range",defaultValue:"for @ageRange year olds",control:{type:"text"}},detailsListGenreAndFormText:{name:"Genre and form",defaultValue:"Genre",control:{type:"text"}},detailsListFirstEditionYearText:{name:"First edition year",defaultValue:"first edition year",control:{type:"text"}},detailsListPlayTimeText:{name:"Play time",defaultValue:"Play time",control:{type:"text"}},detailsListEditionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},detailsListAuthorsText:{name:"Authors",defaultValue:"Authors",control:{type:"text"}},detailsListNotesText:{name:"Notes",defaultValue:"Notes",control:{type:"text"}},detailsListPhysicalDescriptionText:{name:"Dimensions",defaultValue:"Dimensions",control:{type:"text"}},detailsListHostPublicationText:{name:"Host Publication",defaultValue:"Host Publication",control:{type:"text"}},detailsListSourceText:{name:"Source",defaultValue:"Source",control:{type:"text"}},detailsListPartsText:{name:"Contents",defaultValue:"Contents",control:{type:"text"}},editionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},readArticleText:{name:"Read article",defaultValue:"Read article",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},getOnlineText:{name:"Get online",defaultValue:"Get online",control:{type:"text"}},seeOnlineText:{name:"See online",defaultValue:"See online",control:{type:"text"}},listenOnlineText:{name:"Listen online",defaultValue:"Listen online",control:{type:"text"}},cantReserveText:{name:"Can't be reserved",defaultValue:"Can't be reserved",control:{type:"text"}},notLivingInMunicipalityText:{name:"Not living in municipality",defaultValue:"You don't live in the municipality where this library is located.",control:{type:"text"}},blockedButtonText:{name:"Blocked button text",defaultValue:"User blocked",control:{type:"text"}},cantViewText:{name:"Can't be viewed",defaultValue:"Can't be viewed",control:{type:"text"}},goToText:{name:"Go to",defaultValue:"Go to @source",control:{type:"text"}},materialIsLoanedOutText:{name:"Material is loaned out",defaultValue:"Material is loaned out",control:{type:"text"}},materialIsIncludedText:{name:"Material is included",defaultValue:"This material doesn't count towards your loan quota",control:{type:"text"}},materialsInStockInfoText:{name:"Materials in stock info text",defaultValue:'{"type":"plural","text":["We have 1 copy of the material in stock. ","We have @count copies of the material in stock."]}',control:{type:"text"}},materialReservationInfoText:{name:"Material Reservation info text",defaultValue:'{"type":"plural","text":["1 copy has been reserved.","@count copies have been reserved."]}',control:{type:"text"}},onlineLimitMonthEbookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible e-books this month",control:{type:"text"}},onlineLimitMonthAudiobookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible audio-books this month",control:{type:"text"}},approveReservationText:{name:"Approve reservation",defaultValue:"Approve reservation",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{name:"Pick up at",defaultValue:"Pick up at",control:{type:"text"}},receiveSmsWhenMaterialReadyText:{name:"You will receive an SMS when the material is ready",defaultValue:"You will receive an SMS when the material is ready",control:{type:"text"}},receiveEmailWhenMaterialReadyText:{name:"Receive mail when the material is ready",defaultValue:"You will receive an email when the material is ready",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{name:"Have no interest after",defaultValue:"Have no interest after",control:{type:"text"}},daysText:{name:"Days",defaultValue:"Days",control:{type:"text"}},reservationSuccesTitleText:{name:"Reservation Success title",defaultValue:"Material is available and reserved for you!",control:{type:"text"}},reservationSuccesIsReservedForYouText:{name:"Reservation Success Title",defaultValue:"is reserved for you",control:{type:"text"}},reservationSuccessPreferredPickupBranchText:{name:"Reservation Preferred pickup branch",defaultValue:"Material is available and you will get a message when it is ready for pickup - pickup at @branch",control:{type:"text"}},reservationErrorsTitleText:{name:"Reservation Error title",defaultValue:"Failed to reserve the material",control:{type:"text"}},reservationErrorsDescriptionText:{name:"Reservation Error description",defaultValue:"We're sorry. Unfortunately, there has been an error. Try again, please.",control:{type:"text"}},tryAginButtonText:{name:"Try again button text",defaultValue:"Try again",control:{type:"text"}},okButtonText:{name:"Ok button text",defaultValue:"Ok",control:{type:"text"}},missingDataText:{name:"Missing data text",defaultValue:"Missing data",control:{type:"text"}},reservationModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},reservationModalCloseModalAriaLabelText:{name:"Close Reservation modal",defaultValue:"Close reservation modal",control:{type:"text"}},librariesHaveTheMaterialText:{name:"Libraries have the material",defaultValue:"libraries have material",control:{type:"text"}},findOnShelfModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},findOnShelfModalCloseModalAriaLabelText:{name:"Close findOnShelf modal",defaultValue:"Close reservation modal",control:{type:"text"}},findOnShelfTableDescriptionText:{name:"Find on shelf table description",defaultValue:"Find @work on shelf in the @branch branch",control:{type:"text"}},findOnShelfModalListMaterialText:{name:"Material",defaultValue:"Material",control:{type:"text"}},findOnShelfModalListFindOnShelfText:{name:"Find it on shelf",defaultValue:"Find it on shelf",control:{type:"text"}},findOnShelfModalListItemCountText:{name:"Home",defaultValue:"home",control:{type:"text"}},findOnShelfModalNoLocationSpecifiedText:{name:"No location for find on shelf specified",defaultValue:"-",control:{type:"text"}},findOnShelfModalPeriodicalYearDropdownText:{name:"Find on shelf modal periodical dropdown - choose year",defaultValue:"Choose periodical year",control:{type:"text"}},findOnShelfModalPeriodicalEditionDropdownText:{name:"Find on shelf modal periodical dropdown - choose edition/volume",defaultValue:"Choose periodical edition",control:{type:"text"}},numberInQueueText:{name:"Number in queue text",defaultValue:"You are number @number in the queue.",control:{type:"text"}},alreadyReservedText:{name:"Already reserved text",defaultValue:"You already reserved this material",control:{type:"text"}},closeText:{name:"Close text",defaultValue:"Close",control:{type:"text"}},modalReservationFormEmailHeaderTitleText:{name:"Modal reservation form email header title",defaultValue:"Change email",control:{type:"text"}},modalReservationFormEmailHeaderDescriptionText:{name:"Modal reservation form email header description",defaultValue:"If you wish to receive notification emails you can add or change your email address here.",control:{type:"text"}},modalReservationFormEmailInputFieldLabelText:{name:"Modal reservation form email input field label",defaultValue:"Email",control:{type:"text"}},modalReservationFormEmailInputFieldDescriptionText:{name:"Modal reservation form email input field description",defaultValue:"Add email",control:{type:"text"}},modalReservationFormSmsHeaderTitleText:{name:"Modal reservation form sms header title",defaultValue:"Change phone number",control:{type:"text"}},modalReservationFormSmsHeaderDescriptionText:{name:"Modal reservation form sms header description",defaultValue:"If you wish to receive notification sms you can add or change your phone number here.",control:{type:"text"}},modalReservationFormSmsInputFieldLabelText:{name:"Modal reservation form sms input field label",defaultValue:"Phone number",control:{type:"text"}},modalReservationFormSmsInputFieldDescriptionText:{name:"Modal reservation form sms input field description",defaultValue:"Phone number",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},infomediaModalScreenReaderModalDescriptionText:{name:"Infomedia modal screen reader description",defaultValue:"Modal for infomedia",control:{type:"text"}},infomediaModalCloseModalAriaLabelText:{name:"Close infomedia modal",defaultValue:"Close infomedia modal",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{name:"Order digital copy modal screen reader description",defaultValue:"Modal for Order digital copy",control:{type:"text"}},orderDigitalCopyModalCloseModalAriaLabelText:{name:"Close order digital copy modal",defaultValue:"Close Order digital copy modal",control:{type:"text"}},orderDigitalCopyTitleText:{name:"Order digital copy title text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyDescriptionText:{name:"Order digital copy description text",defaultValue:"You can order a digital copy of this material. The digital copy will be sent to your email address.",control:{type:"text"}},orderDigitalCopyButtonText:{name:"Order digital copy button text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyButtonLoadingText:{name:"Order digital copy button loading text",defaultValue:"Ordering digital copy",control:{type:"text"}},orderDigitalCopyFeedbackTitleText:{name:"Order digital copy feedback title",defaultValue:"Digital copy receipt",control:{type:"text"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{name:"Order digital copy agency not subscribed",defaultValue:"The agency is not subscribed to the service. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{name:"Order digital copy invalid pickup branch",defaultValue:"The pickup branch is not valid. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{name:"Order digital copy missing client configuration",defaultValue:"The client configuration is missing. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{name:"Order digital copy pid not reservable",defaultValue:"The material is not reservable. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{name:"Order digital copy unauthenticated user",defaultValue:"You are not logged in. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackOkText:{name:"Order digital copy success description text",defaultValue:"The digital copy has been ordered. You will receive an email when the digital copy is ready.",control:{type:"text"}},orderDigitalCopyFeedbackButtonText:{name:"Order digital copy success button text",defaultValue:"Close",control:{type:"text"}},orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText:{name:"Borchk user blocked by agency text",defaultValue:"Borchk user blocked by agency",control:{type:"text"}},orderDigitalCopyFeedbackBorchkUserNotVerifiedText:{name:"Borchk user not verified text",defaultValue:"Borchk user not verified",control:{type:"text"}},orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText:{name:"Borchk user no longer exists on agency text",defaultValue:"Borchk user no longer exists on agency",control:{type:"text"}},orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText:{name:"Error municipality agency ID not found text",defaultValue:"Error municipality agency ID not found",control:{type:"text"}},orderDigitalCopyFeedbackUnknownUserText:{name:"Unknown user text",defaultValue:"Unknown user",control:{type:"text"}},orderDigitalCopyEmailLabelText:{name:"Order digital copy error email text",defaultValue:"Email",control:{type:"text"}},orderDigitalCopyFeedbackErrorMissingMunicipalityagencyidText:{name:"Error missing municipality agency ID text",defaultValue:"Error missing municipality agency ID",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},materialIsAvailableInAnotherEditionText:{name:"Skip queue material is available in another edition",defaultValue:"Skip the queue - The material is available in another edition - @title @authorAndYear - reservations: @reservations",control:{type:"text"}},detailsListFirstEditionYearUnknownText:{name:"Unknown",defaultValue:"Unknown",control:{type:"text"}},firstAvailableEditionText:{name:"First available edition",defaultValue:"First available edition",control:{type:"text"}},filmAdaptationsText:{name:"Film adaptations text",defaultValue:"Film adaptations",control:{type:"text"}},expandMoreText:{name:"Expand more text",defaultValue:"Expand more",control:{type:"text"}},changeSmsNumberText:{name:"Change sms number text",defaultValue:"Change sms number",control:{type:"text"}},changeEmailText:{name:"Change email text",defaultValue:"Change email",control:{type:"text"}},instantLoanTitleText:{name:"Instant loan title",control:{type:"text"},defaultValue:"Hent bogen nu"},instantLoanSubTitleText:{name:"Instant loan subtitle",control:{type:"text"},defaultValue:"Spring køen over og hent bogen nu på"},instantLoanUnderlineDescriptionText:{name:"Instant loan underline description",control:{type:"text"},defaultValue:"Bogen er tilgængelig på disse biblioteker nær dig"},instantLoanConfig:{name:"Instant loan config",control:{type:"text"},defaultValue:'{\n "threshold": "1",\n "matchStrings": ["31 dages lånetid til alm lånere"],\n "enabled": "true" }'},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":"14", "label":"14 days" } }',control:{type:"text"}},openOrderResponseTitleText:{name:"Reservation Success title",defaultValue:"Order from another library:",control:{type:"text"}},openOrderAuthenticationErrorText:{name:"Open order authentication error text",defaultValue:"Authentication error occurred",control:{type:"text"}},openOrderUserBlockedByAgencyText:{name:"Open order user blocked by agency text",defaultValue:"You are blocked by the agency",control:{type:"text"}},openOrderUserNotVerifiedText:{name:"Open order user not verified text",defaultValue:"User could not be verified",control:{type:"text"}},openOrderUserNoLongerExistOnAgencyText:{name:"Open order user no longer exists on agency text",defaultValue:"User no longer exists at the specified agency",control:{type:"text"}},openOrderInvalidOrderText:{name:"Open order invalid order text",defaultValue:"Your order is invalid",control:{type:"text"}},openOrderNotOwnedIllLocText:{name:"Open order item localized for ILL text",defaultValue:"Your material has been ordered from another library",control:{type:"text"}},openOrderNotOwnedNoIllLocText:{name:"Open order item not localized for ILL text",defaultValue:"Item not available and not localized for ILL",control:{type:"text"}},openOrderNotOwnedWrongIllMediumtypeText:{name:"Open order wrong ILL medium type text",defaultValue:"Item not available, ILL of this medium type not accepted",control:{type:"text"}},openOrderNoServicerequesterText:{name:"Open order no service requester text",defaultValue:"Service requester is obligatory",control:{type:"text"}},openOrderOrsErrorText:{name:"Open order ORS error text",defaultValue:"Error occurred while sending order to ORS",control:{type:"text"}},openOrderStatusOwnedAcceptedText:{name:"Open order status owned accepted text",defaultValue:"Your order is accepted",control:{type:"text"}},openOrderOwnedOwnCatalogueText:{name:"Open order available in own catalogue text",defaultValue:"Item available, order through the library's catalogue",control:{type:"text"}},openOrderOwnedWrongMediumtypeText:{name:"Open order wrong medium type for available item text",defaultValue:"Item available but medium type not accepted",control:{type:"text"}},openOrderServiceUnavailableText:{name:"Open order service unavailable text",defaultValue:"Service is currently unavailable",control:{type:"text"}},openOrderUnknownErrorText:{name:"Open order unknown error text",defaultValue:"An unknown error occurred",control:{type:"text"}},openOrderUnknownPickupagencyText:{name:"Open order unknown pickup agency text",defaultValue:"Specified pickup agency not found",control:{type:"text"}},openOrderUnknownUserText:{name:"Open order unknown user text",defaultValue:"User not found",control:{type:"text"}},openOrderErrorMissingPincodeText:{name:"Open order error missing pincode text",defaultValue:"Missing pincode",control:{type:"text"}}}},Template=args=>react.createElement(material_entry,args),Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={wid:"work-of:870970-basis:06373674"};const Infomedia=Template.bind({});Infomedia.args={wid:"work-of:870971-avis:35731733"};const HarryPotter=Template.bind({});HarryPotter.args={wid:"work-of:870970-basis:22629344"};const TurenGårTilRom=Template.bind({});TurenGårTilRom.args={wid:"work-of:870970-basis:61991484"};const Digital=Template.bind({});Digital.args={wid:"work-of:870971-tsart:34310815"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={wid:"work-of:870970-basis:54129807"};const EBogBlaTitle=Template.bind({});EBogBlaTitle.args={wid:"work-of:870970-basis:52880831"};const LangePeter=Template.bind({});LangePeter.args={wid:"work-of:870970-basis:01196669"};const material_dev_InstantLoan=Template.bind({});material_dev_InstantLoan.args={wid:"work-of:870970-basis:134015012"};const Dinosaurierfedern=Template.bind({});Dinosaurierfedern.args={wid:"work-of:870970-basis:44805421"};const Underverden=Template.bind({});Underverden.args={wid:"work-of:870970-basis:52886619"};const overbygningsMatriale=Template.bind({});overbygningsMatriale.args={wid:"work-of:870970-basis:44926407"};const globalMaterial=Template.bind({});globalMaterial.args={wid:"work-of:870970-basis:07185995"};const onlyOneEdition=Template.bind({});onlyOneEdition.args={wid:"work-of:870970-basis:52796202"};const digitalArticle=Template.bind({});digitalArticle.args={wid:"work-of:870971-tsart:36297484"};const inLargeSameSeriesAndIrregularFaustId=Template.bind({});inLargeSameSeriesAndIrregularFaustId.args={wid:"work-of:150086-netmusik:BIS-2067"}},"./src/apps/menu/menu.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserMenu:()=>UserMenu,default:()=>menu_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),icon_profile=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),icon_profile_default=__webpack_require__.n(icon_profile),url=__webpack_require__("./src/core/utils/url.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const menu_not_logged_in=()=>{const t=(0,utils_text.F)(),u=(0,url.Ik)(),menuLoginUrl=u("menuLoginUrl"),menuSignUpUrl=u("menuSignUpUrl"),{userMenuAnonymous:userMenuAnonymousModalId}=(0,modal_helpers.c6)();return react.createElement(modal.A,{classNames:"modal-right modal--no-padding",modalId:userMenuAnonymousModalId,closeModalAriaLabelText:t("menuNotAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuNotAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement("div",{className:"modal-login modal-login--anonymous"},react.createElement(Link.A,{href:menuLoginUrl,className:"btn-primary btn-filled btn-large arrow__hover--right-small"},t("menuLoginText")),react.createElement(Link.A,{href:menuSignUpUrl,className:"mt-32 link-tag color-secondary-gray modal-login__btn-create-profile"},t("menuSignUpText"))))};try{menunotloggedin.displayName="menunotloggedin",menunotloggedin.__docgenInfo={description:"",displayName:"menunotloggedin",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"]={docgenInfo:menunotloggedin.__docgenInfo,name:"menunotloggedin",path:"src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const MenuNavigationItem=({loansCount,reservationCount,feeCount,menuNavigationItem,dataCy="menu-navigation-item"})=>{const dataMap={1:loansCount,2:reservationCount,4:feeCount},{link,name,dataId}=menuNavigationItem;return react.createElement("li",{"data-cy":`${dataCy}-${name.toLowerCase()}`,className:"link-filters mb-16"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("a",{href:link,className:"link-tag link-tag link-filters__tag","aria-label":`${name} ${dataMap[dataId]||""}`},name),0!==dataMap[dataId]&&react.createElement("span",{className:"link-filters__counter","aria-hidden":"true"},dataMap[dataId])))},menu_navigation_list_MenuNavigationItem=MenuNavigationItem;try{MenuNavigationItem.displayName="MenuNavigationItem",MenuNavigationItem.__docgenInfo={description:"",displayName:"MenuNavigationItem",props:{loansCount:{defaultValue:null,description:"",name:"loansCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},feeCount:{defaultValue:null,description:"",name:"feeCount",required:!0,type:{name:"number"}},menuNavigationItem:{defaultValue:null,description:"",name:"menuNavigationItem",required:!0,type:{name:"MenuNavigationDataType"}},dataCy:{defaultValue:{value:"menu-navigation-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"]={docgenInfo:MenuNavigationItem.__docgenInfo,name:"MenuNavigationItem",path:"src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx"),usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const MenuLoggedInContent=({pageSize})=>{var _userData$patron;const t=(0,utils_text.F)(),u=(0,url.Ik)(),userProfileUrl=u("userProfileUrl"),logoutUrl=u("logoutUrl"),config=(0,utils_config.UK)(),{all:{reservations}}=(0,useReservations.A)(),{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue}}=(0,useLoans.A)(),{data:patronData}=(0,usePatronData.I)(),{data:fbsFees=[]}=(0,fbs.J2)({includepaid:!1,includenonpayable:!0}),menuNavigationData=config("menuNavigationDataConfig",{transformer:"jsonParse"}),[userData,setUserData]=(0,react.useState)(),[feeCount,setFeeCount]=(0,react.useState)(0);(0,react.useEffect)((()=>{setUserData(patronData)}),[patronData]),(0,react.useEffect)((()=>{fbsFees&&setFeeCount(fbsFees.length)}),[fbsFees]);const showNotifications=0!==loansOverdue.length||0!==loansSoonOverdue.length||0!==reservations.length;return react.createElement("div",{className:"modal-login modal-login--authenticated"},react.createElement("div",{className:"modal-login__container"},react.createElement("div",{className:"modal-header"},react.createElement("div",{className:"modal-header__avatar"},react.createElement("div",{className:"avatar bg-global-secondary"},react.createElement("img",{src:icon_profile_default(),alt:""}))),react.createElement("div",{className:"modal-header__name text-header-h4","data-cy":"menu-patron-name"},null==userData||null===(_userData$patron=userData.patron)||void 0===_userData$patron?void 0:_userData$patron.name),react.createElement(Link.A,{href:userProfileUrl,className:"link-tag modal-header__link color-secondary-gray"},t("menuUserProfileUrlText"))),showNotifications&&react.createElement("div",{className:"modal-profile__container"},react.createElement(dashboard_notification_list.A,{pageSize,columns:!1})),react.createElement("nav",{className:"modal-profile__container","aria-label":t("menuProfileLinksAriaLabelText")},react.createElement("ul",{className:"modal-profile__links"},menuNavigationData.map((menuNavigationItem=>react.createElement(menu_navigation_list_MenuNavigationItem,{menuNavigationItem,loansCount:loans.length,reservationCount:reservations.length,feeCount}))))),react.createElement("div",{className:"modal-profile__btn-logout mx-32"},react.createElement(Link.A,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:logoutUrl},t("menuLogOutText")))))},menu_logged_in_MenuLoggedInContent=MenuLoggedInContent;try{MenuLoggedInContent.displayName="MenuLoggedInContent",MenuLoggedInContent.__docgenInfo={description:"",displayName:"MenuLoggedInContent",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"]={docgenInfo:MenuLoggedInContent.__docgenInfo,name:"MenuLoggedInContent",path:"src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"})}catch(__react_docgen_typescript_loader_error){}const menu_logged_in=({pageSize})=>{const{userMenuAuthenticated:userMenuAuthenticatedModalId}=(0,modal_helpers.c6)(),t=(0,utils_text.F)();return react.createElement(modal.A,{modalId:userMenuAuthenticatedModalId,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:t("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement(menu_logged_in_MenuLoggedInContent,{pageSize}))};try{menuloggedin.displayName="menuloggedin",menuloggedin.__docgenInfo={description:"",displayName:"menuloggedin",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"]={docgenInfo:menuloggedin.__docgenInfo,name:"menuloggedin",path:"src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"})}catch(__react_docgen_typescript_loader_error){}var TextLineSkeleton=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const menu_user_unregistered_MenuUserUnregisteredContent=()=>{const t=(0,utils_text.F)(),logoutUrl=(0,url.Ik)()("logoutUrl");return react.createElement("div",{className:"modal-login modal-login--anonymous"},react.createElement(Link.A,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:logoutUrl},t("menuLogOutText")))},menu_user_unregistered=()=>{const{userMenuUnregistered:userMenuUnregisteredModalId}=(0,modal_helpers.c6)(),t=(0,utils_text.F)();return react.createElement(modal.A,{modalId:userMenuUnregisteredModalId,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:t("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement(menu_user_unregistered_MenuUserUnregisteredContent,null))},menu_menu=({pageSize})=>{var _userData$patron,_userData$patron2;const{open}=(0,modal.X)(),t=(0,utils_text.F)(),{userMenuAuthenticated:userMenuAuthenticatedModalId,userMenuAnonymous:userMenuAnonymousModalId,userMenuUnregistered:userMenuUnregisteredModalId}=(0,modal_helpers.c6)(),{isLoading,data:userData}=(0,usePatronData.I)(),openMenu=()=>{(0,user.u7)()?open(userMenuUnregisteredModalId):(0,user.ok)()?open(userMenuAnonymousModalId):open(userMenuAuthenticatedModalId)};return react.createElement(react.Fragment,null,react.createElement("button",{className:"header__menu-profile header__button btn-ui",type:"button","aria-label":isLoading?t("searchHeaderLoginText"):null!=userData&&userData.patron?t("menuUserIconAriaLabelText"):t("menuUserIconAriaLabelLoggedOutText"),onClick:()=>openMenu(),onKeyDown:e=>"Enter"===e.key&&openMenu(),tabIndex:0},react.createElement("img",{src:icon_profile_default(),alt:""}),isLoading&&react.createElement("span",{className:"text-small-caption"},react.createElement(TextLineSkeleton.A,{width:50})),!isLoading&&!(null!=userData&&null!==(_userData$patron=userData.patron)&&void 0!==_userData$patron&&_userData$patron.name)&&react.createElement("span",{className:"text-small-caption"},t("searchHeaderLoginText")),!isLoading&&(null==userData||null===(_userData$patron2=userData.patron)||void 0===_userData$patron2?void 0:_userData$patron2.name)&&react.createElement("span",{className:"text-small-caption"},userData.patron.name)),react.createElement(menu_logged_in,{pageSize}),react.createElement(menu_user_unregistered,null),react.createElement(menu_not_logged_in,null))};try{menu.displayName="menu",menu.__docgenInfo={description:"",displayName:"menu",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.tsx#menu"]={docgenInfo:menu.__docgenInfo,name:"menu",path:"src/apps/menu/menu.tsx#menu"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts");const menu_entry=(0,url.nU)((0,utils_config.NV)((0,utils_text.i)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(menu_menu,{pageSize})}))));try{menuentry.displayName="menuentry",menuentry.__docgenInfo={description:"",displayName:"menuentry",props:{menuUserProfileUrlText:{defaultValue:null,description:"",name:"menuUserProfileUrlText",required:!0,type:{name:"string"}},userProfileUrl:{defaultValue:null,description:"",name:"userProfileUrl",required:!0,type:{name:"string"}},menuNavigationDataConfig:{defaultValue:null,description:"",name:"menuNavigationDataConfig",required:!0,type:{name:"string"}},menuNotificationLoansExpiredText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredText",required:!0,type:{name:"string"}},menuNotificationLoansExpiredUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredUrl",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonUrl",required:!0,type:{name:"string"}},menuNotificationReadyForPickupText:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupText",required:!0,type:{name:"string"}},menuNotificationReadyForPickupUrl:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupUrl",required:!0,type:{name:"string"}},menuLogOutText:{defaultValue:null,description:"",name:"menuLogOutText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},logoutUrl:{defaultValue:null,description:"",name:"logoutUrl",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},menuLoginText:{defaultValue:null,description:"",name:"menuLoginText",required:!0,type:{name:"string"}},menuLoginUrl:{defaultValue:null,description:"",name:"menuLoginUrl",required:!0,type:{name:"string"}},menuSignUpText:{defaultValue:null,description:"",name:"menuSignUpText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},menuSignUpUrl:{defaultValue:null,description:"",name:"menuSignUpUrl",required:!0,type:{name:"string"}},menuProfileLinksAriaLabelText:{defaultValue:null,description:"",name:"menuProfileLinksAriaLabelText",required:!0,type:{name:"string"}},menuUserIconAriaLabelText:{defaultValue:null,description:"",name:"menuUserIconAriaLabelText",required:!0,type:{name:"string"}},menuUserIconAriaLabelLoggedOutText:{defaultValue:null,description:"",name:"menuUserIconAriaLabelLoggedOutText",required:!0,type:{name:"string"}},menuNotAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuNotAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuNotAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},searchHeaderLoginText:{defaultValue:null,description:"",name:"searchHeaderLoginText",required:!0,type:{name:"string"}},searchHeaderFavoritesText:{defaultValue:null,description:"",name:"searchHeaderFavoritesText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.entry.tsx#menuentry"]={docgenInfo:menuentry.__docgenInfo,name:"menuentry",path:"src/apps/menu/menu.entry.tsx#menuentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const WrappedMenu=(0,utils_text.i)((0,url.nU)((0,utils_config.NV)(menu_entry))),WrappedStoryHeader=(0,utils_text.i)((0,url.nU)((0,utils_config.NV)(story_header_dev_inc.A))),menu_dev={title:"Apps / Header",component:WrappedMenu,argTypes:{...serviceUrlArgs.A,...groupModalArgs.A,...loanGroupModalArgs.A,...renewalArgs.A,...reservationMaterialDetailsArgs.A,...reservationGroupModalArgs.A,...deleteReservationModalArgs.A,...materialDetailsModalArgs.A,...globalTextArgs.A,...globalConfigArgs.A,materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},menuUserProfileUrlText:{defaultValue:"My Account",control:{type:"text"}},userProfileUrl:{defaultValue:"/YourProfile",control:{type:"text"}},menuNavigationDataConfig:{defaultValue:'[{"name":"Dashboard","link":"/user/me/dashboard","dataId":"40"},{"name":"Loans","link":"/user/me/loans","dataId":"1"},{"name":"Reservations","link":"/user/me/reservations","dataId":"2"},{"name":"My list","link":"/user/me/favorites","dataId":"20"},{"name":"Fees & Replacement costs","link":"/user/me/fees","dataId":"4"}]',control:{type:"text"}},menuNotificationLoansExpiredText:{defaultValue:"loans expired",control:{type:"text"}},menuUserIconAriaLabelText:{defaultValue:"Open user menu",control:{type:"text"}},menuUserIconAriaLabelLoggedOutText:{defaultValue:"Open login menu",control:{type:"text"}},menuNotificationLoansExpiredUrl:{defaultValue:"/LoansExpired",control:{type:"text"}},menuNotificationLoansExpiringSoonText:{defaultValue:"loans expiring soon",control:{type:"text"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:"/LoansExpiringSoon",control:{type:"text"}},menuNotificationReadyForPickupText:{defaultValue:"reservations ready for pickup",control:{type:"text"}},menuNotAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedModalDescriptionText:{defaultValue:"The user modal",control:{type:"text"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:"The user modal, log in or create a user",control:{type:"text"}},menuNotificationReadyForPickupUrl:{defaultValue:"/ReservationsReadyForPickup",control:{type:"text"}},menuLogOutText:{defaultValue:"Log out",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},menuProfileLinksAriaLabelText:{defaultValue:"Profile links",control:{type:"text"}},logoutUrl:{defaultValue:"/Logout",control:{type:"text"}},physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},menuLoginText:{defaultValue:"Log in",control:{type:"text"}},menuLoginUrl:{defaultValue:"/Login",control:{type:"text"}},menuSignUpText:{defaultValue:"Sign up",control:{type:"text"}},menuSignUpUrl:{defaultValue:"/Signup",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},searchHeaderLoginText:{defaultValue:"Login",control:{type:"text"}},searchHeaderFavoritesText:{defaultValue:"Liked",control:{type:"text"}}}},UserMenu=args=>{const menu=react.createElement(WrappedMenu,args);return react.createElement(WrappedStoryHeader,{userProfile:menu})}},"./src/apps/opening-hours-editor/OpeningHoursEditor.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>OpeningHoursEditor_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),dist=__webpack_require__("./node_modules/@fullcalendar/react/dist/index.js"),timegrid=__webpack_require__("./node_modules/@fullcalendar/timegrid/index.js"),daygrid=__webpack_require__("./node_modules/@fullcalendar/daygrid/index.js"),interaction=__webpack_require__("./node_modules/@fullcalendar/interaction/index.js"),da=__webpack_require__("./node_modules/@fullcalendar/core/locales/da.js"),reload_logo_black=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/reload_logo_black.svg"),reload_logo_black_default=__webpack_require__.n(reload_logo_black),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min);const DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_none="none",DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_weekly="weekly",DplOpeningHoursListGET200ItemRepetitionType_none="none",DplOpeningHoursListGET200ItemRepetitionType_weekly="weekly",formatDateTimeString=(date,time)=>`${date}T${time}:00`,formatFullCalendarEventToCmsEventEdit=event=>{if(!event.title||!event.backgroundColor)throw new Error("Invalid event format");const startDate=dayjs_min_default()(event.startStr),endDate=dayjs_min_default()(event.endStr);return{id:Number(event.id),category:{title:event.title,color:event.backgroundColor},date:startDate.format("YYYY-MM-DD"),start_time:startDate.format("HH:mm"),end_time:endDate.format("HH:mm"),repetition:event.repetition,branch_id:0}},formatDateStr=date=>dayjs_min_default()(date).format("YYYY-MM-DDTHH:mm:ssZ"),adjustEndDateBasedOnStartDate=(startDay,endDay)=>{const start=dayjs_min_default()(startDay),end=dayjs_min_default()(endDay);return start.isSame(end,"day")?endDay:start.hour(end.hour()).minute(end.minute()).second(end.second()).toDate()},extractTime=date=>dayjs_min_default()(date).format("HH:mm"),updateDateTime=(date,timeStr)=>{const[hours,minutes]=timeStr.split(":").map(Number);return dayjs_min_default()(date).hour(hours).minute(minutes).toDate()},getWeekDayName=date=>dayjs_min_default()(date).format("dddd"),getDateString=date=>dayjs_min_default()(date).format("DD-MM-YYYY"),getStringForDateInput=date=>dayjs_min_default()(date).format("YYYY-MM-DD"),isOpeningHourWeeklyRepetition=event=>{var _event$extendedProps,_event$extendedProps$,_event$event$extended,_event$event$extended2;return"event"in event?(null===(_event$event$extended=event.event.extendedProps)||void 0===_event$event$extended||null===(_event$event$extended2=_event$event$extended.repetition)||void 0===_event$event$extended2?void 0:_event$event$extended2.type)===DplOpeningHoursListGET200ItemRepetitionType_weekly:(null===(_event$extendedProps=event.extendedProps)||void 0===_event$extendedProps||null===(_event$extendedProps$=_event$extendedProps.repetition)||void 0===_event$extendedProps$?void 0:_event$extendedProps$.type)===DplOpeningHoursListGET200ItemRepetitionType_weekly},OpeningHoursEditorEventContent=({eventInput,iconAltText})=>{const{event}=eventInput;return react.createElement("div",{className:"opening-hours-editor-event-content","data-cy":"opening-hours-editor-event-content"},react.createElement("div",null,react.createElement("b",null,event.title),react.createElement("div",null,extractTime(event.start)," - ",extractTime(event.end))),isOpeningHourWeeklyRepetition(event)&&react.createElement("div",{className:"opening-hours-editor-event-content__series-icon"},react.createElement("img",{src:reload_logo_black_default(),alt:iconAltText})))},opening_hours_editor_OpeningHoursEditorEventContent=OpeningHoursEditorEventContent;try{OpeningHoursEditorEventContent.displayName="OpeningHoursEditorEventContent",OpeningHoursEditorEventContent.__docgenInfo={description:"",displayName:"OpeningHoursEditorEventContent",props:{eventInput:{defaultValue:null,description:"",name:"eventInput",required:!0,type:{name:"EventInput"}},iconAltText:{defaultValue:null,description:"",name:"iconAltText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/OpeningHoursEditorEventContent.tsx#OpeningHoursEditorEventContent"]={docgenInfo:OpeningHoursEditorEventContent.__docgenInfo,name:"OpeningHoursEditorEventContent",path:"src/apps/opening-hours-editor/OpeningHoursEditorEventContent.tsx#OpeningHoursEditorEventContent"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-query/es/index.js"),dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const opening_hours_editor_useOpeningHoursEditor=()=>{const openingHoursBranchId=(0,utils_config.UK)()("openingHoursBranchIdConfig",{transformer:"stringToNumber"}),[datesSet,setDatseSet]=(0,react.useState)(null),queryClient=(0,es.useQueryClient)(),{data:openingHoursData}=(0,dpl_cms.Dp)({branch_id:openingHoursBranchId,...datesSet&&{from_date:getStringForDateInput(datesSet.start),to_date:getStringForDateInput(datesSet.end)}},{enabled:!!datesSet}),{mutate:removeOpeningHours}=(0,dpl_cms.v2)(),{mutate:createOpeningHours}=(0,dpl_cms.hi)(),{mutate:updateOpeningHours}=(0,dpl_cms.I1)(),[events,setEvents]=(0,react.useState)([]);(0,react.useEffect)((()=>{if(openingHoursData){const formattedEvents=openingHoursData.map((({category,date,start_time,end_time,id,repetition})=>({id:id.toString(),title:category.title,start:formatDateTimeString(date,start_time),end:formatDateTimeString(date,end_time),color:category.color,repetition})));setEvents(formattedEvents)}}),[openingHoursData]);const onSuccess=()=>{queryClient.invalidateQueries((0,dpl_cms.J0)({branch_id:openingHoursBranchId}))},onError=message=>{alert(message),window.location.reload()};return{events,handleEventAdd:event=>{createOpeningHours({data:{...event,branch_id:openingHoursBranchId},params:{_format:"json"}},{onSuccess:()=>{onSuccess()},onError:()=>{onError("Failed to create opening hours")}})},handleEventRemove:({eventId,repetition_id})=>{removeOpeningHours({id:eventId,params:{_format:"json",...repetition_id?{repetition_id}:{}}},{onSuccess:()=>{onSuccess()},onError:()=>{onError("Failed to remove opening hours")}})},handleEventEditing:event=>{updateOpeningHours({id:event.id.toString(),data:{...event,branch_id:openingHoursBranchId},params:{_format:"json"}},{onSuccess:()=>{onSuccess()},onError:()=>{onError("Failed to update opening hours")}})},handleDatesSet:datesInView=>{setDatseSet(datesInView)}}},EventForm=({initialTitle,startDate,endDate,onSubmit,openingHoursCategories,children,isRepeatedOpeningHour})=>{const t=(0,utils_text.F)(),initialCategory=initialTitle?openingHoursCategories.find((category=>category.title===initialTitle)):openingHoursCategories[0],initialStartTime=extractTime(startDate),initialEndTime=extractTime(endDate),weekDayName=getWeekDayName(startDate),startDateString=getDateString(startDate),[startTime,setStartTime]=(0,react.useState)(initialStartTime),[endTime,setEndTime]=(0,react.useState)(initialEndTime),[category,setCategory]=(0,react.useState)(initialCategory),isSameTime=startTime===endTime,[isRepeated,setIsRepeated]=(0,react.useState)(!1),[repeatedEndDate,setRepeatedEndDate]=(0,react.useState)(null);(0,react.useEffect)((()=>{setCategory(initialCategory),setStartTime(initialStartTime),setEndTime(initialEndTime),setIsRepeated(!1),setRepeatedEndDate(null)}),[initialCategory,initialEndTime,initialStartTime]),(0,react.useEffect)((()=>{isRepeated||setRepeatedEndDate(null)}),[isRepeated]);return react.createElement("form",{onSubmit:e=>{e.preventDefault(),category&&onSubmit({category,startTime,endTime,startDate,repeatedEndDate})},className:"opening-hours-editor-form","data-cy":"opening-hours-editor-form"},react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-title"},t("openingHoursEventFormCategoryText")),react.createElement("select",{"data-cy":"opening-hours-editor-form-select",className:"opening-hours-editor-form__select",id:"event-form-title",value:null==category?void 0:category.title,onChange:e=>{setCategory(openingHoursCategories.find((item=>item.title===e.target.value)))}},openingHoursCategories.map((categoryItem=>react.createElement("option",{key:categoryItem.title,value:categoryItem.title},categoryItem.title)))),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-start-time"},t("openingHoursEventFormStartTimeText")),react.createElement("input",{"data-cy":"opening-hours-editor-form-start-time",className:"opening-hours-editor-form__time-input",id:"event-form-start-time",type:"time",value:startTime,onChange:e=>setStartTime(e.target.value)}),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-end-time"},t("openingHoursEventFormEndTimeText")),react.createElement("input",{"data-cy":"opening-hours-editor-form-end-time",className:"opening-hours-editor-form__time-input",id:"event-form-end-time",type:"time",value:endTime,onChange:e=>setEndTime(e.target.value),min:startTime,max:"00:00"}),isRepeatedOpeningHour&&react.createElement(react.Fragment,null,react.createElement("div",{className:"opening-hours-editor-form__checkbox"},react.createElement("input",{id:"event-form-repeated","data-cy":"opening-hours-editor-form-repeated",type:"checkbox",checked:isRepeated,onChange:e=>setIsRepeated(e.target.checked)}),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-repeated"},t("openingHoursEventFormRepeatedText",{placeholders:{"@startDate":startDateString,"@weekDayName":weekDayName}}))),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-end-date"},t("openingHoursEventFormEndDateText")),react.createElement("input",{"data-cy":"opening-hours-editor-form-end-date",type:"date",className:"opening-hours-editor-form__time-input",id:"event-form-end-date",min:getStringForDateInput(startDate),disabled:!isRepeated,required:isRepeated,value:repeatedEndDate||"",onChange:e=>setRepeatedEndDate(e.target.value)})),react.createElement("button",{"data-cy":"opening-hours-editor-form-submit",type:"submit",className:"opening-hours-editor-form__submit",disabled:isSameTime},t("openingHoursEventFormSubmitText")),children)},opening_hours_editor_EventForm=EventForm;try{EventForm.displayName="EventForm",EventForm.__docgenInfo={description:"",displayName:"EventForm",props:{initialTitle:{defaultValue:null,description:"",name:"initialTitle",required:!1,type:{name:"string | undefined"}},startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"Date"}},endDate:{defaultValue:null,description:"",name:"endDate",required:!0,type:{name:"Date"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(EventFormOnSubmitType: EventFormOnSubmitType) => void"}},openingHoursCategories:{defaultValue:null,description:"",name:"openingHoursCategories",required:!0,type:{name:"OpeningHoursCategoriesType[]"}},isRepeatedOpeningHour:{defaultValue:null,description:"",name:"isRepeatedOpeningHour",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/EventForm.tsx#EventForm"]={docgenInfo:EventForm.__docgenInfo,name:"EventForm",path:"src/apps/opening-hours-editor/EventForm.tsx#EventForm"})}catch(__react_docgen_typescript_loader_error){}const useDialog=({onClose}={})=>{const[dialogContent,setDialogContent]=(0,react.useState)(null),dialogRef=(0,react.useRef)(null);return{dialogContent,dialogRef,openDialogWithContent:content=>{var _dialogRef$current;setDialogContent(content),null===(_dialogRef$current=dialogRef.current)||void 0===_dialogRef$current||_dialogRef$current.showModal()},closeDialog:()=>{dialogRef.current&&(onClose&&onClose(),dialogRef.current.close())}}},dialog_useDialog=useDialog;try{useDialog.displayName="useDialog",useDialog.__docgenInfo={description:"",displayName:"useDialog",props:{onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/useDialog.tsx#useDialog"]={docgenInfo:useDialog.__docgenInfo,name:"useDialog",path:"src/components/dialog/useDialog.tsx#useDialog"})}catch(__react_docgen_typescript_loader_error){}var icon_cross=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"),icon_cross_default=__webpack_require__.n(icon_cross);const useEscapeKey=({closeDialog})=>{(0,react.useEffect)((()=>{const handleKeyDown=e=>{"Escape"===e.key&&closeDialog()};return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)}}),[closeDialog])},dialog_useEscapeKey=useEscapeKey;try{useEscapeKey.displayName="useEscapeKey",useEscapeKey.__docgenInfo={description:"",displayName:"useEscapeKey",props:{closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/useEscapeKey.tsx#useEscapeKey"]={docgenInfo:useEscapeKey.__docgenInfo,name:"useEscapeKey",path:"src/components/dialog/useEscapeKey.tsx#useEscapeKey"})}catch(__react_docgen_typescript_loader_error){}const Dialog=(0,react.forwardRef)((({children,closeDialog},ref)=>(dialog_useEscapeKey({closeDialog}),react.createElement("dialog",{className:"dialog",ref,onClick:({currentTarget,target})=>{currentTarget===target&&closeDialog()}},react.createElement("button",{type:"button",onClick:closeDialog,className:"dialog__close-button"},react.createElement("img",{src:icon_cross_default(),alt:"","aria-label":"Close dialog"})),children)))),dialog_Dialog=Dialog;try{Dialog.displayName="Dialog",Dialog.__docgenInfo={description:"",displayName:"Dialog",props:{closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/Dialog.tsx#Dialog"]={docgenInfo:Dialog.__docgenInfo,name:"Dialog",path:"src/components/dialog/Dialog.tsx#Dialog"})}catch(__react_docgen_typescript_loader_error){}var OptionValue=function(OptionValue){return OptionValue.This="This",OptionValue.All="All",OptionValue}(OptionValue||{});const ConfirmEditRepeatedOpeningHour=({confirmSubmit,closeDialog,title})=>{const t=(0,utils_text.F)(),options=[{value:OptionValue.This,label:t("openingHoursEditEventConfirmOptionThisText"),cy:"opening-hours-editor-form__radio-this"},{value:OptionValue.All,label:t("openingHoursEditEventConfirmOptionAllText"),cy:"opening-hours-editor-form__radio-all"}],[selectedOption,setSelectedOption]=(0,react.useState)(options[0].value),handleRadioChange=event=>{event.target.value!==OptionValue.This&&event.target.value!==OptionValue.All||setSelectedOption(event.target.value)};return react.createElement("form",{className:"opening-hours-editor-form"},react.createElement("h2",{className:"opening-hours-editor-form__label"},title),options.map((({value,label,cy})=>react.createElement("div",{className:"opening-hours-editor-form__radio",key:value},react.createElement("input",{"data-cy":cy,type:"radio",id:value,value,checked:selectedOption===value,onChange:handleRadioChange}),react.createElement("label",{htmlFor:value},label)))),react.createElement("button",{className:"opening-hours-editor-form__cancel","data-cy":"opening-hours-editor-form__cancel",type:"button",onClick:()=>{closeDialog(),setSelectedOption(options[0].value)}},t("openingHoursConfirmAddRepeatedCancelText")),react.createElement("button",{className:"opening-hours-editor-form__submit","data-cy":"opening-hours-editor-form__confirm",type:"button",onClick:e=>{e.preventDefault(),confirmSubmit(selectedOption===OptionValue.All),setSelectedOption(options[0].value)}},t("openingHoursConfirmRepeatedSubmitText")))},opening_hours_editor_ConfirmEditRepeatedOpeningHour=ConfirmEditRepeatedOpeningHour;try{ConfirmEditRepeatedOpeningHour.displayName="ConfirmEditRepeatedOpeningHour",ConfirmEditRepeatedOpeningHour.__docgenInfo={description:"",displayName:"ConfirmEditRepeatedOpeningHour",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},confirmSubmit:{defaultValue:null,description:"",name:"confirmSubmit",required:!0,type:{name:"(editSerie: boolean) => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/ConfirmEditRepeatedOpeningHour.tsx#ConfirmEditRepeatedOpeningHour"]={docgenInfo:ConfirmEditRepeatedOpeningHour.__docgenInfo,name:"ConfirmEditRepeatedOpeningHour",path:"src/apps/opening-hours-editor/ConfirmEditRepeatedOpeningHour.tsx#ConfirmEditRepeatedOpeningHour"})}catch(__react_docgen_typescript_loader_error){}const DialogFormEdit=({eventInfo,handleEventEditing,closeDialog:closeEditDialog,handleEventRemove,openingHoursCategories})=>{const t=(0,utils_text.F)(),{dialogContent,openDialogWithContent,closeDialog,dialogRef}=dialog_useDialog();if(!eventInfo.start||!eventInfo.end)return alert(t("openingHoursInvalidEventText")),null;const handleEventRemoveConfirm=editSerie=>{handleEventRemove({eventId:eventInfo.id,...editSerie?{repetition_id:eventInfo.extendedProps.repetition.id}:{}}),eventInfo.remove(),closeDialog(),closeEditDialog()};return react.createElement(react.Fragment,null,react.createElement(opening_hours_editor_EventForm,{initialTitle:eventInfo.title,startDate:eventInfo.start,endDate:eventInfo.end,onSubmit:({category,startTime,endTime})=>{if(!eventInfo.start||!eventInfo.end)return void alert(t("openingHoursInvalidEventText"));const startDate=updateDateTime(eventInfo.start,startTime);let endDate=updateDateTime(eventInfo.end,endTime);endDate=adjustEndDateBasedOnStartDate(startDate,endDate),eventInfo.setProp("title",category.title),eventInfo.setProp("color",category.color),eventInfo.setDates(startDate,endDate);const cmsEvent={id:eventInfo.id,category,title:eventInfo.title,backgroundColor:eventInfo.backgroundColor,startStr:eventInfo.startStr,endStr:eventInfo.endStr,repetition:{type:DplOpeningHoursListGET200ItemRepetitionType_none}},handleEventEditConfirm=editSerie=>{editSerie?(handleEventEditing(formatFullCalendarEventToCmsEventEdit({...cmsEvent,repetition:{type:DplOpeningHoursListGET200ItemRepetitionType_weekly,weekly_data:{end_date:eventInfo.extendedProps.repetition.weekly_data.end_date}}})),closeDialog(),closeEditDialog()):(handleEventEditing(formatFullCalendarEventToCmsEventEdit(cmsEvent)),closeDialog(),closeEditDialog())};isOpeningHourWeeklyRepetition(eventInfo)?openDialogWithContent(react.createElement(opening_hours_editor_ConfirmEditRepeatedOpeningHour,{title:t("openingHoursEditEventTitleText"),confirmSubmit:handleEventEditConfirm,closeDialog})):(handleEventEditing(formatFullCalendarEventToCmsEventEdit(cmsEvent)),closeEditDialog())},openingHoursCategories},react.createElement("button",{"data-cy":"opening-hours-editor-form__remove",className:"opening-hours-editor-form__remove",type:"button",onClick:()=>{isOpeningHourWeeklyRepetition(eventInfo)?openDialogWithContent(react.createElement(opening_hours_editor_ConfirmEditRepeatedOpeningHour,{title:t("openingHoursRemoveEventTitleText"),confirmSubmit:handleEventRemoveConfirm,closeDialog})):handleEventRemoveConfirm(!1)}},t("openingHoursRemoveEventButtonText"))),react.createElement(dialog_Dialog,{closeDialog,ref:dialogRef},dialogContent))},opening_hours_editor_DialogFormEdit=DialogFormEdit;try{DialogFormEdit.displayName="DialogFormEdit",DialogFormEdit.__docgenInfo={description:"",displayName:"DialogFormEdit",props:{eventInfo:{defaultValue:null,description:"",name:"eventInfo",required:!0,type:{name:"EventImpl"}},handleEventEditing:{defaultValue:null,description:"",name:"handleEventEditing",required:!0,type:{name:"(event: DplOpeningHoursUpdatePATCH200Item) => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}},handleEventRemove:{defaultValue:null,description:"",name:"handleEventRemove",required:!0,type:{name:"({ eventId, repetition_id }: HandleEventRemoveType) => void"}},openingHoursCategories:{defaultValue:null,description:"",name:"openingHoursCategories",required:!0,type:{name:"OpeningHoursCategoriesType[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/DialogFormEdit.tsx#DialogFormEdit"]={docgenInfo:DialogFormEdit.__docgenInfo,name:"DialogFormEdit",path:"src/apps/opening-hours-editor/DialogFormEdit.tsx#DialogFormEdit"})}catch(__react_docgen_typescript_loader_error){}const ConfirmAddRepeatedOpeningHour=({startDate,category,startTime,endTime,repeatedEndDate,confirmSubmit,closeDialog})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"opening-hours-editor-form","data-cy":"opening-hours-editor-confirm-add-repeated-form"},react.createElement("h2",{className:"opening-hours-editor-form__label"},t("openingHoursConfirmAddRepeatedText")),react.createElement("table",{className:"opening-hours-editor-form__table","data-cy":"opening-hours-editor-form__table"},react.createElement("tbody",null,react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormCategoryText"),":"),react.createElement("td",null,category.title)),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormStartTimeText"),":"),react.createElement("td",null,startTime)),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormEndTimeText"),":"),react.createElement("td",null,endTime)),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormStartDateText"),":"),react.createElement("td",null,getDateString(startDate))),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormEndDateText"),":"),react.createElement("td",null,getDateString(repeatedEndDate))),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormEveryWeekdayText"),":"),react.createElement("td",null,getWeekDayName(startDate))))),react.createElement("button",{"data-cy":"opening-hours-editor-form__cancel",type:"button",className:"opening-hours-editor-form__cancel",onClick:closeDialog},t("openingHoursConfirmAddRepeatedCancelText")),react.createElement("button",{"data-cy":"opening-hours-editor-form__confirm",type:"button",className:"opening-hours-editor-form__submit",onClick:()=>{confirmSubmit(),closeDialog()}},t("openingHoursConfirmRepeatedSubmitText")))},opening_hours_editor_ConfirmAddRepeatedOpeningHour=ConfirmAddRepeatedOpeningHour;try{ConfirmAddRepeatedOpeningHour.displayName="ConfirmAddRepeatedOpeningHour",ConfirmAddRepeatedOpeningHour.__docgenInfo={description:"",displayName:"ConfirmAddRepeatedOpeningHour",props:{startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"Date"}},category:{defaultValue:null,description:"",name:"category",required:!0,type:{name:"OpeningHoursCategoriesType"}},startTime:{defaultValue:null,description:"",name:"startTime",required:!0,type:{name:"string"}},endTime:{defaultValue:null,description:"",name:"endTime",required:!0,type:{name:"string"}},repeatedEndDate:{defaultValue:null,description:"",name:"repeatedEndDate",required:!0,type:{name:"Date"}},confirmSubmit:{defaultValue:null,description:"",name:"confirmSubmit",required:!0,type:{name:"() => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx#ConfirmAddRepeatedOpeningHour"]={docgenInfo:ConfirmAddRepeatedOpeningHour.__docgenInfo,name:"ConfirmAddRepeatedOpeningHour",path:"src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx#ConfirmAddRepeatedOpeningHour"})}catch(__react_docgen_typescript_loader_error){}const DialogFormAdd=({selectedEventInfo,handleEventAdd,closeDialog:closeAddDialog,openingHoursCategories})=>{const{dialogContent,openDialogWithContent,closeDialog,dialogRef}=dialog_useDialog(),calendarApi=selectedEventInfo.view.calendar,isDayGridMonth="dayGridMonth"===selectedEventInfo.view.type,isTimeGridWeek="timeGridWeek"===selectedEventInfo.view.type;return react.createElement(react.Fragment,null,react.createElement(opening_hours_editor_EventForm,{openingHoursCategories,startDate:selectedEventInfo.start,endDate:selectedEventInfo.end,onSubmit:({category,startTime,endTime,startDate,repeatedEndDate})=>{const start=updateDateTime(selectedEventInfo.start,startTime),startStr=formatDateStr(start);let end=updateDateTime(selectedEventInfo.end,endTime),{endStr}=selectedEventInfo;if(isTimeGridWeek){const adjustedEnd=((startDay,endDay)=>{let adjustedEndDay;const start=dayjs_min_default()(startDay),end=dayjs_min_default()(endDay);return adjustedEndDay=start.isSame(end,"day")?end:start.add(1,"day").startOf("day"),{end:adjustedEndDay.toDate(),endStr:formatDateStr(adjustedEndDay.toDate())}})(start,end);end=adjustedEnd.end,endStr=adjustedEnd.endStr}if(isDayGridMonth){const adjustedEnd=((startDay,endDay)=>{const adjustedEndDay=adjustEndDateBasedOnStartDate(startDay,endDay);return{end:adjustedEndDay,endStr:formatDateStr(adjustedEndDay)}})(start,end);end=adjustedEnd.end,endStr=adjustedEnd.endStr}const newFullCalenderEvent={...selectedEventInfo,start,startStr,end,endStr,title:category.title,color:category.color,allDay:!1};calendarApi.addEvent(newFullCalenderEvent),calendarApi.unselect();const cmsEvent=(event=>{if(!event.title||!event.color)throw new Error("Invalid event format");const startDate=dayjs_min_default()(event.startStr),endDate=dayjs_min_default()(event.endStr);return{id:Number(event.id),category:{title:event.title,color:event.color},date:startDate.format("YYYY-MM-DD"),start_time:startDate.format("HH:mm"),end_time:endDate.format("HH:mm"),repetition:event.repetition,branch_id:0}})({...newFullCalenderEvent,repetition:{type:repeatedEndDate?DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_weekly:DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_none,...repeatedEndDate?{weekly_data:{end_date:repeatedEndDate}}:{}}});repeatedEndDate?openDialogWithContent(react.createElement(opening_hours_editor_ConfirmAddRepeatedOpeningHour,{startDate,category,startTime,endTime,repeatedEndDate:new Date(repeatedEndDate),confirmSubmit:()=>{handleEventAdd(cmsEvent),closeAddDialog()},closeDialog})):(handleEventAdd(cmsEvent),closeAddDialog())},isRepeatedOpeningHour:!0}),react.createElement(dialog_Dialog,{closeDialog,ref:dialogRef},dialogContent))},opening_hours_editor_DialogFormAdd=DialogFormAdd;try{DialogFormAdd.displayName="DialogFormAdd",DialogFormAdd.__docgenInfo={description:"",displayName:"DialogFormAdd",props:{selectedEventInfo:{defaultValue:null,description:"",name:"selectedEventInfo",required:!0,type:{name:"DateSelectArg"}},handleEventAdd:{defaultValue:null,description:"",name:"handleEventAdd",required:!0,type:{name:"(event: DplOpeningHoursCreatePOSTOpeningHoursInstanceBody) => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}},openingHoursCategories:{defaultValue:null,description:"",name:"openingHoursCategories",required:!0,type:{name:"OpeningHoursCategoriesType[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/DialogFormAdd.tsx#DialogFormAdd"]={docgenInfo:DialogFormAdd.__docgenInfo,name:"DialogFormAdd",path:"src/apps/opening-hours-editor/DialogFormAdd.tsx#DialogFormAdd"})}catch(__react_docgen_typescript_loader_error){}const OpeningHoursEditor=({initialDate})=>{var _fullCalendarRef$curr;const iconAltText=(0,utils_text.F)()("openingHoursRepeatedIconAltText"),openingHoursCategories=(0,utils_config.UK)()("openingHoursEditorCategoriesConfig",{transformer:"jsonParse"}),fullCalendarRef=react.useRef(null),fullCalendarApi=null===(_fullCalendarRef$curr=fullCalendarRef.current)||void 0===_fullCalendarRef$curr?void 0:_fullCalendarRef$curr.getApi(),{events,handleEventAdd,handleEventEditing,handleEventRemove,handleDatesSet}=opening_hours_editor_useOpeningHoursEditor(),{dialogContent,openDialogWithContent,closeDialog,dialogRef}=dialog_useDialog({onClose:()=>{fullCalendarApi&&fullCalendarApi.unselect()}});return react.createElement(react.Fragment,null,react.createElement(dialog_Dialog,{closeDialog,ref:dialogRef},dialogContent),react.createElement(dist.A,{initialDate:initialDate??void 0,ref:fullCalendarRef,plugins:[daygrid.A,timegrid.A,interaction.Ay],headerToolbar:{left:"dayGridMonth,timeGridWeek",center:"title",right:"prev,next today"},initialView:"timeGridWeek",locale:da.A,selectable:!0,select:selectedEventInfo=>openDialogWithContent(react.createElement(opening_hours_editor_DialogFormAdd,{selectedEventInfo,handleEventAdd,openingHoursCategories,closeDialog})),unselectAuto:!1,eventClick:clickInfo=>openDialogWithContent(react.createElement(opening_hours_editor_DialogFormEdit,{eventInfo:clickInfo.event,handleEventEditing,handleEventRemove,openingHoursCategories,closeDialog})),eventContent:eventInput=>opening_hours_editor_OpeningHoursEditorEventContent({eventInput,iconAltText}),events,stickyHeaderDates:!0,height:"auto",selectMirror:!0,allDaySlot:!1,datesSet:handleDatesSet}))},opening_hours_editor_OpeningHoursEditor=OpeningHoursEditor;try{OpeningHoursEditor.displayName="OpeningHoursEditor",OpeningHoursEditor.__docgenInfo={description:"",displayName:"OpeningHoursEditor",props:{initialDate:{defaultValue:null,description:"",name:"initialDate",required:!1,type:{name:"Date | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/OpeningHoursEditor.tsx#OpeningHoursEditor"]={docgenInfo:OpeningHoursEditor.__docgenInfo,name:"OpeningHoursEditor",path:"src/apps/opening-hours-editor/OpeningHoursEditor.tsx#OpeningHoursEditor"})}catch(__react_docgen_typescript_loader_error){}const OpeningHoursEditor_entry=(0,utils_config.NV)((0,url.nU)((0,utils_text.i)((({initialDate=new Date})=>react.createElement(opening_hours_editor_OpeningHoursEditor,{initialDate})))));try{OpeningHoursEditorentry.displayName="OpeningHoursEditorentry",OpeningHoursEditorentry.__docgenInfo={description:"",displayName:"OpeningHoursEditorentry",props:{openingHoursRemoveEventButtonText:{defaultValue:null,description:"",name:"openingHoursRemoveEventButtonText",required:!0,type:{name:"string"}},openingHoursInvalidEventText:{defaultValue:null,description:"",name:"openingHoursInvalidEventText",required:!0,type:{name:"string"}},openingHoursEventFormCategoryText:{defaultValue:null,description:"",name:"openingHoursEventFormCategoryText",required:!0,type:{name:"string"}},openingHoursEventFormStartTimeText:{defaultValue:null,description:"",name:"openingHoursEventFormStartTimeText",required:!0,type:{name:"string"}},openingHoursEventFormEndTimeText:{defaultValue:null,description:"",name:"openingHoursEventFormEndTimeText",required:!0,type:{name:"string"}},openingHoursEventFormSubmitText:{defaultValue:null,description:"",name:"openingHoursEventFormSubmitText",required:!0,type:{name:"string"}},openingHoursEventFormRepeatedText:{defaultValue:null,description:"",name:"openingHoursEventFormRepeatedText",required:!0,type:{name:"string"}},openingHoursEventFormEndDateText:{defaultValue:null,description:"",name:"openingHoursEventFormEndDateText",required:!0,type:{name:"string"}},openingHoursEventFormEveryWeekdayText:{defaultValue:null,description:"",name:"openingHoursEventFormEveryWeekdayText",required:!0,type:{name:"string"}},openingHoursEventFormStartDateText:{defaultValue:null,description:"",name:"openingHoursEventFormStartDateText",required:!0,type:{name:"string"}},openingHoursConfirmAddRepeatedText:{defaultValue:null,description:"",name:"openingHoursConfirmAddRepeatedText",required:!0,type:{name:"string"}},openingHoursConfirmAddRepeatedCancelText:{defaultValue:null,description:"",name:"openingHoursConfirmAddRepeatedCancelText",required:!0,type:{name:"string"}},openingHoursConfirmRepeatedSubmitText:{defaultValue:null,description:"",name:"openingHoursConfirmRepeatedSubmitText",required:!0,type:{name:"string"}},openingHoursRepeatedIconAltText:{defaultValue:null,description:"",name:"openingHoursRepeatedIconAltText",required:!0,type:{name:"string"}},openingHoursEditEventConfirmOptionThisText:{defaultValue:null,description:"",name:"openingHoursEditEventConfirmOptionThisText",required:!0,type:{name:"string"}},openingHoursEditEventConfirmOptionAllText:{defaultValue:null,description:"",name:"openingHoursEditEventConfirmOptionAllText",required:!0,type:{name:"string"}},openingHoursRemoveEventTitleText:{defaultValue:null,description:"",name:"openingHoursRemoveEventTitleText",required:!0,type:{name:"string"}},openingHoursEditEventTitleText:{defaultValue:null,description:"",name:"openingHoursEditEventTitleText",required:!0,type:{name:"string"}},initialDate:{defaultValue:{value:"new Date()"},description:"",name:"initialDate",required:!1,type:{name:"Date | undefined"}},openingHoursEditorCategoriesConfig:{defaultValue:null,description:"",name:"openingHoursEditorCategoriesConfig",required:!0,type:{name:"string"}},openingHoursBranchIdConfig:{defaultValue:null,description:"",name:"openingHoursBranchIdConfig",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/OpeningHoursEditor.entry.tsx#OpeningHoursEditorentry"]={docgenInfo:OpeningHoursEditorentry.__docgenInfo,name:"OpeningHoursEditorentry",path:"src/apps/opening-hours-editor/OpeningHoursEditor.entry.tsx#OpeningHoursEditorentry"})}catch(__react_docgen_typescript_loader_error){}const OpeningHoursEditor_dev={title:"Apps / Opening Hours Editor",component:OpeningHoursEditor_entry,argTypes:{...serviceUrlArgs.A,openingHoursRemoveEventButtonText:{name:"Opening hours remove event button",defaultValue:"Remove event",control:{type:"text"}},openingHoursInvalidEventText:{name:"Opening hours invalid event text",defaultValue:"Invalid event. No start or end time",control:{type:"text"}},openingHoursEditorCategoriesConfig:{name:"Opening hours categories",defaultValue:'[{"title":"\\u00c5bent","color":"#B3DC6C"},{"title":"Telefontid","color":"#FBE983"},{"title":"Borgerservice","color":"lightblue"}]',control:{type:"text"}},openingHoursBranchIdConfig:{name:"Opening hours branch id",defaultValue:"12",control:{type:"text"}},initialDate:{name:"Initial date to show",defaultValue:new Date("2024-03-25"),control:{type:"date"}},openingHoursEventFormCategoryText:{name:"Opening hours event form category",defaultValue:"Opening hour",control:{type:"text"}},openingHoursEventFormStartTimeText:{name:"Opening hours event form start time",defaultValue:"Start time",control:{type:"text"}},openingHoursEventFormEndTimeText:{name:"Opening hours event form end time",defaultValue:"End time",control:{type:"text"}},openingHoursEventFormSubmitText:{name:"Opening hours event form submit",defaultValue:"Submit",control:{type:"text"}},openingHoursEventFormRepeatedText:{name:"Opening hours event form repeated",defaultValue:"Repeat opening hour weekly every @weekDayName from @startDate",control:{type:"text"}},openingHoursEventFormEndDateText:{name:"Opening hours event to end date",defaultValue:"End date",control:{type:"text"}},openingHoursEventFormStartDateText:{name:"Opening hours event form start date",defaultValue:"Start date",control:{type:"text"}},openingHoursEventFormEveryWeekdayText:{name:"Opening hours event form every weekday",defaultValue:"Every",control:{type:"text"}},openingHoursConfirmAddRepeatedText:{name:"Opening hours confirm add repeated",defaultValue:"Do you want to add this repeated opening hour?",control:{type:"text"}},openingHoursConfirmAddRepeatedCancelText:{name:"Opening hours confirm add repeated cancel",defaultValue:"Cancel",control:{type:"text"}},openingHoursConfirmRepeatedSubmitText:{name:"Opening hours confirm add repeated submit",defaultValue:"I'm sure",control:{type:"text"}},openingHoursRepeatedIconAltText:{name:"Opening hours repeated icon alt text",defaultValue:"Repeated opening hour",control:{type:"text"}},openingHoursEditEventConfirmOptionThisText:{name:"Opening hours remove event confirm option this",defaultValue:"Only this instance",control:{type:"text"}},openingHoursEditEventConfirmOptionAllText:{name:"Opening hours remove event confirm option all",defaultValue:"This and future instances",control:{type:"text"}},openingHoursRemoveEventTitleText:{name:"Opening hours remove event title",defaultValue:"Remove opening hour",control:{type:"text"}},openingHoursEditEventTitleText:{name:"Opening hours edit event title",defaultValue:"Edit opening hour",control:{type:"text"}}}},App=args=>react.createElement(OpeningHoursEditor_entry,args)},"./src/apps/opening-hours/OpeningHours.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>OpeningHours_dev,materialWithoutType:()=>materialWithoutType});var react=__webpack_require__("./node_modules/react/index.js"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),ArrowLeft=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ArrowLeft.svg"),ArrowLeft_default=__webpack_require__.n(ArrowLeft),ArrowRight=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ArrowRight.svg"),ArrowRight_default=__webpack_require__.n(ArrowRight),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),clsx=(__webpack_require__("./node_modules/dayjs/locale/da.js"),__webpack_require__("./node_modules/clsx/dist/clsx.mjs"));const opening_hours_OpeningHourWeekListSkeleton=()=>react.createElement("ul",{className:"opening-hours__content"},[...Array(5)].map((()=>react.createElement("li",{className:"opening-hours__row"},react.createElement("div",{className:"opening-hours__individual-day ssc-line ssc-line-headline"}),react.createElement("ul",null,[...Array(3)].map(((_,index)=>{const isOdd=index%2==0;return react.createElement("li",null,react.createElement("div",{className:(0,clsx.A)("ssc-line",{"ssc-line--odd":!isOdd})}))}))))))),OpeningHoursDayEntry=({data,isOdd})=>{const{start_time:startTime,end_time:endTime,category}=data;return react.createElement("li",{className:(0,clsx.A)("opening-hours__individual-opening",{"opening-hours__individual-opening--odd":isOdd})},react.createElement("div",{className:"opening-hours__category"},category.title),react.createElement("div",{className:"opening-hours__time"},startTime," - ",endTime))},opening_hours_OpeningHoursDayEntry=OpeningHoursDayEntry;try{OpeningHoursDayEntry.displayName="OpeningHoursDayEntry",OpeningHoursDayEntry.__docgenInfo={description:"",displayName:"OpeningHoursDayEntry",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"DplOpeningHoursListGET200Item"}},isOdd:{defaultValue:null,description:"",name:"isOdd",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHoursDayEntry.tsx#OpeningHoursDayEntry"]={docgenInfo:OpeningHoursDayEntry.__docgenInfo,name:"OpeningHoursDayEntry",path:"src/apps/opening-hours/OpeningHoursDayEntry.tsx#OpeningHoursDayEntry"})}catch(__react_docgen_typescript_loader_error){}var upperFirst=__webpack_require__("./node_modules/lodash/upperFirst.js"),upperFirst_default=__webpack_require__.n(upperFirst),weekOfYear=__webpack_require__("./node_modules/dayjs/plugin/weekOfYear.js"),weekOfYear_default=__webpack_require__.n(weekOfYear);dayjs_min_default().locale("da"),dayjs_min_default().extend(weekOfYear_default());const getNextWeek=date=>dayjs_min_default()(date).add(1,"week").toDate(),getPreviousWeek=date=>dayjs_min_default()(date).subtract(1,"week").toDate(),formatWeekString=(translationKey,date)=>{const week=(date=>dayjs_min_default()(date).week().toString())(date),year=(date=>dayjs_min_default()(date).year().toString())(date);return`${translationKey} ${week}, ${year}`},formatDateToWeekday=date=>{const formattedAsWeekday=dayjs_min_default()(date).format("dddd");var string;return string=formattedAsWeekday,upperFirst_default()(string)},formatDateForAPI=date=>dayjs_min_default()(date).format("YYYY-MM-DD"),getWeekStartAndEndDate=(date=new Date)=>({start:dayjs_min_default()(date).startOf("week").toDate(),end:dayjs_min_default()(date).endOf("week").toDate()}),opening_hours_OpeningHourWeekList=({data,isLoading})=>{const t=(0,utils_text.F)();return isLoading?react.createElement(opening_hours_OpeningHourWeekListSkeleton,null):react.createElement("ul",{className:"opening-hours__content","data-cy":"opening-hours-week-list"},data.map((({dateTime,openingHourEntries})=>{const dateAsWeekday=formatDateToWeekday(dateTime),formattedDateForDisplay=dayjs_min_default()(dateTime).format("DD/MM");return react.createElement("li",{key:formattedDateForDisplay,className:"opening-hours__row"},react.createElement("h3",{className:"opening-hours__individual-day"},`${dateAsWeekday}: d. ${formattedDateForDisplay}`),openingHourEntries.length>0?react.createElement("ul",null,openingHourEntries.map(((item,categoryIndex)=>react.createElement(opening_hours_OpeningHoursDayEntry,{key:item.id,data:item,isOdd:categoryIndex%2==0})))):react.createElement("p",null,t("libraryIsClosedText")))})))};try{OpeningHourWeekList.displayName="OpeningHourWeekList",OpeningHourWeekList.__docgenInfo={description:"",displayName:"OpeningHourWeekList",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"GroupedOpeningHours"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHourWeekList.tsx#OpeningHourWeekList"]={docgenInfo:OpeningHourWeekList.__docgenInfo,name:"OpeningHourWeekList",path:"src/apps/opening-hours/OpeningHourWeekList.tsx#OpeningHourWeekList"})}catch(__react_docgen_typescript_loader_error){}var dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts");const opening_hours_useOpeningHours=function useOpeningHours(initialDate,branchId){const[currentWeekRange,setCurrentWeekRange]=(0,react.useState)((()=>getWeekStartAndEndDate(initialDate))),[groupedOpeningHours,setGroupedOpeningHours]=(0,react.useState)([]),{data:openingHours,error,isLoading}=(0,dpl_cms.Dp)({branch_id:branchId,from_date:formatDateForAPI(currentWeekRange.start),to_date:formatDateForAPI(currentWeekRange.end)});(0,react.useEffect)((()=>{if(!isLoading&&!error&&openingHours){const newGroupedOpeningHours=((startDate,endDate,openingHours)=>{const startDay=dayjs_min_default()(startDate),endDay=dayjs_min_default()(endDate);let currentDay=startDay;const allDays=[];for(;!currentDay.isAfter(endDay);)allDays.push(currentDay.toDate()),currentDay=currentDay.add(1,"day");return allDays.map((day=>({dateTime:day,openingHourEntries:openingHours.filter((individualOpeningHour=>dayjs_min_default()(individualOpeningHour.date).isSame(day,"day"))).sort(((a,b)=>{const startTimeComparison=a.start_time.localeCompare(b.start_time);return 0!==startTimeComparison?startTimeComparison:a.end_time.localeCompare(b.end_time)}))})))})(currentWeekRange.start,currentWeekRange.end,openingHours);setGroupedOpeningHours(newGroupedOpeningHours)}}),[openingHours,currentWeekRange,isLoading,error]);const navigateToPreviousWeek=(0,react.useCallback)((()=>{setCurrentWeekRange((prev=>{const previousWeek=getPreviousWeek(prev.start);return getWeekStartAndEndDate(previousWeek)}))}),[]),navigateToNextWeek=(0,react.useCallback)((()=>{setCurrentWeekRange((prev=>{const nextWeek=getNextWeek(prev.start);return getWeekStartAndEndDate(nextWeek)}))}),[]);return{groupedOpeningHours,currentWeekRange,navigateToPreviousWeek,navigateToNextWeek,isLoading}},OpeningHours=({branchId,initialDate})=>{const{currentWeekRange,groupedOpeningHours,navigateToPreviousWeek,navigateToNextWeek,isLoading}=opening_hours_useOpeningHours(initialDate,branchId),t=(0,utils_text.F)(),nextWeekDate=getNextWeek(currentWeekRange.start),previousWeekDate=getPreviousWeek(currentWeekRange.start),nextWeekString=formatWeekString(t("showOpeningHoursForWeekText"),nextWeekDate),previousWeekString=formatWeekString(t("showOpeningHoursForWeekText"),previousWeekDate),currentWeekString=formatWeekString(t("weekText"),currentWeekRange.start);return react.createElement("div",{className:"opening-hours"},react.createElement("div",{className:"opening-hours__header"},react.createElement("h2",{className:"opening-hours__heading"},t("openingHoursHeadingText")),react.createElement("div",{className:"opening-hours__navigation-controls"},react.createElement("button",{"data-cy":"opening-hours-previous-week-button",className:"opening-hours__navigation-control","aria-label":previousWeekString,onClick:navigateToPreviousWeek,type:"button"},react.createElement("img",{src:ArrowLeft_default(),alt:""})),react.createElement("div",{className:"opening-hours__week-display"},currentWeekString),react.createElement("button",{"data-cy":"opening-hours-next-week-button",className:"opening-hours__navigation-control opening-hours__navigation-control--next","aria-label":nextWeekString,onClick:navigateToNextWeek,type:"button"},react.createElement("img",{src:ArrowRight_default(),alt:""})))),react.createElement(opening_hours_OpeningHourWeekList,{data:groupedOpeningHours,isLoading}))},opening_hours_OpeningHours=OpeningHours;try{OpeningHours.displayName="OpeningHours",OpeningHours.__docgenInfo={description:"",displayName:"OpeningHours",props:{branchId:{defaultValue:null,description:"",name:"branchId",required:!0,type:{name:"number"}},initialDate:{defaultValue:null,description:"",name:"initialDate",required:!0,type:{name:"Date"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHours.tsx#OpeningHours"]={docgenInfo:OpeningHours.__docgenInfo,name:"OpeningHours",path:"src/apps/opening-hours/OpeningHours.tsx#OpeningHours"})}catch(__react_docgen_typescript_loader_error){}const OpeningHours_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({branchId,initialDate=new Date})=>react.createElement(opening_hours_OpeningHours,{branchId,initialDate})))));try{OpeningHoursentry.displayName="OpeningHoursentry",OpeningHoursentry.__docgenInfo={description:"",displayName:"OpeningHoursentry",props:{branchId:{defaultValue:null,description:"",name:"branchId",required:!0,type:{name:"number"}},initialDate:{defaultValue:{value:"new Date()"},description:"",name:"initialDate",required:!1,type:{name:"Date | undefined"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHours.entry.tsx#OpeningHoursentry"]={docgenInfo:OpeningHoursentry.__docgenInfo,name:"OpeningHoursentry",path:"src/apps/opening-hours/OpeningHours.entry.tsx#OpeningHoursentry"})}catch(__react_docgen_typescript_loader_error){}const OpeningHours_dev={title:"Apps / Opening Hours",component:OpeningHours_entry,argTypes:{initialDate:{defaultValue:new Date("2024-03-25"),control:{type:"date"}},branchId:{defaultValue:12,control:{type:"number"}},showOpeningHoursForWeekText:{defaultValue:"Show opening hours for week",control:{type:"text"}},weekText:{defaultValue:"Week",control:{type:"text"}},libraryIsClosedText:{defaultValue:"The library is closed this day",control:{type:"text"}},openingHoursHeadingText:{defaultValue:"Opening hours",control:{type:"text"}},...globalConfigArgs.A,...globalTextArgs.A,...serviceUrlArgs.A}},Default=args=>react.createElement(OpeningHours_entry,args),materialWithoutType=Default.bind({})},"./src/apps/patron-page/PatronPage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PatronPageEntry:()=>PatronPage_dev_PatronPageEntry,default:()=>PatronPage_dev});var react=__webpack_require__("./node_modules/react/index.js"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const BasicDetailsSection=({patron})=>{const t=(0,utils_text.F)(),{address:{coName,street,postalCode,city,country}={coName:"",street:"",postalCode:"",city:"",country:""},name}=patron||{};return react.createElement("section",null,react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageBasicDetailsHeaderText")),react.createElement("div",{className:"dpl-patron-info"},react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsNameLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},name),react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsAddressLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",null,coName),react.createElement("div",null,street),react.createElement("div",null,postalCode),react.createElement("div",null,city),react.createElement("div",null,country))))},sections_BasicDetailsSection=BasicDetailsSection;try{BasicDetailsSection.displayName="BasicDetailsSection",BasicDetailsSection.__docgenInfo={description:"",displayName:"BasicDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"]={docgenInfo:BasicDetailsSection.__docgenInfo,name:"BasicDetailsSection",path:"src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx");const ReservationDetailsSection=({patron,changePatron})=>{const t=(0,utils_text.F)();return react.createElement("section",{"data-cy":"pickup-reservations-section"},react.createElement("h2",{className:"text-header-h4 mt-64 mb-16"},t("patronPageChangePickupHeaderText")),react.createElement("p",{className:"text-body-small-regular mb-8"},t("patronPageChangePickupBodyText")),react.createElement(BranchesDropdown.A,{classNames:"dropdow dropdown__desktop",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch")}))},sections_ReservationDetailsSection=ReservationDetailsSection;try{ReservationDetailsSection.displayName="ReservationDetailsSection",ReservationDetailsSection.__docgenInfo={description:"",displayName:"ReservationDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"]={docgenInfo:ReservationDetailsSection.__docgenInfo,name:"ReservationDetailsSection",path:"src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const StatusSection=()=>{const t=(0,utils_text.F)(),alwaysAvailableEreolenUrl=(0,url.Ik)()("alwaysAvailableEreolenUrl"),{data:libraryProfileFetched}=(0,publizon.PF)(),{isSuccess,data}=(0,publizon.VM)(),[libraryProfile,setLibraryProfile]=(0,react.useState)(null),[patronData,setPatronData]=(0,react.useState)(null);(0,react.useEffect)((()=>{isSuccess&&data&&data.userData&&setPatronData(data.userData)}),[isSuccess,data]),(0,react.useEffect)((()=>{libraryProfileFetched&&setLibraryProfile(libraryProfileFetched)}),[libraryProfileFetched]);const{maxConcurrentAudioLoansPerBorrower,maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioReservationsPerBorrower=0,maxConcurrentEbookReservationsPerBorrower=0}=libraryProfile||{};let patronEbookLoans=0;null!=patronData&&patronData.totalEbookLoans&&(patronEbookLoans=Math.abs(null==patronData?void 0:patronData.totalEbookLoans)||0);let patronAudioBookLoans=0;null!=patronData&&patronData.totalAudioLoans&&(patronAudioBookLoans=Math.abs(null==patronData?void 0:patronData.totalAudioLoans)||0);let eBookLoanPercent=100;maxConcurrentEbookLoansPerBorrower&&(eBookLoanPercent=patronEbookLoans/maxConcurrentEbookLoansPerBorrower*100);let audioBookLoanPercent=100;return maxConcurrentAudioLoansPerBorrower&&(audioBookLoanPercent=patronAudioBookLoans/maxConcurrentAudioLoansPerBorrower*100),react.createElement("section",{className:"dpl-status-loans"},libraryProfile&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 mt-64 mb-16"},t("patronPageStatusSectionHeaderText")),react.createElement("div",{className:"text-body-small-regular mb-8"},t("patronPageStatusSectionBodyText")," ",react.createElement(Link.A,{href:alwaysAvailableEreolenUrl},t("patronPageStatusSectionLinkText"))),react.createElement("div",{className:"text-body-small-regular mt-8 mb-8"},t("patronPageStatusSectionReservationsText",{placeholders:{"@countEbooks":maxConcurrentEbookReservationsPerBorrower,"@countAudiobooks":maxConcurrentAudioReservationsPerBorrower}})),react.createElement("div",{className:"dpl-status-loans__column"},react.createElement("div",{className:"dpl-status mt-32"},react.createElement("h3",{className:"text-small-caption"},t("patronPageStatusSectionLoanHeaderText")),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label text-body-medium-medium",htmlFor:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionLoansEbooksText")),void 0!==maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},void 0!==maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"bg-identity-primary",role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelEbooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}),style:{width:`${eBookLoanPercent}%`}}))),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label",htmlFor:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionLoansAudioBooksText")),void 0!==maxConcurrentAudioLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronAudioBookLoans,"@that":maxConcurrentAudioLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},void 0!==maxConcurrentAudioLoansPerBorrower&&react.createElement("div",{role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelAudioBooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentAudioLoansPerBorrower}}),className:"bg-identity-primary",style:{width:`${audioBookLoanPercent}%`}})))))))},sections_StatusSection=StatusSection;try{StatusSection.displayName="StatusSection",StatusSection.__docgenInfo={description:"",displayName:"StatusSection",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/StatusSection.tsx#StatusSection"]={docgenInfo:StatusSection.__docgenInfo,name:"StatusSection",path:"src/apps/patron-page/sections/StatusSection.tsx#StatusSection"})}catch(__react_docgen_typescript_loader_error){}var PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const NotificationComponent=({notificationMessage})=>react.createElement(PromoBar.A,{text:notificationMessage,type:"info"}),notification_NotificationComponent=NotificationComponent;try{NotificationComponent.displayName="NotificationComponent",NotificationComponent.__docgenInfo={description:"",displayName:"NotificationComponent",props:{notificationMessage:{defaultValue:null,description:"",name:"notificationMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/notification/NotificationComponent.tsx#NotificationComponent"]={docgenInfo:NotificationComponent.__docgenInfo,name:"NotificationComponent",path:"src/components/notification/NotificationComponent.tsx#NotificationComponent"})}catch(__react_docgen_typescript_loader_error){}const useNotificationMessage=({timeout=5e3,scrollToTop=!0}={})=>{const[notificationMessage,setNotificationMessage]=(0,react.useState)(null);return[()=>notificationMessage?react.createElement(notification_NotificationComponent,{notificationMessage}):null,text=>{setNotificationMessage(text),scrollToTop&&window.scrollTo(0,0),timeout&&setTimeout((()=>{setNotificationMessage(null)}),timeout)}]};try{useNotificationMessage.displayName="useNotificationMessage",useNotificationMessage.__docgenInfo={description:"",displayName:"useNotificationMessage",props:{timeout:{defaultValue:{value:"5000"},description:"",name:"timeout",required:!1,type:{name:"number | undefined"}},scrollToTop:{defaultValue:{value:"true"},description:"",name:"scrollToTop",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useNotificationMessage.tsx#useNotificationMessage"]={docgenInfo:useNotificationMessage.__docgenInfo,name:"useNotificationMessage",path:"src/core/utils/useNotificationMessage.tsx#useNotificationMessage"})}catch(__react_docgen_typescript_loader_error){}var usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const sections_BasicDetailsSectionSkeleton=()=>react.createElement("div",{className:"dpl-patron-info ssc"},react.createElement("div",{className:"dpl-patron-info__label"},react.createElement("div",{className:"ssc-head-line w-10"})),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",{className:"ssc-head-line w-20 mts"})),react.createElement("div",{className:"dpl-patron-info__label"},react.createElement("div",{className:"ssc-head-line w-10"})),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",{className:"ssc-head-line w-40 mts"}))),PatronPageSkeleton=()=>{const t=(0,utils_text.F)();return react.createElement("form",{className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 my-32"},t("patronPageHeaderText")),react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageBasicDetailsHeaderText")),react.createElement(sections_BasicDetailsSectionSkeleton,null),react.createElement(ContactInfoSection.A,{changePatron:()=>{},patron:null,inLine:!1,showCheckboxes:!0}))},patron_page_PatronPageSkeleton=PatronPageSkeleton;try{PatronPageSkeleton.displayName="PatronPageSkeleton",PatronPageSkeleton.__docgenInfo={description:"",displayName:"PatronPageSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPageSkeleton.tsx#PatronPageSkeleton"]={docgenInfo:PatronPageSkeleton.__docgenInfo,name:"PatronPageSkeleton",path:"src/apps/patron-page/PatronPageSkeleton.tsx#PatronPageSkeleton"})}catch(__react_docgen_typescript_loader_error){}var useSavePatron=__webpack_require__("./src/core/utils/useSavePatron.tsx");const PatronPage=()=>{const t=(0,utils_text.F)(),deletePatronUrl=(0,url.Ik)()("deletePatronUrl"),{data:patronData,isLoading}=(0,usePatronData.I)(),[patron,setPatron]=(0,react.useState)(null),[pin,setPin]=(0,react.useState)(null),[isPinChangeValid,setIsPinChangeValid]=(0,react.useState)(!0),[disableSubmitButton,setDisableSubmitButton]=(0,react.useState)(!1),[successPinMessage,setSuccessPinMessage]=(0,react.useState)(null),[NotificationComponent,handleNotificationMessage]=useNotificationMessage(),{savePatron,savePincode}=(0,useSavePatron.A)({patron:patron||void 0,fetchHandlers:{savePatron:{onSuccess:()=>{setDisableSubmitButton(!1),handleNotificationMessage(t("patronPageHandleResponseInformationText"))},onError:()=>{setDisableSubmitButton(!1)}},savePincode:{onSuccess:()=>{setDisableSubmitButton(!1),setSuccessPinMessage(t("patronPinSavedSuccessText")),handleNotificationMessage(t("patronPageHandleResponseInformationText"))},onError:()=>{setDisableSubmitButton(!1)}}}});if((0,react.useEffect)((()=>{patronData&&patronData.patron&&setPatron(patronData.patron)}),[patronData]),isLoading||!patron)return react.createElement(patron_page_PatronPageSkeleton,null);const changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)},handleSubmit=e=>{e.preventDefault(),patron&&(setDisableSubmitButton(!0),pin?savePincode({pincode:pin,libraryCardNumber:patron.patronId.toString()}):savePatron(patron))};return react.createElement("form",{className:"dpl-patron-page",onSubmit:e=>handleSubmit(e)},react.createElement("h1",{className:"text-header-h1 my-32"},t("patronPageHeaderText")),react.createElement(NotificationComponent,null),patron&&react.createElement(sections_BasicDetailsSection,{patron}),react.createElement("div",{className:"patron-page-info"},patron&&react.createElement(ContactInfoSection.A,{changePatron,patron,inLine:!1,showCheckboxes:!0}),(null==patron?void 0:patron.resident)&&react.createElement(sections_StatusSection,null),patron&&react.createElement(sections_ReservationDetailsSection,{changePatron,patron}),patron&&react.createElement(PincodeSection.A,{changePincode:setPin,required:!1,setIsPinValid:setIsPinChangeValid}),successPinMessage&&react.createElement("p",{className:"text-body-small-regular mb-8 mt-8",role:"alert"},successPinMessage),react.createElement("button",{"data-cy":"save-user-patron",className:"mt-48 btn-primary btn-filled btn-small arrow__hover--right-small ",type:"submit",disabled:disableSubmitButton||!isPinChangeValid},t(disableSubmitButton?"patronPageLoadingText":"patronPageSaveButtonText")),react.createElement("div",{className:"text-body-small-regular mt-32"},t("patronPageDeleteProfileText")," ",react.createElement(Link.A,{id:"delete-patron-link",href:deletePatronUrl,className:"link-tag"},t("patronPageDeleteProfileLinkText")))))},patron_page_PatronPage=PatronPage;try{PatronPage.displayName="PatronPage",PatronPage.__docgenInfo={description:"",displayName:"PatronPage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.tsx#PatronPage"]={docgenInfo:PatronPage.__docgenInfo,name:"PatronPage",path:"src/apps/patron-page/PatronPage.tsx#PatronPage"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const PatronPage_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((()=>react.createElement(patron_page_PatronPage,null))))));try{PatronPageentry.displayName="PatronPageentry",PatronPageentry.__docgenInfo={description:"",displayName:"PatronPageentry",props:{blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},minAgeConfig:{defaultValue:null,description:"",name:"minAgeConfig",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactInfoHeaderText:{defaultValue:null,description:"",name:"patronContactInfoHeaderText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsAddressLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsAddressLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsHeaderText:{defaultValue:null,description:"",name:"patronPageBasicDetailsHeaderText",required:!0,type:{name:"string"}},patronPageBasicDetailsNameLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsNameLabelText",required:!0,type:{name:"string"}},patronPageChangePickupBodyText:{defaultValue:null,description:"",name:"patronPageChangePickupBodyText",required:!0,type:{name:"string"}},patronPageChangePickupHeaderText:{defaultValue:null,description:"",name:"patronPageChangePickupHeaderText",required:!0,type:{name:"string"}},patronPageChangePincodeBodyText:{defaultValue:null,description:"",name:"patronPageChangePincodeBodyText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPageDeleteProfileLinkText:{defaultValue:null,description:"",name:"patronPageDeleteProfileLinkText",required:!0,type:{name:"string"}},patronPageDeleteProfileText:{defaultValue:null,description:"",name:"patronPageDeleteProfileText",required:!0,type:{name:"string"}},patronPageHandleResponseInformationText:{defaultValue:null,description:"",name:"patronPageHandleResponseInformationText",required:!0,type:{name:"string"}},patronPageHeaderText:{defaultValue:null,description:"",name:"patronPageHeaderText",required:!0,type:{name:"string"}},patronPageLoadingText:{defaultValue:null,description:"",name:"patronPageLoadingText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionAriaText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionText",required:!0,type:{name:"string"}},patronPagePauseReservationsBodyText:{defaultValue:null,description:"",name:"patronPagePauseReservationsBodyText",required:!0,type:{name:"string"}},patronPagePauseReservationsHeaderText:{defaultValue:null,description:"",name:"patronPagePauseReservationsHeaderText",required:!0,type:{name:"string"}},patronPagePhoneInputMessageText:{defaultValue:null,description:"",name:"patronPagePhoneInputMessageText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},patronPageSaveButtonText:{defaultValue:null,description:"",name:"patronPageSaveButtonText",required:!0,type:{name:"string"}},patronPageStatusSectionBodyText:{defaultValue:null,description:"",name:"patronPageStatusSectionBodyText",required:!0,type:{name:"string"}},patronPageStatusSectionHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionLinkText:{defaultValue:null,description:"",name:"patronPageStatusSectionLinkText",required:!0,type:{name:"string"}},patronPageStatusSectionLoanHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoanHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansAudioBooksText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansEbooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelAudioBooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelEbooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfText",required:!0,type:{name:"string"}},patronPageStatusSectionReservationsText:{defaultValue:null,description:"",name:"patronPageStatusSectionReservationsText",required:!0,type:{name:"string"}},patronPinSavedSuccessText:{defaultValue:null,description:"",name:"patronPinSavedSuccessText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},pauseReservationModalDateRangeLabelText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangeLabelText",required:!0,type:{name:"string"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangePlaceholderText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}},deletePatronUrl:{defaultValue:null,description:"",name:"deletePatronUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},alwaysLoanableEreolenUrl:{defaultValue:null,description:"",name:"alwaysLoanableEreolenUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"]={docgenInfo:PatronPageentry.__docgenInfo,name:"PatronPageentry",path:"src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const PatronPage_dev={title:"Apps / Patron page",component:PatronPage_entry,argTypes:{...serviceUrlArgs.A,...pincodeArgs.A,...blockedArgs.A,...globalTextArgs.A,...globalConfigArgs.A,pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},deletePatronUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},alwaysAvailableEreolenUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},patronPageHeaderText:{defaultValue:"Patron profile page",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},pauseReservationModalDateRangeLabelText:{defaultValue:"Pause period",control:{type:"text"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:"Choose pause period",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},patronPageBasicDetailsHeaderText:{defaultValue:"Basic details",control:{type:"text"}},patronPageBasicDetailsNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPageBasicDetailsAddressLabelText:{defaultValue:"Address",control:{type:"text"}},patronContactInfoHeaderText:{defaultValue:"Contact information",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth. This may cost money.",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},patronPageStatusSectionHeaderText:{defaultValue:"Digital loans (eReolen)",control:{type:"text"}},patronPageStatusSectionBodyText:{defaultValue:"There is a number of materials without limitation to amounts of loans per month.",control:{type:"text"}},patronPageStatusSectionLinkText:{defaultValue:"Click here, to see titles always eligible to be loaned",control:{type:"text"}},patronPageStatusSectionLoanHeaderText:{defaultValue:"Loans per month",control:{type:"text"}},patronPageStatusSectionLoansEbooksText:{defaultValue:"E-books",control:{type:"text"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:"Audiobooks",control:{type:"text"}},patronPageChangePickupHeaderText:{defaultValue:"Reservations",control:{type:"text"}},patronPageChangePickupBodyText:{defaultValue:"Change pickup body text",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPagePauseReservationsHeaderText:{defaultValue:"Pause physical reservations",control:{type:"text"}},patronPagePauseReservationsBodyText:{defaultValue:"Patron page pause reservations body text",control:{type:"text"}},patronPageOpenPauseReservationsSectionText:{defaultValue:"Pause your reservations",control:{type:"text"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:"This checkbox opens a modal where you can put your current reservations on a pause, when the time period picked has ended, the reservations will be resumed",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},patronPageChangePincodeBodyText:{defaultValue:"Change current pin by entering a new pin and saving",control:{type:"text"}},patronPinSavedSuccessText:{defaultValue:"Pincode was saved",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronPageSaveButtonText:{defaultValue:"Save",control:{type:"text"}},patronPageDeleteProfileText:{defaultValue:"Do you wish to delete your library profile?",control:{type:"text"}},patronPageDeleteProfileLinkText:{defaultValue:"Delete your profile",control:{type:"text"}},patronPageStatusSectionReservationsText:{defaultValue:"You can reserve @countEbooks ebooks and @countAudiobooks audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfText:{defaultValue:"@this out of @that",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:"You used @this audiobooks out of you quota of @that audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:"You used @this ebooks out of you quota of @that ebooks",control:{type:"text"}},patronPagePhoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}},patronPageHandleResponseInformationText:{defaultValue:"Your changes are saved.",control:{type:"text"}},patronPageLoadingText:{name:"Loading",defaultValue:"Loading..",control:{type:"text"}}}},PatronPage_dev_PatronPageEntry=(props=>react.createElement(PatronPage_entry,props)).bind({});PatronPage_dev_PatronPageEntry.args={}},"./src/apps/patron-page/sections/PincodeSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const PincodeSection=({changePincode,required,isFlex=!1,setIsPinValid})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),config=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_2__.UK)(),pincodeLengthMin=parseInt(config("pincodeLengthMinConfig"),10),pincodeLengthMax=parseInt(config("pincodeLengthMaxConfig"),10),[pincodeValidation,setPincodeValidation]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),[pincode,setPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[confirmPincode,setConfirmPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(changePincode(null),setPincodeValidation(""),pincode&&confirmPincode){if(pincode.length>pincodeLengthMax||pincode.lengthsetPincode(newPin),value:pincode,label:t("patronPagePincodeLabelText"),validation:pincodeValidation,description:t("pincodeSectionDescriptionText")}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__.A,{className:"patron__input patron__input--desktop",id:"pincode-confirm-input",pattern:"[0-9]*",required,inputmode:"numeric",type:"password",onChange:newPin=>setConfirmPincode(newPin),value:confirmPincode,label:t("patronPageConfirmPincodeLabelText"),description:t("pincodeSectionDescriptionText")})))},__WEBPACK_DEFAULT_EXPORT__=PincodeSection;try{PincodeSection.displayName="PincodeSection",PincodeSection.__docgenInfo={description:"",displayName:"PincodeSection",props:{changePincode:{defaultValue:null,description:"",name:"changePincode",required:!0,type:{name:"(newPin: string | null) => void"}},required:{defaultValue:null,description:"",name:"required",required:!0,type:{name:"boolean"}},isFlex:{defaultValue:{value:"false"},description:"",name:"isFlex",required:!1,type:{name:"boolean | undefined"}},setIsPinValid:{defaultValue:null,description:"",name:"setIsPinValid",required:!0,type:{name:"Dispatch>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"]={docgenInfo:PincodeSection.__docgenInfo,name:"PincodeSection",path:"src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/patron-page/util/BranchesDropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__),clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/branches.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const BranchesDropdown=({selected,onChange,classNames,required=!1,footnote})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),branches=(0,_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__.ov)("blacklistedPickupBranchesConfig");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:"branches-dropdown",className:"text-body-medium-medium mt-32 mb-8"},`${t("pickupBranchesDropdownLabelText")}${required?"*":null}`),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.A)(`dropdown mt-8 ${classNames||""}`,[{"mb-32":!footnote},{"mb-8":footnote}])},branches&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("select",{required:!0,id:"branches-dropdown",onChange:({target})=>onChange(target.value),className:"dropdown__select"},""===selected&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:"",className:"dropdown__option",selected:""===selected,disabled:!0},t("pickupBranchesDropdownNothingSelectedText")),branches.map((({branchId,title})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:branchId,selected:selected===branchId,className:"dropdown__option"},title)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dropdown__arrows"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"dropdown__arrow",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})))),footnote&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"dropdown__footnote"},footnote))},__WEBPACK_DEFAULT_EXPORT__=BranchesDropdown;try{BranchesDropdown.displayName="BranchesDropdown",BranchesDropdown.__docgenInfo={description:"",displayName:"BranchesDropdown",props:{selected:{defaultValue:null,description:"",name:"selected",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},required:{defaultValue:{value:"false"},description:"",name:"required",required:!1,type:{name:"boolean | undefined"}},footnote:{defaultValue:null,description:"",name:"footnote",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"]={docgenInfo:BranchesDropdown.__docgenInfo,name:"BranchesDropdown",path:"src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommendation/recommendation.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,Skeleton:()=>Skeleton,default:()=>recommendation_dev});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),recommendedMaterialDisplayTypeData=__webpack_require__("./src/apps/recommended-material/recommendedMaterialDisplayTypeData.ts"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),RecommendedMaterialSkeleton=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx");const RecommendationSkeleton=({positionImageRight})=>react.createElement("div",{className:(0,clsx.A)("recommendation",positionImageRight&&"recommendation--reversed")},react.createElement(RecommendedMaterialSkeleton.A,null),react.createElement("div",{className:"recommendation__texts ssc-text-wrapper"},react.createElement("div",{className:"recommendation__title ssc-text-wrapper"},react.createElement("div",{className:"ssc-line ssc-header"}),react.createElement("div",{className:"ssc-line ssc-header"})),react.createElement("div",{className:"recommendation__description"},react.createElement("div",{className:"ssc-line"}),react.createElement("div",{className:"ssc-line"}),react.createElement("div",{className:"ssc-line"}),react.createElement("div",{className:"ssc-line"})))),recommendation_RecommendationSkeleton=RecommendationSkeleton;try{RecommendationSkeleton.displayName="RecommendationSkeleton",RecommendationSkeleton.__docgenInfo={description:"",displayName:"RecommendationSkeleton",props:{positionImageRight:{defaultValue:null,description:"",name:"positionImageRight",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommendation/RecommendationSkeleton.tsx#RecommendationSkeleton"]={docgenInfo:RecommendationSkeleton.__docgenInfo,name:"RecommendationSkeleton",path:"src/apps/recommendation/RecommendationSkeleton.tsx#RecommendationSkeleton"})}catch(__react_docgen_typescript_loader_error){}var guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),RecommendedMaterial=__webpack_require__("./src/apps/recommended-material/RecommendedMaterial.tsx");const recommendation_recommendation=({wid,materialType,positionImageRight})=>{const materialUrl=(0,url.Ik)()("materialUrl"),{data,isLoading}=(0,graphql.RR)({wid});if(isLoading||null==data||!data.work)return react.createElement(recommendation_RecommendationSkeleton,null);const{work:{titles:{full:materialFullTitle},abstract}}=data,materialFullUrl=(0,helpers_url.Qj)(materialUrl,wid,materialType),materialDescription=null==abstract?void 0:abstract[0];return react.createElement("div",{className:(0,clsx.A)("recommendation",positionImageRight&&"recommendation--reversed"),"data-cy":"recommendation"},react.createElement(RecommendedMaterial.A,{wid,materialType}),react.createElement(Link.A,{href:materialFullUrl,className:"recommendation__texts arrow__hover--right-small"},react.createElement("h3",{className:"recommendation__title","data-cy":"recommendation-title"},materialFullTitle),react.createElement("p",{className:"recommendation__description","data-cy":"recommendation-description"},materialDescription),react.createElement(arrow.A,null)))};try{recommendation.displayName="recommendation",recommendation.__docgenInfo={description:"",displayName:"recommendation",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},positionImageRight:{defaultValue:null,description:"",name:"positionImageRight",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommendation/recommendation.tsx#recommendation"]={docgenInfo:recommendation.__docgenInfo,name:"recommendation",path:"src/apps/recommendation/recommendation.tsx#recommendation"})}catch(__react_docgen_typescript_loader_error){}const recommendation_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({wid,materialType,positionImageRight})=>react.createElement(guarded_app.A,{app:"recommendation"},react.createElement(recommendation_recommendation,{wid,materialType,positionImageRight}))))));try{recommendationentry.displayName="recommendationentry",recommendationentry.__docgenInfo={description:"",displayName:"recommendationentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},positionImageRight:{defaultValue:null,description:"",name:"positionImageRight",required:!1,type:{name:"boolean | undefined"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommendation/recommendation.entry.tsx#recommendationentry"]={docgenInfo:recommendationentry.__docgenInfo,name:"recommendationentry",path:"src/apps/recommendation/recommendation.entry.tsx#recommendationentry"})}catch(__react_docgen_typescript_loader_error){}const recommendation_dev={title:"Apps / Recommendation",component:recommendation_entry,argTypes:{wid:{defaultValue:"work-of:870970-basis:22383590",control:{type:"text"}},materialType:{defaultValue:"bog",control:{type:"select",options:recommendedMaterialDisplayTypeData.A}},positionImageRight:{defaultValue:!1,control:{type:"boolean"}},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A}},App=args=>react.createElement(recommendation_entry,args),Skeleton=(args=>react.createElement(recommendation_RecommendationSkeleton,args)).bind({});Skeleton.argTypes={positionImageRight:{defaultValue:!1,control:{type:"boolean"}}}},"./src/apps/recommended-material/RecommendedMaterial.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Skeleton:()=>Skeleton,default:()=>RecommendedMaterial_dev,materialWithoutType:()=>materialWithoutType});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),RecommendedMaterial=__webpack_require__("./src/apps/recommended-material/RecommendedMaterial.tsx");const RecommendedMaterial_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({wid,materialType})=>react.createElement(guarded_app.A,{app:"recommended-material"},react.createElement(RecommendedMaterial.A,{wid,materialType}))))));try{RecommendedMaterialentry.displayName="RecommendedMaterialentry",RecommendedMaterialentry.__docgenInfo={description:"",displayName:"RecommendedMaterialentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommended-material/RecommendedMaterial.entry.tsx#RecommendedMaterialentry"]={docgenInfo:RecommendedMaterialentry.__docgenInfo,name:"RecommendedMaterialentry",path:"src/apps/recommended-material/RecommendedMaterial.entry.tsx#RecommendedMaterialentry"})}catch(__react_docgen_typescript_loader_error){}var RecommendedMaterialSkeleton=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx"),recommendedMaterialDisplayTypeData=__webpack_require__("./src/apps/recommended-material/recommendedMaterialDisplayTypeData.ts");const RecommendedMaterial_dev={title:"Apps / Recommended Material",component:RecommendedMaterial_entry,argTypes:{wid:{defaultValue:"work-of:870970-basis:22383590",control:{type:"text"}},materialType:{defaultValue:"bog",control:{type:"select",options:recommendedMaterialDisplayTypeData.A}},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A}},Default=args=>react.createElement(RecommendedMaterial_entry,args),materialWithoutType=Default.bind({});materialWithoutType.args={materialType:void 0};const Skeleton=(()=>react.createElement(RecommendedMaterialSkeleton.A,null)).bind({})},"./src/apps/recommended-material/RecommendedMaterial.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_query__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-query/es/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-redux/es/index.js"),_components_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_components_cover_cover__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/cover/cover.tsx"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/text.tsx"),_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/core/utils/url.tsx"),_material_helper__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/apps/material/helper.ts"),_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx");const RecommendedMaterial=({wid,materialType,partOfGrid=!1})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_8__.F)(),materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_10__.Ik)()("materialUrl"),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_2__.wA)(),queryClient=(0,react_query__WEBPACK_IMPORTED_MODULE_1__.useQueryClient)(),{data,isLoading}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_5__.RR)({wid});if(isLoading||null==data||!data.work)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_12__.A,{partOfGrid});const{work:{titles:{full:fullTitle},manifestations:{bestRepresentation},creators}}=data,work=data.work,materialManifestationForDisplay=materialType?(0,_material_helper__WEBPACK_IMPORTED_MODULE_11__.xb)(work,materialType):bestRepresentation,{pid}=materialManifestationForDisplay,author=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_7__.sP)((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_7__.UV)(creators),t),materialFullUrl=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_13__.Qj)(materialUrl,wid,materialType);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_14__.A)("recommended-material",partOfGrid&&"recommended-material--in-grid")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"recommended-material__icon"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__.A,{title:String(fullTitle),id:wid,addToListRequest:id=>{dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__.A5)({type:"addFavorite",args:{id,queryClient},app:"material"}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_cover_cover__WEBPACK_IMPORTED_MODULE_4__.Y,{ids:[pid],url:materialFullUrl,size:"large",animate:!0,alt:"",shadow:"medium"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"recommended-material__texts"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_9__.A,{href:materialFullUrl,className:"recommended-material__description",dataCy:"recommended-description"},fullTitle),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_9__.A,{href:materialFullUrl,className:"recommended-material__author",dataCy:"recommended-author"},author)))},__WEBPACK_DEFAULT_EXPORT__=RecommendedMaterial;try{RecommendedMaterial.displayName="RecommendedMaterial",RecommendedMaterial.__docgenInfo={description:"",displayName:"RecommendedMaterial",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},partOfGrid:{defaultValue:{value:"false"},description:"",name:"partOfGrid",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommended-material/RecommendedMaterial.tsx#RecommendedMaterial"]={docgenInfo:RecommendedMaterial.__docgenInfo,name:"RecommendedMaterial",path:"src/apps/recommended-material/RecommendedMaterial.tsx#RecommendedMaterial"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const RecommendedMaterialSkeleton=({partOfGrid})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.A)("recommended-material",{"recommended-material--in-grid":partOfGrid})},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square w-30 recommended-material__icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square image-square"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-text-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line"}))),__WEBPACK_DEFAULT_EXPORT__=RecommendedMaterialSkeleton;try{RecommendedMaterialSkeleton.displayName="RecommendedMaterialSkeleton",RecommendedMaterialSkeleton.__docgenInfo={description:"",displayName:"RecommendedMaterialSkeleton",props:{partOfGrid:{defaultValue:null,description:"",name:"partOfGrid",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommended-material/RecommendedMaterialSkeleton.tsx#RecommendedMaterialSkeleton"]={docgenInfo:RecommendedMaterialSkeleton.__docgenInfo,name:"RecommendedMaterialSkeleton",path:"src/apps/recommended-material/RecommendedMaterialSkeleton.tsx#RecommendedMaterialSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommended-material/recommendedMaterialDisplayTypeData.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={None:"",Bog:"bog",Billedbog:"billedbog","Billedbog (Online)":"billedbog (online)","E-bog":"e-bog",CD:"cd",Podcast:"podcast","Musik (Online)":"musik (online)",Film:"film","Film (Online)":"film (online)",Lydbog:"lydbog","Lydbog (Online)":"lydbog (online)","Lydbog (CD-MP3)":"lydbog (cd-mp3)",Artikel:"artikel","Artikel (Online)":"artikel (online)",Tegneserie:"tegneserie","Tegneserie (Online)":"tegneserie (online)",Tidsskrift:"tidsskrift","Tidsskrift (Online)":"tidsskrift (online)"}},"./src/apps/recommender/Recommender.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RecommenderEntry:()=>Recommender_dev_RecommenderEntry,default:()=>Recommender_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const InspirationRecommender=()=>{const t=(0,utils_text.F)(),defaultSearchFromConfig=(0,utils_config.UK)()("emptyRecommenderSearchConfig"),{inspiration:inspirationLimit}=(0,general.fL)(),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null),{data}=(0,graphql.KG)({limit:inspirationLimit,q:{all:defaultSearchFromConfig},offset:0});return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),null===recommendedMaterials?null:react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__title text-header-h1"},t("recommenderTitleInspirationText")),react.createElement("ul",{className:"recommender__grid"},recommendedMaterials&&recommendedMaterials.search.works.map((work=>react.createElement(SimpleMaterial.A,{app:"inspiration-recommender",work})))))},recommender_InspirationRecommender=InspirationRecommender;try{InspirationRecommender.displayName="InspirationRecommender",InspirationRecommender.__docgenInfo={description:"",displayName:"InspirationRecommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"]={docgenInfo:InspirationRecommender.__docgenInfo,name:"InspirationRecommender",path:"src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx");const RecommendList=({material,loanOrReservationFaust,titleKey})=>{const t=(0,utils_text.F)(),{recommender:recommenderLimit}=(0,general.fL)(),{data}=(0,graphql.Nr)({faust:loanOrReservationFaust,limit:recommenderLimit}),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null);return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),react.createElement(react.Fragment,null,material&&material.title&&react.createElement("h2",{className:"recommender__title text-header-h1"},t(titleKey,{placeholders:{"@title":material.title}})),react.createElement("ul",{className:"recommender__triple-grid"},recommendedMaterials&&recommendedMaterials.recommend.result.map((({work})=>react.createElement(SimpleMaterial.A,{work,app:"recommender"})))))},recommender_RecommendList=(0,__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx").A)((0,material_fetch_hoc.A)(RecommendList));try{RecommendList.displayName="RecommendList",RecommendList.__docgenInfo={description:"",displayName:"RecommendList",props:{loanOrReservationFaust:{defaultValue:null,description:"",name:"loanOrReservationFaust",required:!0,type:{name:"string"}},titleKey:{defaultValue:null,description:"",name:"titleKey",required:!0,type:{name:"enum",value:[{value:'"recommenderTitleLoansText"'},{value:'"recommenderTitleReservationsText"'}]}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/RecommendList.tsx#RecommendList"]={docgenInfo:RecommendList.__docgenInfo,name:"RecommendList",path:"src/apps/recommender/RecommendList.tsx#RecommendList"})}catch(__react_docgen_typescript_loader_error){}var useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const Recommender=()=>{const[loanForRecommender,setLoanForRecommender]=(0,react.useState)(null),[reservationForRecommender,setReservationForRecommender]=(0,react.useState)(null),{fbs:{loans:physicalLoans,isLoading:fbsLoansLoading}}=(0,useLoans.A)(),{fbs:{reservations:physicalReservations,isLoading:fbsReservationsLoading}}=(0,useReservations.A)();(0,react.useEffect)((()=>{if(null!==physicalLoans){const newestLoan=(0,general.EA)(physicalLoans).reverse();newestLoan.length>0&&setLoanForRecommender(newestLoan[0])}if(null!==physicalReservations){const newestReservation=(0,general.Y2)(physicalReservations).reverse();newestReservation.length>0&&setReservationForRecommender(newestReservation[0])}}),[physicalLoans,physicalReservations,setLoanForRecommender]);const stillLoading=fbsReservationsLoading||fbsLoansLoading;return react.createElement("div",{className:"recommender recommender--padding-desktop recommender--triple-desktop"},loanForRecommender&&loanForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleLoansText",item:loanForRecommender,loanOrReservationFaust:loanForRecommender.faust}),!loanForRecommender&&reservationForRecommender&&reservationForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleReservationsText",item:reservationForRecommender,loanOrReservationFaust:reservationForRecommender.faust}),!loanForRecommender&&!reservationForRecommender&&!stillLoading&&react.createElement(recommender_InspirationRecommender,null))},recommender_Recommender=Recommender;try{Recommender.displayName="Recommender",Recommender.__docgenInfo={description:"",displayName:"Recommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.tsx#Recommender"]={docgenInfo:Recommender.__docgenInfo,name:"Recommender",path:"src/apps/recommender/Recommender.tsx#Recommender"})}catch(__react_docgen_typescript_loader_error){}var url=__webpack_require__("./src/core/utils/url.tsx"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx");const Recommender_entry=(0,url.nU)((0,utils_config.NV)((0,utils_text.i)((()=>react.createElement(guarded_app.A,{app:"recommender"},react.createElement(recommender_Recommender,null))))));try{Recommenderentry.displayName="Recommenderentry",Recommenderentry.__docgenInfo={description:"",displayName:"Recommenderentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},emptyRecommenderSearchConfig:{defaultValue:null,description:"",name:"emptyRecommenderSearchConfig",required:!0,type:{name:"string"}},recommenderTitleLoansText:{defaultValue:null,description:"",name:"recommenderTitleLoansText",required:!0,type:{name:"string"}},recommenderTitleReservationsText:{defaultValue:null,description:"",name:"recommenderTitleReservationsText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},recommenderTitleInspirationText:{defaultValue:null,description:"",name:"recommenderTitleInspirationText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.entry.tsx#Recommenderentry"]={docgenInfo:Recommenderentry.__docgenInfo,name:"Recommenderentry",path:"src/apps/recommender/Recommender.entry.tsx#Recommenderentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const Recommender_dev={title:"Apps / Recommender",component:Recommender_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,emptyRecommenderSearchConfig:{defaultValue:"Mimbo jimbo",control:{type:"text"}},recommenderTitleLoansText:{control:{type:"text"},defaultValue:"Because you have borrowed @title you may also like"},recommenderTitleReservationsText:{control:{type:"text"},defaultValue:"Because you have reserved @title you may also like"},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},recommenderTitleInspirationText:{control:{type:"text"},defaultValue:"For your inspiration"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}}}},Recommender_dev_RecommenderEntry=(props=>react.createElement(Recommender_entry,props)).bind({});Recommender_dev_RecommenderEntry.args={}},"./src/apps/reservation-list/list/reservation-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReservationListDigitalDetailsModal:()=>ReservationListDigitalDetailsModal,ReservationListEntry:()=>reservation_list_dev_ReservationListEntry,ReservationListPauseModal:()=>ReservationListPauseModal,ReservationListPhysicalDetailsModal:()=>ReservationListPhysicalDetailsModal,default:()=>reservation_list_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),modal=__webpack_require__("./src/core/utils/modal.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const reservation_pause_toggler=({user})=>{const t=(0,utils_text.F)(),{open}=(0,modal.X)(),{pauseReservation}=(0,modal_helpers.c6)(),[onHoldDates,setOnHoldDates]=(0,react.useState)();return(0,react.useEffect)((()=>{user&&user.onHold&&user.onHold.from&&user.onHold.to?setOnHoldDates(`${(0,date.Yq)(user.onHold.from)} - ${(0,date.Yq)(user.onHold.to)}`):user&&null===user.onHold&&setOnHoldDates("")}),[user]),react.createElement("div",{className:"dpl-pause-reservation-component m-32"},react.createElement("div",{className:"dpl-pause-reservation-component__pagefold"}),react.createElement("div",{className:"dpl-pause-reservation-component__flex"},react.createElement("div",{className:"dpl-pause-reservation-component__flex__reservation-icon"},react.createElement("img",{src:Reservations_default(),alt:""})),react.createElement("div",{className:"dpl-pause-reservation-component__flex__text"},t(onHoldDates?"reservationListPauseReservationOnHoldText":"reservationListPauseReservationText")),onHoldDates&&react.createElement("span",{"aria-label":t("reservationListOnHoldAriaText"),className:"dpl-pause-reservation-component__flex__badge"},onHoldDates),react.createElement("div",{className:"dpl-pause-reservation-component__flex__button"},react.createElement("button",{"aria-label":t("reservationListPauseReservationAriaModalText"),type:"button",onClick:()=>{open(pauseReservation)},className:"btn-primary btn-filled btn-small"},t("reservationListPauseReservationButtonText")))))};try{reservationpausetoggler.displayName="reservationpausetoggler",reservationpausetoggler.__docgenInfo={description:"",displayName:"reservationpausetoggler",props:{user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"]={docgenInfo:reservationpausetoggler.__docgenInfo,name:"reservationpausetoggler",path:"src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"})}catch(__react_docgen_typescript_loader_error){}var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx");const EmptyReservations=()=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"list-reservation-container m-32"},react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("reservationListAllEmptyText")}))},list_EmptyReservations=EmptyReservations;try{EmptyReservations.displayName="EmptyReservations",EmptyReservations.__docgenInfo={description:"",displayName:"EmptyReservations",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"]={docgenInfo:EmptyReservations.__docgenInfo,name:"EmptyReservations",path:"src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"})}catch(__react_docgen_typescript_loader_error){}var dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),build=__webpack_require__("./node_modules/react-flatpickr/build/index.js"),da=(__webpack_require__("./node_modules/flatpickr/dist/flatpickr.css"),__webpack_require__("./node_modules/flatpickr/dist/l10n/da.js"));const DateRangeInput=({setStartDate,setEndDate,startDate,endDate,label,placeholder,className="date-range",dataCy="date-range"})=>{const refLabel=react.useRef(null),value=startDate&&endDate?[dayjs_min_default()(startDate).toDate(),dayjs_min_default()(endDate).toDate()]:void 0;return react.createElement("div",{"data-cy":dataCy,className},react.createElement("div",{className:"date-range__input"},react.createElement("label",{ref:refLabel,htmlFor:"date-range",className:"text-body-medium-regular"},label),react.createElement(build.A,{id:"date-range",value,options:{altInput:!0,altFormat:"j. F Y",minDate:dayjs_min_default()().toDate(),locale:da.Danish,dateFormat:"d-m-Y",static:!0,mode:"range",onOpen:()=>{var _refLabel$current;null===(_refLabel$current=refLabel.current)||void 0===_refLabel$current||_refLabel$current.scrollIntoView()},onReady:(dates,currentDateStr,self)=>{var _self$altInput,_self$altInput2,_self$altInput2$getAt;null===(_self$altInput=self.altInput)||void 0===_self$altInput||_self$altInput.setAttribute("aria-label",label);const classes=(null===(_self$altInput2=self.altInput)||void 0===_self$altInput2||null===(_self$altInput2$getAt=_self$altInput2.getAttribute("class"))||void 0===_self$altInput2$getAt?void 0:_self$altInput2$getAt.split(" "))||[];var _self$altInput3,_self$altInput4;!dates.length&&placeholder&&(null===(_self$altInput3=self.altInput)||void 0===_self$altInput3||_self$altInput3.setAttribute("placeholder",placeholder));dates.length||classes.includes("empty-date-range")||(classes.push("empty-date-range"),null===(_self$altInput4=self.altInput)||void 0===_self$altInput4||_self$altInput4.setAttribute("class",classes.join(" ")))},onValueUpdate:(dates,currentDateStr,self)=>{var _self$altInput5,_self$altInput5$getAt;const classes=(null===(_self$altInput5=self.altInput)||void 0===_self$altInput5||null===(_self$altInput5$getAt=_self$altInput5.getAttribute("class"))||void 0===_self$altInput5$getAt?void 0:_self$altInput5$getAt.split(" "))||[];var _self$altInput6;dates.length&&classes.includes("empty-date-range")&&(classes.splice(classes.indexOf("empty-date-range"),1),null===(_self$altInput6=self.altInput)||void 0===_self$altInput6||_self$altInput6.setAttribute("class",classes.join(" ")))}},onChange:([start,end])=>{start&&end&&(setStartDate(dayjs_min_default()(start).format("YYYY-MM-DD")),setEndDate(dayjs_min_default()(end).format("YYYY-MM-DD")))}})))},date_inputs_DateRangeInput=DateRangeInput;try{DateRangeInput.displayName="DateRangeInput",DateRangeInput.__docgenInfo={description:"",displayName:"DateRangeInput",props:{setStartDate:{defaultValue:null,description:"",name:"setStartDate",required:!0,type:{name:"(date: string) => void"}},setEndDate:{defaultValue:null,description:"",name:"setEndDate",required:!0,type:{name:"(date: string) => void"}},startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"string"}},endDate:{defaultValue:null,description:"",name:"endDate",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | undefined"}},className:{defaultValue:{value:"date-range"},description:"",name:"className",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"date-range"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/date-inputs/DateRangeInput.tsx#DateRangeInput"]={docgenInfo:DateRangeInput.__docgenInfo,name:"DateRangeInput",path:"src/components/date-inputs/DateRangeInput.tsx#DateRangeInput"})}catch(__react_docgen_typescript_loader_error){}var useSavePatron=__webpack_require__("./src/core/utils/useSavePatron.tsx");const pause_reservation=({id,user})=>{var _user$onHold,_user$onHold2,_user$onHold5,_user$onHold6;const t=(0,utils_text.F)(),pauseReservationInfoUrl=(0,url.Ik)()("pauseReservationInfoUrl"),{close}=(0,modal.X)(),{pauseReservation}=(0,modal_helpers.c6)(),[isLoading,setIsLoading]=(0,react.useState)(!1),{savePatron}=(0,useSavePatron.A)({patron:user,fetchHandlers:{savePatron:{onSuccess:()=>{setIsLoading(!1),close(pauseReservation)},onError:()=>{setIsLoading(!1)}}}}),saveFormId=(0,react.useId)(),currentDate=dayjs_min_default()().format("YYYY-MM-DD"),[startDate,setStartDate]=(0,react.useState)(currentDate),[endDate,setEndDate]=(0,react.useState)(""),pauseActive=(null==user||null===(_user$onHold=user.onHold)||void 0===_user$onHold?void 0:_user$onHold.from)&&(null==user||null===(_user$onHold2=user.onHold)||void 0===_user$onHold2?void 0:_user$onHold2.to),saveDates=(0,react.useCallback)(((start,end)=>{user&&(setIsLoading(!0),savePatron({onHold:{from:""===start?void 0:start,to:""===end?void 0:end}}))}),[savePatron,user]),resetPauseDates=(0,react.useCallback)((()=>{setStartDate(currentDate),setEndDate(""),saveDates()}),[currentDate,saveDates]);return(0,react.useEffect)((()=>{var _user$onHold3,_user$onHold4;null!=user&&null!==(_user$onHold3=user.onHold)&&void 0!==_user$onHold3&&_user$onHold3.from&&setStartDate(user.onHold.from),null!=user&&null!==(_user$onHold4=user.onHold)&&void 0!==_user$onHold4&&_user$onHold4.to&&setEndDate(user.onHold.to)}),[null==user||null===(_user$onHold5=user.onHold)||void 0===_user$onHold5?void 0:_user$onHold5.from,null==user||null===(_user$onHold6=user.onHold)||void 0===_user$onHold6?void 0:_user$onHold6.to]),react.createElement(modal.A,{modalId:id,classNames:"modal-cta",closeModalAriaLabelText:t("pauseReservationModalCloseModalText"),screenReaderModalDescriptionText:t("pauseReservationModalAriaDescriptionText")},react.createElement("div",{className:"modal-pause__container"},react.createElement("h2",{className:"text-header-h3"},t("pauseReservationModalHeaderText")),react.createElement("div",{className:"modal-pause__subtitle"},react.createElement("p",{className:"text-body-medium-regular"},t("pauseReservationModalBodyText"))),react.createElement("form",{id:saveFormId,onSubmit:e=>{e.preventDefault(),startDate&&endDate&&saveDates(startDate,endDate)}},react.createElement("div",{className:"modal-pause__date-range"},react.createElement(date_inputs_DateRangeInput,{setStartDate,setEndDate,startDate,endDate,label:t("pauseReservationModalDateRangeLabelText"),placeholder:t("pauseReservationModalDateRangePlaceholderText")}))),react.createElement("div",{className:"modal-pause__text-link"},react.createElement("p",{className:"text-body-small-regular"},t("pauseReservationModalBelowInputsText"))),react.createElement("p",{className:"text-body-small-regular"},react.createElement(Link.A,{id:"pause-reservation-info-link",href:pauseReservationInfoUrl,className:"link-tag"},t("pauseReservationModalLinkText"))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement("button",{type:"submit",form:saveFormId,className:"btn-primary btn-filled btn-small",disabled:isLoading},t("pauseReservationModalSaveButtonLabelText")),pauseActive&&react.createElement("button",{type:"button",onClick:resetPauseDates,className:"btn-primary btn-small mt-16"},t("pauseReservationModalCancelButtonLabelText")))))};try{pausereservation.displayName="pausereservation",pausereservation.__docgenInfo={description:"",displayName:"pausereservation",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"]={docgenInfo:pausereservation.__docgenInfo,name:"pausereservation",path:"src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"})}catch(__react_docgen_typescript_loader_error){}var delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),list_material_skeleton=__webpack_require__("./src/apps/reservation-list/reservation-material/list-material-skeleton.tsx");const reservation_material=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({material,reservation,focused,openReservationDetailsModal,identifier,dataCy="reservation-material"})=>{const openDetailsModal=()=>{openReservationDetailsModal(reservation)},isDigital=!!identifier;return react.createElement("li",null,react.createElement("div",{"data-cy":dataCy,className:"list-reservation my-32 cursor-pointer arrow__hover--right-small",role:"button",onClick:()=>openDetailsModal(),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDetailsModal()},tabIndex:0},material&&react.createElement(material_info.A,{arrowLabelledBy:`${reservation.identifier||reservation.faust}-title`,focused,openDetailsModal,periodical:reservation.periodical,material,isbnForCover:reservation.identifier||""}),react.createElement(reservation_info.A,{reservationInfo:reservation,openReservationDetailsModal,isDigital})))}),list_material_skeleton.A),list_material_skeleton.A);try{reservationmaterial.displayName="reservationmaterial",reservationmaterial.__docgenInfo={description:"",displayName:"reservationmaterial",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},dataCy:{defaultValue:{value:"reservation-material"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"]={docgenInfo:reservationmaterial.__docgenInfo,name:"reservationmaterial",path:"src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"})}catch(__react_docgen_typescript_loader_error){}const list_list=({reservations,header,pageSize,emptyListDataCy,emptyListLabel,openReservationDetailsModal})=>{const[dataReady,setDataReady]=(0,react.useState)(!1),[displayedReservations,setDisplayedReservations]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:reservations.length,pageSize});return(0,useDeepCompareEffect.A)((()=>{reservations&&(setDisplayedReservations((0,general.L1)(reservations,itemsShown)),setDataReady(!0))}),[itemsShown,reservations]),dataReady?react.createElement("div",null,react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{"data-cy":"reservation-list-header",className:"dpl-list-buttons__header"},react.createElement(react.Fragment,null,header,react.createElement("div",{className:"dpl-list-buttons__power"},reservations.length)))),react.createElement("div",{"data-cy":"list-reservation-container"},dataReady&&react.createElement(react.Fragment,null,react.createElement("ul",{className:"list-reservation-container"},displayedReservations.map(((reservation,i)=>react.createElement(reservation_material,{focused:firstInNewPage===i,openReservationDetailsModal,key:(0,reservation_type.OQ)(reservation),item:reservation,reservation})))),react.createElement(PagerComponent,null)),!displayedReservations.length&&react.createElement(empty_list.A,{classNames:"mt-24",dataCy:emptyListDataCy,emptyListText:emptyListLabel}))):react.createElement("div",null)};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListDataCy:{defaultValue:null,description:"",name:"emptyListDataCy",required:!0,type:{name:"string"}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/reservation-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}var helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx");const DisplayedReservations=({pageSize,openReservationDetailsModal})=>{const t=(0,utils_text.F)(),{all:{readyToLoan:readyToLoanReservations},fbs:{queued:reservedReservationsFBS},publizon:{queued:reservedReservationsPublizon}}=(0,useReservations.A)();return react.createElement(react.Fragment,null,react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListReadyForPickupTitleText"),reservations:(0,helpers.LQ)(readyToLoanReservations),emptyListDataCy:"reservation-list-ready-for-pickup-empty-list",emptyListLabel:t("reservationListReadyForPickupEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListPhysicalReservationsHeaderText"),reservations:(0,helpers.hm)(reservedReservationsFBS),emptyListDataCy:"reservation-list-physical-reservations-empty-list",emptyListLabel:t("reservationListPhysicalReservationsEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListDigitalReservationsHeaderText"),emptyListDataCy:"reservation-list-digital-reservations-empty-list",reservations:(0,helpers.LQ)(reservedReservationsPublizon),emptyListLabel:t("reservationListDigitalReservationsEmptyText")}))},list_DisplayedReservations=DisplayedReservations;try{DisplayedReservations.displayName="DisplayedReservations",DisplayedReservations.__docgenInfo={description:"",displayName:"DisplayedReservations",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"]={docgenInfo:DisplayedReservations.__docgenInfo,name:"DisplayedReservations",path:"src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"})}catch(__react_docgen_typescript_loader_error){}var material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const reservation_list_skeleton=()=>react.createElement(react.Fragment,null,react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-48"}),react.createElement(list_material_skeleton.A,null)),react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-80"}),react.createElement(list_material_skeleton.A,null)),react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-80"}),react.createElement(list_material_skeleton.A,null)));try{reservationlistskeleton.displayName="reservationlistskeleton",reservationlistskeleton.__docgenInfo={description:"",displayName:"reservationlistskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list-skeleton.tsx#reservationlistskeleton"]={docgenInfo:reservationlistskeleton.__docgenInfo,name:"reservationlistskeleton",path:"src/apps/reservation-list/list/reservation-list-skeleton.tsx#reservationlistskeleton"})}catch(__react_docgen_typescript_loader_error){}var usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const reservation_list=({pageSize})=>{const t=(0,utils_text.F)(),{modalIds}=(0,es.d4)((s=>s.modal)),{open}=(0,modal.X)(),{pauseReservation,deleteReservation,reservationDetails}=(0,modal_helpers.c6)(),[reservationWithDetails,setReservationWithDetails]=(0,react.useState)(null),[reservationToDelete,setReservationToDelete]=(0,react.useState)(null),{data:userData,isLoading:isLoadingUserData}=(0,usePatronData.I)(),{all:{reservations:allReservations,isLoading}}=(0,useReservations.A)(),allListsEmpty=0===allReservations.length&&!isLoading;return(0,useDeepCompareEffect.A)((()=>{const modalUrlParam=(0,helpers_url.d6)("modal"),resDetails=reservationDetails;if(modalUrlParam&&modalUrlParam.includes(resDetails)){const queryReservationId=(0,modal_helpers.dI)(modalUrlParam,resDetails);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type.OQ)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}const deleteRes=deleteReservation;if(modalUrlParam&&modalUrlParam.includes(deleteRes)){const queryReservationId=(0,modal_helpers.dI)(modalUrlParam,deleteRes);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type.OQ)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}}),[allReservations,reservationDetails,deleteReservation]),react.createElement(react.Fragment,null,react.createElement("div",{className:`reservation-list-page ${(0,general.eD)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 m-32"},t("reservationListHeaderText")),isLoadingUserData&&react.createElement("div",{className:"ssc"},react.createElement("div",{className:"ssc-square w-90 ml-32 my-32"})),(null==userData?void 0:userData.patron)&&react.createElement(reservation_pause_toggler,{user:userData.patron}),isLoading&&0===allReservations.length&&react.createElement(reservation_list_skeleton,null),allListsEmpty&&react.createElement(list_EmptyReservations,null),!allListsEmpty&&react.createElement(list_DisplayedReservations,{openReservationDetailsModal:reservationForModal=>{setReservationWithDetails(reservationForModal),open((0,material_details_modal.bk)(reservationForModal))},pageSize})),(null==userData?void 0:userData.patron)&&react.createElement(pause_reservation,{user:null==userData?void 0:userData.patron,id:pauseReservation}),reservationToDelete&&react.createElement(delete_reservation_modal.A,{modalId:(0,delete_reservation_modal.g)(reservationToDelete),reservations:[reservationToDelete]}),reservationWithDetails&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.bk)(reservationWithDetails)},react.createElement(reservation_details.A,{openReservationDeleteModal:reservationForModal=>{setReservationToDelete(reservationForModal),open((0,delete_reservation_modal.g)(reservationForModal))},item:reservationWithDetails,reservation:reservationWithDetails})))};try{reservationlist.displayName="reservationlist",reservationlist.__docgenInfo={description:"",displayName:"reservationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.tsx#reservationlist"]={docgenInfo:reservationlist.__docgenInfo,name:"reservationlist",path:"src/apps/reservation-list/list/reservation-list.tsx#reservationlist"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const reservation_list_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeReservationList");return react.createElement(reservation_list,{pageSize})})))));try{reservationlistentry.displayName="reservationlistentry",reservationlistentry.__docgenInfo={description:"",displayName:"reservationlistentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},expiresSoonText:{defaultValue:null,description:"",name:"expiresSoonText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},pauseReservationModalDateRangeLabelText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangeLabelText",required:!0,type:{name:"string"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangePlaceholderText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},physicalLoansTitleText:{defaultValue:null,description:"",name:"physicalLoansTitleText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},reservationDetailsExpiresText:{defaultValue:null,description:"",name:"reservationDetailsExpiresText",required:!0,type:{name:"string"}},reservationDetailsExpiresTitleText:{defaultValue:null,description:"",name:"reservationDetailsExpiresTitleText",required:!0,type:{name:"string"}},reservationListAllEmptyText:{defaultValue:null,description:"",name:"reservationListAllEmptyText",required:!0,type:{name:"string"}},reservationListYouAreInQueueText:{defaultValue:null,description:"",name:"reservationListYouAreInQueueText",required:!0,type:{name:"string"}},reservationListAvailableInText:{defaultValue:null,description:"",name:"reservationListAvailableInText",required:!0,type:{name:"string"}},reservationListDaysText:{defaultValue:null,description:"",name:"reservationListDaysText",required:!0,type:{name:"string"}},reservationListDayText:{defaultValue:null,description:"",name:"reservationListDayText",required:!0,type:{name:"string"}},reservationListDigitalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListDigitalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListFirstInQueueText:{defaultValue:null,description:"",name:"reservationListFirstInQueueText",required:!0,type:{name:"string"}},reservationListHeaderText:{defaultValue:null,description:"",name:"reservationListHeaderText",required:!0,type:{name:"string"}},reservationListInQueueText:{defaultValue:null,description:"",name:"reservationListInQueueText",required:!0,type:{name:"string"}},reservationListLoanBeforeText:{defaultValue:null,description:"",name:"reservationListLoanBeforeText",required:!0,type:{name:"string"}},reservationListNumberInQueueText:{defaultValue:null,description:"",name:"reservationListNumberInQueueText",required:!0,type:{name:"string"}},reservationListOnHoldAriaText:{defaultValue:null,description:"",name:"reservationListOnHoldAriaText",required:!0,type:{name:"string"}},reservationListPauseReservationAriaModalText:{defaultValue:null,description:"",name:"reservationListPauseReservationAriaModalText",required:!0,type:{name:"string"}},reservationListPauseReservationButtonText:{defaultValue:null,description:"",name:"reservationListPauseReservationButtonText",required:!0,type:{name:"string"}},reservationListPauseReservationOnHoldText:{defaultValue:null,description:"",name:"reservationListPauseReservationOnHoldText",required:!0,type:{name:"string"}},reservationListPauseReservationText:{defaultValue:null,description:"",name:"reservationListPauseReservationText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListReadyForPickupEmptyText:{defaultValue:null,description:"",name:"reservationListReadyForPickupEmptyText",required:!0,type:{name:"string"}},reservationListReadyForPickupTitleText:{defaultValue:null,description:"",name:"reservationListReadyForPickupTitleText",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"]={docgenInfo:reservationlistentry.__docgenInfo,name:"reservationlistentry",path:"src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts");const reservation_list_dev={title:"Apps / Reservation list",component:reservation_list_entry,argTypes:{...serviceUrlArgs.A,...deleteReservationModalArgs.A,...reservationMaterialDetailsArgs.A,...blockedArgs.A,...reservationListArgs.A,...globalTextArgs.A,blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListYouAreInQueueText:{defaultValue:"You are in the reservation queue",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}}},decorators:[esm.V]},Template=props=>react.createElement(reservation_list_entry,props),reservation_list_dev_ReservationListEntry=Template.bind({});reservation_list_dev_ReservationListEntry.args={};const{reservationDetails}=(0,modal_helpers.c6)(),ReservationListDigitalDetailsModal=Template.bind({});ReservationListDigitalDetailsModal.parameters={query:{modal:`${reservationDetails}9788702319361`}};const ReservationListPhysicalDetailsModal=Template.bind({});ReservationListPhysicalDetailsModal.parameters={query:{modal:`${reservationDetails}4698559133`}};const{pauseReservation}=(0,modal_helpers.c6)(),ReservationListPauseModal=Template.bind({});ReservationListPauseModal.parameters={query:{modal:pauseReservation}}},"./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>delete_reservation_modal,g:()=>deleteReservationModalId});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts");const requestsAndReservations=({reservations,operations})=>{const{physical:reservationsPhysical,digital:reservationsDigital}=(reservations=>reservations.length?{physical:reservations.filter(reservation_type.uT).map((({reservationIds})=>reservationIds)).flat(),digital:reservations.filter(reservation_type.BP).map((({identifier})=>identifier))}:{physical:[],digital:[]})(reservations),requests=[];return reservationsPhysical.length&&requests.push({params:{params:{reservationid:reservationsPhysical}},operation:operations.physical}),reservationsDigital.length&&reservationsDigital.forEach((id=>{requests.push({params:{identifier:String(id)},operation:operations.digital})})),{requests,reservationsPhysical,reservationsDigital}};var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const delete_reservation_content=({deleteReservation,reservationsCount,deletionStatus})=>{const t=(0,utils_text.F)(),deleteReservationCallback=(0,react.useCallback)((()=>{deleteReservation()}),[deleteReservation]),buttonLabel=(({reservationsCount,deletionStatus,t})=>"pending"===deletionStatus?t("deleteReservationModalDeleteProcessingText"):t("deleteReservationModalDeleteButtonText",{count:reservationsCount}))({t,reservationsCount,deletionStatus});return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h3"},t("deleteReservationModalHeaderText",{count:reservationsCount})),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalDeleteQuestionText",{count:reservationsCount})),react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalNotRegrettableText"))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement(Button.$,{dataCy:"delete-reservation-button",label:buttonLabel,buttonType:"none",variant:"filled",disabled:"pending"===deletionStatus,collapsible:!1,onClick:deleteReservationCallback,size:"small"})))};try{deletereservationcontent.displayName="deletereservationcontent",deletereservationcontent.__docgenInfo={description:"",displayName:"deletereservationcontent",props:{deleteReservation:{defaultValue:null,description:"",name:"deleteReservation",required:!0,type:{name:"() => void"}},reservationsCount:{defaultValue:null,description:"",name:"reservationsCount",required:!0,type:{name:"number"}},deletionStatus:{defaultValue:null,description:"",name:"deletionStatus",required:!0,type:{name:"enum",value:[{value:'"idle"'},{value:'"pending"'},{value:'"success"'},{value:'"error"'}]}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"]={docgenInfo:deletereservationcontent.__docgenInfo,name:"deletereservationcontent",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function deleteReservationModalId(reservation){return`${String((0,modal_helpers.c6)().reservationDelete)}${(0,reservation_type.OQ)(reservation)}`}const delete_reservation_modal=({modalId,reservations})=>{const t=(0,utils_text.F)(),queryClient=(0,es.useQueryClient)(),{mutate:deletePhysicalReservation}=(0,fbs.g1)(),{mutate:deleteDigitalReservation}=(0,publizon.de)(),[deletedReservations,setDeletedReservations]=(0,react.useState)(null),{requests,reservationsPhysical,reservationsDigital}=(0,react.useMemo)((()=>requestsAndReservations({operations:{digital:deleteDigitalReservation,physical:deletePhysicalReservation},reservations})),[deleteDigitalReservation,deletePhysicalReservation,reservations]),{handler:removeReservationsHandler,requestStatus,setRequestStatus}=(0,useRequestsWithStatus.mi)({requests,onSuccess:()=>{setDeletedReservations(reservations.length),queryClient.invalidateQueries((0,publizon.tt)()),queryClient.invalidateQueries((0,fbs.vN)())}});if(!reservations)return null;const ctaButtonParams={text:t("deleteReservationModalButtonText"),closeAllModals:!0,callback:()=>{setRequestStatus("idle"),setDeletedReservations(null)}};return react.createElement(modal.A,{modalId,classNames:"modal-cta modal-padding",closeModalAriaLabelText:t("deleteReservationModalCloseModalText"),screenReaderModalDescriptionText:t("deleteReservationModalAriaDescriptionText"),eventCallbacks:{close:()=>{setRequestStatus("idle"),setDeletedReservations(null)}}},["idle","pending"].includes(requestStatus)&&react.createElement(delete_reservation_content,{deleteReservation:()=>{(reservationsPhysical.length||reservationsDigital.length)&&removeReservationsHandler()},reservationsCount:reservations.length,deletionStatus:requestStatus}),"success"===requestStatus&&react.createElement(ModalMessage.A,{title:t("deleteReservationModalSuccessTitleText",{count:deletedReservations??1}),subTitle:t("deleteReservationModalSuccessStatusText",{count:deletedReservations??0}),ctaButton:ctaButtonParams}),"error"===requestStatus&&react.createElement(ModalMessage.A,{title:t("deleteReservationModalErrorsTitleText"),subTitle:t("deleteReservationModalErrorsStatusText"),ctaButton:ctaButtonParams}))};try{deleteReservationModalId.displayName="deleteReservationModalId",deleteReservationModalId.__docgenInfo={description:"",displayName:"deleteReservationModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},reservationType:{defaultValue:null,description:"",name:"reservationType",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"string | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"]={docgenInfo:deleteReservationModalId.__docgenInfo,name:"deleteReservationModalId",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"})}catch(__react_docgen_typescript_loader_error){}try{deletereservationmodal.displayName="deletereservationmodal",deletereservationmodal.__docgenInfo={description:"",displayName:"deletereservationmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"]={docgenInfo:deletereservationmodal.__docgenInfo,name:"deletereservationmodal",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>reservation_details});var react=__webpack_require__("./node_modules/react/index.js"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),utils_text=__webpack_require__("./src/core/utils/text.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const digital_list_details=({reservation})=>{const t=(0,utils_text.F)(),{expiryDate,dateOfReservation,pickupDeadline,state}=reservation;return react.createElement(react.Fragment,null,expiryDate&&"readyForPickup"===state&&react.createElement(list_details.A,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsExpiresText",{placeholders:{"@date":(0,date.r6)(expiryDate)}})}),pickupDeadline&&"reserved"===state&&react.createElement(list_details.A,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsBorrowBeforeText",{placeholders:{"@date":(0,date.r6)(pickupDeadline)}})}),dateOfReservation&&react.createElement(list_details.A,{icon:Loans_default(),labels:(0,date.r6)(dateOfReservation),title:t("reservationDetailsDateOfReservationTitleText")}))};try{digitallistdetails.displayName="digitallistdetails",digitallistdetails.__docgenInfo={description:"",displayName:"digitallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"]={docgenInfo:digitallistdetails.__docgenInfo,name:"digitallistdetails",path:"src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const reservation_details_buttons=({openReservationDeleteModal,classNames,buttonClassNames,reservation})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:`modal-details__buttons ${classNames}`},react.createElement(Button.$,{label:t("reservationDetailsButtonRemoveText"),onClick:()=>openReservationDeleteModal(reservation),classNames:buttonClassNames,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled"}))};try{reservationdetailsbuttons.displayName="reservationdetailsbuttons",reservationdetailsbuttons.__docgenInfo={description:"",displayName:"reservationdetailsbuttons",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},buttonClassNames:{defaultValue:null,description:"",name:"buttonClassNames",required:!1,type:{name:"string | undefined"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"]={docgenInfo:reservationdetailsbuttons.__docgenInfo,name:"reservationdetailsbuttons",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const reservation_details_redirect=({reservation,openReservationDeleteModal,className,linkClassNames,externalLink})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:`modal-details__buttons ${className}`},react.createElement(Button.$,{buttonType:"none",label:t("reservationDetailsRemoveDigitalReservationText"),size:"small",variant:"outline",collapsible:!1,disabled:!1,onClick:()=>openReservationDeleteModal(reservation),classNames:linkClassNames,dataCy:"remove-digital-reservation-button"}),react.createElement(LinkButton.A,{dataCy:"go-to-ereolen-button",size:"small",url:externalLink,variant:"filled",id:"go-to-ereolen-button"},t("reservationDetailsDigitalReservationGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))};try{reservationdetailsredirect.displayName="reservationdetailsredirect",reservationdetailsredirect.__docgenInfo={description:"",displayName:"reservationdetailsredirect",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},linkClassNames:{defaultValue:null,description:"",name:"linkClassNames",required:!1,type:{name:"string | undefined"}},externalLink:{defaultValue:null,description:"",name:"externalLink",required:!0,type:{name:"URL"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"]={docgenInfo:reservationdetailsredirect.__docgenInfo,name:"reservationdetailsredirect",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"})}catch(__react_docgen_typescript_loader_error){}var digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts"),utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const physical_list_details=({reservation,reservation:{numberInQueue,pickupBranch,expiryDate,pickupDeadline,dateOfReservation,pickupNumber,reservationIds}})=>{const config=(0,utils_config.UK)(),t=(0,utils_text.F)(),{open}=(0,modal.X)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.cK)(),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(pickupBranch),[reservationStatus,setReservationStatus]=(0,react.useState)("idle"),openModal=type=>()=>{open((0,forms_helper.zW)(type))},branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config("blacklistedPickupBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.z5)(branches,blacklistBranches),isReadyForPickup=(0,helpers.JU)([reservation]).length>0,saveChanges=formSelectValue=>{if(setReservationStatus("pending"),!reservationIds||0===reservationIds.length||!selectedBranch)return console.error("Missing reservationId or selectedBranch"),void setReservationStatus("error");const reservationsChanges=(({formSelectValue,reservationIds,expiryDate,selectedBranch})=>{const getSelectedPickupBranch=value=>"string"==typeof value?value:selectedBranch;return reservationIds.map((reservationId=>{return{expiryDate:(value=formSelectValue,"number"==typeof value?(0,helper.ZI)(value):expiryDate??""),pickupBranch:getSelectedPickupBranch(formSelectValue),reservationId};var value}))})({formSelectValue,reservationIds,expiryDate,selectedBranch});mutate({data:{reservations:reservationsChanges}},{onSuccess:()=>{setReservationStatus("success"),queryClient.invalidateQueries((0,fbs.vN)())},onError:()=>{setReservationStatus("error")}})};return react.createElement(react.Fragment,null,numberInQueue&&react.createElement(list_details.A,{icon:Ebook_default(),title:t("reservationDetailsStatusTitleText"),labels:[t("reservationDetailsNumberInQueueLabelText",{placeholders:{"@count":numberInQueue}})]}),pickupBranch&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:(0,helper.C4)(selectedBranch??pickupBranch,whitelistBranches),changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText"),subText:pickupNumber??"",isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(PickupModal.A,{branches:whitelistBranches,defaultBranch:pickupBranch,selectBranchHandler:setSelectedBranch,saveCallback:saveChanges,reservationStatus,setReservationStatus})),expiryDate&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:selectedInterest?(0,date.Yq)((0,helper.ZI)(selectedInterest)):(0,date.Yq)(expiryDate),changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText"),isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(NoInterestAfterModal.A,{selectedInterest:selectedInterest??Number(interestPeriods.defaultInterestPeriod.value),setSelectedInterest,saveCallback:saveChanges,reservationStatus,setReservationStatus})),pickupDeadline&&react.createElement(list_details.A,{icon:Reservations_default(),title:t("reservationDetailsPickupDeadlineTitleText"),labels:[(0,date.Yq)(pickupDeadline)]}),dateOfReservation&&react.createElement(list_details.A,{icon:Loans_default(),title:t("reservationDetailsDateOfReservationTitleText"),labels:[(0,date.Yq)(dateOfReservation)]}))};try{physicallistdetails.displayName="physicallistdetails",physicallistdetails.__docgenInfo={description:"",displayName:"physicallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"]={docgenInfo:physicallistdetails.__docgenInfo,name:"physicallistdetails",path:"src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const reservation_details=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({reservation,material,openReservationDeleteModal})=>{const t=(0,utils_text.F)(),ereolenHomepageUrl=(0,url.Ik)()("ereolenHomepageUrl"),config=(0,utils_config.UK)(),[externalUrl,setExternalUrl]=(0,react.useState)(null),{state,identifier}=reservation,{authors,pid,year,title,description,materialType}=material||{},{allowRemoveReadyReservations}=config("reservationDetailsConfig",{transformer:"jsonParse"}),allowUserRemoveReadyReservations="readyForPickup"===state&&allowRemoveReadyReservations||"readyForPickup"!==state,{data:complexSearchData,isLoading:isLoadingComplexSearch}=(0,graphql.D3)({cql:`term.isbn=${identifier}`,offset:0,limit:1,filters:{}},{enabled:!!identifier});return(0,react.useEffect)((()=>{if(!complexSearchData||0===complexSearchData.complexSearch.hitcount)return;const matchingManifestations=((manifestations,identifier)=>manifestations.filter((manifestation=>manifestation.identifiers.find((id=>id.value.replace(/\D/g,"")===identifier.replace(/\D/g,""))))))(complexSearchData.complexSearch.works[0].manifestations.all,identifier||"");setExternalUrl(new URL((manifestations=>{const manifestationWithEreolAccess=manifestations.find((manifestation=>manifestation.access.find((access=>"Ereol"===access.__typename)))),ereolAccess=null==manifestationWithEreolAccess?void 0:manifestationWithEreolAccess.access.find((access=>"Ereol"===access.__typename));return null==ereolAccess?void 0:ereolAccess.url})(matchingManifestations)||ereolenHomepageUrl))}),[complexSearchData,identifier,ereolenHomepageUrl]),react.createElement("div",{className:"modal-details__container"},material&&react.createElement(react.Fragment,null,react.createElement(modal_details_header.A,{isbnForCover:identifier||"",authors,year,title,pid,description,materialType,series:material.series},"readyForPickup"===state&&react.createElement("div",{className:"status-label status-label--info"},t("reservationDetailsReadyForLoanText"))),(0,reservation_type.uT)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{classNames:"modal-details__buttons--hide-on-mobile",openReservationDeleteModal,reservation}),(0,reservation_type.BP)(reservation)&&isLoadingComplexSearch&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(MaterialButtonLoading.A,{classNames:"modal-details__buttons--hide-on-mobile"})),(0,reservation_type.BP)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,reservation,className:"modal-details__buttons--hide-on-mobile",linkClassNames:"mx-16",externalLink:externalUrl}),react.createElement("div",{className:"modal-details__list"},(0,reservation_type.BP)(reservation)&&react.createElement(digital_list_details,{reservation}),(0,reservation_type.uT)(reservation)&&react.createElement(physical_list_details,{reservation})),(0,reservation_type.uT)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{buttonClassNames:"modal-details__buttons__full-width",openReservationDeleteModal,reservation}),(0,reservation_type.BP)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,linkClassNames:"my-16",reservation,externalLink:externalUrl})))})));try{reservationdetails.displayName="reservationdetails",reservationdetails.__docgenInfo={description:"",displayName:"reservationdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"]={docgenInfo:reservationdetails.__docgenInfo,name:"reservationdetails",path:"src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/reservation-material/list-material-skeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation my-32 ssc"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square cover--size-small"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__information"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-30 mb-24"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-100 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-70 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mb-4"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__status"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__counter"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-circle w-100"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__deadline"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-30 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-20 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-20 mb-4"})))));try{listmaterialskeleton.displayName="listmaterialskeleton",listmaterialskeleton.__docgenInfo={description:"",displayName:"listmaterialskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/list-material-skeleton.tsx#listmaterialskeleton"]={docgenInfo:listmaterialskeleton.__docgenInfo,name:"listmaterialskeleton",path:"src/apps/reservation-list/reservation-material/list-material-skeleton.tsx#listmaterialskeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/reservation-material/reservation-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>reservation_info});var react=__webpack_require__("./node_modules/react/index.js"),icon_check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),icon_check_default=__webpack_require__.n(icon_check),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),status_circle_icon=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx");const InfoLabel=({dataCy="info-label",children})=>react.createElement("div",{"data-cy":dataCy,className:"status-label status-label--info"},children),labels_InfoLabel=InfoLabel;try{InfoLabel.displayName="InfoLabel",InfoLabel.__docgenInfo={description:"",displayName:"InfoLabel",props:{dataCy:{defaultValue:{value:"info-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/labels/InfoLabel.tsx#InfoLabel"]={docgenInfo:InfoLabel.__docgenInfo,name:"InfoLabel",path:"src/components/atoms/labels/InfoLabel.tsx#InfoLabel"})}catch(__react_docgen_typescript_loader_error){}const reservation_status=({reservationInfo,openReservationDetailsModal,color,percent,empty=!1,info,label,children,showArrow=!0,className})=>{const shouldRenderReservationDeadline=info||(Array.isArray(label)?label.length>0:!!label);return react.createElement("div",{className:className??"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter color-secondary-gray"},!empty&&react.createElement(status_circle_icon.A,{color,percent},children)),shouldRenderReservationDeadline&&react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},info&&react.createElement(labels_InfoLabel,null,info),"string"==typeof label&&react.createElement("p",{className:"text-small-caption"},label),Array.isArray(label)&&label.map((localLabel=>react.createElement("p",{className:"text-small-caption"},localLabel))))),showArrow&&react.createElement(ArrowButton.A,{arrowLabelledBy:`${(null==reservationInfo?void 0:reservationInfo.identifier)||(null==reservationInfo?void 0:reservationInfo.faust)}-title`,cursorPointer:!0,clickEventHandler:()=>{openReservationDetailsModal&&reservationInfo&&openReservationDetailsModal(reservationInfo)}}))};try{reservationstatus.displayName="reservationstatus",reservationstatus.__docgenInfo={description:"",displayName:"reservationstatus",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!1,type:{name:"Nullable> | undefined"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},empty:{defaultValue:{value:"false"},description:"",name:"empty",required:!1,type:{name:"boolean | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}},info:{defaultValue:null,description:"",name:"info",required:!1,type:{name:"string | undefined"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string | string[]"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"]={docgenInfo:reservationstatus.__docgenInfo,name:"reservationstatus",path:"src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const reservation_info=({reservationInfo,openReservationDetailsModal,showStatusCircleIcon=!0,showArrow=!0,reservationStatusClassNameOverride,isDigital})=>{const t=(0,utils_text.F)(),{state,expiryDate,pickupBranch,numberInQueue,pickupDeadline,pickupNumber}=reservationInfo,[pickupLibrary,setPickupLibrary]=(0,react.useState)(""),{success}=(0,general.jM)(),branches=(0,utils_branches.ov)("blacklistedPickupBranchesConfig");(0,useDeepCompareEffect.A)((()=>{branches&&pickupBranch&&setPickupLibrary((0,helper.C4)(pickupBranch,branches))}),[branches,pickupBranch]);const getInfo=()=>{if(!(isDigital&&expiryDate||pickupDeadline))return"";const date=(isDigital?expiryDate:pickupDeadline)??null;return date?(0,helpers.Fk)({pickupBranch,date,t,isDigital}):""};if("readyForPickup"===state)return react.createElement(reservation_status,{color:success,percent:100,info:getInfo(),label:isDigital?[t("reservationListDigitalPickupText")]:[pickupLibrary,pickupNumber||""],reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("div",{className:"counter__value color-secondary-gray"},react.createElement("img",{src:icon_check_default(),alt:""}),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListReadyText"))));if("reserved"===state&&pickupBranch&&numberInQueue&&expiryDate){const numberInLineLabel=1===numberInQueue?t("reservationListFirstInQueueText"):t("reservationListNumberInQueueText",{placeholders:{"@count":numberInQueue-1}});return react.createElement(reservation_status,{percent:1/numberInQueue*100,label:showStatusCircleIcon?numberInLineLabel:"",reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},numberInQueue),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListInQueueText")))}if("reserved"===state&&!pickupBranch&&pickupDeadline){const daysBetweenTodayAndPickup=(0,general.m2)(pickupDeadline),reservationAvailableLabel=showStatusCircleIcon?t("reservationListAvailableInText",{placeholders:{"@count":(0,general.m2)(pickupDeadline)}}):"";return react.createElement(reservation_status,{percent:(0,general.m2)(pickupDeadline)/100,label:reservationAvailableLabel,reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},(0,general.m2)(pickupDeadline)>0?daysBetweenTodayAndPickup:0," "),react.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndPickup?"reservationListDayText":"reservationListDaysText")))}return react.createElement(reservation_status,{reservationInfo,openReservationDetailsModal,percent:0,label:"",empty:!0,showArrow,className:reservationStatusClassNameOverride})};try{reservationinfo.displayName="reservationinfo",reservationinfo.__docgenInfo={description:"",displayName:"reservationinfo",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!0,type:{name:"Nullable>"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},showStatusCircleIcon:{defaultValue:{value:"true"},description:"",name:"showStatusCircleIcon",required:!1,type:{name:"boolean | undefined"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},reservationStatusClassNameOverride:{defaultValue:null,description:"",name:"reservationStatusClassNameOverride",required:!1,type:{name:"string | undefined"}},isDigital:{defaultValue:null,description:"",name:"isDigital",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"]={docgenInfo:reservationinfo.__docgenInfo,name:"reservationinfo",path:"src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Fk:()=>getReservationStatusInfoLabel,Iw:()=>getStatusText,JU:()=>getReadyForPickup,LQ:()=>sortByOldestPickupDeadline,hm:()=>sortByNumberInQueue});var _core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/helpers/date.ts"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts");const sortByOldestPickupDeadline=list=>list.sort(((objA,objB)=>new Date(objA.pickupDeadline||new Date).getTime()-new Date(objB.pickupDeadline||new Date).getTime())),sortByNumberInQueue=reservations=>[...reservations].sort(((a,b)=>(a.numberInQueue||0)-(b.numberInQueue||0))),getReadyForPickup=list=>list.filter((({state})=>"readyForPickup"===state)),infoLabelTextType_pickUpLatest="reservationPickUpLatestText",infoLabelTextType_loanBefore="reservationListLoanBeforeText",getReservationStatusInfoLabel=({pickupBranch,date,isDigital,t})=>t(pickupBranch?infoLabelTextType_pickUpLatest:infoLabelTextType_loanBefore,{placeholders:{"@date":(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__.SL)({date,isDigital})}}),getStatusText=({identifier,state,pickupDeadline,faust,numberInQueue},t)=>identifier&&"reserved"===state?pickupDeadline?t("reservationListAvailableInText",{placeholders:{"@count":(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.m2)(pickupDeadline)}}):t("reservationListYouAreInQueueText"):faust&&numberInQueue?t("dashboardNumberInLineText",{count:numberInQueue,placeholders:{"@count":numberInQueue}}):""},"./src/apps/search-header/search-header.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Search:()=>Search,default:()=>search_header_dev});var react=__webpack_require__("./node_modules/react/index.js"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const getAutosuggestCategoryList=t=>[{render:t("autosuggestBookCategoryText"),term:material_type.wP.book,facet:"materialTypesSpecific"},{render:t("autosuggestEbookCategoryText"),term:material_type.wP.ebook,facet:"materialTypesSpecific"},{render:t("autosuggestFilmCategoryText"),term:material_type.wP.movie,facet:"workTypes"},{render:t("autosuggestAudioBookCategoryText"),term:material_type.wP.audioBook,facet:"materialTypesSpecific"},{render:t("autosuggestMusicCategoryText"),term:material_type.wP.music,facet:"workTypes"},{render:t("autosuggestGameCategoryText"),term:material_type.wP.game,facet:"workTypes"},{render:t("autosuggestAnimatedSeriesCategoryText"),term:material_type.wP.animatedSeries,facet:"materialTypesSpecific"}];function determineSuggestionTerm(suggestion){var _suggestion$work;return suggestion.type===graphql.hC.Composit?(null===(_suggestion$work=suggestion.work)||void 0===_suggestion$work?void 0:_suggestion$work.titles.main[0])||"incomplete data":suggestion.term}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,categoryData.map(((item,incorrectIndex)=>{const index=incorrectIndex+textAndMaterialDataLength;return react.createElement("li",_extends({className:(0,clsx.A)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index}),key:`${item.term}-${index}`},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},`${item.term} ${t("inText")}`),react.createElement("div",{className:"boxed-text text-tags noselect ml-8"},getAutosuggestCategoryList(t)[incorrectIndex].render))})))};try{autosuggestcategory.displayName="autosuggestcategory",autosuggestcategory.__docgenInfo={description:"",displayName:"autosuggestcategory",props:{categoryData:{defaultValue:null,description:"",name:"categoryData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textAndMaterialDataLength:{defaultValue:null,description:"",name:"textAndMaterialDataLength",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"autosuggest-category-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"]={docgenInfo:autosuggestcategory.__docgenInfo,name:"autosuggestcategory",path:"src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"})}catch(__react_docgen_typescript_loader_error){}var cover=__webpack_require__("./src/components/cover/cover.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/apps/material/helper.ts");function autosuggest_material_extends(){return autosuggest_material_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,materialData.map(((item,incorrectIndex)=>{const index=incorrectIndex+textDataLength,{work}=item;if(!work)return null;const{workId,titles,creators,manifestations:{all:allManifestations,bestRepresentation}}=work,authors=(0,general.UV)(creators),manifestationLanguageIsoCode=bestRepresentation&&(0,helper.PG)([bestRepresentation]),coverPids=(0,general.e$)(allManifestations??[]);return react.createElement("li",autosuggest_material_extends({className:(0,clsx.A)("autosuggest__material-item",{"autosuggest__material-item--two":2===materialData.length,"autosuggest__material-item--one":1===materialData.length,"autosuggest__material-item--highlight":highlightedIndex===index}),key:workId},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("div",{className:"autosuggest__material-card"},react.createElement(cover.Y,{animate:!0,size:"xsmall",ids:coverPids,bestRepresentation,shadow:"small"}),react.createElement("div",{className:"autosuggest__info"},react.createElement("div",{lang:manifestationLanguageIsoCode,className:"text-body-medium-medium autosuggest__title"},titles.main[0]),react.createElement("div",{className:"text-body-small-regular autosuggest__author"},(0,general.sP)(authors,t)))))})))};try{autosuggestmaterial.displayName="autosuggestmaterial",autosuggestmaterial.__docgenInfo={description:"",displayName:"autosuggestmaterial",props:{materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'[] | { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textDataLength:{defaultValue:null,description:"",name:"textDataLength",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"autosuggest-material-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"]={docgenInfo:autosuggestmaterial.__docgenInfo,name:"autosuggestmaterial",path:"src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_text_item_extends(){return autosuggest_text_item_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{var _item$work,_item$work2;const isoLang=(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.manifestations.bestRepresentation)&&(0,helper.PG)([item.work.manifestations.bestRepresentation]),t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement("li",autosuggest_text_item_extends({className:classes.textSuggestion,key:generateItemId(item)},getItemProps({item,index}),{"data-cy":dataCy,lang:isoLang}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},item.type===graphql.hC.Creator?`${item.term} (${t("stringSuggestionAuthorText")})`:null,item.type===graphql.hC.Subject?`${item.term} (${t("stringSuggestionTopicText")})`:null,item.type===graphql.hC.Composit?`${null===(_item$work2=item.work)||void 0===_item$work2?void 0:_item$work2.titles.main} (${t("stringSuggestionWorkText")})`:null,item.type===graphql.hC.Title?`${item.term} (${t("stringSuggestionWorkText")})`:null)))};try{autosuggesttextitem.displayName="autosuggesttextitem",autosuggesttextitem.__docgenInfo={description:"",displayName:"autosuggesttextitem",props:{classes:{defaultValue:null,description:"",name:"classes",required:!0,type:{name:"{ textSuggestion: string; }"}},item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }'}},index:{defaultValue:null,description:"",name:"index",required:!0,type:{name:"number"}},generateItemId:{defaultValue:null,description:"",name:"generateItemId",required:!0,type:{name:'(objectItem: { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }) => string'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},dataCy:{defaultValue:{value:"autosuggest-text-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"]={docgenInfo:autosuggesttextitem.__docgenInfo,name:"autosuggesttextitem",path:"src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"})}catch(__react_docgen_typescript_loader_error){}function itemToString(objectItem){var _objectItem$work;return objectItem.type===graphql.hC.Composit?(null===(_objectItem$work=objectItem.work)||void 0===_objectItem$work?void 0:_objectItem$work.titles.main[0])||"incomplete data":objectItem.term}function generateItemId(objectItem){return`${objectItem.__typename}-${itemToString(objectItem)}-${Math.random().toString(36)}`.replace(/\s+/g,"-")}const AutosuggestText=({textData,highlightedIndex,getItemProps})=>react.createElement(react.Fragment,null,textData.map(((item,index)=>{const classes={textSuggestion:(0,clsx.A)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index})};return react.createElement(autosuggest_text_item,{classes,item,index,generateItemId,getItemProps})})));try{itemToString.displayName="itemToString",itemToString.__docgenInfo={description:"",displayName:"itemToString",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#itemToString"]={docgenInfo:itemToString.__docgenInfo,name:"itemToString",path:"src/components/autosuggest-text/autosuggest-text.tsx#itemToString"})}catch(__react_docgen_typescript_loader_error){}try{generateItemId.displayName="generateItemId",generateItemId.__docgenInfo={description:"",displayName:"generateItemId",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"]={docgenInfo:generateItemId.__docgenInfo,name:"generateItemId",path:"src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"})}catch(__react_docgen_typescript_loader_error){}try{AutosuggestText.displayName="AutosuggestText",AutosuggestText.__docgenInfo={description:"",displayName:"AutosuggestText",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"]={docgenInfo:AutosuggestText.__docgenInfo,name:"AutosuggestText",path:"src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"})}catch(__react_docgen_typescript_loader_error){}try{autosuggesttext.displayName="autosuggesttext",autosuggesttext.__docgenInfo={description:"",displayName:"autosuggesttext",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"]={docgenInfo:autosuggesttext.__docgenInfo,name:"autosuggesttext",path:"src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_extends(){return autosuggest_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,utils_text.F)();return isLoading&&!textData?react.createElement("ul",{className:"autosuggest pb-16","data-cy":dataCy},react.createElement("li",{className:"ml-24"},t("loadingText"))):react.createElement(react.Fragment,null,react.createElement("ul",autosuggest_extends({className:"autosuggest pb-16"},getMenuProps(),{style:isOpen?{}:{display:"none"},"data-cy":dataCy}),react.createElement(AutosuggestText,{textData,highlightedIndex,getItemProps}),materialData.length>0&&react.createElement(autosuggest_material,{materialData,getItemProps,highlightedIndex,textDataLength:textData.length}),categoryData&&categoryData.length>0&&react.createElement(autosuggest_category,{categoryData,getItemProps,highlightedIndex,textAndMaterialDataLength:textData.length+materialData.length})))};try{Autosuggest.displayName="Autosuggest",Autosuggest.__docgenInfo={description:"",displayName:"Autosuggest",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},status:{defaultValue:null,description:"",name:"status",required:!0,type:{name:"string"}},getMenuProps:{defaultValue:null,description:"",name:"getMenuProps",required:!0,type:{name:"(options?: (UseComboboxGetMenuPropsOptions & Options) | undefined, otherOptions?: GetPropsCommonOptions | undefined) => Overwrite<...>"}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},categoryData:{defaultValue:null,description:"",name:"categoryData",required:!1,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[] | undefined'}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},dataCy:{defaultValue:{value:"autosuggest"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest/autosuggest.tsx#Autosuggest"]={docgenInfo:Autosuggest.__docgenInfo,name:"Autosuggest",path:"src/components/autosuggest/autosuggest.tsx#Autosuggest"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const HeaderDropdown=({redirectTo,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"header__menu-dropdown","data-cy":"search-header-dropdown"},react.createElement("ul",{role:"menu"},react.createElement("li",{role:"presentation"},react.createElement("a",{ref:headerDropdownRef,role:"menuitem",className:"header__menu-dropdown-item hide-linkstyle",href:String(advancedSearchUrl),onClick:e=>{e.preventDefault(),redirectTo(advancedSearchUrl)},onKeyUp:e=>"Enter"===e.key?(e.preventDefault(),redirectTo(advancedSearchUrl)):"ArrowDown"===e.key||"ArrowUp"===e.key||"Escape"===e.key?setIsHeaderDropdownOpen(!1):null,onBlur:()=>setIsHeaderDropdownOpen(!1)},t("headerDropdownItemAdvancedSearchText")))))},header_dropdown_HeaderDropdown=HeaderDropdown;try{HeaderDropdown.displayName="HeaderDropdown",HeaderDropdown.__docgenInfo={description:"",displayName:"HeaderDropdown",props:{redirectTo:{defaultValue:null,description:"",name:"redirectTo",required:!0,type:{name:"(url: URL) => void"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"Dispatch>"}},headerDropdownRef:{defaultValue:null,description:"",name:"headerDropdownRef",required:!0,type:{name:"RefObject"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"]={docgenInfo:HeaderDropdown.__docgenInfo,name:"HeaderDropdown",path:"src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"})}catch(__react_docgen_typescript_loader_error){}const search_header=()=>{const t=(0,utils_text.F)(),u=(0,url.Ik)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),advancedSearchUrl=u("advancedSearchUrl"),[q,setQ]=(0,react.useState)(""),[qWithoutQuery,setQWithoutQuery]=(0,react.useState)(q),[suggestItems,setSuggestItems]=(0,react.useState)([]),[currentlySelectedItem,setCurrentlySelectedItem]=(0,react.useState)(""),[isAutosuggestOpen,setIsAutosuggestOpen]=(0,react.useState)(!1),{data,isLoading,status}=(0,graphql.Yu)({q},{enabled:q.length>=3}),[isHeaderDropdownOpen,setIsHeaderDropdownOpen]=(0,react.useState)(!1),[highlightedIndexAfterClick,setHighlightedIndexAfterClick]=(0,react.useState)(null),{track}=(0,useStatistics.B)();(0,react.useEffect)((()=>{if(data){const arrayOfResults=data.suggest.result;setSuggestItems(arrayOfResults)}}),[data]);const originalData=suggestItems,textData=[],materialData=[],categoryData=[];let nonWorkSuggestion,orderedData=[];originalData&&(nonWorkSuggestion=function findNonWorkSuggestion(originalData){return originalData.find((item=>item.type!==graphql.hC.Title&&item.type!==graphql.hC.Composit))}(originalData),originalData.forEach((item=>{(item.type===graphql.hC.Composit||item.type===graphql.hC.Title)&&item.work&&materialData.length<3?materialData.push(item):textData.push(item)})),orderedData=textData.concat(materialData),nonWorkSuggestion&&(getAutosuggestCategoryList(t).forEach((()=>{categoryData.push(nonWorkSuggestion)})),orderedData=orderedData.concat(categoryData))),(0,react.useEffect)((()=>{data&&data.suggest.result.length>0?setIsAutosuggestOpen(!0):setIsAutosuggestOpen(!1)}),[data]),(0,react.useEffect)((()=>{qWithoutQuery.length>2?setIsAutosuggestOpen(!0):setIsAutosuggestOpen(!1)}),[qWithoutQuery]);const{getMenuProps,highlightedIndex,getItemProps,getInputProps,getLabelProps}=(0,downshift_esm.Bp)({isOpen:isAutosuggestOpen,items:orderedData,inputValue:qWithoutQuery,defaultIsOpen:!1,onInputValueChange:function handleInputValueChange(changes){var _selectedItem$work;const{inputValue,selectedItem,type}=changes;if(void 0!==inputValue){if(type===downshift_esm.Bp.stateChangeTypes.InputChange)return setQ(inputValue),void setQWithoutQuery(inputValue);if(setQWithoutQuery(inputValue),selectedItem&&(type===downshift_esm.Bp.stateChangeTypes.ItemClick||type===downshift_esm.Bp.stateChangeTypes.InputKeyDownEnter))if(null!==(_selectedItem$work=selectedItem.work)&&void 0!==_selectedItem$work&&_selectedItem$work.workId&&function isDisplayedAsWorkSuggestion(selectedItem,currentMaterialData){const dataWithWorkId=currentMaterialData.filter((item=>{var _item$work;return(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.workId)===(null==selectedItem?void 0:selectedItem.workId)}));return Boolean(dataWithWorkId.length)}(selectedItem.work,materialData))track("click",{id:statistics.o.autosuggestClick.id,name:statistics.o.autosuggestClick.name,trackedData:selectedItem.work.titles.main.join(", ")}).then((()=>{var _selectedItem$work2;(0,helpers_url.SE)((0,helpers_url.Qj)(materialUrl,null===(_selectedItem$work2=selectedItem.work)||void 0===_selectedItem$work2?void 0:_selectedItem$work2.workId))}));else if(nonWorkSuggestion&&changes.selectedItem&&nonWorkSuggestion.term===changes.selectedItem.term&&highlightedIndexAfterClick&&highlightedIndexAfterClick>=textData.concat(materialData).length){const highlightedCategoryIndex=highlightedIndexAfterClick-(textData.length+materialData.length),selectedItemString=determineSuggestionTerm(changes.selectedItem);track("click",{id:statistics.o.autosuggestClick.id,name:statistics.o.autosuggestClick.name,trackedData:selectedItemString}).then((()=>{const{term,facet}=getAutosuggestCategoryList(t)[highlightedCategoryIndex];(0,helpers_url.SE)((0,helpers_url.fN)({searchUrl,selectedItemString,filter:{[facet]:term}}))}))}else track("click",{id:statistics.o.autosuggestClick.id,name:statistics.o.autosuggestClick.name,trackedData:determineSuggestionTerm(selectedItem)}).then((()=>{(0,helpers_url.SE)((0,helpers_url.zy)(searchUrl,determineSuggestionTerm(selectedItem)))}))}},onSelectedItemChange:function handleSelectedItemChange(changes){const{selectedItem}=changes;selectedItem&&setCurrentlySelectedItem(determineSuggestionTerm(selectedItem))},selectedItem:currentlySelectedItem,onHighlightedIndexChange:function handleHighlightedIndexChange(changes){const{type}=changes;let{highlightedIndex}=changes;if(type===downshift_esm.Bp.stateChangeTypes.MenuMouseLeave)return;if(type===downshift_esm.Bp.stateChangeTypes.ItemMouseMove)return void(void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex));if(type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowUp&&type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownEnter||void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex),highlightedIndex&&highlightedIndex<0)return void setIsAutosuggestOpen(!1);highlightedIndex||(highlightedIndex=0);const currentItemValue=determineSuggestionTerm(orderedData[highlightedIndex]);type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowUp?setQ(currentItemValue):setQWithoutQuery(currentItemValue)}}),headerDropdownRef=react.useRef(null);(0,useClickAway.A)(headerDropdownRef,(()=>{setTimeout((()=>{setIsHeaderDropdownOpen(!1)}),100)}));const[redirectUrl,setRedirectUrl]=(0,react.useState)((0,helpers_url.zy)(searchUrl,q));return(0,react.useEffect)((()=>{'"'===q.trim().charAt(0)&&'"'===q.trim().charAt(q.length-1)&&'""'!==q.trim()&&'"'!==q.trim()?setRedirectUrl((0,helpers_url.x4)(advancedSearchUrl,q)):setRedirectUrl((0,helpers_url.zy)(searchUrl,q))}),[q,advancedSearchUrl,searchUrl]),react.createElement("div",{className:"header__menu-second"},react.createElement("div",{className:"header__menu-search"},react.createElement(search_bar.A,{q,getInputProps,getLabelProps,qWithoutQuery,setQWithoutQuery,isHeaderDropdownOpen,setIsHeaderDropdownOpen,redirectUrl}),react.createElement(Autosuggest,{textData,materialData,categoryData,status,getMenuProps,highlightedIndex,getItemProps,isOpen:isAutosuggestOpen,isLoading}),isHeaderDropdownOpen&&react.createElement(header_dropdown_HeaderDropdown,{redirectTo:helpers_url.SE,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})))};try{searchheader.displayName="searchheader",searchheader.__docgenInfo={description:"",displayName:"searchheader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.tsx#searchheader"]={docgenInfo:searchheader.__docgenInfo,name:"searchheader",path:"src/apps/search-header/search-header.tsx#searchheader"})}catch(__react_docgen_typescript_loader_error){}const search_header_entry=(0,url.nU)((0,utils_text.i)((()=>react.createElement(search_header,null))));try{searchheaderentry.displayName="searchheaderentry",searchheaderentry.__docgenInfo={description:"",displayName:"searchheaderentry",props:{searchHeaderIconAltText:{defaultValue:null,description:"",name:"searchHeaderIconAltText",required:!1,type:{name:"string | undefined"}},searchHeaderInputLabelText:{defaultValue:null,description:"",name:"searchHeaderInputLabelText",required:!1,type:{name:"string | undefined"}},inputPlaceholderText:{defaultValue:null,description:"",name:"inputPlaceholderText",required:!1,type:{name:"string | undefined"}},stringSuggestionAuthorText:{defaultValue:null,description:"",name:"stringSuggestionAuthorText",required:!1,type:{name:"string | undefined"}},stringSuggestionWorkText:{defaultValue:null,description:"",name:"stringSuggestionWorkText",required:!1,type:{name:"string | undefined"}},stringSuggestionTopicText:{defaultValue:null,description:"",name:"stringSuggestionTopicText",required:!1,type:{name:"string | undefined"}},searchHeaderDropdownText:{defaultValue:null,description:"",name:"searchHeaderDropdownText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!1,type:{name:"string | undefined"}},autosuggestBookCategoryText:{defaultValue:null,description:"",name:"autosuggestBookCategoryText",required:!0,type:{name:"string"}},autosuggestEbookCategoryText:{defaultValue:null,description:"",name:"autosuggestEbookCategoryText",required:!0,type:{name:"string"}},autosuggestFilmCategoryText:{defaultValue:null,description:"",name:"autosuggestFilmCategoryText",required:!0,type:{name:"string"}},autosuggestAudioBookCategoryText:{defaultValue:null,description:"",name:"autosuggestAudioBookCategoryText",required:!0,type:{name:"string"}},autosuggestMusicCategoryText:{defaultValue:null,description:"",name:"autosuggestMusicCategoryText",required:!0,type:{name:"string"}},autosuggestGameCategoryText:{defaultValue:null,description:"",name:"autosuggestGameCategoryText",required:!0,type:{name:"string"}},autosuggestAnimatedSeriesCategoryText:{defaultValue:null,description:"",name:"autosuggestAnimatedSeriesCategoryText",required:!0,type:{name:"string"}},inText:{defaultValue:null,description:"",name:"inText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},searchNoValidCharactersErrorText:{defaultValue:null,description:"",name:"searchNoValidCharactersErrorText",required:!0,type:{name:"string"}},headerDropdownItemAdvancedSearchText:{defaultValue:null,description:"",name:"headerDropdownItemAdvancedSearchText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},errorMessagesConfig:{defaultValue:null,description:"",name:"errorMessagesConfig",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.entry.tsx#searchheaderentry"]={docgenInfo:searchheaderentry.__docgenInfo,name:"searchheaderentry",path:"src/apps/search-header/search-header.entry.tsx#searchheaderentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const search_header_dev={title:"Apps / Header",component:search_header_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},searchHeaderIconAltText:{name:"Alt text for search button image",defaultValue:"search icon",control:{type:"text"}},searchHeaderInputLabelText:{name:"Search header input label",defaultValue:"The main search field.",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Search among the library's materials",control:{type:"text"}},stringSuggestionAuthorText:{name:"String suggestion spec - author",defaultValue:"author",control:{type:"text"}},stringSuggestionWorkText:{name:"String suggestion spec - work",defaultValue:"material",control:{type:"text"}},stringSuggestionTopicText:{name:"String suggestion spec - topic",defaultValue:"topic",control:{type:"text"}},searchUrl:{name:"Base search url",defaultValue:"/search",control:{type:"text"}},advancedSearchUrl:{name:"Advanced search url",defaultValue:"/advanced-search",control:{type:"text"}},searchHeaderDropdownText:{name:"Search header advanced search icon label",defaultValue:"Dropdown with additional search functions",control:{type:"text"}},materialUrl:{name:"Base material page url",defaultValue:"/work/:workid",control:{type:"text"}},autosuggestBookCategoryText:{name:"Book category",defaultValue:"Books",control:{type:"text"}},autosuggestEbookCategoryText:{name:"Ebook category",defaultValue:"E-books",control:{type:"text"}},autosuggestFilmCategoryText:{name:"Movie category",defaultValue:"Movies",control:{type:"text"}},autosuggestAudioBookCategoryText:{name:"Audio book category",defaultValue:"Audio books",control:{type:"text"}},autosuggestMusicCategoryText:{name:"Music category",defaultValue:"Music",control:{type:"text"}},autosuggestGameCategoryText:{name:"Game category",defaultValue:"Games",control:{type:"text"}},autosuggestAnimatedSeriesCategoryText:{name:"Animated series category",defaultValue:"Animated series",control:{type:"text"}},inText:{name:"x 'in' y",defaultValue:"in",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},searchNoValidCharactersErrorText:{name:"Search non-whitespace character error",defaultValue:"Input must contain at least one non-whitespace character.",control:{type:"text"}},headerDropdownItemAdvancedSearchText:{name:"Advanced search menu text",defaultValue:"Advanced search",control:{type:"text"}}}},Search=args=>react.createElement(story_header_dev_inc.A,{search:react.createElement(search_header_entry,args)})},"./src/apps/search-result/search-result-zero-hits.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({dataCy="search-result-zero-hits"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"card-list-page","data-cy":dataCy},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h1",{className:"text-header-h2 search-result-title my-112","data-cy":"search-result-zero-hits"},t("noSearchResultText")))};try{searchresultzerohits.displayName="searchresultzerohits",searchresultzerohits.__docgenInfo={description:"",displayName:"searchresultzerohits",props:{dataCy:{defaultValue:{value:"search-result-zero-hits"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"]={docgenInfo:searchresultzerohits.__docgenInfo,name:"searchresultzerohits",path:"src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/search-result/search-result.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SearchResult:()=>search_result_dev_SearchResult,default:()=>search_result_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const SearchResultHeader=({hitcount,q})=>{const t=(0,utils_text.F)(),classes=(0,clsx.A)(["text-header-h2","mb-16","search-result-title"]);return react.createElement("h1",{className:classes,"data-cy":"search-result-header","aria-live":"polite"},`${t("showingResultsForText",{placeholders:{"@query":q}})} (${hitcount})`)},search_result_header_SearchResultHeader=(0,react.memo)(SearchResultHeader);try{SearchResultHeader.displayName="SearchResultHeader",SearchResultHeader.__docgenInfo={description:"",displayName:"SearchResultHeader",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"]={docgenInfo:SearchResultHeader.__docgenInfo,name:"SearchResultHeader",path:"src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),mapValues=__webpack_require__("./node_modules/lodash/mapValues.js"),mapValues_default=__webpack_require__.n(mapValues),branches=__webpack_require__("./src/core/utils/branches.tsx"),invalid_switch_case=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts");const allFacetFields=[graphql.SW.WorkTypes,graphql.SW.Creators,graphql.SW.Subjects,graphql.SW.FictionNonfiction,graphql.SW.ChildrenOrAdults,graphql.SW.AccessTypes,graphql.SW.MainLanguages,graphql.SW.GenreAndForm,graphql.SW.MaterialTypesSpecific,graphql.SW.FictionalCharacters],createFilters=(facets,branchIdList)=>{return{...(filters=facets,Object.keys(filters).reduce(((acc,key)=>({...acc,[key]:Object.keys(filters[key])})),{})),...branchIdList?{branchId:branchIdList}:{}};var filters};function useGetFacets(query,filters){const cleanBranches=(0,branches.Ay)(),{data,isLoading}=(0,graphql.V0)({q:{all:query},facets:allFacetFields,facetLimit:10,filters:createFilters(filters,cleanBranches)},{keepPreviousData:!0,placeholderData:{search:{facets:(facets=allFacetFields,facets.map((facet=>({name:facet,values:[{key:"",term:""}]}))))}}});var facets;return{facets:(null==data?void 0:data.search.facets)||null,isLoading}}function getAllFilterPathsAsString(filterObject){const mappedFilterValues=mapValues_default()(filterObject,(filter=>Object.keys(filter))),filterNames=Object.keys(mappedFilterValues);let allFilterPathsAsString="";return filterNames.forEach((filterName=>{mappedFilterValues[filterName].forEach((filterValue=>{""!==allFilterPathsAsString&&(allFilterPathsAsString=allFilterPathsAsString.concat(";")),allFilterPathsAsString=allFilterPathsAsString.concat(`facet.${filterName}:${filterValue}`)}))})),allFilterPathsAsString}var useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const CampaignBody=({campaignData})=>react.createElement("section",{className:"campaign mt-35","data-cy":"campaign-body"},campaignData.image&&campaignData.image.url&&react.createElement("img",{"data-cy":"campaign-image",className:"campaign__image "+(campaignData.text?"":"campaign__image--full-width"),src:campaignData.image.url,alt:campaignData.image.alt}),campaignData.text&&react.createElement("h4",{className:"campaign__title campaign__title--ellipsis"},campaignData.text)),campaign_CampaignBody=CampaignBody;try{CampaignBody.displayName="CampaignBody",CampaignBody.__docgenInfo={description:"",displayName:"CampaignBody",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/CampaignBody.tsx#CampaignBody"]={docgenInfo:CampaignBody.__docgenInfo,name:"CampaignBody",path:"src/components/campaign/CampaignBody.tsx#CampaignBody"})}catch(__react_docgen_typescript_loader_error){}const Campaign=({campaignData})=>{const{track}=(0,useStatistics.B)();if(!campaignData.title)return null;const trackClick=()=>track("click",{id:statistics.o.campaignClick.id,name:statistics.o.campaignClick.name,trackedData:campaignData.title});return campaignData.url?react.createElement(LinkNoStyle.A,{url:new URL(campaignData.url),trackClick,className:"cursor-pointer"},react.createElement(campaign_CampaignBody,{campaignData})):react.createElement(campaign_CampaignBody,{campaignData})},campaign_Campaign=Campaign;try{Campaign.displayName="Campaign",Campaign.__docgenInfo={description:"",displayName:"Campaign",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/Campaign.tsx#Campaign"]={docgenInfo:Campaign.__docgenInfo,name:"Campaign",path:"src/components/campaign/Campaign.tsx#Campaign"})}catch(__react_docgen_typescript_loader_error){}var useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),upperFirst=__webpack_require__("./node_modules/lodash/upperFirst.js"),upperFirst_default=__webpack_require__.n(upperFirst),isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),icon_cross=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"),icon_cross_default=__webpack_require__.n(icon_cross);const ButtonTag=react.forwardRef((({onClick,selected,children,size,removable=!1,dataCy},ref)=>{const className=(0,clsx.A)("tag",selected&&"tag--fill",size&&`tag--${size}`,"cursor-pointer");return react.createElement("button",{ref,type:"button","aria-pressed":selected,className,onClick,"data-cy":dataCy},children,removable&&react.createElement("img",{className:"tag-icon",src:icon_cross_default(),alt:""}))})),Buttons_ButtonTag=ButtonTag;try{ButtonTag.displayName="ButtonTag",ButtonTag.__docgenInfo={description:"",displayName:"ButtonTag",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"MouseEventHandler"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'}]}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},removable:{defaultValue:{value:"false"},description:"",name:"removable",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonTag.tsx#ButtonTag"]={docgenInfo:ButtonTag.__docgenInfo,name:"ButtonTag",path:"src/components/Buttons/ButtonTag.tsx#ButtonTag"})}catch(__react_docgen_typescript_loader_error){}var DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx");const FacetBrowserModalBody=({facets})=>{const{filters,addToFilter,removeFromFilter}=(0,useFilterHandler.A)(),t=(0,utils_text.F)(),{close}=(0,modal.X)(),{track}=(0,useStatistics.B)();return(0,useDeepCompareEffect.A)((()=>{isEmpty_default()(filters)||track("click",{id:statistics.o.searchFacets.id,name:statistics.o.searchFacets.name,trackedData:getAllFilterPathsAsString(filters)})}),[filters]),react.createElement("section",{className:"facet-browser"},react.createElement("header",{className:"facet-browser__header"},react.createElement("h2",{className:"text-header-h3"},t("filterListText"))),facets.map((facet=>{const{name,values}=facet;if(0===values.length)return null;const hasSelectedTerms=Boolean(filters[name]);return react.createElement(DisclosureControllable.A,{key:name,cyData:`facet-browser-${name}`,id:name,showContent:hasSelectedTerms,className:"disclosure--full-width",summary:react.createElement(DisclosureSummary.A,{title:t(`facet${upperFirst_default()(name)}Text`),className:"disclosure__headline--no-padding"})},react.createElement("ul",{className:"facet-browser__facet-group"},values.map((termItem=>{const{term}=termItem,selected=Boolean(filters[name]&&filters[name][term]);if(!termItem.term)return null;return react.createElement("li",null,react.createElement(Buttons_ButtonTag,{key:term,onClick:e=>(e.stopPropagation(),selected?removeFromFilter({facet:name,term:termItem}):addToFilter({facet:name,term:termItem})),selected,dataCy:`facet-browser-${name}-${term}`},termItem.term," ",(null==termItem?void 0:termItem.score)&&`(${termItem.score})`))}))))})),react.createElement(Button.$,{classNames:"facet-browser__results-btn",label:t("showResultsText"),buttonType:"none",disabled:!1,collapsible:!1,size:"medium",variant:"filled",onClick:()=>{close("facet-browser-modal")}}))},facet_browser_FacetBrowserModalBody=FacetBrowserModalBody;try{FacetBrowserModalBody.displayName="FacetBrowserModalBody",FacetBrowserModalBody.__docgenInfo={description:"",displayName:"FacetBrowserModalBody",props:{facets:{defaultValue:null,description:"",name:"facets",required:!0,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"]={docgenInfo:FacetBrowserModalBody.__docgenInfo,name:"FacetBrowserModalBody",path:"src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"})}catch(__react_docgen_typescript_loader_error){}const FacetBrowserModal=({q})=>{const t=(0,utils_text.F)(),{filters}=(0,useFilterHandler.A)(),{facets,isLoading}=useGetFacets(q,filters);return react.createElement(modal.A,{classNames:"modal-right modal--no-padding",modalId:"facet-browser-modal",screenReaderModalDescriptionText:t("facetBrowserModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("facetBrowserModalCloseModalAriaLabelText"),isSlider:!0},isLoading||!facets?null:react.createElement(facet_browser_FacetBrowserModalBody,{facets}))},facet_browser_FacetBrowserModal=FacetBrowserModal;try{FacetBrowserModal.displayName="FacetBrowserModal",FacetBrowserModal.__docgenInfo={description:"",displayName:"FacetBrowserModal",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"]={docgenInfo:FacetBrowserModal.__docgenInfo,name:"FacetBrowserModal",path:"src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"})}catch(__react_docgen_typescript_loader_error){}const facet_line_FacetLineSelected=()=>{const{filters,removeFromFilter}=(0,useFilterHandler.A)(),buttonsRef=(0,react.useRef)({}),t=(0,utils_text.F)();return(0,react.useEffect)((()=>{const lastFacet=Object.keys(filters).slice(-1)[0];if(lastFacet){var _buttonsRef$current;const lastTerm=Object.keys(filters[lastFacet]).slice(-1)[0];null===(_buttonsRef$current=buttonsRef.current[`${lastFacet}-${lastTerm}`])||void 0===_buttonsRef$current||_buttonsRef$current.focus()}}),[filters]),react.createElement("section",null,react.createElement("h2",{className:"hide-visually"},t("intelligentFiltersSelectedAccessibleHeadlineText")),react.createElement("ul",{className:"facet-line-selected-terms"},Object.entries(filters).map((([facet,value])=>react.createElement(react.Fragment,{key:facet},Object.entries(value).map((([label,term])=>react.createElement("li",{key:`${facet}-${label}`,className:"facet-line-selected-terms__item"},react.createElement(Buttons_ButtonTag,{ref:el=>{buttonsRef.current[`${facet}-${label}`]=el},selected:!0,removable:!0,onClick:()=>removeFromFilter({facet,term}),dataCy:`facet-line-selected-term-${label}`},label)))))))))};var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx");const FacetLineFilters=({facets=[]})=>{const t=(0,utils_text.F)(),{open}=(0,modal.X)(),{filters,addToFilter}=(0,useFilterHandler.A)(),facetMap=(facets=>facets.reduce(((acc,facet)=>{const newAcc={...acc};return facet.values.forEach((value=>{const combinedKey=`${facet.name}:${value.key}`;newAcc[combinedKey]=value})),newAcc}),{}))(facets),formatValuesToDropdown=(facet,values)=>values.map((value=>({label:value.term,value:value.key})));return react.createElement("section",null,react.createElement("h2",{className:"hide-visually"},t("intelligentFiltersAccessibleHeadlineText")),react.createElement("ul",{className:"facet-line mt-48"},facets.map((({name,values})=>{if(values.length>1){const translatedName=(name=>{switch(name){case graphql.SW.AccessTypes:return"facetAccessTypesText";case graphql.SW.CanAlwaysBeLoaned:return"facetCanAlwaysBeLoanedText";case graphql.SW.ChildrenOrAdults:return"facetChildrenOrAdultsText";case graphql.SW.Creators:return"facetCreatorsText";case graphql.SW.Dk5:return"facetDk5Text";case graphql.SW.FictionNonfiction:return"facetFictionNonfictionText";case graphql.SW.FictionalCharacters:return"facetFictionalCharactersText";case graphql.SW.GenreAndForm:return"facetGenreAndFormText";case graphql.SW.MainLanguages:return"facetMainLanguagesText";case graphql.SW.MaterialTypesGeneral:return"facetMaterialTypesGeneralText";case graphql.SW.MaterialTypesSpecific:return"facetMaterialTypesSpecificText";case graphql.SW.Subjects:return"facetSubjectsText";case graphql.SW.WorkTypes:return"facetWorkTypesText";case graphql.SW.Year:return"facetYearText";default:return(0,invalid_switch_case.A)(name)}})(name);return react.createElement("li",{className:"facet-line__item"},react.createElement(Dropdown.A,{cyData:`facet-line-${name}-dropdown`,placeholder:{label:t(translatedName),value:""},options:formatValuesToDropdown(0,values),ariaLabel:t(translatedName),arrowIcon:"chevron",classNames:"dropdown--grey-borders",innerClassNames:{select:"dropdown__select--inline",arrowWrapper:"dropdown__arrows--inline "},handleOnChange:e=>((e,facet)=>{const term=((facetName,termName,facetMap)=>facetMap[`${facetName}:${termName}`])(facet,e.target.value,facetMap);term&&addToFilter({facet,term})})(e,name)}))}return react.createElement(react.Fragment,null,values.map((termObj=>{var _filters$name;const{term,score}=termObj;return null!=filters&&null!==(_filters$name=filters[name])&&void 0!==_filters$name&&_filters$name[term]?null:react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{key:term,onClick:()=>addToFilter({facet:name,term:termObj}),selected:!1,dataCy:`facet-line-term-${term}`},`${term} (${score})`))})))})),react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{onClick:()=>open("facet-browser-modal"),dataCy:"facet-line-open-browser"},t("addMoreFiltersText")))))},facet_line_FacetLineFilters=(0,react.memo)(FacetLineFilters);try{FacetLineFilters.displayName="FacetLineFilters",FacetLineFilters.__docgenInfo={description:"",displayName:"FacetLineFilters",props:{facets:{defaultValue:{value:"[]"},description:"",name:"facets",required:!1,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"]={docgenInfo:FacetLineFilters.__docgenInfo,name:"FacetLineFilters",path:"src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"})}catch(__react_docgen_typescript_loader_error){}const FacetLineFiltersSkeleton=()=>react.createElement(react.Fragment,null,react.createElement("div",{className:"card-list-page__skeleton-facet-line--mobile"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}))),react.createElement("div",{className:"card-list-page__skeleton-facet-line--desktop"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"})))),facet_line_FacetLineFiltersSkeleton=FacetLineFiltersSkeleton;try{FacetLineFiltersSkeleton.displayName="FacetLineFiltersSkeleton",FacetLineFiltersSkeleton.__docgenInfo={description:"",displayName:"FacetLineFiltersSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"]={docgenInfo:FacetLineFiltersSkeleton.__docgenInfo,name:"FacetLineFiltersSkeleton",path:"src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"})}catch(__react_docgen_typescript_loader_error){}const FacetLine=({q})=>{const{filters}=(0,useFilterHandler.A)(),cleanBranches=(0,branches.Ay)(),{data,isLoading}=(0,graphql.vQ)({q:{all:q},facetsLimit:6,valuesLimit:5,filters:createFilters(filters,cleanBranches)});return react.createElement(react.Fragment,null,isLoading&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),data&&react.createElement(facet_line_FacetLineFilters,{facets:data.search.intelligentFacets}),react.createElement(facet_line_FacetLineSelected,null))},facet_line_FacetLine=(0,react.memo)(FacetLine);try{FacetLine.displayName="FacetLine",FacetLine.__docgenInfo={description:"",displayName:"FacetLine",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLine.tsx#FacetLine"]={docgenInfo:FacetLine.__docgenInfo,name:"FacetLine",path:"src/components/facet-line/FacetLine.tsx#FacetLine"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const search_result_skeleton=({q,hideFacetLine=!1})=>{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title text-loading"},!hideFacetLine&&t("showingResultsForText",{placeholders:{"@query":q}}),hideFacetLine&&t("showingResultsForWithoutQueryText")),!hideFacetLine&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),react.createElement("ul",{className:"card-list-page__list my-32"},[...Array(5)].map((()=>react.createElement("li",null,react.createElement(card_list_item_skeleton.A,null))))))};try{searchresultskeleton.displayName="searchresultskeleton",searchresultskeleton.__docgenInfo={description:"",displayName:"searchresultskeleton",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},hideFacetLine:{defaultValue:{value:"false"},description:"",name:"hideFacetLine",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"]={docgenInfo:searchresultskeleton.__docgenInfo,name:"searchresultskeleton",path:"src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"})}catch(__react_docgen_typescript_loader_error){}var search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx");const search_result_not_valid_search=({dataCy="search-result-not-valid-search"})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"card-list-page","data-cy":dataCy},react.createElement("h1",{className:"text-header-h2 search-result-title my-112","data-cy":"search-result-zero-hits"},t("invalidSearchText")),react.createElement("p",{className:"text-body-medium-regular"},t("invalidSearchDescriptionText")))};try{searchresultnotvalidsearch.displayName="searchresultnotvalidsearch",searchresultnotvalidsearch.__docgenInfo={description:"",displayName:"searchresultnotvalidsearch",props:{dataCy:{defaultValue:{value:"search-result-not-valid-search"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-not-valid-search.tsx#searchresultnotvalidsearch"]={docgenInfo:searchresultnotvalidsearch.__docgenInfo,name:"searchresultnotvalidsearch",path:"src/apps/search-result/search-result-not-valid-search.tsx#searchresultnotvalidsearch"})}catch(__react_docgen_typescript_loader_error){}const search_result=({q,pageSize})=>{const{filters,clearFilter,addFilterFromUrlParamListener}=(0,useFilterHandler.A)(),cleanBranches=(0,branches.Ay)(),[resultItems,setResultItems]=(0,react.useState)(null),[hitcount,setHitCount]=(0,react.useState)(0),[canWeTrackHitcount,setCanWeTrackHitcount]=(0,react.useState)(!1),{PagerComponent,page}=(0,use_pager.A)({hitcount,pageSize}),{mutate}=(0,dpl_cms.Fg)(),[campaignData,setCampaignData]=(0,react.useState)(null),{facets:campaignFacets}=useGetFacets(q,filters);(0,useDeepCompareEffect.A)((()=>{setResultItems([])}),[q,pageSize,filters]);const{track}=(0,useStatistics.B)();(0,react.useEffect)((()=>{track("click",{id:statistics.o.searchQuery.id,name:statistics.o.searchQuery.name,trackedData:q})}),[q]),(0,useDeepCompareEffect.A)((()=>{campaignFacets&&mutate({data:campaignFacets,params:{_format:"json"}},{onSuccess:campaign=>{setCampaignData(campaign)}})}),[campaignFacets,mutate]),(0,react.useEffect)((()=>{addFilterFromUrlParamListener(graphql.SW.MaterialTypesSpecific),addFilterFromUrlParamListener(graphql.SW.WorkTypes)}),[addFilterFromUrlParamListener]);const{data,isLoading}=(0,graphql.KG)({q:{all:q},offset:page*pageSize,limit:pageSize,filters:createFilters(filters,cleanBranches)},{enabled:q.length>=3});if((0,react.useEffect)((()=>{if(!data)return;const{search:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>null===prev?[...resultWorks]:[...prev,...resultWorks]:resultWorks)}),[data,page]),(0,react.useEffect)((()=>{canWeTrackHitcount?track("click",{id:statistics.o.searchResultCount.id,name:statistics.o.searchResultCount.name,trackedData:hitcount?hitcount.toString():"0"}):setCanWeTrackHitcount(!0)}),[hitcount]),(0,react.useEffect)((()=>{var _campaignData$data;null!=campaignData&&null!==(_campaignData$data=campaignData.data)&&void 0!==_campaignData$data&&_campaignData$data.title&&track("click",{id:statistics.o.campaignShown.id,name:statistics.o.campaignShown.name,trackedData:campaignData.data.title})}),[campaignData]),(0,react.useEffect)((()=>{"usePersistedFilters"!==(0,helpers_url.d6)("filters")&&clearFilter()}),[clearFilter]),!q||q.length<3)return react.createElement(search_result_not_valid_search,null);const shouldShowZeroHits=()=>!isLoading&&0===hitcount;return react.createElement("div",{className:"card-list-page"},isLoading&&react.createElement(search_result_skeleton,{q}),shouldShowZeroHits()&&react.createElement(search_result_zero_hits.A,null),!isLoading&&!shouldShowZeroHits()&&resultItems&&react.createElement(react.Fragment,null,react.createElement(search_result_header_SearchResultHeader,{hitcount,q}),react.createElement(facet_line_FacetLine,{q}),campaignData&&campaignData.data&&react.createElement(campaign_Campaign,{campaignData:campaignData.data}),react.createElement(SearchResultList.A,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading})),null!==resultItems&&react.createElement(facet_browser_FacetBrowserModal,{q}))};try{searchresult.displayName="searchresult",searchresult.__docgenInfo={description:"",displayName:"searchresult",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.tsx#searchresult"]={docgenInfo:searchresult.__docgenInfo,name:"searchresult",path:"src/apps/search-result/search-result.tsx#searchresult"})}catch(__react_docgen_typescript_loader_error){}const search_result_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({q,pageSizeDesktop,pageSizeMobile})=>{const{q:searchQuery}=(0,general.tI)({q}),pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,(searchQuery||""===searchQuery)&&react.createElement(guarded_app.A,{app:"search-result"},react.createElement(search_result,{q:searchQuery,pageSize})))}))));try{searchresultentry.displayName="searchresultentry",searchresultentry.__docgenInfo={description:"",displayName:"searchresultentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},addMoreFiltersText:{defaultValue:null,description:"",name:"addMoreFiltersText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},facetAccessTypesText:{defaultValue:null,description:"",name:"facetAccessTypesText",required:!0,type:{name:"string"}},facetBrowserModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"facetBrowserModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},facetBrowserModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"facetBrowserModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},facetCanAlwaysBeLoanedText:{defaultValue:null,description:"",name:"facetCanAlwaysBeLoanedText",required:!0,type:{name:"string"}},facetChildrenOrAdultsText:{defaultValue:null,description:"",name:"facetChildrenOrAdultsText",required:!0,type:{name:"string"}},facetCreatorsText:{defaultValue:null,description:"",name:"facetCreatorsText",required:!0,type:{name:"string"}},facetDk5Text:{defaultValue:null,description:"",name:"facetDk5Text",required:!0,type:{name:"string"}},facetFictionalCharactersText:{defaultValue:null,description:"",name:"facetFictionalCharactersText",required:!0,type:{name:"string"}},facetFictionNonfictionText:{defaultValue:null,description:"",name:"facetFictionNonfictionText",required:!0,type:{name:"string"}},facetGenreAndFormText:{defaultValue:null,description:"",name:"facetGenreAndFormText",required:!0,type:{name:"string"}},facetMainLanguagesText:{defaultValue:null,description:"",name:"facetMainLanguagesText",required:!0,type:{name:"string"}},facetMaterialTypesText:{defaultValue:null,description:"",name:"facetMaterialTypesText",required:!0,type:{name:"string"}},facetMaterialTypesGeneralText:{defaultValue:null,description:"",name:"facetMaterialTypesGeneralText",required:!0,type:{name:"string"}},facetMaterialTypesSpecificText:{defaultValue:null,description:"",name:"facetMaterialTypesSpecificText",required:!0,type:{name:"string"}},facetSubjectsText:{defaultValue:null,description:"",name:"facetSubjectsText",required:!0,type:{name:"string"}},facetWorkTypesText:{defaultValue:null,description:"",name:"facetWorkTypesText",required:!0,type:{name:"string"}},facetYearText:{defaultValue:null,description:"",name:"facetYearText",required:!0,type:{name:"string"}},filterListText:{defaultValue:null,description:"",name:"filterListText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},showingResultsForText:{defaultValue:null,description:"",name:"showingResultsForText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showResultsText:{defaultValue:null,description:"",name:"showResultsText",required:!0,type:{name:"string"}},invalidSearchText:{defaultValue:null,description:"",name:"invalidSearchText",required:!0,type:{name:"string"}},invalidSearchDescriptionText:{defaultValue:null,description:"",name:"invalidSearchDescriptionText",required:!0,type:{name:"string"}},intelligentFiltersAccessibleHeadlineText:{defaultValue:null,description:"",name:"intelligentFiltersAccessibleHeadlineText",required:!0,type:{name:"string"}},intelligentFiltersSelectedAccessibleHeadlineText:{defaultValue:null,description:"",name:"intelligentFiltersSelectedAccessibleHeadlineText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.entry.tsx#searchresultentry"]={docgenInfo:searchresultentry.__docgenInfo,name:"searchresultentry",path:"src/apps/search-result/search-result.entry.tsx#searchresultentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const search_result_dev={title:"Apps / Search Result",component:search_result_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,q:{name:"Search string",defaultValue:"harry",control:{type:"text"}},pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingResultsForText:{name:"Showing results for",defaultValue:"Showing results for “@query”",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},facetBrowserModalScreenReaderModalDescriptionText:{name:"facet browser screen reader modal description text",defaultValue:"Modal for facet browser",control:{type:"text"}},facetBrowserModalCloseModalAriaLabelText:{name:"facet browser close modal aria label text",defaultValue:"Close facet browser modal",control:{type:"text"}},facetAccessTypesText:{name:"Access types text",defaultValue:"Access types",control:{type:"text"}},facetCanAlwaysBeLoanedText:{name:"Can always be loaned text",defaultValue:"Can always be loaned",control:{type:"text"}},facetChildrenOrAdultsText:{name:"Children or adults text",defaultValue:"Children or adults",control:{type:"text"}},facetCreatorsText:{name:"Creators text",defaultValue:"Creators",control:{type:"text"}},facetDk5Text:{name:"Dk5 text",defaultValue:"Dk5",control:{type:"text"}},facetFictionalCharactersText:{name:"Fictional characters text",defaultValue:"Fictional characters",control:{type:"text"}},facetFictionNonfictionText:{name:"Fiction or nonfiction text",defaultValue:"Fiction or nonfiction",control:{type:"text"}},facetGenreAndFormText:{name:"Genre and form text",defaultValue:"Genre and form",control:{type:"text"}},facetMainLanguagesText:{name:"Main languages text",defaultValue:"Main languages",control:{type:"text"}},facetMaterialTypesText:{name:"Material types text",defaultValue:"Material types",control:{type:"text"}},facetMaterialTypesGeneralText:{name:"Material types general text",defaultValue:"Material types general",control:{type:"text"}},facetMaterialTypesSpecificText:{name:"Material types specific text",defaultValue:"Material types specific",control:{type:"text"}},facetSubjectsText:{name:"Subjects text",defaultValue:"Subjects",control:{type:"text"}},facetWorkTypesText:{name:"Work types text",defaultValue:"Work types",control:{type:"text"}},facetYearText:{name:"Year text",defaultValue:"Year",control:{type:"text"}},showResultsText:{name:"Show results text",defaultValue:"Show results",control:{type:"text"}},filterListText:{name:"Filter list text",defaultValue:"Filter list",control:{type:"text"}},addMoreFiltersText:{name:"Add more filters text",defaultValue:"+ more filters",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},invalidSearchText:{name:"Invalid search headline",defaultValue:"Invalid search",control:{type:"text"}},invalidSearchDescriptionText:{name:"Invalid search description",defaultValue:"Your search is invalid. Please try again. In order to perform a valid search, you need to include at least three letters.",control:{type:"text"}},intelligentFiltersAccessibleHeadlineText:{name:"Intelligent filters accessible headline",defaultValue:"Available filters",control:{type:"text"}},intelligentFiltersSelectedAccessibleHeadlineText:{name:"Intelligent filters - selected - accessible headline",defaultValue:"Selected filters",control:{type:"text"}}}},search_result_dev_SearchResult=args=>react.createElement(search_result_entry,args)},"./src/apps/search-result/useFilterHandler.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/filter.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/url.ts");const __WEBPACK_DEFAULT_EXPORT__=()=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),filters=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)((state=>state.filter)),clearFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.MR)("filters"),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.IU)())}),[dispatch]),addToFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>{"usePersistedFilters"!==(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.d6)("filters")&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.$u)({filters:"usePersistedFilters"}),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.WQ)(payload))}),[dispatch]),removeFromFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.TF)(payload))),[dispatch]);return{filters,addToFilter,removeFromFilter,clearFilter,addFilterFromUrlParamListener:facet=>{const urlFilter=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.d6)(facet);urlFilter&&addToFilter({facet,term:{key:"key",term:urlFilter}})}}}},"./src/apps/something-similar/SomethingSimilar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SomethingSimilarEntry:()=>SomethingSimilar_dev_SomethingSimilarEntry,default:()=>SomethingSimilar_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx"),url=__webpack_require__("./src/core/utils/helpers/url.ts");const SomethingSimilarList=({id,material})=>{const t=(0,utils_text.F)(),{somethingSimilarAuthor:somethingSimilarAuthorLimit,somethingSimilar:somethingSimilarLimit}=(0,general.fL)(),[somethingSimilar,setSomethingSimilar]=(0,react.useState)(null),[authorMaterials,setAuthorMaterials]=(0,react.useState)(null),[recommendView,setRecommendView]=(0,react.useState)("similar"),{data:somethingSimilarData}=(0,graphql.Nr)({faust:id,limit:somethingSimilarLimit}),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.$u)({"recommender-view":inputView}),setRecommendView(inputView)}),[setRecommendView]),{data:byAuthorData}=(0,graphql.KG)({limit:somethingSimilarAuthorLimit,q:{all:null==material?void 0:material.firstAuthor},offset:0});return(0,react.useEffect)((()=>{somethingSimilarData&&setSomethingSimilar(somethingSimilarData.recommend.result.map((({work})=>work)))}),[somethingSimilarData]),(0,react.useEffect)((()=>{byAuthorData&&setAuthorMaterials(byAuthorData.search.works)}),[byAuthorData]),react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("somethingSimilarTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement("button",{type:"button",onClick:()=>setRecommendView("similar"),className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"button-link":"")},t("somethingSimilarSomethingSimilarAuthorText")),react.createElement("button",{onClick:()=>setViewHandler("author"),type:"button",className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"":"button-link")},t("somethingSimilarByTheSameAuthorText"))),react.createElement("ul",{className:"recommender__grid"},recommendView&&somethingSimilar&&somethingSimilar.map((work=>react.createElement(SimpleMaterial.A,{app:"something-similar",bright:!0,work}))),!recommendView&&authorMaterials&&authorMaterials.map((work=>react.createElement(SimpleMaterial.A,{app:"something-similar",bright:!0,work})))))},something_similar_SomethingSimilarList=(0,material_fetch_hoc.A)(SomethingSimilarList);try{SomethingSimilarList.displayName="SomethingSimilarList",SomethingSimilarList.__docgenInfo={description:"",displayName:"SomethingSimilarList",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"]={docgenInfo:SomethingSimilarList.__docgenInfo,name:"SomethingSimilarList",path:"src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"})}catch(__react_docgen_typescript_loader_error){}const SomethingSimilar=({faust})=>react.createElement("div",{className:"recommender recommender--bright"},faust&&react.createElement(something_similar_SomethingSimilarList,{id:faust,item:{faust}})),something_similar_SomethingSimilar=SomethingSimilar;try{SomethingSimilar.displayName="SomethingSimilar",SomethingSimilar.__docgenInfo={description:"",displayName:"SomethingSimilar",props:{faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"]={docgenInfo:SomethingSimilar.__docgenInfo,name:"SomethingSimilar",path:"src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const SomethingSimilar_entry=(0,__webpack_require__("./src/core/utils/url.tsx").nU)((0,config.NV)((0,utils_text.i)((({faust})=>react.createElement(something_similar_SomethingSimilar,{faust})))));try{SomethingSimilarentry.displayName="SomethingSimilarentry",SomethingSimilarentry.__docgenInfo={description:"",displayName:"SomethingSimilarentry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},somethingSimilarTitleText:{defaultValue:null,description:"",name:"somethingSimilarTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},somethingSimilarByTheSameAuthorText:{defaultValue:null,description:"",name:"somethingSimilarByTheSameAuthorText",required:!0,type:{name:"string"}},somethingSimilarSomethingSimilarAuthorText:{defaultValue:null,description:"",name:"somethingSimilarSomethingSimilarAuthorText",required:!0,type:{name:"string"}},faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"]={docgenInfo:SomethingSimilarentry.__docgenInfo,name:"SomethingSimilarentry",path:"src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const SomethingSimilar_dev={title:"Apps / Something similar",component:SomethingSimilar_entry,decorators:[esm.V],argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,somethingSimilarTitleText:{control:{type:"text"},defaultValue:"Other materials"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},somethingSimilarByTheSameAuthorText:{control:{type:"text"},defaultValue:"By the same author"},faust:{control:{type:"text"},defaultValue:"48953786"},somethingSimilarSomethingSimilarAuthorText:{control:{type:"text"},defaultValue:"Something similar"}}},SomethingSimilar_dev_SomethingSimilarEntry=(props=>react.createElement(SomethingSimilar_entry,props)).bind({})},"./src/components/Buttons/ArrowButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx");const ArrowButton=({cursorPointer=!1,clickEventHandler,keyUpEventHandler,arrowLabelledBy,classNames=""})=>{const pointer=cursorPointer&&{cursor:"pointer"}||{cursor:"inherit"};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"aria-labelledby":arrowLabelledBy,className:`${classNames} arrow-button`,style:pointer,type:"button",onClick:e=>{clickEventHandler&&(e.stopPropagation(),clickEventHandler())},onKeyUp:e=>{keyUpEventHandler&&(e.stopPropagation(),keyUpEventHandler(e))}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__.A,null))},__WEBPACK_DEFAULT_EXPORT__=ArrowButton;try{ArrowButton.displayName="ArrowButton",ArrowButton.__docgenInfo={description:"",displayName:"ArrowButton",props:{cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean"}},clickEventHandler:{defaultValue:null,description:"",name:"clickEventHandler",required:!1,type:{name:"(() => void) | undefined"}},keyUpEventHandler:{defaultValue:null,description:"",name:"keyUpEventHandler",required:!1,type:{name:"((e: KeyboardEvent) => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}},classNames:{defaultValue:{value:""},description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ArrowButton.tsx#ArrowButton"]={docgenInfo:ArrowButton.__docgenInfo,name:"ArrowButton",path:"src/components/Buttons/ArrowButton.tsx#ArrowButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/Button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>Button});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const Button=({label,buttonType,disabled,collapsible,size,variant,onClick,iconClassNames,id,classNames,dataCy})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"data-cy":dataCy||"button",type:"button",className:`btn-primary btn-${variant} btn-${size} ${disabled?"btn-outline":""} arrow__hover--right-small ${classNames??""}`,disabled,onClick,id},label,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__.a,{buttonType,iconClassNames,collapsible}));try{Button.displayName="Button",Button.__docgenInfo={description:"",displayName:"Button",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},buttonType:{defaultValue:null,description:"",name:"buttonType",required:!0,type:{name:"enum",value:[{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"boolean"}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/Button.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"src/components/Buttons/Button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/ButtonIcon.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>ButtonIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/arrow-ui/icon-arrow-ui-small-right.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__),clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const ButtonIcon=({buttonType,collapsible,iconClassNames})=>{const iconClassName=`btn-icon ${(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)({"btn-collapsible":collapsible},[iconClassNames])}`;return"default"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ml-16"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})):"external-link"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:""}):null};try{ButtonIcon.displayName="ButtonIcon",ButtonIcon.__docgenInfo={description:"",displayName:"ButtonIcon",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!1,type:{name:"boolean | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonIcon.tsx#ButtonIcon"]={docgenInfo:ButtonIcon.__docgenInfo,name:"ButtonIcon",path:"src/components/Buttons/ButtonIcon.tsx#ButtonIcon"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/LinkButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const LinkButton=({buttonType,children,classNames,dataCy="link-button",iconClassNames,isNewTab=!1,size="medium",trackClick,url,variant="filled",ariaLabelledBy,id})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__.A,{href:url,isNewTab,className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)("btn-primary",`btn-${variant}`,`btn-${size}`,"arrow__hover--right-small","hide-linkstyle",classNames),trackClick,dataCy,ariaLabelledBy,id},children,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__.a,{buttonType,iconClassNames})),__WEBPACK_DEFAULT_EXPORT__=LinkButton;try{LinkButton.displayName="LinkButton",LinkButton.__docgenInfo={description:"",displayName:"LinkButton",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"link-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},size:{defaultValue:{value:"medium"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},variant:{defaultValue:{value:"filled"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/LinkButton.tsx#LinkButton"]={docgenInfo:LinkButton.__docgenInfo,name:"LinkButton",path:"src/components/Buttons/LinkButton.tsx#LinkButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureControllable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const DisclosureControllable=({id,children,showContent=!1,cyData,className,summary})=>{const[isOpen,setIsOpen]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(showContent),toggleOpen=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setIsOpen((prevIsOpen=>!prevIsOpen))}),[]),handleClick=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{toggleOpen()}),[toggleOpen]),handleKeyDown=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((e=>{"Enter"===e.key&&toggleOpen()}),[toggleOpen]),disclosureId=`disclosure-${id}`;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.A)("disclosure text-body-large",className)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":cyData,onClick:handleClick,onKeyDown:handleKeyDown,role:"button",tabIndex:0,"aria-controls":disclosureId,"aria-expanded":isOpen},summary),isOpen&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:disclosureId},children))},__WEBPACK_DEFAULT_EXPORT__=DisclosureControllable;try{DisclosureControllable.displayName="DisclosureControllable",DisclosureControllable.__docgenInfo={description:"",displayName:"DisclosureControllable",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},showContent:{defaultValue:{value:"false"},description:"",name:"showContent",required:!1,type:{name:"boolean | undefined"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"]={docgenInfo:DisclosureControllable.__docgenInfo,name:"DisclosureControllable",path:"src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureSummary.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Disclosures_DisclosureSummary});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const Heading=({children,level,className})=>{const HeadingTag=level;return react.createElement(HeadingTag,{className},children)},Heading_Heading=Heading;try{Heading.displayName="Heading",Heading.__docgenInfo={description:"",displayName:"Heading",props:{level:{defaultValue:null,description:"",name:"level",required:!0,type:{name:"enum",value:[{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Heading/Heading.tsx#Heading"]={docgenInfo:Heading.__docgenInfo,name:"Heading",path:"src/components/Heading/Heading.tsx#Heading"})}catch(__react_docgen_typescript_loader_error){}const Pagefold=({text,state,dataCy="page-fold"})=>react.createElement("div",{"data-cy":dataCy,className:"pagefold-parent--xsmall availability-label--unselected text-label availability-label"},react.createElement("div",{className:`pagefold-triangle--xsmall pagefold-triangle--${state}`}),react.createElement("p",{className:"text-label-normal ml-24 mr-8"},text)),pagefold_Pagefold=Pagefold;try{Pagefold.displayName="Pagefold",Pagefold.__docgenInfo={description:"",displayName:"Pagefold",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},state:{defaultValue:null,description:"",name:"state",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"alert"'}]}},dataCy:{defaultValue:{value:"page-fold"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagefold/Pagefold.tsx#Pagefold"]={docgenInfo:Pagefold.__docgenInfo,name:"Pagefold",path:"src/components/pagefold/Pagefold.tsx#Pagefold"})}catch(__react_docgen_typescript_loader_error){}var utils_text=__webpack_require__("./src/core/utils/text.tsx");const DisclosureSummary=({title,headingLevel="h3",mainIconPath,isAvailable,itemRef,className,dataCy="disclosure-summary"})=>{const t=(0,utils_text.F)();return react.createElement("summary",{ref:itemRef,className:(0,clsx.A)("disclosure__headline text-body-large ",className),"data-cy":dataCy},mainIconPath&&react.createElement("div",{className:"disclosure__icon bg-identity-tint-120"},react.createElement("img",{className:"invert",src:mainIconPath,alt:""})),react.createElement(Heading_Heading,{level:headingLevel,className:"text-body-large disclosure__text"+(void 0!==isAvailable?"--shorter":"")},title),void 0!==isAvailable&&react.createElement(pagefold_Pagefold,{text:t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText"),state:isAvailable?"success":"alert"}),react.createElement("img",{className:"disclosure__expand noselect",src:ExpandMore_default(),alt:""}))},Disclosures_DisclosureSummary=DisclosureSummary;try{DisclosureSummary.displayName="DisclosureSummary",DisclosureSummary.__docgenInfo={description:"",displayName:"DisclosureSummary",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},headingLevel:{defaultValue:{value:"h3"},description:"",name:"headingLevel",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},mainIconPath:{defaultValue:null,description:"",name:"mainIconPath",required:!1,type:{name:"string | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},itemRef:{defaultValue:null,description:"",name:"itemRef",required:!1,type:{name:"MutableRefObject | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"disclosure-summary"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"]={docgenInfo:DisclosureSummary.__docgenInfo,name:"DisclosureSummary",path:"src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/disclosure.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/lazy-load.ts");const __WEBPACK_DEFAULT_EXPORT__=({children,open,dataCy="disclosure",className,summary})=>{const{itemRef,hasBeenVisible:showItem}=(0,_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__.H)(),summaryWithRef=react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(summary,{itemRef});return react__WEBPACK_IMPORTED_MODULE_0__.createElement("details",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.A)("disclosure text-body-large",className),open,"data-cy":dataCy},summaryWithRef,showItem&&children)};try{disclosure.displayName="disclosure",disclosure.__docgenInfo={description:"",displayName:"disclosure",props:{open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"disclosure"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactElement>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/disclosure.tsx#disclosure"]={docgenInfo:disclosure.__docgenInfo,name:"disclosure",path:"src/components/Disclosures/disclosure.tsx#disclosure"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Dropdown/Dropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Dropdown_Dropdown});var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react=__webpack_require__("./node_modules/react/index.js"),icon_triangle=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-triangle.svg"),icon_triangle_default=__webpack_require__.n(icon_triangle),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore);const DropdownIcon=({arrowIcon})=>"triangles"===arrowIcon?react.createElement("span",null,react.createElement("img",{className:"dropdown__arrow",src:icon_triangle_default(),alt:""}),react.createElement("img",{className:"dropdown__arrow dropdown__arrow--bottom",src:icon_triangle_default(),alt:""})):"chevron"===arrowIcon?react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}):null,Dropdown_DropdownIcon=DropdownIcon;try{DropdownIcon.displayName="DropdownIcon",DropdownIcon.__docgenInfo={description:"",displayName:"DropdownIcon",props:{arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"]={docgenInfo:DropdownIcon.__docgenInfo,name:"DropdownIcon",path:"src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"})}catch(__react_docgen_typescript_loader_error){}const Dropdown=({arrowIcon,ariaLabel,options,classNames,innerClassNames,handleOnChange,placeholder,cyData,label,id,labelledBy,defaultValue})=>{const classes={root:(0,clsx.A)("dropdown",classNames),select:(0,clsx.A)("dropdown__select",null==innerClassNames?void 0:innerClassNames.select),option:(0,clsx.A)("dropdown__option",null==innerClassNames?void 0:innerClassNames.option),arrowWrapper:(0,clsx.A)("dropdown__arrows",null==innerClassNames?void 0:innerClassNames.arrowWrapper)},optionsList=placeholder?[placeholder,...options]:options;return react.createElement("div",{className:classes.root},label&&react.createElement("label",{htmlFor:id},label),react.createElement("div",{className:classes.root},react.createElement("select",{id,"data-cy":cyData,className:classes.select,"aria-labelledby":labelledBy,"aria-label":ariaLabel,onChange:e=>{handleOnChange&&e.target.value&&handleOnChange(e)}},optionsList.map((({label:optionsLabel,value,disabled})=>react.createElement("option",{key:optionsLabel,value,className:classes.option,disabled,selected:value.toString()===(null==defaultValue?void 0:defaultValue.toString())},optionsLabel)))),react.createElement("div",{className:classes.arrowWrapper},react.createElement(Dropdown_DropdownIcon,{arrowIcon}))))},Dropdown_Dropdown=Dropdown;try{Dropdown.displayName="Dropdown",Dropdown.__docgenInfo={description:"",displayName:"Dropdown",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"Option[]"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}},arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},innerClassNames:{defaultValue:null,description:"",name:"innerClassNames",required:!1,type:{name:"{ select?: string | undefined; option?: string | undefined; arrowWrapper?: string | undefined; } | undefined"}},handleOnChange:{defaultValue:null,description:"",name:"handleOnChange",required:!1,type:{name:"((e: ChangeEvent) => void) | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"Option | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"FormSelectValue | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/Dropdown.tsx#Dropdown"]={docgenInfo:Dropdown.__docgenInfo,name:"Dropdown",path:"src/components/Dropdown/Dropdown.tsx#Dropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/GroupModalContent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js"),_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts");const GroupModalContent=({amountOfSelectableMaterials,selectableMaterials=[],selectedMaterials=[],selectMaterials,buttonComponent,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)(),intersectionRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_4__.A)(intersectionRef,{threshold:0}),checkBoxComponent=void 0!==selectMaterials&&amountOfSelectableMaterials>0?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__.A,{selected:0!==amountOfSelectableMaterials&&selectedMaterials.length===amountOfSelectableMaterials,disabled:0===amountOfSelectableMaterials,id:"checkbox-select-all",onChecked:()=>{selectMaterials&&(selectedMaterials.length===amountOfSelectableMaterials?selectMaterials((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.CT)([])):selectMaterials(selectableMaterials))},label:t("groupModalCheckboxText")}):null;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box",ref:intersectionRef},checkBoxComponent,buttonComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__list"},children),!(null!=intersection&&intersection.isIntersecting)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box button-box--sticky-bottom"},checkBoxComponent,buttonComponent))},__WEBPACK_DEFAULT_EXPORT__=GroupModalContent;try{GroupModalContent.displayName="GroupModalContent",GroupModalContent.__docgenInfo={description:"",displayName:"GroupModalContent",props:{amountOfSelectableMaterials:{defaultValue:null,description:"",name:"amountOfSelectableMaterials",required:!0,type:{name:"number"}},selectableMaterials:{defaultValue:{value:"[]"},description:"",name:"selectableMaterials",required:!1,type:{name:"Nullable>; }>>[] | undefined"}},selectedMaterials:{defaultValue:{value:"[]"},description:"",name:"selectedMaterials",required:!1,type:{name:"Nullable>; }>>[] | undefined"}},buttonComponent:{defaultValue:null,description:"",name:"buttonComponent",required:!0,type:{name:"ReactNode"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!1,type:{name:"((materialIds: Nullable>; }>>[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"]={docgenInfo:GroupModalContent.__docgenInfo,name:"GroupModalContent",path:"src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/LoansGroupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>createLoanModalId,A:()=>GroupModal_LoansGroupModal});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),StatusMessage=__webpack_require__("./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");const GroupModalLoansList=({materials,selectedMaterials,openDetailsModal,selectMaterials,pageSize})=>{const groupedMaterials=materials.sort(((a,b)=>Number(!!b.isRenewable)-Number(!!a.isRenewable))),t=(0,utils_text.F)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:groupedMaterials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...groupedMaterials].splice(0,itemsShown))}),[itemsShown,groupedMaterials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.indexOf(item);indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return react.createElement(react.Fragment,null,react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((loanType,i)=>react.createElement(selectable_material.A,{focused:firstInNewPage===i,statusBadgeComponent:react.createElement(status_badge.A,{badgeDate:loanType.dueDate,neutralText:(0,helpers.V_)(loanType,date.Yq,t)}),statusBadgeComponentMobile:react.createElement(status_badge.A,{badgeDate:loanType.dueDate,neutralText:(0,helpers.V_)(loanType,date.Yq,t),mobileVersion:!0}),statusMessageComponentDesktop:react.createElement(StatusMessage.A,{className:"list-materials__status__note-desktop",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),statusMessageComponentMobile:react.createElement(StatusMessage.A,{className:"list-materials__status__note-mobile",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),item:loanType,openDetailsModal:item=>{(0,loan_type.R)(item)&&openDetailsModal(item)},key:loanType.faust,selected:selectedMaterials.includes(loanType),onMaterialChecked,disabled:!loanType.isRenewable})))),react.createElement(PagerComponent,{classNames:"result-pager--margin-bottom"}))},GroupModal_GroupModalLoansList=GroupModalLoansList;try{GroupModalLoansList.displayName="GroupModalLoansList",GroupModalLoansList.__docgenInfo={description:"",displayName:"GroupModalLoansList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>; }>>[]"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>; }>>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"]={docgenInfo:GroupModalLoansList.__docgenInfo,name:"GroupModalLoansList",path:"src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts");const LoansGroupModalButton=({materialsToRenew,renewableMaterials,renewSelected,renewingStatus})=>{const t=(0,utils_text.F)(),materialsCount=materialsToRenew.length,label=(0,renewal.OX)({isRenewable:renewableMaterials>0,renewingStatus,t,defaultText:t("groupModalButtonText",{count:materialsCount,placeholders:{"@count":materialsCount}})});return react.createElement(Button.$,{dataCy:"loans-group-modal-button",label,buttonType:"none",id:"renew-several",variant:"filled",disabled:0===renewableMaterials||"pending"===renewingStatus,collapsible:!1,onClick:renewSelected,size:"small"})},GroupModal_LoansGroupModalButton=LoansGroupModalButton;try{LoansGroupModalButton.displayName="LoansGroupModalButton",LoansGroupModalButton.__docgenInfo={description:"",displayName:"LoansGroupModalButton",props:{materialsToRenew:{defaultValue:null,description:"",name:"materialsToRenew",required:!0,type:{name:"Nullable>; }>>[]"}},renewableMaterials:{defaultValue:null,description:"",name:"renewableMaterials",required:!0,type:{name:"number"}},renewSelected:{defaultValue:null,description:"",name:"renewSelected",required:!0,type:{name:"() => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"idle"'},{value:'"pending"'},{value:'"success"'},{value:'"error"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"]={docgenInfo:LoansGroupModalButton.__docgenInfo,name:"LoansGroupModalButton",path:"src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"})}catch(__react_docgen_typescript_loader_error){}var RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const createLoanModalId=(dueDate,dueDateModal,allLoansId)=>dueDate&&dueDateModal?(0,modal_helpers.Q0)(String(dueDateModal),[dueDate]):(0,modal_helpers.Q0)("",[String(allLoansId)]),LoansGroupModal=({dueDate,loansModal,openDetailsModal,pageSize,children})=>{const t=(0,utils_text.F)(),{mutate}=(0,fbs.Oc)(),{dueDateModal,allLoansId}=(0,modal_helpers.c6)(),queryClient=(0,es.useQueryClient)(),modalIdUsed=createLoanModalId(dueDate,dueDateModal,allLoansId),renewableMaterials=(0,general.oq)(loansModal),[materialsToRenew,setMaterialsToRenew]=(0,react.useState)([]),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),{track}=(0,useStatistics.B)(),{handler:renew,requestStatus:renewingStatus,setRequestStatus:setRenewingStatus}=(0,useRequestsWithStatus.$K)({request:{params:{data:materialsToRenew.map((material=>material.loanId??0))},operation:mutate},onError:()=>{setRenewingResponse(null)},onSuccess:result=>{queryClient.invalidateQueries((0,fbs.$4)()),result&&setRenewingResponse(result)}}),renewSelected=(0,react.useCallback)((()=>{const renewWhatMaterials=renewableMaterials===materialsToRenew.length?"renewAllMaterials":"renewSelectedMaterials",trackedData=renewableMaterials===materialsToRenew.length?`Forny_alle_materialer (${materialsToRenew.length})`:`Forny_valgte_materialer (${materialsToRenew.length})`;track("click",{id:statistics.o[renewWhatMaterials].id,name:statistics.o[renewWhatMaterials].name,trackedData}),renew()}),[renew]);(0,react.useEffect)((()=>{setMaterialsToRenew((0,general.CT)(loansModal))}),[loansModal]);const selectMaterials=materialIds=>{setMaterialsToRenew(materialIds)},showSuccessMessage="success"===renewingStatus,countRenewed=(0,renewal.Pl)(renewingResponse);return react.createElement(modal.A,{modalId:modalIdUsed,closeModalAriaLabelText:t("groupModalLoansCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalLoansAriaDescriptionText"),eventCallbacks:{close:()=>setRenewingStatus("idle")},classNames:showSuccessMessage?"modal-cta modal-padding":""},["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-loan"},children,react.createElement(GroupModalContent.A,{selectMaterials,selectedMaterials:materialsToRenew,amountOfSelectableMaterials:renewableMaterials,selectableMaterials:(0,general.CT)(loansModal),buttonComponent:react.createElement(GroupModal_LoansGroupModalButton,{materialsToRenew,renewableMaterials,renewSelected,renewingStatus})},react.createElement(GroupModal_GroupModalLoansList,{materials:loansModal,selectedMaterials:materialsToRenew,openDetailsModal,selectMaterials,pageSize}))),!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.A,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId:modalIdUsed,setRenewingStatus,texts:{successTitleText:t("renewGroupModalLoansSuccessTitleText"),successStatusText:t("renewGroupModalLoansSuccessStatusText",{count:countRenewed}),noRenewalsPossibleErrorTitleText:t("renewGroupModalLoansNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewGroupModalLoansNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewGroupModalLoansErrorTitleText"),errorStatusText:t("renewGroupModalLoansErrorStatusText"),buttonText:t("renewGroupModalLoansButtonText")}}))},GroupModal_LoansGroupModal=LoansGroupModal;try{LoansGroupModal.displayName="LoansGroupModal",LoansGroupModal.__docgenInfo={description:"",displayName:"LoansGroupModal",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loansModal:{defaultValue:null,description:"",name:"loansModal",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"]={docgenInfo:LoansGroupModal.__docgenInfo,name:"LoansGroupModal",path:"src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/SimpleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const SimpleModalHeader=({header})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header))),__WEBPACK_DEFAULT_EXPORT__=SimpleModalHeader;try{SimpleModalHeader.displayName="SimpleModalHeader",SimpleModalHeader.__docgenInfo={description:"",displayName:"SimpleModalHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"]={docgenInfo:SimpleModalHeader.__docgenInfo,name:"SimpleModalHeader",path:"src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/StatusCircleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/url.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx");const StatusCircleModalHeader=({dueDate,header,subHeader,statusCircleComponent})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.F)(),feesPageUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_3__.Ik)()("feesPageUrl");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"mr-32"},statusCircleComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header),subHeader&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"text-body-large"},subHeader))),dueDate&&(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.El)(dueDate)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__warning"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__.A,{leftLink:feesPageUrl,linkText:t("groupModalDueDateLinkToPageWithFeesText"),overdueText:t("groupModalDueDateWarningLoanOverdueText")})))},__WEBPACK_DEFAULT_EXPORT__=StatusCircleModalHeader;try{StatusCircleModalHeader.displayName="StatusCircleModalHeader",StatusCircleModalHeader.__docgenInfo={description:"",displayName:"StatusCircleModalHeader",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},subHeader:{defaultValue:null,description:"",name:"subHeader",required:!1,type:{name:"string | undefined"}},statusCircleComponent:{defaultValue:null,description:"",name:"statusCircleComponent",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"]={docgenInfo:StatusCircleModalHeader.__docgenInfo,name:"StatusCircleModalHeader",path:"src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/alert/alert.dev.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Info:()=>Info,Success:()=>Success,Warning:()=>Warning,default:()=>alert_dev});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),reach_alert_esm=__webpack_require__("./node_modules/@reach/alert/dist/reach-alert.esm.js");function Alert({className,message,type,variant}){return react.createElement(reach_alert_esm.A,{className:`dpl-alert dpl-alert--${variant} ${className}`,type},message)}Alert.propTypes={className:prop_types_default().string,message:prop_types_default().string,type:prop_types_default().oneOf(["assertive","polite"]),variant:prop_types_default().oneOf(["info","success","warning","blank"])},Alert.defaultProps={className:"",message:"Hov, der opstod en fejl!",type:"polite",variant:"info"};const alert_alert=Alert,alert_dev={title:"Components/Alert"},Template=args=>react.createElement(alert_alert,args),Info=Template.bind({}),Warning=Template.bind({});Warning.args={variant:"warning",message:"Noget gik galt"};const Success=Template.bind({});Success.args={variant:"success",message:"Det lykkedes"}},"./src/components/atoms/icons/arrow/arrow.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:"61",height:"9",viewBox:"0 0 61 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__body",d:"M60 4.5H0",stroke:"black"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__head",d:"M60.3537 4.85355C60.5489 4.65829 60.5489 4.34171 60.3537 4.14645L57.1717 0.96447C56.9764 0.769208 56.6598 0.769208 56.4646 0.96447C56.2693 1.15973 56.2693 1.47631 56.4646 1.67157L59.293 4.5L56.4646 7.32843C56.2693 7.52369 56.2693 7.84027 56.4646 8.03553C56.6598 8.2308 56.9764 8.2308 57.1717 8.03553L60.3537 4.85355ZM60.0001 4H57.0001V5H60.0001V4Z",fill:"black"}))},"./src/components/atoms/input/TextInput.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextInput=({id,label,description,validation,type,onChange,value,className,pattern,inputmode,required,title,placeholder})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.A)("dpl-input",className,[{"dpl-input--invalid":!!validation}])},react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:id},required?`${label}*`:label),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{className:"text-body-medium-medium",required,"aria-describedby":description?`description-${id}`:"",id,"data-cy":id,type,pattern,inputMode:inputmode,onChange:e=>{onChange(e.target.value)},value,"aria-labelledby":validation?`validation-${id}`:"",title,placeholder}),description&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dpl-input__description",id:`description-${id}`},description),validation&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:`validation-${id}`,className:"dpl-input__validation",role:"alert"},validation)),__WEBPACK_DEFAULT_EXPORT__=TextInput;try{TextInput.displayName="TextInput",TextInput.__docgenInfo={description:"",displayName:"TextInput",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"number"'},{value:'"text"'},{value:'"email"'},{value:'"password"'},{value:'"tel"'}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"boolean | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},validation:{defaultValue:null,description:"",name:"validation",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},pattern:{defaultValue:null,description:"",name:"pattern",required:!1,type:{name:"string | undefined"}},inputmode:{defaultValue:null,description:"",name:"inputmode",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"numeric"'}]}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/input/TextInput.tsx#TextInput"]={docgenInfo:TextInput.__docgenInfo,name:"TextInput",path:"src/components/atoms/input/TextInput.tsx#TextInput"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/Link.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>links_Link});var react=__webpack_require__("./node_modules/react/index.js"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const handleTracking=({e,trackClick,isNewTab,url})=>{e.preventDefault(),trackClick().then((()=>{isNewTab&&window.open(url.href,"_blank"),(0,helpers_url.SE)(url)}))},getLinkHandler=({type,trackClick,isNewTab,url,stopPropagation})=>e=>{if(stopPropagation&&e.stopPropagation(),!trackClick)return;const{key}=e;"keyup"!==type||"keyup"!==e.type||"Enter"!==key?"click"===type&&"click"===e.type&&handleTracking({e,isNewTab,trackClick,url}):handleTracking({e,isNewTab,trackClick,url})},Link=({href,children,isNewTab=!1,className,id,trackClick,dataCy,ariaLabelledBy,stopPropagation=!1,isHiddenFromScreenReaders})=>{const handleClick=getLinkHandler({type:"click",isNewTab,stopPropagation,url:href,trackClick}),handleKeyUp=getLinkHandler({type:"keyup",isNewTab,stopPropagation,url:href,trackClick});return react.createElement("a",{id,"data-cy":dataCy||id,href:href.toString(),target:isNewTab?"_blank":void 0,rel:"noreferrer",className,onClick:handleClick,onKeyUp:handleKeyUp,"aria-labelledby":ariaLabelledBy,tabIndex:isHiddenFromScreenReaders?-1:0,"aria-hidden":isHiddenFromScreenReaders},children)},links_Link=Link;try{Link.displayName="Link",Link.__docgenInfo={description:"",displayName:"Link",props:{href:{defaultValue:null,description:"",name:"href",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},stopPropagation:{defaultValue:{value:"false"},description:"",name:"stopPropagation",required:!1,type:{name:"boolean | undefined"}},isHiddenFromScreenReaders:{defaultValue:null,description:"",name:"isHiddenFromScreenReaders",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/Link.tsx#Link"]={docgenInfo:Link.__docgenInfo,name:"Link",path:"src/components/atoms/links/Link.tsx#Link"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/LinkNoStyle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx");const LinkNoStyle=({url,children,isNewTab=!1,className,trackClick,dataCy="link-no-style",ariaLabelledBy,isHiddenFromScreenReaders})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_1__.A,{href:url,isNewTab,className:`hide-linkstyle ${className||""}`,trackClick,dataCy,ariaLabelledBy,isHiddenFromScreenReaders},children),__WEBPACK_DEFAULT_EXPORT__=LinkNoStyle;try{LinkNoStyle.displayName="LinkNoStyle",LinkNoStyle.__docgenInfo={description:"",displayName:"LinkNoStyle",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:{value:"link-no-style"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},isHiddenFromScreenReaders:{defaultValue:null,description:"",name:"isHiddenFromScreenReaders",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"]={docgenInfo:LinkNoStyle.__docgenInfo,name:"LinkNoStyle",path:"src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/author-year/authorYear.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({author,year})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,author&&author,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")"));try{authorYear.displayName="authorYear",authorYear.__docgenInfo={description:"",displayName:"authorYear",props:{author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string | null"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/author-year/authorYear.tsx#authorYear"]={docgenInfo:authorYear.__docgenInfo,name:"authorYear",path:"src/components/author-year/authorYear.tsx#authorYear"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label-inside.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__),_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const __WEBPACK_DEFAULT_EXPORT__=({selected,isLoading,isAvailable,manifestText,availabilityText,quantity})=>{const availableTriangleCss=isAvailable?"success":"alert",classes={triangle:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)({"pagefold-triangle--none":selected},{[`pagefold-triangle--xsmall pagefold-triangle--${availableTriangleCss}`]:!selected}),check:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)("availability-label__check",selected&&"selected")};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:classes.triangle}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:classes.check,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),manifestText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"availability-label__text text-label-semibold ml-24","data-cy":"availability-label-type"},manifestText),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label__divider ml-4"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:`availability-label__text text-label-normal ${manifestText?"ml-4":"ml-24"} mr-8`,"data-cy":"availability-label-status"},isLoading?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__.A,{width:40}):availabilityText),quantity&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label--divider ml-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-label-normal mx-8"},quantity," stk")))};try{availabilitylabelinside.displayName="availabilitylabelinside",availabilitylabelinside.__docgenInfo={description:"",displayName:"availabilitylabelinside",props:{selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"]={docgenInfo:availabilitylabelinside.__docgenInfo,name:"availabilitylabelinside",path:"src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Available:()=>Available,EBogPrinsenHarry:()=>EBogPrinsenHarry,MoreThanOneID:()=>MoreThanOneID,Selected:()=>Selected,Unavailable:()=>Unavailable,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/availability-label.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Availability Label",component:_availability_label__WEBPACK_IMPORTED_MODULE_5__.Y,argTypes:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__.A,..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_6__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_7__.A,faustIds:{name:"Faust Ids",control:{type:"array"}},manifestText:{name:"Manifestation text",control:{type:"text"}},url:{name:"Link",control:{type:"text"}},selected:{name:"selected",control:{type:"boolean"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},cursorPointer:{name:"Cursor pointer",control:{type:"boolean"}},dataCy:{name:"Cypress data attribute",control:{type:"text"}},isbns:{name:"ISBN",control:{type:"text"}},accessTypes:{name:"Access types",options:[...Object.values(_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.cs)],control:{type:"check"}}},args:{manifestText:"Bog",availabilityText:"Hjemme",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__.Lu)()),selected:!1}},Template=args=>{const ConfiguredAvailabilityLabel=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_4__.nU)((0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.NV)(_availability_label__WEBPACK_IMPORTED_MODULE_5__.Y));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(ConfiguredAvailabilityLabel,args)},Available=Template.bind({});Available.args={faustIds:["61435867"]};const MoreThanOneID=Template.bind({});MoreThanOneID.args={faustIds:["62523611","62150041","61435867"]};const Selected=Template.bind({});Selected.args={faustIds:["62523611"],manifestText:"lydbog (cd-mp3)",selected:!0};const Unavailable=Template.bind({});Unavailable.args={faustIds:["62523611"],manifestText:"ebog"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={isbns:["9788763844123"],manifestText:"ebog",accessTypes:[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.cs.Online]}},"./src/components/availability-label/availability-label.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>AvailabilityLabel});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx"),_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/statistics/useStatistics.ts"),_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/statistics/statistics.ts"),_helper__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/helper.ts"),_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx");const AvailabilityLabel=({manifestText,accessTypes,access,selected=!1,url,faustIds,handleSelectManifestation,cursorPointer=!1,dataCy="availability-label",isbns,isVisualOnly})=>{const{track}=(0,_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__.B)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)(),{isLoading,isAvailable}=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.z2)({accessTypes,access,faustIds,isbn:isbns?isbns[0]:null,manifestText}),availabilityText=t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");(0,react_use__WEBPACK_IMPORTED_MODULE_7__.A)((()=>{selected&&track("click",{id:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.o.materialStatus.id,name:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.o.materialStatus.name,trackedData:availabilityText})}),[faustIds,selected]);const availabilityLabel=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__.A,{selected,isLoading:!!isLoading,isAvailable:!!isAvailable,manifestText,availabilityText}),parentClass=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.Mk)({selected,cursorPointer});return isVisualOnly?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:parentClass,"data-cy":dataCy},availabilityLabel):url&&!handleSelectManifestation?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__.A,{className:parentClass,url,"data-cy":dataCy},availabilityLabel):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:parentClass,type:"button",onClick:handleSelectManifestation,"data-cy":dataCy,"aria-pressed":selected},availabilityLabel)};try{AvailabilityLabel.displayName="AvailabilityLabel",AvailabilityLabel.__docgenInfo={description:"",displayName:"AvailabilityLabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#AvailabilityLabel"]={docgenInfo:AvailabilityLabel.__docgenInfo,name:"AvailabilityLabel",path:"src/components/availability-label/availability-label.tsx#AvailabilityLabel"})}catch(__react_docgen_typescript_loader_error){}try{availabilitylabel.displayName="availabilitylabel",availabilitylabel.__docgenInfo={description:"",displayName:"availabilitylabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#availabilitylabel"]={docgenInfo:availabilitylabel.__docgenInfo,name:"availabilitylabel",path:"src/components/availability-label/availability-label.tsx#availabilitylabel"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-labels.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>AvailabilityLabels});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/availability-label/availability-label.tsx"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/apps/material/helper.ts");const AvailabilityLabels=({manifestations,workId,selectedManifestations,setSelectedManifestations,cursorPointer=!1})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.Ik)()("materialUrl"),allMaterialTypes=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.JB)(manifestations),manifestationsByMaterialType=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.Zh)(manifestations);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,allMaterialTypes.map((materialType=>{const isTheOnlyLabel=1===allMaterialTypes.length,manifestationsOfMaterialType=manifestationsByMaterialType[materialType],faustIds=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.bn)(manifestationsOfMaterialType).sort(),identifiers=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.AC)(manifestationsOfMaterialType),url=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.Qj)(materialUrl,workId,materialType),accessTypesCodes=manifestationsOfMaterialType.map((manifest=>manifest.accessTypes.map((accessType=>accessType.code)))).flat(),access=manifestationsOfMaterialType.map((manifest=>manifest.access.map((acc=>acc.__typename)))).flat();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label__WEBPACK_IMPORTED_MODULE_3__.Y,{key:faustIds.join("-"),url,cursorPointer,faustIds,manifestText:materialType,accessTypes:accessTypesCodes,access,selected:selectedManifestations&&materialType===(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.JB)(selectedManifestations)[0],handleSelectManifestation:setSelectedManifestations?()=>{setSelectedManifestations(manifestationsOfMaterialType),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.$u)({type:materialType})}:void 0,isbns:identifiers,isVisualOnly:isTheOnlyLabel})})))};try{AvailabilityLabels.displayName="AvailabilityLabels",AvailabilityLabels.__docgenInfo={description:"",displayName:"AvailabilityLabels",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!1,type:{name:"Manifestation[] | undefined"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!1,type:{name:"((manifestations: Manifestation[]) => void) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-labels.tsx#AvailabilityLabels"]={docgenInfo:AvailabilityLabels.__docgenInfo,name:"AvailabilityLabels",path:"src/components/availability-label/availability-labels.tsx#AvailabilityLabels"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mk:()=>getParentAvailabilityLabelClass,z2:()=>useAvailabilityData});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const publizonProductStatuses={0:{isAvailable:!0,meaning:"Unknown"},1:{isAvailable:!0,meaning:"Unknown"},2:{isAvailable:!0,meaning:"Unknown"},3:{isAvailable:!0,meaning:"Unknown"},4:{isAvailable:!0,meaning:"Reservable"},5:{isAvailable:!1,meaning:"Reservation queue on the material"},6:{isAvailable:!0,meaning:"Unknown"},7:{isAvailable:!0,meaning:"Unknown"}};var material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const useAvailabilityData=({accessTypes,access,faustIds,isbn,manifestText})=>{const[isAvailable,setIsAvailable]=(0,react.useState)(null),config=(0,utils_config.UK)(),isOnline=(null==accessTypes?void 0:accessTypes.includes(graphql.cs.Online))??!1,[isCostFree,setIsCostFree]=(0,react.useState)(null),[isLoading,setIsLoading]=(0,react.useState)(null);(0,react.useEffect)((()=>{isOnline&&setIsAvailable(!0)}),[isOnline]),(0,react.useEffect)((()=>{manifestText===material_type.sN.article&&null===isAvailable&&setIsAvailable(!0)}),[manifestText,isAvailable]);const{isLoading:isLoadingIdentifier}=(0,publizon.wK)(isbn??"",{query:{enabled:isOnline&&null!==isbn&&manifestText!==material_type.sN.article,onSuccess:res=>{var _res$product;!1!==(null==res||null===(_res$product=res.product)||void 0===_res$product?void 0:_res$product.costFree)?setIsCostFree(!0):setIsCostFree(!1)}}}),{isLoading:isLoadingProductInfo}=(0,publizon.Qo)(isbn||"",{enabled:isOnline&&!!isbn&&!1===isCostFree&&access.some((acc=>"Ereol"===acc))&&manifestText!==material_type.sN.article,onSuccess:res=>{res&&res.loanStatus?setIsAvailable(publizonProductStatuses[res.loanStatus].isAvailable):setIsAvailable(!1)}}),{isLoading:isLoadingAvailability}=(0,useGetAvailability.A)({faustIds:faustIds??[],config,options:{query:{enabled:!isOnline&&null!==faustIds&&manifestText!==material_type.sN.article,onSuccess:data=>{null!=data&&data.some((item=>item.available))&&setIsAvailable(!0)}}}});return(0,react.useEffect)((()=>{manifestText!==material_type.sN.article&&setIsLoading((isLoadingAvailability||isLoadingIdentifier||isLoadingProductInfo)&&null===isAvailable)}),[isLoadingAvailability,isLoadingIdentifier,isLoadingProductInfo,isAvailable,manifestText]),{isLoading,isAvailable}},getParentAvailabilityLabelClass=({selected,cursorPointer})=>(0,clsx.A)({"pagefold-parent--none availability-label--selected":selected},{"pagefold-parent--xsmall availability-label--unselected":!selected},{"cursor-pointer":cursorPointer},"text-label","availability-label")},"./src/components/button-favourite/button-favourite.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,favourite:()=>favourite});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_button_favourite__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;ereact__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedButtonFavourite,_extends({},args,{addToListRequest:id=>{}}))).bind({});favourite.args={}},"./src/components/button-favourite/button-favourite.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>button_favourite});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),Reload=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reload.svg"),Reload_default=__webpack_require__.n(Reload);const IconFavourite=({fill,darkBackground})=>{let classes=fill?"icon-favourite icon-favourite--filled":"icon-favourite";return darkBackground&&(classes=fill?"icon-favourite--bright-filled":"icon-favourite--bright"),react.createElement("svg",{height:"24",width:"24",className:classes,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{d:"M11.5 20L10.2675 18.921C5.89 15.1035 3 12.5858 3 9.49591C3 6.9782 5.057 5 7.675 5C9.154 5 10.5735 5.66213 11.5 6.70845C12.4265 5.66213 13.846 5 15.325 5C17.943 5 20 6.9782 20 9.49591C20 12.5858 17.11 15.1035 12.7325 18.9292L11.5 20Z",strokeWidth:"2"}))};try{IconFavourite.displayName="IconFavourite",IconFavourite.__docgenInfo={description:"",displayName:"IconFavourite",props:{fill:{defaultValue:null,description:"",name:"fill",required:!1,type:{name:"boolean | undefined"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/icon-favourite/icon-favourite.tsx#IconFavourite"]={docgenInfo:IconFavourite.__docgenInfo,name:"IconFavourite",path:"src/components/icon-favourite/icon-favourite.tsx#IconFavourite"})}catch(__react_docgen_typescript_loader_error){}var material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const button_favourite=({id,addToListRequest,darkBackground,title})=>{const queryClient=(0,es.useQueryClient)(),[fillState,setFillState]=(0,react.useState)(!1),[isLoadingHeart,setIsLoadingHeart]=(0,react.useState)(!0),t=(0,utils_text.F)(),{mutate}=(0,material_list.Xi)(),{track}=(0,useStatistics.B)();(0,react.useEffect)((()=>{setIsLoadingHeart(!0),mutate({listId:"default",itemId:id},{onSuccess:()=>{setFillState(!0),setIsLoadingHeart(!1)},onError:()=>{setFillState(!1),setIsLoadingHeart(!1)}})}),[id,mutate]);const handleClick=(0,react.useCallback)((e=>{fillState?((0,material_list.Ai)("default",id,queryClient),setFillState(!1)):(track("click",{id:statistics.o.addToFavorites.id,name:statistics.o.addToFavorites.name,trackedData:id}),addToListRequest(id),setFillState(!0)),e.stopPropagation()}),[addToListRequest,fillState,id,queryClient,track]);return react.createElement("button",{type:"button","aria-label":t(fillState?"removeFromFavoritesAriaLabelText":"addToFavoritesAriaLabelText",{placeholders:{"@title":title}}),onClick:handleClick,className:"button-favourite"},isLoadingHeart&&react.createElement("img",{src:Reload_default(),alt:t("isLoadingHeartText")}),!isLoadingHeart&&react.createElement(IconFavourite,{darkBackground,fill:fillState}))};try{buttonfavourite.displayName="buttonfavourite",buttonfavourite.__docgenInfo={description:"",displayName:"buttonfavourite",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"ButtonFavouriteId"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}},addToListRequest:{defaultValue:null,description:"",name:"addToListRequest",required:!0,type:{name:"(id: ButtonFavouriteId) => void"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-favourite/button-favourite.tsx#buttonfavourite"]={docgenInfo:buttonfavourite.__docgenInfo,name:"buttonfavourite",path:"src/components/button-favourite/button-favourite.tsx#buttonfavourite"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/MaterialListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const MaterialListItem=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,ref)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{ref,tabIndex:-1},props.children))),__WEBPACK_DEFAULT_EXPORT__=MaterialListItem;try{MaterialListItem.displayName="MaterialListItem",MaterialListItem.__docgenInfo={description:"",displayName:"MaterialListItem",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"]={docgenInfo:MaterialListItem.__docgenInfo,name:"MaterialListItem",path:"src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/SearchResultList.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx"),_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx"),_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const SearchResultList=({resultItems,page,pageSize})=>{const worksAreLoaded=!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(resultItems),lastItemRef=react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,resultItems]),react__WEBPACK_IMPORTED_MODULE_1__.createElement("ul",{className:"card-list-page__list my-32","data-cy":"search-result-list"},!worksAreLoaded&&[...Array(5)].map((()=>react__WEBPACK_IMPORTED_MODULE_1__.createElement("li",null,react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__.A,null)))),worksAreLoaded&&resultItems.map(((item,i)=>{const isFirstNewItem=i===page*pageSize;return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__.A,{key:item.workId,ref:isFirstNewItem?lastItemRef:null},react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__.A,{item,coverTint:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.J$)(i),resultNumber:i+1}))})))},__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(SearchResultList);try{SearchResultList.displayName="SearchResultList",SearchResultList.__docgenInfo={description:"",displayName:"SearchResultList",props:{resultItems:{defaultValue:null,description:"",name:"resultItems",required:!0,type:{name:"Work[]"}},page:{defaultValue:null,description:"",name:"page",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/SearchResultList.tsx#SearchResultList"]={docgenInfo:SearchResultList.__docgenInfo,name:"SearchResultList",path:"src/components/card-item-list/SearchResultList.tsx#SearchResultList"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const CardListItemSkeleton=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("article",{className:"card-list-item ssc"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square cover--size-small"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-60 mb"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "))),__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(CardListItemSkeleton);try{cardlistitemskeleton.displayName="cardlistitemskeleton",cardlistitemskeleton.__docgenInfo={description:"",displayName:"cardlistitemskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"]={docgenInfo:cardlistitemskeleton.__docgenInfo,name:"cardlistitemskeleton",path:"src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>card_list_item});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),cover=__webpack_require__("./src/components/cover/cover.tsx");const card_list_item_cover=({ids,bestRepresentation,alt,url,tint,linkAriaLabelledBy})=>react.createElement(cover.Y,{animate:!0,ids,bestRepresentation,size:"small",alt:String(alt),url,tint,linkAriaLabelledBy});try{cardlistitemcover.displayName="cardlistitemcover",cardlistitemcover.__docgenInfo={description:"",displayName:"cardlistitemcover",props:{url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string | undefined"}},displaySize:{defaultValue:null,description:"",name:"displaySize",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'},{value:'"2xsmall"'}]}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},ids:{defaultValue:null,description:"",name:"ids",required:!0,type:{name:"string[]"}},bestRepresentation:{defaultValue:null,description:"",name:"bestRepresentation",required:!1,type:{name:"Manifestation | undefined"}},idType:{defaultValue:null,description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"faust"'},{value:'"pid"'},{value:'"isbn"'},{value:'"issn"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"medium"'}]}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"]={docgenInfo:cardlistitemcover.__docgenInfo,name:"cardlistitemcover",path:"src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"})}catch(__react_docgen_typescript_loader_error){}var HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helper=__webpack_require__("./src/apps/material/helper.ts"),useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const SubjectNumber=({shelfmark:{shelfmark},className=""})=>react.createElement("div",{className},shelfmark),subject_number_SubjectNumber=SubjectNumber;try{SubjectNumber.displayName="SubjectNumber",SubjectNumber.__docgenInfo={description:"",displayName:"SubjectNumber",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:"Shelfmark"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/subject-number/SubjectNumber.tsx#SubjectNumber"]={docgenInfo:SubjectNumber.__docgenInfo,name:"SubjectNumber",path:"src/components/subject-number/SubjectNumber.tsx#SubjectNumber"})}catch(__react_docgen_typescript_loader_error){}const card_list_item=({item,item:{titles:{full:fullTitle},series,creators,manifestations:{all:manifestations,bestRepresentation},workId},coverTint,resultNumber,dataCy="card-list-item"})=>{var _firstItemInSeries$nu;const searchTitleId=(0,react.useId)(),t=(0,utils_text.F)(),u=(0,url.Ik)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{filters}=(0,useFilterHandler.A)(),materialTypeFromFilters=((filters,manifestations)=>{const materialTypeFilter=head_default()(Object.keys(filters[graphql.SW.MaterialTypesSpecific]||{}).sort()),allMaterialTypes=(0,general.JB)(manifestations);return materialTypeFilter&&allMaterialTypes.includes(materialTypeFilter)?materialTypeFilter:void 0})(filters,manifestations),bookManifestation=(0,helper.oj)(manifestations),dispatch=(0,es.wA)(),queryClient=(0,react_query_es.useQueryClient)(),author=(0,general.sP)((0,general.UV)(creators),t),manifestationPids=(0,general.e$)(manifestations),firstItemInSeries=(0,helper.w2)(series).shift(),materialFullUrl=(0,helpers_url.Qj)(materialUrl,workId,materialTypeFromFilters),languageIsoCode=(0,helper.PG)(manifestations),{shelfmark}=bestRepresentation,{track}=(0,useStatistics.B)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.H)(),handleClick=(0,react.useCallback)((()=>{track("click",{id:statistics.o.searchResultNumberClick.id,name:statistics.o.searchResultNumberClick.name,trackedData:resultNumber.toString()}).then((()=>{(0,helpers_url.SE)(materialFullUrl)}))}),[materialFullUrl]);return react.createElement("article",{ref:itemRef,"data-cy":dataCy,className:"card-list-item arrow__hover--right-small",onClick:()=>{handleClick()},onKeyUp:e=>"Enter"===e.key&&handleClick},react.createElement("div",{className:"card-list-item__cover"},showItem&&react.createElement(card_list_item_cover,{ids:manifestationPids,bestRepresentation:bookManifestation??bestRepresentation,url:materialFullUrl,tint:coverTint,linkAriaLabelledBy:searchTitleId})),react.createElement("div",{className:"card-list-item__text"},react.createElement("div",{className:"card-list-item__meta"},showItem&&react.createElement(button_favourite.A,{title:fullTitle[0],id:workId,addToListRequest:id=>{dispatch((0,guardedRequests_slice.A5)({type:"addFavorite",args:{id,queryClient},app:"search-result"}))}}),firstItemInSeries&&react.createElement(HorizontalTermLine.A,{title:`${t("numberDescriptionText")} ${null===(_firstItemInSeries$nu=firstItemInSeries.numberInSeries)||void 0===_firstItemInSeries$nu?void 0:_firstItemInSeries$nu.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.zy)(searchUrl,firstItemInSeries.title),term:firstItemInSeries.title}]})),!(0,general.G)(bestRepresentation)&&shelfmark&&react.createElement(subject_number_SubjectNumber,{className:"text-tags color-secondary-gray mt-8",shelfmark}),react.createElement("h2",{className:"card-list-item__title text-header-h4 mb-4","data-cy":"card-list-item-title",lang:languageIsoCode,id:searchTitleId},react.createElement(Link.A,{href:materialFullUrl,stopPropagation:!0},fullTitle)),author&&item&&react.createElement("p",{className:"text-small-caption","data-cy":"card-list-item-author"},`${t("byAuthorText")} ${author}`,(0,general.C2)(item)?` (${(0,general.C2)(item)})`:"")),react.createElement("div",{className:"card-list-item__availability","data-cy":"card-list-item-availability"},showItem&&react.createElement(availability_labels.F,{cursorPointer:!0,workId,manifestations})),react.createElement(arrow.A,null))};try{cardlistitem.displayName="cardlistitem",cardlistitem.__docgenInfo={description:"",displayName:"cardlistitem",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"Work"}},coverTint:{defaultValue:null,description:"",name:"coverTint",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},resultNumber:{defaultValue:null,description:"",name:"resultNumber",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"card-list-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"]={docgenInfo:cardlistitem.__docgenInfo,name:"cardlistitem",path:"src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/checkbox/Checkbox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>checkbox_Checkbox});var react=__webpack_require__("./node_modules/react/index.js");const icon_checkbox=()=>react.createElement("svg",{width:"20px",height:"20px"},react.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})),checkbox_Checkbox=({id,label,hideLabel,className,selected,onChecked,disabled,ariaLabel,focused,isVisualOnly,labelledBy})=>react.createElement("div",{className:`checkbox ${className||""}`},react.createElement("input",{autoFocus:focused,id,className:"checkbox__input",onChange:e=>{var checked;checked=e.target.checked,onChecked&&onChecked(checked)},checked:selected,type:"checkbox","aria-label":isVisualOnly&&labelledBy?void 0:ariaLabel,"aria-labelledby":isVisualOnly&&labelledBy?labelledBy:void 0,disabled}),react.createElement("label",{className:"checkbox__label",htmlFor:id,"data-cy":id},react.createElement("span",{className:"checkbox__icon","aria-labelledby":labelledBy},react.createElement(icon_checkbox,null)),label&&react.createElement("span",{"data-cy":"checkbox-text",className:"checkbox__text text-small-caption color-secondary-gray "+(hideLabel?"checkbox__text--hide-visually":"")},label)));try{Checkbox.displayName="Checkbox",Checkbox.__docgenInfo={description:"",displayName:"Checkbox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"ReactNode"}},hideLabel:{defaultValue:null,description:"",name:"hideLabel",required:!1,type:{name:"boolean | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},onChecked:{defaultValue:null,description:"",name:"onChecked",required:!1,type:{name:"((value: boolean) => void) | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!1,type:{name:"string | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!1,type:{name:"boolean | undefined"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/checkbox/Checkbox.tsx#Checkbox"]={docgenInfo:Checkbox.__docgenInfo,name:"Checkbox",path:"src/components/checkbox/Checkbox.tsx#Checkbox"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/contact-info-section/ContactInfoSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>contact_info_section_ContactInfoSection});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const ContactInfoInputs=({isInline,children,dataCy="contact-info-input",className})=>{if(!isInline)return react.createElement("div",{className,"data-cy":dataCy},children);const renderableChildren=react.Children.toArray(children);return react.createElement("div",{className:(0,clsx.A)(className,{"dpl-input__flex":isInline}),"data-cy":dataCy},renderableChildren.map(((child,i)=>{const childClassName=(0,clsx.A)("patron__input--desktop",{"mr-16":i{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement(TextInput.A,{className,id:"phone-input",required:isRequired,type:"tel",pattern:"\\+?[0-9]{6,15}",title:t("patronPagePhoneInputMessageText"),onChange:newPhoneNumber=>changePatron(newPhoneNumber,"phoneNumber"),value:null==patron?void 0:patron.phoneNumber,label:t("patronContactPhoneLabelText")}),showCheckboxes&&react.createElement(Checkbox.A,{className:"mt-8 mb-16",onChecked:newReceiveSms=>changePatron(newReceiveSms,"receiveSms"),id:"phone-messages",selected:null==patron?void 0:patron.receiveSms,disabled:!1,label:t("patronContactPhoneCheckboxText")}))},contact_info_section_ContactInfoPhone=ContactInfoPhone;try{ContactInfoPhone.displayName="ContactInfoPhone",ContactInfoPhone.__docgenInfo={description:"",displayName:"ContactInfoPhone",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"]={docgenInfo:ContactInfoPhone.__docgenInfo,name:"ContactInfoPhone",path:"src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoEmail=({className="",patron,changePatron,showCheckboxes,isRequired=!1})=>{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement(TextInput.A,{className,id:"email-address-input",type:"email",required:isRequired,onChange:newEmail=>changePatron(newEmail,"emailAddress"),value:null==patron?void 0:patron.emailAddress,label:t("patronContactEmailLabelText")}),showCheckboxes&&react.createElement(Checkbox.A,{className:"mt-8 mb-16",onChecked:newReceiveEmail=>changePatron(newReceiveEmail,"receiveEmail"),id:"email-messages",selected:null==patron?void 0:patron.receiveEmail,disabled:!1,label:t("patronContactEmailCheckboxText")}))},contact_info_section_ContactInfoEmail=ContactInfoEmail;try{ContactInfoEmail.displayName="ContactInfoEmail",ContactInfoEmail.__docgenInfo={description:"",displayName:"ContactInfoEmail",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"]={docgenInfo:ContactInfoEmail.__docgenInfo,name:"ContactInfoEmail",path:"src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoSection=({patron,inLine=!1,isDouble=!1,changePatron,showCheckboxes,requiredFields=[]})=>{const inputsClass=(0,clsx.A)("dpl-input",[{input__desktop:inLine},{"dpl-input--double":isDouble}]),textNotificationsEnabledConfig="1"===(0,utils_config.UK)()("textNotificationsEnabledConfig");return react.createElement("section",{"data-cy":"patron-page-contact-info",className:"create-patron-page__row"},react.createElement(contact_info_section_ContactInfoInputs,{isInline:inLine},react.createElement(contact_info_section_ContactInfoPhone,{className:inputsClass,changePatron,patron,isRequired:requiredFields.includes("phone"),showCheckboxes:showCheckboxes&&textNotificationsEnabledConfig}),react.createElement(contact_info_section_ContactInfoEmail,{className:(0,clsx.A)(inputsClass,{"mt-32":!textNotificationsEnabledConfig&&!inLine}),changePatron,patron,isRequired:requiredFields.includes("email"),showCheckboxes})))},contact_info_section_ContactInfoSection=ContactInfoSection;try{ContactInfoSection.displayName="ContactInfoSection",ContactInfoSection.__docgenInfo={description:"",displayName:"ContactInfoSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},inLine:{defaultValue:{value:"false"},description:"",name:"inLine",required:!1,type:{name:"boolean | undefined"}},isDouble:{defaultValue:{value:"false"},description:"",name:"isDouble",required:!1,type:{name:"boolean | undefined"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},requiredFields:{defaultValue:{value:"[]"},description:"",name:"requiredFields",required:!1,type:{name:'("email" | "phone")[] | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"]={docgenInfo:ContactInfoSection.__docgenInfo,name:"ContactInfoSection",path:"src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/cover/cover.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,item:()=>item});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components / Cover",component:_cover__WEBPACK_IMPORTED_MODULE_1__.Y,argTypes:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__.A,..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_4__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_5__.A,size:{name:"Image size",control:{type:"radio"}},tint:{name:"Background color tint",control:{type:"radio"}},animate:{name:"Use animation",control:{type:"boolean"}},id:{name:"PID",control:{type:"text"}},url:{name:"URL",control:{type:"string"}},alt:{name:"Alt text",control:{type:"text"}}},args:{id:"870970-basis:45234401",size:"small",animate:!0,tint:"120",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__.Lu)()),alt:"alt text for the image"}},WrappedCover=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.nU)(_cover__WEBPACK_IMPORTED_MODULE_1__.Y),item=(args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedCover,args)).bind({});item.args={}},"./src/components/cover/cover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>Cover});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class CoverServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","CoverServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},libraryToken=(0,token.gf)(token._L),headers={...libraryToken?{Authorization:`Bearer ${libraryToken}`}:{},...additionalHeaders},body=data?JSON.stringify(data):null,serviceUrl=(({baseUrl,url,params})=>`${baseUrl}${url}?${new URLSearchParams(params)}`)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.cover),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new CoverServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof CoverServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.A(message,serviceUrl)}return null},getGetCoverCollectionQueryOptions=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/api/v2/covers",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher({url:"/api/v2/covers",method:"GET",params,signal}))(params,signal),...queryOptions}};var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const cover_image=({src,altText,animate,setImageLoaded,shadow})=>react.createElement("img",{onLoad:setImageLoaded,className:(0,clsx.A)("cover__img",{"cover__img--animate":animate},{"cover__img--shadow-small":"small"===shadow,"cover__img--shadow-medium":"medium"===shadow}),src,alt:altText||""});try{coverimage.displayName="coverimage",coverimage.__docgenInfo={description:"",displayName:"coverimage",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}},altText:{defaultValue:null,description:"",name:"altText",required:!1,type:{name:"string | undefined"}},animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},setImageLoaded:{defaultValue:null,description:"",name:"setImageLoaded",required:!0,type:{name:"() => void"}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"medium"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover-image.tsx#coverimage"]={docgenInfo:coverimage.__docgenInfo,name:"coverimage",path:"src/components/cover/cover-image.tsx#coverimage"})}catch(__react_docgen_typescript_loader_error){}var first=__webpack_require__("./node_modules/lodash/first.js"),first_default=__webpack_require__.n(first);const getUrl=(cover,size)=>{var _cover$imageUrls,_cover$imageUrls$size;return null===(_cover$imageUrls=cover.imageUrls)||void 0===_cover$imageUrls||null===(_cover$imageUrls$size=_cover$imageUrls[size])||void 0===_cover$imageUrls$size?void 0:_cover$imageUrls$size.url},getCoverUrl=({coverData,bestRepresentation,size})=>{if(!coverData)return null;const covers=(({coverData,size})=>coverData?coverData.filter((cover=>getUrl(cover,size))):[])({coverData,size}),firstCover=first_default()(covers);if(!bestRepresentation&&firstCover&&getUrl(firstCover,size))return getUrl(firstCover,size);const bestRepresentationCover=first_default()(covers.filter((cover=>bestRepresentation&&cover.id===bestRepresentation.pid)));return bestRepresentationCover&&getUrl(bestRepresentationCover,size)?getUrl(bestRepresentationCover,size):firstCover&&getUrl(firstCover,size)?getUrl(firstCover,size):null};const Cover=({url,alt,size,displaySize,animate,tint,ids,bestRepresentation,idType="pid",shadow,linkAriaLabelledBy})=>{const[imageLoaded,setImageLoaded]=(0,react.useState)(null),handleSetImageLoaded=(0,react.useCallback)((()=>{setImageLoaded(!0)}),[]);let dataSize=size;"xsmall"===dataSize?dataSize="small":"xlarge"===dataSize&&(dataSize="large");const{data}=((params,options)=>{const queryOptions=getGetCoverCollectionQueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query})({type:idType,identifiers:ids,sizes:[dataSize]}),coverSrc=getCoverUrl({coverData:data,bestRepresentation,size:dataSize}),coverDisplaySize=displaySize||size,classes={wrapper:(0,clsx.A)("cover",`cover--size-${coverDisplaySize}`,`cover--aspect-${coverDisplaySize}`,imageLoaded||{default:"bg-identity-tint-120",120:"bg-identity-tint-120",100:"bg-identity-tint-100",80:"bg-identity-tint-80",40:"bg-identity-tint-40",20:"bg-identity-tint-20"}[tint||"default"])};return url?react.createElement(LinkNoStyle.A,{className:classes.wrapper,url,ariaLabelledBy:linkAriaLabelledBy,isHiddenFromScreenReaders:!alt},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:alt,animate,shadow})):react.createElement("div",{className:classes.wrapper},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:alt,animate,shadow}))};try{Cover.displayName="Cover",Cover.__docgenInfo={description:"",displayName:"Cover",props:{animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'}]}},displaySize:{defaultValue:null,description:"",name:"displaySize",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'},{value:'"2xsmall"'}]}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},ids:{defaultValue:null,description:"",name:"ids",required:!0,type:{name:"string[]"}},bestRepresentation:{defaultValue:null,description:"",name:"bestRepresentation",required:!1,type:{name:"Manifestation | undefined"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},idType:{defaultValue:{value:"pid"},description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"faust"'},{value:'"pid"'},{value:'"isbn"'},{value:'"issn"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"medium"'}]}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover.tsx#Cover"]={docgenInfo:Cover.__docgenInfo,name:"Cover",path:"src/components/cover/cover.tsx#Cover"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/empty-list/empty-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({emptyListText,dataCy="empty-list",classNames=""})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":dataCy,className:`dpl-list-empty ${classNames}`},emptyListText);try{emptylist.displayName="emptylist",emptylist.__docgenInfo={description:"",displayName:"emptylist",props:{emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}},dataCy:{defaultValue:{value:"empty-list"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:{value:""},description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/empty-list/empty-list.tsx#emptylist"]={docgenInfo:emptylist.__docgenInfo,name:"emptylist",path:"src/components/empty-list/empty-list.tsx#emptylist"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/error-boundary-alert/ErrorBoundaryAlert.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ErrorBoundaryAlert:()=>ErrorBoundaryAlert,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_ErrorBoundaryAlertBody__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/config.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;ereact__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedErrorBoundaryAlertBody,_extends({},args,{resetErrorBoundary:()=>{alert("Close button clicked!")}}))},"./src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>error_boundary_alert_ErrorBoundaryAlertBody});var react=__webpack_require__("./node_modules/react/index.js"),CloseLarge=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/CloseLarge.svg"),CloseLarge_default=__webpack_require__.n(CloseLarge),utils_text=__webpack_require__("./src/core/utils/text.tsx");const icon_warning=()=>react.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},react.createElement("ellipse",{cx:"20",cy:"19.9822",rx:"20",ry:"19.9822",fill:"#D22D43"}),react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.0463 24.75C20.4263 24.75 20.7404 24.4678 20.7901 24.1018L20.7969 24V11C20.7969 10.5858 20.4608 10.25 20.0463 10.25C19.6662 10.25 19.3521 10.5322 19.3024 10.8982L19.2956 11V24C19.2956 24.4142 19.6317 24.75 20.0463 24.75ZM20.0463 29.75C20.8754 29.75 21.5476 29.0784 21.5476 28.25C21.5476 27.4216 20.8754 26.75 20.0463 26.75C19.2171 26.75 18.5449 27.4216 18.5449 28.25C18.5449 29.0784 19.2171 29.75 20.0463 29.75Z",fill:"#F6F5F0"})),ErrorBoundaryAlertBody=({message,resetErrorBoundary,showCloseButton})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"error-message"},react.createElement("div",{className:"error-message__icon"},react.createElement(icon_warning,null)),react.createElement("div",{className:"error-message__description"},message),showCloseButton&&react.createElement("button",{type:"button",className:"error-message__btn-close","aria-label":t("errorBoundaryAlertBodyButtonAriaText"),onClick:resetErrorBoundary},react.createElement("img",{src:CloseLarge_default(),alt:t("errorBoundaryAlertBodyButtonAriaText")})))},error_boundary_alert_ErrorBoundaryAlertBody=ErrorBoundaryAlertBody;try{ErrorBoundaryAlertBody.displayName="ErrorBoundaryAlertBody",ErrorBoundaryAlertBody.__docgenInfo={description:"A simple alert that serves as the foundation of all alerts.",displayName:"ErrorBoundaryAlertBody",props:{message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"string"}},resetErrorBoundary:{defaultValue:null,description:"",name:"resetErrorBoundary",required:!0,type:{name:"() => void"}},showCloseButton:{defaultValue:null,description:"",name:"showCloseButton",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx#ErrorBoundaryAlertBody"]={docgenInfo:ErrorBoundaryAlertBody.__docgenInfo,name:"ErrorBoundaryAlertBody",path:"src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx#ErrorBoundaryAlertBody"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Periodical:()=>Periodical,default:()=>FindOnShelfModal_dev});var react=__webpack_require__("./node_modules/react/index.js"),material_dev=__webpack_require__("./src/apps/material/material.dev.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx"),FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const mockedManifestationData=[{pid:"870970-basis:52557240",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:graphql.dn.Fiction},materialTypes:[{materialTypeSpecific:{display:"bog"}}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763844116"}],contributors:[{display:"Ulla Lauridsen",roles:[{function:{singular:"oversætter"}}]}],edition:{summary:"1. udgave, 3. oplag (2018)",publicationYear:{display:"2016"}},audience:{generalAudience:[],ages:[]},notes:[],physicalDescriptions:[{numberOfPages:null,summary:""}],accessTypes:[{code:graphql.cs.Physical}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}},{pid:"870970-basis:52643414",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre (mp3)"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:"FICTION"},materialTypes:[{materialTypeSpecific:{display:"lydbog (cd-mp3)"}}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763850636"}],contributors:[{display:"Maria Stokholm",roles:[{function:{singular:"indlæser"}}]},{display:"Ulla Lauridsen",roles:[{function:{singular:"oversætter"}}]}],edition:{summary:"1. lydbogsudgave",publicationYear:{display:"2016"}},audience:{generalAudience:[],ages:[]},notes:[{display:["Gengivelse af bogen","Indlæst efter 1. udgave. 2016. ISBN: 9788763844116"]}],physicalDescriptions:[{numberOfPages:null,summary:""}],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:{postfix:"Postfix, 24",shelfmark:"60.7"},catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}];var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const[storySelectedPeriodical,setStorySelectedPeriodical]=(0,react.useState)({volume:"",volumeYear:"2022",displayText:"2022, nr. 29",volumeNumber:"29",itemNumber:"5313131426"});args.selectedPeriodical=storySelectedPeriodical,args.setSelectedPeriodical=setStorySelectedPeriodical;const{manifestations:[{pid}]}=args;return react.createElement(react.Fragment,null,react.createElement(WrappedMaterialButtonsFindOnShelf,_extends({},args,{size:"small",faustIds:[(0,general.G_)(pid)]})),react.createElement(WrappedFindOnShelfModal,args))},Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={manifestations:[{pid:"870970-basis:06373674",genreAndForm:[],source:["Bibliotekskatalog"],titles:{main:["Alt for damerne"],original:[]},fictionNonfiction:{display:"FAGLITTERATUR",code:"NONFICTION"},materialTypes:[{materialTypeSpecific:{display:"tidsskrift"}}],creators:[],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"0002-6506"}],contributors:[],edition:{summary:"",publicationYear:{display:"1946"}},audience:{generalAudience:[],ages:[]},notes:[{display:["[Nr. 1, 1946]-"]},{display:["Ugentlig"]},{display:["Tidligere udgivet: Kbh. : Gutenberghus Bladene","Hertil findes tillæg","Hertil findes årligt tillæg med titel: Skønhed"]}],physicalDescriptions:[],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"DigitalArticleService",issn:"00026506"},{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}]}},"./src/components/find-on-shelf/FindOnShelfModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>find_on_shelf_FindOnShelfModal,f:()=>FindOnShelfModal_findOnShelfModalId});var react=__webpack_require__("./node_modules/react/index.js"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx"),partition=__webpack_require__("./node_modules/lodash/partition.js"),partition_default=__webpack_require__.n(partition),helper=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./src/apps/material/helper.ts")),utils_text=__webpack_require__("./src/core/utils/text.tsx"),disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const FindOnShelfManifestationListItem=({shelfmark,department,location,sublocation,title,publicationYear,numberAvailable})=>{const t=(0,utils_text.F)(),locationArray=[department,location,sublocation,shelfmark?`${shelfmark.shelfmark} ${shelfmark.postfix}`:void 0].filter((el=>el));return react.createElement("li",{className:"find-on-shelf__row text-body-medium-regular",role:"row"},react.createElement("span",{className:"find-on-shelf__material-text",role:"cell"},title,publicationYear&&` (${publicationYear})`),react.createElement("span",{role:"cell"},locationArray.length?locationArray.join(" · "):t("findOnShelfModalNoLocationSpecifiedText")),react.createElement("span",{className:"find-on-shelf__item-count-text",role:"cell"},numberAvailable))},find_on_shelf_FindOnShelfManifestationListItem=FindOnShelfManifestationListItem;try{FindOnShelfManifestationListItem.displayName="FindOnShelfManifestationListItem",FindOnShelfManifestationListItem.__docgenInfo={description:"",displayName:"FindOnShelfManifestationListItem",props:{shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:'{ __typename?: "Shelfmark" | undefined; postfix?: string | null | undefined; shelfmark: string; } | null | undefined'}},department:{defaultValue:null,description:"",name:"department",required:!0,type:{name:"string | undefined"}},location:{defaultValue:null,description:"",name:"location",required:!0,type:{name:"string | undefined"}},sublocation:{defaultValue:null,description:"",name:"sublocation",required:!0,type:{name:"string | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},publicationYear:{defaultValue:null,description:"",name:"publicationYear",required:!0,type:{name:"string | null"}},numberAvailable:{defaultValue:null,description:"",name:"numberAvailable",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"]={docgenInfo:FindOnShelfManifestationListItem.__docgenInfo,name:"FindOnShelfManifestationListItem",path:"src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfManifestationList=({libraryBranchHoldings})=>{const t=(0,utils_text.F)();return react.createElement("ul",{className:"find-on-shelf",role:"table","aria-label":t("findOnShelfTableDescriptionText",{placeholders:{"@work":libraryBranchHoldings[0].manifestation.titles.main[0],"@branch":libraryBranchHoldings[0].holding.branch.title}})},react.createElement("li",{className:"find-on-shelf__header-row text-small-caption",role:"row"},react.createElement("span",{className:"find-on-shelf__material-header",role:"columnheader"},t("findOnShelfModalListMaterialText")),react.createElement("span",{role:"columnheader"},t("findOnShelfModalListFindOnShelfText")),react.createElement("span",{className:"find-on-shelf__item-count-header capitalize-first",role:"columnheader"},t("findOnShelfModalListItemCountText"))),libraryBranchHoldings.map((branchHolding=>{var _branchHolding$holdin,_branchHolding$holdin2,_branchHolding$holdin3;return react.createElement(find_on_shelf_FindOnShelfManifestationListItem,{shelfmark:branchHolding.manifestation.shelfmark,department:null===(_branchHolding$holdin=branchHolding.holding.department)||void 0===_branchHolding$holdin?void 0:_branchHolding$holdin.title,location:null===(_branchHolding$holdin2=branchHolding.holding.location)||void 0===_branchHolding$holdin2?void 0:_branchHolding$holdin2.title,sublocation:null===(_branchHolding$holdin3=branchHolding.holding.sublocation)||void 0===_branchHolding$holdin3?void 0:_branchHolding$holdin3.title,title:branchHolding.manifestation.titles.main.join(", "),publicationYear:(0,general.Ey)(branchHolding.manifestation),numberAvailable:(0,helper.Uc)(branchHolding.holding.materials),key:branchHolding.holding.branch.branchId})})))},find_on_shelf_FindOnShelfManifestationList=FindOnShelfManifestationList;try{FindOnShelfManifestationList.displayName="FindOnShelfManifestationList",FindOnShelfManifestationList.__docgenInfo={description:"",displayName:"FindOnShelfManifestationList",props:{libraryBranchHoldings:{defaultValue:null,description:"",name:"libraryBranchHoldings",required:!0,type:{name:"ManifestationHoldings"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"]={docgenInfo:FindOnShelfManifestationList.__docgenInfo,name:"FindOnShelfManifestationList",path:"src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"})}catch(__react_docgen_typescript_loader_error){}var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const find_on_shelf_FindOnShelfPeriodicalDropdowns=({manifestationsHoldings,setSelectedPeriodical,selectedPeriodical})=>{const t=(0,utils_text.F)(),periodicalEditionsBase=(0,periodical_helper.Qp)(manifestationsHoldings[0].holdings),groupedPeriodicalEditionsBase=(0,general.kj)(periodicalEditionsBase,"volumeYear"),periodicalEditions=(0,periodical_helper.LM)(groupedPeriodicalEditionsBase),sortedPeriodicalYears=Object.keys(periodicalEditions).sort(),[selectedYear,setSelectedYear]=(0,react.useState)(selectedPeriodical.volumeYear);return react.createElement("div",{className:"modal-find-on-shelf__periodical-dropdowns"},react.createElement(Dropdown.A,{classNames:"dropdown--grey-borders",options:sortedPeriodicalYears.map((volumeYear=>({label:volumeYear,value:volumeYear}))),arrowIcon:"chevron",defaultValue:selectedYear,handleOnChange:event=>{(0,periodical_helper.yF)(event.target.value,setSelectedYear,setSelectedPeriodical,periodicalEditions,groupedPeriodicalEditionsBase)},ariaLabel:t("findOnShelfModalPeriodicalYearDropdownText")}),selectedYear&&react.createElement(Dropdown.A,{classNames:"dropdown--grey-borders",options:periodicalEditions[selectedYear].map((periodicalEdition=>({label:periodicalEdition,value:periodicalEdition}))),arrowIcon:"chevron",defaultValue:selectedPeriodical.volumeNumber,handleOnChange:event=>{(0,periodical_helper.HO)(groupedPeriodicalEditionsBase,selectedYear,event.target.value,setSelectedPeriodical)},ariaLabel:t("findOnShelfModalPeriodicalEditionDropdownText")}))};try{FindOnShelfPeriodicalDropdowns.displayName="FindOnShelfPeriodicalDropdowns",FindOnShelfPeriodicalDropdowns.__docgenInfo={description:"",displayName:"FindOnShelfPeriodicalDropdowns",props:{manifestationsHoldings:{defaultValue:null,description:"",name:"manifestationsHoldings",required:!0,type:{name:"HoldingsForBibliographicalRecordV3[]"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"]={docgenInfo:FindOnShelfPeriodicalDropdowns.__docgenInfo,name:"FindOnShelfPeriodicalDropdowns",path:"src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"})}catch(__react_docgen_typescript_loader_error){}var utils_config=__webpack_require__("./src/core/utils/config.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const findOnShelfModalId=faustIds=>constructModalId("find-on-shelf-modal",faustIds.sort()),FindOnShelfModalBody=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const config=(0,utils_config.UK)(),t=(0,utils_text.F)(),faustIdArray=(0,general.e$)(manifestations).map((manifestationPid=>(0,general.G_)(manifestationPid))),{data,isLoading}=(0,helper.us)({faustIds:faustIdArray,useAvailabilityBlacklist:!0,config}),author=(0,general.sP)((0,general.UV)(authors),t),title=workTitles.join(", "),isPeriodical=manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>"tidsskrift"===materialType.materialTypeSpecific.display))));if(!data||data.length<1)return null;const pairedManifestationsWithBranches=data.map(((holdingsPerManifestation,index)=>holdingsPerManifestation.holdings.map((holding=>({manifestation:manifestations[index],holding}))))).flat(),allBranches=data.map((item=>item.holdings.map((holding=>holding.branch.branchId)))).flat();let finalData=Array.from(new Set(allBranches)).map((branch=>pairedManifestationsWithBranches.filter((manifestationWithBranch=>manifestationWithBranch.holding.branch.branchId===branch))));function orderManifestationHoldingsAlphabetically(a,b){return a[0].holding.branch.title.localeCompare(b[0].holding.branch.title,"da-DK")}selectedPeriodical&&(finalData=finalData.map((branchManifestationHoldings=>branchManifestationHoldings.map((manifestationHoldings=>({...manifestationHoldings,holding:{...manifestationHoldings.holding,materials:manifestationHoldings.holding.materials.filter((material=>{var _material$periodical;return(null===(_material$periodical=material.periodical)||void 0===_material$periodical?void 0:_material$periodical.volumeNumber)===selectedPeriodical.volumeNumber&&material.periodical.volumeYear===selectedPeriodical.volumeYear}))}}))).filter((manifestationHoldings=>null!==manifestationHoldings)))));const[availableManifestationHoldings,unavailableManifestationHoldings]=partition_default()(finalData,helper.XX),finalDataToShow=availableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b))).concat(unavailableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b)))).sort((manifestationHolding=>manifestationHolding[0].holding.branch.branchId.endsWith("00")?-1:1)).filter((libraryBranch=>!config("blacklistedAvailabilityBranchesConfig",{transformer:"stringToArray"}).includes(libraryBranch[0].holding.branch.branchId)));return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h2 modal-find-on-shelf__headline"},title,author&&` / ${author}`),isPeriodical&&selectedPeriodical&&react.createElement(find_on_shelf_FindOnShelfPeriodicalDropdowns,{manifestationsHoldings:data,setSelectedPeriodical,selectedPeriodical}),isLoading&&react.createElement("p",{className:"text-body-large ml-16 mt-96"},t("loadingText")),!isLoading&&react.createElement(react.Fragment,null,react.createElement("div",{className:"text-small-caption modal-find-on-shelf__caption"},`${(0,helper.CL)(finalDataToShow)} ${t("librariesHaveTheMaterialText")}`),finalDataToShow.map((libraryBranch=>react.createElement(disclosure.A,{key:libraryBranch[0].holding.branch.branchId,open:1===finalData.length,className:"disclosure--full-width",dataCy:"find-on-shelf-modal-body-disclosure",summary:react.createElement(DisclosureSummary.A,{title:libraryBranch[0].holding.branch.title,isAvailable:(0,helper.XX)(libraryBranch)})},react.createElement(find_on_shelf_FindOnShelfManifestationList,{libraryBranchHoldings:libraryBranch}))))))},find_on_shelf_FindOnShelfModalBody=FindOnShelfModalBody;try{findOnShelfModalId.displayName="findOnShelfModalId",findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"]={docgenInfo:findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModalBody.displayName="FindOnShelfModalBody",FindOnShelfModalBody.__docgenInfo={description:"",displayName:"FindOnShelfModalBody",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"]={docgenInfo:FindOnShelfModalBody.__docgenInfo,name:"FindOnShelfModalBody",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfModal_findOnShelfModalId=faustIds=>(0,modal_helpers.Q0)("find-on-shelf-modal",faustIds.sort()),FindOnShelfModal=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const t=(0,utils_text.F)(),faustIds=(0,general.bn)(manifestations),modalId=`${FindOnShelfModal_findOnShelfModalId(faustIds)}`;return react.createElement(modal.A,{modalId,screenReaderModalDescriptionText:t("findOnShelfModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("findOnShelfModalCloseModalAriaLabelText"),classNames:"modal-details modal-find-on-shelf"},react.createElement(find_on_shelf_FindOnShelfModalBody,{manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical}))},find_on_shelf_FindOnShelfModal=FindOnShelfModal;try{FindOnShelfModal_findOnShelfModalId.displayName="findOnShelfModalId",FindOnShelfModal_findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"]={docgenInfo:FindOnShelfModal_findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModal.displayName="FindOnShelfModal",FindOnShelfModal.__docgenInfo={description:"",displayName:"FindOnShelfModal",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"]={docgenInfo:FindOnShelfModal.__docgenInfo,name:"FindOnShelfModal",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/guarded-app.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/date.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/user.ts");const __WEBPACK_DEFAULT_EXPORT__=({app,children})=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),{request:persistedRequest}=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)((state=>state.guardedRequests)),isApplicationBlocked=persistedRequest&&!(0,_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__.ok)(),didAuthenticate=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.d6)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.l0);return console.debug("PERSISTED REQUEST:",persistedRequest),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{persistedRequest&&(console.debug("HAS REQUEST EXPIRED?",(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.d2)(persistedRequest)),console.debug("CURRENT TIMESTAMP",(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__.Ay)()),console.debug("EXPIRE TIMESTAMP",persistedRequest.expire),(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.d2)(persistedRequest)&&dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.ss)()))}),[dispatch,persistedRequest]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(!isApplicationBlocked)return;const{app:persistedRequestApp}=persistedRequest;didAuthenticate&&app===persistedRequestApp&&(dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.Cp)(persistedRequest)),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.MR)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.l0),dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.ss)()))}),[app,didAuthenticate,dispatch,isApplicationBlocked,persistedRequest]),isApplicationBlocked?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,children)};try{guardedapp.displayName="guardedapp",guardedapp.__docgenInfo={description:"",displayName:"guardedapp",props:{app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'},{value:'"recommended-material"'},{value:'"recommendation"'},{value:'"material-grid-automatic"'},{value:'"material-grid-manual"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/guarded-app.tsx#guardedapp"]={docgenInfo:guardedapp.__docgenInfo,name:"guardedapp",path:"src/components/guarded-app.tsx#guardedapp"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/hello/hello.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{HelloAnimal:()=>HelloAnimal,HelloHuman:()=>HelloHuman,HelloWorld:()=>HelloWorld,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_hello__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/hello/hello.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const WrappedHello=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.i)(_hello__WEBPACK_IMPORTED_MODULE_1__.F),__WEBPACK_DEFAULT_EXPORT__={title:"Components/Hello",component:WrappedHello,argTypes:{..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_3__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_4__.A,whatText:{defaultValue:"world",control:{type:"text"}},shouldBeEmphasized:{defaultValue:!0}}},Template=props=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedHello,props),HelloWorld=Template.bind({}),HelloHuman=Template.bind({});HelloWorld.args={whatText:"human"};const HelloAnimal=Template.bind({});HelloWorld.args={whatText:"animal"}},"./src/components/hello/hello.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>Hello});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const Hello=({shouldBeEmphasized})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,"Hello"," ",shouldBeEmphasized?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",null,t("whatText")):t("whatText"),"!")};try{Hello.displayName="Hello",Hello.__docgenInfo={description:"",displayName:"Hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#Hello"]={docgenInfo:Hello.__docgenInfo,name:"Hello",path:"src/components/hello/hello.tsx#Hello"})}catch(__react_docgen_typescript_loader_error){}try{hello.displayName="hello",hello.__docgenInfo={description:"",displayName:"hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#hello"]={docgenInfo:hello.__docgenInfo,name:"hello",path:"src/components/hello/hello.tsx#hello"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/horizontal-term-line/HorizontalTermLine.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>horizontal_term_line_HorizontalTermLine});var react=__webpack_require__("./node_modules/react/index.js"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),utils_text=__webpack_require__("./src/core/utils/text.tsx");const ButtonExpand=({showMore,setShowMore})=>{const t=(0,utils_text.F)();return react.createElement("button",{className:"button-expand",type:"button",onClick:()=>setShowMore(!showMore),"aria-label":t("expandMoreText")},react.createElement("img",{className:(0,clsx.A)("button-expand__image",{"button-expand__image--expanded":showMore}),src:ExpandMore_default(),alt:""}))},button_expand_ButtonExpand=ButtonExpand;try{ButtonExpand.displayName="ButtonExpand",ButtonExpand.__docgenInfo={description:"",displayName:"ButtonExpand",props:{showMore:{defaultValue:null,description:"",name:"showMore",required:!0,type:{name:"boolean"}},setShowMore:{defaultValue:null,description:"",name:"setShowMore",required:!0,type:{name:"(showMore: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-expand/ButtonExpand.tsx#ButtonExpand"]={docgenInfo:ButtonExpand.__docgenInfo,name:"ButtonExpand",path:"src/components/button-expand/ButtonExpand.tsx#ButtonExpand"})}catch(__react_docgen_typescript_loader_error){}const HorizontalTermLine=({title,subTitle,linkList,dataCy="horizontal-term-line"})=>{const[showMore,setShowMore]=(0,react.useState)(!1),itemsToShow=showMore?linkList:linkList.slice(0,3),showMoreButton=linkList.length>3;return 0===linkList.length?null:react.createElement("div",{"data-cy":dataCy,className:"text-small-caption horizontal-term-line"},react.createElement("h3",{className:"text-label-bold"},title||""," ",subTitle&&react.createElement("span",{className:"text-small-caption"},` ${subTitle}`)),itemsToShow.map((item=>{const{term,url}=item;return react.createElement("span",{key:term},react.createElement(Link.A,{href:url,className:"link-tag",stopPropagation:!0},term))})),showMoreButton&&react.createElement(button_expand_ButtonExpand,{showMore,setShowMore}))},horizontal_term_line_HorizontalTermLine=HorizontalTermLine;try{HorizontalTermLine.displayName="HorizontalTermLine",HorizontalTermLine.__docgenInfo={description:"",displayName:"HorizontalTermLine",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string | undefined"}},linkList:{defaultValue:null,description:"",name:"linkList",required:!0,type:{name:"{ url: URL; term: string; }[]"}},dataCy:{defaultValue:{value:"horizontal-term-line"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"]={docgenInfo:HorizontalTermLine.__docgenInfo,name:"HorizontalTermLine",path:"src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/list-details/list-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({icon,title,labels,showSelect,setShowSelect,idForLabelledBy,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__icon"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5",id:idForLabelledBy},title),"string"==typeof labels&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},labels),"string"!=typeof labels&&labels.map((label=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{key:label,className:"text-small-caption"},label)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__dropdown"},children)),null!==showSelect&&!showSelect&&setShowSelect&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",className:"link-tag",onClick:()=>setShowSelect(!0)},t("reservationDetailsChangeText")))};try{listdetails.displayName="listdetails",listdetails.__docgenInfo={description:"",displayName:"listdetails",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},labels:{defaultValue:null,description:"",name:"labels",required:!0,type:{name:"string | string[]"}},showSelect:{defaultValue:null,description:"",name:"showSelect",required:!1,type:{name:"boolean | undefined"}},setShowSelect:{defaultValue:null,description:"",name:"setShowSelect",required:!1,type:{name:"((show: boolean) => void) | undefined"}},idForLabelledBy:{defaultValue:null,description:"",name:"idForLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-details/list-details.tsx#listdetails"]={docgenInfo:listdetails.__docgenInfo,name:"listdetails",path:"src/components/list-details/list-details.tsx#listdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/MaterialDetailsList.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{w:()=>ListItemType,A:()=>material_MaterialDetailsList});var react=__webpack_require__("./node_modules/react/index.js");const description_list=({data,classNames,id})=>react.createElement("dl",{id,className:`list-description ${classNames??""}`,"data-cy":"list-description"},data.map((item=>{const{label,value}=item;return react.createElement("div",{className:"list-description__item"},react.createElement("dt",{className:"list-description__key"},label),react.createElement("dd",{className:"list-description__value"},value))})));try{descriptionlist.displayName="descriptionlist",descriptionlist.__docgenInfo={description:"",displayName:"descriptionlist",props:{classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"{ label: string; value: ReactNode; }[]"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/description-list/description-list.tsx#descriptionlist"]={docgenInfo:descriptionlist.__docgenInfo,name:"descriptionlist",path:"src/components/description-list/description-list.tsx#descriptionlist"})}catch(__react_docgen_typescript_loader_error){}let ListItemType=function(ListItemType){return ListItemType.Standard="standard",ListItemType.Link="link",ListItemType.List="list",ListItemType}({});const ListItem=({value})=>0===value.length?null:react.createElement("ul",{className:"list-description__value--list"},value.map((item=>react.createElement("li",{key:item},item)))),MaterialDetailsListRow=({type,value})=>{switch(type){case ListItemType.Link:return react.createElement("span",{className:"link-tag pr-4"},value);case ListItemType.List:return Array.isArray(value)?react.createElement(ListItem,{value}):null;default:return react.createElement("span",null,value)}},MaterialDetailsList=({data,className,id})=>{const listData=data.filter((item=>item.value)).map((item=>{const{label,value,type}=item;return{label,value:react.createElement(MaterialDetailsListRow,{type,value})}}));return react.createElement(description_list,{id,data:listData,classNames:className})},material_MaterialDetailsList=MaterialDetailsList;try{MaterialDetailsList.displayName="MaterialDetailsList",MaterialDetailsList.__docgenInfo={description:"",displayName:"MaterialDetailsList",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"ListData"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"]={docgenInfo:MaterialDetailsList.__docgenInfo,name:"MaterialDetailsList",path:"src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const MaterialButtonLoading=({size,classNames})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.$,{label:t("loadingText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",classNames:classNames||""})},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonLoading;try{MaterialButtonLoading.displayName="MaterialButtonLoading",MaterialButtonLoading.__docgenInfo={description:"",displayName:"MaterialButtonLoading",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"]={docgenInfo:MaterialButtonLoading.__docgenInfo,name:"MaterialButtonLoading",path:"src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BG:()=>isArticle,D7:()=>hasCorrectAccessType,S5:()=>hasCorrectMaterialType,ft:()=>hasCorrectAccess});var _core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/types/material-type.ts");const hasCorrectAccess=(desiredAccess,manifestations)=>manifestations.some((manifestation=>manifestation.access.some((({__typename})=>__typename.toLowerCase()===desiredAccess.toLowerCase())))),hasCorrectAccessType=(desiredAccessType,manifestations)=>manifestations.some((manifestation=>manifestation.accessTypes.some((type=>type.code===desiredAccessType)))),hasCorrectMaterialType=(desiredMaterialType,manifestations)=>manifestations.some((manifestation=>manifestation.materialTypes.some((type=>type.materialTypeSpecific.display.toLowerCase()===desiredMaterialType.toLowerCase())))),isArticle=manifestations=>((desiredPartialMaterialType,manifestations)=>manifestations.some((manifestation=>manifestation.materialTypes.some((type=>type.materialTypeSpecific.display.toLowerCase().includes(desiredPartialMaterialType.toLowerCase()))))))(_core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__.sN.article,manifestations)},"./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/Button.tsx"),_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const MaterialButtonsFindOnShelf=({size,faustIds,dataCy="material-buttons-find-on-shelf"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)(),{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.X)(),modalId=(0,_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__.f)(faustIds),onClick=()=>{open(modalId)};return"small"!==size?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__.$,{label:t("findOnBookshelfText"),buttonType:"none",variant:"outline",disabled:!1,collapsible:!1,size:"large",onClick,dataCy}):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"link-tag text-small-caption material-manifestation-item__find capitalize-all btn-ui","aria-describedby":t("findOnShelfExpandButtonExplanationText"),onClick,onKeyUp:e=>{"Enter"===e.key&&onClick()},tabIndex:0,type:"button","data-cy":dataCy},t("findOnBookshelfText"))},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonsFindOnShelf;try{MaterialButtonsFindOnShelf.displayName="MaterialButtonsFindOnShelf",MaterialButtonsFindOnShelf.__docgenInfo={description:"",displayName:"MaterialButtonsFindOnShelf",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},dataCy:{defaultValue:{value:"material-buttons-find-on-shelf"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"]={docgenInfo:MaterialButtonsFindOnShelf.__docgenInfo,name:"MaterialButtonsFindOnShelf",path:"src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/periodical/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HO:()=>handleSelectEdition,LM:()=>filterAndSortPeriodicalEditions,Qp:()=>makePeriodicalEditionsFromHoldings,Vf:()=>getLatestEditionFromYear,yF:()=>handleSelectYear});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/mapValues.js"),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__);const getLatestEditionFromYear=(year,groupList)=>groupList[year][groupList[year].length-1];function makePeriodicalEditionsFromHoldings(holdings){return holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat()}function filterAndSortPeriodicalEditions(baseData){const yearVolumes=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(baseData,(editions=>editions.map((edition=>edition.volumeNumber)))),yearVolumesSorted=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumes,(volumes=>volumes.filter((volume=>!!volume)).sort(((a,b)=>a.localeCompare(b,"da-DK",{numeric:!0})))));return lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumesSorted,(volumes=>lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(volumes)))}function handleSelectEdition(groupList,year,editionToMatch,selectPeriodicalHandler){const changedFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===editionToMatch));changedFullPeriodicalEdition&&selectPeriodicalHandler(changedFullPeriodicalEdition)}function handleSelectYear(year,setYear,selectPeriodicalHandler,periodicalEditions,groupList){setYear(year);handleSelectEdition(groupList,year,getLatestEditionFromYear(year,periodicalEditions),selectPeriodicalHandler)}},"./src/components/message/modal-message/ModalMessage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ModalMessageExample:()=>ModalMessageExample,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.X)();return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{open("modal-message")}),[open]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.A,{modalId:"modal-message",closeModalAriaLabelText:"close",screenReaderModalDescriptionText:"modal message story",classNames:"modal-cta modal-padding"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,_extends({},props,{ctaButton:{modalId:"modal-message",text:"Man"}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",null,"Hello, I am some extra info")))}).bind({})},"./src/components/message/modal-message/ModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>modal_message_ModalMessage});var react=__webpack_require__("./node_modules/react/index.js"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react);try{withFocusTrap.displayName="withFocusTrap",withFocusTrap.__docgenInfo={description:"",displayName:"withFocusTrap",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withFocusTrap.tsx#withFocusTrap"]={docgenInfo:withFocusTrap.__docgenInfo,name:"withFocusTrap",path:"src/core/utils/withFocusTrap.tsx#withFocusTrap"})}catch(__react_docgen_typescript_loader_error){}const Message=({children,title,subTitle})=>react.createElement(react.Fragment,null,react.createElement("h2",{"data-cy":"message-title",className:"text-header-h2"},title),react.createElement("div",{className:"color-secondary-gray text-body-medium-regular mt-48"},react.createElement("p",{"data-cy":"message-subtitle"},subTitle)),children&&react.createElement("div",null,children)),modal_message_Message=Message;try{Message.displayName="Message",Message.__docgenInfo={description:"",displayName:"Message",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/Message.tsx#Message"]={docgenInfo:Message.__docgenInfo,name:"Message",path:"src/components/message/modal-message/Message.tsx#Message"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const ModalMessage=react.forwardRef((props=>{const{close,closeAll}=(0,modal.X)(),{ctaButton,...messageProps}=props;return react.createElement("div",{className:"modal-cta__container"},react.createElement(modal_message_Message,messageProps),react.createElement("div",{className:"modal-cta__buttons mt-48"},ctaButton&&react.createElement(Button.$,{dataCy:ctaButton.dataCy??"modal-cta-button",classNames:"modal-message__confirm-button",label:ctaButton.text,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{ctaButton.callback&&ctaButton.callback(),ctaButton.modalId&&close(ctaButton.modalId),ctaButton.closeAllModals&&closeAll()}})))})),modal_message_ModalMessage=(Component=ModalMessage,({withFocusTrap,...props})=>react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement(Component,props)));var Component;try{ModalMessage.displayName="ModalMessage",ModalMessage.__docgenInfo={description:"",displayName:"ModalMessage",props:{ctaButton:{defaultValue:null,description:"",name:"ctaButton",required:!1,type:{name:"({ text: string; callback?: (() => void) | undefined; dataCy?: string | undefined; } & (RequiredModalId | RequireCloseAllModals)) | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}},withFocusTrap:{defaultValue:null,description:"",name:"withFocusTrap",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/ModalMessage.tsx#ModalMessage"]={docgenInfo:ModalMessage.__docgenInfo,name:"ModalMessage",path:"src/components/message/modal-message/ModalMessage.tsx#ModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/modal-details-header/modal-details-header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({authors,year,title,pid,description,materialType,isbnForCover,periodical,series,children})=>{const coverIds=[pid||isbnForCover];return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__cover"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"material material--large bg-identity-tint-120 material__animate"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_1__.Y,{ids:coverIds,idType:pid?"pid":"isbn",size:"large",animate:!1,alt:description||""})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__tags"},materialType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType),children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-details__title text-header-h2"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular","data-cy":"modal-authors"},authors,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")")),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"modal-series",className:"text-body-medium-regular"},series)))};try{modaldetailsheader.displayName="modaldetailsheader",modaldetailsheader.__docgenInfo={description:"",displayName:"modaldetailsheader",props:{authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:"string | null | undefined"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string | null | undefined"}},pid:{defaultValue:null,description:"",name:"pid",required:!1,type:{name:"`${number}-${string}:${string}` | null | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string | null | undefined"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string | null | undefined"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},series:{defaultValue:null,description:"",name:"series",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"]={docgenInfo:modaldetailsheader.__docgenInfo,name:"modaldetailsheader",path:"src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/multiselect/Multiselect.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,MultipleSelected:()=>MultipleSelected,SingleSelected:()=>SingleSelected,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Multiselect__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/multiselect/Multiselect.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/url.tsx");const WrappedMultiselect=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.i)((0,_core_utils_url__WEBPACK_IMPORTED_MODULE_5__.nU)(_Multiselect__WEBPACK_IMPORTED_MODULE_1__.A)),options=[{item:"alertErrorMessageText",value:"1"},{item:"availabilityAvailableText",value:"2"},{item:"availabilityUnavailableText",value:"3"}],__WEBPACK_DEFAULT_EXPORT__={title:"Components / Multiselect",component:WrappedMultiselect,argTypes:{..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_2__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_3__.A,caption:{name:"Caption",control:{type:"text"}},updateExternalState:{table:{disable:!0}}},args:{caption:"Title",options}},Template=args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedMultiselect,args),Default=Template.bind({}),SingleSelected=Template.bind({});SingleSelected.args={defaultValue:options.slice(0,1)};const MultipleSelected=Template.bind({});MultipleSelected.args={defaultValue:options.slice(0,2)}},"./src/components/multiselect/Multiselect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>multiselect_Multiselect});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx");const multiselect_useMultiselectOptions=function useMultiselectOptions(options,allOption){return{allOptions:[allOption,...options]}};var utils_text=__webpack_require__("./src/core/utils/text.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const id=(0,react.useId)(),t=(0,utils_text.F)(),ref=(0,react.useRef)(null),[isDropdownOpen,setIsDropdownOpen]=(0,react.useState)(!1),updateState=(updateKey,value)=>{updateExternalState&&updateKey&&updateExternalState.externalUpdateFunction({key:updateKey,value})},{allOptions}=multiselect_useMultiselectOptions(options,{item:"multiselectAllOptionText",value:"all"}),initialSelectedOptions=defaultValue.length>0?defaultValue:allOptions.slice(0,1),{getDropdownProps,setSelectedItems,selectedItems}=(0,downshift_esm.mH)({initialSelectedItems:initialSelectedOptions});(0,useClickAway.A)(ref,(()=>{setIsDropdownOpen(!1)})),(0,useDeepCompareEffect.A)((()=>{setSelectedItems(initialSelectedOptions)}),[setSelectedItems,initialSelectedOptions]);const{getToggleButtonProps,getMenuProps,highlightedIndex,getItemProps}=((isDropdownOpen,allOptions,selectedItems,setSelectedItems,handleSelectedItems)=>(0,downshift_esm.WM)({isOpen:isDropdownOpen,selectedItem:null,items:allOptions,stateReducer:(state,actionAndChanges)=>{const{changes,type}=actionAndChanges;switch(type){case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownEnter:case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownSpaceButton:case downshift_esm.WM.stateChangeTypes.ItemClick:return{...changes,isOpen:!0}}return changes},onStateChange:({type,selectedItem:newSelectedItem})=>{switch(type){case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownSpaceButton:case downshift_esm.WM.stateChangeTypes.ItemClick:case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownEnter:if(newSelectedItem&&!selectedItems.find((item=>item.value===newSelectedItem.value)))return void setSelectedItems(handleSelectedItems(selectedItems,newSelectedItem,allOptions.length));if(newSelectedItem&&selectedItems.find((item=>item.value===newSelectedItem.value))){if(1===selectedItems.length)return;const newSelectedItems=selectedItems.filter((item=>item.value!==newSelectedItem.value));setSelectedItems(handleSelectedItems(newSelectedItems,null,allOptions.length))}}}}))(isDropdownOpen,allOptions,selectedItems,setSelectedItems,((allCurrentlySelected,newSelected,allPossibleOptions)=>newSelected?allCurrentlySelected.find((item=>"all"===item.value))&&"all"!==newSelected.value?((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>{const newValue=[...selectedItems.filter((item=>"all"!==item.value)),newSelected];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(allCurrentlySelected,newSelected,updateState,updateExternalState,setSelectedItems):"all"!==newSelected.value&&[...allCurrentlySelected,newSelected].length===allPossibleOptions-1?((updateState,updateExternalState,setSelectedItems)=>{const newValue=[{item:"multiselectAllOptionText",value:"all"}];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(updateState,updateExternalState,setSelectedItems):"all"===newSelected.value?(updateState(null==updateExternalState?void 0:updateExternalState.key,[newSelected]),setSelectedItems([newSelected]),[newSelected]):((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,[...selectedItems,newSelected]),setSelectedItems([...selectedItems,newSelected]),[...selectedItems,newSelected]))(selectedItems,newSelected,updateState,updateExternalState,setSelectedItems):((newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,newSelected),setSelectedItems(newSelected),newSelected))(allCurrentlySelected,updateState,updateExternalState,setSelectedItems)));return react.createElement(react.Fragment,null,caption&&react.createElement("div",{className:"multiselect__caption"},caption),react.createElement("div",{className:"multiselect",ref,"data-cy":dataCy},react.createElement("button",_extends({type:"button",className:"multiselect focus-styling"},getToggleButtonProps(getDropdownProps({preventKeyAction:isDropdownOpen})),{onClick:()=>{setIsDropdownOpen(!isDropdownOpen)},onKeyUp:e=>{"Enter"===e.key&&setIsDropdownOpen(!isDropdownOpen)}}),react.createElement("div",{className:"multiselect__selected"},selectedItems.map(((singularitem,index)=>(index>0?", ":"")+t(singularitem.item)))),react.createElement("div",{className:"multiselect__opener"},react.createElement("img",{className:(0,clsx.A)("multiselect__icon",{"dropdown__arrow--bottom":isDropdownOpen}),src:ExpandMore_default(),alt:""}))),react.createElement("ul",_extends({className:"multiselect__options"},getMenuProps(),{style:isDropdownOpen?{}:{display:"none"}}),allOptions.map(((item,index)=>{const downshiftProps={...getItemProps({item,index})};return react.createElement("li",_extends({className:(0,clsx.A)("multiselect__option",{"multiselect__option--highlighted":highlightedIndex===index}),key:`${item.value}${item.item}`},getItemProps({item,index}),{role:"option","aria-selected":!!selectedItems.find((selected=>selected.value===item.value))}),react.createElement("span",{id:`multiselect-label-${downshiftProps.id}`},t(item.item)),react.createElement("div",{className:"checkbox multiselect__checkbox"},react.createElement(Checkbox.A,{id:`${id}-${index.toString()}`,selected:!!selectedItems.find((selected=>selected.value===item.value)),isVisualOnly:!0,labelledBy:`multiselect-label-${downshiftProps.id}`})))})))))},multiselect_Multiselect=Multiselect;try{Multiselect.displayName="Multiselect",Multiselect.__docgenInfo={description:"",displayName:"Multiselect",props:{dataCy:{defaultValue:{value:"multiselect"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},caption:{defaultValue:null,description:"",name:"caption",required:!1,type:{name:"string | undefined"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"MultiselectOption[]"}},defaultValue:{defaultValue:{value:"[]"},description:"",name:"defaultValue",required:!1,type:{name:"MultiselectOption[] | undefined"}},updateExternalState:{defaultValue:null,description:"",name:"updateExternalState",required:!1,type:{name:"MultiselectExternalUpdate | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/multiselect/Multiselect.tsx#Multiselect"]={docgenInfo:Multiselect.__docgenInfo,name:"Multiselect",path:"src/components/multiselect/Multiselect.tsx#Multiselect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/promo-bar/PromoBar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>promo_bar_PromoBar});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),icon_info=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-info.svg"),icon_info_default=__webpack_require__.n(icon_info);const PromoBarIcon=({type})=>"info"===type?react.createElement("img",{src:icon_info_default(),alt:"",className:"ml-4"}):null;try{PromoBarIcon.displayName="PromoBarIcon",PromoBarIcon.__docgenInfo={description:"",displayName:"PromoBarIcon",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:'"info"'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"]={docgenInfo:PromoBarIcon.__docgenInfo,name:"PromoBarIcon",path:"src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"})}catch(__react_docgen_typescript_loader_error){}const PromoBar=({text,classNames,type,sticky,theme})=>react.createElement("section",{className:(0,clsx.A)("promo-bar",classNames,{"promo-bar--sticky":sticky,"promo-bar--dark":"dark"===theme})},type&&react.createElement(PromoBarIcon,{type}),react.createElement("p",{className:"text-small-caption"},text)),promo_bar_PromoBar=PromoBar;try{PromoBar.displayName="PromoBar",PromoBar.__docgenInfo={description:"",displayName:"PromoBar",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"info"'}]}},sticky:{defaultValue:null,description:"",name:"sticky",required:!1,type:{name:"boolean | undefined"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"dark"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBar.tsx#PromoBar"]={docgenInfo:PromoBar.__docgenInfo,name:"PromoBar",path:"src/components/promo-bar/PromoBar.tsx#PromoBar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/renewal/RenewalModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/renewal.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const RenewalModalMessage=({messageType,renewingResponse,modalId,setRenewingStatus,texts:{successTitleText,successStatusText,noRenewalsPossibleErrorTitleText,noRenewalsPossibleErrorStatusText,errorTitleText,errorStatusText,buttonText}})=>{const succeededRenewalCount=renewingResponse?(0,_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__.TO)(renewingResponse).length:0,showSuccessMessage="success"===messageType&&succeededRenewalCount>0,showNoRenewalsPossibleErrorMessage="success"===messageType&&0===succeededRenewalCount,showErrorMessage="error"===messageType;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,showSuccessMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,{title:successTitleText,subTitle:successStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showNoRenewalsPossibleErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,{title:noRenewalsPossibleErrorTitleText,subTitle:noRenewalsPossibleErrorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,{title:errorTitleText,subTitle:errorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}))},__WEBPACK_DEFAULT_EXPORT__=RenewalModalMessage;try{RenewalModalMessage.displayName="RenewalModalMessage",RenewalModalMessage.__docgenInfo={description:"",displayName:"RenewalModalMessage",props:{messageType:{defaultValue:null,description:"",name:"messageType",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'}]}},renewingResponse:{defaultValue:null,description:"",name:"renewingResponse",required:!0,type:{name:"RenewedLoanV2[] | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},texts:{defaultValue:null,description:"",name:"texts",required:!0,type:{name:"{ successTitleText: string; successStatusText: string; noRenewalsPossibleErrorTitleText: string; noRenewalsPossibleErrorStatusText: string; errorTitleText: string; errorStatusText: string; buttonText: string; }"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"]={docgenInfo:RenewalModalMessage.__docgenInfo,name:"RenewalModalMessage",path:"src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/ReservationFormListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const ReservationFormListItem=({icon,title,text,subText,changeHandler,buttonAriaLabel,isPossibleToChangeReservationDetails=!0})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-modal-list-item","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":"reservation-modal-list-item-text",className:"reservation-modal-list-item-text"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},(null==text?void 0:text.length)>0?text:t("missingDataText")),subText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},subText)),changeHandler&&isPossibleToChangeReservationDetails&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:changeHandler,type:"button",className:"link-tag text-small-caption cursor-pointer","aria-label":buttonAriaLabel},t("shiftText")))},__WEBPACK_DEFAULT_EXPORT__=ReservationFormListItem;try{ReservationFormListItem.displayName="ReservationFormListItem",ReservationFormListItem.__docgenInfo={description:"",displayName:"ReservationFormListItem",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},subText:{defaultValue:null,description:"",name:"subText",required:!1,type:{name:"string | undefined"}},changeHandler:{defaultValue:null,description:"",name:"changeHandler",required:!1,type:{name:"(() => void) | undefined"}},buttonAriaLabel:{defaultValue:null,description:"",name:"buttonAriaLabel",required:!1,type:{name:"string | undefined"}},isPossibleToChangeReservationDetails:{defaultValue:{value:"true"},description:"",name:"isPossibleToChangeReservationDetails",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"]={docgenInfo:ReservationFormListItem.__docgenInfo,name:"ReservationFormListItem",path:"src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ModalReservationFormSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/reservation/forms/helper.ts"),_ReservationForm__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx"),_helper__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/reservation/helper.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const ModalReservationFormSelect=({type,header,items,defaultSelectedItem,selectHandler,ariaLabel,saveCallback,reservationStatus,setReservationStatus})=>{const{close}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.X)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),[selectedItem,setSelectedItem]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSelectedItem),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,_helper__WEBPACK_IMPORTED_MODULE_4__.zW)(type),screenReaderModalDescriptionText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.He)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.He)(type,"closeModalAriaLabelText"))}))(type,t);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.A,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText,eventCallbacks:{close:()=>{setReservationStatus&&setReservationStatus("idle")}},classNames:(0,clsx__WEBPACK_IMPORTED_MODULE_8__.A)([{"modal-cta modal-padding":"success"===reservationStatus||"error"===reservationStatus}])},"success"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.A,{title:t("reservationSuccessTitleText"),subTitle:t("reservationSuccessSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),"error"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.A,{title:t("reservationerrorTitleText"),subTitle:t("reservationerrorSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),(!reservationStatus||"idle"===reservationStatus||"pending"===reservationStatus)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ReservationForm__WEBPACK_IMPORTED_MODULE_5__.A,{title:header.title,description:header.description,onSubmit:()=>{selectHandler(selectedItem),saveCallback?saveCallback(selectedItem):close((0,_helper__WEBPACK_IMPORTED_MODULE_4__.zW)(type))},buttonLabel:"pending"===reservationStatus?t("loadingText"):void 0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__.A,{options:items.map((({label,value})=>({label,value}))),ariaLabel,arrowIcon:"chevron",handleOnChange:event=>{const{value}=event.target,typedValue=(0,_helper__WEBPACK_IMPORTED_MODULE_4__.Tb)(type)?Number(value):value;setSelectedItem(typedValue)},defaultValue:selectedItem,placeholder:{label:t("chooseOneText"),disabled:!0,value:""},cyData:"modal-reservation-form-select"})))},__WEBPACK_DEFAULT_EXPORT__=ModalReservationFormSelect;try{ModalReservationFormSelect.displayName="ModalReservationFormSelect",ModalReservationFormSelect.__docgenInfo={description:"",displayName:"ModalReservationFormSelect",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},items:{defaultValue:null,description:"",name:"items",required:!0,type:{name:"{ label: string; value: TValue; }[]"}},defaultSelectedItem:{defaultValue:null,description:"",name:"defaultSelectedItem",required:!0,type:{name:"FormSelectValue"}},selectHandler:{defaultValue:null,description:"",name:"selectHandler",required:!0,type:{name:"(value: TSelectValue) => void"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"((value: TSaveValue) => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"idle"'},{value:'"pending"'},{value:'"success"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"]={docgenInfo:ModalReservationFormSelect.__docgenInfo,name:"ModalReservationFormSelect",path:"src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/NoInterestAfterModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx");const NoInterestAfterModal=({selectedInterest,setSelectedInterest,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)(),interstPeriods=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.UK)()("interestPeriodsConfig",{transformer:"jsonParse"});return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.A,{type:"interestPeriod",header:{title:t("modalReservationFormNoInterestAfterHeaderTitleText"),description:[t("modalReservationFormNoInterestAfterHeaderDescriptionText")]},items:interstPeriods.interestPeriods,defaultSelectedItem:selectedInterest,selectHandler:value=>{setSelectedInterest(Number(value))},ariaLabel:t("modalReservationFormNoInterestAfterLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=NoInterestAfterModal;try{NoInterestAfterModal.displayName="NoInterestAfterModal",NoInterestAfterModal.__docgenInfo={description:"",displayName:"NoInterestAfterModal",props:{selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"((value: TValue) => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"idle"'},{value:'"pending"'},{value:'"success"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"]={docgenInfo:NoInterestAfterModal.__docgenInfo,name:"NoInterestAfterModal",path:"src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/PickupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx");const PickupModal=({branches,defaultBranch,selectBranchHandler,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)(),formatBranches=branches.map((branch=>({value:branch.branchId,label:branch.title})));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.A,{type:"pickup",header:{title:t("modalReservationFormPickupHeaderTitleText"),description:[t("modalReservationFormPickupHeaderDescriptionText")]},items:formatBranches,defaultSelectedItem:defaultBranch,selectHandler:value=>{selectBranchHandler(String(value))},ariaLabel:t("modalReservationFormPickupLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=PickupModal;try{PickupModal.displayName="PickupModal",PickupModal.__docgenInfo={description:"",displayName:"PickupModal",props:{branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},defaultBranch:{defaultValue:null,description:"",name:"defaultBranch",required:!0,type:{name:"string"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"((value: TValue) => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"idle"'},{value:'"pending"'},{value:'"success"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/PickupModal.tsx#PickupModal"]={docgenInfo:PickupModal.__docgenInfo,name:"PickupModal",path:"src/components/reservation/forms/PickupModal.tsx#PickupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ReservationForm.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const ReservationForm=({title,description,children,onSubmit,buttonLabel,disabledButton,cyData="reservation-form"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("section",{className:"reservation-modal reservation-form"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__content"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h3 mb-35","data-cy":`${cyData}-title`},title),description.map((paragraph=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-large","data-cy":`${cyData}-description`},paragraph)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("form",null,children&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__body mt-35"},children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__footer mt-48"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.$,{label:buttonLabel||t("saveButtonText"),buttonType:"none",disabled:disabledButton??!1,collapsible:!1,size:"xlarge",variant:"filled",onClick:onSubmit,dataCy:`${cyData}-button`})))))},__WEBPACK_DEFAULT_EXPORT__=ReservationForm;try{ReservationForm.displayName="ReservationForm",ReservationForm.__docgenInfo={description:"",displayName:"ReservationForm",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string[]"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"() => void"}},buttonLabel:{defaultValue:null,description:"",name:"buttonLabel",required:!1,type:{name:"string | undefined"}},disabledButton:{defaultValue:null,description:"",name:"disabledButton",required:!1,type:{name:"boolean | undefined"}},cyData:{defaultValue:{value:"reservation-form"},description:"",name:"cyData",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ReservationForm.tsx#ReservationForm"]={docgenInfo:ReservationForm.__docgenInfo,name:"ReservationForm",path:"src/components/reservation/forms/ReservationForm.tsx#ReservationForm"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L8:()=>saveText,Tb:()=>modalReservationFormSelectTypeIsInterestPeriod,zW:()=>modalReservationFormId});const modalReservationFormId=type=>`modal-reservation-form-${type}`,saveText=({type,changedText,savedText,patron,savePatron})=>{const textDiffers=changedText!==savedText,updatedPatronData=(({type,value,patron:{preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber}})=>{const defaultData={preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber};switch(type){case"email":return{...defaultData,emailAddress:value,receiveEmail:!0};case"sms":return{...defaultData,phoneNumber:value,receiveSms:!0};default:return null}})({type,value:changedText,patron});if(!updatedPatronData)throw new Error("Cannot construct updated patron data");textDiffers&&savePatron(updatedPatronData)};function modalReservationFormSelectTypeIsInterestPeriod(type){return"interestPeriod"===type}},"./src/components/reservation/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B6:()=>getInputType,C4:()=>getPreferredBranch,CF:()=>getAuthorLine,En:()=>getNoInterestAfter,He:()=>getReservationModalTypeTranslation,QW:()=>getInstantLoanBranchHoldings,Qr:()=>isConfigValueOne,ZI:()=>getFutureDateString,c8:()=>getFutureDateStringISO,hn:()=>getManifestationsToReserve,kd:()=>removePrefixFromBranchId,mR:()=>getInstantLoanBranchHoldingsAboveThreshold,pS:()=>translateOpenOrderStatus,wT:()=>constructReservationData});__webpack_require__("./node_modules/core-js/modules/esnext.map.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find-key.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.includes.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.key-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-keys.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-values.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.merge.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.update.js");var dayjs__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_13__),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const isConfigValueOne=configValue=>"1"===configValue,getPreferredBranch=(id,array)=>{const locationItem=array.find((item=>item.branchId===id));return locationItem?locationItem.title:id},getNoInterestAfter=(days,interestPeriod,t)=>{const interestPeriodFound=interestPeriod.interestPeriods.find((period=>period.value.toString()===days.toString()));return interestPeriodFound?interestPeriodFound.label:`${days} ${t("daysText")}`},getFutureDateString=num=>dayjs__WEBPACK_IMPORTED_MODULE_13___default()().add(num,"day").format("YYYY-MM-DD"),getFutureDateStringISO=num=>dayjs__WEBPACK_IMPORTED_MODULE_13___default()().add(num,"day").format("YYYY-MM-DDTHH:mm:ssZ"),constructReservations=({manifestations,pickupBranch,expiryDate,periodical})=>manifestations.map((manifestation=>(({manifestation:{pid},pickupBranch,expiryDate,periodical})=>({recordId:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.G_)(pid),...pickupBranch?{pickupBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical}:{}}))({manifestation,pickupBranch,expiryDate,periodical}))),constructReservationData=({manifestations,selectedBranch,expiryDate,periodical})=>({reservations:constructReservations({manifestations,...selectedBranch?{pickupBranch:selectedBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical:{volumeNumber:periodical.volumeNumber,volumeYear:periodical.volumeYear}}:{}}),...manifestations.length>1?{type:"parallel"}:{}}),getAuthorLine=(manifestation,t)=>{const{creators}=manifestation,publicationYear=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.Ey)(manifestation),author=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.sP)((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.UV)(creators),t)||null;let year="";return publicationYear&&(year=publicationYear),(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.G)(manifestation)&&(year=`(${t("materialHeaderAllEditionsText")})`),author?[t("materialHeaderAuthorByText"),author,year].join(" "):null},getManifestationsToReserve=(reservableManifestations,isPeriodical)=>isPeriodical?reservableManifestations:!reservableManifestations||reservableManifestations.length<1?[]:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.G)(reservableManifestations[0])?reservableManifestations:[(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.yr)(reservableManifestations)],getReservationModalTypeTranslation=(name,type)=>{const isCloseModal="closeModalAriaLabelText"===type;switch(name){case"sms":return isCloseModal?"closeModalAriaLabelSmsText":"screenReaderModalDescriptionSmsText";case"email":return isCloseModal?"closeModalAriaLabelEmailText":"screenReaderModalDescriptionEmailText";case"interestPeriod":return isCloseModal?"closeModalAriaLabelInterestPeriodText":"screenReaderModalDescriptionInterestPeriodText";case"pickup":return isCloseModal?"closeModalAriaLabelPickupText":"screenReaderModalDescriptionPickupText";default:return(0,_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__.A)(name)}},getInstantLoanBranchHoldings=(branchHoldings,whitelist,instantLoanStrings)=>{const whitelistBranchIds=whitelist.map((({branchId})=>branchId));return(branchHoldings=>{const processedBranches=new Map;return branchHoldings.forEach((({branch,materials})=>{const{branchId}=branch,storedBranch=processedBranches.get(branchId);storedBranch?processedBranches.set(branchId,{branch,materials:[...materials,...storedBranch.materials]}):processedBranches.set(branchId,{branch,materials})})),[...processedBranches.values()]})(branchHoldings.filter((({branch})=>whitelistBranchIds.includes(branch.branchId)))).map((({branch,materials})=>({branch,materials:materials.filter((({materialGroup,available})=>instantLoanStrings.some((instantLoanString=>instantLoanString===materialGroup.description))&&available))}))).filter((({materials})=>materials.length>0))},getInstantLoanBranchHoldingsAboveThreshold=(instantLoanBranchHoldings,instantLoanThresholdConfig)=>instantLoanBranchHoldings.filter((({materials})=>materials.length>=Number(instantLoanThresholdConfig??0))),removePrefixFromBranchId=branchId=>branchId.split("-")[1],translateOpenOrderStatus=(status,t)=>{const statusTextMap={[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OwnedAccepted]:"openOrderStatusOwnedAcceptedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.AuthenticationError]:"openOrderAuthenticationErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.BorchkUserBlockedByAgency]:"openOrderUserBlockedByAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.BorchkUserNotVerified]:"openOrderUserNotVerifiedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.BorchkUserNoLongerExistOnAgency]:"openOrderUserNoLongerExistOnAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.InvalidOrder]:"openOrderInvalidOrderText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NotOwnedIllLoc]:"openOrderNotOwnedIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NotOwnedNoIllLoc]:"openOrderNotOwnedNoIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NotOwnedWrongIllMediumtype]:"openOrderNotOwnedWrongIllMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NoServicerequester]:"openOrderNoServicerequesterText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OrsError]:"openOrderOrsErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OwnedOwnCatalogue]:"openOrderOwnedOwnCatalogueText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OwnedWrongMediumtype]:"openOrderOwnedWrongMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.ServiceUnavailable]:"openOrderServiceUnavailableText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.UnknownError]:"openOrderUnknownErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.UnknownPickupagency]:"openOrderUnknownPickupagencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.UnknownUser]:"openOrderUnknownUserText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.ErrorMissingPincode]:"openOrderErrorMissingPincodeText"};return statusTextMap[status]?t(statusTextMap[status]):""},getInputType=type=>{switch(type){case"email":return"email";case"sms":return"tel";default:return"text"}}},"./src/components/result-pager/use-pager.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>use_pager});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx");function ResultPager({setPageHandler,itemsShown,hitcount,isLoading,classNames}){const t=(0,utils_text.F)();return react.createElement("div",{className:`result-pager ${classNames}`},react.createElement("p",{className:"text-small-caption result-pager__title"},t("resultPagerStatusText",{placeholders:{"@itemsShown":itemsShown,"@hitcount":hitcount}})),itemsShown!==hitcount&&react.createElement("button",{disabled:isLoading,type:"button",className:"btn-primary btn-outline btn-medium arrow__hover--right-small uppercase",onClick:setPageHandler},t(isLoading?"loadingText":"showMoreText")))}const result_pager=ResultPager;try{ResultPager.displayName="ResultPager",ResultPager.__docgenInfo={description:"",displayName:"ResultPager",props:{setPageHandler:{defaultValue:null,description:"",name:"setPageHandler",required:!0,type:{name:"() => void"}},itemsShown:{defaultValue:null,description:"",name:"itemsShown",required:!0,type:{name:"number"}},hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!0,type:{name:"string"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/result-pager.tsx#ResultPager"]={docgenInfo:ResultPager.__docgenInfo,name:"ResultPager",path:"src/components/result-pager/result-pager.tsx#ResultPager"})}catch(__react_docgen_typescript_loader_error){}const use_pager=({hitcount,pageSize,overrideItemsShown})=>{const[itemsShown,setItemsShown]=(0,react.useState)(pageSize>=hitcount?hitcount:pageSize),[page,setPage]=(0,react.useState)(0),[firstInNewPage,setFirstInNewPage]=(0,react.useState)(null);(0,react.useEffect)((()=>{setItemsShown(pageSize>hitcount?hitcount:pageSize)}),[hitcount,pageSize]);const pagehandler=()=>{const currentPage=page+1,itemsOnPage=(currentPage+1)*pageSize,onLastPage=itemsOnPage>hitcount;setFirstInNewPage(itemsOnPage-pageSize),setItemsShown(onLastPage?hitcount:itemsOnPage),setPage(currentPage)};return{itemsShown,PagerComponent:({isLoading,classNames=""})=>hitcount?react.createElement(result_pager,{itemsShown:overrideItemsShown?overrideItemsShown():itemsShown,hitcount,classNames,setPageHandler:pagehandler,isLoading}):null,page,firstInNewPage}};try{usepager.displayName="usepager",usepager.__docgenInfo={description:"",displayName:"usepager",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},overrideItemsShown:{defaultValue:null,description:"",name:"overrideItemsShown",required:!1,type:{name:"(() => number) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/use-pager.tsx#usepager"]={docgenInfo:usepager.__docgenInfo,name:"usepager",path:"src/components/result-pager/use-pager.tsx#usepager"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/search-bar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>search_bar_dev});var react=__webpack_require__("./node_modules/react/index.js"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const[q,setQ]=(0,react.useState)(""),{getInputProps}=(0,downshift_esm.Bp)({items:["Item 1","Item 2"],inputValue:q,defaultIsOpen:!1,onInputValueChange:({inputValue})=>{setQ(inputValue)}});return react.createElement("div",{className:"header__menu-second"},react.createElement("form",{action:"https://bibliotek.dk/search",className:"header__menu-search"},react.createElement(search_bar.A,_extends({},storybookArgs,{getInputProps}))))};try{searchbardevinc.displayName="searchbardevinc",searchbardevinc.__docgenInfo={description:"",displayName:"searchbardevinc",props:{storybookArgs:{defaultValue:null,description:"",name:"storybookArgs",required:!0,type:{name:"SearchBarProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"]={docgenInfo:searchbardevinc.__docgenInfo,name:"searchbardevinc",path:"src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const search_bar_dev={title:"Components / Search Bar",component:search_bar.A,argTypes:{...globalTextArgs.A,...globalConfigArgs.A,altText:{name:"Alt text for search button image",defaultValue:"søgeikon",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Søg blandt bibliotekets materialer",control:{type:"text"}}}},Default=args=>react.createElement(search_bar_dev_inc,{storybookArgs:args})},"./src/components/search-bar/search-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__),clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),handleDropdownMenu=()=>{setIsHeaderDropdownOpen((prev=>!prev))};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",_extends({className:"hide-visually"},getLabelProps()),t("searchHeaderInputLabelText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",_extends({required:!0,pattern:".*\\S+.*",title:t("searchNoValidCharactersErrorText"),name:"q",className:"header__menu-search-input text-body-medium-regular","data-cy":dataCy,type:"text",placeholder:t("inputPlaceholderText"),"aria-label":t("inputPlaceholderText"),onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.SE)(redirectUrl)}},getInputProps({onChange:e=>{setQWithoutQuery(e.target.value)}}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:t("searchHeaderIconAltText"),className:"header__menu-search-icon",onClick:()=>{qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.SE)(redirectUrl)},onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.SE)(redirectUrl)}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:t("searchHeaderDropdownText"),className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.A)("header__menu-dropdown-icon",{"header__menu-dropdown-icon--expanded":isHeaderDropdownOpen}),onClick:e=>{e.preventDefault(),e.stopPropagation(),handleDropdownMenu()},onKeyUp:e=>{"Enter"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation(),handleDropdownMenu())},tabIndex:0,"aria-label":t("searchHeaderDropdownText"),"data-cy":"search-header-dropdown-icon","aria-expanded":isHeaderDropdownOpen}))};try{searchbar.displayName="searchbar",searchbar.__docgenInfo={description:"",displayName:"searchbar",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},getInputProps:{defaultValue:null,description:"",name:"getInputProps",required:!0,type:{name:"(options?: (UseComboboxGetInputPropsOptions & Options) | undefined, otherOptions?: GetPropsCommonOptions | undefined) => Overwrite<...>"}},getLabelProps:{defaultValue:null,description:"",name:"getLabelProps",required:!0,type:{name:"(options?: (UseComboboxGetLabelPropsOptions & Options) | undefined) => Overwrite"}},dataCy:{defaultValue:{value:"search-header-input"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},qWithoutQuery:{defaultValue:null,description:"",name:"qWithoutQuery",required:!0,type:{name:"string"}},setQWithoutQuery:{defaultValue:null,description:"",name:"setQWithoutQuery",required:!0,type:{name:"(value: string) => void"}},isHeaderDropdownOpen:{defaultValue:null,description:"",name:"isHeaderDropdownOpen",required:!0,type:{name:"boolean"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"(value: boolean | ((prevState: boolean) => boolean)) => void"}},redirectUrl:{defaultValue:null,description:"",name:"redirectUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.tsx#searchbar"]={docgenInfo:searchbar.__docgenInfo,name:"searchbar",path:"src/components/search-bar/search-bar.tsx#searchbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/story-header.dev.inc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-menu.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross-medium.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__);const __WEBPACK_DEFAULT_EXPORT__=({search,userProfile})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("header",{className:"header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__logo-desktop"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"header__logo-desktop-link",href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"logo",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKEAAAAgCAYAAAB6vRjLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABRSSURBVHgB7VwLeFTVtV5r73POTCYJIQmBJJPwEBABkwBBRIEU6LXWZ20Rbq312U9vvbZWW7X1ai3tbdVWW+3Vttx+1Yp6tYK12l61eG1BRQEhkISHIGgSMpOEVzJhksnMeex91z7DxMwY8uBpSv/vO9+cs85+77XXXo99BoKs5GDXpZW+BMcIa2HizUll09XIS66EE4gGVvozVW+Anfn11Hf1vGRhvF2TH03QAlhSGdTKWgM5c4vgOIPq3lrPzmxYCqeNhFMcmgTITDwgYBocI+yFmF4EWmZ3mgOODicWHtU/h35TX2gguASWKZP7HKX0NoJAOO7AmAnS2gQRBqc4TvkB6A5DeheALqf6W95q6CvtznEXeOAo4Ah+sS6cWQ/DGQE4xaHBP9EFK9t7NaIxrHXEZfdl170UUrRaGO3VtKxbUcrLpJTDAbGGaez/ZF3wa80Z534+v/3dvYH8z8wjuXahw7R3WFt4snSc2SjZs78rsl65oSPrLqbpdXbbwVZwnMuJvqVIVN+rZfuujUrDe5f86GFog9bGvFlzpC0uRUdWyc7OGcSln5cITcC0J/yzsp7FVavsRDt3jhvn8XyUdjNDXARSDkXGXhZDfI1MQpEwxdPFHetqYBDhn0zYDTIUug45Gx8BrvTE0EqYqxnYskIKUaHe0x4tadLHSMv5AiK8vn9kKATbiN4Wni5j1u0M5b+BxExUCdFZFwq0DJGM3+4gxEjVEZQ7jeg+VZZoa7tRAGRFhfkEPbbCvrZpkuHtpA6Y9GzEGwSng2NVBNe0nkNPN7kkKbHRM3WJBOdaeognE+JObOvopHdpVPd7RBpUTHhKbMeaxC+TIfBY90sAXttXvtM9LRdIlBXEU7uNNO9U/70LNGTcNd5o+qdkBbIykjJINICzq1HIkbpgD378AjXg/BEh5DiScF/prU4EeVDTtfP8f/i+BoYxH5F1gC2vaTbKS9T7QFpphbSdKyjlPmboFf6//ZfOvWkXU4OiMEhxSkhC2tZm0s/M7jSU/bA9mF6hBJPweB4c3rG+KnC/eTEI+VlguJ1+J9iRcCmlWtVVpqE97Y9uejrxfCvk58UbIGv9Zta9CB9vqYdtK+Af82Ob3oBFi9TjyoBnyu/Acm6VjllOz5tRMyaCaXokk48XRje+DfPmqXSvBLTSN0DAQhiE6JEJa0fP9Xrq9o+xPcZ8zrBIGpouO6MH0YGNVmb26jGhVSE4CryfOSM307LLEOVZYOi5gvYltM1G0Wm9s7fcWzW9stKCYwiSWs8hir92p6Hk5bS33tJrvpjlSjq9YPiBuubyAohaj9J4POQgjiXT4ozUwZPC2dNjQZq2F82+GdBtl9qakwrFdvVj61wn9wKwSNQr3A2MdSalEzICgxRJ40iToge0su9g4MD1gsEZzLKYq3WQMyEhN/RwS4hW51KaxCV+s3I7DASSFwd46a8hElUKdW68bLurbEZKVUGVWRfQyx6NWvJ/xkHNXjgGIGVs3Shn61PdaUE+mTwk7JZ+5WeC66a1hOZ+h8jTHoL9zm/gJEFwTvwv4R8JyTqhkHNAiIekgEm0JnvWF8kao+3hW2BbbzV4p9wgSXmHfoKG727Kf5NiwJ5TkGyUMIb0pl94GawI6uXT4CQCde5KL7u+6TY1NjrXvuFvqoxQ+7PhZMHQ45KS4ekJkjsHiBNgkCKV0frNUCQ189B0fhs02n7Q/zwwAN+anEJ60NuNWukcOFmwnXfVD3PENMG1O4bHNu6ihTeX9t3PE7mFLILdcIKBHeFXiOH2o+1c2WCUvbAbJt/TyA+8RAvjbBikOHrr2LbvCepTbobjA58j5LKgp/SkrHLNK/5OP3GrU9qPBbSSRlp4K2k1aaDxJfmxDR/BCYYfPthPAuAaWtDNaIsFjLH/FBLPJZVmHwxS9CL5MIQcnyFrrVJoWoy24EIk3xS5H85MTUn+qcV1vokvjo683wT9hGSskibyfx0hdhq0FmgjLnFscSNJmaStjgY3n5TzR+j2AhggkGE9VbRG4zRBZkr9yEnfZGtQitrD5bfQmKw2YypnBTHexZQrQzLYyhEfLzh36KNddjHTguQGXEMVJkVaJkB6BJCvoa1zcw+NW0/qSeb0tAwbyMQQBjaCo9I6QVJiu0B68m5BZTAWZ7Lm0qvSAdo3OPtDc+We1lIBTgZyUSkd9h2aiKsxM82CozIbTzwwwEo+oeVKZCssTX7rtFjNjiQ6OUoD+pTvohA/osfkOLDBf18Urbo+8fhnOO3WaSz94R7qFILhd41c+E3+npqO7i/qfOUFmuU8QpGFRalN4oZ3XkF0/ZtwHEFjsZOiD2NgSNaYROguCOU+P1RG5MKFfM9bbd4RzSsiSCsGThICGdMvR9NeSh6mlf5zhl6mIinbh03ITA953lUCQni9M0ZG1q+HQYRPbseIf8/yaV9NZcD4K5TFdvUDFAW4J/UdRRGuOJBz9hDoCxo+UGxV/zyVARVGRyqbtJzh1xMjrE6tWljmVXAcEeQlb1G0oZgWWlTYVlfbFAO6DVi+3Mnf83rHyWRABY/fswJssZd2pouCq1tWB3nZExkhzwrFgLRr7dybJbbCIEMyEyLakhl3DQlX7u8tkyfb/DWFt7YlZZXg7WyLVkCvtbGd/lj1Pb1NpJpoqXvupDBXkh+M9KB5e/PmZsBxAlnlc+hSesHDxQfXtMCnFHk73gmDV19AC/UDstjPllJcR7/n0JiuAZ1dNL2pctD5C5OYkPwjzVErVN1XpuH7trV3SueVVLqQsrS3fCRpVvRHkvgj69ZKzusguW2j7fCeXDhOoMjuxKgPi4rs6u/Dpxz+SOXGwmfvnkT66VyBcB16+OwP5uRUFMeqdsIgRLKzmrMPxotdsf5k9AwZshNC4SQaBzGm10ycVUE/YiGKUcmp3Ui3E7vaRguG543IhIb34XjAD5u3QzsMGuCiRRQ/gTfdS+0Zq2DQIokJSUb1K7TkZjQ000mhSRWo7wWOFXOgn5Bk0qKV3BzUvANyKTVAyQ3Ez584MEBu+GaStH8qMquXfZx24oWI/A4hxdKRsO1JWV6uB6usx8mMKvaLzfMPJ8GVwRJ8ccfvVboiucUN5Mply3jj1fc/RWG/AqLNhxOIepg0myO5bRBfGCk2/woGAf6xDzAwVO6kualk9wSULf61QSubRobW99ykjI+lRTQXkb3pukg6T0OQO+aRWO79qP/kyYgv7viMRBwJH7MppzpU3nwYoBnzkXfqKEPjNzJbvF8Y3fgMDBCMwyhyb8ylvld1d/V8mnFKHOUSgPcJDUvUZXMsR037gTrfx6S4mfybBSpNTMAyh1vTpbB+C0eLhQstEOYFVN5ZMEB4opYfIrH/cCzrcjhFcGoc5QKxd5S5ZUs30saAVqaOZZ21zwQlLZs8eTmFpC+o7fRdaIHG7vmb8uZMI1fItbRV+1DXtmKMLUm4bnrE8uWMDcubyWNmBpVVmSBXQ2l6to6LKAyojpUZqPH6iCl+Nx5q3CP+ewsqKmJtkUUYjZEgw4nBnHNuV/TCW87/BS5e7Mq15rSzZ5pWdCETIod0+HYSfa8UxSpXIBze4AuWX+yTtS03cVWpV1uW23jIB+o76xIRMz9HDvsM2gpauYHPFUSqunyMTbnnzBASKpgBb9l726eQ034SZqQvxSi2SJ9cCI5sgE6TgkmWOgVu0fvVfqvmaffwb/fxM86abIvYNeRGyhMoO4F7Xh9pVnZ9VHdCmVAzvEOhs5+JbduXQpFWuOWYHNxU34dgXaOhRqpAHxJ2NeEDLbNpO36QXEE/BMWI3SBa21bTsHpQBXBITyWr9Jp9ObNm5+1/J3yYKrhooZi6ZefT/c8VIZRVkt3RAS9Jxz2l7U6StB30crilQZ/ypeJo1Sor1HEhxkw3BCqFPB1C7e7B2F05Oeqkdyygld5lxyL3qe0L3e/GBKfr3wOsVB06+V7q5CvUQ0m2rKpfTm8+62j8/tyWqgYJi1mj/sdHZDT6TTxUlhSCOzG8JcjK7vaL6p/G+x2uUGPiMIqeAQylRasiXe+KaGsdmvxByhgj3cZwP5GjhFTKDUFeerm0q7+Q0KEDaeULhRl9FqXLazaTZDfY5k2U7tnWCfZ1Z27bZp7Q7VhYziX9SXcg7WzSw+T4JCLigWg0ekQBKS7xvCAr+Z66dmsl9/h2Ny+nQS+jAd3a3GlX9lkA4koyZj5nI1xEbibFoKXRtvb7YABo74CbibEqyL+6gyyjS5HxOcD5L2lyssk7+4D6boQk1Z9oLhe7VZK0pnqvVde4lhZru29qITHBD4lO0g/vlhxnU1nXS3Bt+tuC2tSZqXXuzZuUoWnsOcWAVOAz/pEFaoFBs/HKROnAN+h2jyqDc5xFbHQzucEk6Si3NI/43PCkgoT0okEqDIPzMn0Zb3TRJUlzxMcoeDGfJPflkuFOYspL9vjK3YhX69C5Q8k4e4D0Y06G5kPU57mosS9T/+upqq9k7/IsUOlO7HYsxPw9aVPOHdFZ9W5vyUzLvA4lDutOozh25dhw1T7lbBwwiHlosi5St0woKeNa3Q4ZIb+aDn0foLUN/WsqmqPum4ypdY5tb2UgZ8IAQAw/k8KdIHR2W3Fk02uKRhGmzZ2hyMW0TU3nu/T8fKhcF4QzOU3mYvL/NRQ7NUvdzItroDljeoUNtk5W71+K7ZrEAlgb1EonE3N/B9GZRM9rEvUxCh6YLdoT1Nnzadt/mWeLr+Ou12LxjjvnqVGh7fMpv1X9+0NZ1jXwEtWWC5z9zapvf06UZSI+cVp004/ch8Bm8iRMivcJcKN/Ts63Ex9hNelT0x2wl9qmeSE9Ph8JhSYzJkYLZO8VxTbd2SUdjSljaff5iUQ5mx6fO25M6GNaj1KWvDTP12XNqBjd9l6PBwcCetlVtrDv/gSrIf/bkYbMWLrvZRjiW+c+2ALF/tZSGsEF0rF/3Owt/Wt+tKa2t/yjOjY0J5i/3QzvS2NpIB3Zd4iyOyyRpsQb+oc1wSGXcs6BtWHqb5AkzViE3r83EF7PUDJYVBHzKE+X9CYGzI/fsBRHvlxEfcw59PBk9zAp83mHiTaLhBZeSWV9tiuLI1xPgAAnSRJ6pOzxE1iG4kD3rwBty9pNjK12bU+8HFtHdYwEYGzQmLKB6nLTkcT1qYkkF5yb7oiZ0OqIhFK5jFbGLKWDGLQJ2J32FYdxTxRp4eh7tIJ/yrxZSwva33ZPhzRlzJkkOg/eQT34KsgU/yViszdd/2/olxu9p7Z2rBwVXvfL7rSAd+p9aNp3OTbeSI93wQAhQR6BSAbQbZY0Kj3pcb2CoYcZuj+FukciiyQ524kBqexaKtw9JNxQdM6K4sCazkNlxNvOMZPpGk/KRWU5Dkahm0f3cJ6ew9FT+YJqy8CUNlMD1KcQbdBxFEwoHPkeBVrJQpS+jwuW4zWODU5MKJnlO3xuOYwU6QedSOtPg54p+6g3aU4k1LNkoXi2w+HbuS3rDsIxBDoyGLcOnGF9Jl60XI2rOy0+b1aaNE0aaGbCQMDRUiKCVA1vgrQK5/HxmjsHfTIi6bDWod8/FHZs+FqCHoTyYVHopLGOtqVk2ZJelFXR0dz+OBlAX2SN4ceI5uZDS8SXMxP3U1n3JzIEMmfkxsLt6WNh2zE5rEvhBvX5kGLWV4s7NixI0D+E07IAvFmJNh+xYTLqzkto9cnXU+mkcKbTyvP1rxRk0nJGSMc57NbGGD5abH7peTgK0JaQGcqanZ24PvSUnS5s55vqndDY5r7yB1/6yQ3qd8ukSQZZ7VfEC8VPxGn3TTy/4LBtQIgfgN3TesUGisao2zO08ByaoWn0soFlDUtiIlrguersYPNV6vwgTWi4Y8uhvszf7Skfq+6bM84dLrj1gofxDw2edW73/ILhG0N3r25FE2+jXGQR46IGXvZF911Hp3s+gJjxou3DZrl/1aKO0WGkc4uHa9uCvulT4VjAq9XTLhYiPXN+0Cg/Q5F2wrghBs9Y6rZZy7wp3tcjhOu30vQ7aFBq+06MAdoCVJxzIFuPzZl2b8t4i1wPi4/K908McE+4va0ucRm22EK0CRLYtkzvkKf7zC/EowF25gdD3+ebpXDud10aBvuZ+27xYltI6Vrt5s6mHbWHBrsHPAVqQhznWyOqzO0NWLLBkSYp/zKNoi3PjWpb7X47YhkZrcr1QYt5tr1tc529bHPtlmXLjBFWTiUy9g6t8tFoWzVBLF3tRMKbSb/6DLWn2pdlvNNTpYWwqV7omlpEaVTXz3dllA4vdGa8SpraVtIJZ2W2HKwNYsl6LWbVkBWbT0bEq4UzMvpcmP1BYZTqBlBG2FDpmOupz2t83FdDbVZ/HrAfdelGhEhpxLrERVpO40AqKY5t3EUx2C+qDh0uDa2EWsa0y/yzc/6FrL7vkvDrxzF03MINfl6+tfHHyo8ERwimYQQ530MhuRBdne7FNVIhWIDp/GGpa5cOPTT51A/TTatrrmbldkjjLYpGDuEnqSPFxBzkNmL1QtMX+SMb1ybqkRrcC8oXzXgHo7UT7wI7QJGZrk9Ai6yatdJjXEmivYpUldE0CeWUxgSd3d52unVvIt0oc+12bhh307tdlMZBEVe91DfLuse4nNqxFNUfN6GcRcybIxh7ydA9VybUFQ3i/eAa71JfRsY2riAn+28ZY740oX8DFrYKoeP5lP9VmvN0uqaDy6T4a91LrpqEsUFjFR8TI0kVYrpuxen6/uTx1ty6Qde7jsK1TbCvZRyXqL5Sf2aSFCqgNCttzTOrqDPupD8m/z6lnL+++uYbSb+6jFZSOapNWcpqYuy/aLlySXfLTJ1UFrr9VdKPyGfEzyKNr4AmxqH0tZTvTeTaawWxS18/Wul3rCFXriTdbbSG88YctcNcbtigQziXH2lZ6oQ7VDamQXlhlBb5UY0TlcWoLC+V1Xk8D+y6bV6zxguxmIXz5iWdTPl/+jv2xktbiOwAAAAASUVORK5CYII=",alt:"Logo of libary"})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav",{className:"header__menu-first","aria-label":"Primary site navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-mobile"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--small header__menu-navigation-button header__button",id:"header-sidebar-nav__toggle","aria-controls":"sidebarNav","aria-expanded":"false",role:"button",tabIndex:0},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--small"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:"List of bookmarks"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-logo"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"logo-fallback"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-name"},"Lyngby-Taarbæk"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-libraries"},"Bibliotekerne")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__menu-navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Børn & forældre")))),userProfile||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-profile header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default(),alt:"Profile"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Login")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-bookmarked header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default(),alt:"List of bookmarks"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Liked")))),search||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-search"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{name:"q",className:"header__menu-search-input text-body-medium-regular",type:"text",autoComplete:"off",placeholder:"Cannot search in this story"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default(),className:"header__menu-search-icon",alt:"search icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"header__menu-dropdown-icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default(),alt:"expand dropdown icon"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--medium"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--medium"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock-items"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default(),className:"mb-8",alt:"clock icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Fredag"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"28 Maj")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav","data-open":"closed"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav__background-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav__menu-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav__close-menu-button",id:"js-header-sidebar-nav__close-menu-button",tabIndex:0,role:"button","aria-label":"Close menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default(),alt:"Close menu"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav",{"aria-label":"Sidebar site navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__menu-navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Børn & forældre"))))))));try{storyheaderdevinc.displayName="storyheaderdevinc",storyheaderdevinc.__docgenInfo={description:"",displayName:"storyheaderdevinc",props:{search:{defaultValue:null,description:"",name:"search",required:!1,type:{name:"ReactNode"}},userProfile:{defaultValue:null,description:"",name:"userProfile",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"]={docgenInfo:storyheaderdevinc.__docgenInfo,name:"storyheaderdevinc",path:"src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/simple-material/SimpleMaterial.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),react_query__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-query/es/index.js"),_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_cover_cover__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/core/utils/helpers/url.ts"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/url.tsx");const SimpleMaterial=({bright,work:{titles:{full:fullTitle},creators,workId},work,app})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_8__.Ik)()("materialUrl"),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),queryClient=(0,react_query__WEBPACK_IMPORTED_MODULE_2__.useQueryClient)(),materialFullUrl=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_9__.Qj)(materialUrl,workId);let authors=null;const inputContributorsArray=null==creators?void 0:creators.map((({display})=>display));inputContributorsArray&&(authors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_5__.Zc)(!0,inputContributorsArray));const manifestationPid=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_5__.hh)(work),title=fullTitle[0];return react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"simple-material "+(bright?" simple-material--bright":"")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__cover-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_4__.Y,{animate:!0,size:"medium",ids:[manifestationPid]})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__favourite"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__.A,{title,darkBackground:!bright,id:workId,addToListRequest:id=>{dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__.A5)({type:"addFavorite",args:{id,queryClient},app}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__meta"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_7__.A,{href:materialFullUrl,className:"simple-material__title"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__author"},authors)))},__WEBPACK_DEFAULT_EXPORT__=SimpleMaterial;try{SimpleMaterial.displayName="SimpleMaterial",SimpleMaterial.__docgenInfo={description:"",displayName:"SimpleMaterial",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'},{value:'"recommended-material"'},{value:'"recommendation"'},{value:'"material-grid-automatic"'},{value:'"material-grid-manual"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"]={docgenInfo:SimpleMaterial.__docgenInfo,name:"SimpleMaterial",path:"src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/skeletons/TextLineSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextLineSkeleton=({width=40})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-100",style:{width:`${width}px`}}),__WEBPACK_DEFAULT_EXPORT__=TextLineSkeleton;try{TextLineSkeleton.displayName="TextLineSkeleton",TextLineSkeleton.__docgenInfo={description:"",displayName:"TextLineSkeleton",props:{width:{defaultValue:{value:"40"},description:"",name:"width",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"]={docgenInfo:TextLineSkeleton.__docgenInfo,name:"TextLineSkeleton",path:"src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/blockedModal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,ht:()=>setHasBeenVisible});const blockedModalSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"blockedModal",initialState:{data:{hasBeenVisible:!1}},reducers:{setHasBeenVisible(state,action){state.data.hasBeenVisible||action.payload.hasBeenVisible&&(state.data={...state.data,...action.payload})}}}),{setHasBeenVisible}=blockedModalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=blockedModalSlice.reducer},"./src/core/config.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Qw:()=>addConfigEntries});const configSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"config",initialState:{data:{}},reducers:{addConfigEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addConfigEntries}=configSlice.actions,__WEBPACK_DEFAULT_EXPORT__=configSlice.reducer},"./src/core/configuration/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>configuration,FI:()=>getConf,jM:()=>getDeviceConf});var lib=__webpack_require__("./node_modules/react-device-detect/dist/lib.js");const page_size_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":20}}'),page_size_loan_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),page_size_reservation_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),recommender_material_limits_namespaceObject=JSON.parse('{"recommender":4,"inspiration":4,"somethingSimilar":4,"somethingSimilarAuthor":4}'),cover_tints_namespaceObject=JSON.parse('{"coverTints":["100","40","80","120","20"]}'),colors_namespaceObject=JSON.parse('{"default":"#484848","danger":"#d5364a","warning":"#f7bf42","success":"#068802"}');var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json");const getConf=(type,configuration,device)=>{const subConf=configuration[type];return device?subConf[device]:subConf},getDeviceConf=(type,configuration)=>{const device=lib.Fr?"mobile":"desktop";return getConf(type,configuration,device)},configuration={pageSize:page_size_namespaceObject,coverTints:cover_tints_namespaceObject,pageSizeLoanList:page_size_loan_list_namespaceObject,pageSizeReservationList:page_size_reservation_list_namespaceObject,colors:colors_namespaceObject,recommenderMaterialLimits:recommender_material_limits_namespaceObject,modalIds:modal_ids,reservation:JSON.parse('{"defaultInterestDaysForOpenOrder":90}'),payment:JSON.parse('{"paymentChangeDate":"2020-10-27"}')}},"./src/core/dbc-gateway/generated/graphql.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{cs:()=>AccessTypeCode,nm:()=>CopyRequestStatus,SW:()=>FacetField,dn:()=>FictionNonfictionCode,Fl:()=>HoldingsStatus,jh:()=>SubmitOrderStatus,hC:()=>SuggestionType,CY:()=>WorkType,YP:()=>useComplexSearchWithPaginationQuery,D3:()=>useComplexSearchWithPaginationWorkAccessQuery,ET:()=>useGetInfomediaQuery,NM:()=>useGetManifestationViaBestRepresentationByFaustQuery,V3:()=>useGetManifestationViaMaterialByFaustQuery,VL:()=>useGetMaterialGloballyQuery,RR:()=>useGetMaterialQuery,BG:()=>useGetReviewManifestationsQuery,OZ:()=>useGetSmallWorkQuery,vQ:()=>useIntelligentFacetsQuery,Bv:()=>useOpenOrderMutation,Dp:()=>usePlaceCopyMutation,Nr:()=>useRecommendFromFaustQuery,V0:()=>useSearchFacetQuery,KG:()=>useSearchWithPaginationQuery,Yu:()=>useSuggestionsFromQueryStringQuery});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),core_token=__webpack_require__("./src/core/token.js"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class DbcGateWayHttpError extends FetcherCriticalHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","DbcGateWayHttpError")}}var extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts");const queryMap={complexSearchWithPagination:extractServiceBaseUrls.TJ.fbiLocal,complexSearchWithPaginationWorkAccess:extractServiceBaseUrls.TJ.fbiLocal,getMaterial:extractServiceBaseUrls.TJ.fbiLocal,intelligentFacets:extractServiceBaseUrls.TJ.fbiLocal,recommendFromFaust:extractServiceBaseUrls.TJ.fbiLocal,searchFacet:extractServiceBaseUrls.TJ.fbiLocal,searchWithPagination:extractServiceBaseUrls.TJ.fbiLocal,suggestionsFromQueryString:extractServiceBaseUrls.TJ.fbiLocal,getInfomedia:extractServiceBaseUrls.TJ.fbiGlobal,getManifestationViaBestRepresentationByFaust:extractServiceBaseUrls.TJ.fbiGlobal,getManifestationViaMaterialByFaust:extractServiceBaseUrls.TJ.fbiGlobal,getMaterialGlobally:extractServiceBaseUrls.TJ.fbiGlobal,getReviewManifestations:extractServiceBaseUrls.TJ.fbiGlobal,getSmallWork:extractServiceBaseUrls.TJ.fbiGlobal,openOrder:extractServiceBaseUrls.TJ.fbiGlobal,default:extractServiceBaseUrls.TJ.fbi},resolveBaseUrl=query=>query?(0,extractServiceBaseUrls.aW)(queryMap[query]||queryMap.default):(0,extractServiceBaseUrls.aW)(queryMap.default);const fetcher=(query,variables)=>context=>{const url=(context=>{if(!context)return resolveBaseUrl();const{queryKey}=context,[queryName]=queryKey;return resolveBaseUrl(queryName)})(context),token=(0,core_token.gf)(core_token.CI)||(0,core_token.gf)(core_token._L);return fetch(url,{method:"POST",headers:{"Content-Type":"application/json",...token?{Authorization:`Bearer ${token}`}:{}},body:JSON.stringify({query,variables})}).then((async response=>{if(!response.ok)throw new DbcGateWayHttpError(response.status,response.statusText);const json=await response.json();if(json.errors){const{message}=json.errors[0];throw new Error(message)}return json.data})).catch((error=>{if(error instanceof DbcGateWayHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,query)}))};let AccessTypeCode=function(AccessTypeCode){return AccessTypeCode.NotSpecified="NOT_SPECIFIED",AccessTypeCode.Online="ONLINE",AccessTypeCode.Physical="PHYSICAL",AccessTypeCode.Unknown="UNKNOWN",AccessTypeCode}({}),ComplexSearchFacets=function(ComplexSearchFacets){return ComplexSearchFacets.Accesstype="ACCESSTYPE",ComplexSearchFacets.Ages="AGES",ComplexSearchFacets.Cataloguecode="CATALOGUECODE",ComplexSearchFacets.Contributor="CONTRIBUTOR",ComplexSearchFacets.Contributorfunction="CONTRIBUTORFUNCTION",ComplexSearchFacets.Creator="CREATOR",ComplexSearchFacets.Creatorcontributor="CREATORCONTRIBUTOR",ComplexSearchFacets.Creatorcontributorfunction="CREATORCONTRIBUTORFUNCTION",ComplexSearchFacets.Creatorfunction="CREATORFUNCTION",ComplexSearchFacets.Fictionalcharacter="FICTIONALCHARACTER",ComplexSearchFacets.Filmnationality="FILMNATIONALITY",ComplexSearchFacets.Gameplatform="GAMEPLATFORM",ComplexSearchFacets.Generalaudience="GENERALAUDIENCE",ComplexSearchFacets.Generalmaterialtype="GENERALMATERIALTYPE",ComplexSearchFacets.Genreandform="GENREANDFORM",ComplexSearchFacets.Hostpublication="HOSTPUBLICATION",ComplexSearchFacets.Issue="ISSUE",ComplexSearchFacets.Language="LANGUAGE",ComplexSearchFacets.Let="LET",ComplexSearchFacets.Libraryrecommendation="LIBRARYRECOMMENDATION",ComplexSearchFacets.Lix="LIX",ComplexSearchFacets.Mainlanguage="MAINLANGUAGE",ComplexSearchFacets.Mediacouncilagerestriction="MEDIACOUNCILAGERESTRICTION",ComplexSearchFacets.Mood="MOOD",ComplexSearchFacets.Musicalensembleorcast="MUSICALENSEMBLEORCAST",ComplexSearchFacets.Narrativetechnique="NARRATIVETECHNIQUE",ComplexSearchFacets.Pegi="PEGI",ComplexSearchFacets.Players="PLAYERS",ComplexSearchFacets.Primarytarget="PRIMARYTARGET",ComplexSearchFacets.Publicationyear="PUBLICATIONYEAR",ComplexSearchFacets.Series="SERIES",ComplexSearchFacets.Setting="SETTING",ComplexSearchFacets.Specificmaterialtype="SPECIFICMATERIALTYPE",ComplexSearchFacets.Spokenlanguage="SPOKENLANGUAGE",ComplexSearchFacets.Subject="SUBJECT",ComplexSearchFacets.Subtitlelanguage="SUBTITLELANGUAGE",ComplexSearchFacets.Typeofscore="TYPEOFSCORE",ComplexSearchFacets}({}),CopyRequestStatus=function(CopyRequestStatus){return CopyRequestStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",CopyRequestStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",CopyRequestStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",CopyRequestStatus.ErrorAgencyNotSubscribed="ERROR_AGENCY_NOT_SUBSCRIBED",CopyRequestStatus.ErrorInvalidPickupBranch="ERROR_INVALID_PICKUP_BRANCH",CopyRequestStatus.ErrorMissingClientConfiguration="ERROR_MISSING_CLIENT_CONFIGURATION",CopyRequestStatus.ErrorMissingMunicipalityagencyid="ERROR_MISSING_MUNICIPALITYAGENCYID",CopyRequestStatus.ErrorMunicipalityagencyidNotFound="ERROR_MUNICIPALITYAGENCYID_NOT_FOUND",CopyRequestStatus.ErrorPidNotReservable="ERROR_PID_NOT_RESERVABLE",CopyRequestStatus.ErrorUnauthenticatedUser="ERROR_UNAUTHENTICATED_USER",CopyRequestStatus.Ok="OK",CopyRequestStatus.UnknownUser="UNKNOWN_USER",CopyRequestStatus}({}),FacetField=function(FacetField){return FacetField.AccessTypes="accessTypes",FacetField.Age="age",FacetField.CanAlwaysBeLoaned="canAlwaysBeLoaned",FacetField.ChildrenOrAdults="childrenOrAdults",FacetField.Creators="creators",FacetField.Dk5="dk5",FacetField.FictionNonfiction="fictionNonfiction",FacetField.FictionalCharacters="fictionalCharacters",FacetField.GeneralAudience="generalAudience",FacetField.GenreAndForm="genreAndForm",FacetField.Let="let",FacetField.LibraryRecommendation="libraryRecommendation",FacetField.Lix="lix",FacetField.MainLanguages="mainLanguages",FacetField.MaterialTypesGeneral="materialTypesGeneral",FacetField.MaterialTypesSpecific="materialTypesSpecific",FacetField.Subjects="subjects",FacetField.WorkTypes="workTypes",FacetField.Year="year",FacetField}({}),FictionNonfictionCode=function(FictionNonfictionCode){return FictionNonfictionCode.Fiction="FICTION",FictionNonfictionCode.Nonfiction="NONFICTION",FictionNonfictionCode.NotSpecified="NOT_SPECIFIED",FictionNonfictionCode}({}),HoldingsStatus=function(HoldingsStatus){return HoldingsStatus.OnLoan="OnLoan",HoldingsStatus.OnShelf="OnShelf",HoldingsStatus}({}),SubjectType=function(SubjectType){return SubjectType.Corporation="CORPORATION",SubjectType.Environment="ENVIRONMENT",SubjectType.FictionalCharacter="FICTIONAL_CHARACTER",SubjectType.FictionalLocation="FICTIONAL_LOCATION",SubjectType.FilmNationality="FILM_NATIONALITY",SubjectType.Laesekompasset="LAESEKOMPASSET",SubjectType.LibraryOfCongressSubjectHeading="LIBRARY_OF_CONGRESS_SUBJECT_HEADING",SubjectType.Location="LOCATION",SubjectType.MedicalSubjectHeading="MEDICAL_SUBJECT_HEADING",SubjectType.Mood="MOOD",SubjectType.MoodChildren="MOOD_CHILDREN",SubjectType.MusicalInstrumentation="MUSICAL_INSTRUMENTATION",SubjectType.MusicCountryOfOrigin="MUSIC_COUNTRY_OF_ORIGIN",SubjectType.MusicTimePeriod="MUSIC_TIME_PERIOD",SubjectType.NationalAgriculturalLibrary="NATIONAL_AGRICULTURAL_LIBRARY",SubjectType.Person="PERSON",SubjectType.Perspective="PERSPECTIVE",SubjectType.Reality="REALITY",SubjectType.Style="STYLE",SubjectType.Tempo="TEMPO",SubjectType.TimePeriod="TIME_PERIOD",SubjectType.Title="TITLE",SubjectType.Topic="TOPIC",SubjectType.TopicChildren="TOPIC_CHILDREN",SubjectType}({}),SubmitOrderStatus=function(SubmitOrderStatus){return SubmitOrderStatus.AuthenticationError="AUTHENTICATION_ERROR",SubmitOrderStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",SubmitOrderStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",SubmitOrderStatus.ErrorMissingPincode="ERROR_MISSING_PINCODE",SubmitOrderStatus.InvalidOrder="INVALID_ORDER",SubmitOrderStatus.NotOwnedIllLoc="NOT_OWNED_ILL_LOC",SubmitOrderStatus.NotOwnedNoIllLoc="NOT_OWNED_NO_ILL_LOC",SubmitOrderStatus.NotOwnedWrongIllMediumtype="NOT_OWNED_WRONG_ILL_MEDIUMTYPE",SubmitOrderStatus.NoServicerequester="NO_SERVICEREQUESTER",SubmitOrderStatus.OrsError="ORS_ERROR",SubmitOrderStatus.OwnedAccepted="OWNED_ACCEPTED",SubmitOrderStatus.OwnedOwnCatalogue="OWNED_OWN_CATALOGUE",SubmitOrderStatus.OwnedWrongMediumtype="OWNED_WRONG_MEDIUMTYPE",SubmitOrderStatus.ServiceUnavailable="SERVICE_UNAVAILABLE",SubmitOrderStatus.UnknownError="UNKNOWN_ERROR",SubmitOrderStatus.UnknownPickupagency="UNKNOWN_PICKUPAGENCY",SubmitOrderStatus.UnknownUser="UNKNOWN_USER",SubmitOrderStatus}({}),SuggestionType=function(SuggestionType){return SuggestionType.Composit="COMPOSIT",SuggestionType.Creator="CREATOR",SuggestionType.Subject="SUBJECT",SuggestionType.Title="TITLE",SuggestionType}({}),WorkType=function(WorkType){return WorkType.Analysis="ANALYSIS",WorkType.Article="ARTICLE",WorkType.Bookdescription="BOOKDESCRIPTION",WorkType.Game="GAME",WorkType.Literature="LITERATURE",WorkType.Map="MAP",WorkType.Movie="MOVIE",WorkType.Music="MUSIC",WorkType.Other="OTHER",WorkType.Periodica="PERIODICA",WorkType.Portrait="PORTRAIT",WorkType.Review="REVIEW",WorkType.Sheetmusic="SHEETMUSIC",WorkType.Track="TRACK",WorkType}({});const WithLanguagesFragmentDoc="\n fragment WithLanguages on Manifestation {\n languages {\n main {\n display\n isoCode\n }\n }\n}\n ",ManifestationBasicDetailsFragmentDoc=`\n fragment ManifestationBasicDetails on Manifestation {\n ...WithLanguages\n pid\n titles {\n full\n }\n abstract\n materialTypes {\n materialTypeSpecific {\n display\n }\n }\n creators {\n display\n }\n edition {\n publicationYear {\n display\n }\n }\n series {\n title\n numberInSeries {\n number\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,WorkSmallFragmentDoc=`\n fragment WorkSmall on Work {\n workId\n titles {\n full\n original\n }\n abstract\n creators {\n display\n __typename\n }\n series {\n ...SeriesSimple\n }\n seriesMembers {\n workId\n titles {\n main\n full\n original\n }\n }\n workYear {\n year\n }\n genreAndForm\n manifestations {\n ...ManifestationsSimple\n }\n}\n \n fragment SeriesSimple on Series {\n title\n isPopular\n numberInSeries {\n display\n number\n }\n readThisFirst\n readThisWhenever\n}\n \n${`\n fragment ManifestationsSimple on Manifestations {\n all {\n ...ManifestationsSimpleFields\n }\n latest {\n ...ManifestationsSimpleFields\n }\n bestRepresentation {\n ...ManifestationsSimpleFields\n }\n}\n ${`\n fragment ManifestationsSimpleFields on Manifestation {\n pid\n genreAndForm\n source\n ...WithLanguages\n titles {\n main\n original\n }\n fictionNonfiction {\n display\n code\n }\n materialTypes {\n materialTypeSpecific {\n display\n }\n }\n creators {\n display\n __typename\n }\n publisher\n identifiers {\n value\n }\n contributors {\n display\n roles {\n function {\n singular\n }\n }\n }\n edition {\n summary\n publicationYear {\n display\n }\n }\n dateFirstEdition {\n display\n year\n }\n audience {\n generalAudience\n ages {\n display\n }\n }\n notes {\n display\n }\n languages {\n notes\n }\n physicalDescriptions {\n summary\n numberOfPages\n playingTime\n }\n hostPublication {\n summary\n }\n manifestationParts {\n parts {\n title\n }\n }\n accessTypes {\n code\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n shelfmark {\n postfix\n shelfmark\n }\n workYear {\n year\n }\n catalogueCodes {\n nationalBibliography\n otherCatalogues\n }\n}\n ${WithLanguagesFragmentDoc}`}`}`,WorkMediumFragmentDoc=`\n fragment WorkMedium on Work {\n ...WorkSmall\n materialTypes {\n materialTypeSpecific {\n display\n }\n }\n mainLanguages {\n display\n isoCode\n }\n subjects {\n all {\n display\n }\n dbcVerified {\n display\n }\n }\n fictionNonfiction {\n display\n code\n }\n dk5MainEntry {\n display\n }\n relations {\n hasReview {\n pid\n }\n hasAdaptation {\n ownerWork {\n workId\n workTypes\n titles {\n main\n }\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`,GetSmallWorkDocument=`\n query getSmallWork($id: String!) {\n work(id: $id) {\n ...WorkSmall\n }\n}\n ${WorkSmallFragmentDoc}`,useGetSmallWorkQuery=(variables,options)=>(0,es.useQuery)(["getSmallWork",variables],fetcher(GetSmallWorkDocument,variables),options),GetManifestationViaMaterialByFaustDocument=`\n query getManifestationViaMaterialByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ...ManifestationBasicDetails\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaMaterialByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaMaterialByFaust",variables],fetcher(GetManifestationViaMaterialByFaustDocument,variables),options),GetManifestationViaBestRepresentationByFaustDocument=`\n query getManifestationViaBestRepresentationByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ownerWork {\n manifestations {\n bestRepresentation {\n ...ManifestationBasicDetails\n }\n }\n }\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaBestRepresentationByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaBestRepresentationByFaust",variables],fetcher(GetManifestationViaBestRepresentationByFaustDocument,variables),options),GetMaterialDocument=`\n query getMaterial($wid: String!) {\n work(id: $wid) {\n ...WorkMedium\n }\n}\n ${WorkMediumFragmentDoc}`,useGetMaterialQuery=(variables,options)=>(0,es.useQuery)(["getMaterial",variables],fetcher(GetMaterialDocument,variables),options),GetMaterialGloballyDocument=`\n query getMaterialGlobally($wid: String!) {\n work(id: $wid) {\n ...WorkMedium\n }\n}\n ${WorkMediumFragmentDoc}`,useGetMaterialGloballyQuery=(variables,options)=>(0,es.useQuery)(["getMaterialGlobally",variables],fetcher(GetMaterialGloballyDocument,variables),options),useGetInfomediaQuery=(variables,options)=>(0,es.useQuery)(["getInfomedia",variables],fetcher("\n query getInfomedia($id: String!) {\n infomedia(id: $id) {\n error\n article {\n headLine\n text\n }\n }\n}\n ",variables),options),useGetReviewManifestationsQuery=(variables,options)=>(0,es.useQuery)(["getReviewManifestations",variables],fetcher("\n query getReviewManifestations($pid: [String!]!) {\n manifestations(pid: $pid) {\n ...ManifestationReviewFields\n }\n}\n \n fragment ManifestationReviewFields on Manifestation {\n pid\n creators {\n display\n }\n access {\n __typename\n ... on InfomediaService {\n id\n }\n ... on DigitalArticleService {\n issn\n }\n ... on AccessUrl {\n url\n origin\n }\n }\n edition {\n publicationYear {\n display\n }\n }\n hostPublication {\n title\n issue\n }\n creators {\n display\n }\n physicalDescriptions {\n summary\n }\n dateFirstEdition {\n display\n }\n workYear {\n display\n }\n review {\n rating\n reviewByLibrarians {\n content\n heading\n type\n manifestations {\n pid\n titles {\n main\n }\n }\n }\n }\n}\n ",variables),options),useOpenOrderMutation=options=>(0,es.useMutation)(["openOrder"],(variables=>fetcher("\n mutation openOrder($input: SubmitOrderInput!) {\n submitOrder(input: $input, dryRun: false) {\n status\n message\n orderId\n }\n}\n ",variables)()),options),RecommendFromFaustDocument=`\n query recommendFromFaust($faust: String!, $limit: Int!) {\n recommend(faust: $faust, limit: $limit) {\n result {\n work {\n ...WorkSmall\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useRecommendFromFaustQuery=(variables,options)=>(0,es.useQuery)(["recommendFromFaust",variables],fetcher(RecommendFromFaustDocument,variables),options),SearchWithPaginationDocument=`\n query searchWithPagination($q: SearchQuery!, $offset: Int!, $limit: PaginationLimit!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["searchWithPagination",variables],fetcher(SearchWithPaginationDocument,variables),options),useComplexSearchWithPaginationWorkAccessQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPaginationWorkAccess",variables],fetcher("\n query complexSearchWithPaginationWorkAccess($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkAccess\n }\n }\n}\n \n fragment WorkAccess on Work {\n workId\n manifestations {\n ...ManifestationsAccess\n }\n}\n \n fragment ManifestationsAccess on Manifestations {\n all {\n pid\n identifiers {\n type\n value\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n }\n}\n ",variables),options),ComplexSearchWithPaginationDocument=`\n query complexSearchWithPagination($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useComplexSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPagination",variables],fetcher(ComplexSearchWithPaginationDocument,variables),options),SuggestionsFromQueryStringDocument=`\n query suggestionsFromQueryString($q: String!) {\n suggest(q: $q) {\n result {\n type\n term\n work {\n workId\n titles {\n main\n }\n creators {\n display\n }\n manifestations {\n all {\n pid\n }\n bestRepresentation {\n pid\n ...WithLanguages\n }\n }\n }\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,useSuggestionsFromQueryStringQuery=(variables,options)=>(0,es.useQuery)(["suggestionsFromQueryString",variables],fetcher(SuggestionsFromQueryStringDocument,variables),options),useSearchFacetQuery=(variables,options)=>(0,es.useQuery)(["searchFacet",variables],fetcher("\n query searchFacet($q: SearchQuery!, $facets: [FacetField!]!, $facetLimit: Int!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n facets(facets: $facets) {\n name\n values(limit: $facetLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),useIntelligentFacetsQuery=(variables,options)=>(0,es.useQuery)(["intelligentFacets",variables],fetcher("\n query intelligentFacets($q: SearchQuery!, $facetsLimit: Int!, $valuesLimit: Int!, $filters: SearchFilters!) {\n search(q: $q, filters: $filters) {\n intelligentFacets(limit: $facetsLimit) {\n name\n values(limit: $valuesLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),usePlaceCopyMutation=options=>(0,es.useMutation)(["placeCopy"],(variables=>fetcher("\n mutation placeCopy($input: CopyRequestInput!) {\n elba {\n placeCopyRequest(input: $input) {\n status\n }\n }\n}\n ",variables)()),options);try{ComplexSearchFacets.displayName="ComplexSearchFacets",ComplexSearchFacets.__docgenInfo={description:"The supported facet fields",displayName:"ComplexSearchFacets",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#ComplexSearchFacets"]={docgenInfo:ComplexSearchFacets.__docgenInfo,name:"ComplexSearchFacets",path:"src/core/dbc-gateway/generated/graphql.tsx#ComplexSearchFacets"})}catch(__react_docgen_typescript_loader_error){}try{FacetField.displayName="FacetField",FacetField.__docgenInfo={description:"The supported facet fields",displayName:"FacetField",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#FacetField"]={docgenInfo:FacetField.__docgenInfo,name:"FacetField",path:"src/core/dbc-gateway/generated/graphql.tsx#FacetField"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnLoan.displayName="HoldingsStatus.OnLoan",HoldingsStatus.OnLoan.__docgenInfo={description:"Holding is on loan",displayName:"HoldingsStatus.OnLoan",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"]={docgenInfo:HoldingsStatus.OnLoan.__docgenInfo,name:"HoldingsStatus.OnLoan",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnShelf.displayName="HoldingsStatus.OnShelf",HoldingsStatus.OnShelf.__docgenInfo={description:"Holding is physically available at the branch",displayName:"HoldingsStatus.OnShelf",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"]={docgenInfo:HoldingsStatus.OnShelf.__docgenInfo,name:"HoldingsStatus.OnShelf",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"})}catch(__react_docgen_typescript_loader_error){}try{SubjectType.Person.displayName="SubjectType.Person",SubjectType.Person.__docgenInfo={description:"added for manifestation.parts.creators/person - they get a type from small-rye",displayName:"SubjectType.Person",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"]={docgenInfo:SubjectType.Person.__docgenInfo,name:"SubjectType.Person",path:"src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"})}catch(__react_docgen_typescript_loader_error){}try{SubjectType.TopicChildren.displayName="SubjectType.TopicChildren",SubjectType.TopicChildren.__docgenInfo={description:"Subject describing selected topics for children, and a rating.",displayName:"SubjectType.TopicChildren",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubjectType.TopicChildren"]={docgenInfo:SubjectType.TopicChildren.__docgenInfo,name:"SubjectType.TopicChildren",path:"src/core/dbc-gateway/generated/graphql.tsx#SubjectType.TopicChildren"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.AuthenticationError.displayName="SubmitOrderStatus.AuthenticationError",SubmitOrderStatus.AuthenticationError.__docgenInfo={description:"Authentication error",displayName:"SubmitOrderStatus.AuthenticationError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"]={docgenInfo:SubmitOrderStatus.AuthenticationError.__docgenInfo,name:"SubmitOrderStatus.AuthenticationError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserBlockedByAgency.displayName="SubmitOrderStatus.BorchkUserBlockedByAgency",SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo={description:"Borchk: User is blocked by agency",displayName:"SubmitOrderStatus.BorchkUserBlockedByAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserBlockedByAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNotVerified.displayName="SubmitOrderStatus.BorchkUserNotVerified",SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo={description:"Borchk: User could not be verified",displayName:"SubmitOrderStatus.BorchkUserNotVerified",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"]={docgenInfo:SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNotVerified",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.displayName="SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo={description:"Borchk: User is no longer loaner at the provided pickupbranch",displayName:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.ErrorMissingPincode.displayName="SubmitOrderStatus.ErrorMissingPincode",SubmitOrderStatus.ErrorMissingPincode.__docgenInfo={description:"Pincode was not found in arguments",displayName:"SubmitOrderStatus.ErrorMissingPincode",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ErrorMissingPincode"]={docgenInfo:SubmitOrderStatus.ErrorMissingPincode.__docgenInfo,name:"SubmitOrderStatus.ErrorMissingPincode",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ErrorMissingPincode"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.InvalidOrder.displayName="SubmitOrderStatus.InvalidOrder",SubmitOrderStatus.InvalidOrder.__docgenInfo={description:"Order does not validate",displayName:"SubmitOrderStatus.InvalidOrder",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"]={docgenInfo:SubmitOrderStatus.InvalidOrder.__docgenInfo,name:"SubmitOrderStatus.InvalidOrder",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedIllLoc.displayName="SubmitOrderStatus.NotOwnedIllLoc",SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item localised for ILL",displayName:"SubmitOrderStatus.NotOwnedIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedNoIllLoc.displayName="SubmitOrderStatus.NotOwnedNoIllLoc",SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item not localised for ILL",displayName:"SubmitOrderStatus.NotOwnedNoIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedNoIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedWrongIllMediumtype.displayName="SubmitOrderStatus.NotOwnedWrongIllMediumtype",SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo={description:"Item not available at pickupAgency, ILL of mediumType not accepted",displayName:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"]={docgenInfo:SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo,name:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NoServicerequester.displayName="SubmitOrderStatus.NoServicerequester",SubmitOrderStatus.NoServicerequester.__docgenInfo={description:"ServiceRequester is obligatory",displayName:"SubmitOrderStatus.NoServicerequester",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"]={docgenInfo:SubmitOrderStatus.NoServicerequester.__docgenInfo,name:"SubmitOrderStatus.NoServicerequester",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OrsError.displayName="SubmitOrderStatus.OrsError",SubmitOrderStatus.OrsError.__docgenInfo={description:"Error sending order to ORS",displayName:"SubmitOrderStatus.OrsError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"]={docgenInfo:SubmitOrderStatus.OrsError.__docgenInfo,name:"SubmitOrderStatus.OrsError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedAccepted.displayName="SubmitOrderStatus.OwnedAccepted",SubmitOrderStatus.OwnedAccepted.__docgenInfo={description:"Item available at pickupAgency, order accepted",displayName:"SubmitOrderStatus.OwnedAccepted",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"]={docgenInfo:SubmitOrderStatus.OwnedAccepted.__docgenInfo,name:"SubmitOrderStatus.OwnedAccepted",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedOwnCatalogue.displayName="SubmitOrderStatus.OwnedOwnCatalogue",SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo={description:"Item available at pickupAgency, item may be ordered through the library's catalogue",displayName:"SubmitOrderStatus.OwnedOwnCatalogue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"]={docgenInfo:SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo,name:"SubmitOrderStatus.OwnedOwnCatalogue",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedWrongMediumtype.displayName="SubmitOrderStatus.OwnedWrongMediumtype",SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo={description:"Item available at pickupAgency, order of mediumType not accepted",displayName:"SubmitOrderStatus.OwnedWrongMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"]={docgenInfo:SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo,name:"SubmitOrderStatus.OwnedWrongMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.ServiceUnavailable.displayName="SubmitOrderStatus.ServiceUnavailable",SubmitOrderStatus.ServiceUnavailable.__docgenInfo={description:"Service unavailable",displayName:"SubmitOrderStatus.ServiceUnavailable",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"]={docgenInfo:SubmitOrderStatus.ServiceUnavailable.__docgenInfo,name:"SubmitOrderStatus.ServiceUnavailable",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownError.displayName="SubmitOrderStatus.UnknownError",SubmitOrderStatus.UnknownError.__docgenInfo={description:"Unknown error occured, status is unknown",displayName:"SubmitOrderStatus.UnknownError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"]={docgenInfo:SubmitOrderStatus.UnknownError.__docgenInfo,name:"SubmitOrderStatus.UnknownError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownPickupagency.displayName="SubmitOrderStatus.UnknownPickupagency",SubmitOrderStatus.UnknownPickupagency.__docgenInfo={description:"PickupAgency not found",displayName:"SubmitOrderStatus.UnknownPickupagency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"]={docgenInfo:SubmitOrderStatus.UnknownPickupagency.__docgenInfo,name:"SubmitOrderStatus.UnknownPickupagency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownUser.displayName="SubmitOrderStatus.UnknownUser",SubmitOrderStatus.UnknownUser.__docgenInfo={description:"User not found",displayName:"SubmitOrderStatus.UnknownUser",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"]={docgenInfo:SubmitOrderStatus.UnknownUser.__docgenInfo,name:"SubmitOrderStatus.UnknownUser",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"})}catch(__react_docgen_typescript_loader_error){}try{useOpenOrderMutation.displayName="useOpenOrderMutation",useOpenOrderMutation.__docgenInfo={description:"",displayName:"useOpenOrderMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"]={docgenInfo:useOpenOrderMutation.__docgenInfo,name:"useOpenOrderMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"})}catch(__react_docgen_typescript_loader_error){}try{usePlaceCopyMutation.displayName="usePlaceCopyMutation",usePlaceCopyMutation.__docgenInfo={description:"",displayName:"usePlaceCopyMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"]={docgenInfo:usePlaceCopyMutation.__docgenInfo,name:"usePlaceCopyMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/dpl-cms/dpl-cms.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J0:()=>getDplOpeningHoursListGETQueryKey,Fg:()=>useCampaignMatchPOST,hi:()=>useDplOpeningHoursCreatePOST,v2:()=>useDplOpeningHoursDeleteDELETE,Dp:()=>useDplOpeningHoursListGET,I1:()=>useDplOpeningHoursUpdatePATCH,vS:()=>useProxyUrlGET});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class DplCmsServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","DplCmsServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.gf)(core_token.CI)??(0,core_token.gf)(core_token._L),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.dplCms),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new DplCmsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof DplCmsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.A(message,serviceUrl)}return null},getCampaignMatchPOSTMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data,params}=props??{};return((campaignMatchPOSTBodyItem,params)=>fetcher_fetcher({url:"/dpl_campaign/match",method:"POST",headers:{"Content-Type":"application/json"},data:campaignMatchPOSTBodyItem,params}))(data,params)},...mutationOptions}},useCampaignMatchPOST=options=>{const mutationOptions=getCampaignMatchPOSTMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getDplOpeningHoursCreatePOSTMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data,params}=props??{};return((dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params)=>fetcher_fetcher({url:"/api/v1/opening_hours",method:"POST",headers:{"Content-Type":"application/json"},data:dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params}))(data,params)},...mutationOptions}},useDplOpeningHoursCreatePOST=options=>{const mutationOptions=getDplOpeningHoursCreatePOSTMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getDplOpeningHoursListGETQueryKey=params=>["/api/v1/opening_hours",...params?[params]:[]],getDplOpeningHoursListGETQueryOptions=(params,queryOptions)=>({queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getDplOpeningHoursListGETQueryKey(params),queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/api/v1/opening_hours",method:"GET",params,signal}))(params,signal),...queryOptions}),useDplOpeningHoursListGET=(params,queryOptions)=>{const options=getDplOpeningHoursListGETQueryOptions(params,queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query},getDplOpeningHoursDeleteDELETEMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{id,params}=props??{};return((id,params)=>fetcher_fetcher({url:`/api/v1/opening_hours/${id}`,method:"DELETE",params}))(id,params)},...mutationOptions}},useDplOpeningHoursDeleteDELETE=options=>{const mutationOptions=getDplOpeningHoursDeleteDELETEMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getDplOpeningHoursUpdatePATCHMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{id,data,params}=props??{};return((id,dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params)=>fetcher_fetcher({url:`/api/v1/opening_hours/${id}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params}))(id,data,params)},...mutationOptions}},useDplOpeningHoursUpdatePATCH=options=>{const mutationOptions=getDplOpeningHoursUpdatePATCHMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getProxyUrlGETQueryOptions=(params,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/dpl-url-proxy",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/dpl-url-proxy",method:"GET",params,signal}))(params,signal),...queryOptions}},useProxyUrlGET=(params,queryOptions)=>{const options=getProxyUrlGETQueryOptions(params,queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query}},"./src/core/errors/InvalidUrlError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}__webpack_require__.d(__webpack_exports__,{A:()=>InvalidUrlError});class InvalidUrlError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1),_defineProperty(this,"name","InvalidUrlError")}}},"./src/core/fbs/fbs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PC:()=>getAvailabilityV3,BK:()=>getGetHoldingsV3QueryKey,$4:()=>getGetLoansV2QueryKey,gm:()=>getGetPatronInformationByPatronIdV2QueryKey,vN:()=>getGetReservationsV2QueryKey,eu:()=>useAddReservationsV2,AQ:()=>useCreateV4,g1:()=>useDeleteReservations,io:()=>useGetAvailabilityV3,J2:()=>useGetFeesV2,pF:()=>useGetHoldingsV3,zw:()=>useGetLoansV2,wq:()=>useGetPatronInformationByPatronIdV2,$6:()=>useGetReservationsV2,Oc:()=>useRenewLoansV2,cK:()=>useUpdateReservations,AZ:()=>useUpdateV5});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FbsServiceHttpError extends FetcherCriticalHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","FbsServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,user.dG)()??(0,core_token.gf)(core_token._L),baseUrl=(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.fbs),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl,url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new FbsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof FbsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,serviceUrl)}return null},getDeleteReservationsMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{params}=props??{};return(params=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"DELETE",params}))(params)},...mutationOptions}},useDeleteReservations=options=>{const mutationOptions=getDeleteReservationsMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getUpdateReservationsMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"PUT",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useUpdateReservations=options=>{const mutationOptions=getUpdateReservationsMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getGetReservationsV2QueryKey=()=>["/external/v1/agencyid/patrons/patronid/reservations/v2"],getGetReservationsV2QueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetReservationsV2QueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"GET",signal}))(signal),...queryOptions}},useGetReservationsV2=options=>{const queryOptions=getGetReservationsV2QueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getAddReservationsV2MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"POST",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useAddReservationsV2=options=>{const mutationOptions=getAddReservationsV2MutationOptions(options);return(0,es.useMutation)(mutationOptions)},getAvailabilityV3=(params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/availability/v3",method:"GET",params,signal}),useGetAvailabilityV3=(params,options)=>{const queryOptions=((params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/catalog/availability/v3",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>getAvailabilityV3(params,signal),...queryOptions}})(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetHoldingsV3QueryKey=params=>["/external/agencyid/catalog/holdings/v3",...params?[params]:[]],getGetHoldingsV3QueryOptions=(params,options)=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetHoldingsV3QueryKey(params),queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/holdings/v3",method:"GET",params,signal}))(params,signal),...queryOptions}},useGetHoldingsV3=(params,options)=>{const queryOptions=getGetHoldingsV3QueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetFeesV2QueryOptions=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/patron/patronid/fees/v2",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/patron/patronid/fees/v2",method:"GET",params,signal}))(params,signal),...queryOptions}},useGetFeesV2=(params,options)=>{const queryOptions=getGetFeesV2QueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getCreateV4MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/v4",method:"POST",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useCreateV4=options=>{const mutationOptions=getCreateV4MutationOptions(options);return(0,es.useMutation)(mutationOptions)},getRenewLoansV2MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/renew/v2",method:"POST",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useRenewLoansV2=options=>{const mutationOptions=getRenewLoansV2MutationOptions(options);return(0,es.useMutation)(mutationOptions)},getGetLoansV2QueryKey=()=>["/external/agencyid/patrons/patronid/loans/v2"],getGetLoansV2QueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetLoansV2QueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/v2",method:"GET",signal}))(signal),...queryOptions}},useGetLoansV2=options=>{const queryOptions=getGetLoansV2QueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetPatronInformationByPatronIdV2QueryKey=()=>["/external/agencyid/patrons/patronid/v2"],getGetPatronInformationByPatronIdV2QueryOptions=queryOptions=>({queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetPatronInformationByPatronIdV2QueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v2",method:"GET",signal}))(signal),...queryOptions}),useGetPatronInformationByPatronIdV2=queryOptions=>{const options=getGetPatronInformationByPatronIdV2QueryOptions(queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query},getUpdateV5MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v5",method:"PUT",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useUpdateV5=options=>{const mutationOptions=getUpdateV5MutationOptions(options);return(0,es.useMutation)(mutationOptions)}},"./src/core/fetchers/FetchFailedCriticalError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetchFailedCriticalError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetchFailedCriticalError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedCriticalError"),_defineProperty(this,"useErrorBoundary",!0),this.context=context}}},"./src/core/fetchers/FetchFailedError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetchFailedError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetchFailedError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedError"),_defineProperty(this,"useErrorBoundary",!1),this.context=context}}},"./src/core/fetchers/FetcherCriticalHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetcherCriticalHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetcherCriticalHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!0)}}},"./src/core/fetchers/FetcherError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}__webpack_require__.d(__webpack_exports__,{A:()=>FetcherError});class FetcherError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"name","FetcherError")}}},"./src/core/fetchers/FetcherHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetcherHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetcherHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1)}}},"./src/core/fetchers/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z4:()=>getServiceUrlWithParams});const getServiceUrlWithParams=({baseUrl,url,params})=>{const urlParams=params?`?${(data=>{let params;return"string"==typeof data||void 0===data?params=new URLSearchParams(data):(params=new URLSearchParams,Object.entries(data).forEach((([key,value])=>{Array.isArray(value)?value.forEach((inner=>{params.append(key,inner.toString())})):params.append(key,value.toString())}))),params})(params)}`:"";return`${baseUrl}${url}${urlParams}`}},"./src/core/filter.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,IU:()=>clear,TF:()=>remove,WQ:()=>add});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const initialState={},filterState=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.Z0)({name:"filter",initialState,reducers:{add(state,action){const{facet,term}=action.payload;return{...state,[facet]:{...state[facet],[term.term]:term}}},remove(state,action){const{facet,term}=action.payload,selectedFacet={...state[facet]};if(delete selectedFacet[term.term],0===Object.keys(selectedFacet).length){const stateCopy={...state};return delete stateCopy[facet],stateCopy}return{...state,[facet]:selectedFacet}},clear:()=>initialState}}),{add,remove,clear}=filterState.actions,__WEBPACK_DEFAULT_EXPORT__=filterState.reducer},"./src/core/guardedRequests.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A5:()=>guardedRequest,Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Cp:()=>reRunRequest,d2:()=>hasRequestExpired,l0:()=>AUTH_PARAM,ss:()=>removeRequest});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/material-list-api/material-list.ts"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/date.ts"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/user.ts");const AUTH_PARAM="didAuthenticate",requestCallbacks={addFavorite:({id,queryClient})=>(0,_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__.B5)("default",id,queryClient)},hasRequestExpired=({expire})=>!expire||(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.Ay)()>expire,guardedRequests=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.Z0)({name:"guardedRequests",initialState:{request:null},reducers:{addRequest(state,action){const{payload:request}=action;null!=request&&request.expire||(request.expire=(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.Ay)()+60),state.request=request},removeRequest(state){state.request=null}}}),{addRequest,removeRequest}=guardedRequests.actions,getRequestCallback=type=>null==requestCallbacks?void 0:requestCallbacks[type],requestCallbackExists=type=>Boolean(getRequestCallback(type)),guardedRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.zD)("guardedRequests/performRequest",(async(requestItem,{dispatch,fulfillWithValue,getState})=>{const{type,args}=requestItem;if(!requestCallbackExists(type))return fulfillWithValue({status:"ignored",message:"Nothing to do"});(0,_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__.ok)()&&(dispatch(addRequest(requestItem)),_store__WEBPACK_IMPORTED_MODULE_1__.qj.flush().then((()=>{const{authUrl}=(state=>{const{url:{data}}=state;return(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.tP)(data)})(getState());if(authUrl){const returnUrl=(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.gG)({[AUTH_PARAM]:"1"});(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.bX)({authUrl,returnUrl})}}))),console.debug("PERFORMING REQUEST CALLBACK");return getRequestCallback(type)(args)})),reRunRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.zD)("guardedRequests/reRunRequest",(async(requestItem,{fulfillWithValue})=>{const{type,args}=requestItem;if(requestCallbackExists(type)){const requestCallback=getRequestCallback(type);return console.debug("RERUNNING REQUEST"),requestCallback(args)}return fulfillWithValue({status:"success",message:""})})),__WEBPACK_DEFAULT_EXPORT__=guardedRequests.reducer},"./src/core/material-list-api/material-list.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B5:()=>addItem,Ai:()=>removeItem,M7:()=>useGetList,Xi:()=>useHasItem});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class MaterialListServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","MaterialListServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},userToken=(0,token.gf)(token.CI),headers={...userToken?{Authorization:`Bearer ${userToken}`}:{},...additionalHeaders,"Accept-Version":"2"},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.materialList),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new MaterialListServiceHttpError(response.status,response.statusText,serviceUrl);if("get"===method)try{return await response.json()}catch(error){throw new Error("The response body contains invalid JSON")}}catch(error){if(error instanceof MaterialListServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.A(message,serviceUrl)}return null},getGetListQueryKey=(listId,params)=>[`/list/${listId}`,...params?[params]:[]],useGetList=(listId,params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetListQueryKey(listId,params),query=(0,es.useQuery)(queryKey,(({signal})=>((listId,params,signal)=>fetcher({url:`/list/${listId}`,method:"get",signal,params}))(listId,params,signal)),{enabled:!!listId,...queryOptions});return{queryKey,...query}},useHasItem=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{listId,itemId}=props??{};return((listId,itemId,signal)=>fetcher({url:`/list/${listId}/${itemId}`,method:"head",signal}))(listId,itemId)}),mutationOptions)},addItem=(listId,itemId,queryClient)=>fetcher({url:`/list/${listId}/${itemId}`,method:"put"}).then((()=>queryClient.invalidateQueries(getGetListQueryKey(listId)))),removeItem=(listId,itemId,queryClient)=>fetcher({url:`/list/${listId}/${itemId}`,method:"delete"}).then((()=>queryClient.invalidateQueries(getGetListQueryKey(listId))))},"./src/core/modal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Oo:()=>closeModal,ch:()=>closeLastModal,qf:()=>openModal,s7:()=>closeAllModals});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/helpers/url.ts");const focusContainerArray=[],returnFocusElement=()=>{const element=focusContainerArray.pop();return element&&element.focus(),element},removeModalIdFromUrl=state=>{if(state.modalIds&&state.modalIds.length>0){const lastModalId=state.modalIds[state.modalIds.length-1];(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.$u)({modal:lastModalId})}else(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.MR)("modal")},modalSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.Z0)({name:"modal",initialState:{modalIds:[]},reducers:{openModal(state,action){if(window.document&&(document.body.style.overflow="hidden"),action.payload.modalId&&!state.modalIds.includes(action.payload.modalId)){state.modalIds.push(action.payload.modalId);const alreadyOpenModals=new URLSearchParams(window.location.search).get("modal");alreadyOpenModals!==action.payload.modalId&&window.history.pushState("","",(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.xl)(new URL((0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.Lu)()),{modal:`${alreadyOpenModals??""}${action.payload.modalId}`}))}const{activeElement}=document;var elementToStore;activeElement&&"BODY"!==activeElement.tagName&&(elementToStore=activeElement)&&focusContainerArray.push(elementToStore)},closeModal(state,action){const modalId=state.modalIds.pop();state.modalIds.indexOf(action.payload.modalId)>-1&&state.modalIds.splice(state.modalIds.indexOf(action.payload.modalId),1),modalId&&(removeModalIdFromUrl(state),returnFocusElement()),0===state.modalIds.length&&(document.body.style.overflow="")},closeLastModal(state){document.body.style.overflow="";state.modalIds.pop()&&(removeModalIdFromUrl(state),returnFocusElement())},closeAllModals(state){document.body.style.overflow="",state.modalIds=[],removeModalIdFromUrl(state),returnFocusElement()}}}),{openModal,closeModal,closeLastModal,closeAllModals}=modalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=modalSlice.reducer},"./src/core/publizon/publizon.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{tt:()=>getGetV1UserReservationsQueryKey,de:()=>useDeleteV1UserReservationsIdentifier,PF:()=>useGetV1LibraryProfile,Qo:()=>useGetV1LoanstatusIdentifier,wK:()=>useGetV1ProductsIdentifier,VM:()=>useGetV1UserLoans,pA:()=>useGetV1UserReservations});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class PublizonServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","PublizonServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.gf)(core_token.CI)??(0,core_token.gf)(core_token._L),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.publizon),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new PublizonServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof PublizonServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,serviceUrl)}return null},getGetV1LibraryProfileQueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??["/v1/library/profile"],queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/v1/library/profile",method:"GET",signal}))(signal),...queryOptions}},useGetV1LibraryProfile=options=>{const queryOptions=getGetV1LibraryProfileQueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetV1UserLoansQueryOptions=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/v1/user/loans",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/v1/user/loans",method:"GET",params,signal}))(params,signal),...queryOptions}},useGetV1UserLoans=(params,options)=>{const queryOptions=getGetV1UserLoansQueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetV1LoanstatusIdentifierQueryOptions=(identifier,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/loanstatus/${identifier}`])(identifier);return{queryKey,queryFn:({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/loanstatus/${identifier}`,method:"GET",signal}))(identifier,signal),enabled:!!identifier,...queryOptions}},useGetV1LoanstatusIdentifier=(identifier,queryOptions)=>{const options=getGetV1LoanstatusIdentifierQueryOptions(identifier,queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query},getGetV1ProductsIdentifierQueryOptions=(identifier,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/products/${identifier}`])(identifier);return{queryKey,queryFn:({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/products/${identifier}`,method:"GET",signal}))(identifier,signal),enabled:!!identifier,...queryOptions}},useGetV1ProductsIdentifier=(identifier,options)=>{const queryOptions=getGetV1ProductsIdentifierQueryOptions(identifier,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetV1UserReservationsQueryKey=()=>["/v1/user/reservations"],getGetV1UserReservationsQueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetV1UserReservationsQueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/v1/user/reservations",method:"GET",signal}))(signal),...queryOptions}},useGetV1UserReservations=options=>{const queryOptions=getGetV1UserReservationsQueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getDeleteV1UserReservationsIdentifierMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{identifier}=props??{};return(identifier=>fetcher_fetcher({url:`/v1/user/reservations/${identifier}`,method:"DELETE"}))(identifier)},...mutationOptions}},useDeleteV1UserReservationsIdentifier=options=>{const mutationOptions=getDeleteV1UserReservationsIdentifierMutationOptions(options);return(0,es.useMutation)(mutationOptions)}},"./src/core/statistics/statistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>statistics});const statistics={searchQuery:{id:10,name:"OSS"},searchResultCount:{id:11,name:"OSS Results"},searchFacets:{id:20,name:"Søgning Facet"},materialType:{id:24,name:"Materialetype"},materialGenre:{id:25,name:"Materiale Genre"},materialLanguage:{id:29,name:"Materiale Sprog"},materialSource:{id:30,name:"Materiale Kilde"},materialTargetAudience:{id:31,name:"Materiale Målgruppe"},materialTopicNumber:{id:32,name:"Materiale - DK5-nummer (Emnetal)"},materialFictionNonFiction:{id:33,name:"Materiale Fiktion/nonfiktion"},materialStatus:{id:38,name:"Materiale Status"},searchResultNumberClick:{id:42,name:"Søgning - Resultatnummer klik"},campaignClick:{id:48,name:"Kampagneklik"},reservation:{id:50,name:"Reserver"},onlineReservation:{id:51,name:"Se online"},autosuggestClick:{id:54,name:"Autosuggest - klik"},campaignShown:{id:62,name:"KampagnePlus Titel"},renewSelectedMaterials:{id:55,name:"Forny valgte materialer"},renewAllMaterials:{id:56,name:"Forny alle materialer"},addToFavorites:{id:61,name:"Tilføj til liste"}}},"./src/core/statistics/useStatistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function useStatistics(){return window.wts||(window.wts={push(trackingProps){console.log(`Tracking: ${trackingProps[0]}, ${trackingProps[1]}, ${JSON.stringify(trackingProps[2])}`)}}),{track:(eventType,trackParameters)=>{const eventData={linkId:trackParameters.name,customClickParameter:{}};return eventData.customClickParameter[trackParameters.id]=trackParameters.trackedData,window.wts.push(["send",eventType,eventData]),new Promise((resolve=>{setTimeout((()=>{resolve("resolved")}),500)}))}}}__webpack_require__.d(__webpack_exports__,{B:()=>useStatistics})},"./src/core/store.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M_:()=>store,d4:()=>useSelector,qj:()=>persistor});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/redux/es/redux.js"),react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),redux_persist__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/redux-persist/es/index.js"),redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/redux-persist/lib/storage/session.js"),_text_slice__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/text.slice.ts"),_user_slice__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/user.slice.js"),_modal_slice__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/modal.slice.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/url.slice.ts"),_filter_slice__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/filter.slice.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/config.slice.ts"),_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/core/blockedModal.slice.ts"),_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts");const persistConfig={key:"dpl-react",storage:redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__.A,blacklist:["text","url","modal","config","blockedModal"]},store=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__.U1)({middleware:getDefaultMiddleware=>[...getDefaultMiddleware(),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__.Ay],reducer:(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.rL)(persistConfig,(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__.HY)({user:_user_slice__WEBPACK_IMPORTED_MODULE_4__.Ay,text:_text_slice__WEBPACK_IMPORTED_MODULE_3__.Ay,modal:_modal_slice__WEBPACK_IMPORTED_MODULE_5__.Ay,url:_url_slice__WEBPACK_IMPORTED_MODULE_6__.Ay,config:_config_slice__WEBPACK_IMPORTED_MODULE_8__.Ay,guardedRequests:_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__.Ay,blockedModal:_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__.Ay,filter:_filter_slice__WEBPACK_IMPORTED_MODULE_7__.Ay})),devTools:!1}),persistor=(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.GM)(store),useSelector=react_redux__WEBPACK_IMPORTED_MODULE_0__.d4},"./src/core/storybook/blockedArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blockedPatronDTitleText:{defaultValue:"D Title",control:{type:"text"}},blockedPatronDBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronSTitleText:{defaultValue:"S Title",control:{type:"text"}},blockedPatronSBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronFTitleText:{defaultValue:"F Title",control:{type:"text"}},blockedPatronFBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronETitleText:{defaultValue:"You have exceeded your fee limit",control:{type:"text"}},blockedPatronEBodyText:{defaultValue:"You are therefore not able to borrow or reserve materials from the library",control:{type:"text"}},blockedPatronWTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronWBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. Please contact the library for further information",control:{type:"text"}},blockedPatronOTitleText:{defaultValue:"O title",control:{type:"text"}},blockedPatronOBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronUTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronUBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. $Please contact the library for further information",control:{type:"text"}},blockedPatronELinkText:{defaultValue:"Pay your fees here",control:{type:"text"}},blockedPatronELinkUrl:{defaultValue:"https://unsplash.com/photos/r077pfFsdaU",control:{type:"text"}},blockedPatronCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close blocked patron modal"},blockedPatronModalAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal alerts you, that your patron has been blocked"},redirectOnBlockedUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/r077pfFsdaU"}}},"./src/core/storybook/deleteReservationModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={deleteReservationModalHeaderText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalDeleteQuestionText:{defaultValue:'{"type":"plural","text":["Do you want to cancel your reservation?","Do you want to cancel your reservations?"]}',control:{type:"text"}},deleteReservationModalNotRegrettableText:{defaultValue:"You cannot regret this action",control:{type:"text"}},deleteReservationModalDeleteButtonText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalCloseModalText:{defaultValue:"Close delete reservation modal",control:{type:"text"}},deleteReservationModalAriaDescriptionText:{defaultValue:"This button opens a modal that covers the entire page and contains the possibility to delete a selected reservation, or multiple selected reservations",control:{type:"text"}}}},"./src/core/storybook/globalConfigArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={errorMessagesConfig:{name:"Configuration for error messages behaviour",defaultValue:'{"containerId":"dpl-react-apps-error-messages","shouldOnlyShowOneError":true,"showCloseButton":true}',control:{type:"text"}}}},"./src/core/storybook/globalTextArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},multiselectAllOptionText:{name:"Multiselect - all option",defaultValue:"All",control:{type:"text"}},groupModalGoToMaterialAriaLabelText:{defaultValue:"Go to @label material details",control:{type:"text"}},availabilityAvailableText:{name:"Availability: available text",defaultValue:"Available",control:{type:"text"}},availabilityUnavailableText:{name:"Availability: unavailable text",defaultValue:"Unavailable",control:{type:"text"}},loansNotOverdueText:{defaultValue:"Longer return time",control:{type:"text"}},patronContactInfoBodyText:{defaultValue:"Patron contact info body text",control:{type:"text"}},pauseReservationModalBelowInputsText:{defaultValue:"Pause reservation modal below inputs text",control:{type:"text"}},materialDetailsCloseModalAriaLabelText:{defaultValue:"Close material details modal",control:{type:"text"}},findOnShelfExpandButtonExplanationText:{name:"Find on shelf expand button explanation text",defaultValue:"This button opens a modal",control:{type:"text"}},reservationsStillInQueueForText:{defaultValue:"Still in queue",control:{type:"text"}},materialDetailsModalAriaDescriptionText:{defaultValue:"This modal shows material details, and makes it possible to renew a material, of that material is renewable",control:{type:"text"}},changePickupLocationText:{name:"Change pickup location text",defaultValue:"Change pickup location",control:{type:"text"}},changeInterestPeriodText:{name:"Change interest period text",defaultValue:"Change interest period",control:{type:"text"}},modalReservationFormPickupLabelText:{name:"Modal reservation form pickup branch input label",defaultValue:"Change pickup location for your reservation.",control:{type:"text"}},screenReaderModalDescriptionPickupText:{name:"Screen reader modal description for pickup",defaultValue:"Change pickup location modal",control:{type:"text"}},closeModalAriaLabelPickupText:{name:"Close modal aria-label pickup",defaultValue:"Close pickup location modal",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterLabelText:{name:"Modal reservation form no interest after input label",defaultValue:"Change the amount of time after which you're no longer interested in this material.",control:{type:"text"}},screenReaderModalDescriptionInterestPeriodText:{name:"Screen reader modal description for interest period",defaultValue:"Change interest period modal",control:{type:"text"}},screenReaderModalDescriptionEmailText:{name:"Screen reader modal description for email",defaultValue:"Change email modal",control:{type:"text"}},screenReaderModalDescriptionSmsText:{name:"Screen reader modal description for sms",defaultValue:"Change mobile number modal",control:{type:"text"}},closeModalAriaLabelInterestPeriodText:{name:"Close modal aria-label interest period ",defaultValue:"Close interest period modal",control:{type:"text"}},closeModalAriaLabelSmsText:{name:"Close modal aria-label sms",defaultValue:"Close change mobile number modal",control:{type:"text"}},closeModalAriaLabelEmailText:{name:"Close modal aria-label email",defaultValue:"Close change email modal",control:{type:"text"}},deleteReservationModalButtonText:{name:"Delete reservation modal delete button text",defaultValue:"Ok",control:{type:"text"}},acceptModalAriaLabelText:{defaultValue:"accept modal aria label text",control:{type:"text"}},pauseReservationModalAriaDescriptionText:{defaultValue:"This modal makes it possible to pause your physical reservations",control:{type:"text"}},addToFavoritesAriaLabelText:{defaultValue:"Add @title to favorites list",control:{type:"text"}},removeFromFavoritesAriaLabelText:{defaultValue:"Remove @title from favorites list",control:{type:"text"}},acceptModalAriaDescriptionText:{defaultValue:"accept modal aria description text",control:{type:"text"}},acceptModalHeaderText:{defaultValue:"Hov, dit gebyr forhøjes!",control:{type:"text"}},acceptModalBodyText:{defaultValue:"Fornyer du dine lån, forhøjes dit gebyr. Alle materialer ikke kan fornys og lånet splittes derfor op. Ved overskredne lån modtager du et gebyr pr. lån og derfor forhøjes dit samlede gebyr, hvis du vælger at gå videre med at fornye.",control:{type:"text"}},acceptModalAreYouSureText:{defaultValue:"Er du sikker på du vil fornye?",control:{type:"text"}},acceptModalAcceptButtonText:{defaultValue:"Ja, forny mulige",control:{type:"text"}},acceptModalCancelButtonText:{defaultValue:"Annuller fornyelse",control:{type:"text"}},isLoadingHeartText:{defaultValue:"Indlæser",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},reservationListDigitalPickupText:{defaultValue:"Online access",control:{type:"text"}},errorBoundaryAlertBodyButtonAriaText:{defaultValue:"Close error message",control:{type:"text"}},loadingText:{defaultValue:"Loading...",control:{type:"text"}},pincodeSectionDescriptionText:{defaultValue:"Length of 4 characters",control:{type:"text"}}}},"./src/core/storybook/groupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalDueDateLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},groupModalDueDateMaterialText:{control:{type:"text"},defaultValue:"To be returned @date"},groupModalDueDateDigitalMaterialText:{control:{type:"text"},defaultValue:"Expires @date"},groupModalGoToMaterialText:{defaultValue:"Go to material details",control:{type:"text"}},groupModalDueDateHeaderText:{control:{type:"text"},defaultValue:"Due date @date"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount elements",control:{type:"text"}},groupModalCheckboxText:{control:{type:"text"},defaultValue:"Choose all"},groupModalHiddenLabelCheckboxOnMaterialText:{control:{type:"text"},defaultValue:"Select @label"},pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},showMoreText:{defaultValue:"show more",control:{type:"text"}}}},"./src/core/storybook/loanGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalRenewLoanDeniedMaxRenewalsReachedText:{control:{type:"text"},defaultValue:"Can't be renewed further"},groupModalDueDateWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},groupModalRenewLoanDeniedReservedText:{control:{type:"text"},defaultValue:"Reserved by another patron"},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:"Lent by another library",control:{type:"text"}},groupModalLoansCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped loans"},groupModalLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to renew materials"},groupModalButtonText:{control:{type:"text"},defaultValue:"Renewable (@count)"}}},"./src/core/storybook/materialDetailsModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={materialDetailsWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},materialDetailsPhysicalDueDateLabelText:{control:{type:"text"},defaultValue:"Afleveres"},materialDetailsLoanDateLabelText:{control:{type:"text"},defaultValue:"Loan date"},materialDetailsMaterialNumberLabelText:{control:{type:"text"},defaultValue:"Material Item Number"},materialDetailsLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},materialDetailsOverdueText:{control:{type:"text"},defaultValue:"Expired"},materialDetailsGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},materialDetailsDigitalDueDateLabelText:{control:{type:"text"},defaultValue:"Expires"},materialDetailsRenewLoanButtonText:{control:{type:"text"},defaultValue:"Renew your loan"},feesPageUrl:{defaultValue:"/user/me/fees",control:{type:"text"}},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}},ereolenMyPageUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}}}},"./src/core/storybook/pincodeArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={pincodeLengthMinConfig:{defaultValue:"4",control:{type:"number"}},pincodeLengthMaxConfig:{defaultValue:"5",control:{type:"number"}}}},"./src/core/storybook/renewalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={renewProcessingText:{control:{type:"text"},defaultValue:"Processing..."},renewButtonText:{control:{type:"text"},defaultValue:"Renew"},renewMaterialLoanSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loan"},renewMaterialLoanSuccessStatusText:{control:{type:"text"},defaultValue:"1 loan was renewed."},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"The loan could not be renewed"},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, your loan could not be renewed."},renewMaterialLoanErrorTitleText:{control:{type:"text"},defaultValue:"Renewal of your loan failed"},renewMaterialLoanErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loan. Please try again."},renewMaterialLoanButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loans"},renewGroupModalLoansSuccessStatusText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["1 loan has been renewed.","@count loans have been renewed."]}'},renewGroupModalLoansErrorTitleText:{control:{type:"text"},defaultValue:"Renewing your loans failed"},renewGroupModalLoansErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loans. Please try again."},renewGroupModalLoansButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"No loans could be renewed"},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, no one of your loans could be renewed."},renewCannotBeRenewedText:{control:{type:"text"},defaultValue:"Cannot be renewed"}}},"./src/core/storybook/reservationGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalReservationsCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped reservations"},groupModalReservationsLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to delete reservations"},readyForLoanCounterLabelText:{defaultValue:"Ready",control:{type:"text"}},removeAllReservationsText:{defaultValue:'{"type":"plural","text":["Remove reservation (@amount)","Remove reservations (@amount)"]}',control:{type:"text"}},pickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},reservationsReadyForPickupText:{defaultValue:"Reservations ready for pickup",control:{type:"text"}},physicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},digitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}}}},"./src/core/storybook/reservationListArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListYouAreInQueueText:{defaultValue:"You are in the reservation queue",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalDateRangeLabelText:{defaultValue:"Pause period",control:{type:"text"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:"Choose pause period",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},listDetailsNothingSelectedLabelText:{defaultValue:"Pick",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},deleteReservationModalSuccessTitleText:{name:"Delete reservation modal success title text",defaultValue:'{"type":"plural","text":["Reservation deleted","Reservations deleted"]}',control:{type:"text"}},deleteReservationModalSuccessStatusText:{name:"Delete reservation modal success status text",defaultValue:'{"type":"plural","text":["One reservation was deleted","@count reservations were deleted"]}',control:{type:"text"}},deleteReservationModalErrorsTitleText:{name:"Delete reservation modal errors title text",defaultValue:"An error occurred",control:{type:"text"}},deleteReservationModalErrorsStatusText:{name:"Delete reservation modal errors status text",defaultValue:"One or more reservations could not be deleted, please try again.",control:{type:"text"}},deleteReservationModalDeleteProcessingText:{name:"Delete reservation modal delete processing text",defaultValue:"Processing...",control:{type:"text"}}}},"./src/core/storybook/reservationMaterialDetailsArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},reservationDetailsConfig:{defaultValue:'{"allowRemoveReadyReservations": true}',control:{type:"text"}},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":14, "label":"14 days" } }',control:{type:"text"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsDateOfReservationTitleText:{defaultValue:"Date of reservation",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:"Not interested after",control:{type:"text"}},reservationDetailsChangeText:{defaultValue:"Apply changes",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{defaultValue:"Pickup branch",control:{type:"text"}},reservationDetailsButtonRemoveText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsStatusTitleText:{defaultValue:"Status",control:{type:"text"}},reservationDetailsBorrowBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},reservationDetailsReadyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsNumberInQueueLabelText:{defaultValue:"@count queued",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading...",control:{type:"text"}},reservationSuccessTitleText:{name:"Reservation success title",defaultValue:"Your reservation has been changed",control:{type:"text"}},reservationSuccessSubTitleText:{name:"Reservation success sub title",defaultValue:"Click the button below to close this window",control:{type:"text"}},reservationerrorTitleText:{name:"Reservation error title",defaultValue:"Something went wrong",control:{type:"text"}},reservationerrorSubTitleText:{name:"Reservation error sub title",defaultValue:"Click the button below to close this window and try again",control:{type:"text"}},reservationStatusButtonText:{name:"Reservation success button text",defaultValue:"Close",control:{type:"text"}}}},"./src/core/storybook/serviceUrlArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),process=__webpack_require__("./node_modules/process/browser.js");const __WEBPACK_DEFAULT_EXPORT__={[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbs]:{name:"Base url for the FBS API",defaultValue:process.env.FBS_BASEURL??"https://fbs-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.publizon]:{name:"Base url for the Publizon API",defaultValue:process.env.PUBLIZON_BASEURL??"https://pubhub-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.dplCms]:{name:"Base url for the DPL CMS API",defaultValue:process.env.CMS_BASEURL??"https://dpl-cms.docker",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.cover]:{name:"Base url for the cover service",defaultValue:"https://cover.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.materialList]:{name:"Base url for the material list service",defaultValue:"https://prod.materiallist.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbi]:{name:"Base url for the FBI API",defaultValue:"https://fbi-api.dbc.dk/next-present/graphql",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbiLocal]:{name:"Base url for the FBI API (local inventory)",defaultValue:"https://fbi-api.dbc.dk/next/graphql",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbiGlobal]:{name:"Base url for the FBI API (global inventory)",defaultValue:"https://fbi-api.dbc.dk/next-present/graphql",control:{type:"text"}}}},"./src/core/text.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,vn:()=>addTextEntries});const textSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"text",initialState:{data:{}},reducers:{addTextEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addTextEntries}=textSlice.actions,__WEBPACK_DEFAULT_EXPORT__=textSlice.reducer},"./src/core/token.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{CI:()=>TOKEN_USER_KEY,WG:()=>setToken,_L:()=>TOKEN_LIBRARY_KEY,g2:()=>TOKEN_UNREGISTERED_USER_KEY,gf:()=>getToken,y0:()=>hasToken});const tokens={},TOKEN_UNREGISTERED_USER_KEY="unregistered-user",TOKEN_USER_KEY="user",TOKEN_LIBRARY_KEY="library";function setToken(type,value){tokens[type]=value}function hasToken(type){return Boolean(tokens[type])}function getToken(type){return tokens[type]}},"./src/core/url.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,hx:()=>addUrlEntries});const urlSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"url",initialState:{data:{}},reducers:{addUrlEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addUrlEntries}=urlSlice.actions,__WEBPACK_DEFAULT_EXPORT__=urlSlice.reducer},"./src/core/user.slice.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Qn:()=>setStatusAuthenticated,xE:()=>setStatusUnauthenticated});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const attemptAuthentication=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.zD)("user/attemptAuthentication",(()=>Promise.resolve())),userSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.Z0)({name:"user",initialState:{status:"unauthenticated"},reducers:{updateStatus(state,action){"unauthenticated"!==state.status&&"attempting"!==state.status||(action.payload.hasToken?state.status="authenticated":action.payload.doFail&&"attempting"===state.status&&(state.status="failed"))},setStatusAuthenticated(state){state.status="authenticated"},setStatusUnauthenticated(state){state.status="unauthenticated"}},extraReducers:{[attemptAuthentication.pending]:state=>{state.status="attempting"}}}),{updateStatus,setStatusAuthenticated,setStatusUnauthenticated}=userSlice.actions,__WEBPACK_DEFAULT_EXPORT__=userSlice.reducer},"./src/core/utils/branches.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,ov:()=>useGetBranches,z5:()=>excludeBlacklistedBranches});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const excludeBlacklistedBranches=(branches,blacklist)=>branches.filter((item=>!blacklist.includes(item.branchId))),cleanBranchesId=branches=>branches.map((branch=>{const matches=/-(\d*)/g.exec(branch.branchId);return matches?matches[1]:""})).filter((item=>item)),useGetBranches=key=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.UK)(),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config(key,{transformer:"stringToArray"});return excludeBlacklistedBranches(branches,blacklistBranches)},__WEBPACK_DEFAULT_EXPORT__=()=>{const branches=useGetBranches("blacklistedSearchBranchesConfig");return cleanBranchesId(branches)};try{cleanBranchesId.displayName="cleanBranchesId",cleanBranchesId.__docgenInfo={description:"",displayName:"cleanBranchesId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#cleanBranchesId"]={docgenInfo:cleanBranchesId.__docgenInfo,name:"cleanBranchesId",path:"src/core/utils/branches.tsx#cleanBranchesId"})}catch(__react_docgen_typescript_loader_error){}try{useGetBranches.displayName="useGetBranches",useGetBranches.__docgenInfo={description:"",displayName:"useGetBranches",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#useGetBranches"]={docgenInfo:useGetBranches.__docgenInfo,name:"useGetBranches",path:"src/core/utils/branches.tsx#useGetBranches"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/config.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NV:()=>withConfig,UK:()=>useConfig});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/config.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useConfig=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.d4)((state=>state.config));return(key,options)=>{if("string"!=typeof data[key])throw new Error(`Config entry "${key}" is not defined.`);return"jsonParse"===(null==options?void 0:options.transformer)?JSON.parse(data[key]):"stringToArray"===(null==options?void 0:options.transformer)?data[key].split(","):"stringToNumber"===(null==options?void 0:options.transformer)?Number(data[key]):null==data?void 0:data[key]}},withConfig=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.A)(Component,"Config",_config_slice__WEBPACK_IMPORTED_MODULE_1__.Qw);try{withConfig.displayName="withConfig",withConfig.__docgenInfo={description:"",displayName:"withConfig",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/config.tsx#withConfig"]={docgenInfo:withConfig.__docgenInfo,name:"withConfig",path:"src/core/utils/config.tsx#withConfig"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/errors/HttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}__webpack_require__.d(__webpack_exports__,{A:()=>HttpError});class HttpError extends Error{constructor(status,message,context){super(message),this.status=status,this.message=message,this.context=context,_defineProperty(this,"name","HttpError"),_defineProperty(this,"statusCode",void 0),this.statusCode=status}}},"./src/core/utils/helpers/currency.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function formatCurrency(number){return number.toLocaleString("da-DK",{style:"currency",currency:"DKK"})}__webpack_require__.d(__webpack_exports__,{v:()=>formatCurrency})},"./src/core/utils/helpers/date.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,SL:()=>formatDateDependingOnDigitalMaterial,Yq:()=>formatDate,r6:()=>formatDateTime});var dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);const formatDate=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY"),formatDateTime=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY HH:mm"),formatDateDependingOnDigitalMaterial=({date,isDigital})=>isDigital?formatDateTime(date):formatDate(date),__WEBPACK_DEFAULT_EXPORT__=()=>Math.floor(Date.now()/1e3)},"./src/core/utils/helpers/general.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AQ:()=>patronAgeValid,C2:()=>getReleaseYearSearchResult,CT:()=>getRenewableMaterials,EA:()=>sortByLoanDate,El:()=>materialIsOverdue,Ey:()=>getManifestationPublicationYear,G:()=>materialIsFiction,G_:()=>convertPostIdToFaustId,Gm:()=>getAuthorNames,IN:()=>getReviewRelease,J$:()=>getCoverTint,JB:()=>getMaterialTypes,Ki:()=>pageSizeGlobal,L1:()=>getListItems,OH:()=>convertPostIdsToFaustIds,Sy:()=>orderManifestationsByYear,UV:()=>flattenCreators,VZ:()=>getManifestationType,X6:()=>daysBetweenDates,Y2:()=>sortByReservationDate,Y5:()=>getAllPids,ZG:()=>tallyUpFees,Zc:()=>getContributors,bn:()=>getAllFaustIds,e$:()=>getManifestationsPids,eD:()=>getScrollClass,fL:()=>getRecommenderMaterialLimits,hh:()=>getWorkPid,jM:()=>getColors,kj:()=>groupObjectArrayByProperty,m2:()=>daysBetweenTodayAndDate,ng:()=>stringifyValue,oq:()=>getAmountOfRenewableLoans,sP:()=>creatorsToString,tI:()=>getParams,yr:()=>getLatestManifestation,yy:()=>getPublicationName});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),dayjs__WEBPACK_IMPORTED_MODULE_18__=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/dayjs/dayjs.min.js")),dayjs__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_18__),_configuration__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/configuration/index.ts"),_url__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/core/utils/helpers/url.ts"),_store__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/store.ts"),_currency__WEBPACK_IMPORTED_MODULE_22__=(__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),__webpack_require__("./src/core/utils/helpers/currency.ts"));const getManifestationPublicationYear=manifestation=>{var _manifestation$editio,_manifestation$editio2;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio||null===(_manifestation$editio2=_manifestation$editio.publicationYear)||void 0===_manifestation$editio2?void 0:_manifestation$editio2.display)||null},orderManifestationsByYear=(manifestations,order="desc")=>manifestations.sort(((a,b)=>{const currentDate=Number(getManifestationPublicationYear(a)),prevDate=Number(getManifestationPublicationYear(b));return"desc"===order?prevDate-currentDate:currentDate-prevDate})),flattenCreators=creators=>creators.map((creator=>creator.display)),creatorsToString=(creators,t)=>{if(creators.length>1){return`${creators.slice(0,2).join(", ")} ${t("etAlText")}`}return creators[0]},getLatestManifestation=manifestations=>orderManifestationsByYear(manifestations,"desc")[0],getWorkPid=work=>work.manifestations.bestRepresentation.pid||null,getCoverTint=index=>{const conf=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.FI)("coverTints",_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay),{coverTints}=conf;if(coverTints){return coverTints[index%coverTints.length]}},getColors=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.FI)("colors",_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay),getRecommenderMaterialLimits=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.FI)("recommenderMaterialLimits",_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay),daysBetweenTodayAndDate=date=>{const inputDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(date)),today=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date);return Math.ceil(inputDate.diff(today,"day",!0))},daysBetweenDates=(firstDate,secondDate)=>{const inputFirstDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(firstDate)),inputSecondDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(secondDate));return Math.ceil(inputFirstDate.diff(inputSecondDate,"day",!0))},convertPostIdToFaustId=postId=>{const matches=postId.match(/^[0-9]+-[a-z]+:([a-zA-Z0-9-]+)$/);if(null!=matches&&matches[1])return null==matches?void 0:matches[1];throw new Error(`Unable to extract faust id from post id "${postId}"`)},convertPostIdsToFaustIds=postIds=>postIds.map((pid=>convertPostIdToFaustId(pid))),getParams=props=>Object.entries(props).reduce(((acc,[property,value])=>{const paramValue=value||(0,_url__WEBPACK_IMPORTED_MODULE_23__.d6)(property);return{...acc,[property]:paramValue?String(paramValue):""}}),{}),sortByLoanDate=list=>list.sort(((a,b)=>new Date(a.loanDate||new Date).getTime()-new Date(b.loanDate||new Date).getTime())),sortByReservationDate=list=>list.sort(((objA,objB)=>new Date(objA.dateOfReservation||new Date).getTime()-new Date(objB.dateOfReservation||new Date).getTime())),getRenewableMaterials=list=>list.filter((({isRenewable})=>isRenewable)),getAmountOfRenewableLoans=list=>getRenewableMaterials(list).length,groupObjectArrayByProperty=(array,property)=>array.reduce(((result,current)=>{const groupBy=current[property];if(!groupBy)return result;const key=String(groupBy);return key in result?{...result,[key]:[...result[key],current]}:{...result,[key]:[current]}}),{}),getManifestationsPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),stringifyValue=value=>value?String(value):"",materialIsFiction=({fictionNonfiction})=>"FICTION"===(null==fictionNonfiction?void 0:fictionNonfiction.code),getListItems=(list,itemsShown)=>[...list].splice(0,itemsShown),pageSizeGlobal=(pageSizes,configName)=>{let pageSize=0;return pageSize=null!=pageSizes&&pageSizes.desktop&&null!=pageSizes&&pageSizes.mobile?(({desktop,mobile})=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.jM)("pageSize",{pageSize:{mobile:{pageSize:mobile},desktop:{pageSize:desktop}}});return Number(pageSize)})(pageSizes):(pageSizeConf=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.jM)(pageSizeConf,_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay);return Number(pageSize)})(configName||"pageSize"),pageSize},materialIsOverdue=date=>dayjs__WEBPACK_IMPORTED_MODULE_18___default()().isAfter(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(date),"day"),tallyUpFees=fees=>(0,_currency__WEBPACK_IMPORTED_MODULE_22__.v)(fees.reduce(((total,{amount})=>total+amount),0)),getMaterialTypes=(manifestations,onlyFirstType=!0)=>onlyFirstType?lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map(((type,i)=>0===i?type.materialTypeSpecific.display:null)))).flat().filter((type=>null!==type))):lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map((type=>{var _type$materialTypeSpe;return null===(_type$materialTypeSpe=type.materialTypeSpecific)||void 0===_type$materialTypeSpe?void 0:_type$materialTypeSpe.display})))).flat()),getManifestationType=manifestations=>getMaterialTypes(manifestations)[0],getAllPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),getAllFaustIds=manifestations=>convertPostIdsToFaustIds(getAllPids(manifestations)),getScrollClass=modalIds=>modalIds.length>0?"scroll-lock-background":"";const patronAgeValid=(cpr,minAge)=>{const cprDate=function getDateFromCpr(cprInput){const dateSegments=cprInput.replace(/[^\d]/g,"").substring(0,6).match(/.{1,2}/g);if(dateSegments){const[day,month,year]=dateSegments;let prefix="";prefix=Number(year)<21?"20":"19";const yearWithPrefix=Number(`${prefix}${year}`);return new Date(Date.UTC(yearWithPrefix,Number(month)-1,Number(day),0,0,0,0))}return null}(cpr);if(null===cprDate)return!1;return dayjs__WEBPACK_IMPORTED_MODULE_18___default()().diff(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(cprDate),"year")>minAge},getAuthorNames=(creators,by,and)=>{const names=creators.map((({display})=>display));let returnContentString="";return 0===names.length||(returnContentString=1===names.length?`${by?`${by} `:""}${names.join(", ")}`:`${by?`${by} `:""} ${names.slice(0,-1).join(", ")} ${and?`${and} `:""}${names.slice(-1)}`),returnContentString},getPublicationName=hostPublication=>hostPublication?hostPublication.title:"",getReviewRelease=(dateFirstEdition,workYear,edition)=>{var _edition$publicationY;return(null==dateFirstEdition?void 0:dateFirstEdition.display)||(null==workYear?void 0:workYear.display)||(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)||null},getReleaseYearSearchResult=work=>{const{latest,bestRepresentation}=work.manifestations,manifestation=bestRepresentation||latest;var _work$workYear,_work$workYear2,_manifestation$workYe,_manifestation$dateFi,_manifestation$editio3,_manifestation$editio4;return materialIsFiction(work)?null===(_work$workYear=work.workYear)||void 0===_work$workYear?void 0:_work$workYear.year:materialIsFiction(manifestation)?(null===(_work$workYear2=work.workYear)||void 0===_work$workYear2?void 0:_work$workYear2.year)||(null===(_manifestation$workYe=manifestation.workYear)||void 0===_manifestation$workYe?void 0:_manifestation$workYe.year)||(null===(_manifestation$dateFi=manifestation.dateFirstEdition)||void 0===_manifestation$dateFi?void 0:_manifestation$dateFi.year)||(null===(_manifestation$editio3=manifestation.edition)||void 0===_manifestation$editio3||null===(_manifestation$editio4=_manifestation$editio3.publicationYear)||void 0===_manifestation$editio4?void 0:_manifestation$editio4.display):getManifestationPublicationYear(latest)||""},getContributors=(short,creators)=>{const{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_20__.M_.getState();if(creators&&creators.length>0){if(2===creators.length)return`${texts.materialByAuthorText} ${creators.join(` ${texts.materialAndAuthorText} `)}`;if(creators.length>2)return short?((creators,byText,etAlText)=>`${byText} ${creators.slice(0,2).join(", ")} ${etAlText}`)(creators,texts.materialByAuthorText,texts.etAlText):((creators,byText,andText)=>`${byText} ${creators.slice(0,-1).join(", ")} ${andText} ${creators.slice(-1)}`)(creators,texts.materialByAuthorText,texts.materialAndAuthorText)}return creators[0]}},"./src/core/utils/helpers/invalid-switch-case.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=function invalidSwitchCase(x){return console.error(`Invalid case for ${x}`),x}},"./src/core/utils/helpers/lazy-load.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>useItemHasBeenVisible});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js");const useItemHasBeenVisible=()=>{const itemRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_1__.A)(itemRef,{root:null,rootMargin:"0%",threshold:0}),isInViewPort=Boolean(null==intersection?void 0:intersection.isIntersecting),[hasBeenVisible,setHasBeenVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{hasBeenVisible||isInViewPort&&setHasBeenVisible(!0)}),[hasBeenVisible,isInViewPort]),{itemRef,hasBeenVisible:isInViewPort||hasBeenVisible}}},"./src/core/utils/helpers/list-mapper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$U:()=>mapFBSLoanToLoanType,Ml:()=>mapManifestationToBasicDetailsType,hg:()=>mapPublizonReservationToReservationType,ji:()=>mapPublizonLoanToLoanType,sl:()=>mapFBSReservationGroupToReservationType,z7:()=>mapProductToBasicDetailsType});var lodash_values__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/values.js"),lodash_values__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_values__WEBPACK_IMPORTED_MODULE_0__),lodash_keys__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/keys.js"),lodash_keys__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_1__),lodash_head__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/lodash/head.js"),lodash_head__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_head__WEBPACK_IMPORTED_MODULE_2__),_store__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/store.ts"),_general__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/general.ts");function getSeriesString(series){return series.map((({title,numberInSeries})=>{var _numberInSeries$numbe;return numberInSeries&&numberInSeries.number?`${title} ${null===(_numberInSeries$numbe=numberInSeries.number)||void 0===_numberInSeries$numbe?void 0:_numberInSeries$numbe[0]}`:title})).join(", ")}const mapPublizonLoanToLoanType=list=>list.map((({loanExpireDateUtc,orderDateUtc,libraryBook})=>({dueDate:loanExpireDateUtc,loanDate:orderDateUtc,isRenewable:!1,materialItemNumber:(null==libraryBook?void 0:libraryBook.identifier)||"",renewalStatusList:[],loanType:null,identifier:(null==libraryBook?void 0:libraryBook.identifier)||null,faust:null,loanId:null}))),mapFBSLoanToLoanType=list=>list.map((({loanDetails,isRenewable,renewalStatusList})=>{var _loanDetails$periodic;return{dueDate:loanDetails.dueDate,loanDate:loanDetails.loanDate,periodical:(null===(_loanDetails$periodic=loanDetails.periodical)||void 0===_loanDetails$periodic?void 0:_loanDetails$periodic.displayText)||"",renewalStatusList,isRenewable,materialItemNumber:loanDetails.materialItemNumber,loanType:loanDetails.loanType,identifier:null,faust:loanDetails.recordId||null,loanId:loanDetails.loanId,details:loanDetails.ilBibliographicRecord?{title:loanDetails.ilBibliographicRecord.title,authors:loanDetails.ilBibliographicRecord.author,authorsShort:loanDetails.ilBibliographicRecord.author,firstAuthor:loanDetails.ilBibliographicRecord.author,year:loanDetails.ilBibliographicRecord.publicationDate,lang:loanDetails.ilBibliographicRecord.language}:null}})),mapProductToBasicDetailsType=material=>{const{publicationDate,title,description,productType,contributors,externalProductId,languageCode}=material,{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_3__.M_.getState(),digitalProductType={1:texts.publizonEbookText,2:texts.publizonAudioBookText,4:texts.publizonPodcastText},authors=(null==contributors?void 0:contributors.map((({firstName,lastName})=>`${firstName} ${lastName}`)))||[];return{title,lang:languageCode,periodical:null,year:publicationDate?(date=publicationDate,new Date(date).getFullYear()):"",description,materialType:productType?digitalProductType[productType]:"",externalProductId:null==externalProductId?void 0:externalProductId.id,authors:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!1,authors):"",authorsShort:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!0,authors):""};var date},mapManifestationToBasicDetailsType=material=>{var _languages$main,_languages$main$;const{edition,abstract,titles,pid,materialTypes,creators,series,languages}=material,isoCode=(null==languages||null===(_languages$main=languages.main)||void 0===_languages$main||null===(_languages$main$=_languages$main[0])||void 0===_languages$main$?void 0:_languages$main$.isoCode)??"",description=abstract?abstract[0]:"",{full:[fullText]}=titles||{full:[]},{publicationYear}=edition||{},{display:year}=publicationYear||{},inputContributorsArray=(null==creators?void 0:creators.map((({display})=>display)))||[],firstAuthor=creators&&creators.length?creators[0].display:"";return{lang:isoCode,authors:(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!1,inputContributorsArray),authorsShort:(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!0,inputContributorsArray),firstAuthor,pid,title:fullText,year,description,series:series&&series.length>0?getSeriesString(series):"",materialType:materialTypes?materialTypes[0].materialTypeSpecific.display:void 0}},mapPublizonReservationToReservationType=list=>list.map((({identifier,createdDateUtc,status,expectedRedeemDateUtc,productTitle,expireDateUtc})=>({identifier,faust:null,dateOfReservation:createdDateUtc,expiryDate:expireDateUtc,state:status?{1:"reserved",2:"readyForPickup",3:"redeemed",4:"cancelled",5:"expired"}[status]:null,title:productTitle,pickupDeadline:expectedRedeemDateUtc}))),mapFBSReservationGroupToReservationType=list=>list.map((({dateOfReservation,expiryDate,numberInQueue,state,pickupBranch,pickupDeadline,pickupNumber,periodical,records,ilBibliographicRecord})=>({periodical:(null==periodical?void 0:periodical.displayText)||"",faust:lodash_head__WEBPACK_IMPORTED_MODULE_2___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_1___default()(records)),dateOfReservation,expiryDate,numberInQueue,state:"readyForPickup"===state?"readyForPickup":"reserved",pickupBranch,pickupDeadline,pickupNumber,reservationIds:lodash_values__WEBPACK_IMPORTED_MODULE_0___default()(records),details:ilBibliographicRecord?{title:ilBibliographicRecord.title,authors:ilBibliographicRecord.author,authorsShort:ilBibliographicRecord.author,firstAuthor:ilBibliographicRecord.author,year:ilBibliographicRecord.publicationDate,lang:ilBibliographicRecord.language}:null})))},"./src/core/utils/helpers/modal-helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q0:()=>constructModalId,c6:()=>getModalIds,dI:()=>getDetailsModalId,eF:()=>containsDueDateModalQueryParam,xx:()=>dateFromDueDateModalQueryParam});var _configuration__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/configuration/index.ts");const constructModalId=(prefix,fragments)=>[prefix,...fragments].join("-"),getModalIds=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_0__.FI)("modalIds",_configuration__WEBPACK_IMPORTED_MODULE_0__.Ay),containsDueDateModalQueryParam=queryParam=>{const{dueDateModal}=getModalIds(),regex=new RegExp(`${dueDateModal}\\d{4}-\\d{2}-\\d{2}`,"g"),dateFound=queryParam.match(regex);return dateFound?dateFound[0]:null},dateFromDueDateModalQueryParam=queryParam=>{const dateFound=queryParam.match(/\d{4}-\d{2}-\d{2}/g);return dateFound?dateFound[0]:null},getDetailsModalId=(queryParam,prefix)=>{const regexIdentifier=new RegExp(`(?<=${prefix})((\\d{13})|((\\d{10}))||((\\d{9}))|(\\d{8}))`,"g"),modalId=queryParam.match(regexIdentifier);if(modalId){const[returnId]=modalId;return returnId}return""}},"./src/core/utils/helpers/renewal.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TO:()=>filterRenewResponseData,OX:()=>getRenewButtonLabel,Pl:()=>succeededRenewalCount});let RenewStatus=function(RenewStatus){return RenewStatus.renewed="renewed",RenewStatus.deniedReserved="deniedReserved",RenewStatus.deniedMaxRenewalsReached="deniedMaxRenewalsReached",RenewStatus.deniedLoanerIsBlocked="deniedLoanerIsBlocked",RenewStatus.deniedMaterialIsNotLoanable="deniedMaterialIsNotLoanable",RenewStatus.deniedMaterialIsNotFound="deniedMaterialIsNotFound",RenewStatus.deniedLoanerNotFound="deniedLoanerNotFound",RenewStatus.deniedLoaningProfileNotFound="deniedLoaningProfileNotFound",RenewStatus.deniedOtherReason="deniedOtherReason",RenewStatus}({});const filterRenewResponseData=data=>data.filter((loan=>loan.renewalStatus[0]===RenewStatus.renewed)),succeededRenewalCount=renewingResponse=>filterRenewResponseData(renewingResponse||[]).length,getRenewButtonLabel=({isRenewable,renewingStatus,t,defaultText})=>isRenewable?"pending"===renewingStatus?t("renewProcessingText"):defaultText??t("renewButtonText"):t("renewCannotBeRenewedText")},"./src/core/utils/helpers/url.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$u:()=>setQueryParametersInUrl,Ks:()=>isUrlValid,Lu:()=>getCurrentLocation,MR:()=>removeQueryParametersFromUrl,Qj:()=>constructMaterialUrl,SE:()=>redirectTo,bX:()=>redirectToLoginAndBack,d6:()=>getUrlQueryParam,fN:()=>constructSearchUrlWithFilter,gG:()=>currentLocationWithParametersUrl,tP:()=>turnUrlStringsIntoObjects,x4:()=>constructAdvancedSearchUrl,xl:()=>appendQueryParametersToUrl,zy:()=>constructSearchUrl});const getCurrentLocation=()=>String(window.location),appendQueryParametersToUrl=(url,parameters)=>{const processedUrl=new URL(url);return Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,encodeURI(parameters[key]))})),processedUrl},getUrlQueryParam=param=>{const queryParams=new URLSearchParams(window.location.search);return queryParams.get(param)?decodeURI(String(queryParams.get(param))):null},setQueryParametersInUrl=parameters=>{const processedUrl=new URL(getCurrentLocation());Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,parameters[key])})),window.history.replaceState(null,"",processedUrl)},removeQueryParametersFromUrl=parameter=>{const processedUrl=new URL(getCurrentLocation());var replacementUrl;processedUrl.searchParams.delete(parameter),replacementUrl=processedUrl,window.history.replaceState(null,"",replacementUrl)},redirectTo=url=>{window.location.assign(String(url))},processUrlPlaceholders=(url,placeholders)=>{let processedUrl=url;return placeholders.forEach((placeholder=>{const[name,replacement]=placeholder;processedUrl=((url,placeholderName,replacement)=>{const regex=new RegExp(`${placeholderName}`,"g");return url.match(regex)?url.replace(regex,replacement):url})(processedUrl,name,replacement)})),processedUrl},constructMaterialUrl=(url,workId,type)=>{const materialUrl=new URL(url);return materialUrl.pathname=processUrlPlaceholders(materialUrl.pathname,[[":workid",workId]]),type?appendQueryParametersToUrl(materialUrl,{type}):materialUrl},constructSearchUrl=(searchUrl,q)=>appendQueryParametersToUrl(searchUrl,{q}),constructAdvancedSearchUrl=(advancedSearchUrl,q)=>appendQueryParametersToUrl(advancedSearchUrl,{advancedSearchCql:q}),constructSearchUrlWithFilter=args=>{const{searchUrl,selectedItemString,filter}=args;return appendQueryParametersToUrl(searchUrl,{q:selectedItemString,...filter})},turnUrlStringsIntoObjects=urls=>Object.keys(urls).reduce(((acc,key)=>({...acc,[key]:new URL(urls[key],getCurrentLocation())})),{});function redirectToLoginAndBack({authUrl,returnUrl,trackingFunction}){const{pathname,search,hash}=returnUrl,redirectUrl=appendQueryParametersToUrl(authUrl,{"current-path":`${pathname}${search}${hash}`});trackingFunction&&trackingFunction().then((()=>redirectTo(redirectUrl))),redirectTo(redirectUrl)}const isUrlValid=text=>{try{const url=new URL(text);return"http:"===url.protocol||"https:"===url.protocol}catch(err){return!1}},currentLocationWithParametersUrl=params=>appendQueryParametersToUrl(new URL(getCurrentLocation()),params)},"./src/core/utils/helpers/usePatronData.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>usePatronData});var _fbs_fbs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fbs/fbs.ts"),_user__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/user.ts");const usePatronData=()=>(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_0__.wq)({enabled:!(0,_user__WEBPACK_IMPORTED_MODULE_1__.ok)()})},"./src/core/utils/helpers/user.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{dG:()=>getUserToken,lT:()=>isBlocked,ok:()=>isAnonymous,u7:()=>isUnregistered,vn:()=>isResident});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),_token__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/token.js");const isAnonymous=()=>!(0,_token__WEBPACK_IMPORTED_MODULE_1__.y0)("user"),isUnregistered=()=>(0,_token__WEBPACK_IMPORTED_MODULE_1__.y0)("unregistered-user"),isBlocked=patron=>!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(patron.blockStatus),isResident=patron=>patron.resident,getUserToken=()=>isUnregistered()?(0,_token__WEBPACK_IMPORTED_MODULE_1__.gf)(_token__WEBPACK_IMPORTED_MODULE_1__.g2):isAnonymous()?null:(0,_token__WEBPACK_IMPORTED_MODULE_1__.gf)(_token__WEBPACK_IMPORTED_MODULE_1__.CI)},"./src/core/utils/modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>modal,X:()=>useModalButtonHandler});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),CloseLarge=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/CloseLarge.svg"),CloseLarge_default=__webpack_require__.n(CloseLarge),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),process=__webpack_require__("./node_modules/process/browser.js");const isVitestEnvironment=void 0!==process&&process.env&&process.env.VITEST;function Modal({modalId,closeModalAriaLabelText,children,screenReaderModalDescriptionText,classNames,isSlider,dataCy="modal",eventCallbacks}){const dispatch=(0,es.wA)(),{modalIds}=(0,es.d4)((s=>s.modal));if((0,react.useEffect)((()=>{var _searchParams$get,_searchParams$get2;const searchParams=new URLSearchParams(window.location.search);null!==(_searchParams$get=searchParams.get("modal"))&&void 0!==_searchParams$get&&_searchParams$get.includes(modalId)&&dispatch((0,modal_slice.qf)({modalId})),!searchParams.get("modal")||null!==(_searchParams$get2=searchParams.get("modal"))&&void 0!==_searchParams$get2&&_searchParams$get2.includes(modalId)||(searchParams.delete("modal"),window.history.replaceState({},"",window.location.href.replace(`&modal=${searchParams.get("modal")}`,"")),document.body.style.overflow="")}),[modalId,dispatch]),modalIds&&!modalIds.includes(modalId))return null;const close=()=>{null!=eventCallbacks&&eventCallbacks.close&&eventCallbacks.close(),dispatch((0,modal_slice.Oo)({modalId}))};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{fallbackFocus:isVitestEnvironment?"body":void 0}},react.createElement("div",null,react.createElement("div",{className:"modal-backdrop",style:{zIndex:modalIds.indexOf(modalId)+20},onClick:()=>{close()}}),react.createElement("div",{className:(0,clsx.A)("modal",{"modal-show":modalIds.includes(modalId)},classNames),role:"dialog","aria-labelledby":`modal-${modalId}-description`,"data-cy":dataCy,style:{zIndex:modalIds.indexOf(modalId)+21}},react.createElement("div",{className:"modal__screen-reader-description",id:`modal-${modalId}-description`},screenReaderModalDescriptionText),react.createElement("button",{type:"button",className:"btn-ui modal-btn-close "+(isSlider?"":"modal-btn-close--offset"),style:{zIndex:modalIds.indexOf(modalId)+20},"aria-label":closeModalAriaLabelText,onClick:()=>{close()},"data-cy":`modal-${modalId}-close-button`},react.createElement("img",{src:CloseLarge_default(),alt:"",style:{pointerEvents:"none"}})),children)))}const useModalButtonHandler=()=>{const dispatch=(0,es.wA)();return{open:modalId=>dispatch((0,modal_slice.qf)({modalId})),close:modalId=>dispatch((0,modal_slice.Oo)({modalId})),closeAll:()=>dispatch((0,modal_slice.s7)()),openGuarded:({authUrl,modalId,trackOnlineView})=>{if((0,user.ok)()){const returnUrl=(0,url.gG)({modal:modalId});(0,url.bX)({authUrl,returnUrl,trackingFunction:trackOnlineView})}else trackOnlineView&&trackOnlineView(),dispatch((0,modal_slice.qf)({modalId}))}}},modal=Modal;try{Modal.displayName="Modal",Modal.__docgenInfo={description:"",displayName:"Modal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},closeModalAriaLabelText:{defaultValue:null,description:"",name:"closeModalAriaLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"modal"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isSlider:{defaultValue:null,description:"",name:"isSlider",required:!1,type:{name:"boolean | undefined"}},eventCallbacks:{defaultValue:null,description:"",name:"eventCallbacks",required:!1,type:{name:"{ close?: (() => void) | undefined; } | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/modal.tsx#Modal"]={docgenInfo:Modal.__docgenInfo,name:"Modal",path:"src/core/utils/modal.tsx#Modal"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,TJ:()=>serviceUrlKeys,aW:()=>getServiceBaseUrl});const serviceUrlKeys={fbs:"fbsBaseUrl",publizon:"publizonBaseUrl",dplCms:"dplCmsBaseUrl",cover:"coverBaseUrl",materialList:"materialListBaseUrl",fbi:"fbiBaseUrl",fbiLocal:"fbiLocalBaseUrl",fbiGlobal:"fbiGlobalBaseUrl"};let serviceBaseUrls={};const filterUrls=(urls,filterFunction)=>Object.keys(urls).filter(filterFunction).reduce(((obj,key)=>({...obj,[key]:urls[key]})),{}),getServiceBaseUrl=apiBaseUrlKey=>{if(!serviceBaseUrls[apiBaseUrlKey])throw new Error(`Service base url for ${apiBaseUrlKey} is not defined.`);return serviceBaseUrls[apiBaseUrlKey]},__WEBPACK_DEFAULT_EXPORT__=()=>next=>action=>{if("url/addUrlEntries"===String(action.type)){const{payload:{entries}}=action;serviceBaseUrls=filterUrls(entries,(key=>Object.values(serviceUrlKeys).includes(key)));const otherUrls=filterUrls(entries,(key=>!Object.values(serviceUrlKeys).includes(key)));return next({...action,payload:{entries:otherUrls}})}return next(action)}},"./src/core/utils/text.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>useText,i:()=>withText});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_text_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/text.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");class TextDefinitionError extends Error{constructor(message){super(message),this.name="TextDefinitionError"}}const useText=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.d4)((state=>state.text));return(key,{placeholders,count}={count:0})=>{if(!data)throw new Error("The translation store is broken.");if(void 0===data[key])throw new Error(`The translation for ${key} is not defined.`);const textDefinition=(rawText=>{if(!rawText.match(/^\{.*\}$/))return{type:"simple",text:[rawText]};try{const textDefinition=JSON.parse(rawText);if("object"==typeof textDefinition&&2===Object.keys(textDefinition).length&&Object.keys(textDefinition).includes("type")&&Object.keys(textDefinition).includes("text")&&["simple","plural"].includes((null==textDefinition?void 0:textDefinition.type)??"")&&Array.isArray(null==textDefinition?void 0:textDefinition.text)){const type=null==textDefinition?void 0:textDefinition.type,text=(null==textDefinition?void 0:textDefinition.text)??[];if(["simple"].includes(type)&&1!==text.length)throw new TextDefinitionError("Simple text definitions must have exactly one text entry");if(["plural"].includes(type)&&2!==text.length)throw new TextDefinitionError("Plural text definitions must have exactly two text entries");return textDefinition}}catch(error){const message=error instanceof Error?error.message:"Unknown error";throw new TextDefinitionError(`Could not parse rawText text format: ${rawText}. Message: ${message}`)}return{type:"simple",text:["Unknown text entry"]}})(data[key]),textPlaceholders={...placeholders??{}};"plural"===textDefinition.type&&(textPlaceholders["@count"]=String(count));const processedTexts=textPlaceholders?((texts,placeholders)=>texts.map((text=>text.replace(/@\w+/g,(match=>0===placeholders[match]?"0":String(placeholders[match]||match))))))(textDefinition.text,textPlaceholders):textDefinition.text;return"plural"===textDefinition.type?0===count?processedTexts[1]:processedTexts[1%(count??1)]:processedTexts[0]}},withText=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.A)(Component,"Text",_text_slice__WEBPACK_IMPORTED_MODULE_1__.vn);try{withText.displayName="withText",withText.__docgenInfo={description:"",displayName:"withText",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/text.tsx#withText"]={docgenInfo:withText.__docgenInfo,name:"withText",path:"src/core/utils/text.tsx#withText"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/types/loan-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isLoanType(item){return!!item.loanId||!!item.identifier}function loanId(loan){return String(loan.loanId||loan.identifier)}__webpack_require__.d(__webpack_exports__,{G:()=>loanId,R:()=>isLoanType})},"./src/core/utils/types/material-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{sN:()=>ManifestationMaterialType,wP:()=>AutosuggestCategory});let ManifestationMaterialType=function(ManifestationMaterialType){return ManifestationMaterialType.book="bog",ManifestationMaterialType.ebook="e-bog",ManifestationMaterialType.movie="film",ManifestationMaterialType.audioBook="lydbog (online)",ManifestationMaterialType.audioBookGeneric="lydbog",ManifestationMaterialType.music="node",ManifestationMaterialType.game="playstation 5",ManifestationMaterialType.animatedSeries="tegneserie",ManifestationMaterialType.article="artikel",ManifestationMaterialType.paperArticle="avisartikel",ManifestationMaterialType.onlineArticle="artikel (online)",ManifestationMaterialType.earticle="artikel",ManifestationMaterialType.boardGame="spil",ManifestationMaterialType.cdRom="cd",ManifestationMaterialType.magazine="tidsskrift",ManifestationMaterialType}({}),AutosuggestCategory=function(AutosuggestCategory){return AutosuggestCategory.book="bog",AutosuggestCategory.ebook="e-bog",AutosuggestCategory.movie="Film",AutosuggestCategory.audioBook="lydbog (online)",AutosuggestCategory.music="Musik",AutosuggestCategory.game="Spil",AutosuggestCategory.animatedSeries="tegneserie",AutosuggestCategory}({})},"./src/core/utils/types/reservation-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BP:()=>isDigitalReservation,OQ:()=>reservationId,uT:()=>isPhysicalReservation});__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js");function reservationId(reservation){return null!=reservation&&reservation.reservationIds&&reservation.reservationIds.length>0?String(reservation.reservationIds.at(0)):String(reservation.identifier)}function isPhysicalReservation(reservation){return!!reservation.faust&&!!reservation.reservationIds&&reservation.reservationIds.length>0}function isDigitalReservation(reservation){return!!reservation.identifier}},"./src/core/utils/url.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ik:()=>useUrls,nU:()=>withUrls});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/url.slice.ts"),_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useUrls=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_1__.d4)((state=>state.url)),urls=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>(0,_helpers_url__WEBPACK_IMPORTED_MODULE_4__.tP)(data)),[data]);return(name,returnFalseIfUndefined=!1)=>{if(returnFalseIfUndefined)return urls[name]||!1;if(!urls[name])throw new Error(`The url ${name} is not defined`);return urls[name]}},withUrls=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_3__.A)(Component,"Url",_url_slice__WEBPACK_IMPORTED_MODULE_2__.hx);try{withUrls.displayName="withUrls",withUrls.__docgenInfo={description:"",displayName:"withUrls",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/url.tsx#withUrls"]={docgenInfo:withUrls.__docgenInfo,name:"withUrls",path:"src/core/utils/url.tsx#withUrls"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useGetAvailability.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _fbs_fbs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fbs/fbs.ts"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/material/helper.ts");const __WEBPACK_DEFAULT_EXPORT__=({faustIds,config,options})=>{const{data,isLoading,isError}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_0__.io)((0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__.We)(faustIds,config,"availability"),options);return{data,isLoading,isError}}},"./src/core/utils/useLoanThresholds.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const __WEBPACK_DEFAULT_EXPORT__=()=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.UK)();return{warning:Number(config("expirationWarningDaysBeforeConfig")),danger:0}}},"./src/core/utils/useLoans.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js");var _fbs_fbs__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/fbs/fbs.ts"),_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/core/publizon/publizon.ts"),_helpers_general__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/core/utils/helpers/general.ts"),_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const filterLoansNotOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"";return(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.m2)(due)-warning>0})),filterLoansOverdue=loans=>loans.filter((({dueDate})=>(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.El)(dueDate))),filterLoansSoonOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"",daysUntilExpiration=(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.m2)(due);return daysUntilExpiration-warning<=0&&daysUntilExpiration-warning>=-warning})),sortByDueDate=list=>list.sort(((a,b)=>new Date(a.dueDate||new Date).getTime()-new Date(b.dueDate||new Date).getTime())),__WEBPACK_DEFAULT_EXPORT__=()=>{const{data:loansFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_16__.zw)(),{data:loansPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__.VM)(),threshold=(0,_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__.A)(),loansIsLoading=isLoadingFbs||isLoadingPublizon,loansIsError=isErrorFbs||isErrorPublizon,mappedLoansFbs=loansFbs&&Array.isArray(loansFbs)?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.$U)(loansFbs):[],mappedLoansPublizon=null!=loansPublizon&&loansPublizon.loans?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.ji)(loansPublizon.loans).filter((item=>item.dueDate)):[],loans=sortByDueDate([...mappedLoansFbs,...mappedLoansPublizon]),loansOverdueFBS=filterLoansOverdue(mappedLoansFbs),LoansOverduePublizon=filterLoansOverdue(mappedLoansPublizon),loansOverdue=sortByDueDate([...loansOverdueFBS,...LoansOverduePublizon]),loansSoonOverdueFBS=filterLoansSoonOverdue(mappedLoansFbs,threshold.warning),loansSoonOverduePublizon=filterLoansSoonOverdue(mappedLoansPublizon,threshold.warning),loansSoonOverdue=sortByDueDate([...loansSoonOverdueFBS,...loansSoonOverduePublizon]),loansFarFromOverdueFBS=filterLoansNotOverdue(mappedLoansFbs,threshold.warning),loansFarFromOverduePublizon=filterLoansNotOverdue(mappedLoansPublizon,threshold.warning),loansFarFromOverdue=sortByDueDate([...loansFarFromOverdueFBS,...loansFarFromOverduePublizon]),loansSortedByDateFbs=sortByDueDate(mappedLoansFbs),loansSortedByDatePublizon=sortByDueDate(mappedLoansPublizon);return{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue,farFromOverdue:loansFarFromOverdue,isLoading:loansIsLoading,isError:loansIsError},fbs:{loans:loansSortedByDateFbs,overdue:loansOverdueFBS,soonOverdue:loansSoonOverdueFBS,farFromOverdue:loansFarFromOverdueFBS,stackedMaterialsDueDates:(list=>Array.from(new Set(list.filter((({dueDate})=>null!==dueDate)).map((({dueDate})=>dueDate)).sort())))(mappedLoansFbs),isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{loans:loansSortedByDatePublizon,overdue:LoansOverduePublizon,soonOverdue:loansSoonOverduePublizon,farFromOverdue:loansFarFromOverduePublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/useRequestsWithStatus.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$K:()=>useSingleRequestWithStatus,mi:()=>useMultipleRequestsWithStatus});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const useMultipleRequestsWithStatus=({requests,onError,onSuccess})=>{const[requestStatus,setRequestStatus]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("idle");return{handler:(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setRequestStatus("pending");const operations=[];requests.forEach((({params,operation})=>{if("function"!=typeof operation)throw new Error("Operation must be a function.");operations.push(new Promise(((resolve,reject)=>{operation(params,{onSuccess:result=>{resolve(result)},onError:error=>{reject(error)}})})))})),Promise.all(operations).then((allResults=>{setRequestStatus("success"),onSuccess&&onSuccess(allResults)})).catch((error=>{setRequestStatus("error"),onError&&onError(error)}))}),[requests,onSuccess,onError]),requestStatus,setRequestStatus}},useSingleRequestWithStatus=({request,onError,onSuccess})=>useMultipleRequestsWithStatus({requests:[request],onError:onError?errors=>onError(errors[0]):void 0,onSuccess:onSuccess?results=>{onSuccess(results[0])}:void 0});try{useMultipleRequestsWithStatus.displayName="useMultipleRequestsWithStatus",useMultipleRequestsWithStatus.__docgenInfo={description:"",displayName:"useMultipleRequestsWithStatus",props:{requests:{defaultValue:null,description:"",name:"requests",required:!0,type:{name:"{ params: TParams; operation: TRequest; }[]"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse[]) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((errors: unknown[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"]={docgenInfo:useMultipleRequestsWithStatus.__docgenInfo,name:"useMultipleRequestsWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"})}catch(__react_docgen_typescript_loader_error){}try{useSingleRequestWithStatus.displayName="useSingleRequestWithStatus",useSingleRequestWithStatus.__docgenInfo={description:"",displayName:"useSingleRequestWithStatus",props:{request:{defaultValue:null,description:"",name:"request",required:!0,type:{name:"{ params: TParams; operation: TRequest; }"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((error: unknown) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"]={docgenInfo:useSingleRequestWithStatus.__docgenInfo,name:"useSingleRequestWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useReservations.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>utils_useReservations});var publizon=__webpack_require__("./src/core/publizon/publizon.ts"),list_mapper=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const api_strings_namespaceObject_h="reserved";var reduce=__webpack_require__("./node_modules/lodash/reduce.js"),reduce_default=__webpack_require__.n(reduce),min=__webpack_require__("./node_modules/lodash/min.js"),min_default=__webpack_require__.n(min),map=__webpack_require__("./node_modules/lodash/map.js"),map_default=__webpack_require__.n(map),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),fbs=__webpack_require__("./src/core/fbs/fbs.ts");function groupReservations(data){const reservationGroups=groupBy_default()(data,(reservation=>"parallel"===reservation.reservationType?reservation.transactionId:reservation.reservationId));return map_default()(reservationGroups,(reservationGroup=>({...reservationGroup[0],numberInQueue:min_default()(map_default()(reservationGroup,"numberInQueue")),records:reduce_default()(reservationGroup,((result,reservation)=>({...result,[reservation.recordId]:reservation.reservationId})),{})})))}const utils_useGetReservationGroups=()=>{const result=(0,fbs.$6)();return{...result,data:result.data&&Array.isArray(result.data)?groupReservations(result.data):null}};const getQueuedReservations=list=>[...list].filter((({state})=>state===api_strings_namespaceObject_h)),utils_useReservations=()=>{const{data:reservationsFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=utils_useGetReservationGroups(),{data:reservationsPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,publizon.pA)(),reservationsIsLoading=isLoadingFbs||isLoadingPublizon,reservationsIsError=isErrorFbs||isErrorPublizon,mappedReservationsFbs=reservationsFbs?(0,list_mapper.sl)(reservationsFbs):[],mappedReservationsPublizon=null!=reservationsPublizon&&reservationsPublizon.reservations?(0,list_mapper.hg)(reservationsPublizon.reservations):[],reservations=[...mappedReservationsFbs,...mappedReservationsPublizon],reservationsReadyToLoanFBS=(0,helpers.JU)(mappedReservationsFbs),reservationsReadyToLoanPublizon=(0,helpers.JU)(mappedReservationsPublizon),reservationsReadyToLoan=[...reservationsReadyToLoanFBS,...reservationsReadyToLoanPublizon],reservationsQueuedFBS=getQueuedReservations(mappedReservationsFbs),reservationsQueuedPublizon=getQueuedReservations(mappedReservationsPublizon);return{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:[...reservationsQueuedFBS,...reservationsQueuedPublizon],isLoading:reservationsIsLoading,isError:reservationsIsError},fbs:{reservations:mappedReservationsFbs,readyToLoan:reservationsReadyToLoanFBS,queued:reservationsQueuedFBS,isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{reservations:mappedReservationsPublizon,readyToLoan:reservationsReadyToLoanPublizon,queued:reservationsQueuedPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/useSavePatron.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-query/es/index.js"),_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/fbs/fbs.ts");const useSavePatron=({patron,fetchHandlers})=>{const{mutate}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__.AZ)(),queryClient=(0,react_query__WEBPACK_IMPORTED_MODULE_0__.useQueryClient)();return{savePatron:data=>{const{onSuccess,onError}=(null==fetchHandlers?void 0:fetchHandlers.savePatron)||{};patron&&mutate({data:{patron:{...patron,...data}}},{onSuccess:()=>{queryClient.invalidateQueries((0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__.gm)()),onSuccess&&onSuccess()},onError:()=>{onError&&onError()}})},savePincode:data=>{const{onSuccess,onError}=(null==fetchHandlers?void 0:fetchHandlers.savePincode)||{};patron&&mutate({data:{pincodeChange:data}},{onSuccess:()=>{queryClient.invalidateQueries((0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__.gm)()),onSuccess&&onSuccess()},onError:()=>{onError&&onError()}})}}},__WEBPACK_DEFAULT_EXPORT__=useSavePatron;try{useSavePatron.displayName="useSavePatron",useSavePatron.__docgenInfo={description:"",displayName:"useSavePatron",props:{patron:{defaultValue:null,description:"",name:"patron",required:!1,type:{name:"PatronV5 | undefined"}},fetchHandlers:{defaultValue:null,description:"",name:"fetchHandlers",required:!1,type:{name:"{ savePatron?: FetchHandlers | undefined; savePincode?: FetchHandlers | undefined; } | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useSavePatron.tsx#useSavePatron"]={docgenInfo:useSavePatron.__docgenInfo,name:"useSavePatron",path:"src/core/utils/useSavePatron.tsx#useSavePatron"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/withIsPatronBlockedHoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>utils_withIsPatronBlockedHoc});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),BlockedTypes=function(BlockedTypes){return BlockedTypes.extendedExclusion="F",BlockedTypes.deceased="D",BlockedTypes.fee="E",BlockedTypes.selfcreated="W",BlockedTypes.stolen="O",BlockedTypes.exclusion="U",BlockedTypes.automatonBlocked="S",BlockedTypes}(BlockedTypes||{});const types_BlockedTypes=BlockedTypes;var url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const BlockedModal=({blockedStatus})=>{const t=(0,utils_text.F)(),blockedPatronELinkUrl=(0,url.Ik)()("blockedPatronELinkUrl",!0),{blockedModal}=(0,modal_helpers.c6)();return blockedStatus&&""!==blockedStatus?react.createElement(modal.A,{modalId:blockedModal,classNames:"modal-cta modal-padding",closeModalAriaLabelText:t("blockedPatronCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("blockedPatronModalAriaDescriptionText")},react.createElement("div",{className:"modal-text__container"},react.createElement("h2",{className:"text-header-h3"},t(`blockedPatron${blockedStatus}TitleText`)),react.createElement("p",{className:"mt-48 mb-48 text-body-large"},t(`blockedPatron${blockedStatus}BodyText`)),blockedStatus===types_BlockedTypes.fee&&blockedPatronELinkUrl&&react.createElement(Link.A,{href:blockedPatronELinkUrl},t("blockedPatronELinkText")))):null},blocked_modal_BlockedModal=BlockedModal;try{BlockedModal.displayName="BlockedModal",BlockedModal.__docgenInfo={description:"",displayName:"BlockedModal",props:{blockedStatus:{defaultValue:null,description:"",name:"blockedStatus",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"]={docgenInfo:BlockedModal.__docgenInfo,name:"BlockedModal",path:"src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"})}catch(__react_docgen_typescript_loader_error){}var blockedModal_slice=__webpack_require__("./src/core/blockedModal.slice.ts"),store=__webpack_require__("./src/core/store.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const withIsPatronBlockedHoc=Component=>({redirectOnBlocked,...props})=>{const dispatch=(0,es.wA)(),{open}=(0,modal.X)(),{blockedModal}=(0,modal_helpers.c6)(),[blockedFromViewingContentArray]=(0,react.useState)([types_BlockedTypes.deceased,types_BlockedTypes.automatonBlocked,types_BlockedTypes.extendedExclusion,types_BlockedTypes.stolen]),[blockedStatus,setBlockedStatus]=(0,react.useState)(),[blockedFromViewingContent,setBlockedFromViewingContent]=(0,react.useState)(null),{data:patronData}=(0,usePatronData.I)(),{data:{hasBeenVisible}}=(0,store.d4)((state=>state.blockedModal));return(0,react.useEffect)((()=>{var _patronData$patron,_patronData$patron2,_patronData$patron2$b;patronData&&(null!=patronData&&null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.blockStatus&&(null==patronData||null===(_patronData$patron2=patronData.patron)||void 0===_patronData$patron2||null===(_patronData$patron2$b=_patronData$patron2.blockStatus)||void 0===_patronData$patron2$b?void 0:_patronData$patron2$b.length)>0?(setBlockedStatus(patronData.patron.blockStatus[0].blockedReason),hasBeenVisible||"string"!=typeof blockedModal||(open(blockedModal),dispatch((0,blockedModal_slice.ht)({hasBeenVisible:!0})))):setBlockedFromViewingContent(!1))}),[blockedModal,dispatch,hasBeenVisible,open,patronData]),(0,react.useEffect)((()=>{blockedStatus&&(blockedFromViewingContentArray.includes(blockedStatus)?(setBlockedFromViewingContent(!0),(0,helpers_url.SE)(new URL(redirectOnBlocked))):setBlockedFromViewingContent(!1))}),[blockedFromViewingContentArray,blockedStatus,redirectOnBlocked]),react.createElement(react.Fragment,null,react.createElement(blocked_modal_BlockedModal,{blockedStatus:blockedStatus||""}),!blockedFromViewingContent&&react.createElement(Component,props))},utils_withIsPatronBlockedHoc=withIsPatronBlockedHoc;try{withIsPatronBlockedHoc.displayName="withIsPatronBlockedHoc",withIsPatronBlockedHoc.__docgenInfo={description:"",displayName:"withIsPatronBlockedHoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"]={docgenInfo:withIsPatronBlockedHoc.__docgenInfo,name:"withIsPatronBlockedHoc",path:"src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/withSuffix.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts");const __WEBPACK_DEFAULT_EXPORT__=(Component,suffix,reduxAction)=>props=>{const pattern=new RegExp(`.*${suffix}$`,"g"),suffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>String(prop).match(pattern)))),nonSuffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>!String(prop).match(pattern))));return Object.keys(suffixEntries).length&&_store__WEBPACK_IMPORTED_MODULE_1__.M_.dispatch(reduxAction({entries:suffixEntries})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,nonSuffixEntries)}},"./storybook-init-framework-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".dpl-reset{animation:none 0s ease 0s 1 normal none running;backface-visibility:visible;background:#0000 none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:initial;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:initial;caption-side:top;clear:none;clip:auto;color:#000;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-span:1;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:inherit;font-size:inherit;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;hyphens:none;left:auto;letter-spacing:normal;line-height:inherit;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:initial;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:initial;visibility:visible;white-space:normal;widows:2;word-spacing:normal;z-index:auto}:root{--reach-dialog:1}[data-reach-dialog-overlay]{background:#00000054;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}[data-reach-dialog-content]{background:#fff;margin:10vh auto;outline:none;padding:2rem;width:50vw}","",{version:3,sources:["webpack://./src/components/reset.scss","webpack://./src/components/components.scss","webpack://./node_modules/@reach/dialog/styles.css"],names:[],mappings:"AAGA,WCFA,+CDGE,CAEA,2BAAA,CACA,wEAAA,CAEA,WAAA,CACA,uBAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,WAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CACA,UAAA,CACA,SAAA,CACA,UAAA,CAGA,mBAAA,CACA,iBAAA,CACA,oCAAA,CACA,aAAA,CACA,YAAA,CACA,cAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,mBAAA,CACA,iBAAA,CAIA,oBAAA,CAHA,kBAAA,CACA,oBAAA,CACA,mBAAA,CAKA,YAAA,CACA,SAAA,CACA,qBAAA,CALA,mBAAA,CAMA,4BAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,YAAA,CACA,WAAA,CACA,SAAA,CACA,SAAA,CACA,0BAAA,CACA,gBAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,gBAAA,CACA,0BAAA,CACA,eAAA,CACA,UAAA,CAEA,UAAA,CACA,iBAAA,CACA,eAAA,CACA,oBAAA,CACA,oBAAA,CACA,aAAA,CACA,gBAAA,CACA,mBAAA,CACA,QAAA,CACA,cAAA,CACA,wBAAA,CACA,oBAAA,CACA,0BAAA,CACA,mBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA,CACA,QAAA,CACA,mBAAA,CACA,YCHF,CClFA,MACC,gBDuFD,CCpFA,4BACC,oBAAA,CAIA,QAAA,CACA,MAAA,CACA,aAAA,CALA,cAAA,CAEA,OAAA,CADA,KD2FD,CCpFA,4BAGC,eAAA,CADA,gBAAA,CAGA,YAAA,CADA,YAAA,CAHA,UD2FD",sourcesContent:["// This is not to be extended!\n// When using it use it as a class on a DOM element.\n\n.dpl-reset {\n animation: none 0s ease 0s 1 normal none running;\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n background: transparent none repeat 0 0 / auto auto padding-box border-box\n scroll;\n border: medium none currentColor;\n border-collapse: separate;\n border-image: none;\n border-radius: 0;\n border-spacing: 0;\n bottom: auto;\n box-shadow: none;\n box-sizing: content-box;\n caption-side: top;\n clear: none;\n clip: auto;\n color: #000;\n columns: auto;\n column-count: auto;\n column-fill: balance;\n column-gap: normal;\n column-rule: medium none currentColor;\n column-span: 1;\n column-width: auto;\n content: normal;\n counter-increment: none;\n counter-reset: none;\n cursor: auto;\n direction: ltr;\n display: inline;\n empty-cells: show;\n float: none;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n font-stretch: inherit;\n line-height: inherit;\n -webkit-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n left: auto;\n letter-spacing: normal;\n list-style: disc outside none;\n margin: 0;\n max-height: none;\n max-width: none;\n min-height: 0;\n min-width: 0;\n opacity: 1;\n orphans: 2;\n outline: medium none invert;\n overflow: visible;\n overflow-x: visible;\n overflow-y: visible;\n padding: 0;\n page-break-after: auto;\n page-break-before: auto;\n page-break-inside: auto;\n perspective: none;\n perspective-origin: 50% 50%;\n position: static;\n right: auto;\n -moz-tab-size: 8;\n tab-size: 8;\n table-layout: auto;\n text-align: left;\n text-align-last: auto;\n text-decoration: none;\n text-indent: 0;\n text-shadow: none;\n text-transform: none;\n top: auto;\n transform: none;\n transform-origin: 50% 50% 0;\n transform-style: flat;\n transition: none 0s ease 0s;\n unicode-bidi: normal;\n vertical-align: baseline;\n visibility: visible;\n white-space: normal;\n widows: 2;\n word-spacing: normal;\n z-index: auto;\n}\n",'@import "reset";\n@import "../../node_modules/@reach/dialog/styles";\n// Component specific styling should be included here:\n',"/* This code is subject to LICENSE in root of this repository */\n\n/* Used to detect in JavaScript if apps have loaded styles or not. */\n:root {\n\t--reach-dialog: 1;\n}\n\n[data-reach-dialog-overlay] {\n\tbackground: hsla(0, 0%, 0%, 0.33);\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\toverflow: auto;\n}\n\n[data-reach-dialog-content] {\n\twidth: 50vw;\n\tmargin: 10vh auto;\n\tbackground: white;\n\tpadding: 2rem;\n\toutline: none;\n}\n"],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./apps/adgangsplatformen/auth.dev.jsx":"./src/apps/adgangsplatformen/auth.dev.jsx","./apps/adgangsplatformen/library-token.dev.tsx":"./src/apps/adgangsplatformen/library-token.dev.tsx","./apps/adgangsplatformen/user-token.dev.tsx":"./src/apps/adgangsplatformen/user-token.dev.tsx","./apps/advanced-search/AdvancedSearch.dev.tsx":"./src/apps/advanced-search/AdvancedSearch.dev.tsx","./apps/create-patron-user-info/CreatePatron.dev.tsx":"./src/apps/create-patron-user-info/CreatePatron.dev.tsx","./apps/dashboard/dashboard.dev.tsx":"./src/apps/dashboard/dashboard.dev.tsx","./apps/demo-modal/demo-modal.dev.tsx":"./src/apps/demo-modal/demo-modal.dev.tsx","./apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx","./apps/favorites-list/FavoritesList.dev.tsx":"./src/apps/favorites-list/FavoritesList.dev.tsx","./apps/fee-list/FeeList.dev.tsx":"./src/apps/fee-list/FeeList.dev.tsx","./apps/hello-world/hello-world.dev.tsx":"./src/apps/hello-world/hello-world.dev.tsx","./apps/loan-list/list/loan-list.dev.tsx":"./src/apps/loan-list/list/loan-list.dev.tsx","./apps/material-grid/automatic/MaterialGridAutomatic.dev.tsx":"./src/apps/material-grid/automatic/MaterialGridAutomatic.dev.tsx","./apps/material-grid/manual/MaterialGridManual.dev.tsx":"./src/apps/material-grid/manual/MaterialGridManual.dev.tsx","./apps/material-search/MaterialSearch.dev.tsx":"./src/apps/material-search/MaterialSearch.dev.tsx","./apps/material/material.dev.tsx":"./src/apps/material/material.dev.tsx","./apps/menu/menu.dev.tsx":"./src/apps/menu/menu.dev.tsx","./apps/opening-hours-editor/OpeningHoursEditor.dev.tsx":"./src/apps/opening-hours-editor/OpeningHoursEditor.dev.tsx","./apps/opening-hours/OpeningHours.dev.tsx":"./src/apps/opening-hours/OpeningHours.dev.tsx","./apps/patron-page/PatronPage.dev.tsx":"./src/apps/patron-page/PatronPage.dev.tsx","./apps/recommendation/recommendation.dev.tsx":"./src/apps/recommendation/recommendation.dev.tsx","./apps/recommended-material/RecommendedMaterial.dev.tsx":"./src/apps/recommended-material/RecommendedMaterial.dev.tsx","./apps/recommender/Recommender.dev.tsx":"./src/apps/recommender/Recommender.dev.tsx","./apps/reservation-list/list/reservation-list.dev.tsx":"./src/apps/reservation-list/list/reservation-list.dev.tsx","./apps/search-header/search-header.dev.tsx":"./src/apps/search-header/search-header.dev.tsx","./apps/search-result/search-result.dev.tsx":"./src/apps/search-result/search-result.dev.tsx","./apps/something-similar/SomethingSimilar.dev.tsx":"./src/apps/something-similar/SomethingSimilar.dev.tsx","./components/alert/alert.dev.jsx":"./src/components/alert/alert.dev.jsx","./components/availability-label/availability-label.dev.tsx":"./src/components/availability-label/availability-label.dev.tsx","./components/button-favourite/button-favourite.dev.tsx":"./src/components/button-favourite/button-favourite.dev.tsx","./components/cover/cover.dev.tsx":"./src/components/cover/cover.dev.tsx","./components/error-boundary-alert/ErrorBoundaryAlert.dev.tsx":"./src/components/error-boundary-alert/ErrorBoundaryAlert.dev.tsx","./components/find-on-shelf/FindOnShelfModal.dev.tsx":"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx","./components/hello/hello.dev.tsx":"./src/components/hello/hello.dev.tsx","./components/message/modal-message/ModalMessage.dev.tsx":"./src/components/message/modal-message/ModalMessage.dev.tsx","./components/multiselect/Multiselect.dev.tsx":"./src/components/multiselect/Multiselect.dev.tsx","./components/search-bar/search-bar.dev.tsx":"./src/components/search-bar/search-bar.dev.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$"},"data:image/svg+xml,%3Csvg width=%27205%27 height=%278%27 viewBox=%270 0 205 8%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1.11133 6.87425C73.7223 0.129386 128.695 1.4981 203.889 1.8943%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E%0A":module=>{"use strict";module.exports="data:image/svg+xml,%3Csvg width=%27205%27 height=%278%27 viewBox=%270 0 205 8%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1.11133 6.87425C73.7223 0.129386 128.695 1.4981 203.889 1.8943%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E%0A"},'data:image/svg+xml,':module=>{"use strict";module.exports='data:image/svg+xml,'},'data:image/svg+xml,':module=>{"use strict";module.exports='data:image/svg+xml,'},'data:image/svg+xml;utf8, ':module=>{"use strict";module.exports='data:image/svg+xml;utf8, '},"?4f7e":()=>{},"?9140":()=>{},"?22b2":()=>{},"?ed3f":()=>{},"?b1b0":()=>{},"?1d7f":()=>{},"?2b08":()=>{},"./generated-stories-entry.cjs":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$")],module,!1)},"./src/core/configuration/date-format.json":module=>{"use strict";module.exports=JSON.parse('{"$k":"DD. MM. YYYY","rX":"D. MMMM YYYY","n2":"YYYY-MM-DD"}')},"./src/core/configuration/modal-ids.json":module=>{"use strict";module.exports=JSON.parse('{"allLoansId":"all-loans-id","pauseReservation":"pause-reservation","deleteReservation":"delete-reservation","deleteReservations":"delete-reservations","loanDetails":"loan-details-","acceptModal":"accept-fee","reservationDetails":"reservation-details-","dueDateModal":"due-date","feeDetails":"fee-details-","userMenuAuthenticated":"user-modal-authenticated","userMenuAnonymous":"user-modal-anonymous","userMenuUnregistered":"user-modal-unregistered","blockedModal":"blocked-modal","reservationsReady":"reservations-ready","reservationsQueued":"reservations-queued"}')}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[158],(()=>(__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-queryparams/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_exec__("./.storybook/preview.js-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs"))));__webpack_require__.O()}]); \ No newline at end of file +(globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react=globalThis.webpackChunk_danskernesdigitalebibliotek_dpl_react||[]).push([[792],{"./.storybook/preview.js-generated-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var preview_namespaceObject={};__webpack_require__.r(preview_namespaceObject),__webpack_require__.d(preview_namespaceObject,{decorators:()=>decorators,parameters:()=>parameters});var ClientApi=__webpack_require__("./node_modules/@storybook/client-api/dist/esm/ClientApi.js"),injectStylesIntoStyleTag=__webpack_require__("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),injectStylesIntoStyleTag_default=__webpack_require__.n(injectStylesIntoStyleTag),styleDomAPI=__webpack_require__("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),styleDomAPI_default=__webpack_require__.n(styleDomAPI),insertBySelector=__webpack_require__("./node_modules/style-loader/dist/runtime/insertBySelector.js"),insertBySelector_default=__webpack_require__.n(insertBySelector),setAttributesWithoutAttributes=__webpack_require__("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),setAttributesWithoutAttributes_default=__webpack_require__.n(setAttributesWithoutAttributes),insertStyleElement=__webpack_require__("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),insertStyleElement_default=__webpack_require__.n(insertStyleElement),styleTagTransform=__webpack_require__("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),styleTagTransform_default=__webpack_require__.n(styleTagTransform),components=__webpack_require__("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss"),options={};options.styleTagTransform=styleTagTransform_default(),options.setAttributes=setAttributesWithoutAttributes_default(),options.insert=insertBySelector_default().bind(null,"head"),options.domAPI=styleDomAPI_default(),options.insertStyleElement=insertStyleElement_default();injectStylesIntoStyleTag_default()(components.A,options);components.A&&components.A.locals&&components.A.locals;__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/css/base.css");var token=__webpack_require__("./src/core/token.js"),react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),react_error_boundary_umd=__webpack_require__("./node_modules/react-error-boundary/dist/react-error-boundary.umd.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),integration_react=__webpack_require__("./node_modules/redux-persist/es/integration/react.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),store=__webpack_require__("./src/core/store.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts"),FetcherError=__webpack_require__("./src/core/fetchers/FetcherError.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts"),InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts");const queryErrorHandler=error=>!(error instanceof FetcherHttpError.A||error instanceof FetcherCriticalHttpError.A||error instanceof FetcherError.A||error instanceof InvalidUrlError.A)||error.useErrorBoundary,queryClient=new react_query_es.QueryClient({defaultOptions:{queries:{staleTime:12e4,useErrorBoundary:queryErrorHandler},mutations:{useErrorBoundary:queryErrorHandler}}}),Store=({children})=>react.createElement(es.Kq,{store:store.M_},react.createElement(react_query_es.QueryClientProvider,{client:queryClient},react.createElement(integration_react.Q,{persistor:store.qj},children)));Store.propTypes={children:prop_types_default().node.isRequired};const components_store=Store;var utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),ErrorBoundaryAlertBody=__webpack_require__("./src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx");const ErrorBoundaryAlert=({resetErrorBoundary})=>{const t=(0,utils_text.F)(),errorMessagesConfig=(0,utils_config.UK)()("errorMessagesConfig",{transformer:"jsonParse"});if(void 0===errorMessagesConfig.containerId)return null;const{containerId}=errorMessagesConfig,container=document.getElementById(containerId),shouldOnlyShowOneError=void 0===errorMessagesConfig.shouldOnlyShowOneError||errorMessagesConfig.shouldOnlyShowOneError;return container?shouldOnlyShowOneError&&((null==container?void 0:container.textContent)??"").trim().length>0?null:react_dom.createPortal(react.createElement(ErrorBoundaryAlertBody.A,{message:t("alertErrorMessageText"),resetErrorBoundary,showCloseButton:(null==errorMessagesConfig?void 0:errorMessagesConfig.showCloseButton)??!1}),container):null},error_boundary_alert_ErrorBoundaryAlert=ErrorBoundaryAlert;try{ErrorBoundaryAlert.displayName="ErrorBoundaryAlert",ErrorBoundaryAlert.__docgenInfo={description:"A simple alert that serves as the foundation of all alerts.",displayName:"ErrorBoundaryAlert",props:{resetErrorBoundary:{defaultValue:null,description:"",name:"resetErrorBoundary",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"]={docgenInfo:ErrorBoundaryAlert.__docgenInfo,name:"ErrorBoundaryAlert",path:"src/components/error-boundary-alert/ErrorBoundaryAlert.tsx#ErrorBoundaryAlert"})}catch(__react_docgen_typescript_loader_error){}var modal_slice=__webpack_require__("./src/core/modal.slice.ts");const utils_extractErrorDetails=stack=>(stack||"").split("\n").map((line=>{const parts=line.match(/(?:\()?(.*?):(\d+):(\d+)(?:\))?/);if(parts){const[,filename,lineNumber,column]=parts;return{filename,lineNumber,column}}return null})).find((m=>m))||{filename:"unknown",lineNumber:"0",column:"0"},utils_forwardError=(error,info)=>{const{filename,lineNumber,column}=utils_extractErrorDetails(info.componentStack);window.onerror&&window.onerror(`${error.name}: ${error.message}`,filename,lineNumber,column,{...info,stack:info.componentStack})};function mount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((app=>setTimeout((()=>function mountApp(container){var _container$dataset,_window$dplReact,_window$dplReact$apps;const appName=null==container||null===(_container$dataset=container.dataset)||void 0===_container$dataset?void 0:_container$dataset.dplApp,app=null===(_window$dplReact=window.dplReact)||void 0===_window$dplReact||null===(_window$dplReact$apps=_window$dplReact.apps)||void 0===_window$dplReact$apps?void 0:_window$dplReact$apps[appName];app&&(0,react_dom.render)((0,react.createElement)(components_store,{},(0,react.createElement)((0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info),utils_forwardError(error,info)}}),{...container.dataset})),container)}(app)),0)))}function unmount(context){if(!context)return;context.querySelectorAll("[data-dpl-app]").forEach((function unMountApp(container){container.innerHTML=""}))}function mount_reset(){return store.qj.purge()}!function init(){document.addEventListener("keydown",(e=>{"Escape"===e.key&&store.M_.dispatch((0,modal_slice.ch)())}));const initial={apps:{},setToken:token.WG,mount,unmount,reset:mount_reset};window.dplReact={...window.dplReact||{},...initial}}();__webpack_require__("./src/core/user.slice.js");var process=__webpack_require__("./node_modules/process/browser.js");const getSessionStorage=type=>window.sessionStorage.getItem(type),userToken=process.env.STORYBOOK_USER_TOKEN??getSessionStorage(token.CI),libraryToken=process.env.STORYBOOK_LIBRARY_TOKEN??getSessionStorage(token._L);userToken&&(0,token.WG)(token.CI,userToken),libraryToken&&(0,token.WG)(token._L,libraryToken),!libraryToken&&userToken&&(0,token.WG)(token._L,userToken);const App=({story})=>{return react.createElement(components_store,null,(app=story,(0,react_error_boundary_umd.withErrorBoundary)(app,{FallbackComponent:error_boundary_alert_ErrorBoundaryAlert,onError(error,info){console.error(error,info)}})));var app},decorators=[Story=>react.createElement(react.Fragment,null,react.createElement(App,{story:Story}))],parameters={layout:"fullscreen"};function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.keys(preview_namespaceObject).forEach((function(key){var value=preview_namespaceObject[key];switch(key){case"args":return(0,ClientApi.FQ)(value);case"argTypes":return(0,ClientApi.hA)(value);case"decorators":return value.forEach((function(decorator){return(0,ClientApi.dK)(decorator,!1)}));case"loaders":return value.forEach((function(loader){return(0,ClientApi.$K)(loader,!1)}));case"parameters":return(0,ClientApi.Gu)(function _objectSpread(target){for(var i=1;i{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SignIn:()=>SignIn,default:()=>auth_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),unfetch_module=__webpack_require__("./node_modules/unfetch/dist/unfetch.module.js"),core_token=__webpack_require__("./src/core/token.js"),user_slice=__webpack_require__("./src/core/user.slice.js");const ORIGIN=window.location.origin,PATHNAME=window.location.pathname.replace("/iframe.html","/"),REDIRECT_URL=`${ORIGIN}${PATHNAME}?path=/story/sb-utilities-adgangsplatformen--sign-in`;const auth=function Auth(){const dispatch=(0,es.wA)(),status=(0,es.d4)((s=>s.user.status)),handleCleanUp=(0,react.useCallback)((()=>{window.sessionStorage.removeItem(core_token.CI),dispatch((0,user_slice.xE)())}),[dispatch]);return react.useEffect((()=>{const code=new URLSearchParams(window.location.search).get("code");code&&(0,unfetch_module.A)("https://login.bib.dk/oauth/token",{method:"POST",headers:{},body:new URLSearchParams({grant_type:"authorization_code",code,client_id:"",client_secret:"secret",redirect_uri:REDIRECT_URL})}).then((res=>res.json())).then((res=>{if(null==res||!res.access_token)throw res;window.sessionStorage.setItem(core_token.CI,res.access_token),(0,core_token.WG)(core_token.CI,res.access_token),(0,core_token.WG)(core_token._L,res.access_token),dispatch((0,user_slice.Qn)())})).catch((err=>{console.error(err),handleCleanUp()}))}),[dispatch,handleCleanUp]),react.createElement("div",{style:{width:"300px"}},react.createElement("h2",null,"Adgangsplatformen"),react.createElement("h5",null,"Status:","authenticated"===status?react.createElement("span",{style:{color:"green"}}," Signed in"):react.createElement("span",{style:{color:"red"}}," Signed out")),react.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gridColumnGap:10}},react.createElement("button",{type:"button",onClick:()=>{window.parent.location.href=`https://login.bib.dk/oauth/authorize?response_type=code&client_id=&redirect_uri=${REDIRECT_URL}`},style:{width:"100%"}},"Sign in"),react.createElement("button",{type:"button",onClick:()=>{handleCleanUp();const token=(0,core_token.gf)(core_token.CI);window.parent.location.href=`https://login.bib.dk/logout/?access_token=${token}`},style:{width:"100%"}},"Sign out")))},auth_dev={title:"SB Utilities / Adgangsplatformen"},SignIn=(args=>react.createElement(auth,args)).bind({})},"./src/apps/adgangsplatformen/library-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LibraryTokenApp:()=>LibraryTokenApp,default:()=>library_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const library_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setLibraryTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token._L,inputValue),(0,token.WG)(token._L,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert Library token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setLibraryTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for anonymous users,",react.createElement("br",null),"you can insert a library token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{librarytoken.displayName="librarytoken",librarytoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current library token.",displayName:"librarytoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/library-token.tsx#librarytoken"]={docgenInfo:librarytoken.__docgenInfo,name:"librarytoken",path:"src/apps/adgangsplatformen/library-token.tsx#librarytoken"})}catch(__react_docgen_typescript_loader_error){}const library_token_dev={title:"SB Utilities / Set Library Token",component:library_token},LibraryTokenApp=()=>react.createElement(library_token,null)},"./src/apps/adgangsplatformen/user-token.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserTokenApp:()=>UserTokenApp,default:()=>user_token_dev});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),token=__webpack_require__("./src/core/token.js");const user_token=()=>{const[inputValue,setInputValue]=(0,react.useState)(""),[shouldShowSuccessMessage,setShowSuccessMessage]=(0,react.useState)(!1),queryClient=(0,es.useQueryClient)(),setInputValueHandler=(0,react.useCallback)((event=>{const{target:{value:token}}=event;setInputValue(token)}),[setInputValue]),setUserTokenHandler=(0,react.useCallback)((()=>{window.sessionStorage.setItem(token.CI,inputValue),(0,token.WG)(token.CI,inputValue),setShowSuccessMessage(!0),queryClient.clear()}),[queryClient,inputValue]);return react.createElement("div",{className:"p-8"},react.createElement("p",null,"Insert User token:"),react.createElement("input",{className:"mt-8 mr-8",value:inputValue,onChange:setInputValueHandler,size:41}),react.createElement("button",{type:"submit",onClick:setUserTokenHandler},"Save"),react.createElement("p",{className:"text-small-caption mt-8"},"In order to test apps for logged in users,",react.createElement("br",null),"you can insert a user token in this field."),shouldShowSuccessMessage&&react.createElement("p",{className:"text-small-caption mt-8"},"The token was saved"))};try{usertoken.displayName="usertoken",usertoken.__docgenInfo={description:"This component is only to be used in Storybook context.\nLike the auth component it offers a way to set the needed context\nin order for the apps to be able to operate properly.\n\nThis component offers a way to set the current user token.",displayName:"usertoken",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/adgangsplatformen/user-token.tsx#usertoken"]={docgenInfo:usertoken.__docgenInfo,name:"usertoken",path:"src/apps/adgangsplatformen/user-token.tsx#usertoken"})}catch(__react_docgen_typescript_loader_error){}const user_token_dev={title:"SB Utilities / Set User Token",component:user_token},UserTokenApp=()=>react.createElement(user_token,null)},"./src/apps/advanced-search/AdvancedSearch.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AdvancedSearch:()=>AdvancedSearch_dev_AdvancedSearch,default:()=>AdvancedSearch_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),useEffectOnce=__webpack_require__("./node_modules/react-use/esm/useEffectOnce.js"),ExpandMore=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg")),ExpandMore_default=__webpack_require__.n(ExpandMore),MinusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/MinusButton.svg"),MinusButton_default=__webpack_require__.n(MinusButton),PlusButton=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/PlusButton.svg"),PlusButton_default=__webpack_require__.n(PlusButton),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const advancedSearchIndexes=["all","term.creatorcontributor","term.subject","term.genreandform","term.mainlanguage","datefirstedition","term.creator","term.title","term.source","dk5","term.specificmaterialtype","term.childrenoradults","term.publisher","term.isbn"],advancedSearchIndexTranslations={all:"advancedSearchAllIndexesText","term.creatorcontributor":"advancedSearchCreatorText","term.subject":"advancedSearchSubjectText","term.genreandform":"advancedSearchGenreText","term.mainlanguage":"advancedSearchLanguageText",datefirstedition:"advancedSearchDateText","term.creator":"advancedSearchMainCreatorText","term.title":"advancedSearchMainTitleText","term.source":"advancedSearchSourceText",dk5:"advancedSearchDecimalDk5Text","term.specificmaterialtype":"advancedSearchTypeText","term.childrenoradults":"advancedSearchAudienceText","term.publisher":"advancedSearchPublisherText","term.isbn":"advancedSearchIdentifierText"},advancedSearchClauses=[{value:"AND",translation:"clauseAndText"},{value:"OR",translation:"clauseOrText"},{value:"NOT",translation:"clauseNotText"}],initialAdvancedSearchQuery={rows:[{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:0},{term:"",searchIndex:"all",clause:advancedSearchClauses[0],id:1}],filters:{materialTypes:[{item:"multiselectAllOptionText",value:"all"}],fiction:[{item:"multiselectAllOptionText",value:"all"}],accessibility:[{item:"multiselectAllOptionText",value:"all"}]}},advancedSearchMaterialTypes=[{item:"advancedSearchFilterBookText",value:"bøger"},{item:"advancedSearchFilterEbookText",value:"e-bøger"},{item:"advancedSearchFilterAudioBookText",value:"lydbøger"},{item:"advancedSearchFilterArticleText",value:"artikler"},{item:"advancedSearchFilterMovieText",value:"film"},{item:"advancedSearchFilterMusicText",value:"musik"}],advancedSearchAccessibility=[{item:"advancedSearchFilterPhysicalText",value:"fysisk"},{item:"advancedSearchFilterOnlineText",value:"online"}],advancedSearchFiction=[{item:"advancedSearchFilterFictionText",value:"fiction"},{item:"advancedSearchFilterNonFictionText",value:"nonfiction"}],advancedSearchFilters={materialTypes:"term.generalmaterialtype",fiction:"term.fictionnonfiction",accessibility:"term.accesstype"},AdvancedSearchRow=({dataCy="advanced-search-row",data,rowIndex,isFocused,setSearchObject,setFocusedRow})=>{const t=(0,utils_text.F)(),updateRowData=(rowAspect,update,updateData)=>{const newData={...data};newData.rows[rowIndex][rowAspect]=update,updateData(newData)},inputElement=(0,react.useRef)(null);return(0,react.useEffect)((()=>{var _inputElement$current;isFocused&&(null===(_inputElement$current=inputElement.current)||void 0===_inputElement$current||_inputElement$current.focus())}),[isFocused]),react.createElement(react.Fragment,null,rowIndex>0&&react.createElement("div",{className:"advanced-search__clauses","data-cy":"clauses"},advancedSearchClauses.map((clause=>{return react.createElement("button",{key:`${rowIndex}-${clause.value}`,"data-cy":`clause-${clause.value}`,type:"button",className:(clickedClause=clause.value,currentClause=data.rows[rowIndex].clause.value,(0,clsx.A)("advanced-search__clause focus-styling cursor-pointer capitalize-all",{"advanced-search__clause--grey":currentClause!==clickedClause})),onClick:()=>{updateRowData("clause",clause,setSearchObject)}},t(clause.translation));var clickedClause,currentClause}))),react.createElement("div",{className:"input-with-dropdown","data-cy":dataCy},react.createElement("label",{htmlFor:`advanced-search-input-${rowIndex}`,className:"hide-visually"},t("advancedSearchInputLabelText",{placeholders:{"@inputNumber":rowIndex+1}})),react.createElement("input",{id:`advanced-search-input-${rowIndex}`,ref:inputElement,className:"input-with-dropdown__input focus-styling__input capitalize-first",type:"text",placeholder:t("advancedSearchInputPlaceholderText"),value:data.rows[rowIndex].term,onChange:e=>{updateRowData("term",e.target.value,setSearchObject)}}),react.createElement("div",{className:"dropdown dropdown--grey-borders input-with-dropdown__dropdown"},react.createElement("select",{className:"dropdown__select dropdown__select--inline focus-styling","aria-label":"input field dropdown",value:data.rows[rowIndex].searchIndex,onChange:e=>{updateRowData("searchIndex",e.target.value,setSearchObject)}},advancedSearchIndexes.map((index=>react.createElement("option",{key:index,className:"dropdown__option",value:index},t(advancedSearchIndexTranslations[index]))))),react.createElement("div",{className:"dropdown__arrows dropdown__arrows--inline"},react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}))),data.rows.length>1&&react.createElement("button",{type:"button",onClick:()=>{((index,updateData)=>{const newData={...data};newData.rows.splice(index,1),updateData(newData),newData.rows.length===index?setFocusedRow(index-1):setFocusedRow(index)})(rowIndex,setSearchObject)}},react.createElement("img",{className:"input-with-dropdown__icon",src:MinusButton_default(),alt:""}))),rowIndex===data.rows.length-1&&react.createElement("button",{type:"button",className:"advanced-search__clauses cursor-pointer",onClick:()=>{(updateData=>{const newData={...data};newData.rows.push(structuredClone(initialAdvancedSearchQuery.rows.at(0))),newData.rows[newData.rows.length-1].id=newData.rows[newData.rows.length-2].id+1,updateData(newData),setFocusedRow(rowIndex+1)})(setSearchObject)},"data-cy":"advanced-search-add-row"},react.createElement("img",{className:"mr-8",src:PlusButton_default(),alt:""}),t("advancedSearchAddRowText")))},advanced_search_AdvancedSearchRow=AdvancedSearchRow;try{AdvancedSearchRow.displayName="AdvancedSearchRow",AdvancedSearchRow.__docgenInfo={description:"",displayName:"AdvancedSearchRow",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"AdvancedSearchQuery"}},dataCy:{defaultValue:{value:"advanced-search-row"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},rowIndex:{defaultValue:null,description:"",name:"rowIndex",required:!0,type:{name:"number"}},isFocused:{defaultValue:null,description:"",name:"isFocused",required:!1,type:{name:"boolean | undefined"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery) => void"}},setFocusedRow:{defaultValue:null,description:"",name:"setFocusedRow",required:!0,type:{name:"(rowIndex: number) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"]={docgenInfo:AdvancedSearchRow.__docgenInfo,name:"AdvancedSearchRow",path:"src/apps/advanced-search/AdvancedSearchRow.tsx#AdvancedSearchRow"})}catch(__react_docgen_typescript_loader_error){}var useCopyToClipboard=__webpack_require__("./node_modules/react-use/esm/useCopyToClipboard.js"),Check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),Check_default=__webpack_require__.n(Check);const PreviewSection=({dataCy="preview-section",translatedCql,reset,isMobile,setIsFormMode})=>{const t=(0,utils_text.F)(),[,copy]=(0,useCopyToClipboard.A)(),[copiedToClipboard,setCopiedToClipboard]=(0,react.useState)(!1);return(0,react.useEffect)((()=>(copiedToClipboard&&setTimeout((()=>{setCopiedToClipboard(!1)}),2e3),()=>{})),[copiedToClipboard]),react.createElement("div",{"data-cy":dataCy,className:(0,clsx.A)("pagefold-parent--large input-and-preview__preview",{"input-and-preview__preview--mobile":isMobile})},react.createElement("div",{className:"pagefold-triangle--large pagefold-inherit-parent"}),react.createElement("h3",{className:"text-body-medium-medium mb-24 capitalize-first"},t("advancedSearchPreviewHeadlineText")),react.createElement("p",{"data-cy":`${dataCy}-preview`,className:"text-body-medium-regular mb-32"},translatedCql||t("advancedSearchPreviewEmptyText")),react.createElement("section",null,react.createElement("button",{type:"button",className:"link-tag mr-16 cursor-pointer capitalize-first",onClick:()=>reset(),"data-cy":"advanced-search-reset"},t("advancedSearchResetText")),translatedCql&&react.createElement("button",{type:"button",className:(0,clsx.A)("link-tag mr-16 capitalize-first",{"cursor-pointer":!copiedToClipboard}),onClick:()=>{copy(translatedCql),setCopiedToClipboard(!0)},onKeyUp:e=>{"Enter"===e.key&&(copy(translatedCql),setCopiedToClipboard(!0))}},copiedToClipboard&&react.createElement(react.Fragment,null,t("copiedToClipboardText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})),!copiedToClipboard&&t("advancedSearchCopyStringText")),react.createElement("button",{type:"button",className:"link-tag link-tag cursor-pointer capitalize-first",onClick:()=>setIsFormMode(!1),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1),"data-cy":"advanced-search-edit-cql"},t("advancedSearchEditCqlText"))))},advanced_search_PreviewSection=PreviewSection;try{PreviewSection.displayName="PreviewSection",PreviewSection.__docgenInfo={description:"",displayName:"PreviewSection",props:{dataCy:{defaultValue:{value:"preview-section"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},translatedCql:{defaultValue:null,description:"",name:"translatedCql",required:!0,type:{name:"string"}},reset:{defaultValue:null,description:"",name:"reset",required:!0,type:{name:"() => void"}},isMobile:{defaultValue:null,description:"",name:"isMobile",required:!1,type:{name:"boolean | undefined"}},setIsFormMode:{defaultValue:null,description:"",name:"setIsFormMode",required:!0,type:{name:"(newState: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/PreviewSection.tsx#PreviewSection"]={docgenInfo:PreviewSection.__docgenInfo,name:"PreviewSection",path:"src/apps/advanced-search/PreviewSection.tsx#PreviewSection"})}catch(__react_docgen_typescript_loader_error){}var Multiselect=__webpack_require__("./src/components/multiselect/Multiselect.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),TextInput=__webpack_require__("./src/components/atoms/input/TextInput.tsx");const CqlSearchHeader=({dataCy="cql-search-header",initialCql,setCql,onShelf,handleOnShelfChange,onLocationChange,onSublocationChange})=>{const t=(0,utils_text.F)();return(0,react.useEffect)((()=>{""!==initialCql.trim()&&setCql(initialCql)}),[initialCql,setCql]),react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first","data-cy":dataCy},t("cqlSearchTitleText")),react.createElement("textarea",{className:"advanced-search__cql-input focus-styling__input",cols:100,rows:5,placeholder:"e.g. title=snemand*","data-cy":`${dataCy}-input`,onChange:e=>setCql(e.target.value),defaultValue:initialCql}),react.createElement(TextInput.A,{id:"location",label:"Location",type:"text",onChange:location=>onLocationChange(location)}),react.createElement(TextInput.A,{id:"location",label:"Sublocation",type:"text",onChange:sublocation=>onSublocationChange(sublocation)}),react.createElement(Checkbox.A,{id:"on-shelf",selected:onShelf,onChecked:handleOnShelfChange,label:t("advancedSearchFilterHoldingStatusText")}))},advanced_search_CqlSearchHeader=CqlSearchHeader;try{CqlSearchHeader.displayName="CqlSearchHeader",CqlSearchHeader.__docgenInfo={description:"",displayName:"CqlSearchHeader",props:{dataCy:{defaultValue:{value:"cql-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},initialCql:{defaultValue:null,description:"",name:"initialCql",required:!0,type:{name:"string"}},setCql:{defaultValue:null,description:"",name:"setCql",required:!0,type:{name:"(newState: string) => void"}},onShelf:{defaultValue:null,description:"",name:"onShelf",required:!0,type:{name:"boolean"}},handleOnShelfChange:{defaultValue:null,description:"",name:"handleOnShelfChange",required:!0,type:{name:"(newState: boolean) => void"}},onLocationChange:{defaultValue:null,description:"",name:"onLocationChange",required:!0,type:{name:"(location: string) => void"}},onSublocationChange:{defaultValue:null,description:"",name:"onSublocationChange",required:!0,type:{name:"(sublocation: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"]={docgenInfo:CqlSearchHeader.__docgenInfo,name:"CqlSearchHeader",path:"src/apps/advanced-search/CqlSearchHeader.tsx#CqlSearchHeader"})}catch(__react_docgen_typescript_loader_error){}const translateFiltersToCql=filtersToTranslate=>Object.keys(filtersToTranslate).map((key=>filtersToTranslate[key])).reduce(((acc,curr,index)=>acc+((filterToTranslate,cqlKey)=>{let translation=filterToTranslate.reduce(((acc,curr)=>{let filterTranslation="";const relation=""===acc.trim()?" AND":" OR";return"all"===curr.value?`${acc}`:(filterTranslation=filterTranslation.concat(relation,` ${advancedSearchFilters[cqlKey]}=`,`'${curr.value}'`),acc+filterTranslation)}),"");return filterToTranslate.length>1&&(translation=` AND (${translation.split(" AND")[1]})`),translation})(curr,Object.keys(filtersToTranslate)[index])),""),wrapFiltersInParentheses=filters=>{if(""===filters.trim())return"";if(!filters.includes(" OR "))return filters;return`${filters.split(" AND",2).join(" AND (")})`},translateSearchObjectToCql=searchObject=>`${searchObject.rows.reduce(((acc,curr)=>{let rowTranslation="";return""!==acc&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.clause.value)),"all"!==curr.searchIndex&&""!==curr.term.trim()&&(rowTranslation=rowTranslation.concat(" ",curr.searchIndex,"=")),""!==curr.term&&(rowTranslation=rowTranslation.concat((currentText=>{let space="";switch(currentText.trim()){case"":space="";break;default:if(currentText.trim().endsWith("=")){space="";break}space=" "}return space})(acc),"'",curr.term,"'")),acc+rowTranslation}),"")}${translateFiltersToCql(searchObject.filters)}`;try{wrapFiltersInParentheses.displayName="wrapFiltersInParentheses",wrapFiltersInParentheses.__docgenInfo={description:"",displayName:"wrapFiltersInParentheses",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/helpers.tsx#wrapFiltersInParentheses"]={docgenInfo:wrapFiltersInParentheses.__docgenInfo,name:"wrapFiltersInParentheses",path:"src/apps/advanced-search/helpers.tsx#wrapFiltersInParentheses"})}catch(__react_docgen_typescript_loader_error){}try{translateSearchObjectToCql.displayName="translateSearchObjectToCql",translateSearchObjectToCql.__docgenInfo={description:"",displayName:"translateSearchObjectToCql",props:{rows:{defaultValue:null,description:"",name:"rows",required:!0,type:{name:"AdvancedSearchRowData[]"}},filters:{defaultValue:null,description:"",name:"filters",required:!0,type:{name:"AdvancedSearchFilterData"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"]={docgenInfo:translateSearchObjectToCql.__docgenInfo,name:"translateSearchObjectToCql",path:"src/apps/advanced-search/helpers.tsx#translateSearchObjectToCql"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const AdvancedSearchHeader=({dataCy="advanced-search-header",searchQuery,setSearchQuery,searchObject,setSearchObject,onShelf,setOnShelf,onLocationChange,onSublocationChange})=>{const t=(0,utils_text.F)(),[isFormMode,setIsFormMode]=(0,react.useState)(!0),[internalSearchObject,setInternalSearchObject]=(0,react.useState)(searchObject||structuredClone(initialAdvancedSearchQuery)),[previewCql,setPreviewCql]=(0,react.useState)(searchQuery||""),[rawCql,setRawCql]=(0,react.useState)(""),[focusedRow,setFocusedRow]=(0,react.useState)(null),handleOnShelfChange=checked=>{setOnShelf(checked)};(0,react.useEffect)((()=>{null!==searchObject&&setInternalSearchObject(searchObject)}),[searchObject]),(0,react.useEffect)((()=>{const cql=translateSearchObjectToCql(internalSearchObject);setPreviewCql(cql)}),[internalSearchObject]);const updateFiltersData=filtersUpdate=>{if(null==internalSearchObject||!internalSearchObject.filters[filtersUpdate.key].length)return;const newSearchObject={...internalSearchObject};newSearchObject.filters={...newSearchObject.filters,[filtersUpdate.key]:filtersUpdate.value},setInternalSearchObject(newSearchObject)},reset=()=>{setSearchObject(structuredClone(initialAdvancedSearchQuery))},scrollToResults=()=>{const element=document.getElementById("advanced-search-result");element&&element.scrollIntoView({behavior:"smooth"})},[isSearchButtonDisabled,setIsSearchButtonDisabled]=(0,react.useState)(!0),translatedCql=previewCql||searchQuery||"";return(0,react.useEffect)((()=>{searchQuery&&!searchObject&&setIsFormMode(!1)}),[searchObject,searchQuery]),(0,react.useEffect)((()=>{var object,cql;setIsSearchButtonDisabled((object=internalSearchObject,cql=rawCql,!0===isFormMode?!(object&&object.rows.find((row=>""!==row.term))):""===cql.trim()))}),[internalSearchObject,rawCql,isFormMode]),react.createElement(react.Fragment,null,isFormMode&&react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 advanced-search__title capitalize-first"},t("advancedSearchTitleText")),react.createElement("div",{className:"input-and-preview"},react.createElement("div",{className:"input-and-preview__input"},internalSearchObject.rows.map(((row,index)=>react.createElement(advanced_search_AdvancedSearchRow,{key:row.id,data:internalSearchObject,rowIndex:index,setSearchObject:setInternalSearchObject,dataCy:`${dataCy}-row`,setFocusedRow,isFocused:focusedRow===index})))),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,setIsFormMode})),react.createElement("section",{className:"advanced-search__filters"},react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.A,{caption:t("advancedSearchFilterMaterialTypeText"),options:advancedSearchMaterialTypes,defaultValue:internalSearchObject.filters.materialTypes,updateExternalState:{key:"materialTypes",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-material-types"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.A,{caption:t("advancedSearchFilterLiteratureFormText"),options:advancedSearchFiction,defaultValue:internalSearchObject.filters.fiction,updateExternalState:{key:"fiction",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-fiction"})),react.createElement("div",{className:"advanced-search__filter"},react.createElement(Multiselect.A,{caption:t("advancedSearchFilterAccessText"),options:advancedSearchAccessibility,defaultValue:internalSearchObject.filters.accessibility,updateExternalState:{key:"accessibility",externalUpdateFunction:updateFiltersData},dataCy:"advanced-search-accessibility"}))),react.createElement(Checkbox.A,{id:"on-shelf",selected:onShelf,onChecked:handleOnShelfChange,label:t("advancedSearchFilterHoldingStatusText")}),react.createElement(advanced_search_PreviewSection,{translatedCql,reset,isMobile:!0,setIsFormMode})),!isFormMode&&react.createElement(advanced_search_CqlSearchHeader,{initialCql:translatedCql,setCql:setRawCql,onShelf,handleOnShelfChange,onLocationChange,onSublocationChange}),react.createElement("section",{className:"advanced-search__footer"},!isFormMode&&react.createElement("button",{type:"button",className:"link-tag advanced-search__back-button cursor-pointer",onClick:()=>setIsFormMode(!0),onKeyUp:e=>"Enter"===e.key??setIsFormMode(!1)},t("toAdvancedSearchButtonText")),react.createElement(Button.$,{dataCy:"search-button",buttonType:"none",disabled:isSearchButtonDisabled,size:"xlarge",variant:"filled",classNames:"advanced-search__search-button",collapsible:!0,label:t("advancedSearchSearchButtonText"),onClick:()=>{if(""!==rawCql.trim()&&!isFormMode)return setSearchQuery(rawCql),void setTimeout((()=>{scrollToResults()}),500);setSearchObject(internalSearchObject),setTimeout((()=>{scrollToResults()}),500)}})))},advanced_search_AdvancedSearchHeader=AdvancedSearchHeader;try{AdvancedSearchHeader.displayName="AdvancedSearchHeader",AdvancedSearchHeader.__docgenInfo={description:"",displayName:"AdvancedSearchHeader",props:{dataCy:{defaultValue:{value:"advanced-search-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},searchQuery:{defaultValue:null,description:"",name:"searchQuery",required:!0,type:{name:"string | null"}},setSearchQuery:{defaultValue:null,description:"",name:"setSearchQuery",required:!0,type:{name:"(searchQuery: string | null) => void"}},searchObject:{defaultValue:null,description:"",name:"searchObject",required:!0,type:{name:"AdvancedSearchQuery | null"}},setSearchObject:{defaultValue:null,description:"",name:"setSearchObject",required:!0,type:{name:"(searchObject: AdvancedSearchQuery | null) => void"}},onShelf:{defaultValue:null,description:"",name:"onShelf",required:!0,type:{name:"boolean"}},setOnShelf:{defaultValue:null,description:"",name:"setOnShelf",required:!0,type:{name:"(checked: boolean) => void"}},onLocationChange:{defaultValue:null,description:"",name:"onLocationChange",required:!0,type:{name:"(location: string) => void"}},onSublocationChange:{defaultValue:null,description:"",name:"onSublocationChange",required:!0,type:{name:"(sublocation: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"]={docgenInfo:AdvancedSearchHeader.__docgenInfo,name:"AdvancedSearchHeader",path:"src/apps/advanced-search/AdvancedSearchHeader.tsx#AdvancedSearchHeader"})}catch(__react_docgen_typescript_loader_error){}var branches=__webpack_require__("./src/core/utils/branches.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const advanced_search_AdvancedSearchResults=({q,pageSize,showContentOnly,onShelf,locationFilter})=>{const t=(0,utils_text.F)(),[copiedLinkToSearch,setCopiedLinkToSearch]=(0,react.useState)(!1),cleanBranches=(0,branches.Ay)(),[resultItems,setResultItems]=(0,react.useState)([]),[hitcount,setHitCount]=(0,react.useState)(0),{PagerComponent,page}=(0,use_pager.A)({hitcount,pageSize}),[cql,setCql]=(0,react.useState)(q),[,copy]=(0,useCopyToClipboard.A)();(0,react.useEffect)((()=>{setCql(q)}),[q]),(0,react.useEffect)((()=>{const searchParams=new URLSearchParams(window.location.search);searchParams.get("q")&&setCql((prev=>searchParams.get("q")||prev))}),[]),(0,react.useEffect)((()=>{setResultItems([])}),[q,pageSize]);const{data,isLoading}=(0,graphql.YP)({cql,offset:page*pageSize,limit:pageSize,filters:{branchId:cleanBranches,status:onShelf?[graphql.Fl.OnShelf]:[],...(null==locationFilter?void 0:locationFilter.location)&&{location:locationFilter.location},...(null==locationFilter?void 0:locationFilter.sublocation)&&{sublocation:locationFilter.sublocation}}});(0,react.useEffect)((()=>{if(!data)return;const{complexSearch:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>[...prev,...resultWorks]:resultWorks)}),[data,locationFilter,page]);const shouldShowSearchResults=isLoading||!isLoading&&hitcount>0,shouldShowResultHeadline=!(!hitcount||isLoading);return(0,react.useEffect)((()=>{copiedLinkToSearch&&setTimeout((()=>{setCopiedLinkToSearch(!1)}),2e3)}),[copiedLinkToSearch]),react.createElement(react.Fragment,null,!showContentOnly&&react.createElement("div",{className:"advanced-search__divider"}),react.createElement("h2",{className:"text-header-h2 advanced-search__title capitalize-first",id:"advanced-search-result","aria-live":"polite"},isLoading&&react.createElement(react.Fragment,null,t("loadingResultsText")),shouldShowResultHeadline&&react.createElement(react.Fragment,null,t("showingMaterialsText",{placeholders:{"@hitcount":hitcount}}))),!showContentOnly&&react.createElement("button",{type:"button",className:(0,clsx.A)("link-tag mb-16 capitalize-first",{"cursor-pointer":!copiedLinkToSearch}),onClick:()=>{copy((0,helpers_url.gG)({linked:"true"}).href),setCopiedLinkToSearch(!0)}},!copiedLinkToSearch&&t("advancedSearchLinkToThisSearchText"),copiedLinkToSearch&&react.createElement(react.Fragment,null,t("copiedLinkToThisSearchText"),react.createElement("img",{className:"inline-icon",src:Check_default(),alt:""})," ")),shouldShowSearchResults&&react.createElement(react.Fragment,null,react.createElement(SearchResultList.A,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading})),!isLoading&&0===hitcount&&react.createElement(search_result_zero_hits.A,null))};try{AdvancedSearchResults.displayName="AdvancedSearchResults",AdvancedSearchResults.__docgenInfo={description:"",displayName:"AdvancedSearchResults",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},showContentOnly:{defaultValue:null,description:"",name:"showContentOnly",required:!0,type:{name:"boolean"}},onShelf:{defaultValue:null,description:"",name:"onShelf",required:!0,type:{name:"boolean"}},locationFilter:{defaultValue:null,description:"",name:"locationFilter",required:!0,type:{name:"LocationFilter"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"]={docgenInfo:AdvancedSearchResults.__docgenInfo,name:"AdvancedSearchResults",path:"src/apps/advanced-search/AdvancedSearchResults.tsx#AdvancedSearchResults"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch=({pageSize})=>{const[searchQuery,setSearchQuery]=(0,react.useState)(null),[searchObject,setSearchObject]=(0,react.useState)(null),[showResultOnly,setShowResultOnly]=(0,react.useState)(!1),[executedQuery,setExecutedQuery]=(0,react.useState)(null),[locationFilter,setLocationFilter]=(0,react.useState)({}),[onShelf,setOnShelf]=(0,react.useState)(!1);return(0,useEffectOnce.A)((()=>{var _getUrlQueryParam;const advancedSearchQuery=null===(_getUrlQueryParam=(0,helpers_url.d6)("advancedSearchQuery"))||void 0===_getUrlQueryParam?void 0:_getUrlQueryParam.replace("(","").replace(")","");if(advancedSearchQuery){const queryObject=JSON.parse(advancedSearchQuery);setSearchObject(queryObject)}const advancedSearchCql=(0,helpers_url.d6)("advancedSearchCql");advancedSearchCql&&setSearchQuery(advancedSearchCql),"true"===(0,helpers_url.d6)("linked")&&setShowResultOnly(!0),"true"===(0,helpers_url.d6)("onshelf")&&setOnShelf(!0)})),(0,react.useEffect)((()=>{if(!searchObject)return;const cql=translateSearchObjectToCql(searchObject);""!==cql.trim()&&((0,helpers_url.$u)({advancedSearchQuery:JSON.stringify(searchObject)}),(0,helpers_url.MR)("advancedSearchCql"),setExecutedQuery(cql))}),[searchObject]),(0,react.useEffect)((()=>{searchQuery&&((0,helpers_url.$u)({advancedSearchCql:searchQuery}),(0,helpers_url.MR)("advancedSearchQuery"),setExecutedQuery(searchQuery))}),[searchQuery]),react.createElement("div",{className:"advanced-search"},!showResultOnly&&react.createElement(advanced_search_AdvancedSearchHeader,{searchObject,setSearchObject,searchQuery,setSearchQuery,onShelf,setOnShelf:checked=>{setOnShelf(checked),checked?(0,helpers_url.$u)({onshelf:"true"}):(0,helpers_url.MR)("onshelf")},onLocationChange:location=>{setLocationFilter((prevFilter=>({...prevFilter,location:[location]})))},onSublocationChange:sublocation=>{setLocationFilter((prevFilter=>({...prevFilter,sublocation:[sublocation]})))}}),executedQuery&&react.createElement(advanced_search_AdvancedSearchResults,{q:executedQuery,pageSize,showContentOnly:showResultOnly,onShelf,locationFilter}))},advanced_search_AdvancedSearch=AdvancedSearch;try{AdvancedSearch.displayName="AdvancedSearch",AdvancedSearch.__docgenInfo={description:"",displayName:"AdvancedSearch",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"]={docgenInfo:AdvancedSearch.__docgenInfo,name:"AdvancedSearch",path:"src/apps/advanced-search/AdvancedSearch.tsx#AdvancedSearch"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,react.createElement(guarded_app.A,{app:"advanced-search"},react.createElement(advanced_search_AdvancedSearch,{pageSize})))}))));try{AdvancedSearchentry.displayName="AdvancedSearchentry",AdvancedSearchentry.__docgenInfo={description:"",displayName:"AdvancedSearchentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showingResultsForWithoutQueryText:{defaultValue:null,description:"",name:"showingResultsForWithoutQueryText",required:!0,type:{name:"string"}},advancedSearchLinkToThisSearchText:{defaultValue:null,description:"",name:"advancedSearchLinkToThisSearchText",required:!0,type:{name:"string"}},advancedSearchAllIndexesText:{defaultValue:null,description:"",name:"advancedSearchAllIndexesText",required:!0,type:{name:"string"}},advancedSearchCreatorText:{defaultValue:null,description:"",name:"advancedSearchCreatorText",required:!0,type:{name:"string"}},advancedSearchSubjectText:{defaultValue:null,description:"",name:"advancedSearchSubjectText",required:!0,type:{name:"string"}},advancedSearchGenreText:{defaultValue:null,description:"",name:"advancedSearchGenreText",required:!0,type:{name:"string"}},advancedSearchLanguageText:{defaultValue:null,description:"",name:"advancedSearchLanguageText",required:!0,type:{name:"string"}},advancedSearchDateText:{defaultValue:null,description:"",name:"advancedSearchDateText",required:!0,type:{name:"string"}},advancedSearchMainCreatorText:{defaultValue:null,description:"",name:"advancedSearchMainCreatorText",required:!0,type:{name:"string"}},advancedSearchMainTitleText:{defaultValue:null,description:"",name:"advancedSearchMainTitleText",required:!0,type:{name:"string"}},advancedSearchSourceText:{defaultValue:null,description:"",name:"advancedSearchSourceText",required:!0,type:{name:"string"}},advancedSearchDateFirstEditionText:{defaultValue:null,description:"",name:"advancedSearchDateFirstEditionText",required:!0,type:{name:"string"}},advancedSearchDecimalDk5Text:{defaultValue:null,description:"",name:"advancedSearchDecimalDk5Text",required:!0,type:{name:"string"}},advancedSearchTypeText:{defaultValue:null,description:"",name:"advancedSearchTypeText",required:!0,type:{name:"string"}},advancedSearchAudienceText:{defaultValue:null,description:"",name:"advancedSearchAudienceText",required:!0,type:{name:"string"}},advancedSearchPublisherText:{defaultValue:null,description:"",name:"advancedSearchPublisherText",required:!0,type:{name:"string"}},advancedSearchIdentifierText:{defaultValue:null,description:"",name:"advancedSearchIdentifierText",required:!0,type:{name:"string"}},advancedSearchAcSourceText:{defaultValue:null,description:"",name:"advancedSearchAcSourceText",required:!0,type:{name:"string"}},advancedSearchAddRowText:{defaultValue:null,description:"",name:"advancedSearchAddRowText",required:!0,type:{name:"string"}},advancedSearchTitleText:{defaultValue:null,description:"",name:"advancedSearchTitleText",required:!0,type:{name:"string"}},advancedSearchPreviewHeadlineText:{defaultValue:null,description:"",name:"advancedSearchPreviewHeadlineText",required:!0,type:{name:"string"}},advancedSearchPreviewEmptyText:{defaultValue:null,description:"",name:"advancedSearchPreviewEmptyText",required:!0,type:{name:"string"}},advancedSearchResetText:{defaultValue:null,description:"",name:"advancedSearchResetText",required:!0,type:{name:"string"}},advancedSearchCopyStringText:{defaultValue:null,description:"",name:"advancedSearchCopyStringText",required:!0,type:{name:"string"}},advancedSearchEditCqlText:{defaultValue:null,description:"",name:"advancedSearchEditCqlText",required:!0,type:{name:"string"}},advancedSearchSearchButtonText:{defaultValue:null,description:"",name:"advancedSearchSearchButtonText",required:!0,type:{name:"string"}},loadingResultsText:{defaultValue:null,description:"",name:"loadingResultsText",required:!0,type:{name:"string"}},toAdvancedSearchButtonText:{defaultValue:null,description:"",name:"toAdvancedSearchButtonText",required:!0,type:{name:"string"}},cqlSearchTitleText:{defaultValue:null,description:"",name:"cqlSearchTitleText",required:!0,type:{name:"string"}},copiedToClipboardText:{defaultValue:null,description:"",name:"copiedToClipboardText",required:!0,type:{name:"string"}},copiedLinkToThisSearchText:{defaultValue:null,description:"",name:"copiedLinkToThisSearchText",required:!0,type:{name:"string"}},clauseAndText:{defaultValue:null,description:"",name:"clauseAndText",required:!0,type:{name:"string"}},clauseOrText:{defaultValue:null,description:"",name:"clauseOrText",required:!0,type:{name:"string"}},clauseNotText:{defaultValue:null,description:"",name:"clauseNotText",required:!0,type:{name:"string"}},advancedSearchFilterMaterialTypeText:{defaultValue:null,description:"",name:"advancedSearchFilterMaterialTypeText",required:!0,type:{name:"string"}},advancedSearchFilterLiteratureFormText:{defaultValue:null,description:"",name:"advancedSearchFilterLiteratureFormText",required:!0,type:{name:"string"}},advancedSearchFilterAccessText:{defaultValue:null,description:"",name:"advancedSearchFilterAccessText",required:!0,type:{name:"string"}},advancedSearchFilterBookText:{defaultValue:null,description:"",name:"advancedSearchFilterBookText",required:!0,type:{name:"string"}},advancedSearchFilterEbookText:{defaultValue:null,description:"",name:"advancedSearchFilterEbookText",required:!0,type:{name:"string"}},advancedSearchFilterAudioBookText:{defaultValue:null,description:"",name:"advancedSearchFilterAudioBookText",required:!0,type:{name:"string"}},advancedSearchFilterArticleText:{defaultValue:null,description:"",name:"advancedSearchFilterArticleText",required:!0,type:{name:"string"}},advancedSearchFilterMovieText:{defaultValue:null,description:"",name:"advancedSearchFilterMovieText",required:!0,type:{name:"string"}},advancedSearchFilterMusicText:{defaultValue:null,description:"",name:"advancedSearchFilterMusicText",required:!0,type:{name:"string"}},advancedSearchFilterPhysicalText:{defaultValue:null,description:"",name:"advancedSearchFilterPhysicalText",required:!0,type:{name:"string"}},advancedSearchFilterOnlineText:{defaultValue:null,description:"",name:"advancedSearchFilterOnlineText",required:!0,type:{name:"string"}},advancedSearchFilterFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterFictionText",required:!0,type:{name:"string"}},advancedSearchFilterNonFictionText:{defaultValue:null,description:"",name:"advancedSearchFilterNonFictionText",required:!0,type:{name:"string"}},advancedSearchFilterHoldingStatusText:{defaultValue:null,description:"",name:"advancedSearchFilterHoldingStatusText",required:!0,type:{name:"string"}},advancedSearchInputLabelText:{defaultValue:null,description:"",name:"advancedSearchInputLabelText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"]={docgenInfo:AdvancedSearchentry.__docgenInfo,name:"AdvancedSearchentry",path:"src/apps/advanced-search/AdvancedSearch.entry.tsx#AdvancedSearchentry"})}catch(__react_docgen_typescript_loader_error){}const AdvancedSearch_dev={title:"Apps / Advanced Search",component:AdvancedSearch_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},advancedSearchInputLabelText:{name:"Advanced search input label",defaultValue:"Input field @inputNumber",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingMaterialsText:{name:"Showing materials",defaultValue:"Showing materials (@hitcount)",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},advancedSearchLinkToThisSearchText:{name:"Advanced search copy to clipboard button text",defaultValue:"Link to this search",control:{type:"text"}},advancedSearchAllIndexesText:{name:"Advanced search indexes - all",defaultValue:"All indexes",control:{type:"text"}},advancedSearchCreatorText:{name:"Advanced search indexes - creator",defaultValue:"Creator",control:{type:"text"}},advancedSearchSubjectText:{name:"Advanced search indexes - subject",defaultValue:"Subject",control:{type:"text"}},advancedSearchGenreText:{name:"Advanced search indexes - genre",defaultValue:"Genre",control:{type:"text"}},advancedSearchLanguageText:{name:"Advanced search indexes - language",defaultValue:"Language",control:{type:"text"}},advancedSearchDateText:{name:"Advanced search indexes - date",defaultValue:"Date",control:{type:"text"}},advancedSearchMainCreatorText:{name:"Advanced search indexes - main creator",defaultValue:"Main creator",control:{type:"text"}},advancedSearchMainTitleText:{name:"Advanced search indexes - main title",defaultValue:"Main title",control:{type:"text"}},advancedSearchSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchDateFirstEditionText:{name:"Advanced search indexes - edition",defaultValue:"Edition",control:{type:"text"}},advancedSearchDecimalDk5Text:{name:"Advanced search indexes - DK5",defaultValue:"DK5",control:{type:"text"}},advancedSearchTypeText:{name:"Advanced search indexes - type",defaultValue:"Type",control:{type:"text"}},advancedSearchAudienceText:{name:"Advanced search indexes - audience",defaultValue:"Audience",control:{type:"text"}},advancedSearchPublisherText:{name:"Advanced search indexes - publisher",defaultValue:"Publisher",control:{type:"text"}},advancedSearchIdentifierText:{name:"Advanced search indexes - identifier",defaultValue:"Identifier",control:{type:"text"}},advancedSearchAcSourceText:{name:"Advanced search indexes - source",defaultValue:"Source",control:{type:"text"}},advancedSearchAddRowText:{name:"Add row",defaultValue:"Add row",control:{type:"text"}},advancedSearchInputPlaceholderText:{name:"Advanced search input placeholder",defaultValue:"Search term",control:{type:"text"}},advancedSearchTitleText:{name:"Advanced search page title",defaultValue:"Advanced search",control:{type:"text"}},advancedSearchPreviewHeadlineText:{name:"Advanced search CQL preview headline",defaultValue:"CQL search string",control:{type:"text"}},advancedSearchPreviewEmptyText:{name:"Advanced search empty preview",defaultValue:"-",control:{type:"text"}},advancedSearchResetText:{name:"Advanced search reset button text",defaultValue:"Reset",control:{type:"text"}},advancedSearchCopyStringText:{name:"Advanced search page copy string button text",defaultValue:"Copy CQL",control:{type:"text"}},advancedSearchEditCqlText:{name:"Advanced search page edit CQL button text",defaultValue:"Edit CQL",control:{type:"text"}},advancedSearchSearchButtonText:{name:"Advanced search search button text",defaultValue:"Search",control:{type:"text"}},loadingResultsText:{name:"Advanced search loading results text",defaultValue:"Loading results...",control:{type:"text"}},toAdvancedSearchButtonText:{name:"To advanced search button text",defaultValue:"Back to advanced search",control:{type:"text"}},cqlSearchTitleText:{name:"CQL search title text",defaultValue:"CQL search",control:{type:"text"}},copiedToClipboardText:{name:"Text that appears after copying to clipboard",defaultValue:"Copied",control:{type:"text"}},copiedLinkToThisSearchText:{name:"Text that appears after getting link to a search copied to clipboard",defaultValue:"Link copied to clipboard",control:{type:"text"}},clauseAndText:{name:"Advanced search clause - AND",defaultValue:"AND",control:{type:"text"}},clauseOrText:{name:"Advanced search clause - OR",defaultValue:"OR",control:{type:"text"}},clauseNotText:{name:"Advanced search clause - NOT",defaultValue:"NOT",control:{type:"text"}},advancedSearchFilterMaterialTypeText:{name:"Advanced search filter - material type",defaultValue:"Material Type",control:{type:"text"}},advancedSearchFilterLiteratureFormText:{name:"Advanced search filter - literature form",defaultValue:"Literature form",control:{type:"text"}},advancedSearchFilterAccessText:{name:"Advanced search filter - access",defaultValue:"Accessibility",control:{type:"text"}},advancedSearchFilterBookText:{name:"Advanced search filter - book",defaultValue:"Book",control:{type:"text"}},advancedSearchFilterEbookText:{name:"Advanced search filter - ebook",defaultValue:"Ebook",control:{type:"text"}},advancedSearchFilterAudioBookText:{name:"Advanced search filter - audio book",defaultValue:"Audio book",control:{type:"text"}},advancedSearchFilterArticleText:{name:"Advanced search filter - article",defaultValue:"Article",control:{type:"text"}},advancedSearchFilterMovieText:{name:"Advanced search filter - movie",defaultValue:"Movie",control:{type:"text"}},advancedSearchFilterMusicText:{name:"Advanced search filter - music",defaultValue:"Music",control:{type:"text"}},advancedSearchFilterPhysicalText:{name:"Advanced search filter - physical access",defaultValue:"Physical",control:{type:"text"}},advancedSearchFilterOnlineText:{name:"Advanced search filter - online access",defaultValue:"Online",control:{type:"text"}},advancedSearchFilterFictionText:{name:"Advanced search filter - fiction",defaultValue:"Fiction",control:{type:"text"}},advancedSearchFilterNonFictionText:{name:"Advanced search filter - non-fiction",defaultValue:"Non-fiction",control:{type:"text"}},advancedSearchFilterHoldingStatusText:{name:"Advanced search filter - holding status",defaultValue:"Holding Status On Shelf",control:{type:"text"}}}},AdvancedSearch_dev_AdvancedSearch=args=>react.createElement(AdvancedSearch_entry,args)},"./src/apps/create-patron-user-info/CreatePatron.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CreatePatronEntry:()=>CreatePatron_dev_CreatePatronEntry,default:()=>CreatePatron_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx"),ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const UserInfo=({cpr,registerSuccessCallback})=>{const t=(0,utils_text.F)(),logoutUrl=(0,utils_url.Ik)()("logoutUrl"),config=(0,utils_config.UK)(),formRef=(0,react.useRef)(null),[pin,setPin]=(0,react.useState)(null),minAge=parseInt(config("minAgeConfig"),10),[validCpr]=(0,react.useState)((0,general.AQ)(cpr,minAge)),{mutate}=(0,fbs.AQ)(),[patron,setPatron]=(0,react.useState)({preferredPickupBranch:"",receiveEmail:!0,receivePostalMail:!1,receiveSms:!1,phoneNumber:"",emailAddress:""}),[isLoading,setIsLoading]=(0,react.useState)(!1),[isSubmitError,setIsSubmitError]=(0,react.useState)(!1),[isPinValid,setIsPinValid]=(0,react.useState)(!0),changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)};return react.createElement(react.Fragment,null,validCpr&&react.createElement("div",{className:"create-patron-page"},react.createElement("h1",{className:"create-patron-page__title"},t("createPatronHeaderText")),react.createElement("form",{onSubmit:e=>(e=>{e.preventDefault(),setIsLoading(!0);const{preferredPickupBranch,emailAddress}=patron;pin&&preferredPickupBranch&&emailAddress&&mutate({data:{cprNumber:cpr,patron,pincode:pin}},{onSuccess:()=>{setIsLoading(!1),registerSuccessCallback(!0)},onError:()=>{setIsLoading(!1),setIsSubmitError(!0)}})})(e),ref:formRef},react.createElement(ContactInfoSection.A,{showCheckboxes:!1,isDouble:!0,inLine:!0,changePatron,patron,requiredFields:["email"]}),react.createElement(PincodeSection.A,{required:!0,changePincode:setPin,isFlex:!0,setIsPinValid}),react.createElement(BranchesDropdown.A,{classNames:"dropdown--grey-borders",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch"),required:!0,footnote:t("createPatronBranchDropdownNoteText")}),react.createElement("div",{className:"create-patron-page__buttons"},react.createElement("button",{type:"submit",className:"btn-primary btn-filled btn-small","data-cy":"complete-user-registration-button",disabled:!isPinValid},((t,isLoading,isSubmitError)=>t(isLoading?"createPatronButtonLoadingText":isSubmitError?"createPatronButtonErrorText":"createPatronConfirmButtonText"))(t,isLoading,isSubmitError)),react.createElement(Link.A,{href:logoutUrl,className:"link-tag mx-16 mt-8",dataCy:"cancel-user-registration-button"},t("createPatronCancelButtonText"))))),!validCpr&&react.createElement("div",{className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 mb-48"},t("createPatronInvalidSsnHeaderText")),react.createElement("p",null,t("createPatronInvalidSsnBodyText"))))},create_patron_user_info_UserInfo=UserInfo;try{UserInfo.displayName="UserInfo",UserInfo.__docgenInfo={description:"",displayName:"UserInfo",props:{cpr:{defaultValue:null,description:"",name:"cpr",required:!0,type:{name:"string"}},registerSuccessCallback:{defaultValue:null,description:"",name:"registerSuccessCallback",required:!0,type:{name:"(success: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"]={docgenInfo:UserInfo.__docgenInfo,name:"UserInfo",path:"src/apps/create-patron-user-info/UserInfo.tsx#UserInfo"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class AdgangsPlatformenServiceHttpError extends FetcherCriticalHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","AdgangsPlatformenServiceHttpError")}}const adgangsplatformen_useUserInfo=queryOptions=>{const userinfoUrl=(0,utils_url.Ik)()("userinfoUrl"),url=String(userinfoUrl),queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(url=>{const userToken=(0,user.dG)();if(!userToken)throw new Error("User token is missing");return`${url}:${userToken}`})(url),getUserInfo=(infoUrl,signal)=>(async({url,method,headers,data})=>{const userToken=(0,user.dG)();if(!userToken)throw new Error("User token is missing");const authHeaders=userToken?{Authorization:`Bearer ${userToken}`}:{},body=data?JSON.stringify(data):null;try{const response=await fetch(url,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new AdgangsPlatformenServiceHttpError(response.status,response.statusText,url);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof AdgangsPlatformenServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,url)}return null})({url:infoUrl,method:"get",signal});return{queryKey,...(0,es.useQuery)(queryKey,(()=>getUserInfo(url)),queryOptions)}};var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const RedirectToLoginMessage=()=>{const t=(0,utils_text.F)(),u=(0,utils_url.Ik)(),redirectUrl=(({loginUrl,logoutUrl,redirectOnUserCreatedUrl})=>(0,url.xl)(logoutUrl,{"current-path":`${loginUrl.pathname}?current-path=${redirectOnUserCreatedUrl.pathname}`}))({loginUrl:u("authUrl"),logoutUrl:u("logoutUrl"),redirectOnUserCreatedUrl:u("redirectOnUserCreatedUrl")}),[seconds,setseconds]=(0,react.useState)(10);return(0,react.useEffect)((()=>{seconds>0&&setTimeout((()=>setseconds(seconds-1)),1e3),0===seconds&&(0,url.SE)(redirectUrl)}),[redirectUrl,seconds]),react.createElement("section",{className:"redirect-to-login-message"},react.createElement("p",{className:"redirect-to-login-message__top"},t("postRegisterRedirectInfoTopText")),react.createElement("p",{className:"redirect-to-login-message__bottom"},t("postRegisterRedirectInfoBottomText",{placeholders:{"@seconds":`${seconds}`}})),react.createElement(Button.$,{buttonType:"default",size:"small",collapsible:!1,disabled:!1,variant:"outline",onClick:()=>{(0,url.SE)(redirectUrl)},classNames:"mt-32",label:t("postRegisterRedirectButtonText")}))},create_patron_user_info_RedirectToLoginMessage=RedirectToLoginMessage;try{RedirectToLoginMessage.displayName="RedirectToLoginMessage",RedirectToLoginMessage.__docgenInfo={description:"",displayName:"RedirectToLoginMessage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/RedirectToLoginMessage.tsx#RedirectToLoginMessage"]={docgenInfo:RedirectToLoginMessage.__docgenInfo,name:"RedirectToLoginMessage",path:"src/apps/create-patron-user-info/RedirectToLoginMessage.tsx#RedirectToLoginMessage"})}catch(__react_docgen_typescript_loader_error){}const CreatePatron=({cpr})=>{const[userInfoCpr,setCpr]=(0,react.useState)(null),[patronIsRegistered,setPpatronIsRegistered]=(0,react.useState)(null),config=(0,utils_config.UK)(),t=(0,utils_text.F)(),{id:agencyId}=config("agencyConfig",{transformer:"jsonParse"}),{data:userInfo,isLoading}=adgangsplatformen_useUserInfo({enabled:!cpr});return(0,react.useEffect)((()=>{if(isLoading||!userInfo||cpr)return;const{attributes:{cpr:userCpr}}=userInfo;setCpr(String(userCpr))}),[agencyId,isLoading,userInfo,cpr]),cpr?react.createElement(create_patron_user_info_UserInfo,{cpr,registerSuccessCallback:setPpatronIsRegistered}):isLoading?react.createElement("div",null,t("loadingText")):userInfoCpr?patronIsRegistered?react.createElement(create_patron_user_info_RedirectToLoginMessage,null):react.createElement(create_patron_user_info_UserInfo,{cpr:userInfoCpr,registerSuccessCallback:setPpatronIsRegistered}):null},create_patron_user_info_CreatePatron=CreatePatron;try{CreatePatron.displayName="CreatePatron",CreatePatron.__docgenInfo={description:"",displayName:"CreatePatron",props:{cpr:{defaultValue:null,description:"",name:"cpr",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"]={docgenInfo:CreatePatron.__docgenInfo,name:"CreatePatron",path:"src/apps/create-patron-user-info/CreatePatron.tsx#CreatePatron"})}catch(__react_docgen_typescript_loader_error){}const CreatePatron_entry=(0,utils_config.NV)((0,utils_text.i)((0,utils_url.nU)((({fakeCpr})=>{const dashboardUrl=(0,utils_url.Ik)()("dashboardUrl");return(0,react.useEffect)((()=>{(0,user.u7)()||(0,url.SE)(dashboardUrl)}),[dashboardUrl]),(0,user.u7)()?react.createElement(create_patron_user_info_CreatePatron,{cpr:fakeCpr}):null}))));try{CreatePatronentry.displayName="CreatePatronentry",CreatePatronentry.__docgenInfo={description:"",displayName:"CreatePatronentry",props:{fakeCpr:{defaultValue:null,description:"",name:"fakeCpr",required:!1,type:{name:"string | undefined"}},agencyConfig:{defaultValue:null,description:"",name:"agencyConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},loginUrl:{defaultValue:null,description:"",name:"loginUrl",required:!0,type:{name:"string"}},redirectOnUserCreatedUrl:{defaultValue:null,description:"",name:"redirectOnUserCreatedUrl",required:!0,type:{name:"string"}},logoutUrl:{defaultValue:null,description:"",name:"logoutUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dashboardUrl:{defaultValue:null,description:"",name:"dashboardUrl",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},createPatronCancelButtonText:{defaultValue:null,description:"",name:"createPatronCancelButtonText",required:!0,type:{name:"string"}},patronPagePhoneInputMessageText:{defaultValue:null,description:"",name:"patronPagePhoneInputMessageText",required:!0,type:{name:"string"}},createPatronConfirmButtonText:{defaultValue:null,description:"",name:"createPatronConfirmButtonText",required:!0,type:{name:"string"}},createPatronHeaderText:{defaultValue:null,description:"",name:"createPatronHeaderText",required:!0,type:{name:"string"}},createPatronInvalidSsnBodyText:{defaultValue:null,description:"",name:"createPatronInvalidSsnBodyText",required:!0,type:{name:"string"}},createPatronInvalidSsnHeaderText:{defaultValue:null,description:"",name:"createPatronInvalidSsnHeaderText",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactNameLabelText:{defaultValue:null,description:"",name:"patronContactNameLabelText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},phoneInputMessageText:{defaultValue:null,description:"",name:"phoneInputMessageText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}},createPatronButtonLoadingText:{defaultValue:null,description:"",name:"createPatronButtonLoadingText",required:!0,type:{name:"string"}},createPatronButtonErrorText:{defaultValue:null,description:"",name:"createPatronButtonErrorText",required:!0,type:{name:"string"}},createPatronBranchDropdownNoteText:{defaultValue:null,description:"",name:"createPatronBranchDropdownNoteText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"]={docgenInfo:CreatePatronentry.__docgenInfo,name:"CreatePatronentry",path:"src/apps/create-patron-user-info/CreatePatron.entry.tsx#CreatePatronentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),token=__webpack_require__("./src/core/token.js");const CreatePatron_dev={title:"Apps / Create patron",component:CreatePatron_entry,argTypes:{...serviceUrlArgs.A,...pincodeArgs.A,...globalTextArgs.A,...globalConfigArgs.A,authUrl:{name:"Url where user can authenticate",defaultValue:"/login",control:{type:"text"}},logoutUrl:{name:"Url where user can logout",defaultValue:"/logout",control:{type:"text"}},blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},minAgeConfig:{defaultValue:"18",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},userinfoUrl:{defaultValue:"https://login.bib.dk/userinfo",control:{type:"text"}},dashboardUrl:{defaultValue:"/user/me/dashboard",control:{type:"text"}},agencyConfig:{defaultValue:'{ "id": "999999" }',control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronContactNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},createPatronHeaderText:{defaultValue:"Register as patron",control:{type:"text"}},createPatronInvalidSsnHeaderText:{defaultValue:"Invalid SSN",control:{type:"text"}},createPatronInvalidSsnBodyText:{defaultValue:"This SSN is invalid",control:{type:"text"}},redirectOnUserCreatedUrl:{defaultValue:"https://unsplash.com/photos/KRztl5I6xac",control:{type:"text"}},createPatronConfirmButtonText:{defaultValue:"Confirm",control:{type:"text"}},phoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}},fakeCpr:{name:"Storybook context cpr",defaultValue:"0101901111",control:{type:"text"}},createPatronCancelButtonText:{name:"create patron cancel button text",defaultValue:"Cancel",control:{type:"text"}},patronPagePhoneInputMessageText:{name:"patron page phone input message text",defaultValue:"Phone number",control:{type:"text"}},createPatronButtonLoadingText:{name:"create patron button loading text",defaultValue:"Loading",control:{type:"text"}},createPatronButtonErrorText:{name:"create patron button error text",defaultValue:"Error occurred",control:{type:"text"}},createPatronBranchDropdownNoteText:{name:"create patron branch dropdown note text",defaultValue:"Choose preferred library for pickup of your future reservations.",control:{type:"text"}},postRegisterRedirectInfoTopText:{name:"Redirect info top text",defaultValue:"You are now registered as a user and need to log in again to be able to use the application.",control:{type:"text"}},postRegisterRedirectInfoBottomText:{name:"Redirect info bottom text",defaultValue:"You will be sent to the Adgangsplatformen to log in again in @seconds seconds.",control:{type:"text"}},postRegisterRedirectButtonText:{name:"Redirect button text",defaultValue:"Log in again",control:{type:"text"}}}},CreatePatron_dev_CreatePatronEntry=(props=>((0,token.WG)(token.g2,"123456"),react.createElement(CreatePatron_entry,props))).bind({});CreatePatron_dev_CreatePatronEntry.args={}},"./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>dashboard_notification_list});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const yesterday=dayjs_min_default()().subtract(1,"day").format(date_format.n2),soon=dayjs_min_default()().add(7,"days").format(date_format.n2),longer=dayjs_min_default()().add(1,"year").format(date_format.n2);var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const dashboard_notification=({notificationNumber,notificationText,dataCy,notificationColor,notificationClickEvent,showStatusLabel=!1,badge})=>0===notificationNumber?null:react.createElement("button",{type:"button","data-cy":dataCy,onClick:notificationClickEvent,className:"mb-16"},react.createElement("div",{className:"list-dashboard shadow-medium-hover arrow__hover--right-small"},react.createElement("div",{className:`color-secondary-gray number number--${notificationColor}`},notificationNumber),react.createElement("span",{className:"list-dashboard__title text-header-h4 color-secondary-gray"},notificationText),showStatusLabel&&react.createElement(react.Fragment,null,"danger"===notificationColor&&react.createElement(status_badge.A,{dangerText:badge}),"warning"===notificationColor&&react.createElement(status_badge.A,{warningText:badge}),"info"===notificationColor&&react.createElement(status_badge.A,{infoText:badge})),react.createElement("div",{className:"list-dashboard__arrow"},react.createElement(arrow.A,null))));try{dashboardnotification.displayName="dashboardnotification",dashboardnotification.__docgenInfo={description:"",displayName:"dashboardnotification",props:{notificationNumber:{defaultValue:null,description:"",name:"notificationNumber",required:!0,type:{name:"number"}},showStatusLabel:{defaultValue:{value:"false"},description:"",name:"showStatusLabel",required:!1,type:{name:"boolean | undefined"}},notificationText:{defaultValue:null,description:"",name:"notificationText",required:!0,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},notificationColor:{defaultValue:null,description:"",name:"notificationColor",required:!0,type:{name:"string"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"string | undefined"}},notificationClickEvent:{defaultValue:null,description:"",name:"notificationClickEvent",required:!0,type:{name:"() => void"}},notificationClickEventParam:{defaultValue:null,description:"",name:"notificationClickEventParam",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"]={docgenInfo:dashboardnotification.__docgenInfo,name:"dashboardnotification",path:"src/apps/dashboard/dashboard-notification/dashboard-notification.tsx#dashboardnotification"})}catch(__react_docgen_typescript_loader_error){}const notification_skeleton=()=>react.createElement("div",{className:"list-dashboard ssc mb-16"},react.createElement("div",{className:"ssc-circle"}),react.createElement("div",{className:"ssc-head-line w-40"}));try{notificationskeleton.displayName="notificationskeleton",notificationskeleton.__docgenInfo={description:"",displayName:"notificationskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification/notification-skeleton.tsx#notificationskeleton"]={docgenInfo:notificationskeleton.__docgenInfo,name:"notificationskeleton",path:"src/apps/dashboard/dashboard-notification/notification-skeleton.tsx#notificationskeleton"})}catch(__react_docgen_typescript_loader_error){}const Notifications=({materials,showOnlyNotifications=!1,showStatusLabel=!1,isLoading=!1})=>{const displayedNotifications=showOnlyNotifications?materials.filter((({showNotificationDot})=>showNotificationDot)):materials;return isLoading&&0===displayedNotifications.length?react.createElement(react.Fragment,null,[0,1].map((()=>react.createElement(notification_skeleton,null)))):react.createElement(react.Fragment,null,displayedNotifications.map((({listLength,header:headerNotification,color,notificationClickEvent,badge,dataCy})=>react.createElement(dashboard_notification,{notificationNumber:listLength,notificationText:headerNotification,badge,dataCy,key:headerNotification,notificationColor:color,notificationClickEvent,showStatusLabel}))))},dashboard_notification_list_Notifications=Notifications;try{Notifications.displayName="Notifications",Notifications.__docgenInfo={description:"",displayName:"Notifications",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},showOnlyNotifications:{defaultValue:{value:"false"},description:"",name:"showOnlyNotifications",required:!1,type:{name:"boolean | undefined"}},showStatusLabel:{defaultValue:{value:"false"},description:"",name:"showStatusLabel",required:!1,type:{name:"boolean | undefined"}},isLoading:{defaultValue:{value:"false"},description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"]={docgenInfo:Notifications.__docgenInfo,name:"Notifications",path:"src/apps/dashboard/dashboard-notification-list/Notifications.tsx#Notifications"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const NotificationColumn=({materials,materialsCount,emptyListText,header,isLoading=!1,linkText,linkUrl})=>react.createElement("div",{className:"status-userprofile__column my-64"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper mb-16"},react.createElement("h2",{"data-cy":`dashboard-${header.toLowerCase()}-header`,className:"text-header-h3"},header))),isLoading&&0===materialsCount&&react.createElement(notification_skeleton,null),!isLoading&&0===materialsCount&&react.createElement(empty_list.A,{emptyListText}),0!==materialsCount&&react.createElement(dashboard_notification_list_Notifications,{materials,showStatusLabel:!0}),linkText&&linkUrl&&react.createElement("div",{className:"mt-8"},react.createElement(Link.A,{href:linkUrl,className:"link-tag link-tag link-filters__tag"},linkText),react.createElement("span",{className:"link-filters__counter"},materialsCount))),dashboard_notification_list_NotificationColumn=NotificationColumn;try{NotificationColumn.displayName="NotificationColumn",NotificationColumn.__docgenInfo={description:"",displayName:"NotificationColumn",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"NotificationMaterialsList[]"}},materialsCount:{defaultValue:null,description:"",name:"materialsCount",required:!0,type:{name:"number"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}},isLoading:{defaultValue:{value:"false"},description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}},linkText:{defaultValue:null,description:"",name:"linkText",required:!1,type:{name:"string | undefined"}},linkUrl:{defaultValue:null,description:"",name:"linkUrl",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"]={docgenInfo:NotificationColumn.__docgenInfo,name:"NotificationColumn",path:"src/apps/dashboard/dashboard-notification-list/NotificationColumn.tsx#NotificationColumn"})}catch(__react_docgen_typescript_loader_error){}var modal=__webpack_require__("./src/core/utils/modal.tsx"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const GroupModalReservationsList=({materials,selectedMaterials,selectMaterials,pageSize,header,marginBottonPager,openDetailsModal})=>{const t=(0,utils_text.F)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:materials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...materials].splice(0,itemsShown))}),[itemsShown,materials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.findIndex((obj=>null!==item.faust?obj.faust===item.faust:void 0!==item.identifier?obj.identifier===item.identifier:-1));indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return 0===displayedMaterials.length?null:react.createElement(react.Fragment,null,react.createElement("h3",{className:"text-body-medium-regular"},header),react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((material,i)=>{const{expiryDate,faust,identifier,reservationIds}=material,selected=null==selectedMaterials?void 0:selectedMaterials.some((selectedMaterial=>isEqual_default()(selectedMaterial,material))),statusText=(0,helpers.Iw)(material,t),statusBadgeComponent=statusText?react.createElement(status_badge.A,{badgeDate:expiryDate,neutralText:statusText,infoText:""}):null;return(identifier||reservationIds||faust)&&react.createElement(selectable_material.A,{item:material,displayedMaterial:material,focused:i===firstInNewPage,statusBadgeComponent,openDetailsModal,key:(0,reservation_type.OQ)(material),selected,onMaterialChecked,disabled:!1,statusMessageComponentMobile:null,statusMessageComponentDesktop:null})}))),react.createElement(PagerComponent,{classNames:marginBottonPager?"result-pager--margin-bottom":""}))},GroupModal_GroupModalReservationsList=GroupModalReservationsList;try{GroupModalReservationsList.displayName="GroupModalReservationsList",GroupModalReservationsList.__docgenInfo={description:"",displayName:"GroupModalReservationsList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"Nullable>[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>; }>>[]) => void"}},marginBottonPager:{defaultValue:null,description:"",name:"marginBottonPager",required:!0,type:{name:"boolean"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"]={docgenInfo:GroupModalReservationsList.__docgenInfo,name:"GroupModalReservationsList",path:"src/components/GroupModal/GroupModalReservationsList.tsx#GroupModalReservationsList"})}catch(__react_docgen_typescript_loader_error){}var StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const modal_ReservationsGroupModal=({pageSize,modalId,setReservationsToDelete,openDetailsModal})=>{const{fbs,publizon}=(0,useReservations.A)(),t=(0,utils_text.F)(),{reservationsReady,reservationsQueued}=(0,modal_helpers.c6)(),[materialsToDelete,setMaterialsToDelete]=(0,react.useState)([]);let physicalReservations=[],digitalReservations=[];modalId===reservationsReady&&(physicalReservations=fbs.readyToLoan,digitalReservations=publizon.readyToLoan),modalId===reservationsQueued&&(physicalReservations=fbs.queued,digitalReservations=publizon.queued),(0,react.useEffect)((()=>{setMaterialsToDelete([])}),[modalId]);const selectableReservations=[...physicalReservations,...digitalReservations],selectMaterials=materials=>{setMaterialsToDelete(materials)};return react.createElement(modal.A,{modalId,closeModalAriaLabelText:t("groupModalReservationsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalReservationsLoansAriaDescriptionText")},react.createElement("div",{className:"modal-loan"},react.createElement("div",{className:"modal-loan__list"},modalId===reservationsQueued&&react.createElement(SimpleModalHeader.A,{header:t("queuedReservationsText")}),modalId===reservationsReady&&react.createElement(StatusCircleModalHeader.A,{header:t("reservationsReadyForPickupText"),statusCircleComponent:react.createElement(status_circle.A,{loanDate:""})}),react.createElement(GroupModalContent.A,{buttonComponent:react.createElement(Button.$,{label:t("removeAllReservationsText",{count:materialsToDelete.length,placeholders:{"@amount":materialsToDelete.length}}),buttonType:"none",disabled:!materialsToDelete.length,collapsible:!1,size:"small",variant:"filled",onClick:()=>(setReservationsToDelete(materialsToDelete),void setMaterialsToDelete([])),dataCy:"remove-reservations-button"}),amountOfSelectableMaterials:selectableReservations.length,selectableMaterials:selectableReservations,selectedMaterials:materialsToDelete,selectMaterials},react.createElement(GroupModal_GroupModalReservationsList,{openDetailsModal,header:t("physicalReservationsHeaderText"),materials:physicalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials,marginBottonPager:0===digitalReservations.length}),react.createElement(GroupModal_GroupModalReservationsList,{marginBottonPager:!0,openDetailsModal,header:t("digitalReservationsHeaderText"),materials:digitalReservations,pageSize,selectedMaterials:materialsToDelete,selectMaterials})))))};try{ReservationsGroupModal.displayName="ReservationsGroupModal",ReservationsGroupModal.__docgenInfo={description:"",displayName:"ReservationsGroupModal",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setReservationsToDelete:{defaultValue:null,description:"",name:"setReservationsToDelete",required:!0,type:{name:"(reservations: Nullable>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"]={docgenInfo:ReservationsGroupModal.__docgenInfo,name:"ReservationsGroupModal",path:"src/apps/dashboard/modal/ReservationsGroupModal.tsx#ReservationsGroupModal"})}catch(__react_docgen_typescript_loader_error){}var reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const dashboard_notification_list=({pageSize,columns})=>{const t=(0,utils_text.F)(),u=(0,url.Ik)(),physicalLoansUrl=u("physicalLoansUrl"),reservationsUrl=u("reservationsUrl"),{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:reservationsQueued,isLoading:isLoadingReservations}}=(0,useReservations.A)(),{all:{loans,isLoading:isLoadingLoans},fbs:{overdue:loansOverduePhysical,soonOverdue:loansSoonOverduePhysical,farFromOverdue:loansFarFromOverduePhysical,isLoading:isLoadingLoansPhysical},publizon:{soonOverdue:loansSoonOverdueDigital,farFromOverdue:loansFarFromOverdueDigital,isLoading:isLoadingLoansDigital}}=(0,useLoans.A)(),[reservationsForDeleting,setReservationsForDeleting]=(0,react.useState)([]),[loansToDisplay,setLoansToDisplay]=(0,react.useState)(null),[modalHeader,setModalHeader]=(0,react.useState)(""),{open}=(0,modal.X)(),{dueDateModal,deleteReservations}=(0,modal_helpers.c6)(),[dueDate,setDueDate]=(0,react.useState)(null),[modalLoan,setModalLoan]=(0,react.useState)(null),[reservationForModal,setReservationForModal]=(0,react.useState)(null),[reservationModalId,setReservationModalId]=(0,react.useState)(""),openModalHandler=(0,react.useCallback)((modalId=>{setReservationModalId(modalId),open(modalId)}),[open]),{reservationsReady:reservationsReadyID,reservationsQueued:reservationsQueueID}=(0,modal_helpers.c6)(),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.B0)(loan))}),[open]),openReservationDetailsModal=(0,react.useCallback)((reservation=>{setReservationForModal(reservation),open((0,material_details_modal.bk)(reservation))}),[open]),openReservationDeleteModal=(0,react.useCallback)((()=>{reservationForModal&&open((0,delete_reservation_modal.g)(reservationForModal))}),[open,reservationForModal]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{switch(setDueDate(dueDateInput),dueDateInput){case yesterday:setLoansToDisplay(loansOverduePhysical),setModalHeader(t("loansOverdueText"));break;case soon:setLoansToDisplay(loansSoonOverduePhysical.concat(loansSoonOverdueDigital)),setModalHeader(t("loansSoonOverdueText"));break;case longer:setLoansToDisplay(loansFarFromOverduePhysical.concat(loansFarFromOverdueDigital)),setModalHeader(t("loansNotOverdueText"));break;default:throw new Error("Invalid due date input")}open((0,modal_helpers.Q0)(dueDateModal,[dueDateInput]))}),[dueDateModal,open,loansFarFromOverduePhysical,loansOverduePhysical,loansSoonOverduePhysical,loansSoonOverdueDigital,loansFarFromOverdueDigital,t]),dashboardNotificationsLoan=[{listLength:loansOverduePhysical.length,badge:t("materialDetailsOverdueText"),header:t("loansOverdueText"),color:"danger",dataCy:"physical-loans-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansOverduePhysical.length?openLoanDetailsModal(loansOverduePhysical[0]):openDueDateModal(yesterday)},{listLength:loansSoonOverduePhysical.length+loansSoonOverdueDigital.length,badge:t("statusBadgeWarningText"),header:t("loansSoonOverdueText"),color:"warning",dataCy:"physical-loans-soon-overdue",showNotificationDot:!0,notificationClickEvent:()=>1===loansSoonOverduePhysical.length?openLoanDetailsModal(loansSoonOverduePhysical[0]):openDueDateModal(soon)},{listLength:loansFarFromOverduePhysical.length+loansFarFromOverdueDigital.length,header:t("loansNotOverdueText"),dataCy:"loans-not-overdue",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===loansFarFromOverduePhysical.length?openLoanDetailsModal(loansFarFromOverduePhysical[0]):openDueDateModal(longer)}],dashboardNotificationsReservations=[{listLength:reservationsReadyToLoan.length,header:t("reservationsReadyText"),badge:t("readyForLoanText"),dataCy:"reservations-ready",showNotificationDot:!0,color:"info",notificationClickEvent:()=>1===reservationsReadyToLoan.length?openReservationDetailsModal(reservationsReadyToLoan[0]):openModalHandler(reservationsReadyID)},{listLength:reservationsQueued.length,header:t("reservationsStillInQueueForText"),dataCy:"reservations-queued",color:"neutral",showNotificationDot:!1,notificationClickEvent:()=>1===reservationsQueued.length?openReservationDetailsModal(reservationsQueued[0]):openModalHandler(reservationsQueueID)}];return react.createElement(react.Fragment,null,react.createElement("div",{className:"status-userprofile"},columns&&react.createElement(react.Fragment,null,react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsLoan,materialsCount:loans.length,header:t("physicalLoansText"),emptyListText:t("noPhysicalLoansText"),isLoading:isLoadingLoans||isLoadingLoansPhysical||isLoadingLoansDigital,linkText:t("dashboardLoansLinkText"),linkUrl:physicalLoansUrl}),react.createElement(dashboard_notification_list_NotificationColumn,{materials:dashboardNotificationsReservations,materialsCount:reservations.length,header:t("reservationsText"),emptyListText:t("noReservationsText"),isLoading:isLoadingReservations,linkText:t("dashboardReservationsLinkText"),linkUrl:reservationsUrl}))),!columns&&react.createElement(dashboard_notification_list_Notifications,{showOnlyNotifications:!0,materials:[...dashboardNotificationsLoan,...dashboardNotificationsReservations],isLoading:isLoadingLoans||isLoadingLoansPhysical||isLoadingLoansDigital||isLoadingReservations}),modalLoan&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.B0)(modalLoan)},react.createElement(material_details.A,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.B0)(modalLoan)})),dueDate&&loans&&loansToDisplay&&react.createElement(LoansGroupModal.A,{pageSize,openDetailsModal:openLoanDetailsModal,dueDate,loansModal:loansToDisplay},react.createElement(SimpleModalHeader.A,{header:modalHeader})),reservations&&react.createElement(modal_ReservationsGroupModal,{openDetailsModal:openReservationDetailsModal,modalId:reservationModalId,setReservationsToDelete:resForDeleting=>{setReservationsForDeleting(resForDeleting),open(deleteReservations)},pageSize}),reservationForModal&&react.createElement(delete_reservation_modal.A,{modalId:(0,delete_reservation_modal.g)(reservationForModal),reservations:[reservationForModal]}),reservationsForDeleting&&react.createElement(delete_reservation_modal.A,{modalId:`${deleteReservations}`,reservations:reservationsForDeleting}),reservationForModal&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.bk)(reservationForModal)},react.createElement(reservation_details.A,{openReservationDeleteModal,item:reservationForModal,reservation:reservationForModal})))};try{dashboardnotificationlist.displayName="dashboardnotificationlist",dashboardnotificationlist.__docgenInfo={description:"",displayName:"dashboardnotificationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},columns:{defaultValue:null,description:"",name:"columns",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"]={docgenInfo:dashboardnotificationlist.__docgenInfo,name:"dashboardnotificationlist",path:"src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx#dashboardnotificationlist"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/dashboard/dashboard.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DashboardEntry:()=>dashboard_dev_DashboardEntry,default:()=>dashboard_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx");const dashboard_fees=()=>{const t=(0,utils_text.F)(),feesPageUrl=(0,url.Ik)()("feesPageUrl"),{data:fbsFees=[],isLoading}=(0,fbs.J2)({includepaid:!1,includenonpayable:!0}),[totalFeeAmount,setTotalFeeAmount]=(0,react.useState)("0");return(0,react.useEffect)((()=>{fbsFees&&Array.isArray(fbsFees)&&setTotalFeeAmount((0,general.ZG)(fbsFees))}),[fbsFees,totalFeeAmount]),isLoading||!isLoading&&0===fbsFees.length?null:react.createElement("div",{className:"fee-container"},react.createElement("div",null,react.createElement("div",{className:"status-userprofile__column"},react.createElement("div",{className:"link-filters"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("h2",{className:"text-header-h3 mb-16","data-cy":"dashboard-fees-header"},t("feesText")))),react.createElement(warning_bar.A,{overdueText:`${t("totalOwedText")} ${t("totalAmountFeeText",{placeholders:{"@total":totalFeeAmount}})}`,rightButtonText:t("dashboardSeeMoreFeesText"),rightButtonAriaLabelText:t("dashboardSeeMoreFeesAriaLabelText"),rightLink:feesPageUrl}))))};try{dashboardfees.displayName="dashboardfees",dashboardfees.__docgenInfo={description:"",displayName:"dashboardfees",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"]={docgenInfo:dashboardfees.__docgenInfo,name:"dashboardfees",path:"src/apps/dashboard/dashboard-fees/dashboard-fees.tsx#dashboardfees"})}catch(__react_docgen_typescript_loader_error){}var dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx");const dashboard_dashboard=({pageSize})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"dashboard-page"},react.createElement("h1",{className:"text-header-h1 mt-32 mb-64","data-cy":"dashboard-header"},t("yourProfileText")),react.createElement(dashboard_fees,null),react.createElement(dashboard_notification_list.A,{columns:!0,pageSize}))};try{dashboard.displayName="dashboard",dashboard.__docgenInfo={description:"",displayName:"dashboard",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.tsx#dashboard"]={docgenInfo:dashboard.__docgenInfo,name:"dashboard",path:"src/apps/dashboard/dashboard.tsx#dashboard"})}catch(__react_docgen_typescript_loader_error){}const dashboard_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(dashboard_dashboard,{pageSize})})))));try{dashboardentry.displayName="dashboardentry",dashboardentry.__docgenInfo={description:"",displayName:"dashboardentry",props:{loansOverdueUrl:{defaultValue:null,description:"",name:"loansOverdueUrl",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},dashboardNumberInLineText:{defaultValue:null,description:"",name:"dashboardNumberInLineText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalDeleteProcessingText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteProcessingText",required:!0,type:{name:"string"}},deleteReservationModalErrorsStatusText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsStatusText",required:!0,type:{name:"string"}},deleteReservationModalErrorsTitleText:{defaultValue:null,description:"",name:"deleteReservationModalErrorsTitleText",required:!0,type:{name:"string"}},deleteReservationModalSuccessStatusText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessStatusText",required:!0,type:{name:"string"}},deleteReservationModalSuccessTitleText:{defaultValue:null,description:"",name:"deleteReservationModalSuccessTitleText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},feesText:{defaultValue:null,description:"",name:"feesText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},noPhysicalLoansText:{defaultValue:null,description:"",name:"noPhysicalLoansText",required:!0,type:{name:"string"}},noReservationsText:{defaultValue:null,description:"",name:"noReservationsText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesText",required:!0,type:{name:"string"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:null,description:"",name:"dashboardSeeMoreFeesAriaLabelText",required:!0,type:{name:"string"}},physicalLoansText:{defaultValue:null,description:"",name:"physicalLoansText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},queuedReservationsText:{defaultValue:null,description:"",name:"queuedReservationsText",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},reservationsText:{defaultValue:null,description:"",name:"reservationsText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},statusBadgeWarningText:{defaultValue:null,description:"",name:"statusBadgeWarningText",required:!0,type:{name:"string"}},totalAmountFeeText:{defaultValue:null,description:"",name:"totalAmountFeeText",required:!0,type:{name:"string"}},totalOwedText:{defaultValue:null,description:"",name:"totalOwedText",required:!0,type:{name:"string"}},yourProfileText:{defaultValue:null,description:"",name:"yourProfileText",required:!0,type:{name:"string"}},dashboardLoansLinkText:{defaultValue:null,description:"",name:"dashboardLoansLinkText",required:!0,type:{name:"string"}},dashboardReservationsLinkText:{defaultValue:null,description:"",name:"dashboardReservationsLinkText",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/dashboard/dashboard.entry.tsx#dashboardentry"]={docgenInfo:dashboardentry.__docgenInfo,name:"dashboardentry",path:"src/apps/dashboard/dashboard.entry.tsx#dashboardentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const dashboard_dev={title:"Apps / Dashboard",argTypes:{...serviceUrlArgs.A,...groupModalArgs.A,...loanGroupModalArgs.A,...renewalArgs.A,...reservationGroupModalArgs.A,...reservationMaterialDetailsArgs.A,...materialDetailsModalArgs.A,...deleteReservationModalArgs.A,...reservationListArgs.A,...globalTextArgs.A,...globalConfigArgs.A,physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},yourProfileText:{defaultValue:"Your profile",control:{type:"text"}},feesText:{defaultValue:"Fees",control:{type:"text"}},totalOwedText:{defaultValue:"You owe in total",control:{type:"text"}},dashboardSeeMoreFeesText:{defaultValue:"See more",control:{type:"text"}},dashboardSeeMoreFeesAriaLabelText:{defaultValue:"See your fees and how to pay",control:{type:"text"}},totalAmountFeeText:{defaultValue:"@total",control:{type:"text"}},physicalLoansText:{defaultValue:"Loans",control:{type:"text"}},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},reservationsText:{defaultValue:"Reservations",control:{type:"text"}},queuedReservationsText:{defaultValue:"Queued reservations",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},noPhysicalLoansText:{defaultValue:"At the moment, you have 0 physical loans",control:{type:"text"}},noReservationsText:{defaultValue:"At the moment, you have 0 reservations",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},dashboardNumberInLineText:{control:{type:"text"},defaultValue:"Number @count in line"},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},dashboardLoansLinkText:{defaultValue:"All loans",control:{type:"text"}},dashboardReservationsLinkText:{defaultValue:"All reservations",control:{type:"text"}}},component:dashboard_entry},dashboard_dev_DashboardEntry=(props=>react.createElement(dashboard_entry,props)).bind({});dashboard_dev_DashboardEntry.args={}},"./src/apps/demo-modal/demo-modal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>demo_modal_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const demo_modal=(0,utils_text.i)((()=>{const{open}=(0,modal.X)(),t=(0,utils_text.F)(),modalIdOne="demo-modal-one",modalIdTwo="demo-modal-two",onClick=modalId=>()=>{open(modalId)};return react.createElement(react.Fragment,null,react.createElement(modal.A,{modalId:modalIdTwo,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalTwoText")},react.createElement("h1",{id:`${modalIdTwo}-header`},modalIdTwo)),react.createElement(modal.A,{modalId:modalIdOne,screenReaderModalDescriptionText:t("screenReaderModalDescriptionText"),closeModalAriaLabelText:t("ariaLabelModalOneText")},react.createElement("h1",{id:`${modalIdOne}-header`},modalIdOne),react.createElement("button",{type:"button",id:`${modalIdTwo}-button`,onClick:onClick(modalIdTwo)},"Show Modal 2")),react.createElement("button",{type:"button",id:`${modalIdOne}-button`,onClick:onClick(modalIdOne)},"Show Modal 1"))}));try{demomodal.displayName="demomodal",demomodal.__docgenInfo={description:"",displayName:"demomodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.tsx#demomodal"]={docgenInfo:demomodal.__docgenInfo,name:"demomodal",path:"src/apps/demo-modal/demo-modal.tsx#demomodal"})}catch(__react_docgen_typescript_loader_error){}const demo_modal_entry=(0,utils_text.i)((props=>react.createElement(demo_modal,null)));try{demomodalentry.displayName="demomodalentry",demomodalentry.__docgenInfo={description:"",displayName:"demomodalentry",props:{ariaLabelModalOneText:{defaultValue:null,description:"",name:"ariaLabelModalOneText",required:!0,type:{name:"string"}},ariaLabelModalTwoText:{defaultValue:null,description:"",name:"ariaLabelModalTwoText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"]={docgenInfo:demomodalentry.__docgenInfo,name:"demomodalentry",path:"src/apps/demo-modal/demo-modal.entry.tsx#demomodalentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts");const demo_modal_dev={title:"Apps / Demo modal",component:demo_modal_entry,decorators:[esm.V],parameters:{query:{modal:"demo-modal-one"}},argTypes:{...globalTextArgs.A,ariaLabelModalOneText:{defaultValue:"Luk dialog et"},ariaLabelModalTwoText:{defaultValue:"Luk dialog to"},screenReaderModalDescriptionText:{defaultValue:"Denne modal dækker sidens indhold, og er en demo"}}},App=props=>react.createElement(demo_modal_entry,props)},"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesListMaterialComponentEntry:()=>FavoritesListMaterialComponentEntry,default:()=>FavoritesListMaterialComponent_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const SimpleMaterialAdapter=({pid,app,bright})=>{var _data$work;const{data}=(0,graphql.OZ)({id:pid});return react.createElement("div",null,data&&data.work&&react.createElement(SimpleMaterial.A,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,work:data.work,app,bright}))},simple_material_SimpleMaterialAdapter=SimpleMaterialAdapter;try{SimpleMaterialAdapter.displayName="SimpleMaterialAdapter",SimpleMaterialAdapter.__docgenInfo={description:"",displayName:"SimpleMaterialAdapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'},{value:'"recommended-material"'},{value:'"recommendation"'},{value:'"material-grid-automatic"'},{value:'"material-grid-manual"'}]}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"]={docgenInfo:SimpleMaterialAdapter.__docgenInfo,name:"SimpleMaterialAdapter",path:"src/components/simple-material/SimpleMaterialAdapter.tsx#SimpleMaterialAdapter"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const FavoritesListMaterialComponent=()=>{const t=(0,utils_text.F)(),[materials,setMaterials]=(0,react.useState)([]),favoritesListMaterialComponentGoToListUrl=(0,url.Ik)()("favoritesListMaterialComponentGoToListUrl"),{data}=(0,material_list.M7)("default"),{collections}=data||[];return(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections.slice(0,4))}),[collections,data]),0===materials.length?null:react.createElement("div",{className:"recommender recommender--bright"},react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("favoritesListMaterialComponentTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement(Link.A,{href:favoritesListMaterialComponentGoToListUrl,className:"button-link button-link--bright button-link--selected"},t("favoritesListMaterialComponentGoToListText"))),react.createElement("ul",{className:"recommender__grid"},materials.map((pid=>react.createElement(simple_material_SimpleMaterialAdapter,{app:"favorites-list-mc",bright:!0,pid})))))},favorites_list_material_component_FavoritesListMaterialComponent=FavoritesListMaterialComponent;try{FavoritesListMaterialComponent.displayName="FavoritesListMaterialComponent",FavoritesListMaterialComponent.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponent",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"]={docgenInfo:FavoritesListMaterialComponent.__docgenInfo,name:"FavoritesListMaterialComponent",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.tsx#FavoritesListMaterialComponent"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const FavoritesListMaterialComponent_entry=(0,url.nU)((0,config.NV)((0,utils_text.i)((()=>react.createElement(favorites_list_material_component_FavoritesListMaterialComponent,null)))));try{FavoritesListMaterialComponententry.displayName="FavoritesListMaterialComponententry",FavoritesListMaterialComponententry.__docgenInfo={description:"",displayName:"FavoritesListMaterialComponententry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},favoritesListMaterialComponentTitleText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListText:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListText",required:!0,type:{name:"string"}},favoritesListMaterialComponentGoToListUrl:{defaultValue:null,description:"",name:"favoritesListMaterialComponentGoToListUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"]={docgenInfo:FavoritesListMaterialComponententry.__docgenInfo,name:"FavoritesListMaterialComponententry",path:"src/apps/favorites-list-material-component/FavoritesListMaterialComponent.entry.tsx#FavoritesListMaterialComponententry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const FavoritesListMaterialComponent_dev={title:"Apps / Favorites list material component",component:FavoritesListMaterialComponent_entry,decorators:[esm.V],argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,favoritesListMaterialComponentTitleText:{control:{type:"text"},defaultValue:"Your list"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},favoritesListMaterialComponentGoToListText:{control:{type:"text"},defaultValue:"Go to My list"},favoritesListMaterialComponentGoToListUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8"}}},FavoritesListMaterialComponentEntry=(props=>react.createElement(FavoritesListMaterialComponent_entry,props)).bind({})},"./src/apps/favorites-list/FavoritesList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FavoritesList:()=>FavoritesList_dev_FavoritesList,default:()=>FavoritesList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),card_list_item=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const card_list_item_adapter=({pid})=>{var _data$work;const{data,isLoading}=(0,graphql.OZ)({id:pid});return isLoading?react.createElement(card_list_item_skeleton.A,null):react.createElement("div",null,data&&data.work&&react.createElement(card_list_item.A,{key:null===(_data$work=data.work)||void 0===_data$work?void 0:_data$work.workId,item:data.work,coverTint:"100",resultNumber:0}))};try{cardlistitemadapter.displayName="cardlistitemadapter",cardlistitemadapter.__docgenInfo={description:"",displayName:"cardlistitemadapter",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"]={docgenInfo:cardlistitemadapter.__docgenInfo,name:"cardlistitemadapter",path:"src/components/card-item-list/card-list-item/card-list-item-adapter.tsx#cardlistitemadapter"})}catch(__react_docgen_typescript_loader_error){}var MaterialListItem=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const FavoritesList=({pageSize})=>{const t=(0,utils_text.F)(),{data,isLoading}=(0,material_list.M7)("default"),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),[materials,setMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,page}=(0,use_pager.A)({hitcount:materials.length,pageSize}),{collections}=data||[],lastItemRef=(0,react.useRef)(null);(0,react.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,displayedMaterials]),(0,react.useEffect)((()=>setDisplayedMaterials([...materials].splice(0,itemsShown))),[itemsShown,materials]),(0,react.useEffect)((()=>{data&&data.collections&&setMaterials(collections)}),[collections,data]);const skeletonList=react.createElement(react.Fragment,null,react.createElement("div",{className:"ssc"},react.createElement("div",{className:"ssc-line w-10 my-32"}," ")),react.createElement("ul",{className:"card-list-page__list my-32"},[...Array(5)].map((()=>react.createElement("li",null,react.createElement(card_list_item_skeleton.A,null)))))),materialsCount=materials.length>0&&react.createElement("p",{className:"text-small-caption my-32"},t("favoritesListMaterialsText",{placeholders:{"@count":materials.length}}));return react.createElement("div",{className:"card-list-page"},react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title"},t("favoritesListHeaderText")),isLoading?skeletonList:react.createElement(react.Fragment,null,materialsCount,displayedMaterials.length>0?react.createElement("ul",{className:"card-list-page__list my-32"},displayedMaterials.map(((pid,i)=>{const isFirstNewItem=i===page*pageSize;return react.createElement(MaterialListItem.A,{key:pid,ref:isFirstNewItem?lastItemRef:null},react.createElement(card_list_item_adapter,{pid}))}))):react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("favoritesListEmptyText")}),react.createElement(PagerComponent,null)))},favorites_list_FavoritesList=FavoritesList;try{FavoritesList.displayName="FavoritesList",FavoritesList.__docgenInfo={description:"",displayName:"FavoritesList",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.tsx#FavoritesList"]={docgenInfo:FavoritesList.__docgenInfo,name:"FavoritesList",path:"src/apps/favorites-list/FavoritesList.tsx#FavoritesList"})}catch(__react_docgen_typescript_loader_error){}const FavoritesList_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement(favorites_list_FavoritesList,{pageSize})}))));try{FavoritesListentry.displayName="FavoritesListentry",FavoritesListentry.__docgenInfo={description:"",displayName:"FavoritesListentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},fbsBaseUrlConfig:{defaultValue:null,description:"",name:"fbsBaseUrlConfig",required:!0,type:{name:"string"}},favoritesListMaterialsText:{defaultValue:null,description:"",name:"favoritesListMaterialsText",required:!0,type:{name:"string"}},favoritesListHeaderText:{defaultValue:null,description:"",name:"favoritesListHeaderText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},favoritesListEmptyText:{defaultValue:null,description:"",name:"favoritesListEmptyText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"]={docgenInfo:FavoritesListentry.__docgenInfo,name:"FavoritesListentry",path:"src/apps/favorites-list/FavoritesList.entry.tsx#FavoritesListentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const FavoritesList_dev={title:"Apps / Favorite list",component:FavoritesList_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,pageSizeDesktop:{name:"Number of favorite items on desktop",defaultValue:50,control:{type:"number"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},pageSizeMobile:{name:"Number of favorite items on mobile",defaultValue:20,control:{type:"number"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},favoritesListMaterialsText:{defaultValue:"@count materials",control:{type:"text"}},favoritesListHeaderText:{defaultValue:"Favorites",control:{type:"text"}},byAuthorText:{defaultValue:"By",control:{type:"text"}},etAlText:{defaultValue:"...",control:{type:"text"}},favoritesListEmptyText:{defaultValue:"Your favorites list is empty",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}}},decorators:[esm.V]},FavoritesList_dev_FavoritesList=args=>react.createElement(FavoritesList_entry,args)},"./src/apps/fee-list/FeeList.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{FeeListEntry:()=>FeeList_dev_FeeListEntry,FeeListFeeDetailsModal:()=>FeeListFeeDetailsModal,default:()=>FeeList_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx");const list_header=({header,amount,buttons,dataCy="list-header"})=>react.createElement("div",{className:"dpl-list-buttons"},react.createElement("h2",{"data-cy":dataCy,className:"dpl-list-buttons__header"},header,null!==amount&&react.createElement("span",{className:"dpl-list-buttons__power"},amount)),buttons&&react.createElement("div",{className:"dpl-list-buttons__buttons"},buttons));try{listheader.displayName="listheader",listheader.__docgenInfo={description:"",displayName:"listheader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"ReactNode"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number | null"}},buttons:{defaultValue:null,description:"",name:"buttons",required:!1,type:{name:"ReactNode"}},dataCy:{defaultValue:{value:"list-header"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-header/list-header.tsx#listheader"]={docgenInfo:listheader.__docgenInfo,name:"listheader",path:"src/components/list-header/list-header.tsx#listheader"})}catch(__react_docgen_typescript_loader_error){}var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx");const fee_info=({material,materialItemNumber,children})=>{const{authorsShort="",materialType="",year="",title="",description="",pid,series=""}=material,t=(0,utils_text.F)();return react.createElement("div",{className:"list-reservation__material"},react.createElement("div",null,react.createElement(cover.Y,{ids:[pid],idType:"pid",size:"small",animate:!1,alt:description||""})),react.createElement("div",{className:"list-reservation__information"},react.createElement("div",null,react.createElement("div",{className:"status-label status-label--outline"},materialType)),react.createElement("div",{className:"list-reservation__about"},react.createElement("h3",{className:"text-header-h4"},title),react.createElement("p",{className:"text-small-caption color-secondary-gray"},react.createElement(authorYear.A,{author:authorsShort,year:year||""})),react.createElement("p",{className:"text-small-caption color-secondary-gray"},series)),react.createElement("div",null),react.createElement("p",{className:"text-small-caption color-secondary-gray"},t("feeListMaterialNumberText",{placeholders:{"@materialNumber":materialItemNumber}})),children))};try{feeinfo.displayName="feeinfo",feeinfo.__docgenInfo={description:"",displayName:"feeinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"]={docgenInfo:feeinfo.__docgenInfo,name:"feeinfo",path:"src/apps/fee-list/stackable-fees/fee-info.tsx#feeinfo"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),date_format=__webpack_require__("./src/core/configuration/date-format.json");const fee_status=({dueDate,reasonMessage})=>{const t=(0,utils_text.F)(),dueDateFormatted=dayjs_min_default()(dueDate).format(date_format.$k);return react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},react.createElement("div",{className:"status-label status-label--danger"},reasonMessage),react.createElement("p",{className:"text-small-caption"},t("feeCreatedText",{placeholders:{"@date":dueDateFormatted}}))))};try{feestatus.displayName="feestatus",feestatus.__docgenInfo={description:"",displayName:"feestatus",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string"}},reasonMessage:{defaultValue:null,description:"",name:"reasonMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"]={docgenInfo:feestatus.__docgenInfo,name:"feestatus",path:"src/apps/fee-list/stackable-fees/fee-status.tsx#feestatus"})}catch(__react_docgen_typescript_loader_error){}var currency=__webpack_require__("./src/core/utils/helpers/currency.ts");const FeeListItemSkeleton=()=>react.createElement("button",{type:"button",className:"ssc list-reservation my-32","aria-label":"Fee card"},react.createElement("div",{className:"list-reservation__material"},react.createElement("div",null,react.createElement("div",{className:"ssc-square cover--size-small"})),react.createElement("div",{className:"list-reservation__information"},react.createElement("div",{className:"ssc-head-line w-30 mb-24"}),react.createElement("div",{className:"ssc-head-line w-100 mb-4"}),react.createElement("div",{className:"ssc-line w-70 mb-4"}),react.createElement("div",{className:"ssc-line w-60 mb-4"}))),react.createElement("div",{className:"list-reservation__status"},react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},react.createElement("div",{className:"ssc-head-line w-30"}),react.createElement("div",{className:"ssc-line w-80 mb-4"}))),react.createElement("div",{className:"list-reservation__fee flex justify-end"},react.createElement("div",{className:"ssc-head-line w-30"})))),fee_list_FeeListItemSkeleton=FeeListItemSkeleton;try{FeeListItemSkeleton.displayName="FeeListItemSkeleton",FeeListItemSkeleton.__docgenInfo={description:"",displayName:"FeeListItemSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeListItemSkeleton.tsx#FeeListItemSkeleton"]={docgenInfo:FeeListItemSkeleton.__docgenInfo,name:"FeeListItemSkeleton",path:"src/apps/fee-list/FeeListItemSkeleton.tsx#FeeListItemSkeleton"})}catch(__react_docgen_typescript_loader_error){}const stackable_fees=(0,material_fetch_hoc.A)((({amountOfMaterialsWithDueDate,material={},feeData,materialItemNumber,openDetailsModalClickEvent})=>{const t=(0,utils_text.F)(),{amount=0,creationDate="",reasonMessage=""}=feeData,stackSize=amountOfMaterialsWithDueDate-1,listReservationClass=(0,clsx.A)(["list-reservation","my-32"],{"list-reservation--stacked":stackSize>0});return feeData?react.createElement("button",{type:"button",onClick:()=>openDetailsModalClickEvent(feeData.feeId),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDetailsModalClickEvent(feeData.feeId)},className:listReservationClass},react.createElement(fee_info,{materialItemNumber,material},stackSize>0&&react.createElement("p",{className:"text-small-caption color-secondary-gray mt-8","data-cy":"stack-size"},t("plusXOtherMaterialsText",{placeholders:{"@amount":stackSize}}))),react.createElement("div",{className:"list-reservation__status"},react.createElement(fee_status,{dueDate:creationDate,reasonMessage}),react.createElement("div",{className:"list-reservation__fee"},react.createElement("p",{className:"text-body-medium-regular"},t("itemFeeAmountText",{placeholders:{"@fee":(0,currency.v)(amount)}}))))):null}),fee_list_FeeListItemSkeleton);try{stackablefees.displayName="stackablefees",stackablefees.__docgenInfo={description:"",displayName:"stackablefees",props:{amountOfMaterialsWithDueDate:{defaultValue:null,description:"",name:"amountOfMaterialsWithDueDate",required:!0,type:{name:"number"}},material:{defaultValue:{value:"{}"},description:"",name:"material",required:!1,type:{name:"Nullable> | undefined"}},feeData:{defaultValue:null,description:"",name:"feeData",required:!0,type:{name:"FeeV2"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!0,type:{name:"string"}},openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(feeId: number) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"]={docgenInfo:stackablefees.__docgenInfo,name:"stackablefees",path:"src/apps/fee-list/stackable-fees/stackable-fees.tsx#stackablefees"})}catch(__react_docgen_typescript_loader_error){}const fee_list_list=({openDetailsModalClickEvent,fees,listHeader,dataCy,totalText,className,alreadyPaidText})=>react.createElement("div",null,fees&&react.createElement("div",{className,"data-cy":dataCy},react.createElement(list_header,{header:listHeader,amount:fees.length}),fees.map((itemData=>react.createElement(stackable_fees,{amountOfMaterialsWithDueDate:itemData.materials.length,item:{faust:itemData.materials[0].recordId},materialItemNumber:itemData.materials[0].materialItemNumber,feeData:itemData,openDetailsModalClickEvent,key:itemData.feeId}))),react.createElement("div",{className:"fee-list-bottom"},react.createElement("div",{className:"fee-list-bottom__paymenttypes"}),react.createElement("div",{className:"fee-list-bottom__actions"},react.createElement("p",{className:"text-small-caption color-secondary-gray"},alreadyPaidText),react.createElement("p",{className:"text-body-small-medium mt-16"},totalText)))));try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{openDetailsModalClickEvent:{defaultValue:null,description:"",name:"openDetailsModalClickEvent",required:!0,type:{name:"(feeId: number) => void"}},fees:{defaultValue:null,description:"",name:"fees",required:!0,type:{name:"FeeV2[] | null"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},listHeader:{defaultValue:null,description:"",name:"listHeader",required:!0,type:{name:"ReactNode"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},alreadyPaidText:{defaultValue:null,description:"",name:"alreadyPaidText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/fee-list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const fee_details_modal=({modalId,children})=>{const t=(0,utils_text.F)();return react.createElement(modal.A,{modalId:modalId||"",classNames:"modal-details",closeModalAriaLabelText:t("feeDetailsModalCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("feeDetailsModalDescriptionText")},children)};try{feedetailsmodal.displayName="feedetailsmodal",feedetailsmodal.__docgenInfo={description:"",displayName:"feedetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"]={docgenInfo:feedetailsmodal.__docgenInfo,name:"feedetailsmodal",path:"src/apps/fee-list/modal/fee-details-modal.tsx#feedetailsmodal"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link);const my_payment_overview_modal=()=>{const t=(0,utils_text.F)(),feeListPaymentSiteUrl=(0,utils_url.Ik)()("feeListPaymentSiteUrl",!0),{close}=(0,modal.X)();return react.createElement(modal.A,{modalId:"intermediate-payment-modal",closeModalAriaLabelText:"test",screenReaderModalDescriptionText:"test",classNames:"modal-cta"},react.createElement("div",{className:"modal-cta__container"},react.createElement("h2",{className:"text-header-h2"},t("feePaymentModalHeaderText")),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("feePaymentModalBodyText")),react.createElement("p",{className:"text-body-medium-regular mt-24"},t("feePaymentModalNoticeText"))),react.createElement("div",{className:"modal-cta__buttons mt-48"},feeListPaymentSiteUrl&&react.createElement(Link.A,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:feeListPaymentSiteUrl,isNewTab:!0},t("feePaymentModalGotoText")," ",react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})),react.createElement("div",{className:"modal-cta__link"},react.createElement("button",{className:"link-tag color-secondary-gray ml-8",type:"button",onClick:()=>{close("intermediate-payment-modal")}},t("feePaymentModalCancelText"))))))};try{mypaymentoverviewmodal.displayName="mypaymentoverviewmodal",mypaymentoverviewmodal.__docgenInfo={description:"",displayName:"mypaymentoverviewmodal",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"]={docgenInfo:mypaymentoverviewmodal.__docgenInfo,name:"mypaymentoverviewmodal",path:"src/apps/fee-list/modal/my-payment-overview-modal.tsx#mypaymentoverviewmodal"})}catch(__react_docgen_typescript_loader_error){}var selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx");const stackable_fees_list=({materials,reasonForFee})=>{const t=(0,utils_text.F)();return react.createElement("ul",{className:"modal-loan__list-materials"},materials.map((({recordId,materialItemNumber})=>react.createElement(selectable_material.A,{focused:!1,disabled:!0,statusBadgeComponent:react.createElement(status_badge.A,{dangerText:reasonForFee}),item:{faust:recordId},key:recordId,statusMessageComponentMobile:react.createElement("div",{className:"list-materials__status__note-mobile"},t("feeListMaterialNumberText",{placeholders:{"@materialNumber":materialItemNumber}})),statusMessageComponentDesktop:react.createElement("div",{className:"list-materials__status__note-desktop"},t("feeListMaterialNumberText",{placeholders:{"@materialNumber":materialItemNumber}})),noHoverEffect:!0}))))};try{stackablefeeslist.displayName="stackablefeeslist",stackablefeeslist.__docgenInfo={description:"",displayName:"stackablefeeslist",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"FeeMaterialV2[]"}},reasonForFee:{defaultValue:null,description:"",name:"reasonForFee",required:!0,type:{name:"string"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"]={docgenInfo:stackablefeeslist.__docgenInfo,name:"stackablefeeslist",path:"src/apps/fee-list/stackable-fees/stackable-fees-list.tsx#stackablefeeslist"})}catch(__react_docgen_typescript_loader_error){}var GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx");const fee_details_content=({feeDetailsData})=>{const t=(0,utils_text.F)(),{amount=0,creationDate="",materials=[],reasonMessage}=feeDetailsData,creationDateFormatted=dayjs_min_default()(creationDate).format(date_format.rX);return react.createElement("div",{className:"modal-loan__container"},react.createElement("div",{className:"modal-loan__header"},react.createElement("div",null,react.createElement("h2",{className:"modal-loan__title text-header-h2"},t("turnedInText",{placeholders:{"@date":creationDateFormatted}})))),react.createElement(GroupModalContent.A,{amountOfSelectableMaterials:0,buttonComponent:react.createElement("div",null,react.createElement("p",{className:"text-body-small-medium"},t("totalText",{placeholders:{"@total":(0,currency.v)(amount)}})))},react.createElement("div",null)),react.createElement(stackable_fees_list,{reasonForFee:reasonMessage,materials}))};try{feedetailscontent.displayName="feedetailscontent",feedetailscontent.__docgenInfo={description:"",displayName:"feedetailscontent",props:{feeDetailsData:{defaultValue:null,description:"",name:"feeDetailsData",required:!0,type:{name:"FeeV2"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"]={docgenInfo:feedetailscontent.__docgenInfo,name:"feedetailscontent",path:"src/apps/fee-list/stackable-fees/fee-details-content.tsx#feedetailscontent"})}catch(__react_docgen_typescript_loader_error){}var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json");const getFeesBasedOnPayableByClient=(fees,payableByClient)=>fees.filter((fee=>fee.payableByClient===payableByClient)),calculateFeeAmount=(fees,payableByClient)=>()=>getFeesBasedOnPayableByClient(fees,payableByClient).reduce(((accumulator,{amount})=>accumulator+amount),0);var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const FeePaymentButton=({dataCy="fee-payment-button"})=>{const config=(0,utils_config.UK)(),u=(0,utils_url.Ik)(),{paymentSiteButtonLabel}=config("feeListConfig",{transformer:"jsonParse"}),url=u("feeListPaymentSiteUrl",!0);return url?react.createElement(LinkButton.A,{dataCy,url,buttonType:"external-link",size:"small",variant:"outline"},paymentSiteButtonLabel):null},fee_list_FeePaymentButton=FeePaymentButton;try{FeePaymentButton.displayName="FeePaymentButton",FeePaymentButton.__docgenInfo={description:"",displayName:"FeePaymentButton",props:{dataCy:{defaultValue:{value:"fee-payment-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeePaymentButton.tsx#FeePaymentButton"]={docgenInfo:FeePaymentButton.__docgenInfo,name:"FeePaymentButton",path:"src/apps/fee-list/FeePaymentButton.tsx#FeePaymentButton"})}catch(__react_docgen_typescript_loader_error){}const FeeListSkeleton=()=>react.createElement("section",{className:"ssc fee-list"},react.createElement("h2",{className:"dpl-list-buttons__header","aria-label":"Fee payment info"},react.createElement("div",{className:"ssc-head-line w-20 mt-10"})),react.createElement(fee_list_FeeListItemSkeleton,null),react.createElement(fee_list_FeeListItemSkeleton,null),react.createElement("div",{className:"ssc-head-line w-20 mt-48"}),react.createElement(fee_list_FeeListItemSkeleton,null),react.createElement(fee_list_FeeListItemSkeleton,null)),fee_list_FeeListSkeleton=FeeListSkeleton;try{FeeListSkeleton.displayName="FeeListSkeleton",FeeListSkeleton.__docgenInfo={description:"",displayName:"FeeListSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeListSkeleton.tsx#FeeListSkeleton"]={docgenInfo:FeeListSkeleton.__docgenInfo,name:"FeeListSkeleton",path:"src/apps/fee-list/FeeListSkeleton.tsx#FeeListSkeleton"})}catch(__react_docgen_typescript_loader_error){}var warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx");const FeeList=({pageSize})=>{const t=(0,utils_text.F)(),viewFeesAndCompensationRatesUrl=(0,utils_url.Ik)()("viewFeesAndCompensationRatesUrl"),[feeDetailsModalId,setFeeDetailsModalId]=(0,react.useState)(""),{open}=(0,modal.X)(),{data:fbsFees=[],isLoading}=(0,fbs.J2)({includepaid:!1,includenonpayable:!0}),{fbs:{overdue:loansOverduePhysical,isLoading:isLoadingFbs},publizon:{overdue:loansOverdueDigital,isLoading:isLoadingPublizon}}=(0,useLoans.A)(),[overdueLoans,setOverdueLoans]=(0,react.useState)([]),[feeDetailsData,setFeeDetailsData]=(0,react.useState)(),{dueDateModal,allLoansId}=(0,modal_helpers.c6)(),[modalLoan,setModalLoan]=(0,react.useState)(null),openDetailsModalClickEvent=(0,react.useCallback)((feeId=>{feeId&&(fbsFees.length>0&&setFeeDetailsData(((feeObj,feeId)=>feeObj.filter((item=>item.feeId===feeId)))(fbsFees,feeId)),setFeeDetailsModalId(modal_ids.feeDetails+feeId),open(modal_ids.feeDetails+feeId||""))}),[fbsFees,open]),totalFeeAmountPayableByClient=(0,react.useMemo)((()=>calculateFeeAmount(fbsFees,!0)),[fbsFees]),totalFeeAmountNotPayableByClient=(0,react.useMemo)((()=>calculateFeeAmount(fbsFees,!1)),[fbsFees]),shouldShowWarningBar=overdueLoans.length>0&&!isLoadingFbs&&!isLoadingPublizon,openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.B0)(loan))}),[open]);(0,react.useEffect)((()=>{isLoadingFbs||isLoadingPublizon||setOverdueLoans([...loansOverduePhysical,...loansOverdueDigital])}),[isLoadingFbs,isLoadingPublizon]);const openLoanModal=(0,react.useCallback)((loans=>{1===loans.length?openLoanDetailsModal(loans[0]):open((0,LoansGroupModal.D)("yesterday",dueDateModal,allLoansId))}),[openLoanDetailsModal,open,allLoansId,dueDateModal]);return react.createElement(react.Fragment,null,react.createElement("div",{className:"fee-list-page","data-cy":"fee-list-page"},react.createElement("h1",{"data-cy":"fee-list-headline",className:"text-header-h1 my-32"},t("feeListHeadlineText")),react.createElement("div",{"data-cy":"fee-list-body"},react.createElement("div",{className:"fee-list-body__text"},t("feeListBodyText")),react.createElement("div",{className:"fee-list-body__payment-info-link"},react.createElement(Link.A,{className:"link-tag",href:viewFeesAndCompensationRatesUrl},t("viewFeesAndCompensationRatesText")))),shouldShowWarningBar&&react.createElement(warning_bar.A,{overdueText:t("feeListYouHaveOverdueLoansText",{count:overdueLoans.length}),rightButtonText:t("feeListSeeYourOverdueLoansText"),rightButtonAriaLabelText:t("feeListSeeYourOverdueLoansAriaText"),classNames:"my-64",rightAction:()=>openLoanModal(overdueLoans)}),react.createElement("div",{className:"fee-list-body__payment-button"},react.createElement(fee_list_FeePaymentButton,null)),isLoading&&react.createElement(fee_list_FeeListSkeleton,null),!isLoading&&!fbsFees.length&&react.createElement(react.Fragment,null,react.createElement(list_header,{header:react.createElement(react.Fragment,null,t("unpaidFeesPayableByClientHeadlineText")),amount:0}),react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("emptyFeeListText")})),getFeesBasedOnPayableByClient(fbsFees,!0).length>0&&react.createElement(fee_list_list,{dataCy:"fee-list",className:"fee-list",listHeader:t("unpaidFeesPayableByClientHeadlineText"),openDetailsModalClickEvent,fees:getFeesBasedOnPayableByClient(fbsFees,!0),totalText:t("totalText",{placeholders:{"@total":(0,currency.v)(totalFeeAmountPayableByClient())}}),alreadyPaidText:t("feeListAlreadyPaidInfoText")}),getFeesBasedOnPayableByClient(fbsFees,!1).length>0&&react.createElement(fee_list_list,{dataCy:"fee-list",className:"fee-list",listHeader:t("unpaidFeesNotPayableByClientHeadlineText"),openDetailsModalClickEvent,fees:getFeesBasedOnPayableByClient(fbsFees,!1),totalText:t("totalText",{placeholders:{"@total":(0,currency.v)(totalFeeAmountNotPayableByClient())}}),alreadyPaidText:t("feeListAlreadyPaidSecondInfoText")})),react.createElement(fee_details_modal,{modalId:feeDetailsModalId,material:{}},feeDetailsData&&react.createElement(fee_details_content,{feeDetailsData:feeDetailsData[0]})),react.createElement(my_payment_overview_modal,null),!isLoadingFbs&&react.createElement(LoansGroupModal.A,{pageSize,openDetailsModal:openLoanDetailsModal,dueDate:"yesterday",loansModal:loansOverduePhysical},react.createElement(SimpleModalHeader.A,{header:t("loansOverdueText")})),modalLoan&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.B0)(modalLoan)},react.createElement(material_details.A,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.B0)(modalLoan)})))},fee_list_FeeList=FeeList;try{FeeList.displayName="FeeList",FeeList.__docgenInfo={description:"",displayName:"FeeList",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.tsx#FeeList"]={docgenInfo:FeeList.__docgenInfo,name:"FeeList",path:"src/apps/fee-list/FeeList.tsx#FeeList"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts");const FeeList_entry=(0,utils_url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((0,utils_config.NV)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(fee_list_FeeList,{pageSize})})))));try{FeeListentry.displayName="FeeListentry",FeeListentry.__docgenInfo={description:"",displayName:"FeeListentry",props:{alreadyPaidText:{defaultValue:null,description:"",name:"alreadyPaidText",required:!0,type:{name:"string"}},availablePaymentTypesUrl:{defaultValue:null,description:"",name:"availablePaymentTypesUrl",required:!0,type:{name:"string"}},emptyFeeListText:{defaultValue:null,description:"",name:"emptyFeeListText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},feeCreatedText:{defaultValue:null,description:"",name:"feeCreatedText",required:!0,type:{name:"string"}},feeDetailsModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"feeDetailsModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},feeDetailsModalDescriptionText:{defaultValue:null,description:"",name:"feeDetailsModalDescriptionText",required:!0,type:{name:"string"}},feeDetailsModalScreenReaderText:{defaultValue:null,description:"",name:"feeDetailsModalScreenReaderText",required:!0,type:{name:"string"}},feeListBodyText:{defaultValue:null,description:"",name:"feeListBodyText",required:!0,type:{name:"string"}},feeListConfig:{defaultValue:null,description:"",name:"feeListConfig",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},feeListHeadlineText:{defaultValue:null,description:"",name:"feeListHeadlineText",required:!0,type:{name:"string"}},feeListPaymentSiteUrl:{defaultValue:null,description:"",name:"feeListPaymentSiteUrl",required:!0,type:{name:"string"}},feePaymentModalBodyText:{defaultValue:null,description:"",name:"feePaymentModalBodyText",required:!0,type:{name:"string"}},feePaymentModalCancelText:{defaultValue:null,description:"",name:"feePaymentModalCancelText",required:!0,type:{name:"string"}},feePaymentModalGotoText:{defaultValue:null,description:"",name:"feePaymentModalGotoText",required:!0,type:{name:"string"}},feePaymentModalHeaderText:{defaultValue:null,description:"",name:"feePaymentModalHeaderText",required:!0,type:{name:"string"}},feePaymentModalNoticeText:{defaultValue:null,description:"",name:"feePaymentModalNoticeText",required:!0,type:{name:"string"}},iAcceptText:{defaultValue:null,description:"",name:"iAcceptText",required:!0,type:{name:"string"}},itemFeeAmountText:{defaultValue:null,description:"",name:"itemFeeAmountText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialNumberText:{defaultValue:null,description:"",name:"materialNumberText",required:!0,type:{name:"string"}},otherMaterialsText:{defaultValue:null,description:"",name:"otherMaterialsText",required:!0,type:{name:"string"}},paymentOverviewUrl:{defaultValue:null,description:"",name:"paymentOverviewUrl",required:!0,type:{name:"string"}},payText:{defaultValue:null,description:"",name:"payText",required:!0,type:{name:"string"}},plusXOtherMaterialsText:{defaultValue:null,description:"",name:"plusXOtherMaterialsText",required:!0,type:{name:"string"}},termsOfTradeText:{defaultValue:null,description:"",name:"termsOfTradeText",required:!0,type:{name:"string"}},termsOfTradeUrl:{defaultValue:null,description:"",name:"termsOfTradeUrl",required:!0,type:{name:"string"}},totalFeeAmountText:{defaultValue:null,description:"",name:"totalFeeAmountText",required:!0,type:{name:"string"}},totalText:{defaultValue:null,description:"",name:"totalText",required:!0,type:{name:"string"}},turnedInText:{defaultValue:null,description:"",name:"turnedInText",required:!0,type:{name:"string"}},unpaidFeesNotPayableByClientHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesNotPayableByClientHeadlineText",required:!0,type:{name:"string"}},unpaidFeesPayableByClientHeadlineText:{defaultValue:null,description:"",name:"unpaidFeesPayableByClientHeadlineText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesText:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesText",required:!0,type:{name:"string"}},viewFeesAndCompensationRatesUrl:{defaultValue:null,description:"",name:"viewFeesAndCompensationRatesUrl",required:!0,type:{name:"string"}},feeListAlreadyPaidInfoText:{defaultValue:null,description:"",name:"feeListAlreadyPaidInfoText",required:!0,type:{name:"string"}},feeListAlreadyPaidSecondInfoText:{defaultValue:null,description:"",name:"feeListAlreadyPaidSecondInfoText",required:!0,type:{name:"string"}},feeListYouHaveOverdueLoansText:{defaultValue:null,description:"",name:"feeListYouHaveOverdueLoansText",required:!0,type:{name:"string"}},feeListSeeYourOverdueLoansText:{defaultValue:null,description:"",name:"feeListSeeYourOverdueLoansText",required:!0,type:{name:"string"}},feeListSeeYourOverdueLoansAriaText:{defaultValue:null,description:"",name:"feeListSeeYourOverdueLoansAriaText",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/fee-list/FeeList.entry.tsx#FeeListentry"]={docgenInfo:FeeListentry.__docgenInfo,name:"FeeListentry",path:"src/apps/fee-list/FeeList.entry.tsx#FeeListentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts");const FeeList_dev={title:"Apps / Fee list",component:FeeList_entry,argTypes:{...serviceUrlArgs.A,...blockedArgs.A,...globalTextArgs.A,...globalConfigArgs.A,...groupModalArgs.A,...loanGroupModalArgs.A,...materialDetailsModalArgs.A,...renewalArgs.A,feeListHeadlineText:{defaultValue:"Fees & Replacement costs",control:{type:"text"}},feeListBodyText:{defaultValue:"Overdue fees and replacement costs that were created before 27/10/2020 can still be paid on this page.",control:{type:"text"}},viewFeesAndCompensationRatesText:{defaultValue:"See our fees and replacement costs",control:{type:"text"}},etAlText:{control:{type:"text"},defaultValue:"et al."},totalFeeAmountText:{defaultValue:"Fee",control:{type:"text"}},otherMaterialsText:{defaultValue:"Other materials",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},feeListDaysText:{defaultValue:"Days",control:{type:"text"}},payText:{defaultValue:"Pay",control:{type:"text"}},totalText:{defaultValue:"Total @total",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},iAcceptText:{defaultValue:"I accept the",control:{type:"text"}},termsOfTradeText:{defaultValue:"Terms of trade",control:{type:"text"}},unpaidFeesPayableByClientHeadlineText:{defaultValue:"Unsettled debt - paid on site",control:{type:"text"}},unpaidFeesNotPayableByClientHeadlineText:{defaultValue:"Unsettled debt - paid externally",control:{type:"text"}},alreadyPaidText:{defaultValue:"Please note that paid fees are not registered up until 72 hours after your payment after which your debt is updated and your user unblocked if it has been blocked.",control:{type:"text"}},feePaymentModalHeaderText:{defaultValue:"Unpaid fees post 27/10 2020",control:{type:"text"}},feePaymentModalBodyText:{defaultValue:"You will be redirected to Mit Betalingsoverblik.",control:{type:"text"}},feePaymentModalNoticeText:{defaultValue:"Paid fees can take up to 24 hours to registrer.",control:{type:"text"}},feePaymentModalGotoText:{defaultValue:"Go to Mit Betalingsoverblik",control:{type:"text"}},feePaymentModalCancelText:{defaultValue:"Cancel",control:{type:"text"}},feeDetailsModalScreenReaderText:{defaultValue:"A modal containing details about a fee",control:{type:"text"}},emptyFeeListText:{defaultValue:"You have 0 unpaid fees or replacement costs",control:{type:"text"}},feeDetailsModalCloseModalAriaLabelText:{defaultValue:"Close fee details modal",control:{type:"text"}},feeDetailsModalDescriptionText:{defaultValue:"Modal containing information about this element or group of elements fees",control:{type:"text"}},turnedInText:{control:{type:"text"},defaultValue:"Turned in @date"},plusXOtherMaterialsText:{control:{type:"text"},defaultValue:"+ @amount other materials"},itemFeeAmountText:{control:{type:"text"},defaultValue:"Fee @fee"},feeCreatedText:{control:{type:"text"},defaultValue:"Fees charged @date"},feeListAlreadyPaidInfoText:{defaultValue:"Already paid? It can take up to 72 hours to register the transaction.",control:{type:"text"}},feeListAlreadyPaidSecondInfoText:{defaultValue:"Already paid? It can take up to 72 hours to register the transaction. (not payable by user)",control:{type:"text"}},feeListMaterialNumberText:{defaultValue:"# @materialNumber",control:{type:"text"}},feeListConfig:{defaultValue:'{ "paymentSiteButtonLabel": "Go to payment page" }',control:{type:"text"}},feeListYouHaveOverdueLoansText:{defaultValue:'{"type":"plural","text":["You have an overdue loan. You may be charged fees upon handing in or renewing it.","You have overdue loans. You may be charged fees upon handing in or renewing them."]}',control:{type:"text"}},feeListSeeYourOverdueLoansText:{defaultValue:"See your overdue loans",control:{type:"text"}},feeListSeeYourOverdueLoansAriaText:{defaultValue:"Go to the loan list page to see your overdue loans",control:{type:"text"}},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},feeListPaymentSiteUrl:{defaultValue:"https://google.com",control:{type:"text"}},availablePaymentTypesUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},termsOfTradeUrl:{defaultValue:"https://unsplash.com/photos/JDzoTGfoogA",control:{type:"text"}},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/NEJcmvLFcws",control:{type:"text"}}},decorators:[esm.V]},Template=props=>react.createElement(FeeList_entry,props),FeeList_dev_FeeListEntry=Template.bind({});FeeList_dev_FeeListEntry.args={};const{feeDetails}=(0,modal_helpers.c6)(),FeeListFeeDetailsModal=Template.bind({});FeeListFeeDetailsModal.parameters={query:{modal:`${feeDetails}48724566`}}},"./src/apps/hello-world/hello-world.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>hello_world_dev});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),hello=__webpack_require__("./src/components/hello/hello.tsx");const hello_world=()=>{const t=(0,utils_text.F)();return react.createElement("article",null,react.createElement("h2",null,t("titleText")),react.createElement("p",null,t("introductionText")),react.createElement("p",null,react.createElement(hello.F,{shouldBeEmphasized:!0})))};try{helloworld.displayName="helloworld",helloworld.__docgenInfo={description:"",displayName:"helloworld",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.tsx#helloworld"]={docgenInfo:helloworld.__docgenInfo,name:"helloworld",path:"src/apps/hello-world/hello-world.tsx#helloworld"})}catch(__react_docgen_typescript_loader_error){}const hello_world_entry=(0,utils_text.i)((()=>react.createElement(hello_world,null)));try{helloworldentry.displayName="helloworldentry",helloworldentry.__docgenInfo={description:"",displayName:"helloworldentry",props:{titleText:{defaultValue:null,description:"",name:"titleText",required:!0,type:{name:"string"}},introductionText:{defaultValue:null,description:"",name:"introductionText",required:!0,type:{name:"string"}},whatText:{defaultValue:null,description:"",name:"whatText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/hello-world/hello-world.entry.tsx#helloworldentry"]={docgenInfo:helloworldentry.__docgenInfo,name:"helloworldentry",path:"src/apps/hello-world/hello-world.entry.tsx#helloworldentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts");const hello_world_dev={title:"Apps / Hello World",component:hello_world_entry,argTypes:{...globalTextArgs.A,titleText:{defaultValue:"Greetings",control:{type:"text"}},introductionText:{defaultValue:"We warmly welcome everybody by saying:",control:{type:"text"}},whatText:{defaultValue:"world",control:{type:"text"}}}},App=args=>react.createElement(hello_world_entry,args)},"./src/apps/loan-list/list/loan-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LoanListDetailsModal:()=>LoanListDetailsModal,LoanListDueDateModal:()=>LoanListDueDateModal,LoanListEntry:()=>loan_list_dev_LoanListEntry,LoanListRenewLoansModal:()=>LoanListRenewLoansModal,default:()=>loan_list_dev});var esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),general=__webpack_require__("./src/core/utils/helpers/general.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx");const material_overdue_link=({dueDate,showOn})=>{const t=(0,utils_text.F)(),viewFeesAndCompensationRatesUrl=(0,utils_url.Ik)()("viewFeesAndCompensationRatesUrl");return!dueDate||dueDate&&!(0,general.El)(dueDate)?null:react.createElement(Link.A,{href:viewFeesAndCompensationRatesUrl,className:`list-reservation__note list-reservation__note--${showOn} color-signal-alert`},t("loanListMaterialLateFeeText"))};try{materialoverduelink.displayName="materialoverduelink",materialoverduelink.__docgenInfo={description:"",displayName:"materialoverduelink",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!0,type:{name:"string | null | undefined"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"]={docgenInfo:materialoverduelink.__docgenInfo,name:"materialoverduelink",path:"src/apps/loan-list/materials/stackable-material/material-overdue-link.tsx#materialoverduelink"})}catch(__react_docgen_typescript_loader_error){}const additional_materials_button=({additionalMaterials,openDueDateModal,showOn})=>{const t=(0,utils_text.F)(),openDueDateModalCallBack=(0,react.useCallback)((e=>{e.stopPropagation(),openDueDateModal()}),[openDueDateModal]);return additionalMaterials<1?react.createElement("div",null):react.createElement("button",{type:"button",onClick:e=>openDueDateModalCallBack(e),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDueDateModalCallBack(e)},"aria-describedby":"materials-modal-text",className:`list-reservation__note list-reservation__note--${showOn}`},t("loanListAdditionalMaterialsText",{count:additionalMaterials,placeholders:{"@count":additionalMaterials}}))};try{additionalmaterialsbutton.displayName="additionalmaterialsbutton",additionalmaterialsbutton.__docgenInfo={description:"",displayName:"additionalmaterialsbutton",props:{additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"() => void"}},showOn:{defaultValue:null,description:"",name:"showOn",required:!0,type:{name:"enum",value:[{value:'"mobile"'},{value:'"desktop"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"]={docgenInfo:additionalmaterialsbutton.__docgenInfo,name:"additionalmaterialsbutton",path:"src/apps/loan-list/materials/stackable-material/additional-materials-button.tsx#additionalmaterialsbutton"})}catch(__react_docgen_typescript_loader_error){}var material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),status_circle=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),StatusMessage=__webpack_require__("./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx");const material_status=({loan,children,additionalMaterials,openDetailsModal,openDueDateModal,arrowLabelledBy})=>{const t=(0,utils_text.F)(),{dueDate,loanDate}=loan,isStacked=(0,helpers.Qo)(additionalMaterials),notificationClickEventHandler=()=>{isStacked&&openDueDateModal&&dueDate&&openDueDateModal(dueDate),isStacked||openDetailsModal(loan)};return dueDate&&loanDate?react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"},react.createElement(status_circle.A,{loanDate,dueDate})),react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},dueDate&&react.createElement(status_badge.A,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("loanListStatusBadgeDangerText"),warningText:t("loanListStatusBadgeWarningText")}),react.createElement("p",{className:"text-small-caption color-secondary-gray"},(0,helpers.X4)(loan)?t("loanListToBeDeliveredDigitalMaterialText",{placeholders:{"@date":(0,date.r6)(dueDate)}}):t("loanListToBeDeliveredText",{placeholders:{"@date":(0,date.Yq)(dueDate)}})),!(0,helpers.X4)(loan)&&react.createElement("p",{className:"text-small-caption color-secondary-gray mt-4"},react.createElement(StatusMessage.A,{className:"mr-4",loanType:loan.loanType,renewalStatusList:loan.renewalStatusList})),children)),react.createElement(ArrowButton.A,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler})):react.createElement("div",{className:"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter"}),react.createElement("div",{className:"list-reservation__deadline"}),react.createElement(ArrowButton.A,{arrowLabelledBy,cursorPointer:!0,clickEventHandler:notificationClickEventHandler}))};try{materialstatus.displayName="materialstatus",materialstatus.__docgenInfo={description:"",displayName:"materialstatus",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"]={docgenInfo:materialstatus.__docgenInfo,name:"materialstatus",path:"src/apps/loan-list/materials/stackable-material/material-status.tsx#materialstatus"})}catch(__react_docgen_typescript_loader_error){}var list_material_skeleton=__webpack_require__("./src/apps/reservation-list/reservation-material/list-material-skeleton.tsx");const stackable_material=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({additionalMaterials,material,loan,openDueDateModal,openLoanDetailsModal,focused,loanId})=>{const{dueDate,identifier,periodical}=loan,handleOpenDueDateModal=()=>{openDueDateModal&&dueDate?openDueDateModal(dueDate):openLoanDetailsModal(loan)};return react.createElement("div",{className:(0,clsx.A)("list-reservation my-32 cursor-pointer arrow__hover--right-small",{"list-reservation--stacked":additionalMaterials>0}),role:"button",onClick:handleOpenDueDateModal,onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||focused||handleOpenDueDateModal()},tabIndex:0},material&&react.createElement(material_info.A,{arrowLabelledBy:`${loanId||identifier}-title`,openDetailsModal:handleOpenDueDateModal,periodical,material,focused,isbnForCover:identifier||""},react.createElement(additional_materials_button,{showOn:"desktop",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"desktop",dueDate})),react.createElement(material_status,{arrowLabelledBy:`${loanId||identifier}-title`,loan,openDetailsModal:openLoanDetailsModal,openDueDateModal:handleOpenDueDateModal,additionalMaterials},react.createElement(additional_materials_button,{showOn:"mobile",openDueDateModal:handleOpenDueDateModal,additionalMaterials}),react.createElement(material_overdue_link,{showOn:"mobile",dueDate})))}),list_material_skeleton.A),list_material_skeleton.A);try{stackablematerial.displayName="stackablematerial",stackablematerial.__docgenInfo={description:"",displayName:"stackablematerial",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType"}},additionalMaterials:{defaultValue:null,description:"",name:"additionalMaterials",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!1,type:{name:"((dueDate: string) => void) | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"]={docgenInfo:stackablematerial.__docgenInfo,name:"stackablematerial",path:"src/apps/loan-list/materials/stackable-material/stackable-material.tsx#stackablematerial"})}catch(__react_docgen_typescript_loader_error){}var loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts");const loan_list_items=({loans,view,dueDates,openDueDateModal,openLoanDetailsModal,indexOfFocus,dataCy="loan-list-items"})=>{const t=(0,utils_text.F)();return react.createElement("div",{"data-cy":dataCy,className:"list-reservation-container my-32"},react.createElement("div",{className:"list-reservation__hidden-explanation",id:"materials-modal-text"},t("loanListDueDateModalAriaLabelText")),"stack"===view&&dueDates&&dueDates.map(((uniqueDueDate,i)=>{const loansUniqueDueDate=(0,helpers.nZ)(uniqueDueDate,loans),loan=loansUniqueDueDate[0]||{};return react.createElement("ul",null,loan&&react.createElement(stackable_material,{focused:i===indexOfFocus,openDueDateModal,openLoanDetailsModal,loan,item:loan,loanId:loan.loanId,key:loan.faust||loan.identifier,additionalMaterials:loansUniqueDueDate.length-1}))})),"list"===view&&react.createElement("ul",null,loans.map(((loan,i)=>react.createElement(stackable_material,{focused:i===indexOfFocus,openLoanDetailsModal,item:loan,loanId:loan.loanId,key:(0,loan_type.G)(loan),loan,additionalMaterials:0})))))};try{loanlistitems.displayName="loanlistitems",loanlistitems.__docgenInfo={description:"",displayName:"loanlistitems",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}},indexOfFocus:{defaultValue:null,description:"",name:"indexOfFocus",required:!0,type:{name:"number | null"}},dataCy:{defaultValue:{value:"loan-list-items"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"]={docgenInfo:loanlistitems.__docgenInfo,name:"loanlistitems",path:"src/apps/loan-list/list/loan-list-items.tsx#loanlistitems"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx");const list_list=({loans,dueDates,view,emptyListLabel,pageSize,openLoanDetailsModal,openDueDateModal,children})=>{const[displayedLoans,setDisplayedLoans]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:loans.length,pageSize,overrideItemsShown:"list"===view?void 0:()=>displayedLoans.length});return(0,react.useEffect)((()=>{if("list"===view)setDisplayedLoans((0,general.L1)(loans,itemsShown));else{const stackedLoans=(0,helpers.e8)(view,loans,itemsShown,dueDates);setDisplayedLoans([...stackedLoans])}}),[dueDates,loans,itemsShown,view]),react.createElement(react.Fragment,null,children,loans.length>0&&react.createElement(react.Fragment,null,react.createElement(loan_list_items,{indexOfFocus:firstInNewPage,openLoanDetailsModal,openDueDateModal,dueDates,loans:displayedLoans,view}),react.createElement(PagerComponent,null)),0===loans.length&&react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:emptyListLabel}))};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},dueDates:{defaultValue:null,description:"",name:"dueDates",required:!1,type:{name:"string[] | undefined"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openLoanDetailsModal:{defaultValue:null,description:"",name:"openLoanDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}},openDueDateModal:{defaultValue:null,description:"",name:"openDueDateModal",required:!0,type:{name:"(dueDate: string) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/loan-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}const icon_list=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 16C5.55228 16 6 16.4477 6 17V19C6 19.5523 5.55228 20 5 20H3C2.44772 20 2 19.5523 2 19V17C2 16.4477 2.44772 16 3 16H5ZM21 17.25C21.4142 17.25 21.75 17.5858 21.75 18C21.75 18.3797 21.4678 18.6935 21.1018 18.7432L21 18.75H9C8.58579 18.75 8.25 18.4142 8.25 18C8.25 17.6203 8.53215 17.3065 8.89823 17.2568L9 17.25H21ZM5 10C5.55228 10 6 10.4477 6 11V13C6 13.5523 5.55228 14 5 14H3C2.44772 14 2 13.5523 2 13V11C2 10.4477 2.44772 10 3 10H5ZM21 11.25C21.4142 11.25 21.75 11.5858 21.75 12C21.75 12.3797 21.4678 12.6935 21.1018 12.7432L21 12.75H9C8.58579 12.75 8.25 12.4142 8.25 12C8.25 11.6203 8.53215 11.3065 8.89823 11.2568L9 11.25H21ZM5 4C5.55228 4 6 4.44772 6 5V7C6 7.55228 5.55228 8 5 8H3C2.44772 8 2 7.55228 2 7V5C2 4.44772 2.44772 4 3 4H5ZM21 5.25C21.4142 5.25 21.75 5.58579 21.75 6C21.75 6.3797 21.4678 6.69349 21.1018 6.74315L21 6.75H9C8.58579 6.75 8.25 6.41421 8.25 6C8.25 5.6203 8.53215 5.30651 8.89823 5.25685L9 5.25H21Z"})),icon_stack=()=>react.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1291 2.78217C11.6687 2.47235 12.3323 2.47235 12.8719 2.78217L19.5721 6.62914C20.4103 7.11038 20.6996 8.17997 20.2184 9.01814C20.064 9.28701 19.841 9.51004 19.5721 9.66442L18.861 10.0718L19.5721 10.481C20.4103 10.9622 20.6996 12.0318 20.2184 12.87C20.0949 13.0851 19.9274 13.2708 19.7277 13.4156L19.5721 13.5163L18.861 13.9238L19.5721 14.3328C20.4103 14.8141 20.6996 15.8837 20.2184 16.7218C20.0949 16.9369 19.9274 17.1227 19.7277 17.2674L19.5721 17.3681L12.8719 21.2151C12.3772 21.4991 11.7785 21.5228 11.2665 21.2861L11.1291 21.2151L4.42892 17.3681C3.59075 16.8869 3.3014 15.8173 3.78264 14.9791C3.90614 14.764 4.07358 14.5783 4.27328 14.4335L4.42892 14.3328L5.13899 13.9238L4.42892 13.5163C3.59075 13.035 3.3014 11.9654 3.78264 11.1273C3.90614 10.9122 4.07358 10.7264 4.27328 10.5817L4.42892 10.481L5.13899 10.0718L4.42892 9.66442C3.63732 9.20991 3.33525 8.23061 3.70953 7.41711L3.78264 7.27541C3.93702 7.00654 4.16005 6.78351 4.42892 6.62914L11.1291 2.78217ZM17.354 14.7888L12.8719 17.3632C12.3772 17.6472 11.7785 17.6709 11.2665 17.4342L11.1291 17.3632L6.64599 14.7888L5.1758 15.6337C5.13739 15.6557 5.10553 15.6876 5.08348 15.726C5.02455 15.8286 5.0465 15.9556 5.12938 16.033L5.1758 16.0673L11.876 19.9143C11.9338 19.9475 12.0016 19.9557 12.0644 19.9392L12.125 19.9143L18.8252 16.0673C18.8636 16.0452 18.8955 16.0134 18.9175 15.975C18.9765 15.8723 18.9545 15.7454 18.8716 15.6679L18.8252 15.6337L17.354 14.7888ZM17.354 10.9368L12.8719 13.5114C12.3323 13.8212 11.6687 13.8212 11.1291 13.5114L6.64599 10.9368L5.1758 11.7818C5.13739 11.8039 5.10553 11.8357 5.08348 11.8741C5.02455 11.9768 5.0465 12.1037 5.12938 12.1812L5.1758 12.2154L11.876 16.0624C11.9338 16.0956 12.0016 16.1039 12.0644 16.0873L12.125 16.0624L18.8252 12.2154C18.8636 12.1934 18.8955 12.1615 18.9175 12.1231C18.9765 12.0205 18.9545 11.8936 18.8716 11.8161L18.8252 11.7818L17.354 10.9368ZM12.125 4.083C12.0479 4.03874 11.9531 4.03874 11.876 4.083L5.1758 7.92997C5.13739 7.95202 5.10553 7.98389 5.08348 8.0223C5.01473 8.14203 5.05607 8.29483 5.1758 8.36358L11.876 12.2106C11.9531 12.2548 12.0479 12.2548 12.125 12.2106L18.8252 8.36358C18.8636 8.34153 18.8955 8.30967 18.9175 8.27126C18.9863 8.15152 18.945 7.99872 18.8252 7.92997L12.125 4.083Z"}));var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const ToggleListViewButtons=({setView,view,disableRenewLoansButton,openRenewLoansModal})=>{const t=(0,utils_text.F)(),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.$u)({listview:inputView}),setView(inputView)}),[setView]),renewLoansButtonText=t(disableRenewLoansButton?"loanListNoItemsCanBeRenewedText":"loanListRenewMultipleButtonText");return react.createElement("div",{className:"dpl-list-buttons__buttons"},react.createElement("div",{id:"renew-multiple-modal",className:"dpl-list-buttons__screen-reader-description"},t("loanListRenewMultipleButtonExplanationText")),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{onClick:()=>setViewHandler("list"),"aria-pressed":"list"===view,className:"dpl-icon-button "+("list"===view?"dpl-icon-button--selected":""),id:"test-list",type:"button","aria-label":t("loanListAriaLabelListButtonText")},react.createElement(icon_list,null))),react.createElement("div",{className:"dpl-list-buttons__buttons__button"},react.createElement("button",{"aria-pressed":"stack"===view,className:"dpl-icon-button "+("stack"===view?"dpl-icon-button--selected":""),"data-cy":"stack",onClick:()=>setViewHandler("stack"),type:"button","aria-label":t("loanListAriaLabelStackButtonText")},react.createElement(icon_stack,null))),react.createElement("div",{className:"dpl-list-buttons__buttons__button dpl-list-buttons__buttons__button--hide-on-mobile"},react.createElement("button",{type:"button",onClick:()=>{openRenewLoansModal()},disabled:disableRenewLoansButton,className:"btn-primary btn-filled btn-small arrow__hover--right-small "+(disableRenewLoansButton?"btn-outline":""),id:"test-renew-button","aria-describedby":"renew-multiple-modal"},renewLoansButtonText)),react.createElement("div",{className:"hide-on-desktop button-box button-box--sticky-bottom"},react.createElement(Button.$,{label:renewLoansButtonText,buttonType:"none",disabled:disableRenewLoansButton,collapsible:!1,size:"small",variant:disableRenewLoansButton?"outline":"filled",onClick:()=>{openRenewLoansModal()}})))},list_ToggleListViewButtons=ToggleListViewButtons;try{ToggleListViewButtons.displayName="ToggleListViewButtons",ToggleListViewButtons.__docgenInfo={description:"",displayName:"ToggleListViewButtons",props:{setView:{defaultValue:null,description:"",name:"setView",required:!0,type:{name:"(view: ListView) => void"}},view:{defaultValue:null,description:"",name:"view",required:!0,type:{name:"enum",value:[{value:'"list"'},{value:'"stack"'}]}},disableRenewLoansButton:{defaultValue:null,description:"",name:"disableRenewLoansButton",required:!0,type:{name:"boolean"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},loans:{defaultValue:null,description:"",name:"loans",required:!0,type:{name:"LoanType[]"}},openRenewLoansModal:{defaultValue:null,description:"",name:"openRenewLoansModal",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"]={docgenInfo:ToggleListViewButtons.__docgenInfo,name:"ToggleListViewButtons",path:"src/apps/loan-list/list/ToggleListViewButtons.tsx#ToggleListViewButtons"})}catch(__react_docgen_typescript_loader_error){}const ListHeader=({header,amount,children})=>react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{className:"dpl-list-buttons__header"},header,react.createElement("span",{className:"dpl-list-buttons__power"},amount)),children),list_ListHeader=ListHeader;try{ListHeader.displayName="ListHeader",ListHeader.__docgenInfo={description:"",displayName:"ListHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},amount:{defaultValue:null,description:"",name:"amount",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/ListHeader.tsx#ListHeader"]={docgenInfo:ListHeader.__docgenInfo,name:"ListHeader",path:"src/apps/loan-list/list/ListHeader.tsx#ListHeader"})}catch(__react_docgen_typescript_loader_error){}var material_details=__webpack_require__("./src/apps/loan-list/modal/material-details.tsx"),material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),LoansGroupModal=__webpack_require__("./src/components/GroupModal/LoansGroupModal.tsx"),SimpleModalHeader=__webpack_require__("./src/components/GroupModal/SimpleModalHeader.tsx"),StatusCircleModalHeader=__webpack_require__("./src/components/GroupModal/StatusCircleModalHeader.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const loan_list_skeleton=()=>react.createElement(react.Fragment,null,react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-64 mb-35"}),react.createElement(list_material_skeleton.A,null),react.createElement(list_material_skeleton.A,null)),react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-64 mb-35"}),react.createElement(list_material_skeleton.A,null),react.createElement(list_material_skeleton.A,null)));try{loanlistskeleton.displayName="loanlistskeleton",loanlistskeleton.__docgenInfo={description:"",displayName:"loanlistskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list-skeleton.tsx#loanlistskeleton"]={docgenInfo:loanlistskeleton.__docgenInfo,name:"loanlistskeleton",path:"src/apps/loan-list/list/loan-list-skeleton.tsx#loanlistskeleton"})}catch(__react_docgen_typescript_loader_error){}const loan_list=({pageSize})=>{const{modalIds}=(0,es.d4)((s=>s.modal)),{open}=(0,modal.X)(),{loanDetails,allLoansId,dueDateModal}=(0,modal_helpers.c6)(),t=(0,utils_text.F)(),[view,setView]=(0,react.useState)("list"),[dueDate,setDueDate]=(0,react.useState)(null),[modalLoan,setModalLoan]=(0,react.useState)(null),{fbs:{loans:loansPhysical,stackedMaterialsDueDates:stackedMaterialsDueDatesFbs,isLoading:isLoadingFbs},publizon:{loans:loansDigital,isLoading:isLoadingPublizon}}=(0,useLoans.A)(),openLoanDetailsModal=(0,react.useCallback)((loan=>{setModalLoan(loan),open((0,material_details_modal.B0)(loan))}),[open]),openDueDateModal=(0,react.useCallback)((dueDateInput=>{setDueDate(dueDateInput),open((0,modal_helpers.Q0)(dueDateModal,[dueDateInput]))}),[dueDateModal,open]),openRenewLoansModal=(0,react.useCallback)((()=>{setDueDate(null),open(allLoansId)}),[allLoansId,open]);(0,react.useEffect)((()=>{const modalUrlParam=(0,url.d6)("modal"),loanDetailsString=loanDetails;if(modalUrlParam&&modalUrlParam.includes(loanDetails)){const loanIdFromModalId=(0,modal_helpers.dI)(modalUrlParam,loanDetailsString);if(loanIdFromModalId&&loansPhysical){const loan=[...(0,helpers.nB)(loansPhysical,"loanId",loanIdFromModalId),...(0,helpers.nB)(loansDigital,"identifier",loanIdFromModalId)].filter(loan_type.R).at(0);loan&&setModalLoan(loan)}}if(modalUrlParam&&(0,modal_helpers.eF)(modalUrlParam)){const dateFromQueryParam=(0,modal_helpers.xx)(modalUrlParam);setDueDate(dateFromQueryParam)}}),[loansPhysical,loansDigital,loanDetails,openDueDateModal]);const shouldShowSkeletons=isLoadingFbs&&isLoadingPublizon&&0===loansPhysical.length&&0===loansDigital.length;return react.createElement(react.Fragment,null,react.createElement("div",{className:`loan-list-page ${(0,general.eD)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 my-32"},t("loanListTitleText")),shouldShowSkeletons&&react.createElement(loan_list_skeleton,null),!shouldShowSkeletons&&(!(0,helpers.VL)(loansPhysical)||!(0,helpers.VL)(loansDigital))&&react.createElement(react.Fragment,null,loansPhysical&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListPhysicalLoansEmptyListText"),loans:loansPhysical,dueDates:stackedMaterialsDueDatesFbs,view,openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListPhysicalLoansTitleText"),amount:loansPhysical.length},react.createElement(list_ToggleListViewButtons,{disableRenewLoansButton:0===(0,general.oq)(loansPhysical),view,setView,loans:loansPhysical,pageSize,openRenewLoansModal}))),loansDigital&&react.createElement(list_list,{pageSize,emptyListLabel:t("loanListDigitalLoansEmptyListText"),loans:loansDigital,view:"list",openLoanDetailsModal,openDueDateModal},react.createElement(list_ListHeader,{header:t("loanListDigitalLoansTitleText"),amount:loansDigital.length}))),!isLoadingFbs&&!isLoadingPublizon&&(0,helpers.VL)(loansPhysical)&&(0,helpers.VL)(loansDigital)&&react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("loanListDigitalPhysicalLoansEmptyListText")})),modalLoan&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.B0)(modalLoan)},react.createElement(material_details.A,{item:modalLoan,loan:modalLoan,modalId:(0,material_details_modal.B0)(modalLoan)})),loansPhysical&&react.createElement(LoansGroupModal.A,{pageSize,openDetailsModal:openLoanDetailsModal,dueDate,loansModal:dueDate?(0,helpers.nZ)(dueDate,loansPhysical):loansPhysical},dueDate&&react.createElement(StatusCircleModalHeader.A,{header:t("groupModalDueDateHeaderText",{placeholders:{"@date":(0,date.Yq)(dueDate)}}),dueDate,statusCircleComponent:react.createElement(status_circle.A,{loanDate:dayjs_min_default()().subtract(1,"month").format("YYYY-MM-DD"),dueDate})}),!dueDate&&react.createElement(SimpleModalHeader.A,{header:t("groupModalHeaderText")})))};try{loanlist.displayName="loanlist",loanlist.__docgenInfo={description:"",displayName:"loanlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.tsx#loanlist"]={docgenInfo:loanlist.__docgenInfo,name:"loanlist",path:"src/apps/loan-list/list/loan-list.tsx#loanlist"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const loan_list_entry=(0,__webpack_require__("./src/core/utils/config.tsx").NV)((0,utils_url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(loan_list,{pageSize})})))));try{loanlistentry.displayName="loanlistentry",loanlistentry.__docgenInfo={description:"",displayName:"loanlistentry",props:{blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},loanListAriaLabelListButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelListButtonText",required:!0,type:{name:"string"}},loanListAriaLabelStackButtonText:{defaultValue:null,description:"",name:"loanListAriaLabelStackButtonText",required:!0,type:{name:"string"}},loanListDigitalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDigitalLoansTitleText:{defaultValue:null,description:"",name:"loanListDigitalLoansTitleText",required:!0,type:{name:"string"}},loanListDigitalPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListDigitalPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListDueDateModalAriaLabelText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaLabelText",required:!0,type:{name:"string"}},loanListDueDateModalAriaDescribeMobileText:{defaultValue:null,description:"",name:"loanListDueDateModalAriaDescribeMobileText",required:!0,type:{name:"string"}},loanListLateFeeDesktopText:{defaultValue:null,description:"",name:"loanListLateFeeDesktopText",required:!0,type:{name:"string"}},loanListLateFeeMobileText:{defaultValue:null,description:"",name:"loanListLateFeeMobileText",required:!0,type:{name:"string"}},loanListMaterialDaysText:{defaultValue:null,description:"",name:"loanListMaterialDaysText",required:!0,type:{name:"string"}},loanListAdditionalMaterialsText:{defaultValue:null,description:"",name:"loanListAdditionalMaterialsText",required:!0,type:{name:"string"}},loanListPhysicalLoansEmptyListText:{defaultValue:null,description:"",name:"loanListPhysicalLoansEmptyListText",required:!0,type:{name:"string"}},loanListPhysicalLoansTitleText:{defaultValue:null,description:"",name:"loanListPhysicalLoansTitleText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonExplanationText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonExplanationText",required:!0,type:{name:"string"}},loanListRenewMultipleButtonText:{defaultValue:null,description:"",name:"loanListRenewMultipleButtonText",required:!0,type:{name:"string"}},loanListNoItemsCanBeRenewedText:{defaultValue:null,description:"",name:"loanListNoItemsCanBeRenewedText",required:!0,type:{name:"string"}},loanListStatusBadgeDangerText:{defaultValue:null,description:"",name:"loanListStatusBadgeDangerText",required:!0,type:{name:"string"}},loanListStatusBadgeWarningText:{defaultValue:null,description:"",name:"loanListStatusBadgeWarningText",required:!0,type:{name:"string"}},loanListTitleText:{defaultValue:null,description:"",name:"loanListTitleText",required:!0,type:{name:"string"}},loanListToBeDeliveredDigitalMaterialText:{defaultValue:null,description:"",name:"loanListToBeDeliveredDigitalMaterialText",required:!0,type:{name:"string"}},loanListToBeDeliveredText:{defaultValue:null,description:"",name:"loanListToBeDeliveredText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},loanListMaterialLateFeeText:{defaultValue:null,description:"",name:"loanListMaterialLateFeeText",required:!0,type:{name:"string"}},loanListMaterialDayText:{defaultValue:null,description:"",name:"loanListMaterialDayText",required:!0,type:{name:"string"}},loanListStatusCircleAriaLabelText:{defaultValue:null,description:"",name:"loanListStatusCircleAriaLabelText",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"]={docgenInfo:loanlistentry.__docgenInfo,name:"loanlistentry",path:"src/apps/loan-list/list/loan-list.entry.tsx#loanlistentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const loan_list_dev={title:"Apps / Loan list",component:loan_list_entry,argTypes:{...serviceUrlArgs.A,...groupModalArgs.A,...globalTextArgs.A,...globalConfigArgs.A,...loanGroupModalArgs.A,...renewalArgs.A,...materialDetailsModalArgs.A,...blockedArgs.A,pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},loanListAriaLabelListButtonText:{control:{type:"text"},defaultValue:"This button shows all loans in the list"},loanListAriaLabelStackButtonText:{control:{type:"text"},defaultValue:"This button filters the list, so only one the materials that have the same due date is shown"},loanListDigitalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no digital loans at the moment"},loanListDigitalLoansTitleText:{control:{type:"text"},defaultValue:"Digital loans"},loanListDigitalPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have 0 loans at the moment"},loanListDueDateModalAriaLabelText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with the same due date as the loan currently in focus"},loanListMaterialLateFeeText:{control:{type:"text"},defaultValue:"You will be charged a fee, when the item is returned"},loanListMaterialDaysText:{control:{type:"text"},defaultValue:"days"},loanListMaterialDayText:{control:{type:"text"},defaultValue:"day"},loanListAdditionalMaterialsText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["+ 1 other material","+ @count other materials"]}'},loanListPhysicalLoansEmptyListText:{control:{type:"text"},defaultValue:"You have no physical loans at the moment"},loanListPhysicalLoansTitleText:{control:{type:"text"},defaultValue:"Physical loans"},loanListRenewMultipleButtonExplanationText:{control:{type:"text"},defaultValue:"This button opens a modal that covers the entire page and contains loans with different due dates, if some of the loans in the modal are renewable you can renew them"},loanListRenewMultipleButtonText:{control:{type:"text"},defaultValue:"Renew several"},loanListNoItemsCanBeRenewedText:{control:{type:"text"},defaultValue:"No materials can be renewed"},loanListStatusBadgeDangerText:{control:{type:"text"},defaultValue:"Expired"},loanListStatusBadgeWarningText:{control:{type:"text"},defaultValue:"Expiring soon"},loanListStatusCircleAriaLabelText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["This material is due in one day","This material is due in @count days"]}'},loanListTitleText:{control:{type:"text"},defaultValue:"Your loans"},loanListToBeDeliveredDigitalMaterialText:{control:{type:"text"},defaultValue:"Due date @date"},loanListToBeDeliveredText:{control:{type:"text"},defaultValue:"Due date @date"},etAlText:{control:{type:"text"},defaultValue:"et al."},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},publizonAudioBookText:{control:{type:"text"},defaultValue:"Audiobook"},publizonEbookText:{control:{type:"text"},defaultValue:"E-book"},publizonPodcastText:{control:{type:"text"},defaultValue:"Podcast"},groupModalHeaderText:{control:{type:"text"},defaultValue:"Renew several"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount loans",control:{type:"text"}}},decorators:[esm.V]},Template=props=>react.createElement(loan_list_entry,props),loan_list_dev_LoanListEntry=Template.bind({});loan_list_dev_LoanListEntry.args={};const{dueDateModal,loanDetails,allLoansId}=(0,modal_helpers.c6)(),LoanListDetailsModal=Template.bind({});LoanListDetailsModal.parameters={query:{modal:`${loanDetails}9562505082`}};const LoanListDueDateModal=Template.bind({});LoanListDueDateModal.parameters={query:{modal:`${dueDateModal}2022-12-15`}};const LoanListRenewLoansModal=Template.bind({});LoanListRenewLoansModal.parameters={query:{modal:allLoansId}}},"./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_utils_helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx");const StatusMessage=({className,loanType,renewalStatusList})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,renewalStatusList&&renewalStatusList.map((text=>"deniedOtherReason"!==text?react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className},(0,_utils_helpers__WEBPACK_IMPORTED_MODULE_1__.Iw)(text,t)):null)),"interLibraryLoan"===loanType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className},t("groupModalRenewLoanDeniedInterLibraryLoanText")))},__WEBPACK_DEFAULT_EXPORT__=StatusMessage;try{StatusMessage.displayName="StatusMessage",StatusMessage.__docgenInfo={description:"",displayName:"StatusMessage",props:{className:{defaultValue:null,description:"",name:"className",required:!0,type:{name:"string"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"]={docgenInfo:StatusMessage.__docgenInfo,name:"StatusMessage",path:"src/apps/loan-list/materials/selectable-material/StatusMessage.tsx#StatusMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/selectable-material/selectable-material.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>selectable_material});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),authorYear=__webpack_require__("./src/components/author-year/authorYear.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");function listId(listItem){var _listItem$reservation;if(null!=listItem&&listItem.reservationIds&&listItem.reservationIds.length>0)return null==listItem||null===(_listItem$reservation=listItem.reservationIds)||void 0===_listItem$reservation?void 0:_listItem$reservation.join("-");if(listItem.loanId)return String(listItem.loanId);if(listItem.identifier)return listItem.identifier;if(listItem.faust)return String(listItem.faust);throw new Error("Unable to determine id for list item")}const selectable_material_skeleton=({withoutLeftOffset=!1})=>react.createElement("li",{className:"ssc"},react.createElement("div",{className:"list-materials list-materials--disabled"},!withoutLeftOffset&&react.createElement("div",{className:"list-materials__checkbox mr-16"},react.createElement(Checkbox.A,{id:"",disabled:!0,isVisualOnly:!0})),react.createElement("div",{className:"list-materials__content"},react.createElement("div",{className:"list-materials__content-status"},react.createElement("div",{className:"ssc-head-line status-label w-10"})),react.createElement("div",{className:"ssc-head-line status-label w-60 mt-8"}),react.createElement("div",{className:"ssc-head-line status-label w-50"}),react.createElement("div",{className:"ssc-line w-30"})),react.createElement("div",{className:"list-materials__status"},react.createElement("div",null,react.createElement("div",{className:"ssc-head-line status-label w-100 mt-8"}),react.createElement("div",{className:"ssc-line w-100"})))));try{selectablematerialskeleton.displayName="selectablematerialskeleton",selectablematerialskeleton.__docgenInfo={description:"",displayName:"selectablematerialskeleton",props:{withoutLeftOffset:{defaultValue:{value:"false"},description:"",name:"withoutLeftOffset",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/selectable-material-skeleton.tsx#selectablematerialskeleton"]={docgenInfo:selectablematerialskeleton.__docgenInfo,name:"selectablematerialskeleton",path:"src/apps/loan-list/materials/selectable-material/selectable-material-skeleton.tsx#selectablematerialskeleton"})}catch(__react_docgen_typescript_loader_error){}const selectable_material=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({material,disabled,onMaterialChecked,selected,openDetailsModal,item,statusMessageComponentMobile,statusMessageComponentDesktop,statusBadgeComponent,statusBadgeComponentMobile,focused,displayedMaterial,noHoverEffect=!1})=>{const t=(0,utils_text.F)();if(!item)return null;const{authorsShort="",materialType,year="",title="",lang}=material||{},handleOnClick=()=>{openDetailsModal&&openDetailsModal(item)},handleOnKeyUp=e=>{!openDetailsModal||"Enter"!==e.key&&"Space"!==e.key||openDetailsModal(item)};return react.createElement("li",{className:(0,clsx.A)({"arrow__hover--right-small":openDetailsModal})},react.createElement("div",{className:(0,clsx.A)("list-materials",[{"list-materials--disabled":disabled},{"list-materials--no-hover":noHoverEffect}])},onMaterialChecked&&react.createElement("div",{className:"list-materials__checkbox mr-16"},!disabled&&title&&react.createElement(Checkbox.A,{onChecked:()=>onMaterialChecked(item),id:listId(item),selected,disabled,focused,label:t("groupModalHiddenLabelCheckboxOnMaterialText",{placeholders:{"@label":title}}),hideLabel:!0}),disabled&&react.createElement(Checkbox.A,{id:listId(item),disabled})),react.createElement("div",{className:(0,clsx.A)("list-materials__content",{"cursor-pointer":openDetailsModal}),onClick:handleOnClick,onKeyUp:handleOnKeyUp,role:"button",tabIndex:0},materialType&&react.createElement("div",{className:"list-materials__content-status"},react.createElement("div",{className:"status-label status-label--outline "},materialType)),statusBadgeComponentMobile||null,react.createElement("p",{className:"list-materials__content__header mt-8",lang:lang||""},title),react.createElement("p",{className:"text-small-caption"},react.createElement(authorYear.A,{author:authorsShort,year})),react.createElement("div",{className:"list-materials__status list-materials__status--mobile"},statusMessageComponentMobile)),react.createElement("div",{className:"list-materials__status list-materials__status--desktop"},statusBadgeComponent,displayedMaterial&&react.createElement(reservation_info.A,{reservationInfo:displayedMaterial,showArrow:!1,showStatusCircleIcon:!1,reservationStatusClassNameOverride:"",isDigital:(0,helpers.X4)(displayedMaterial)}),statusMessageComponentDesktop),openDetailsModal&&react.createElement(ArrowButton.A,{arrowLabelledBy:listId(item),cursorPointer:!0,clickEventHandler:handleOnClick,keyUpEventHandler:handleOnKeyUp,classNames:"list-materials__arrow arrow-button"})))}),selectable_material_skeleton),selectable_material_skeleton);try{selectablematerial.displayName="selectablematerial",selectablematerial.__docgenInfo={description:"",displayName:"selectablematerial",props:{identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}},onMaterialChecked:{defaultValue:null,description:"",name:"onMaterialChecked",required:!1,type:{name:"((listItem: Nullable>; }>>) => void) | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!1,type:{name:"((item: Nullable>; }>>) => void) | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},statusMessageComponentMobile:{defaultValue:null,description:"",name:"statusMessageComponentMobile",required:!0,type:{name:"ReactNode"}},statusMessageComponentDesktop:{defaultValue:null,description:"",name:"statusMessageComponentDesktop",required:!0,type:{name:"ReactNode"}},statusBadgeComponent:{defaultValue:null,description:"",name:"statusBadgeComponent",required:!0,type:{name:"ReactNode"}},statusBadgeComponentMobile:{defaultValue:null,description:"",name:"statusBadgeComponentMobile",required:!1,type:{name:"ReactNode"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},displayedMaterial:{defaultValue:null,description:"",name:"displayedMaterial",required:!1,type:{name:"Nullable> | undefined"}},noHoverEffect:{defaultValue:{value:"false"},description:"",name:"noHoverEffect",required:!1,type:{name:"boolean | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"]={docgenInfo:selectablematerial.__docgenInfo,name:"selectablematerial",path:"src/apps/loan-list/materials/selectable-material/selectable-material.tsx#selectablematerial"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/stackable-material/material-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/author-year/authorYear.tsx"),_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({material,isbnForCover,periodical,openDetailsModal,focused,arrowLabelledBy,children})=>{const{authorsShort,materialType,year,title,description,pid,series,lang}=material||{},coverId=pid||isbnForCover,handleDetailsModal=event=>{event.stopPropagation(),openDetailsModal()};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_cover_cover__WEBPACK_IMPORTED_MODULE_2__.Y,{ids:[coverId],idType:pid?"pid":"isbn",size:"small",animate:!1,alt:description||""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__information"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,materialType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__about"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:e=>{handleDetailsModal(e)},onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||focused||handleDetailsModal(e)},type:"button",autoFocus:focused,lang:lang||"",className:"list-reservation__header color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{id:arrowLabelledBy,className:"list-reservation__header__text"},title)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-author",className:"text-small-caption color-secondary-gray"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_author_year_authorYear__WEBPACK_IMPORTED_MODULE_1__.A,{author:authorsShort||"",year:year||""})),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-periodical",className:"text-small-caption color-secondary-gray"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"reservation-about-series",className:"text-small-caption color-secondary-gray"},series)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,children)))};try{materialinfo.displayName="materialinfo",materialinfo.__docgenInfo={description:"",displayName:"materialinfo",props:{material:{defaultValue:null,description:"",name:"material",required:!0,type:{name:"Nullable>"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"() => void"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"]={docgenInfo:materialinfo.__docgenInfo,name:"materialinfo",path:"src/apps/loan-list/materials/stackable-material/material-info.tsx#materialinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/publizon/publizon.ts"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e({item,...props})=>{if(item.faust)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(item.identifier){const[digitalMaterial,setDigitalMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),{data:productsData,isSuccess:isSuccessDigital,isLoading}=(0,_core_publizon_publizon__WEBPACK_IMPORTED_MODULE_1__.wK)(item.identifier);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{productsData&&isSuccessDigital&&productsData.product&&setDigitalMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.z7)(productsData.product))}),[productsData,isSuccessDigital]),isLoading?LoadingComponent?react__WEBPACK_IMPORTED_MODULE_0__.createElement(LoadingComponent,null):null:digitalMaterial?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material:digitalMaterial})):null}return null}},"./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e({item,...props})=>{if(null!=item&&item.identifier)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item}));if(null!=item&&item.faust){const[material,setMaterial]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();let isLoadingAnything=!1,manifestation=null;if(item.reservationIds&&item.reservationIds.length>1){const{isSuccess,data,isLoading}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.NM)({faust:item.faust});isLoadingAnything=isLoading,isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation.ownerWork.manifestations.bestRepresentation)}else{const{isSuccess,data,isLoading}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.V3)({faust:item.faust});isLoadingAnything=isLoading,isSuccess&&null!=data&&data.manifestation&&(manifestation=data.manifestation)}return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{manifestation?setMaterial((0,_core_utils_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_2__.Ml)(manifestation)):item.details&&setMaterial(item.details)}),[manifestation,item.details]),isLoadingAnything?FallbackComponent?react__WEBPACK_IMPORTED_MODULE_0__.createElement(FallbackComponent,null):null:material?react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,_extends({},props,{item,material})):null}return null}},"./src/apps/loan-list/materials/utils/status-badge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>status_badge});var react=__webpack_require__("./node_modules/react/index.js"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),useLoanThresholds=__webpack_require__("./src/core/utils/useLoanThresholds.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const status_badge_content=({statusLabelType,text,isMobileVersion=!1})=>react.createElement("div",{className:(0,clsx.A)(`status-label status-label--${statusLabelType}`,[{"hide-on-desktop ml-16":isMobileVersion}])},text);try{statusbadgecontent.displayName="statusbadgecontent",statusbadgecontent.__docgenInfo={description:"",displayName:"statusbadgecontent",props:{statusLabelType:{defaultValue:null,description:"",name:"statusLabelType",required:!0,type:{name:"enum",value:[{value:'"danger"'},{value:'"warning"'},{value:'"neutral"'},{value:'"info"'}]}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},isMobileVersion:{defaultValue:{value:"false"},description:"",name:"isMobileVersion",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-badge-content.tsx#statusbadgecontent"]={docgenInfo:statusbadgecontent.__docgenInfo,name:"statusbadgecontent",path:"src/apps/loan-list/materials/utils/status-badge-content.tsx#statusbadgecontent"})}catch(__react_docgen_typescript_loader_error){}const status_badge=({badgeDate,warningText,showBadgeWithDueDate=!1,dangerText,infoText,neutralText,mobileVersion=!1})=>{const threshold=(0,useLoanThresholds.A)(),daysBetweenTodayAndDue=badgeDate?(0,general.m2)(badgeDate):0;return daysBetweenTodayAndDue{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts");const __WEBPACK_DEFAULT_EXPORT__=({color,percent,children})=>{const{default:defaultColor}=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.jM)(),usedColor=color||defaultColor;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"counter",style:{background:`radial-gradient( closest-side, var(--parent-bg-color) calc(100% - 3px), transparent calc(100% - 2px), transparent 0 100% ), conic-gradient(${usedColor} ${percent}%, #DBDBDB 0)`}},children)};try{statuscircleicon.displayName="statuscircleicon",statuscircleicon.__docgenInfo={description:"",displayName:"statuscircleicon",props:{color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"]={docgenInfo:statuscircleicon.__docgenInfo,name:"statuscircleicon",path:"src/apps/loan-list/materials/utils/status-circle-icon.tsx#statuscircleicon"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/status-circle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1__),_status_circle_icon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const __WEBPACK_DEFAULT_EXPORT__=({loanDate,dueDate})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.F)(),colors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.jM)(),threshold=(0,_core_utils_useLoanThresholds__WEBPACK_IMPORTED_MODULE_5__.A)();let color=colors.default,percent=100,daysBetweenTodayAndDue=null,daysBetweenLoanAndDue=null;return dueDate?(daysBetweenTodayAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.m2)(dueDate),daysBetweenLoanAndDue=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.X6)(dueDate,loanDate),percent=100-daysBetweenTodayAndDue/daysBetweenLoanAndDue*100,percent<0&&(percent=100),daysBetweenTodayAndDue0?daysBetweenTodayAndDue:0," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndDue?"loanListMaterialDayText":"loanListMaterialDaysText"))),null===daysBetweenTodayAndDue&&null===daysBetweenTodayAndDue&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"counter__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"counter__label"},t("readyForLoanCounterLabelText"))))};try{statuscircle.displayName="statuscircle",statuscircle.__docgenInfo={description:"",displayName:"statuscircle",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"]={docgenInfo:statuscircle.__docgenInfo,name:"statuscircle",path:"src/apps/loan-list/materials/utils/status-circle.tsx#statuscircle"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/materials/utils/warning-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1__),_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/LinkButton.tsx"),_components_Buttons_Button__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/Buttons/Button.tsx");const __WEBPACK_DEFAULT_EXPORT__=({linkText,overdueText,rightText,rightButtonText,rightButtonAriaLabelText,leftLink,rightLink,classNames,rightAction})=>{const labelId=(0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:`warning-bar bg-global-secondary ${classNames}`,"data-cy":"warning-bar"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__left"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"warning-bar__icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_warning_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular color-primary-black","data-cy":"warning-bar-text"},overdueText,leftLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_2__.A,{href:leftLink,className:"link-tag color-secondary-gray ml-8"},linkText)))),(rightText||rightLink||rightAction)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"warning-bar__right"},rightText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-medium warning-bar__owes","data-cy":"warning-bar-right-text"},rightText)," ",rightLink&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"hide-visually",id:labelId},rightButtonAriaLabelText),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Buttons_LinkButton__WEBPACK_IMPORTED_MODULE_3__.A,{dataCy:"warning-bar-right-link",url:rightLink,size:"small",variant:"filled",ariaLabelledBy:labelId},rightButtonText)),!!rightAction&&!!rightButtonText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Buttons_Button__WEBPACK_IMPORTED_MODULE_4__.$,{size:"small",variant:"filled",buttonType:"none",collapsible:!1,disabled:!1,label:rightButtonText,onClick:rightAction})))};try{warningbar.displayName="warningbar",warningbar.__docgenInfo={description:"",displayName:"warningbar",props:{linkText:{defaultValue:null,description:"",name:"linkText",required:!1,type:{name:"string | undefined"}},overdueText:{defaultValue:null,description:"",name:"overdueText",required:!1,type:{name:"string | undefined"}},rightButtonText:{defaultValue:null,description:"",name:"rightButtonText",required:!1,type:{name:"string | undefined"}},rightButtonAriaLabelText:{defaultValue:null,description:"",name:"rightButtonAriaLabelText",required:!1,type:{name:"string | undefined"}},rightText:{defaultValue:null,description:"",name:"rightText",required:!1,type:{name:"string | undefined"}},leftLink:{defaultValue:null,description:"",name:"leftLink",required:!1,type:{name:"URL | undefined"}},rightLink:{defaultValue:null,description:"",name:"rightLink",required:!1,type:{name:"URL | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},rightAction:{defaultValue:null,description:"",name:"rightAction",required:!1,type:{name:"(() => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"]={docgenInfo:warningbar.__docgenInfo,name:"warningbar",path:"src/apps/loan-list/materials/utils/warning-bar.tsx#warningbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,B0:()=>loanDetailsModalId,bk:()=>reservationDetailsModalId});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/types/loan-type.ts"),_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function reservationDetailsModalId(reservation){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.c6)().reservationDetails)}${String(reservation.identifier||reservation.faust)}`}function loanDetailsModalId(loan){return`${String((0,_core_utils_helpers_modal_helpers__WEBPACK_IMPORTED_MODULE_3__.c6)().loanDetails)}${(0,_core_utils_types_loan_type__WEBPACK_IMPORTED_MODULE_4__.G)(loan)}`}const __WEBPACK_DEFAULT_EXPORT__=({modalId,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)();return modalId?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.A,{modalId,classNames:"modal-details",closeModalAriaLabelText:t("materialDetailsCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("materialDetailsModalAriaDescriptionText")},children):null};try{reservationDetailsModalId.displayName="reservationDetailsModalId",reservationDetailsModalId.__docgenInfo={description:"",displayName:"reservationDetailsModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},reservationType:{defaultValue:null,description:"",name:"reservationType",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"string | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"]={docgenInfo:reservationDetailsModalId.__docgenInfo,name:"reservationDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#reservationDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{loanDetailsModalId.displayName="loanDetailsModalId",loanDetailsModalId.__docgenInfo={description:"",displayName:"loanDetailsModalId",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loanDate:{defaultValue:null,description:"",name:"loanDate",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},isRenewable:{defaultValue:null,description:"",name:"isRenewable",required:!0,type:{name:"boolean"}},materialItemNumber:{defaultValue:null,description:"",name:"materialItemNumber",required:!1,type:{name:"string | null | undefined"}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string | null"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"string | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"]={docgenInfo:loanDetailsModalId.__docgenInfo,name:"loanDetailsModalId",path:"src/apps/loan-list/modal/material-details-modal.tsx#loanDetailsModalId"})}catch(__react_docgen_typescript_loader_error){}try{materialdetailsmodal.displayName="materialdetailsmodal",materialdetailsmodal.__docgenInfo={description:"",displayName:"materialdetailsmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"]={docgenInfo:materialdetailsmodal.__docgenInfo,name:"materialdetailsmodal",path:"src/apps/loan-list/modal/material-details-modal.tsx#materialdetailsmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/modal/material-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>material_details});var react=__webpack_require__("./node_modules/react/index.js"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),utils_text=__webpack_require__("./src/core/utils/text.tsx"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),warning_bar=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),StatusMessage=__webpack_require__("./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx");const renew_button=({loanId,renewable,classNames,hideOnMobile,setRenewingStatus,renewingStatus,renewalStatusList,loanType,setRenewingResponse})=>{const t=(0,utils_text.F)(),{track}=(0,useStatistics.B)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.Oc)(),label=(0,renewal.OX)({isRenewable:renewable,renewingStatus,t}),renew=(0,react.useCallback)((renewId=>{setRenewingStatus("pending"),mutate({data:[renewId]},{onSuccess:result=>{result&&(queryClient.invalidateQueries((0,fbs.$4)()),setRenewingResponse(result),setRenewingStatus("success"))},onError:()=>{setRenewingStatus("error")}})}),[mutate,queryClient,setRenewingResponse,setRenewingStatus]);return react.createElement("div",{className:`${hideOnMobile&&"modal-details__buttons--hide-on-mobile"} modal-details__buttons`},react.createElement(StatusMessage.A,{className:"list-materials__status__note-desktop mt-48 mr-16",loanType,renewalStatusList}),react.createElement(Button.$,{dataCy:"material-renew-button",size:"small",variant:"filled",disabled:!renewable||"pending"===renewingStatus,onClick:()=>{track("click",{id:statistics.o.renewSelectedMaterials.id,name:statistics.o.renewSelectedMaterials.name,trackedData:"Forny_valgte_materialer"}),renew(loanId)},classNames,label,buttonType:"none",collapsible:!1}),react.createElement(StatusMessage.A,{className:"list-materials__status__note-mobile mt-8",loanType,renewalStatusList}))};try{renewbutton.displayName="renewbutton",renewbutton.__docgenInfo={description:"",displayName:"renewbutton",props:{loanId:{defaultValue:null,description:"",name:"loanId",required:!0,type:{name:"number"}},renewable:{defaultValue:null,description:"",name:"renewable",required:!0,type:{name:"boolean"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},hideOnMobile:{defaultValue:null,description:"",name:"hideOnMobile",required:!0,type:{name:"boolean"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},renewalStatusList:{defaultValue:null,description:"",name:"renewalStatusList",required:!0,type:{name:"string[]"}},loanType:{defaultValue:null,description:"",name:"loanType",required:!0,type:{name:"string"}},setRenewingResponse:{defaultValue:null,description:"",name:"setRenewingResponse",required:!0,type:{name:"(response: RenewedLoanV2[] | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/renew-button.tsx#renewbutton"]={docgenInfo:renewbutton.__docgenInfo,name:"renewbutton",path:"src/apps/loan-list/modal/renew-button.tsx#renewbutton"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const material_details=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({loan,material,modalId})=>{const[renewingStatus,setRenewingStatus]=(0,react.useState)("idle"),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),t=(0,utils_text.F)(),u=(0,url.Ik)(),ereolenMyPageUrl=u("ereolenMyPageUrl"),viewFeesAndCompensationRatesUrl=u("viewFeesAndCompensationRatesUrl");if(!loan)return null;const{dueDate,faust,loanId,identifier,isRenewable,materialItemNumber,loanDate,loanType,periodical,renewalStatusList}=loan,{authors,materialType,year,title,pid,description,series}=material||{};return react.createElement(react.Fragment,null,!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.A,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId,setRenewingStatus,texts:{successTitleText:t("renewMaterialLoanSuccessTitleText"),successStatusText:t("renewMaterialLoanSuccessStatusText"),noRenewalsPossibleErrorTitleText:t("renewMaterialLoanNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewMaterialLoanNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewMaterialLoanErrorTitleText"),errorStatusText:t("renewMaterialLoanErrorStatusText"),buttonText:t("renewMaterialLoanButtonText")}}),["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-details__container"},react.createElement(modal_details_header.A,{year,authors,title,periodical,series,pid,description,materialType,isbnForCover:identifier||""},dueDate&&react.createElement(status_badge.A,{showBadgeWithDueDate:!0,badgeDate:dueDate,dangerText:t("materialDetailsOverdueText")})),!(0,helpers.X4)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons modal-details__buttons--hide-on-mobile",loanId,renewable:isRenewable,hideOnMobile:!0,renewingStatus,loanType:loanType||"",setRenewingStatus,setRenewingResponse,renewalStatusList}),(0,helpers.X4)(loan)&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(Link.A,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""}))),dueDate&&(0,general.El)(dueDate)&&react.createElement("div",{className:"modal-details__warning"},react.createElement(warning_bar.A,{leftLink:viewFeesAndCompensationRatesUrl,linkText:t("materialDetailsLinkToPageWithFeesText"),overdueText:t("materialDetailsWarningLoanOverdueText")})),react.createElement("div",{className:"modal-details__list"},dueDate&&!(0,helpers.X4)(loan)&&react.createElement(list_details.A,{icon:Loans_default(),labels:(0,date.Yq)(dueDate),title:t("materialDetailsPhysicalDueDateLabelText")}),dueDate&&(0,helpers.X4)(loan)&&react.createElement(list_details.A,{icon:Loans_default(),labels:(0,date.Yq)(dueDate),title:t("materialDetailsDigitalDueDateLabelText")}),loanDate&&react.createElement(list_details.A,{icon:Reservations_default(),labels:(0,date.Yq)(loanDate),title:t("materialDetailsLoanDateLabelText")}),materialItemNumber&&react.createElement(list_details.A,{icon:Ebook_default(),labels:materialItemNumber,title:t("materialDetailsMaterialNumberLabelText")})),!(0,helpers.X4)(loan)&&!!faust&&!!loanId&&react.createElement(renew_button,{classNames:"modal-details__buttons__full-width",loanId,renewable:isRenewable,hideOnMobile:!1,loanType:loanType||"",renewingStatus,setRenewingStatus,setRenewingResponse,renewalStatusList}),(0,helpers.X4)(loan)&&react.createElement("div",{className:"modal-details__buttons"},react.createElement(Link.A,{href:ereolenMyPageUrl,className:"btn-primary btn-filled btn-small arrow__hover--right-small modal-details__buttons__full-width"},t("materialDetailsGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))))})));try{materialdetails.displayName="materialdetails",materialdetails.__docgenInfo={description:"",displayName:"materialdetails",props:{loan:{defaultValue:null,description:"",name:"loan",required:!0,type:{name:"LoanType | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/loan-list/modal/material-details.tsx#materialdetails"]={docgenInfo:materialdetails.__docgenInfo,name:"materialdetails",path:"src/apps/loan-list/modal/material-details.tsx#materialdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/loan-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Iw:()=>getStatusText,Qo:()=>materialsAreStacked,VL:()=>loansAreEmpty,V_:()=>getLoanDeliveryDate,X4:()=>isDigital,e8:()=>getStackedItems,nB:()=>getFromListByKey,nZ:()=>removeLoansWithDuplicateDueDate});const removeLoansWithDuplicateDueDate=(date,list)=>list.filter((({dueDate})=>dueDate===date)),loansAreEmpty=list=>Array.isArray(list)&&0===list.length,materialsAreStacked=materialsInStack=>materialsInStack>0,getFromListByKey=(list,key,value)=>list.filter((loan=>String(loan[key])===value)),getStatusText=(status,t)=>{switch(status){case"deniedMaxRenewalsReached":return t("groupModalRenewLoanDeniedMaxRenewalsReachedText");case"deniedReserved":return t("groupModalRenewLoanDeniedReservedText");default:return""}},isDigital=loan=>Boolean(loan.identifier),getStackedItems=(view,list,itemsShown,dueDates)=>{let returnLoans=[];if("stack"===view&&dueDates){let dueDatesCopy=[...dueDates,null];dueDatesCopy=dueDatesCopy.slice(0,itemsShown),dueDatesCopy.forEach((uniqueDueDate=>{returnLoans=returnLoans.concat(list.filter((({dueDate})=>dueDate===uniqueDueDate)))}))}return returnLoans},getLoanDeliveryDate=(loanType,formatDate,t)=>loanType.dueDate?t(isDigital(loanType)?"groupModalDueDateDigitalMaterialText":"groupModalDueDateMaterialText",{placeholders:{"@date":formatDate(loanType.dueDate)}}):""},"./src/apps/material-grid/MaterialGrid.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_components_card_item_list_MaterialListItem__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_recommended_material_RecommendedMaterial__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/apps/recommended-material/RecommendedMaterial.tsx"),_materiel_grid_util__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/apps/material-grid/materiel-grid-util.ts");const MaterialGrid=({materials,title,description,selectedAmountOfMaterialsForDisplay})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)(),firstNewItemRef=react__WEBPACK_IMPORTED_MODULE_0__.useRef(null),initialMaximumDisplay=_materiel_grid_util__WEBPACK_IMPORTED_MODULE_4__.E[0],maximumCalculatedDisplay=(0,_materiel_grid_util__WEBPACK_IMPORTED_MODULE_4__.i)(materials.length,selectedAmountOfMaterialsForDisplay),moreMaterialsThanInitialMaximum=maximumCalculatedDisplay>initialMaximumDisplay,[currentAmountOfDisplayedMaterials,setCurrentMaterialsDisplayedMaterials]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialMaximumDisplay);(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{firstNewItemRef.current&&firstNewItemRef.current.focus()}),[currentAmountOfDisplayedMaterials]);const[showAllMaterials,setShowAllMaterials]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);const titleClasses=(0,clsx__WEBPACK_IMPORTED_MODULE_5__.A)("material-grid__title",{"material-grid__title--no-description":!description});return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid"},(title||description)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__text-wrapper"},title&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:titleClasses},title),description&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"material-grid__description"},description)),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"material-grid__items"},materials.slice(0,currentAmountOfDisplayedMaterials).map(((material,index)=>{const{wid,materialType}=material;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_card_item_list_MaterialListItem__WEBPACK_IMPORTED_MODULE_1__.A,{key:wid,ref:index===initialMaximumDisplay?firstNewItemRef:null},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_recommended_material_RecommendedMaterial__WEBPACK_IMPORTED_MODULE_3__.A,{partOfGrid:!0,wid,materialType}))}))),moreMaterialsThanInitialMaximum&&!showAllMaterials&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"material-grid__show-more btn-primary btn-outline btn-medium","data-show-more":!0,"aria-expanded":showAllMaterials?"true":"false",type:"button",onClick:()=>function handleShowAllMaterials(){setCurrentMaterialsDisplayedMaterials(maximumCalculatedDisplay),setShowAllMaterials(!showAllMaterials)}()},t("buttonText")))},__WEBPACK_DEFAULT_EXPORT__=MaterialGrid;try{MaterialGrid.displayName="MaterialGrid",MaterialGrid.__docgenInfo={description:"",displayName:"MaterialGrid",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"MaterialGridItemProps[]"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},selectedAmountOfMaterialsForDisplay:{defaultValue:null,description:"",name:"selectedAmountOfMaterialsForDisplay",required:!0,type:{name:"enum",value:[{value:"20"},{value:"12"},{value:"4"},{value:"8"},{value:"16"},{value:"24"},{value:"28"},{value:"32"}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/MaterialGrid.tsx#MaterialGrid"]={docgenInfo:MaterialGrid.__docgenInfo,name:"MaterialGrid",path:"src/apps/material-grid/MaterialGrid.tsx#MaterialGrid"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/material-grid/MaterialGridSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_recommended_material_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx");const MaterialGridSkeleton=({title})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid"},title&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__title"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__items"},[...Array(4)].map((()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-grid__item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_recommended_material_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_1__.A,{partOfGrid:!0})))))),__WEBPACK_DEFAULT_EXPORT__=MaterialGridSkeleton;try{MaterialGridSkeleton.displayName="MaterialGridSkeleton",MaterialGridSkeleton.__docgenInfo={description:"",displayName:"MaterialGridSkeleton",props:{title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/MaterialGridSkeleton.tsx#MaterialGridSkeleton"]={docgenInfo:MaterialGridSkeleton.__docgenInfo,name:"MaterialGridSkeleton",path:"src/apps/material-grid/MaterialGridSkeleton.tsx#MaterialGridSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/material-grid/automatic/MaterialGridAutomatic.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,Skeleton:()=>Skeleton,default:()=>MaterialGridAutomatic_dev});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),branches=__webpack_require__("./src/core/utils/branches.tsx"),MaterialGrid=__webpack_require__("./src/apps/material-grid/MaterialGrid.tsx"),MaterialGridSkeleton=__webpack_require__("./src/apps/material-grid/MaterialGridSkeleton.tsx");const MaterialGridAutomatic=({cql,title,description,selectedAmountOfMaterialsForDisplay})=>{const cleanBranches=(0,branches.Ay)(),{data,isLoading}=(0,graphql.YP)({cql,offset:0,limit:selectedAmountOfMaterialsForDisplay,filters:{branchId:cleanBranches}});if(isLoading||!data)return react.createElement(MaterialGridSkeleton.A,{title});const materials=data.complexSearch.works.map((work=>({wid:work.workId})));return react.createElement(MaterialGrid.A,{title,materials,description,selectedAmountOfMaterialsForDisplay})},automatic_MaterialGridAutomatic=MaterialGridAutomatic;try{MaterialGridAutomatic.displayName="MaterialGridAutomatic",MaterialGridAutomatic.__docgenInfo={description:"",displayName:"MaterialGridAutomatic",props:{cql:{defaultValue:null,description:"",name:"cql",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},selectedAmountOfMaterialsForDisplay:{defaultValue:null,description:"",name:"selectedAmountOfMaterialsForDisplay",required:!0,type:{name:"enum",value:[{value:"20"},{value:"12"},{value:"4"},{value:"8"},{value:"16"},{value:"24"},{value:"28"},{value:"32"}]}},buttonText:{defaultValue:null,description:"",name:"buttonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/automatic/MaterialGridAutomatic.tsx#MaterialGridAutomatic"]={docgenInfo:MaterialGridAutomatic.__docgenInfo,name:"MaterialGridAutomatic",path:"src/apps/material-grid/automatic/MaterialGridAutomatic.tsx#MaterialGridAutomatic"})}catch(__react_docgen_typescript_loader_error){}const MaterialGridAutomatic_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({cql,title,description,selectedAmountOfMaterialsForDisplay,buttonText})=>react.createElement(guarded_app.A,{app:"material-grid-automatic"},react.createElement(automatic_MaterialGridAutomatic,{cql,title,description,selectedAmountOfMaterialsForDisplay,buttonText}))))));try{MaterialGridAutomaticentry.displayName="MaterialGridAutomaticentry",MaterialGridAutomaticentry.__docgenInfo={description:"",displayName:"MaterialGridAutomaticentry",props:{cql:{defaultValue:null,description:"",name:"cql",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},selectedAmountOfMaterialsForDisplay:{defaultValue:null,description:"",name:"selectedAmountOfMaterialsForDisplay",required:!0,type:{name:"enum",value:[{value:"20"},{value:"12"},{value:"4"},{value:"8"},{value:"16"},{value:"24"},{value:"28"},{value:"32"}]}},buttonText:{defaultValue:null,description:"",name:"buttonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/automatic/MaterialGridAutomatic.entry.tsx#MaterialGridAutomaticentry"]={docgenInfo:MaterialGridAutomaticentry.__docgenInfo,name:"MaterialGridAutomaticentry",path:"src/apps/material-grid/automatic/MaterialGridAutomatic.entry.tsx#MaterialGridAutomaticentry"})}catch(__react_docgen_typescript_loader_error){}const MaterialGridAutomatic_dev={title:"Apps / Material Grid / Automatic",component:MaterialGridAutomatic_entry,argTypes:{title:{name:"Title",defaultValue:"Recommended materials",control:{type:"text"}},description:{name:"Description",defaultValue:"This is a long description of the materials selected, or whatever else you want to put in here",control:{type:"text"}},cql:{name:"CQL Search String",defaultValue:"'heste' OR 'PIPPI'",control:{type:"text"},description:"CQL search string to use for the material grid, search for a result and copy the CQL string from an advanced search"},selectedAmountOfMaterialsForDisplay:{name:"Amount of materials to show",defaultValue:12,control:{type:"select",options:[4,8,12,16,20,24,28,32]}},buttonText:{name:"Button text",defaultValue:"Show all",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A,blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}}}},App=args=>react.createElement(MaterialGridAutomatic_entry,args),Skeleton=(()=>react.createElement(MaterialGridSkeleton.A,null)).bind({})},"./src/apps/material-grid/manual/MaterialGridManual.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,Skeleton:()=>Skeleton,default:()=>MaterialGridManual_dev});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),MaterialGrid=__webpack_require__("./src/apps/material-grid/MaterialGrid.tsx"),materiel_grid_util=__webpack_require__("./src/apps/material-grid/materiel-grid-util.ts");const MaterialGridManual=({materials,title,description})=>{const selectedAmountOfMaterialsForDisplay=(0,materiel_grid_util.i)(materials.length);return react.createElement(MaterialGrid.A,{title,description,materials,selectedAmountOfMaterialsForDisplay})},manual_MaterialGridManual=MaterialGridManual;try{MaterialGridManual.displayName="MaterialGridManual",MaterialGridManual.__docgenInfo={description:"",displayName:"MaterialGridManual",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"MaterialGridItemProps[]"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/manual/MaterialGridManual.tsx#MaterialGridManual"]={docgenInfo:MaterialGridManual.__docgenInfo,name:"MaterialGridManual",path:"src/apps/material-grid/manual/MaterialGridManual.tsx#MaterialGridManual"})}catch(__react_docgen_typescript_loader_error){}const MaterialGridManual_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({materials,title,description})=>{const parsedMaterials=JSON.parse(materials).map((work=>({wid:work.wid,materialType:work.materialType})));return react.createElement(guarded_app.A,{app:"material-grid-manual"},react.createElement(manual_MaterialGridManual,{materials:parsedMaterials,title,description}))}))));try{MaterialGridManualentry.displayName="MaterialGridManualentry",MaterialGridManualentry.__docgenInfo={description:"",displayName:"MaterialGridManualentry",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-grid/manual/MaterialGridManual.entry.tsx#MaterialGridManualentry"]={docgenInfo:MaterialGridManualentry.__docgenInfo,name:"MaterialGridManualentry",path:"src/apps/material-grid/manual/MaterialGridManual.entry.tsx#MaterialGridManualentry"})}catch(__react_docgen_typescript_loader_error){}var MaterialGridSkeleton=__webpack_require__("./src/apps/material-grid/MaterialGridSkeleton.tsx");const MaterialGridManual_dev={title:"Apps / Material Grid / Manual",component:MaterialGridManual_entry,argTypes:{title:{name:"Title",defaultValue:"Recommended materials",control:{type:"text"}},description:{name:"Description",defaultValue:"This is a long description of the materials selected, or whatever else you want to put in here",control:{type:"text"}},buttonText:{name:"Button text",defaultValue:"Show all",control:{type:"text"}},materials:{name:"Materials",defaultValue:JSON.stringify([{wid:"work-of:870970-basis:25660722",materialType:"bog"},{wid:"work-of:870970-basis:22383590",materialType:"e-bog"},{wid:"work-of:870970-basis:25932625",materialType:"film"},{wid:"work-of:870970-basis:26264340",materialType:"musik (online)"},{wid:"work-of:870970-basis:52646251",materialType:"lydbog"},{wid:"work-of:870970-basis:26856353",materialType:"artikel"},{wid:"work-of:870970-basis:27275745",materialType:"tegneserie (online)"},{wid:"work-of:870970-basis:22383590",materialType:"tidsskrift"},{wid:"work-of:870970-basis:29788596",materialType:"cd"},{wid:"work-of:870970-basis:52646251",materialType:"podcast"},{wid:"work-of:870970-basis:50689360",materialType:"film (online)"},{wid:"work-of:870970-basis:22383590",materialType:"lydbog (cd-mp3)"},{wid:"work-of:870970-basis:46510534",materialType:"artikel (online)"},{wid:"work-of:870970-basis:134877804",materialType:"tegneserie"},{wid:"work-of:870970-basis:54129807",materialType:"tidsskrift (online)"},{wid:"work-of:870970-basis:52646251",materialType:"billedbog"},{wid:"work-of:870970-basis:25660722",materialType:"billedbog (online)"},{wid:"work-of:870970-basis:25932625",materialType:"lydbog (online)"},{wid:"work-of:870970-basis:26264340",materialType:"musik (online)"},{wid:"work-of:870970-basis:22383590",materialType:"artikel"},{wid:"work-of:870970-basis:26856353",materialType:"film"},{wid:"work-of:870970-basis:27275745",materialType:"e-bog"},{wid:"work-of:870970-basis:45363899",materialType:"cd"},{wid:"work-of:870970-basis:29788596",materialType:"podcast"},{wid:"work-of:870970-basis:52646251",materialType:"film (online)"},{wid:"work-of:870970-basis:50689360",materialType:"lydbog"},{wid:"work-of:870970-basis:53045650",materialType:"tegneserie (online)"},{wid:"work-of:870970-basis:46510534",materialType:"tidsskrift"},{wid:"work-of:870970-basis:134877804",materialType:"cd"},{wid:"work-of:870970-basis:54129807",materialType:"podcast"},{wid:"work-of:870970-basis:52646251",materialType:"film (online)"}]),control:{type:"array"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A,blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}}}},App=args=>react.createElement(MaterialGridManual_entry,args),Skeleton=(()=>react.createElement(MaterialGridSkeleton.A,null)).bind({})},"./src/apps/material-grid/materiel-grid-util.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{E:()=>MaterialGridValidIncrements,i:()=>calculateAmountToDisplay});const MaterialGridValidIncrements=[4,8,12,16,20,24,28,32];function calculateAmountToDisplay(availableAmount,selectedAmount){if(selectedAmount&&availableAmount>=selectedAmount)return selectedAmount;return[...MaterialGridValidIncrements].reverse().find((increment=>increment<=availableAmount))||MaterialGridValidIncrements[0]}},"./src/apps/material-search/MaterialSearch.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithPreviouslySelectedValues:()=>WithPreviouslySelectedValues,default:()=>MaterialSearch_dev,materialWithInvalidType:()=>materialWithInvalidType,materialWithInvalidWorkId:()=>materialWithInvalidWorkId});var react=__webpack_require__("./node_modules/react/index.js"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),utils_url=__webpack_require__("./src/core/utils/url.tsx"),icon_warning=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-warning.svg"),icon_warning_default=__webpack_require__.n(icon_warning);const MaterialSearchBaseError=({headingText,children})=>react.createElement("div",{className:"material-search__error"},react.createElement("div",{className:"material-search__error-header"},react.createElement("img",{src:icon_warning_default(),className:"material-search__error-icon",alt:""}),react.createElement("h3",{className:"material-search__error-header-text"},headingText)),children),Errors_MaterialSearchBaseError=MaterialSearchBaseError;try{MaterialSearchBaseError.displayName="MaterialSearchBaseError",MaterialSearchBaseError.__docgenInfo={description:"",displayName:"MaterialSearchBaseError",props:{headingText:{defaultValue:null,description:"",name:"headingText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/MaterialSearchBaseError.tsx#MaterialSearchBaseError"]={docgenInfo:MaterialSearchBaseError.__docgenInfo,name:"MaterialSearchBaseError",path:"src/apps/material-search/Errors/MaterialSearchBaseError.tsx#MaterialSearchBaseError"})}catch(__react_docgen_typescript_loader_error){}const HiddenInputsNotFoundError=()=>{const t=(0,utils_text.F)();return react.createElement(Errors_MaterialSearchBaseError,{headingText:t("materialSearchErrorHiddenInputsNotFoundHeadingText")},react.createElement("div",{className:"material-search__error-content"},react.createElement("p",{className:"material-search__error-description"},t("materialSearchErrorHiddenInputsNotFoundDescriptionText"))))},Errors_HiddenInputsNotFoundError=HiddenInputsNotFoundError;try{HiddenInputsNotFoundError.displayName="HiddenInputsNotFoundError",HiddenInputsNotFoundError.__docgenInfo={description:"",displayName:"HiddenInputsNotFoundError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/HiddenInputsNotFoundError.tsx#HiddenInputsNotFoundError"]={docgenInfo:HiddenInputsNotFoundError.__docgenInfo,name:"HiddenInputsNotFoundError",path:"src/apps/material-search/Errors/HiddenInputsNotFoundError.tsx#HiddenInputsNotFoundError"})}catch(__react_docgen_typescript_loader_error){}var ErrorState=function(ErrorState){return ErrorState.NoError="NoError",ErrorState.WorkError="WorkError",ErrorState.MaterialTypeError="MaterialTypeError",ErrorState.hiddenInputsNotFoundError="hiddenInputsNotFoundError",ErrorState}(ErrorState||{});const Errors_errorState=ErrorState,MaterialSearchInputs=({searchInput,setSearchInput,availableMaterialTypes,selectedMaterialType,handleUpdateMaterialType,work,uniqueIdentifier})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"material-search__inputs-container"},react.createElement("label",{className:"material-search__label",htmlFor:"material-search-input"},t("materialSearchSearchInputText"),react.createElement("input",{id:`material-search-input-${uniqueIdentifier}`,type:"search",value:searchInput,onChange:e=>setSearchInput(e.target.value),placeholder:t("materialSearchSearchInputPlaceholderText"),className:"material-search__input"})),react.createElement("label",{className:"material-search__label",htmlFor:"material-type-selector"},t("materialSearchMaterialTypeSelectorText"),react.createElement("select",{id:`material-type-selector-${uniqueIdentifier}`,className:"material-search__selector",disabled:!work||!availableMaterialTypes||0===availableMaterialTypes.length,onChange:e=>handleUpdateMaterialType(e.target.value),value:selectedMaterialType||""},react.createElement("option",{value:"",disabled:!0},t("materialSearchMaterialTypeSelectorNoneOptionText")),availableMaterialTypes&&availableMaterialTypes.map((type=>react.createElement("option",{key:type,value:type},type))))))},material_search_MaterialSearchInputs=MaterialSearchInputs;try{MaterialSearchInputs.displayName="MaterialSearchInputs",MaterialSearchInputs.__docgenInfo={description:"",displayName:"MaterialSearchInputs",props:{searchInput:{defaultValue:null,description:"",name:"searchInput",required:!0,type:{name:"string"}},setSearchInput:{defaultValue:null,description:"",name:"setSearchInput",required:!0,type:{name:"(value: string) => void"}},availableMaterialTypes:{defaultValue:null,description:"",name:"availableMaterialTypes",required:!0,type:{name:"ManifestationMaterialType[] | null"}},selectedMaterialType:{defaultValue:null,description:"",name:"selectedMaterialType",required:!0,type:{name:"ManifestationMaterialType | null"}},handleUpdateMaterialType:{defaultValue:null,description:"",name:"handleUpdateMaterialType",required:!0,type:{name:"(newValue: ManifestationMaterialType) => void"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work | null"}},uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchInputs.tsx#MaterialSearchInputs"]={docgenInfo:MaterialSearchInputs.__docgenInfo,name:"MaterialSearchInputs",path:"src/apps/material-search/MaterialSearchInputs.tsx#MaterialSearchInputs"})}catch(__react_docgen_typescript_loader_error){}var cover=__webpack_require__("./src/components/cover/cover.tsx"),reload_logo_black=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/reload_logo_black.svg"),reload_logo_black_default=__webpack_require__.n(reload_logo_black);const MaterialSearchLoading=({loadingText})=>react.createElement("div",{className:"material-search__loading"},react.createElement("img",{src:reload_logo_black_default(),alt:"",className:"material-search__loading-spinner"}),react.createElement("span",{className:"material-search__loading-text"},loadingText)),material_search_MaterialSearchLoading=MaterialSearchLoading;try{MaterialSearchLoading.displayName="MaterialSearchLoading",MaterialSearchLoading.__docgenInfo={description:"",displayName:"MaterialSearchLoading",props:{loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchLoading.tsx#MaterialSearchLoading"]={docgenInfo:MaterialSearchLoading.__docgenInfo,name:"MaterialSearchLoading",path:"src/apps/material-search/MaterialSearchLoading.tsx#MaterialSearchLoading"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts"),useIntersection=__webpack_require__("./node_modules/react-use/esm/useIntersection.js"),useKeyPressEvent=__webpack_require__("./node_modules/react-use/esm/useKeyPressEvent.js");const useInfiteScrollLoading=({data,loadMore,hitCount,onWorkIdSelect})=>{const containerRef=(0,react.useRef)(null),lastItemRef=(0,react.useRef)(null),lastItemFocusRef=(0,react.useRef)(null),handleScroll=(0,react.useCallback)((()=>{if(containerRef.current){const{scrollTop,scrollHeight,clientHeight}=containerRef.current;scrollTop+clientHeight>=scrollHeight-5&&data.length{const currentContainer=containerRef.current;return currentContainer&¤tContainer.addEventListener("scroll",handleScroll),()=>{currentContainer&¤tContainer.removeEventListener("scroll",handleScroll)}}),[handleScroll]);const intersection=(0,useIntersection.A)(lastItemRef,{root:containerRef.current,rootMargin:"0px",threshold:1});(0,react.useEffect)((()=>{intersection&&1===intersection.intersectionRatio&&data.length{lastItemFocusRef.current&&(e.preventDefault(),onWorkIdSelect(lastItemFocusRef.current.dataset.workId))}),[onWorkIdSelect]);(0,useKeyPressEvent.A)("Enter",handleKeySelect),(0,useKeyPressEvent.A)(" ",handleKeySelect),(0,useKeyPressEvent.A)("Tab",(()=>{lastItemFocusRef.current&&loadMore()}));const handleFocus=(0,react.useCallback)(((index,itemRef)=>{index===data.length-1?lastItemFocusRef.current=itemRef:lastItemFocusRef.current=null}),[data.length]);return(0,react.useEffect)((()=>{lastItemFocusRef.current&&lastItemFocusRef.current.focus()}),[data]),{containerRef,lastItemRef,handleFocus}},material_search_MaterialSearchList=({data,isLoading,onWorkIdSelect,selectedWorkId,loadMore,hitCount})=>{const t=(0,utils_text.F)(),{containerRef,lastItemRef,handleFocus}=useInfiteScrollLoading({data,isLoading,loadMore,hitCount,onWorkIdSelect});return isLoading&&0===data.length?react.createElement("div",{className:"material-search-list"},react.createElement("div",{className:"material-search-list__header"}),react.createElement("ul",{className:"material-search-list__results"},react.createElement("li",{className:"material-search-list__loading"},react.createElement(material_search_MaterialSearchLoading,{loadingText:t("materialSearchLoadingText")})))):data&&0!==data.length?react.createElement("div",{className:"material-search-list",ref:containerRef},react.createElement("div",{className:"material-search-list__header"},t("materialSearchAmountOfResultsText"),":",react.createElement("span",null,hitCount)),react.createElement("ol",{className:"material-search-list__results"},data.map(((work,index)=>{const authors=(0,general.UV)(work.creators),isLastItem=index===data.length-1;return react.createElement("li",{className:"material-search-list__item "+(selectedWorkId===work.workId?"material-search-list__item--highlighted":""),key:work.workId,ref:isLastItem?lastItemRef:null},react.createElement("button",{className:"material-search-list__button",type:"button",tabIndex:0,onClick:e=>{e.preventDefault(),onWorkIdSelect(work.workId)},onFocus:e=>handleFocus(index,e.currentTarget),"aria-label":t("materialSearchAriaButtonSelectWorkWithText",{placeholders:{"@title":`${work.titles.full}`}})},react.createElement(cover.Y,{size:"large",displaySize:"2xsmall",ids:[work.manifestations.bestRepresentation.pid],animate:!0}),react.createElement("div",null,react.createElement("div",{className:"material-search-list__detail-item"},react.createElement("span",{className:"material-search-list__term"},t("materialSearchPreviewTitleText"),":"),react.createElement("span",{className:"material-search-list__detail"},work.titles.full)),react.createElement("div",{className:"material-search-list__detail-item"},react.createElement("span",{className:"material-search-list__term"},t("materialSearchPreviewAuthorText"),":"),react.createElement("span",{className:"material-search-list__detail"},authors)))))})),isLoading&&react.createElement("li",{className:"material-search-list__loading"},react.createElement(material_search_MaterialSearchLoading,{loadingText:t("materialSearchLoadingText")})))):null};try{MaterialSearchList.displayName="MaterialSearchList",MaterialSearchList.__docgenInfo={description:"",displayName:"MaterialSearchList",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:'{ __typename?: "Work" | undefined; workId: string; abstract?: string[] | null | undefined; genreAndForm: string[]; titles: { __typename?: "WorkTitles" | undefined; full: string[]; original?: string[] | null | undefined; }; ... 4 more ...; manifestations: { ...; }; }[]'}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},onWorkIdSelect:{defaultValue:null,description:"",name:"onWorkIdSelect",required:!0,type:{name:"(workId: `work-of:${number}-${string}:${string}`) => void"}},selectedWorkId:{defaultValue:null,description:"",name:"selectedWorkId",required:!1,type:{name:"string | undefined"}},loadMore:{defaultValue:null,description:"",name:"loadMore",required:!0,type:{name:"() => void"}},hitCount:{defaultValue:null,description:"",name:"hitCount",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchList.tsx#MaterialSearchList"]={docgenInfo:MaterialSearchList.__docgenInfo,name:"MaterialSearchList",path:"src/apps/material-search/MaterialSearchList.tsx#MaterialSearchList"})}catch(__react_docgen_typescript_loader_error){}var helper=__webpack_require__("./src/apps/material/helper.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const MaterialTypeNotFoundError=({work:{titles:{full:fullTitle},creators,workId:wid}})=>{const u=(0,utils_url.Ik)(),t=(0,utils_text.F)(),materialUrl=u("materialUrl"),url=(0,helpers_url.Qj)(materialUrl,wid),authors=(0,general.sP)((0,general.UV)(creators),t);return react.createElement(Errors_MaterialSearchBaseError,{headingText:t("materialSearchErrorHeaderText")},react.createElement("div",{className:"material-search__error-content"},react.createElement("p",{className:"material-search__error-description"},t("materialSearchErrorMaterialTypeNotFoundText")),react.createElement("div",{className:"material-search__error-material-content"},react.createElement("div",{className:"material-search__error-item"},react.createElement("span",{className:"material-search__error-term"},t("materialSearchErrorTitleText"),":"),react.createElement("span",{className:"material-search__error-detail"},fullTitle)),react.createElement("div",{className:"material-search__error-item"},react.createElement("span",{className:"material-search__error-term"},t("materialSearchErrorAuthorText"),":"),react.createElement("span",{className:"material-search__error-detail"},authors)),react.createElement("div",{className:"material-search__error-item"},react.createElement("span",{className:"material-search__error-term"},t("materialSearchErrorLinkText"),":"),react.createElement("a",{href:url.href,target:"_blank",className:"material-search__error-link",rel:"noreferrer noopener"},url.href)))))},Errors_MaterialTypeNotFoundError=MaterialTypeNotFoundError;try{MaterialTypeNotFoundError.displayName="MaterialTypeNotFoundError",MaterialTypeNotFoundError.__docgenInfo={description:"",displayName:"MaterialTypeNotFoundError",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/MaterialTypeNotFoundError.tsx#MaterialTypeNotFoundError"]={docgenInfo:MaterialTypeNotFoundError.__docgenInfo,name:"MaterialTypeNotFoundError",path:"src/apps/material-search/Errors/MaterialTypeNotFoundError.tsx#MaterialTypeNotFoundError"})}catch(__react_docgen_typescript_loader_error){}const WorkNotFoundError=()=>{const t=(0,utils_text.F)();return react.createElement(Errors_MaterialSearchBaseError,{headingText:t("materialSearchErrorHeaderText")},react.createElement("div",{className:"material-search__error-content"},react.createElement("p",{className:"material-search__error-description"},t("materialSearchErrorWorkNotFoundText"))))},Errors_WorkNotFoundError=WorkNotFoundError;try{WorkNotFoundError.displayName="WorkNotFoundError",WorkNotFoundError.__docgenInfo={description:"",displayName:"WorkNotFoundError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/Errors/WorkNotFoundError.tsx#WorkNotFoundError"]={docgenInfo:WorkNotFoundError.__docgenInfo,name:"WorkNotFoundError",path:"src/apps/material-search/Errors/WorkNotFoundError.tsx#WorkNotFoundError"})}catch(__react_docgen_typescript_loader_error){}const MaterialSearchPreview=({work,selectedMaterialType,isLoading,errorState})=>{var _materialForDisplay$e,_materialForDisplay$e2;const t=(0,utils_text.F)(),[materialForDisplay,setMaterialForDisplay]=(0,react.useState)(null);if((0,react.useEffect)((()=>{if(!work)return;if(!selectedMaterialType)return void setMaterialForDisplay(work.manifestations.bestRepresentation);const manifestation=(0,helper.xb)(work,selectedMaterialType);setMaterialForDisplay(manifestation)}),[work,selectedMaterialType]),isLoading)return react.createElement("div",{className:"material-search__preview"},react.createElement("div",{className:"material-search__preview-loading"},react.createElement(material_search_MaterialSearchLoading,{loadingText:t("materialSearchLoadingText")})));if(errorState===Errors_errorState.WorkError)return react.createElement(Errors_WorkNotFoundError,null);if(work&&errorState===Errors_errorState.MaterialTypeError)return react.createElement(Errors_MaterialTypeNotFoundError,{work});if(!work||!materialForDisplay)return react.createElement("div",{className:"material-search__preview"},react.createElement("div",{className:"material-search__preview-empty"},t("materialSearchNoMaterialSelectedText")));const author=(0,general.sP)((0,general.UV)(work.creators),t);return react.createElement("div",{className:"material-search__preview"},react.createElement("div",{className:"material-search__preview-material"},react.createElement(cover.Y,{ids:[materialForDisplay.pid],size:"large",displaySize:"small",animate:!0,alt:`Cover for ${materialForDisplay.titles.main}`,shadow:"small"}),react.createElement("div",null,react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewTitleText"),":"),react.createElement("span",{className:"material-search__preview-detail"},materialForDisplay.titles.main)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewAuthorText"),":"),react.createElement("span",{className:"material-search__preview-detail"},author)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewPublicationYearText"),":"),react.createElement("span",{className:"material-search__preview-detail"},null===(_materialForDisplay$e=materialForDisplay.edition)||void 0===_materialForDisplay$e||null===(_materialForDisplay$e2=_materialForDisplay$e.publicationYear)||void 0===_materialForDisplay$e2?void 0:_materialForDisplay$e2.display)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewSourceText"),":"),react.createElement("span",{className:"material-search__preview-detail"},materialForDisplay.source)),react.createElement("div",{className:"material-search__preview-item"},react.createElement("span",{className:"material-search__preview-term"},t("materialSearchPreviewWorkIdText"),":"),react.createElement("span",{className:"material-search__preview-detail"},work.workId)))))},material_search_MaterialSearchPreview=MaterialSearchPreview;try{MaterialSearchPreview.displayName="MaterialSearchPreview",MaterialSearchPreview.__docgenInfo={description:"",displayName:"MaterialSearchPreview",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work | null"}},selectedMaterialType:{defaultValue:null,description:"",name:"selectedMaterialType",required:!0,type:{name:"ManifestationMaterialType | null"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},errorState:{defaultValue:null,description:"",name:"errorState",required:!0,type:{name:"enum",value:[{value:'"NoError"'},{value:'"WorkError"'},{value:'"MaterialTypeError"'},{value:'"hiddenInputsNotFoundError"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearchPreview.tsx#MaterialSearchPreview"]={docgenInfo:MaterialSearchPreview.__docgenInfo,name:"MaterialSearchPreview",path:"src/apps/material-search/MaterialSearchPreview.tsx#MaterialSearchPreview"})}catch(__react_docgen_typescript_loader_error){}var graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const material_search_useGetMaterialListSearch=()=>{const[state,setState]=(0,react.useState)({searchInput:"",page:1}),[searchListData,setSearchListData]=(0,react.useState)([]),[hitCount,setHitCount]=(0,react.useState)(0),{searchInput,page}=state,queryVariables={q:{all:searchInput},offset:10*(page-1),limit:10},{data,isLoading}=(0,graphql.KG)(queryVariables);(0,react.useEffect)((()=>{var _data$search;null!=data&&null!==(_data$search=data.search)&&void 0!==_data$search&&_data$search.works&&(setSearchListData((prevData=>1===page?data.search.works:[...prevData,...data.search.works])),setHitCount(data.search.hitcount))}),[data,page]);return{searchListData,isLoading,searchInput,setSearchInput:(0,react.useCallback)((input=>{setState({searchInput:input,page:1})}),[]),loadMore:(0,react.useCallback)((()=>{setState((prevState=>({...prevState,page:prevState.page+1})))}),[]),hitCount}},material_search_useGetSelectedWork=()=>{const[selectedWorkId,setSelectedWorkId]=(0,react.useState)(""),[selectedMaterialType,setSelectedMaterialType]=(0,react.useState)(null),[errorState,setErrorState]=(0,react.useState)(Errors_errorState.NoError),{data,isLoading:isSelectedWorkLoading,refetch}=(0,graphql.RR)({wid:selectedWorkId},{enabled:!!selectedWorkId&&selectedWorkId.length>0,onSuccess:responseData=>{if(responseData.work){if(selectedMaterialType&&responseData.work){const work=responseData.work,availableMaterialTypes=work?(0,general.JB)(work.manifestations.all,!1):null;if(availableMaterialTypes&&!availableMaterialTypes.includes(selectedMaterialType))return void setErrorState(Errors_errorState.MaterialTypeError)}setErrorState(Errors_errorState.NoError)}else setErrorState(Errors_errorState.WorkError)}});(0,react.useEffect)((()=>{selectedWorkId&&refetch()}),[selectedWorkId,selectedMaterialType,refetch]);const work=(null==data?void 0:data.work)??null;return{work,availableMaterialTypes:work?(0,general.JB)(work.manifestations.all,!1):null,selectedWorkId,setSelectedMaterialType,isSelectedWorkLoading,setSelectedWorkId,selectedMaterialType,errorState}},useGetHiddenInputs=uniqueIdentifier=>{const[workIdElement,setWorkIdElement]=(0,react.useState)(null),[materialTypeElement,setMaterialTypeElement]=(0,react.useState)(null),[errorState,setErrorState]=(0,react.useState)(Errors_errorState.NoError);return(0,react.useEffect)((()=>{const workElement=document.querySelector(`[data-field-input-work-id="${uniqueIdentifier}"]`),materialElement=document.querySelector(`[data-field-input-material-type-id="${uniqueIdentifier}"]`);workElement?setWorkIdElement(workElement):(console.debug(`Could not find input for work ID with unique identifier: ${uniqueIdentifier}`),setErrorState(Errors_errorState.hiddenInputsNotFoundError)),materialElement?setMaterialTypeElement(materialElement):(console.debug(`Could not find input for material type with unique identifier: ${uniqueIdentifier}`),setErrorState(Errors_errorState.hiddenInputsNotFoundError)),workElement&&materialElement&&setErrorState(Errors_errorState.NoError)}),[uniqueIdentifier]),{workIdElement,materialTypeElement,errorState}},material_search_useGetHiddenInputs=useGetHiddenInputs;try{useGetHiddenInputs.displayName="useGetHiddenInputs",useGetHiddenInputs.__docgenInfo={description:"",displayName:"useGetHiddenInputs",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/useGetHiddenInputs.tsx#useGetHiddenInputs"]={docgenInfo:useGetHiddenInputs.__docgenInfo,name:"useGetHiddenInputs",path:"src/apps/material-search/useGetHiddenInputs.tsx#useGetHiddenInputs"})}catch(__react_docgen_typescript_loader_error){}const material_search_useUpdateFields=({updateSelectedWorkId,updateSelectedMaterialType,uniqueIdentifier})=>{const workIdRef=(0,react.useRef)(null),materialTypeRef=(0,react.useRef)(null);(0,react.useEffect)((()=>{workIdRef.current=document.querySelector(`[data-field-input-work-id="${uniqueIdentifier}"]`),materialTypeRef.current=document.querySelector(`[data-field-input-material-type-id="${uniqueIdentifier}"]`)}),[uniqueIdentifier]);const updateInputValue=(0,react.useCallback)(((inputElement,newValue)=>{if(inputElement){return inputElement.value=newValue,!0}return console.debug(`Could not find input element to update with ID: ${uniqueIdentifier}`),!1}),[uniqueIdentifier]);return{handleUpdateWorkId:(0,react.useCallback)((wid=>{const workIdUpdateSuccess=updateInputValue(workIdRef.current,`${wid}`),materialTypeUpdateSuccess=updateInputValue(materialTypeRef.current,"");workIdUpdateSuccess&&materialTypeUpdateSuccess&&(updateSelectedWorkId(wid),updateSelectedMaterialType(null))}),[updateInputValue,updateSelectedWorkId,updateSelectedMaterialType]),handleUpdateMaterialType:(0,react.useCallback)((newValue=>{updateInputValue(materialTypeRef.current,newValue)&&updateSelectedMaterialType(newValue)}),[updateInputValue,updateSelectedMaterialType])}},MaterialSearch=({uniqueIdentifier})=>{const{availableMaterialTypes,work,isSelectedWorkLoading,selectedWorkId,setSelectedWorkId,selectedMaterialType,setSelectedMaterialType,errorState}=material_search_useGetSelectedWork(),{searchInput,setSearchInput,searchListData,isLoading:isSearchResultsLoading,hitCount,loadMore}=material_search_useGetMaterialListSearch(),{handleUpdateWorkId,handleUpdateMaterialType}=material_search_useUpdateFields({updateSelectedWorkId:setSelectedWorkId,updateSelectedMaterialType:setSelectedMaterialType,uniqueIdentifier}),{workIdElement,materialTypeElement,errorState:hiddenInputErrorState}=material_search_useGetHiddenInputs(uniqueIdentifier);return(0,react.useEffect)((()=>{workIdElement&&workIdElement.value&&setSelectedWorkId(null==workIdElement?void 0:workIdElement.value),materialTypeElement&&materialTypeElement.value&&setSelectedMaterialType(null==materialTypeElement?void 0:materialTypeElement.value)}),[workIdElement,materialTypeElement,setSelectedWorkId,setSelectedMaterialType]),hiddenInputErrorState===Errors_errorState.hiddenInputsNotFoundError?react.createElement(Errors_HiddenInputsNotFoundError,null):react.createElement("div",{className:"material-search"},react.createElement(material_search_MaterialSearchInputs,{searchInput,setSearchInput,availableMaterialTypes,selectedMaterialType,handleUpdateMaterialType,work,uniqueIdentifier}),react.createElement(material_search_MaterialSearchPreview,{work,isLoading:isSelectedWorkLoading,selectedMaterialType,errorState}),react.createElement(material_search_MaterialSearchList,{data:searchListData,isLoading:isSearchResultsLoading,onWorkIdSelect:id=>handleUpdateWorkId(id),selectedWorkId,loadMore,hitCount}))},material_search_MaterialSearch=MaterialSearch;try{MaterialSearch.displayName="MaterialSearch",MaterialSearch.__docgenInfo={description:"",displayName:"MaterialSearch",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.tsx#MaterialSearch"]={docgenInfo:MaterialSearch.__docgenInfo,name:"MaterialSearch",path:"src/apps/material-search/MaterialSearch.tsx#MaterialSearch"})}catch(__react_docgen_typescript_loader_error){}const MaterialSearch_entry=(0,config.NV)((0,utils_url.nU)((0,utils_text.i)((({uniqueIdentifier})=>react.createElement(material_search_MaterialSearch,{uniqueIdentifier})))));try{MaterialSearchentry.displayName="MaterialSearchentry",MaterialSearchentry.__docgenInfo={description:"",displayName:"MaterialSearchentry",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.entry.tsx#MaterialSearchentry"]={docgenInfo:MaterialSearchentry.__docgenInfo,name:"MaterialSearchentry",path:"src/apps/material-search/MaterialSearch.entry.tsx#MaterialSearchentry"})}catch(__react_docgen_typescript_loader_error){}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;ereact.createElement("div",{className:"material-search"},react.createElement("span",null,"Input fields only shown in storybook. They are used to reflect how the hidden workId and materialType fields are updated."),react.createElement("div",{className:"material-search__inputs-container"},react.createElement("label",{className:"material-search__label",htmlFor:"material-search-input"},"Work id",react.createElement("input",{"data-field-input-work-id":uniqueIdentifier,type:"text",placeholder:"Enter search terms",className:"material-search__input",tabIndex:-1,defaultValue:defaultWorkId})),react.createElement("label",{className:"material-search__label",htmlFor:"material-type-selector"},"Material type",react.createElement("input",{"data-field-input-material-type-id":uniqueIdentifier,type:"text",className:"material-search__selector",tabIndex:-1,defaultValue:defaultMaterialType}))),react.createElement(MaterialSearch_entry,_extends({uniqueIdentifier},args))),MaterialSearch_dev={title:"Apps / Material Search",component:MaterialSearchHiddenInputs,argTypes:{uniqueIdentifier:{defaultValue:uniqueIdentifierValue,control:{type:"number"}},previouslySelectedWorkId:{defaultValue:"work-of:800010-katalog:99122475830405763",control:{type:"text"}},previouslySelectedMaterialType:{defaultValue:"lydbog (cd-mp3)",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialSearchSearchInputText:{defaultValue:"Search for material",control:{type:"text"}},materialSearchMaterialTypeSelectorText:{defaultValue:"Select material type",control:{type:"text"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:"Select material type",control:{type:"text"}},materialSearchNoMaterialSelectedText:{defaultValue:"No material selected",control:{type:"text"}},materialSearchPreviewTitle:{defaultValue:"Title",control:{type:"text"}},materialSearchPreviewAuthor:{defaultValue:"Author",control:{type:"text"}},materialSearchPreviewPublicationYear:{defaultValue:"Publication year",control:{type:"text"}},materialSearchPreviewSource:{defaultValue:"Source",control:{type:"text"}},materialSearchPreviewWorkId:{defaultValue:"Work ID",control:{type:"text"}},materialSearchLoadingText:{defaultValue:"Loading...",control:{type:"text"}},materialSearchAmountOfResultsText:{defaultValue:"Amount of hits",control:{type:"text"}},materialSearchNoResultsText:{defaultValue:"No results",control:{type:"text"}},materialSearchAriaButtonSelectWorkWithText:{defaultValue:"Select work with title @title",control:{type:"text"}},materialSearchSearchInputPlaceholderText:{defaultValue:"Enter search terms",control:{type:"text"}},materialSearchPreviewTitleText:{defaultValue:"Title",control:{type:"text"}},materialSearchPreviewAuthorText:{defaultValue:"Author",control:{type:"text"}},materialSearchPreviewPublicationYearText:{defaultValue:"Publication year",control:{type:"text"}},materialSearchPreviewSourceText:{defaultValue:"Source",control:{type:"text"}},materialSearchPreviewWorkIdText:{defaultValue:"Work ID",control:{type:"text"}},materialSearchErrorTitleText:{defaultValue:"Title",control:{type:"text"}},materialSearchErrorAuthorText:{defaultValue:"Author",control:{type:"text"}},materialSearchErrorLinkText:{defaultValue:"Link",control:{type:"text"}},materialSearchErrorHeaderText:{defaultValue:"This material needs to be updated.",control:{type:"text"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:"The currently selected type of the material is no longer available in the system. As a result of this, the link is likely broken. Use the title or link underneath to find and update the material and its type, or replace / delete it.",control:{type:"text"}},materialSearchErrorWorkNotFoundText:{defaultValue:"The material that was previously selected is no longer available in the system. Either delete this entry or search for a new material to replace it.",control:{type:"text"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:"Error retrieving saved data. Inputs not found.",control:{type:"text"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:"Something went wrong when trying to find the previously saved values. Please try again. If the problem persists, something could be wrong with the app.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A,...globalConfigArgs.A}},createStory=(defaultWorkId,defaultMaterialType)=>args=>react.createElement(MaterialSearchHiddenInputs,_extends({defaultWorkId,defaultMaterialType},args)),Default=createStory("",""),WithPreviouslySelectedValues=createStory("work-of:800010-katalog:99122475830405763","lydbog (cd-mp3)"),materialWithInvalidType=createStory("work-of:800010-katalog:99122475830405763","invalid-type"),materialWithInvalidWorkId=createStory("invalid-work-id","lydbog (cd-mp3)");try{Default.displayName="Default",Default.__docgenInfo={description:"",displayName:"Default",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#Default"]={docgenInfo:Default.__docgenInfo,name:"Default",path:"src/apps/material-search/MaterialSearch.dev.tsx#Default"})}catch(__react_docgen_typescript_loader_error){}try{WithPreviouslySelectedValues.displayName="WithPreviouslySelectedValues",WithPreviouslySelectedValues.__docgenInfo={description:"",displayName:"WithPreviouslySelectedValues",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#WithPreviouslySelectedValues"]={docgenInfo:WithPreviouslySelectedValues.__docgenInfo,name:"WithPreviouslySelectedValues",path:"src/apps/material-search/MaterialSearch.dev.tsx#WithPreviouslySelectedValues"})}catch(__react_docgen_typescript_loader_error){}try{materialWithInvalidType.displayName="materialWithInvalidType",materialWithInvalidType.__docgenInfo={description:"",displayName:"materialWithInvalidType",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidType"]={docgenInfo:materialWithInvalidType.__docgenInfo,name:"materialWithInvalidType",path:"src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidType"})}catch(__react_docgen_typescript_loader_error){}try{materialWithInvalidWorkId.displayName="materialWithInvalidWorkId",materialWithInvalidWorkId.__docgenInfo={description:"",displayName:"materialWithInvalidWorkId",props:{uniqueIdentifier:{defaultValue:null,description:"",name:"uniqueIdentifier",required:!0,type:{name:"string"}},materialSearchSearchInputText:{defaultValue:null,description:"",name:"materialSearchSearchInputText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorText",required:!0,type:{name:"string"}},materialSearchMaterialTypeSelectorNoneOptionText:{defaultValue:null,description:"",name:"materialSearchMaterialTypeSelectorNoneOptionText",required:!0,type:{name:"string"}},materialSearchNoMaterialSelectedText:{defaultValue:null,description:"",name:"materialSearchNoMaterialSelectedText",required:!0,type:{name:"string"}},materialSearchPreviewTitle:{defaultValue:null,description:"",name:"materialSearchPreviewTitle",required:!0,type:{name:"string"}},materialSearchPreviewAuthor:{defaultValue:null,description:"",name:"materialSearchPreviewAuthor",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYear:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYear",required:!0,type:{name:"string"}},materialSearchPreviewSource:{defaultValue:null,description:"",name:"materialSearchPreviewSource",required:!0,type:{name:"string"}},materialSearchPreviewWorkId:{defaultValue:null,description:"",name:"materialSearchPreviewWorkId",required:!0,type:{name:"string"}},materialSearchLoadingText:{defaultValue:null,description:"",name:"materialSearchLoadingText",required:!0,type:{name:"string"}},materialSearchAmountOfResultsText:{defaultValue:null,description:"",name:"materialSearchAmountOfResultsText",required:!0,type:{name:"string"}},materialSearchSearchInputPlaceholderText:{defaultValue:null,description:"",name:"materialSearchSearchInputPlaceholderText",required:!0,type:{name:"string"}},materialSearchPreviewTitleText:{defaultValue:null,description:"",name:"materialSearchPreviewTitleText",required:!0,type:{name:"string"}},materialSearchPreviewAuthorText:{defaultValue:null,description:"",name:"materialSearchPreviewAuthorText",required:!0,type:{name:"string"}},materialSearchPreviewPublicationYearText:{defaultValue:null,description:"",name:"materialSearchPreviewPublicationYearText",required:!0,type:{name:"string"}},materialSearchPreviewSourceText:{defaultValue:null,description:"",name:"materialSearchPreviewSourceText",required:!0,type:{name:"string"}},materialSearchPreviewWorkIdText:{defaultValue:null,description:"",name:"materialSearchPreviewWorkIdText",required:!0,type:{name:"string"}},materialSearchErrorTitleText:{defaultValue:null,description:"",name:"materialSearchErrorTitleText",required:!0,type:{name:"string"}},materialSearchErrorAuthorText:{defaultValue:null,description:"",name:"materialSearchErrorAuthorText",required:!0,type:{name:"string"}},materialSearchErrorLinkText:{defaultValue:null,description:"",name:"materialSearchErrorLinkText",required:!0,type:{name:"string"}},materialSearchErrorHeaderText:{defaultValue:null,description:"",name:"materialSearchErrorHeaderText",required:!0,type:{name:"string"}},materialSearchErrorMaterialTypeNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorMaterialTypeNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorWorkNotFoundText:{defaultValue:null,description:"",name:"materialSearchErrorWorkNotFoundText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundHeadingText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundHeadingText",required:!0,type:{name:"string"}},materialSearchErrorHiddenInputsNotFoundDescriptionText:{defaultValue:null,description:"",name:"materialSearchErrorHiddenInputsNotFoundDescriptionText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidWorkId"]={docgenInfo:materialWithInvalidWorkId.__docgenInfo,name:"materialWithInvalidWorkId",path:"src/apps/material-search/MaterialSearch.dev.tsx#materialWithInvalidWorkId"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/material/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Zh:()=>divideManifestationsByMaterialType,Xf:()=>filterManifestationsByType,AC:()=>getAllIdentifiers,QL:()=>getAvailability,SL:()=>getBestMaterialTypeForWork,We:()=>getBlacklistedQueryArgs,$0:()=>getDbcVerifiedSubjectsFirst,nW:()=>getDetailsListData,oj:()=>getFirstBookManifestation,LX:()=>getInfomediaIds,DH:()=>getManifestationAudience,x4:()=>getManifestationAuthors,xb:()=>getManifestationBasedOnType,v9:()=>getManifestationContributors,jC:()=>getManifestationEdition,f$:()=>getManifestationGenreAndForm,L_:()=>getManifestationIsbn,PG:()=>getManifestationLanguageIsoCode,gG:()=>getManifestationLanguages,TU:()=>getManifestationMaterialTypes,KA:()=>getManifestationNotes,n5:()=>getManifestationNumberOfPages,ub:()=>getManifestationOriginalTitle,mI:()=>getManifestationPhysicalDescription,Zs:()=>getManifestationPublisher,Cb:()=>getManifestationSource,zi:()=>getManifestationsOrderByTypeAndYear,w2:()=>getNumberedSeries,Rr:()=>getTotalHoldings,_i:()=>getTotalReservations,d8:()=>getUniqueMovies,XX:()=>isAnyManifestationAvailableOnBranch,E1:()=>isParallelReservation,bE:()=>reservationModalId,Uc:()=>totalAvailableMaterials,CL:()=>totalBranchesHaveMaterial,us:()=>useGetHoldings});var uniqBy=__webpack_require__("./node_modules/lodash/uniqBy.js"),uniqBy_default=__webpack_require__.n(uniqBy),uniq=__webpack_require__("./node_modules/lodash/uniq.js"),uniq_default=__webpack_require__.n(uniq),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),first=__webpack_require__("./node_modules/lodash/first.js"),first_default=__webpack_require__.n(first),compact=__webpack_require__("./node_modules/lodash/compact.js"),compact_default=__webpack_require__.n(compact),MaterialDetailsList=__webpack_require__("./src/components/material/MaterialDetailsList.tsx"),helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const getManifestationsOrderByTypeAndYear=manifestations=>{const orderedByYear=(0,general.Sy)(manifestations),materialsMappedBytype=groupBy_default()(orderedByYear,(m=>{var _m$materialTypes$;return(null==m||null===(_m$materialTypes$=m.materialTypes[0])||void 0===_m$materialTypes$?void 0:_m$materialTypes$.materialTypeSpecific.display)??"unknown"}));return Object.keys(materialsMappedBytype).sort().reduce(((acc,key)=>[...acc,...materialsMappedBytype[key]]),[])},filterManifestationsByType=(type,manifestations)=>manifestations.filter((item=>(0,general.VZ)([item])===type)),getManifestationPlayingTime=manifestation=>{var _manifestation$physic,_manifestation$physic2;return(null===(_manifestation$physic=manifestation.physicalDescriptions)||void 0===_manifestation$physic||null===(_manifestation$physic2=_manifestation$physic[0])||void 0===_manifestation$physic2?void 0:_manifestation$physic2.playingTime)??""},getManifestationEdition=manifestation=>{var _manifestation$editio;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary)??""},getManifestationGenreAndForm=manifestation=>manifestation.genreAndForm.join(" / ")??"",getManifestationPublisher=manifestation=>manifestation.publisher.join(" / ")??"",getManifestationMaterialTypes=manifestation=>{var _manifestation$materi,_manifestation$materi2;return(null===(_manifestation$materi=manifestation.materialTypes)||void 0===_manifestation$materi||null===(_manifestation$materi2=_manifestation$materi[0].materialTypeSpecific)||void 0===_manifestation$materi2?void 0:_manifestation$materi2.display)??""},getManifestationNumberOfPages=manifestation=>{var _manifestation$physic3,_manifestation$physic4,_manifestation$physic5;return null!==(_manifestation$physic3=manifestation.physicalDescriptions)&&void 0!==_manifestation$physic3&&null!==(_manifestation$physic4=_manifestation$physic3[0])&&void 0!==_manifestation$physic4&&_manifestation$physic4.numberOfPages?String(null===(_manifestation$physic5=manifestation.physicalDescriptions)||void 0===_manifestation$physic5?void 0:_manifestation$physic5[0].numberOfPages):""},getManifestationAudience=(manifestation,t)=>{var _manifestation$audien,_manifestation$audien2,_manifestation$audien3;const generalAudience=(null===(_manifestation$audien=manifestation.audience)||void 0===_manifestation$audien?void 0:_manifestation$audien.generalAudience[0])??"",agesDisplay=(null===(_manifestation$audien2=manifestation.audience)||void 0===_manifestation$audien2||null===(_manifestation$audien3=_manifestation$audien2.ages[0])||void 0===_manifestation$audien3?void 0:_manifestation$audien3.display)??"",formattedAges=agesDisplay?t("detailsListAgeRangeText",{placeholders:{"@ageRange":agesDisplay}}):"";return generalAudience&&formattedAges?`${generalAudience}, ${formattedAges}`:generalAudience||formattedAges},getManifestationIsbn=manifestation=>{var _manifestation$identi,_manifestation$identi2;return(null===(_manifestation$identi=manifestation.identifiers)||void 0===_manifestation$identi||null===(_manifestation$identi2=_manifestation$identi[0])||void 0===_manifestation$identi2?void 0:_manifestation$identi2.value)??""},getManifestationSource=manifestation=>manifestation.source??"",getManifestationLanguages=manifestation=>{var _languages$notes,_languages$main;const{languages}=manifestation;if(null!=languages&&null!==(_languages$notes=languages.notes)&&void 0!==_languages$notes&&_languages$notes.length)return languages.notes.join(", ");return(null==languages||null===(_languages$main=languages.main)||void 0===_languages$main?void 0:_languages$main.map((language=>language.display)).join(", "))??""},getManifestationLanguageIsoCode=manifestations=>{var _head2;const mainLanguages=manifestations.map((({languages})=>languages)).flatMap((language=>null==language?void 0:language.main)),uniqueLanguagesWithIsoCode=uniqBy_default()(mainLanguages,"isoCode"),uniqIsoCode=1===uniqueLanguagesWithIsoCode.length&&(null===(_head2=head_default()(uniqueLanguagesWithIsoCode))||void 0===_head2?void 0:_head2.isoCode);if(uniqIsoCode)return uniqIsoCode},getManifestationOriginalTitle=manifestation=>{var _manifestation$titles,_manifestation$titles2;return(null===(_manifestation$titles=manifestation.titles)||void 0===_manifestation$titles||null===(_manifestation$titles2=_manifestation$titles.original)||void 0===_manifestation$titles2?void 0:_manifestation$titles2[0])??""},getManifestationContributors=manifestation=>manifestation.contributors.map((contributor=>{if(contributor.roles.length>0){const roleNames=contributor.roles.map((role=>role.function.singular)).join(", ");return`${contributor.display} (${roleNames})`}return contributor.display})).join(" / ")??"",getManifestationAuthors=manifestation=>(0,general.UV)(manifestation.creators).join(", ")??"",getManifestationNotes=manifestation=>{var _manifestation$notes,_manifestation$notes$,_manifestation$notes$2;return(null===(_manifestation$notes=manifestation.notes)||void 0===_manifestation$notes||null===(_manifestation$notes$=_manifestation$notes[0])||void 0===_manifestation$notes$||null===(_manifestation$notes$2=_manifestation$notes$.display)||void 0===_manifestation$notes$2?void 0:_manifestation$notes$2.join(", "))??""},getManifestationPhysicalDescription=manifestation=>{var _manifestation$physic6,_manifestation$physic7;return(null===(_manifestation$physic6=manifestation.physicalDescriptions)||void 0===_manifestation$physic6||null===(_manifestation$physic7=_manifestation$physic6[0])||void 0===_manifestation$physic7?void 0:_manifestation$physic7.summary)??""},getManifestationHostPublication=manifestation=>{var _manifestation$hostPu;return(null===(_manifestation$hostPu=manifestation.hostPublication)||void 0===_manifestation$hostPu?void 0:_manifestation$hostPu.summary)??""},getManifestationParts=manifestation=>{var _manifestation$manife,_manifestation$manife2;return(null===(_manifestation$manife=manifestation.manifestationParts)||void 0===_manifestation$manife||null===(_manifestation$manife2=_manifestation$manife.parts)||void 0===_manifestation$manife2?void 0:_manifestation$manife2.map((item=>item.title)))||""},getDetailsListData=({manifestation,work,t})=>{const workFirstEditionYear=(work=>{var _work$workYear;return null!==(_work$workYear=work.workYear)&&void 0!==_work$workYear&&_work$workYear.year?String(work.workYear.year):""})(work),fallBackManifestation=((work,type)=>work.manifestations[type])(work,"bestRepresentation");return[{label:t("detailsListLanguageText"),value:getManifestationLanguages(manifestation??fallBackManifestation)},{label:t("detailsListPlayTimeText"),value:getManifestationPlayingTime(manifestation??fallBackManifestation)},{label:t("detailsListEditionText"),value:getManifestationEdition(manifestation??fallBackManifestation)},{label:t("detailsListGenreAndFormText"),value:getManifestationGenreAndForm(manifestation??fallBackManifestation)},{label:t("detailsListOriginalTitleText"),value:getManifestationOriginalTitle(manifestation??fallBackManifestation)},{label:t("detailsListPublisherText"),value:getManifestationPublisher(manifestation??fallBackManifestation)},{label:t("detailsListFirstEditionYearText"),value:workFirstEditionYear},{label:t("detailsListTypeText"),value:getManifestationMaterialTypes(manifestation??fallBackManifestation)},{label:t("detailsListContributorsText"),value:getManifestationContributors(manifestation??fallBackManifestation)},{label:t("detailsListScopeText"),value:getManifestationNumberOfPages(manifestation??fallBackManifestation)},{label:t("detailsListAudienceText"),value:getManifestationAudience(manifestation??fallBackManifestation,t)},{label:t("detailsListPhysicalDescriptionText"),value:getManifestationPhysicalDescription(manifestation??fallBackManifestation)},{label:t("detailsListHostPublicationText"),value:getManifestationHostPublication(manifestation??fallBackManifestation)},{label:t("detailsListPartsText"),value:getManifestationParts(manifestation??fallBackManifestation),type:MaterialDetailsList.w.List}]},getTotalHoldings=holdings=>holdings.reduce(((acc,curr)=>acc+curr.holdings.reduce(((accumulator,current)=>accumulator+current.materials.length),0)),0),getTotalReservations=holdings=>holdings.reduce(((acc,curr)=>acc+curr.reservations),0),totalAvailableMaterials=materials=>materials.reduce(((acc,curr)=>curr.available?acc+1:acc),0),isAnyManifestationAvailableOnBranch=libraryBranches=>libraryBranches.some((libraryBranch=>libraryBranch.holding.materials.some((material=>material.available)))),totalBranchesHaveMaterial=manifestationHoldings=>manifestationHoldings.filter((branchManifestationHoldings=>isAnyManifestationAvailableOnBranch(branchManifestationHoldings))).length,getInfomediaIds=manifestations=>{const infomediaIds=manifestations.map((manifestation=>manifestation.access.map((currentAccess=>"InfomediaService"===currentAccess.__typename?currentAccess.id:null)))).flat();return compact_default()(infomediaIds)},divideManifestationsByMaterialType=manifestations=>manifestations.reduce(((result,manifestation)=>{var _manifestation$materi3;if(!manifestation.materialTypes.length||null===(_manifestation$materi3=manifestation.materialTypes[0].materialTypeSpecific)||void 0===_manifestation$materi3||!_manifestation$materi3.display)return result;const type=manifestation.materialTypes[0].materialTypeSpecific.display;return{...result,[type]:[...result[type]??[],manifestation]}}),{}),getAllIdentifiers=manifestations=>manifestations.map((manifestation=>manifestation.identifiers.map((identifier=>identifier.value)))).flat(),getFirstBookManifestation=manifestations=>{const dividedManifestations=divideManifestationsByMaterialType(manifestations);return first_default()(dividedManifestations[material_type.sN.book])??null},isABook=manifestations=>manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>materialType.materialTypeSpecific.display.toLowerCase()===material_type.sN.book)))),getBestMaterialTypeForManifestation=manifestation=>isABook([manifestation])?material_type.sN.book:manifestation.materialTypes[0].materialTypeSpecific.display,getBestMaterialTypeForWork=work=>{return work.manifestations.bestRepresentation?getBestMaterialTypeForManifestation(work.manifestations.bestRepresentation):work.manifestations.latest?getBestMaterialTypeForManifestation(work.manifestations.latest):work.manifestations.first?getBestMaterialTypeForManifestation(work.manifestations.first):isABook(work.manifestations.all)?material_type.sN.book:(manifestations=work.manifestations.all,manifestations.filter((manifestation=>manifestation.materialTypes.length>0)))[0].materialTypes[0].materialTypeSpecific.display;var manifestations},reservationModalId=faustIds=>(0,modal_helpers.Q0)("reservation-modal",faustIds.sort()),getNumberedSeries=series=>series.filter((seriesEntry=>{var _seriesEntry$numberIn;return null===(_seriesEntry$numberIn=seriesEntry.numberInSeries)||void 0===_seriesEntry$numberIn?void 0:_seriesEntry$numberIn.number})),getUniqueMovies=relations=>{const movies=relations.hasAdaptation.filter((item=>item.ownerWork.workTypes.includes(graphql.CY.Movie)));return uniqBy_default()(movies,(item=>item.ownerWork.workId))},getDbcVerifiedSubjectsFirst=subjects=>uniq_default()([...subjects.dbcVerified.map((item=>item.display)),...subjects.all.map((item=>item.display))]),isParallelReservation=manifestations=>manifestations.length>1&&(0,helper.D7)(graphql.cs.Physical,manifestations)&&!(0,helper.BG)(manifestations),getBlacklistedQueryArgs=(faustIds,config,blacklist)=>{const configKey={availability:"blacklistedAvailabilityBranchesConfig",pickup:"blacklistedPickupBranchesConfig",both:"blacklistedAvailabilityBranchesConfig"};let blacklistBranches=config(configKey[blacklist],{transformer:"stringToArray"});if("both"===blacklist){const additionalBlacklistBranches=config(configKey.pickup,{transformer:"stringToArray"});blacklistBranches=blacklistBranches.concat(additionalBlacklistBranches)}return{recordid:faustIds,...blacklistBranches?{exclude:blacklistBranches}:{}}},getAvailability=async({faustIds,config})=>(0,fbs.PC)(getBlacklistedQueryArgs(faustIds,config,"availability")),useGetHoldings=({faustIds,config,useAvailabilityBlacklist=!1,options})=>{const blacklistedBranches=useAvailabilityBlacklist?"both":"pickup",{data,isLoading,isError}=(0,fbs.pF)(getBlacklistedQueryArgs(faustIds,config,blacklistedBranches),options);return{data,isLoading,isError}},getManifestationBasedOnType=(work,materialType)=>{const{bestRepresentation,all}=work.manifestations;if(materialType===getManifestationMaterialTypes(bestRepresentation))return bestRepresentation;const sortedManifestations=getManifestationsOrderByTypeAndYear(all),filteredAndSortedManifestations=filterManifestationsByType(materialType,sortedManifestations),newestFilteredAndSortedManifestation=first_default()(filteredAndSortedManifestations);return newestFilteredAndSortedManifestation||bestRepresentation}},"./src/apps/material/material.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Digital:()=>Digital,Dinosaurierfedern:()=>Dinosaurierfedern,EBogBlaTitle:()=>EBogBlaTitle,EBogPrinsenHarry:()=>EBogPrinsenHarry,HarryPotter:()=>HarryPotter,Infomedia:()=>Infomedia,InstantLoan:()=>material_dev_InstantLoan,LangePeter:()=>LangePeter,Periodical:()=>Periodical,TurenGårTilRom:()=>TurenGårTilRom,Underverden:()=>Underverden,default:()=>material_dev,digitalArticle:()=>digitalArticle,globalMaterial:()=>globalMaterial,inLargeSameSeriesAndIrregularFaustId:()=>inLargeSameSeriesAndIrregularFaustId,onlyOneEdition:()=>onlyOneEdition,overbygningsMatriale:()=>overbygningsMatriale});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),Create=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Create.svg"),Create_default=__webpack_require__.n(Create),Receipt=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Receipt.svg"),Receipt_default=__webpack_require__.n(Receipt),Various=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Various.svg"),Various_default=__webpack_require__.n(Various),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx"),TextInput=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),ReservationForm=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx");const DigitalModalBody=({userEmail,handleSubmit,isLoading})=>{const t=(0,utils_text.F)(),[email,setEmail]=(0,react.useState)(userEmail);return react.createElement(ReservationForm.A,{cyData:"order-digital",title:t("orderDigitalCopyTitleText"),description:[t("orderDigitalCopyDescriptionText")],onSubmit:()=>{handleSubmit(email)},buttonLabel:t(isLoading?"orderDigitalCopyButtonLoadingText":"orderDigitalCopyButtonText"),disabledButton:isLoading},react.createElement(TextInput.A,{type:"email",label:t("orderDigitalCopyEmailLabelText"),id:"email-order-digital-copy",value:email,onChange:setEmail}))},digital_modal_DigitalModalBody=DigitalModalBody;try{DigitalModalBody.displayName="DigitalModalBody",DigitalModalBody.__docgenInfo={description:"",displayName:"DigitalModalBody",props:{userEmail:{defaultValue:null,description:"",name:"userEmail",required:!0,type:{name:"string"}},handleSubmit:{defaultValue:null,description:"",name:"handleSubmit",required:!0,type:{name:"(email: string) => void"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"]={docgenInfo:DigitalModalBody.__docgenInfo,name:"DigitalModalBody",path:"src/components/material/digital-modal/DigitalModalBody.tsx#DigitalModalBody"})}catch(__react_docgen_typescript_loader_error){}const DigitalModalFeedback=({modalId,feedbackMessage})=>{const t=(0,utils_text.F)(),{close}=(0,modal.X)();return react.createElement(ReservationForm.A,{cyData:"order-digital-feedback",title:t("orderDigitalCopyFeedbackTitleText"),description:[feedbackMessage??""],onSubmit:()=>close(modalId),buttonLabel:t("orderDigitalCopyFeedbackButtonText")})},digital_modal_DigitalModalFeedback=DigitalModalFeedback;try{DigitalModalFeedback.displayName="DigitalModalFeedback",DigitalModalFeedback.__docgenInfo={description:"",displayName:"DigitalModalFeedback",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},feedbackMessage:{defaultValue:null,description:"",name:"feedbackMessage",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"]={docgenInfo:DigitalModalFeedback.__docgenInfo,name:"DigitalModalFeedback",path:"src/components/material/digital-modal/DigitalModalFeedback.tsx#DigitalModalFeedback"})}catch(__react_docgen_typescript_loader_error){}const createDigitalModalId=id=>`digital-modal-${id}`;var user=__webpack_require__("./src/core/utils/helpers/user.ts"),usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const DigitalModal=({pid,workId})=>{const modalId=createDigitalModalId(pid),t=(0,utils_text.F)(),[userEmail,setUserEmail]=(0,react.useState)(null),{track}=(0,useStatistics.B)(),{mutate:articleOrder,isLoading:articleOrderLoading,data:articleResponse}=(0,graphql.Dp)(),responseMessage=((articleResponse,t)=>articleResponse?Object.values(graphql.nm).reduce(((acc,current)=>{return{...acc,[current]:t(`orderDigitalCopyFeedback${string=current,string.toLowerCase().split("_").map((word=>word.charAt(0).toUpperCase()+word.slice(1))).join("")}Text`)};var string}),{})[articleResponse.elba.placeCopyRequest.status]:null)(articleResponse,t),{data:patronData}=(0,usePatronData.I)();return(0,react.useEffect)((()=>{var _patronData$patron;patronData&&(null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.emailAddress?setUserEmail(patronData.patron.emailAddress):setUserEmail(""))}),[patronData]),(0,user.ok)()?null:react.createElement(modal.A,{modalId,screenReaderModalDescriptionText:t("orderDigitalCopyModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("orderDigitalCopyModalCloseModalAriaLabelText")},responseMessage?react.createElement(digital_modal_DigitalModalFeedback,{modalId,feedbackMessage:responseMessage}):null!==userEmail&&react.createElement(digital_modal_DigitalModalBody,{userEmail,handleSubmit:email=>{articleOrder({input:{pid,userMail:email}},{onSuccess:()=>{track("click",{id:statistics.o.reservation.id,name:statistics.o.reservation.name,trackedData:workId})}})},isLoading:articleOrderLoading}))},digital_modal_DigitalModal=DigitalModal;try{DigitalModal.displayName="DigitalModal",DigitalModal.__docgenInfo={description:"",displayName:"DigitalModal",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"]={docgenInfo:DigitalModal.__docgenInfo,name:"DigitalModal",path:"src/components/material/digital-modal/DigitalModal.tsx#DigitalModal"})}catch(__react_docgen_typescript_loader_error){}var infomedia_logo=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/infomedia-logo.svg"),infomedia_logo_default=__webpack_require__.n(infomedia_logo);const InfomediaModalBody=({headline,text})=>react.createElement("article",{className:"infomedia-article"},react.createElement("img",{className:"infomedia-logo",src:infomedia_logo_default(),alt:""}),react.createElement("h2",null,headline),react.createElement("div",{dangerouslySetInnerHTML:{__html:text}})),infomedia_InfomediaModalBody=InfomediaModalBody;try{InfomediaModalBody.displayName="InfomediaModalBody",InfomediaModalBody.__docgenInfo={description:"",displayName:"InfomediaModalBody",props:{headline:{defaultValue:null,description:"",name:"headline",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"]={docgenInfo:InfomediaModalBody.__docgenInfo,name:"InfomediaModalBody",path:"src/components/material/infomedia/InfomediaModalBody.tsx#InfomediaModalBody"})}catch(__react_docgen_typescript_loader_error){}const InfomediaSkeleton=()=>react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line"})),infomedia_InfomediaSkeleton=InfomediaSkeleton;try{InfomediaSkeleton.displayName="InfomediaSkeleton",InfomediaSkeleton.__docgenInfo={description:"",displayName:"InfomediaSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"]={docgenInfo:InfomediaSkeleton.__docgenInfo,name:"InfomediaSkeleton",path:"src/components/material/infomedia/InfomediaSkeleton.tsx#InfomediaSkeleton"})}catch(__react_docgen_typescript_loader_error){}const infomediaModalId=pid=>`infomedia-modal-${pid}`,InfomediaModal=({selectedManifestations,infoMediaId})=>{const t=(0,utils_text.F)(),[shouldFetchData,setShouldFetchData]=(0,react.useState)(!1),[infomediaData,setInfomediaData]=(0,react.useState)(null),{data:patronData,isLoading:isLoadingPatron}=(0,usePatronData.I)();(0,react.useEffect)((()=>{var _patronData$patron;void 0!==(null==patronData||null===(_patronData$patron=patronData.patron)||void 0===_patronData$patron?void 0:_patronData$patron.resident)&&setShouldFetchData(patronData.patron.resident)}),[patronData]);const{data,error,isLoading:isLoadingInfomedia}=(0,graphql.ET)({id:infoMediaId},{enabled:shouldFetchData,onSuccess:response=>{var _response$infomedia,_response$infomedia$a,_response$infomedia2,_response$infomedia2$;const infomedia={headline:null==response||null===(_response$infomedia=response.infomedia)||void 0===_response$infomedia||null===(_response$infomedia$a=_response$infomedia.article)||void 0===_response$infomedia$a?void 0:_response$infomedia$a.headLine,text:null==response||null===(_response$infomedia2=response.infomedia)||void 0===_response$infomedia2||null===(_response$infomedia2$=_response$infomedia2.article)||void 0===_response$infomedia2$?void 0:_response$infomedia2$.text};setInfomediaData(infomedia)}});return!data||error?null:react.createElement(modal.A,{modalId:infomediaModalId(selectedManifestations[0].pid),screenReaderModalDescriptionText:t("infomediaModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("infomediaModalCloseModalAriaLabelText"),dataCy:"infomedia-modal"},isLoadingPatron||isLoadingInfomedia&&react.createElement(infomedia_InfomediaSkeleton,null),(null==infomediaData?void 0:infomediaData.headline)&&(null==infomediaData?void 0:infomediaData.text)&&react.createElement(infomedia_InfomediaModalBody,{headline:infomediaData.headline,text:infomediaData.text}))},infomedia_InfomediaModal=InfomediaModal;try{infomediaModalId.displayName="infomediaModalId",infomediaModalId.__docgenInfo={description:"",displayName:"infomediaModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"]={docgenInfo:infomediaModalId.__docgenInfo,name:"infomediaModalId",path:"src/components/material/infomedia/InfomediaModal.tsx#infomediaModalId"})}catch(__react_docgen_typescript_loader_error){}try{InfomediaModal.displayName="InfomediaModal",InfomediaModal.__docgenInfo={description:"",displayName:"InfomediaModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},infoMediaId:{defaultValue:null,description:"",name:"infoMediaId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"]={docgenInfo:InfomediaModal.__docgenInfo,name:"InfomediaModal",path:"src/components/material/infomedia/InfomediaModal.tsx#InfomediaModal"})}catch(__react_docgen_typescript_loader_error){}var material_buttons_helper=__webpack_require__("./src/components/material/material-buttons/helper.ts"),material_helper=__webpack_require__("./src/apps/material/helper.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts");const MaterialDescription=({work})=>{const{itemRef,hasBeenVisible:showItem}=(0,lazy_load.H)(),t=(0,utils_text.F)(),u=(0,url.Ik)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{fictionNonfiction,series,subjects,seriesMembers,relations,dk5MainEntry}=work,isFiction=(0,general.G)(work),seriesList=(0,material_helper.w2)(series),seriesMembersList=seriesMembers.map((item=>({url:(0,helpers_url.Qj)(materialUrl,item.workId),term:item.titles.main[0]}))),subjectsList=(0,material_helper.$0)(subjects).map((item=>({url:(0,helpers_url.zy)(searchUrl,item),term:item}))),filmAdaptationsList=(0,material_helper.d8)(relations).map((item=>({url:(0,helpers_url.Qj)(materialUrl,item.ownerWork.workId),term:item.ownerWork.titles.main[0]}))),fictionNonfictionList=fictionNonfiction?[{url:(0,helpers_url.zy)(searchUrl,fictionNonfiction.display),term:fictionNonfiction.display}]:[];return react.createElement("section",{ref:itemRef,className:"material-description","data-cy":"material-description"},showItem&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 pb-24"},t("descriptionHeadlineText")),work.abstract&&react.createElement("p",{className:"text-body-large material-description__content"},work.abstract[0]),react.createElement("div",{className:"material-description__links mt-32"},!isFiction&&dk5MainEntry&&react.createElement(HorizontalTermLine.A,{title:t("subjectNumberText"),linkList:[{url:(0,helpers_url.zy)(searchUrl,dk5MainEntry.display),term:dk5MainEntry.display}]}),seriesList.map(((item,i)=>{var _item$numberInSeries;return react.createElement(HorizontalTermLine.A,{title:`${t("numberDescriptionText")} ${null===(_item$numberInSeries=item.numberInSeries)||void 0===_item$numberInSeries?void 0:_item$numberInSeries.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.zy)(searchUrl,item.title),term:item.title}],dataCy:`material-description-series-${i}`})})),react.createElement(HorizontalTermLine.A,{title:t("inSameSeriesText"),linkList:seriesMembersList,dataCy:"material-description-series-members"}),react.createElement(HorizontalTermLine.A,{title:t("identifierText"),linkList:subjectsList,dataCy:"material-description-identifier"}),react.createElement(HorizontalTermLine.A,{title:t("fictionNonfictionText"),linkList:fictionNonfictionList,dataCy:"material-description-fiction-nonfiction"}),react.createElement(HorizontalTermLine.A,{title:t("filmAdaptationsText"),linkList:filmAdaptationsList,dataCy:"material-description-film-adaptations"}))))},material_MaterialDescription=MaterialDescription;try{MaterialDescription.displayName="MaterialDescription",MaterialDescription.__docgenInfo={description:"",displayName:"MaterialDescription",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDescription.tsx#MaterialDescription"]={docgenInfo:MaterialDescription.__docgenInfo,name:"MaterialDescription",path:"src/components/material/MaterialDescription.tsx#MaterialDescription"})}catch(__react_docgen_typescript_loader_error){}var MaterialDetailsList=__webpack_require__("./src/components/material/MaterialDetailsList.tsx"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),cover=__webpack_require__("./src/components/cover/cover.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const MaterialAvailabilityTextParagraph=({children})=>react.createElement("p",{className:"mt-16 text-small-caption"},children),generic_MaterialAvailabilityTextParagraph=MaterialAvailabilityTextParagraph;try{MaterialAvailabilityTextParagraph.displayName="MaterialAvailabilityTextParagraph",MaterialAvailabilityTextParagraph.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextParagraph",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"]={docgenInfo:MaterialAvailabilityTextParagraph.__docgenInfo,name:"MaterialAvailabilityTextParagraph",path:"src/components/material/MaterialAvailabilityText/generic/MaterialAvailabilityTextParagraph.tsx#MaterialAvailabilityTextParagraph"})}catch(__react_docgen_typescript_loader_error){}var material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const MaterialAvailabilityTextOnline=({isbns,materialType})=>{var _loansData$userData,_loansData$userData2,_productsData$product;const t=(0,utils_text.F)(),{data:productsData}=(0,publizon.wK)(isbns[0]),{data:libraryProfileData}=(0,publizon.PF)(),{data:loansData}=(0,publizon.VM)();if(!libraryProfileData||!loansData||!productsData)return null;const totalEbookLoans=null==loansData||null===(_loansData$userData=loansData.userData)||void 0===_loansData$userData?void 0:_loansData$userData.totalEbookLoans,totalAudioLoans=null==loansData||null===(_loansData$userData2=loansData.userData)||void 0===_loansData$userData2?void 0:_loansData$userData2.totalAudioLoans,{maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioLoansPerBorrower}=libraryProfileData,availabilityTextMap={[material_type.sN.ebook]:{text:"onlineLimitMonthEbookInfoText",count:totalEbookLoans,limit:maxConcurrentEbookLoansPerBorrower},[material_type.sN.audioBook]:{text:"onlineLimitMonthAudiobookInfoText",count:totalAudioLoans,limit:maxConcurrentAudioLoansPerBorrower},materialIsIncluded:{text:"materialIsIncludedText"}},availabilityText=(({type,map,t})=>{if(!map||!map[type])return null;const{text,count,limit}=map[type];return void 0===count&&void 0===limit&&text?t(text):void 0!==count&&void 0!==limit&&void 0!==text?t(text,{placeholders:{"@count":count,"@limit":limit}}):null})({type:null!==(_productsData$product=productsData.product)&&void 0!==_productsData$product&&_productsData$product.costFree?"materialIsIncluded":materialType,map:availabilityTextMap,t});return react.createElement(generic_MaterialAvailabilityTextParagraph,null,availabilityText)},online_MaterialAvailabilityTextOnline=MaterialAvailabilityTextOnline;try{MaterialAvailabilityTextOnline.displayName="MaterialAvailabilityTextOnline",MaterialAvailabilityTextOnline.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextOnline",props:{isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"enum",value:[{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"]={docgenInfo:MaterialAvailabilityTextOnline.__docgenInfo,name:"MaterialAvailabilityTextOnline",path:"src/components/material/MaterialAvailabilityText/online/MaterialAvailabilityTextOnline.tsx#MaterialAvailabilityTextOnline"})}catch(__react_docgen_typescript_loader_error){}const StockAndReservationInfo=({stockCount,reservationCount,numberInQueue})=>{const t=(0,utils_text.F)(),materialsInStockInfoText=t("materialsInStockInfoText",{count:stockCount,placeholders:{"@count":stockCount}}),materialReservationInfoText=t("materialReservationInfoText",{count:reservationCount,placeholders:{"@count":reservationCount||0}}),numberInQueueText=!!numberInQueue&&t("numberInQueueText",{placeholders:{"@number":numberInQueue}});return react.createElement(react.Fragment,null,numberInQueueText&&`${numberInQueueText} `,materialsInStockInfoText&&`${materialsInStockInfoText} `,!!reservationCount&&materialReservationInfoText)},material_StockAndReservationInfo=StockAndReservationInfo;try{StockAndReservationInfo.displayName="StockAndReservationInfo",StockAndReservationInfo.__docgenInfo={description:"",displayName:"StockAndReservationInfo",props:{stockCount:{defaultValue:null,description:"",name:"stockCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!1,type:{name:"number | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"]={docgenInfo:StockAndReservationInfo.__docgenInfo,name:"StockAndReservationInfo",path:"src/components/material/StockAndReservationInfo.tsx#StockAndReservationInfo"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityTextPhysical=({pids})=>{const config=(0,utils_config.UK)(),faustIds=(0,general.OH)(pids),{data,isLoading,isError}=(0,material_helper.us)({faustIds,config});if(isLoading||isError||!data)return null;const holdings=(0,material_helper.Rr)(data),reservations=(0,material_helper._i)(data);return react.createElement(generic_MaterialAvailabilityTextParagraph,null,react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations}))},physical_MaterialAvailabilityTextPhysical=MaterialAvailabilityTextPhysical;try{MaterialAvailabilityTextPhysical.displayName="MaterialAvailabilityTextPhysical",MaterialAvailabilityTextPhysical.__docgenInfo={description:"",displayName:"MaterialAvailabilityTextPhysical",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${string}`[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"]={docgenInfo:MaterialAvailabilityTextPhysical.__docgenInfo,name:"MaterialAvailabilityTextPhysical",path:"src/components/material/MaterialAvailabilityText/physical/MaterialAvailabilityTextPhysical.tsx#MaterialAvailabilityTextPhysical"})}catch(__react_docgen_typescript_loader_error){}const useReservableFromAnotherLibrary=manifestations=>{const config=(0,utils_config.UK)(),{data:holdingsData}=(0,material_helper.us)({faustIds:(0,general.bn)(manifestations),useAvailabilityBlacklist:!0,config});if(null!=holdingsData&&holdingsData.some((({reservable})=>!0===reservable)))return{reservablePidsFromAnotherLibrary:[],materialIsReservableFromAnotherLibrary:!1};const reservablePidsFromAnotherLibrary=manifestations.filter((({catalogueCodes})=>null==catalogueCodes?void 0:catalogueCodes.otherCatalogues.some((code=>code.startsWith("OVE"))))).map((({pid})=>pid));return{reservablePidsFromAnotherLibrary,materialIsReservableFromAnotherLibrary:Boolean(reservablePidsFromAnotherLibrary.length)}},utils_useReservableFromAnotherLibrary=useReservableFromAnotherLibrary;try{useReservableFromAnotherLibrary.displayName="useReservableFromAnotherLibrary",useReservableFromAnotherLibrary.__docgenInfo={description:"",displayName:"useReservableFromAnotherLibrary",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useReservableFromAnotherLibrary.tsx#useReservableFromAnotherLibrary"]={docgenInfo:useReservableFromAnotherLibrary.__docgenInfo,name:"useReservableFromAnotherLibrary",path:"src/core/utils/useReservableFromAnotherLibrary.tsx#useReservableFromAnotherLibrary"})}catch(__react_docgen_typescript_loader_error){}const MaterialAvailabilityText=({manifestations})=>{const t=(0,utils_text.F)(),materialType=head_default()((0,general.JB)(manifestations)),isbns=(0,material_helper.AC)(manifestations),{materialIsReservableFromAnotherLibrary}=utils_useReservableFromAnotherLibrary(manifestations);if((0,material_buttons_helper.D7)(graphql.cs.Physical,manifestations)){const pids=(0,general.Y5)(manifestations);return materialIsReservableFromAnotherLibrary?react.createElement(generic_MaterialAvailabilityTextParagraph,null,t("reservableFromAnotherLibraryText")):react.createElement(physical_MaterialAvailabilityTextPhysical,{pids})}return(0,material_buttons_helper.D7)(graphql.cs.Online,manifestations)&&isbns.length>0&&materialType?react.createElement(online_MaterialAvailabilityTextOnline,{isbns,materialType}):null},MaterialAvailabilityText_MaterialAvailabilityText=MaterialAvailabilityText;try{MaterialAvailabilityText.displayName="MaterialAvailabilityText",MaterialAvailabilityText.__docgenInfo={description:"",displayName:"MaterialAvailabilityText",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"]={docgenInfo:MaterialAvailabilityText.__docgenInfo,name:"MaterialAvailabilityText",path:"src/components/material/MaterialAvailabilityText/MaterialAvailabilityText.tsx#MaterialAvailabilityText"})}catch(__react_docgen_typescript_loader_error){}var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const MaterialHeaderText=({title,author,languageIsoCode,materialTitleId})=>{const t=(0,utils_text.F)(),searchUrl=(0,url.Ik)()("searchUrl");return react.createElement(react.Fragment,null,react.createElement("h1",{id:materialTitleId,lang:languageIsoCode,className:"text-header-h1 mb-16"},title),author&&react.createElement("p",{"data-cy":"material-header-author-text",className:"text-body-large"},react.createElement("span",null,t("materialHeaderAuthorByText")," "),react.createElement(LinkNoStyle.A,{url:(0,helpers_url.zy)(searchUrl,author),className:"arrow__link"},author)))},material_MaterialHeaderText=MaterialHeaderText;try{MaterialHeaderText.displayName="MaterialHeaderText",MaterialHeaderText.__docgenInfo={description:"",displayName:"MaterialHeaderText",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string"}},languageIsoCode:{defaultValue:null,description:"",name:"languageIsoCode",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"]={docgenInfo:MaterialHeaderText.__docgenInfo,name:"MaterialHeaderText",path:"src/components/material/MaterialHeaderText.tsx#MaterialHeaderText"})}catch(__react_docgen_typescript_loader_error){}var InvalidUrlError=__webpack_require__("./src/core/errors/InvalidUrlError.ts"),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx");const MaterialButtonDisabled=({label,reason,size,dataCy="material-header-buttons-cant-reserve"})=>react.createElement(react.Fragment,null,react.createElement(Button.$,{label,buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy}),reason&&react.createElement("p",{className:"text-small-caption mt-16",role:"alert"},reason)),generic_MaterialButtonDisabled=MaterialButtonDisabled;try{MaterialButtonDisabled.displayName="MaterialButtonDisabled",MaterialButtonDisabled.__docgenInfo={description:"",displayName:"MaterialButtonDisabled",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},reason:{defaultValue:null,description:"",name:"reason",required:!1,type:{name:"string | undefined"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-header-buttons-cant-reserve"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"]={docgenInfo:MaterialButtonDisabled.__docgenInfo,name:"MaterialButtonDisabled",path:"src/components/material/material-buttons/generic/MaterialButtonDisabled.tsx#MaterialButtonDisabled"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonOnlineDigitalArticle=({pid,size,dataCy="material-button-online-digital-article"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),[isUserResident,setIsUserResident]=(0,react.useState)(null),{isLoading,data:userData}=(0,usePatronData.I)(),{openGuarded}=(0,modal.X)();(0,useDeepCompareEffect.A)((()=>{userData&&userData.patron&&setIsUserResident((0,user.vn)(null==userData?void 0:userData.patron))}),[userData]);return isLoading?react.createElement(MaterialButtonLoading.A,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{label:t("cantViewText"),reason:t("notLivingInMunicipalityText"),size}):react.createElement(Button.$,{label:t("orderDigitalCopyButtonText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:createDigitalModalId(pid)})},dataCy})},online_MaterialButtonOnlineDigitalArticle=MaterialButtonOnlineDigitalArticle;try{MaterialButtonOnlineDigitalArticle.displayName="MaterialButtonOnlineDigitalArticle",MaterialButtonOnlineDigitalArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineDigitalArticle",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button-online-digital-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"]={docgenInfo:MaterialButtonOnlineDigitalArticle.__docgenInfo,name:"MaterialButtonOnlineDigitalArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineDigitalArticle.tsx#MaterialButtonOnlineDigitalArticle"})}catch(__react_docgen_typescript_loader_error){}var dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const MaterialButtonOnlineExternal=({externalUrl="",origin,size,trackOnlineView,manifestations,dataCy="material-button-online-external",ariaLabelledBy})=>{const[translatedUrl,setTranslatedUrl]=(0,react.useState)(new URL(externalUrl)),[urlWasTranslated,setUrlWasTranslated]=(0,react.useState)(null),t=(0,utils_text.F)(),{data,error}=(0,dpl_cms.vS)({url:externalUrl},{enabled:null===urlWasTranslated&&externalUrl.length>0});(0,react.useEffect)((()=>{setTranslatedUrl(new URL(externalUrl)),setUrlWasTranslated(null)}),[externalUrl]),(0,react.useEffect)((()=>{var _data$data;!1===urlWasTranslated&&!error&&null!=data&&null!==(_data$data=data.data)&&void 0!==_data$data&&_data$data.url&&(setTranslatedUrl(new URL(data.data.url)),setUrlWasTranslated(!0))}),[data,error,urlWasTranslated]);return react.createElement(LinkButton.A,{url:translatedUrl,buttonType:"external-link",variant:"filled",size:size||"large",iconClassNames:"invert",trackClick:trackOnlineView,dataCy,ariaLabelledBy},((sourceName,materialTypes)=>{const onlineMaterialType=((sourceName,materialTypes)=>sourceName.toLowerCase().includes("ereol")?"ebook":sourceName.toLowerCase().includes("filmstriben")?"emovie":materialTypes.find((element=>element.toLowerCase().includes(material_type.sN.audioBookGeneric)))?"audiobook":"unknown")(sourceName,materialTypes);switch(onlineMaterialType){case"ebook":return t("goToText",{placeholders:{"@source":"ereolen"}});case"emovie":return t("goToText",{placeholders:{"@source":"filmstriben"}});case"audiobook":return t("listenOnlineText");default:return t("seeOnlineText")}})(origin,(0,general.JB)(manifestations)))},online_MaterialButtonOnlineExternal=MaterialButtonOnlineExternal;try{MaterialButtonOnlineExternal.displayName="MaterialButtonOnlineExternal",MaterialButtonOnlineExternal.__docgenInfo={description:"",displayName:"MaterialButtonOnlineExternal",props:{externalUrl:{defaultValue:{value:""},description:"",name:"externalUrl",required:!1,type:{name:"string"}},origin:{defaultValue:null,description:"",name:"origin",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},dataCy:{defaultValue:{value:"material-button-online-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"]={docgenInfo:MaterialButtonOnlineExternal.__docgenInfo,name:"MaterialButtonOnlineExternal",path:"src/components/material/material-buttons/online/MaterialButtonOnlineExternal.tsx#MaterialButtonOnlineExternal"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonOnlineInfomediaArticle=({size,manifestations,trackOnlineView,dataCy="material-button-online-infomedia-article"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),{isLoading,data:userData}=(0,usePatronData.I)(),{openGuarded}=(0,modal.X)(),isUserResident=userData&&null!=userData&&userData.patron?(0,user.vn)(userData.patron):null;if(manifestations.length<1)return null;return isLoading?react.createElement(MaterialButtonLoading.A,null):!1===isUserResident?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantViewText"),reason:t("notLivingInMunicipalityText")}):react.createElement(Button.$,{label:t("readArticleText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:infomediaModalId(manifestations[0].pid),trackOnlineView})},dataCy})},online_MaterialButtonOnlineInfomediaArticle=MaterialButtonOnlineInfomediaArticle;try{MaterialButtonOnlineInfomediaArticle.displayName="MaterialButtonOnlineInfomediaArticle",MaterialButtonOnlineInfomediaArticle.__docgenInfo={description:"",displayName:"MaterialButtonOnlineInfomediaArticle",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},trackOnlineView:{defaultValue:null,description:"",name:"trackOnlineView",required:!0,type:{name:"() => Promise"}},dataCy:{defaultValue:{value:"material-button-online-infomedia-article"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"]={docgenInfo:MaterialButtonOnlineInfomediaArticle.__docgenInfo,name:"MaterialButtonOnlineInfomediaArticle",path:"src/components/material/material-buttons/online/MaterialButtonOnlineInfomediaArticle.tsx#MaterialButtonOnlineInfomediaArticle"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonsOnline=({manifestations,size,workId,dataCy="material-buttons-online",ariaLabelledBy})=>{const{track}=(0,useStatistics.B)(),trackOnlineView=()=>track("click",{id:statistics.o.onlineReservation.id,name:statistics.o.onlineReservation.name,trackedData:workId}),accessElement=manifestations[0].access.find((item=>"Ereol"===item.__typename))||manifestations[0].access[0];if((0,material_buttons_helper.ft)("Ereol",manifestations)||(0,material_buttons_helper.ft)("AccessUrl",manifestations)){const{origin,url:externalUrl}=accessElement;if(!(0,helpers_url.Ks)(externalUrl))throw new InvalidUrlError.A(`The external url is not valid. ( ${externalUrl} )`);return react.createElement(online_MaterialButtonOnlineExternal,{externalUrl,origin,size,trackOnlineView,manifestations,dataCy:`${dataCy}-external`,ariaLabelledBy})}return(0,material_buttons_helper.ft)("DigitalArticleService",manifestations)&&(0,material_buttons_helper.S5)(material_type.sN.article,manifestations)?react.createElement(online_MaterialButtonOnlineDigitalArticle,{pid:manifestations[0].pid,size,dataCy:`${dataCy}-digital-article`}):(0,material_buttons_helper.ft)("InfomediaService",manifestations)?react.createElement(online_MaterialButtonOnlineInfomediaArticle,{size,manifestations,trackOnlineView,dataCy:`${dataCy}-infomedia-article`}):null},online_MaterialButtonsOnline=MaterialButtonsOnline;try{MaterialButtonsOnline.displayName="MaterialButtonsOnline",MaterialButtonsOnline.__docgenInfo={description:"",displayName:"MaterialButtonsOnline",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},dataCy:{defaultValue:{value:"material-buttons-online"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"]={docgenInfo:MaterialButtonsOnline.__docgenInfo,name:"MaterialButtonsOnline",path:"src/components/material/material-buttons/online/MaterialButtonsOnline.tsx#MaterialButtonsOnline"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx");const UseReservableManifestations=({manifestations,type})=>{const config=(0,utils_config.UK)(),faustIds=(0,general.bn)(manifestations),[reservableManifestations,setReservableManifestations]=(0,react.useState)(null),[unReservableManifestations,setUnReservableManifestations]=(0,react.useState)(null);return(0,react.useEffect)((()=>{if(!manifestations.length||reservableManifestations||unReservableManifestations)return;(async m=>{const data=await(0,material_helper.QL)({faustIds,config});if(!data)return{reservable:[],unReservable:[]};const filterableManifestations=type?(0,material_helper.Xf)(type,m):m;return{reservable:filterableManifestations.filter((manifestation=>data.some((item=>item.reservable&&item.recordId===(0,general.G_)(manifestation.pid))))),unReservable:filterableManifestations.filter((manifestation=>data.some((item=>!item.reservable&&item.recordId===(0,general.G_)(manifestation.pid)))))}})(manifestations).then((({reservable,unReservable})=>{setReservableManifestations(reservable),setUnReservableManifestations(unReservable)}))}),[manifestations,faustIds,type,reservableManifestations,unReservableManifestations,config]),{reservableManifestations,unReservableManifestations}},utils_UseReservableManifestations=UseReservableManifestations;try{UseReservableManifestations.displayName="UseReservableManifestations",UseReservableManifestations.__docgenInfo={description:"",displayName:"UseReservableManifestations",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"]={docgenInfo:UseReservableManifestations.__docgenInfo,name:"UseReservableManifestations",path:"src/core/utils/UseReservableManifestations.tsx#UseReservableManifestations"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonUserBlocked=({size,dataCy="material-button"})=>{const t=(0,utils_text.F)();return react.createElement(Button.$,{label:t("blockedButtonText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",dataCy:`${dataCy}-user-blocked`})},generic_MaterialButtonUserBlocked=MaterialButtonUserBlocked;try{MaterialButtonUserBlocked.displayName="MaterialButtonUserBlocked",MaterialButtonUserBlocked.__docgenInfo={description:"",displayName:"MaterialButtonUserBlocked",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"]={docgenInfo:MaterialButtonUserBlocked.__docgenInfo,name:"MaterialButtonUserBlocked",path:"src/components/material/material-buttons/generic/MaterialButtonUserBlocked.tsx#MaterialButtonUserBlocked"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonPhysical=({manifestationMaterialType,faustIds,size,dataCy="material-button-physical"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),{openGuarded}=(0,modal.X)();return react.createElement(Button.$,{dataCy,label:"small"===size?t("reserveText"):`${t("reserveWithMaterialTypeText",{placeholders:{"@materialType":manifestationMaterialType}})}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,material_helper.bE)(faustIds)})}})},physical_MaterialButtonPhysical=MaterialButtonPhysical;try{MaterialButtonPhysical.displayName="MaterialButtonPhysical",MaterialButtonPhysical.__docgenInfo={description:"",displayName:"MaterialButtonPhysical",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},dataCy:{defaultValue:{value:"material-button-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"]={docgenInfo:MaterialButtonPhysical.__docgenInfo,name:"MaterialButtonPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx#MaterialButtonPhysical"})}catch(__react_docgen_typescript_loader_error){}var useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const MaterialButtonsPhysical=({manifestations,size,dataCy="material-buttons-physical"})=>{const t=(0,utils_text.F)(),config=(0,utils_config.UK)(),faustIds=(0,general.bn)(manifestations),{isLoading:isLoadingAvailability}=(0,useGetAvailability.A)({faustIds,config}),{reservableManifestations}=utils_UseReservableManifestations({manifestations}),{data:userData,isLoading}=(0,usePatronData.I)(),isUserBlocked=!(null==userData||!userData.patron||!(0,user.lT)(null==userData?void 0:userData.patron));return isLoading||isLoadingAvailability?react.createElement(MaterialButtonLoading.A,null):!reservableManifestations||reservableManifestations.length<1?react.createElement(generic_MaterialButtonDisabled,{size,label:t("cantReserveText")}):isUserBlocked?react.createElement(generic_MaterialButtonUserBlocked,{size,dataCy}):userData&&isUserBlocked?null:react.createElement(physical_MaterialButtonPhysical,{dataCy,manifestationMaterialType:(0,general.VZ)(manifestations),faustIds,size})},physical_MaterialButtonsPhysical=MaterialButtonsPhysical;try{MaterialButtonsPhysical.displayName="MaterialButtonsPhysical",MaterialButtonsPhysical.__docgenInfo={description:"",displayName:"MaterialButtonsPhysical",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},dataCy:{defaultValue:{value:"material-buttons-physical"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"]={docgenInfo:MaterialButtonsPhysical.__docgenInfo,name:"MaterialButtonsPhysical",path:"src/components/material/material-buttons/physical/MaterialButtonsPhysical.tsx#MaterialButtonsPhysical"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtonReservableFromAnotherLibrary=({manifestationMaterialType,faustIds,size,dataCy="material-button-reservable-on-another-library"})=>{const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),{openGuarded}=(0,modal.X)();return react.createElement(Button.$,{dataCy,label:"small"===size?t("reserveText"):`${t("reserveWithMaterialTypeText",{placeholders:{"@materialType":manifestationMaterialType}})}`,buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:size||"large",onClick:()=>{openGuarded({authUrl,modalId:(0,material_helper.bE)(faustIds)})}})},physical_MaterialButtonReservableFromAnotherLibrary=MaterialButtonReservableFromAnotherLibrary;try{MaterialButtonReservableFromAnotherLibrary.displayName="MaterialButtonReservableFromAnotherLibrary",MaterialButtonReservableFromAnotherLibrary.__docgenInfo={description:"",displayName:"MaterialButtonReservableFromAnotherLibrary",props:{manifestationMaterialType:{defaultValue:null,description:"",name:"manifestationMaterialType",required:!0,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},dataCy:{defaultValue:{value:"material-button-reservable-on-another-library"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"]={docgenInfo:MaterialButtonReservableFromAnotherLibrary.__docgenInfo,name:"MaterialButtonReservableFromAnotherLibrary",path:"src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx#MaterialButtonReservableFromAnotherLibrary"})}catch(__react_docgen_typescript_loader_error){}const MaterialButtons=({manifestations,size,workId,dataCy="material-buttons",materialTitleId})=>{const faustIds=(0,general.bn)(manifestations),{materialIsReservableFromAnotherLibrary}=utils_useReservableFromAnotherLibrary(manifestations);return materialIsReservableFromAnotherLibrary?react.createElement(physical_MaterialButtonReservableFromAnotherLibrary,{size,manifestationMaterialType:(0,general.VZ)(manifestations),faustIds}):react.createElement(react.Fragment,null,(0,material_buttons_helper.D7)(graphql.cs.Physical,manifestations)&&!(0,material_buttons_helper.BG)(manifestations)&&react.createElement(react.Fragment,null,react.createElement(physical_MaterialButtonsPhysical,{manifestations,size,dataCy:`${dataCy}-physical`}),react.createElement(MaterialButtonsFindOnShelf.A,{size,faustIds,dataCy:`${dataCy}-find-on-shelf`})),((0,material_buttons_helper.D7)(graphql.cs.Online,manifestations)||(0,material_buttons_helper.ft)("DigitalArticleService",manifestations))&&react.createElement(online_MaterialButtonsOnline,{manifestations,size,workId,dataCy:`${dataCy}-online`,ariaLabelledBy:materialTitleId}))},material_buttons_MaterialButtons=MaterialButtons;try{MaterialButtons.displayName="MaterialButtons",MaterialButtons.__docgenInfo={description:"",displayName:"MaterialButtons",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},dataCy:{defaultValue:{value:"material-buttons"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},materialTitleId:{defaultValue:null,description:"",name:"materialTitleId",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"]={docgenInfo:MaterialButtons.__docgenInfo,name:"MaterialButtons",path:"src/components/material/material-buttons/MaterialButtons.tsx#MaterialButtons"})}catch(__react_docgen_typescript_loader_error){}var isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const MaterialPeriodicalSelect=({groupList,selectedPeriodical,selectPeriodicalHandler})=>{const t=(0,utils_text.F)(),lastYear=Object.keys(groupList).sort().pop()||"",[year,setYear]=(0,react.useState)(lastYear),periodicalEditions=(0,periodical_helper.LM)(groupList);(0,react.useEffect)((()=>{if(selectedPeriodical)return;const firstEdition=(0,periodical_helper.Vf)(year,periodicalEditions),firstFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===firstEdition));firstFullPeriodicalEdition&&selectPeriodicalHandler(firstFullPeriodicalEdition)}),[selectPeriodicalHandler,selectedPeriodical,year,periodicalEditions,groupList]);return react.createElement("div",{className:"text-small-caption material-periodical"},react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"year"},t("periodicalSelectYearText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"year",defaultValue:year,onChange:event=>{(0,periodical_helper.yF)(event.target.value,setYear,selectPeriodicalHandler,periodicalEditions,groupList)}},Object.keys(periodicalEditions).sort().map((item=>react.createElement("option",{key:item,value:item},item)))))),year&&react.createElement("div",{className:"material-periodical-select"},react.createElement("label",{htmlFor:"editions"},t("periodicalSelectEditionText")),react.createElement("div",{className:"material-periodical-select__border-container"},react.createElement("select",{id:"editions",value:null==selectedPeriodical?void 0:selectedPeriodical.volumeNumber,onChange:event=>{(0,periodical_helper.HO)(groupList,year,event.target.value,selectPeriodicalHandler)}},periodicalEditions[year].map((item=>react.createElement("option",{key:item,value:item},item)))))))},periodical_MaterialPeriodicalSelect=MaterialPeriodicalSelect;try{MaterialPeriodicalSelect.displayName="MaterialPeriodicalSelect",MaterialPeriodicalSelect.__docgenInfo={description:"",displayName:"MaterialPeriodicalSelect",props:{groupList:{defaultValue:null,description:"",name:"groupList",required:!0,type:{name:"GroupList"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"]={docgenInfo:MaterialPeriodicalSelect.__docgenInfo,name:"MaterialPeriodicalSelect",path:"src/components/material/periodical/MaterialPeriodicalSelect.tsx#MaterialPeriodicalSelect"})}catch(__react_docgen_typescript_loader_error){}const MaterialPeriodical=({faustId,selectedPeriodical,selectPeriodicalHandler})=>{const config=(0,utils_config.UK)(),{data,isLoading,isError}=(0,material_helper.us)({faustIds:[faustId],config});if(isLoading||isError||!data)return null;const materialsPeriodical=data[0].holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat(),groupByVolumeYear=(0,general.kj)(materialsPeriodical,"volumeYear");return groupByVolumeYear&&selectPeriodicalHandler&&!isEmpty_default()(groupByVolumeYear)?react.createElement(periodical_MaterialPeriodicalSelect,{groupList:groupByVolumeYear,selectedPeriodical,selectPeriodicalHandler}):null},periodical_MaterialPeriodical=MaterialPeriodical;try{MaterialPeriodical.displayName="MaterialPeriodical",MaterialPeriodical.__docgenInfo={description:"",displayName:"MaterialPeriodical",props:{faustId:{defaultValue:null,description:"",name:"faustId",required:!0,type:{name:"string"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"]={docgenInfo:MaterialPeriodical.__docgenInfo,name:"MaterialPeriodical",path:"src/components/material/periodical/MaterialPeriodical.tsx#MaterialPeriodical"})}catch(__react_docgen_typescript_loader_error){}const MaterialHeader=({work:{titles:{full:fullTitle},creators,manifestations:{all:manifestations,bestRepresentation},mainLanguages,workId:wid},work,selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler,children,isGlobalMaterial=!1})=>{const materialTitleId=(0,react.useId)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.H)(),t=(0,utils_text.F)(),dispatch=(0,es.wA)(),queryClient=(0,react_query_es.useQueryClient)(),author=(0,general.sP)((0,general.UV)(creators),t),isPeriodical=(0,material_buttons_helper.S5)(material_type.sN.magazine,selectedManifestations),containsDanish=mainLanguages.some((language=>null==language?void 0:language.isoCode.toLowerCase().includes("dan"))),allLanguages=mainLanguages.map((language=>language.display)).join(", "),title=containsDanish?fullTitle:`${fullTitle} (${allLanguages})`,pid=(0,general.hh)(work),coverPids=(0,general.e$)(selectedManifestations),{track}=(0,useStatistics.B)(),manifestationMaterialTypes=(0,general.JB)(selectedManifestations),languageIsoCode=(0,material_helper.PG)(selectedManifestations);return(0,useDeepCompareEffect.A)((()=>{track("click",{id:statistics.o.materialType.id,name:statistics.o.materialType.name,trackedData:manifestationMaterialTypes.join(", ")}),track("click",{id:statistics.o.materialSource.id,name:statistics.o.materialSource.name,trackedData:selectedManifestations.map((manifestation=>manifestation.source.join(", "))).join(", ")})}),[manifestationMaterialTypes]),react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement(cover.Y,{ids:coverPids,bestRepresentation,size:"xlarge",animate:!0,shadow:"small"})),react.createElement("div",{"data-cy":"material-header-content",className:"material-header__content"},react.createElement(button_favourite.A,{title:String(title),id:wid,addToListRequest:id=>{dispatch((0,guardedRequests_slice.A5)({type:"addFavorite",args:{id,queryClient},app:"material"}))}}),react.createElement(material_MaterialHeaderText,{title:String(title),author,languageIsoCode,materialTitleId}),react.createElement("div",{ref:itemRef,className:"material-header__availability-label"},!isGlobalMaterial&&showItem&&react.createElement(availability_labels.F,{cursorPointer:!0,workId:wid,manifestations,selectedManifestations,setSelectedManifestations})),!isGlobalMaterial&&showItem&&react.createElement(react.Fragment,null,isPeriodical&&react.createElement(periodical_MaterialPeriodical,{faustId:(0,general.G_)(pid),selectedPeriodical,selectPeriodicalHandler}),selectedManifestations&&react.createElement(react.Fragment,null,react.createElement("div",{className:"material-header__button"},react.createElement(material_buttons_MaterialButtons,{manifestations:selectedManifestations,workId:wid,dataCy:"material-header-buttons",materialTitleId})),!(0,user.ok)()&&react.createElement(MaterialAvailabilityText_MaterialAvailabilityText,{manifestations:selectedManifestations})),children)))},material_MaterialHeader=MaterialHeader;try{MaterialHeader.displayName="MaterialHeader",MaterialHeader.__docgenInfo={description:"",displayName:"MaterialHeader",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!0,type:{name:"(manifestations: Manifestation[]) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},selectPeriodicalHandler:{defaultValue:null,description:"",name:"selectPeriodicalHandler",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}},isGlobalMaterial:{defaultValue:{value:"false"},description:"",name:"isGlobalMaterial",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialHeader.tsx#MaterialHeader"]={docgenInfo:MaterialHeader.__docgenInfo,name:"MaterialHeader",path:"src/components/material/MaterialHeader.tsx#MaterialHeader"})}catch(__react_docgen_typescript_loader_error){}var ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),availability_label=__webpack_require__("./src/components/availability-label/availability-label.tsx");const MaterialMainfestationItem=({manifestation:{materialTypes,pid,titles,creators,identifiers,edition},manifestation,workId})=>{var _materialTypes$,_edition$publicationY;const mainfestationTitleId=(0,react.useId)(),t=(0,utils_text.F)(),[isOpen,setIsOpen]=(0,react.useState)(!1),faustId=(0,general.G_)(pid),author=(0,general.sP)((0,general.UV)(creators),t),languageIsoCode=(0,material_helper.PG)([manifestation]),detailsListData=[{label:t("detailsListTypeText"),value:(0,material_helper.TU)(manifestation)},{label:t("detailsListLanguageText"),value:(0,material_helper.gG)(manifestation)},{label:t("detailsListGenreAndFormText"),value:(0,material_helper.f$)(manifestation)},{label:t("detailsListContributorsText"),value:(0,material_helper.v9)(manifestation)},{label:t("detailsListOriginalTitleText"),value:(0,material_helper.ub)(manifestation)},{label:t("detailsListIsbnText"),value:(0,material_helper.L_)(manifestation)},{label:t("detailsListEditionText"),value:(0,material_helper.jC)(manifestation)},{label:t("detailsListScopeText"),value:(0,material_helper.n5)(manifestation)},{label:t("detailsListPublisherText"),value:(0,material_helper.Zs)(manifestation)},{label:t("detailsListAudienceText"),value:(0,material_helper.DH)(manifestation,t)},{label:t("detailsListAuthorsText"),value:(0,material_helper.x4)(manifestation)},{label:t("detailsListPhysicalDescriptionText"),value:(0,material_helper.mI)(manifestation)},{label:t("detailsListNotesText"),value:(0,material_helper.KA)(manifestation)},{label:t("detailsListSourceText"),value:(0,material_helper.Cb)(manifestation)}],accessTypesCodes=manifestation.accessTypes.map((item=>item.code)),access=manifestation.access.map((acc=>acc.__typename)),detailsId=`material-details-${pid}`;return react.createElement("div",{className:"material-manifestation-item"},react.createElement("div",{className:"material-manifestation-item__availability"},react.createElement(availability_label.Y,{manifestText:null===(_materialTypes$=materialTypes[0])||void 0===_materialTypes$?void 0:_materialTypes$.materialTypeSpecific.display,faustIds:[faustId],isbns:identifiers.map((identifier=>identifier.value)),accessTypes:accessTypesCodes,access,isVisualOnly:!0})),react.createElement("div",{className:"material-manifestation-item__cover"},react.createElement(cover.Y,{ids:[pid],size:"small",animate:!1})),react.createElement("div",{className:"material-manifestation-item__text"},react.createElement("h3",{lang:languageIsoCode,id:mainfestationTitleId,className:"material-manifestation-item__title text-header-h4"},null==titles?void 0:titles.main[0]),react.createElement("p",{className:"text-small-caption"},t("materialHeaderAuthorByText")," ",author,(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)&&` (${edition.publicationYear.display})`),react.createElement("div",{className:"material-manifestation-item__details "+(isOpen?"expanded":""),onClick:()=>{setIsOpen(!isOpen)},onKeyPress:()=>{setIsOpen(!isOpen)},role:"button",tabIndex:0,"aria-controls":detailsId,"aria-expanded":isOpen},react.createElement("p",{className:"link-tag text-small-caption"},t("detailsOfTheMaterialText")),react.createElement("img",{src:ExpandMore_default(),alt:""})),isOpen&&react.createElement(MaterialDetailsList.A,{id:detailsId,className:"mt-24",data:detailsListData})),react.createElement("div",{className:"material-manifestation-item__buttons"},react.createElement(material_buttons_MaterialButtons,{manifestations:[manifestation],size:"small",workId,materialTitleId:mainfestationTitleId})))},material_MaterialMainfestationItem=MaterialMainfestationItem;try{MaterialMainfestationItem.displayName="MaterialMainfestationItem",MaterialMainfestationItem.__docgenInfo={description:"",displayName:"MaterialMainfestationItem",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"]={docgenInfo:MaterialMainfestationItem.__docgenInfo,name:"MaterialMainfestationItem",path:"src/components/material/MaterialMainfestationItem.tsx#MaterialMainfestationItem"})}catch(__react_docgen_typescript_loader_error){}__webpack_require__("./node_modules/dayjs/dayjs.min.js"),__webpack_require__("./node_modules/dayjs/plugin/customParseFormat.js");const usDateStringToDateObj=date=>(dayjs.extend(customParseFormat),dayjs(date,"YYYY-MM-DD").toDate()),ReviewMetadata=({author,date,publication,url})=>{const metaDataText=(returnAuthor,returnHost,returnDate)=>{const authorText=returnAuthor||"",hostText=returnHost||"";return`\n ${authorText}${authorText&&hostText?" - ":""}${hostText}${returnDate&&`, ${returnDate}`}\n `};return url?react.createElement(LinkNoStyle.A,{url,className:"link-tag text-small-caption mb-8"},metaDataText(author,publication,date)):react.createElement("div",{className:"review__meta mb-8"},metaDataText(author,publication,date))},material_ReviewMetadata=ReviewMetadata;try{usDateStringToDateObj.displayName="usDateStringToDateObj",usDateStringToDateObj.__docgenInfo={description:"",displayName:"usDateStringToDateObj",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"]={docgenInfo:usDateStringToDateObj.__docgenInfo,name:"usDateStringToDateObj",path:"src/components/material/ReviewMetadata.tsx#usDateStringToDateObj"})}catch(__react_docgen_typescript_loader_error){}try{ReviewMetadata.displayName="ReviewMetadata",ReviewMetadata.__docgenInfo={description:"",displayName:"ReviewMetadata",props:{author:{defaultValue:null,description:"",name:"author",required:!1,type:{name:"string | null | undefined"}},date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"string | null | undefined"}},publication:{defaultValue:null,description:"",name:"publication",required:!1,type:{name:"string | null | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewMetadata.tsx#ReviewMetadata"]={docgenInfo:ReviewMetadata.__docgenInfo,name:"ReviewMetadata",path:"src/components/material/ReviewMetadata.tsx#ReviewMetadata"})}catch(__react_docgen_typescript_loader_error){}var icon_heart_filled=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-filled.svg"),icon_heart_filled_default=__webpack_require__.n(icon_heart_filled),icon_heart_grey=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart-grey.svg"),icon_heart_grey_default=__webpack_require__.n(icon_heart_grey);const ReviewHearts=({amountOfHearts})=>{const t=(0,utils_text.F)(),heartArray=amountOfHearts.split("/"),filledHeartsArray=Array.from({length:Number(heartArray[0])},((_,i)=>i+1)),emptyHeartsArray=Array.from({length:Number(heartArray[1])-Number(heartArray[0])},((_,i)=>i+1)),ariaLabel=t("ratingIsText",{placeholders:{"@heartCount":filledHeartsArray.length,"@numberOfHeartsPossible":heartArray[1]}});return react.createElement("div",{className:"mb-4",role:"figure","aria-label":ariaLabel},filledHeartsArray.map((()=>react.createElement("img",{src:icon_heart_filled_default(),className:"review__heart",alt:""}))),emptyHeartsArray.map((()=>react.createElement("img",{src:icon_heart_grey_default(),className:"review__heart",alt:""}))))},material_ReviewHearts=ReviewHearts;try{ReviewHearts.displayName="ReviewHearts",ReviewHearts.__docgenInfo={description:"",displayName:"ReviewHearts",props:{amountOfHearts:{defaultValue:null,description:"",name:"amountOfHearts",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewHearts.tsx#ReviewHearts"]={docgenInfo:ReviewHearts.__docgenInfo,name:"ReviewHearts",path:"src/components/material/ReviewHearts.tsx#ReviewHearts"})}catch(__react_docgen_typescript_loader_error){}var Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const ReviewExternal=({review:{workYear,dateFirstEdition,creators,review,access,edition,hostPublication},dataCy="review-external"})=>{const date=(0,general.IN)(dateFirstEdition,workYear,edition),authors=(0,general.Gm)(creators),publication=(0,general.yy)(hostPublication),accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),accessUrls&&accessUrls.map((({url,origin},index)=>react.createElement(react.Fragment,null,react.createElement("span",null,index>0?", ":""),react.createElement(Link.A,{href:new URL(url),className:"link-tag text-small-caption mb-8"},origin)))))},material_ReviewExternal=ReviewExternal;try{ReviewExternal.displayName="ReviewExternal",ReviewExternal.__docgenInfo={description:"",displayName:"ReviewExternal",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-external"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewExternal.tsx#ReviewExternal"]={docgenInfo:ReviewExternal.__docgenInfo,name:"ReviewExternal",path:"src/components/material/ReviewExternal.tsx#ReviewExternal"})}catch(__react_docgen_typescript_loader_error){}const useScrollToLocation=dependency=>{const[scrolledAlready,setScrolledAlready]=(0,react.useState)(!1),urlAnchor=window.location.hash;(0,react.useEffect)((()=>{if(urlAnchor&&!scrolledAlready){const anchorId=urlAnchor.replace("#",""),element=document.getElementById(anchorId);element&&(element.scrollIntoView({behavior:"smooth"}),setScrolledAlready(!0))}}),[urlAnchor,dependency,scrolledAlready])};try{useScrollToLocation.displayName="useScrollToLocation",useScrollToLocation.__docgenInfo={description:"",displayName:"useScrollToLocation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"]={docgenInfo:useScrollToLocation.__docgenInfo,name:"useScrollToLocation",path:"src/core/utils/UseScrollToLocation.tsx#useScrollToLocation"})}catch(__react_docgen_typescript_loader_error){}const ReviewInfomedia=({review:{workYear,dateFirstEdition,access,creators,review,edition,hostPublication},dataCy="review-infomedia"})=>{var _infomedia$article,_infomedia$article2,_infomedia$article3;const t=(0,utils_text.F)(),authUrl=(0,url.Ik)()("authUrl"),date=(0,general.IN)(dateFirstEdition,workYear,edition),authors=(0,general.Gm)(creators),publication=(0,general.yy)(hostPublication),infomediaId=access.filter((accessItem=>"InfomediaService"===accessItem.__typename))[0].id,{data,error}=(0,graphql.ET)({id:infomediaId});if(useScrollToLocation(data),error)return null;if(!data)return null;const{infomedia}=data;if(infomedia.error)return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),react.createElement("div",{className:"review__headline mb-8"},"BORROWER_NOT_LOGGED_IN"===infomedia.error?react.createElement(Button.$,{label:t("loginToSeeReviewText"),buttonType:"none",disabled:!1,collapsible:!1,size:"xsmall",variant:"outline",onClick:()=>{(reviewId=>{const returnUrl=(0,helpers_url.gG)({disclosure:"disclosure-reviews"});returnUrl.hash=reviewId,(0,helpers_url.bX)({authUrl,returnUrl})})(infomediaId)}}):t("cantViewReviewText")));const accessUrls=access.filter((accessItem=>"AccessUrl"===accessItem.__typename));return react.createElement("li",{className:"review text-small-caption",id:infomediaId},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.rating)&&react.createElement(material_ReviewHearts,{amountOfHearts:review.rating}),(null===(_infomedia$article=infomedia.article)||void 0===_infomedia$article?void 0:_infomedia$article.headLine)&&react.createElement("h3",{className:"review__headline mb-8"},infomedia.article.headLine),(null===(_infomedia$article2=infomedia.article)||void 0===_infomedia$article2?void 0:_infomedia$article2.text)&&react.createElement("p",{className:"review__body mb-8",dangerouslySetInnerHTML:{__html:null===(_infomedia$article3=infomedia.article)||void 0===_infomedia$article3?void 0:_infomedia$article3.text}}),access.some((a=>"AccessUrl"===a.__typename))&&(0,helpers_url.Ks)(accessUrls[0].url)&&react.createElement(material_ReviewMetadata,{author:authors,date,url:new URL(accessUrls[0].url)}))},material_ReviewInfomedia=ReviewInfomedia;try{ReviewInfomedia.displayName="ReviewInfomedia",ReviewInfomedia.__docgenInfo={description:"",displayName:"ReviewInfomedia",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-infomedia"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"]={docgenInfo:ReviewInfomedia.__docgenInfo,name:"ReviewInfomedia",path:"src/components/material/ReviewInfomedia.tsx#ReviewInfomedia"})}catch(__react_docgen_typescript_loader_error){}const ReviewLibrarian=({review:{workYear,dateFirstEdition,creators,review,edition,hostPublication},dataCy="review-librarian"})=>{const date=(0,general.IN)(dateFirstEdition,workYear,edition),authors=(0,general.Gm)(creators),publication=(0,general.yy)(hostPublication);return react.createElement("li",{className:"review text-small-caption","data-cy":dataCy},(authors||date||publication)&&react.createElement(material_ReviewMetadata,{author:authors,date,publication}),(null==review?void 0:review.reviewByLibrarians)&&review.reviewByLibrarians.map((librarianReview=>react.createElement(react.Fragment,null,(null==librarianReview?void 0:librarianReview.heading)&&react.createElement("h3",{className:"review__headline mb-8"},librarianReview.heading),(null==librarianReview?void 0:librarianReview.content)&&react.createElement("div",{className:"review__body mb-8"},librarianReview.content)))))},material_ReviewLibrarian=ReviewLibrarian;try{ReviewLibrarian.displayName="ReviewLibrarian",ReviewLibrarian.__docgenInfo={description:"",displayName:"ReviewLibrarian",props:{review:{defaultValue:null,description:"",name:"review",required:!0,type:{name:"ReviewManifestation"}},dataCy:{defaultValue:{value:"review-librarian"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"]={docgenInfo:ReviewLibrarian.__docgenInfo,name:"ReviewLibrarian",path:"src/components/material/ReviewLibrarian.tsx#ReviewLibrarian"})}catch(__react_docgen_typescript_loader_error){}const ReviewSkeleton=()=>react.createElement("div",{className:"ssc my-48 mx-32"},react.createElement("div",{className:"ssc-head-line w-40 my-8"}),react.createElement("div",{className:"ssc-line my-8"}),react.createElement("div",{className:"ssc-line my-8"})),material_ReviewSkeleton=ReviewSkeleton;try{ReviewSkeleton.displayName="ReviewSkeleton",ReviewSkeleton.__docgenInfo={description:"",displayName:"ReviewSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"]={docgenInfo:ReviewSkeleton.__docgenInfo,name:"ReviewSkeleton",path:"src/components/material/ReviewSkeleton.tsx#ReviewSkeleton"})}catch(__react_docgen_typescript_loader_error){}const MaterialReviews=({pids,dataCy="material-reviews"})=>{const{data,isLoading}=(0,graphql.BG)({pid:pids});if(isLoading)return react.createElement(material_ReviewSkeleton,null);if(!data)return null;const{manifestations:reviews}=data;return react.createElement("ul",{className:"reviews","data-cy":dataCy},reviews.map((review=>review?((reviewType,review)=>{switch(reviewType){case null:default:return null;case"infomedia":return react.createElement(material_ReviewInfomedia,{review,dataCy:`${dataCy}-infomedia`});case"external":return react.createElement(material_ReviewExternal,{review,dataCy:`${dataCy}-external`});case"librarian":return react.createElement(material_ReviewLibrarian,{review,dataCy:`${dataCy}-librarian`})}})((review=>null!=review&&review.access.some((access=>"InfomediaService"===access.__typename))?"infomedia":null!=review&&review.access.some((access=>"AccessUrl"===access.__typename))?"external":null!=review&&review.access.some((access=>"InterLibraryLoan"===access.__typename))?"librarian":null)(review),review):null)))};try{MaterialReviews.displayName="MaterialReviews",MaterialReviews.__docgenInfo={description:"",displayName:"MaterialReviews",props:{pids:{defaultValue:null,description:"",name:"pids",required:!0,type:{name:"`${number}-${string}:${string}`[]"}},dataCy:{defaultValue:{value:"material-reviews"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialReviews.tsx#MaterialReviews"]={docgenInfo:MaterialReviews.__docgenInfo,name:"MaterialReviews",path:"src/components/material/MaterialReviews.tsx#MaterialReviews"})}catch(__react_docgen_typescript_loader_error){}const MaterialSkeleton=()=>react.createElement("section",{className:"material-page ssc"},react.createElement("header",{className:"material-header"},react.createElement("div",{className:"material-header__cover"},react.createElement("div",{className:"ssc-square cover cover--size-xlarge cover--aspect-xlarge"})),react.createElement("div",{className:"material-header__content"},react.createElement("div",null,react.createElement("div",{className:"scc-wrapper"},react.createElement("div",{className:"ssc-square mb-32"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mbs"}),react.createElement("div",{className:"ssc-head-line mb-48"}),react.createElement("div",{className:"ssc-line w-30"}," ")),react.createElement("div",{className:"scc-wrapper pt-48"},react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-head-line w-80 mbs"}),react.createElement("div",{className:"ssc-line"}))))),react.createElement("section",{className:"material-description"},react.createElement("div",{className:"ssc-head-line w-20 mb"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mbs"}),react.createElement("div",{className:"ssc-line w-60 mb"}),react.createElement("div",{className:"scc-wrapper pt-16"},react.createElement("div",{className:"ssc-head-line w-10 mt mb"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"}),react.createElement("div",{className:"ssc-line w-70 mbs"})))),material_MaterialSkeleton=MaterialSkeleton;try{MaterialSkeleton.displayName="MaterialSkeleton",MaterialSkeleton.__docgenInfo={description:"",displayName:"MaterialSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"]={docgenInfo:MaterialSkeleton.__docgenInfo,name:"MaterialSkeleton",path:"src/components/material/MaterialSkeleton.tsx#MaterialSkeleton"})}catch(__react_docgen_typescript_loader_error){}const getData=(response,type)=>{var _response$data;return!response.isLoading&&null!==(_response$data=response.data)&&void 0!==_response$data&&_response$data.work?{...response,workType:type}:null};var disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const MaterialDisclosure=({title,icon,children,dataCy})=>react.createElement(disclosure.A,{dataCy,summary:react.createElement(DisclosureSummary.A,{title,mainIconPath:icon})},children),material_MaterialDisclosure=MaterialDisclosure;try{MaterialDisclosure.displayName="MaterialDisclosure",MaterialDisclosure.__docgenInfo={description:"",displayName:"MaterialDisclosure",props:{dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"]={docgenInfo:MaterialDisclosure.__docgenInfo,name:"MaterialDisclosure",path:"src/apps/material/MaterialDisclosure.tsx#MaterialDisclosure"})}catch(__react_docgen_typescript_loader_error){}var ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),Subtitles=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Subtitles.svg"),Subtitles_default=__webpack_require__.n(Subtitles),Message=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Message.svg"),Message_default=__webpack_require__.n(Message),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),isEqual=__webpack_require__("./node_modules/lodash/isEqual.js"),isEqual_default=__webpack_require__.n(isEqual),reservation_helper=__webpack_require__("./src/components/reservation/helper.ts"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts"),useSavePatron=__webpack_require__("./src/core/utils/useSavePatron.tsx");const ModalReservationFormText=({type,defaultText,header,inputField,patron})=>{const{close}=(0,modal.X)(),t=(0,utils_text.F)(),[text,setText]=(0,react.useState)((0,general.ng)(defaultText)),{savePatron}=(0,useSavePatron.A)({patron,fetchHandlers:{savePatron:{onSuccess:()=>{close((0,forms_helper.zW)(type))},onError:()=>{setText((0,general.ng)(defaultText)),close((0,forms_helper.zW)(type))}}}}),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,forms_helper.zW)(type),screenReaderModalDescriptionText:t((0,reservation_helper.He)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,reservation_helper.He)(type,"closeModalAriaLabelText"))}))(type,t);return react.createElement(modal.A,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText},react.createElement(ReservationForm.A,{title:header.title,description:header.description,onSubmit:()=>{(0,forms_helper.L8)({type,changedText:text,savedText:defaultText,patron,savePatron})}},react.createElement(TextInput.A,{id:type,label:inputField.label,type:(0,reservation_helper.B6)(type),onChange:input=>{setText(input)},value:text})))},forms_ModalReservationFormText=(0,react.memo)(ModalReservationFormText,isEqual_default());try{ModalReservationFormText.displayName="ModalReservationFormText",ModalReservationFormText.__docgenInfo={description:"",displayName:"ModalReservationFormText",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},defaultText:{defaultValue:null,description:"",name:"defaultText",required:!1,type:{name:"string | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},inputField:{defaultValue:null,description:"",name:"inputField",required:!0,type:{name:"{ description: string; label: string; }"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"]={docgenInfo:ModalReservationFormText.__docgenInfo,name:"ModalReservationFormText",path:"src/components/reservation/forms/ModalReservationFormText.tsx#ModalReservationFormText"})}catch(__react_docgen_typescript_loader_error){}const EmailModal=({patron,patron:{emailAddress}})=>{const t=(0,utils_text.F)();return react.createElement(forms_ModalReservationFormText,{type:"email",defaultText:emailAddress,header:{title:t("modalReservationFormEmailHeaderTitleText"),description:[t("modalReservationFormEmailHeaderDescriptionText")]},inputField:{label:t("modalReservationFormEmailInputFieldLabelText"),description:t("modalReservationFormEmailInputFieldDescriptionText")},patron})},forms_EmailModal=EmailModal;try{EmailModal.displayName="EmailModal",EmailModal.__docgenInfo={description:"",displayName:"EmailModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/EmailModal.tsx#EmailModal"]={docgenInfo:EmailModal.__docgenInfo,name:"EmailModal",path:"src/components/reservation/forms/EmailModal.tsx#EmailModal"})}catch(__react_docgen_typescript_loader_error){}const SmsModal=({patron,patron:{phoneNumber}})=>{const t=(0,utils_text.F)();return react.createElement(forms_ModalReservationFormText,{type:"sms",defaultText:phoneNumber,header:{title:t("modalReservationFormSmsHeaderTitleText"),description:[t("modalReservationFormSmsHeaderDescriptionText")]},inputField:{label:t("modalReservationFormSmsInputFieldLabelText"),description:t("modalReservationFormSmsInputFieldDescriptionText")},patron})},forms_SmsModal=SmsModal;try{SmsModal.displayName="SmsModal",SmsModal.__docgenInfo={description:"",displayName:"SmsModal",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/SmsModal.tsx#SmsModal"]={docgenInfo:SmsModal.__docgenInfo,name:"SmsModal",path:"src/components/reservation/forms/SmsModal.tsx#SmsModal"})}catch(__react_docgen_typescript_loader_error){}var PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx");const UserListItems=({patron,patron:{preferredPickupBranch,phoneNumber,emailAddress},branches,selectedBranch,selectBranchHandler,selectedInterest,setSelectedInterest,whitelistBranches})=>{const t=(0,utils_text.F)(),config=(0,utils_config.UK)(),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),{open}=(0,modal.X)(),openModal=type=>()=>{open((0,forms_helper.zW)(type))},interestPeriod=selectedInterest?(0,reservation_helper.En)(selectedInterest,interestPeriods,t):(0,reservation_helper.En)(Number(interestPeriods.defaultInterestPeriod.value),interestPeriods,t),pickupBranch=selectedBranch?(0,reservation_helper.C4)(selectedBranch,branches):(0,reservation_helper.C4)(preferredPickupBranch,branches);return react.createElement(react.Fragment,null,interestPeriods&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:interestPeriod,changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText")}),react.createElement(NoInterestAfterModal.A,{selectedInterest:selectedInterest??interestPeriods.defaultInterestPeriod.value,setSelectedInterest})),preferredPickupBranch&&whitelistBranches&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:pickupBranch,changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText")}),react.createElement(PickupModal.A,{branches:whitelistBranches,defaultBranch:selectedBranch??preferredPickupBranch,selectBranchHandler})),react.createElement(react.Fragment,null,(0,reservation_helper.Qr)(config("smsNotificationsForReservationsEnabledConfig"))&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:Subtitles_default(),title:t("receiveSmsWhenMaterialReadyText"),text:(0,general.ng)(phoneNumber),changeHandler:openModal("sms"),buttonAriaLabel:t("changeSmsNumberText")}),react.createElement(forms_SmsModal,{patron})),react.createElement(ReservationFormListItem.A,{icon:Message_default(),title:t("receiveEmailWhenMaterialReadyText"),text:(0,general.ng)(emailAddress),changeHandler:openModal("email"),buttonAriaLabel:t("changeEmailText")}),react.createElement(forms_EmailModal,{patron})))},reservation_UserListItems=UserListItems;try{UserListItems.displayName="UserListItems",UserListItems.__docgenInfo={description:"",displayName:"UserListItems",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},selectedBranch:{defaultValue:null,description:"",name:"selectedBranch",required:!0,type:{name:"string | null"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number | null"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},whitelistBranches:{defaultValue:null,description:"",name:"whitelistBranches",required:!0,type:{name:"AgencyBranch[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/UserListItems.tsx#UserListItems"]={docgenInfo:UserListItems.__docgenInfo,name:"UserListItems",path:"src/components/reservation/UserListItems.tsx#UserListItems"})}catch(__react_docgen_typescript_loader_error){}var focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts");const ReservationSucces=({modalId,title,preferredPickupBranch,numberInQueue,holdings})=>{const dispatch=(0,es.wA)(),t=(0,utils_text.F)();return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{"data-cy":"reservation-success-title-text",className:"text-header-h3 pb-48"},t("reservationSuccesTitleText")),react.createElement("p",{"data-cy":"reservation-success-is-reserved-for-you-text",className:"text-body-medium-regular pb-24"},title," ",t("reservationSuccesIsReservedForYouText")),react.createElement("p",{"data-cy":"number-in-queue-text",className:"text-body-medium-regular pb-24"},react.createElement(material_StockAndReservationInfo,{stockCount:holdings,numberInQueue})),react.createElement("p",{"data-cy":"reservation-success-preferred-pickup-branch-text",className:"text-body-medium-regular pb-48"},t("reservationSuccessPreferredPickupBranchText",{placeholders:{"@branch":preferredPickupBranch}}),"."),react.createElement(Button.$,{dataCy:"reservation-success-close-button",classNames:"reservation-modal__confirm-button",label:t("okButtonText"),buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{dispatch((0,modal_slice.Oo)({modalId}))}})))},reservation_ReservationSucces=ReservationSucces;try{ReservationSucces.displayName="ReservationSucces",ReservationSucces.__docgenInfo={description:"",displayName:"ReservationSucces",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},preferredPickupBranch:{defaultValue:null,description:"",name:"preferredPickupBranch",required:!0,type:{name:"string"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | undefined"}},holdings:{defaultValue:null,description:"",name:"holdings",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationSucces.tsx#ReservationSucces"]={docgenInfo:ReservationSucces.__docgenInfo,name:"ReservationSucces",path:"src/components/reservation/ReservationSucces.tsx#ReservationSucces"})}catch(__react_docgen_typescript_loader_error){}const ReservationError=({reservationResults,setReservationResponse})=>{const t=(0,utils_text.F)(),reservationErrorInfo=reservationResults.some((({result})=>"already_reserved"===result))?{title:t("alreadyReservedText"),description:"",buttonText:t("closeText")}:{title:t("reservationErrorsTitleText"),description:t("reservationErrorsDescriptionText"),buttonText:t("tryAginButtonText")};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement("section",{className:"reservation-modal reservation-modal--confirm"},react.createElement("h2",{className:"text-header-h3 pb-48"},reservationErrorInfo.title),reservationErrorInfo.description&&react.createElement("p",{className:"text-body-medium-regular pb-48"},reservationErrorInfo.description),react.createElement(Button.$,{classNames:"reservation-modal__confirm-button",label:reservationErrorInfo.buttonText,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>setReservationResponse(null)})))},reservation_ReservationError=ReservationError;try{ReservationError.displayName="ReservationError",ReservationError.__docgenInfo={description:"",displayName:"ReservationError",props:{reservationResults:{defaultValue:null,description:"",name:"reservationResults",required:!0,type:{name:"ReservationResultV2[]"}},setReservationResponse:{defaultValue:null,description:"",name:"setReservationResponse",required:!0,type:{name:"(reservationResponse: ReservationResponseV2 | null) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationError.tsx#ReservationError"]={docgenInfo:ReservationError.__docgenInfo,name:"ReservationError",path:"src/components/reservation/ReservationError.tsx#ReservationError"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts");const reservation_useAlternativeAvailableManifestation=(work,currentManifestationPids)=>{const config=(0,utils_config.UK)(),[isOtherManifestationPreferred,setIsOtherManifestationPreferred]=(0,react.useState)(!1),[otherManifestationPreferred,setOtherManifestationPreferred]=(0,react.useState)(null),faustIds=(0,general.bn)(work.manifestations.all),{data:availabilityData}=(0,useGetAvailability.A)({faustIds,config});return(0,useDeepCompareEffect.A)((()=>{if(availabilityData){const leastReservedData=availabilityData.filter((manifestation=>manifestation.reservable)).sort(((a,b)=>a.reservations-b.reservations)).shift();if(!leastReservedData)return;const leastReservedManifestation=work.manifestations.all.find((manifestation=>(0,general.G_)(manifestation.pid)===leastReservedData.recordId));if(!leastReservedManifestation)return;currentManifestationPids.includes(leastReservedManifestation.pid)||(setIsOtherManifestationPreferred(!0),setOtherManifestationPreferred({...leastReservedManifestation,...leastReservedData}))}}),[availabilityData,currentManifestationPids,work]),{isOtherManifestationPreferred,otherManifestationPreferred}};var PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const InstantLoanSummary=({pid,className})=>{const t=(0,utils_text.F)();return react.createElement("div",{className},react.createElement("div",{className:"pagefold-triangle--small"}),react.createElement(cover.Y,{ids:[pid],size:"small",animate:!0}),react.createElement("div",null,react.createElement("h2",{className:"text-header-h4 mt-22 mb-4"},t("instantLoanTitleText")),react.createElement("p",{className:"text-small-caption"},t("instantLoanSubTitleText")),react.createElement("div",{className:"instant-loan-underline mt-35"},react.createElement("p",{className:"link-tag text-small-caption"},t("instantLoanUnderlineDescriptionText")),react.createElement("img",{className:"instant-loan-arrow",src:ExpandMore_default(),alt:""}))))},instant_loan_InstantLoanSummary=InstantLoanSummary;try{InstantLoanSummary.displayName="InstantLoanSummary",InstantLoanSummary.__docgenInfo={description:"",displayName:"InstantLoanSummary",props:{pid:{defaultValue:null,description:"",name:"pid",required:!0,type:{name:"`${number}-${string}:${string}`"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"]={docgenInfo:InstantLoanSummary.__docgenInfo,name:"InstantLoanSummary",path:"src/components/instant-loan/InstantLoanSummary.tsx#InstantLoanSummary"})}catch(__react_docgen_typescript_loader_error){}var availability_label_inside=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx"),availability_label_helper=__webpack_require__("./src/components/availability-label/helper.ts");const availability_label_visual=({manifestText,selected,cursorPointer,isAvailable,quantity,availabilityText})=>{const t=(0,utils_text.F)(),getAvailabilityText=availabilityText||t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");return react.createElement("div",{className:(0,availability_label_helper.Mk)({selected,cursorPointer})},react.createElement(availability_label_inside.A,{selected,isAvailable,manifestText,availabilityText:getAvailabilityText,quantity,isLoading:!1}))};try{availabilitylabelvisual.displayName="availabilitylabelvisual",availabilitylabelvisual.__docgenInfo={description:"",displayName:"availabilitylabelvisual",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}},cursorPointer:{defaultValue:null,description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"]={docgenInfo:availabilitylabelvisual.__docgenInfo,name:"availabilitylabelvisual",path:"src/components/availability-label/availability-label-visual.tsx#availabilitylabelvisual"})}catch(__react_docgen_typescript_loader_error){}const InstantLoanBranch=({branch:{branch:{title},materials},materialType})=>react.createElement("div",{className:"instant-loan-branch px-24","data-cy":"instant-loan-branch"},react.createElement("p",{className:"text-header-h5"},title),react.createElement(availability_label_visual,{manifestText:materialType,isAvailable:!0,quantity:materials.length})),instant_loan_InstantLoanBranch=InstantLoanBranch;try{InstantLoanBranch.displayName="InstantLoanBranch",InstantLoanBranch.__docgenInfo={description:"",displayName:"InstantLoanBranch",props:{branch:{defaultValue:null,description:"",name:"branch",required:!0,type:{name:"HoldingsV3"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"]={docgenInfo:InstantLoanBranch.__docgenInfo,name:"InstantLoanBranch",path:"src/components/instant-loan/InstantLoanBranch.tsx#InstantLoanBranch"})}catch(__react_docgen_typescript_loader_error){}const InstantLoan=({manifestation,instantLoanBranchHoldings})=>{const{pid,materialTypes}=manifestation,materialType=materialTypes[0].materialTypeSpecific.display;return react.createElement(DisclosureControllable.A,{id:"instant-loan",className:"pagefold-parent--small disclosure--full-width",summary:react.createElement(instant_loan_InstantLoanSummary,{pid,className:"instant-loan-summary cursor-pointer p-24"}),cyData:"instant-loan"},react.createElement("ul",{className:"instant-loan-branches","data-cy":"instant-loan-branches"},instantLoanBranchHoldings.map((branch=>react.createElement("li",{key:branch.branch.branchId},react.createElement(instant_loan_InstantLoanBranch,{branch,materialType}))))))},instant_loan_InstantLoan=InstantLoan;try{InstantLoan.displayName="InstantLoan",InstantLoan.__docgenInfo={description:"",displayName:"InstantLoan",props:{manifestation:{defaultValue:null,description:"",name:"manifestation",required:!0,type:{name:"Manifestation"}},instantLoanBranchHoldings:{defaultValue:null,description:"",name:"instantLoanBranchHoldings",required:!0,type:{name:"HoldingsV3[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/instant-loan/InstantLoan.tsx#InstantLoan"]={docgenInfo:InstantLoan.__docgenInfo,name:"InstantLoan",path:"src/components/instant-loan/InstantLoan.tsx#InstantLoan"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),configuration=__webpack_require__("./src/core/configuration/index.ts");const ReservationModalBody=({selectedManifestations,selectedPeriodical,work})=>{var _reservationResponse$,_manifestation$editio,_openOrderResponse$su,_openOrderResponse$su2;const t=(0,utils_text.F)(),config=(0,utils_config.UK)(),{defaultInterestDaysForOpenOrder}=(0,configuration.FI)("reservation",configuration.Ay),{matchStrings:instantLoanMatchStrings,threshold:instantLoanThreshold,enabled:instantLoanEnabled}=config("instantLoanConfig",{transformer:"jsonParse"}),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranchesInstantLoan=config("blacklistedInstantLoanBranchesConfig",{transformer:"stringToArray"}),blacklistPickupBranches=config("blacklistedPickupBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.z5)(branches,blacklistBranchesInstantLoan.concat(blacklistPickupBranches)),mainManifestationType=(0,general.VZ)(selectedManifestations),{reservableManifestations}=utils_UseReservableManifestations({manifestations:selectedManifestations,type:mainManifestationType}),queryClient=(0,react_query_es.useQueryClient)(),[reservationResponse,setReservationResponse]=(0,react.useState)(null),[openOrderResponse,setOpenOrderResponse]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(null),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),allPids=(0,general.Y5)(selectedManifestations),faustIds=(0,general.OH)(allPids),{mutate:mutateAddReservations}=(0,fbs.eu)(),{mutate:mutateOpenOrder}=(0,graphql.Bv)(),userResponse=(0,usePatronData.I)(),holdingsResponse=(0,material_helper.us)({faustIds,config}),{track}=(0,useStatistics.B)(),{otherManifestationPreferred}=reservation_useAlternativeAvailableManifestation(work,allPids),manifestationsToReserve=(0,reservation_helper.hn)(reservableManifestations??[],!!selectedPeriodical),{reservablePidsFromAnotherLibrary,materialIsReservableFromAnotherLibrary}=utils_useReservableFromAnotherLibrary(selectedManifestations);if(!userResponse.data||!holdingsResponse.data)return null;const{data:userData}=userResponse,{data:holdingsData}=holdingsResponse,holdings=(0,material_helper.Rr)(holdingsData),reservations=(0,material_helper._i)(holdingsData),{patron}=userData,authorLine=(0,reservation_helper.CF)(selectedManifestations[0],t),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),interestPeriod=selectedInterest||interestPeriods.defaultInterestPeriod.value,expiryDate=(0,reservation_helper.ZI)(interestPeriod),reservationSuccess=(null==reservationResponse?void 0:reservationResponse.success)||!1,reservationResults=null==reservationResponse?void 0:reservationResponse.reservationResults,reservationDetails=null==reservationResponse||null===(_reservationResponse$=reservationResponse.reservationResults[0])||void 0===_reservationResponse$?void 0:_reservationResponse$.reservationDetails,manifestation=(null==manifestationsToReserve?void 0:manifestationsToReserve[0])||selectedManifestations[0],editionText=(0,general.G)(work)&&1!==(null==manifestationsToReserve?void 0:manifestationsToReserve.length)?t("firstAvailableEditionText"):null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio?void 0:_manifestation$editio.summary,instantLoanBranchHoldings=(0,reservation_helper.QW)(holdingsData[0].holdings,whitelistBranches,instantLoanMatchStrings??[]),instantLoanBranchHoldingsAboveThreshold=(0,reservation_helper.mR)(instantLoanBranchHoldings,instantLoanThreshold);return react.createElement(react.Fragment,null,!reservationResults&&!openOrderResponse&&react.createElement("section",{className:"reservation-modal"},react.createElement("header",{className:"reservation-modal-header"},react.createElement(cover.Y,{ids:[manifestation.pid],size:"medium",animate:!0}),react.createElement("div",{className:"reservation-modal-description"},react.createElement("div",{className:"reservation-modal-tag"},(0,general.JB)(selectedManifestations)[0]),react.createElement("h2",{className:"text-header-h2 mt-22 mb-8"},manifestation.titles.main,selectedPeriodical&&` ${selectedPeriodical.displayText}`),authorLine&&react.createElement("p",{className:"text-body-medium-regular"},authorLine))),react.createElement("div",null,react.createElement("div",{className:"reservation-modal-submit"},react.createElement(generic_MaterialAvailabilityTextParagraph,null,materialIsReservableFromAnotherLibrary?t("reservableFromAnotherLibraryText"):react.createElement(material_StockAndReservationInfo,{stockCount:holdings,reservationCount:reservations})),react.createElement(Button.$,{dataCy:"reservation-modal-submit-button",label:t("approveReservationText"),buttonType:"none",variant:"filled",disabled:!1,collapsible:!1,size:"small",onClick:()=>{if(null!=manifestationsToReserve&&manifestationsToReserve.length&&mutateAddReservations({data:(0,reservation_helper.wT)({manifestations:manifestationsToReserve,selectedBranch,expiryDate,periodical:selectedPeriodical})},{onSuccess:res=>{track("click",{id:statistics.o.reservation.id,name:statistics.o.reservation.name,trackedData:work.workId}),setReservationResponse(res),queryClient.invalidateQueries((0,fbs.BK)({recordid:faustIds}))}}),materialIsReservableFromAnotherLibrary&&patron){const{patronId,name,emailAddress,preferredPickupBranch}=patron;mutateOpenOrder({input:{pids:reservablePidsFromAnotherLibrary,pickUpBranch:selectedBranch?(0,reservation_helper.kd)(selectedBranch):(0,reservation_helper.kd)(preferredPickupBranch),expires:(0,reservation_helper.c8)(Number(selectedInterest??defaultInterestDaysForOpenOrder)),userParameters:{userId:patronId.toString(),userName:name,userMail:emailAddress}}},{onSuccess:res=>{setOpenOrderResponse(res)}})}}})),react.createElement("div",{className:"reservation-modal-list"},react.createElement(ReservationFormListItem.A,{icon:Various_default(),title:t("editionText"),text:(null==selectedPeriodical?void 0:selectedPeriodical.displayText)||editionText||""}),!(0,general.G)(work)&&otherManifestationPreferred&&react.createElement(PromoBar.A,{classNames:"px-35",sticky:!0,type:"info",text:t("materialIsAvailableInAnotherEditionText",{placeholders:{"@title":otherManifestationPreferred.titles.main[0],"@authorAndYear":(0,reservation_helper.CF)(otherManifestationPreferred,t)??"","@reservations":otherManifestationPreferred.reservations}})}),patron&&react.createElement(reservation_UserListItems,{whitelistBranches,patron,branches,selectedBranch,selectBranchHandler:setSelectedBranch,selectedInterest:materialIsReservableFromAnotherLibrary&&null===selectedInterest?Number(defaultInterestDaysForOpenOrder):selectedInterest,setSelectedInterest}),instantLoanEnabled&&instantLoanBranchHoldingsAboveThreshold.length>0&&react.createElement(instant_loan_InstantLoan,{manifestation,instantLoanBranchHoldings:instantLoanBranchHoldingsAboveThreshold})))),(null==openOrderResponse||null===(_openOrderResponse$su=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su?void 0:_openOrderResponse$su.status)&&react.createElement(ModalMessage.A,{title:t("openOrderResponseTitleText"),subTitle:manifestation.titles.main[0],ctaButton:{text:t("okButtonText"),modalId:(0,material_helper.bE)(faustIds),dataCy:"reservation-success-close-button"}},openOrderResponse.submitOrder.status&&react.createElement("p",{"data-cy":"open-oprder-response-status-text",className:"text-body-medium-regular pt-24"},(0,reservation_helper.pS)(null===(_openOrderResponse$su2=openOrderResponse.submitOrder)||void 0===_openOrderResponse$su2?void 0:_openOrderResponse$su2.status,t))),reservationSuccess&&reservationDetails&&react.createElement(reservation_ReservationSucces,{modalId:(0,material_helper.bE)(faustIds),title:manifestation.titles.main[0],preferredPickupBranch:(0,reservation_helper.C4)(reservationDetails.pickupBranch,branches),holdings,numberInQueue:reservationDetails.numberInQueue}),!reservationSuccess&&reservationResults&&react.createElement(reservation_ReservationError,{reservationResults,setReservationResponse}))};try{ReservationModalBody.displayName="ReservationModalBody",ReservationModalBody.__docgenInfo={description:"",displayName:"ReservationModalBody",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"]={docgenInfo:ReservationModalBody.__docgenInfo,name:"ReservationModalBody",path:"src/components/reservation/ReservationModalBody.tsx#ReservationModalBody"})}catch(__react_docgen_typescript_loader_error){}const ReservationModal=({selectedManifestations,selectedPeriodical=null,work,dataCy})=>{const t=(0,utils_text.F)(),faustIds=(0,general.bn)(selectedManifestations);return react.createElement(modal.A,{modalId:(0,material_helper.bE)(faustIds),screenReaderModalDescriptionText:t("reservationModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("reservationModalCloseModalAriaLabelText"),dataCy:dataCy||"reservation-modal"},react.createElement(ReservationModalBody,{selectedManifestations,selectedPeriodical,work}))},reservation_ReservationModal=ReservationModal;try{ReservationModal.displayName="ReservationModal",ReservationModal.__docgenInfo={description:"",displayName:"ReservationModal",props:{selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:{value:"null"},description:"",name:"selectedPeriodical",required:!1,type:{name:"PeriodicalEdition | null | undefined"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationModal.tsx#ReservationModal"]={docgenInfo:ReservationModal.__docgenInfo,name:"ReservationModal",path:"src/components/reservation/ReservationModal.tsx#ReservationModal"})}catch(__react_docgen_typescript_loader_error){}var FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const ReservationFindOnShelfModals=({patron,manifestations,selectedPeriodical,setSelectedPeriodical,work})=>{const isUserBlocked=!(!patron||!(0,user.lT)(patron)),titles=manifestations.length>1?work.titles.full:manifestations[0].titles.main,authors=manifestations.length>1?work.creators:manifestations[0].creators;return react.createElement(react.Fragment,null,!(0,user.ok)()&&!isUserBlocked&&react.createElement(reservation_ReservationModal,{selectedManifestations:manifestations,selectedPeriodical,work,dataCy:manifestations.length>1?"reservation-modal-parallel":void 0}),react.createElement(FindOnShelfModal.A,{manifestations,workTitles:titles,authors,selectedPeriodical,setSelectedPeriodical}))},material_ReservationFindOnShelfModals=ReservationFindOnShelfModals;try{ReservationFindOnShelfModals.displayName="ReservationFindOnShelfModals",ReservationFindOnShelfModals.__docgenInfo={description:"",displayName:"ReservationFindOnShelfModals",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | undefined"}},manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"Dispatch>"}},work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"]={docgenInfo:ReservationFindOnShelfModals.__docgenInfo,name:"ReservationFindOnShelfModals",path:"src/apps/material/ReservationFindOnShelfModals.tsx#ReservationFindOnShelfModals"})}catch(__react_docgen_typescript_loader_error){}const material_material=({wid})=>{const t=(0,utils_text.F)(),[selectedManifestations,setSelectedManifestations]=(0,react.useState)(null),[selectedPeriodical,setSelectedPeriodical]=(0,react.useState)(null),{data,isLoading,workType}=(wid=>{const localWork=(0,graphql.RR)({wid}),globalWork=(0,graphql.VL)({wid},{enabled:localWork.isSuccess&&!localWork.data.work}),localWorkData=getData(localWork,"local");if(localWorkData)return localWorkData;return getData(globalWork,"global")||{data:null,isLoading:!0,error:null,workType:"unknown"}})(wid),{data:userData}=(0,usePatronData.I)(),[isUserBlocked,setIsUserBlocked]=(0,react.useState)(null),{track}=(0,useStatistics.B)();if((0,react.useEffect)((()=>{setIsUserBlocked(!(null==userData||!userData.patron||!(0,user.lT)(userData.patron)))}),[userData]),(0,useDeepCompareEffect.A)((()=>{var _data$work,_data$work2,_data$work3,_data$work4,_data$work4$manifesta,_data$work5;null!=data&&null!==(_data$work=data.work)&&void 0!==_data$work&&_data$work.genreAndForm&&track("click",{id:statistics.o.materialGenre.id,name:statistics.o.materialGenre.name,trackedData:data.work.genreAndForm.join(", ")}),null!=data&&null!==(_data$work2=data.work)&&void 0!==_data$work2&&_data$work2.mainLanguages&&track("click",{id:statistics.o.materialLanguage.id,name:statistics.o.materialLanguage.name,trackedData:data.work.mainLanguages.map((language=>language.display)).join(", ")}),null!=data&&null!==(_data$work3=data.work)&&void 0!==_data$work3&&_data$work3.dk5MainEntry&&track("click",{id:statistics.o.materialTopicNumber.id,name:statistics.o.materialTopicNumber.name,trackedData:data.work.dk5MainEntry.display}),null!=data&&null!==(_data$work4=data.work)&&void 0!==_data$work4&&null!==(_data$work4$manifesta=_data$work4.manifestations.latest.audience)&&void 0!==_data$work4$manifesta&&_data$work4$manifesta.generalAudience&&track("click",{id:statistics.o.materialTopicNumber.id,name:statistics.o.materialTopicNumber.name,trackedData:data.work.manifestations.latest.audience.generalAudience.join(", ")}),null!=data&&null!==(_data$work5=data.work)&&void 0!==_data$work5&&_data$work5.fictionNonfiction&&track("click",{id:statistics.o.materialFictionNonFiction.id,name:statistics.o.materialFictionNonFiction.name,trackedData:data.work.fictionNonfiction.display})}),[data]),(0,react.useEffect)((()=>{var _manifestationsByMate;if(null==data||!data.work)return;const{work}=data,urlType=(0,helpers_url.d6)("type"),manifestationsByMaterialType=(0,material_helper.Zh)(work.manifestations.all);if(urlType&&(null===(_manifestationsByMate=manifestationsByMaterialType[urlType])||void 0===_manifestationsByMate?void 0:_manifestationsByMate.length)>0)setSelectedManifestations(manifestationsByMaterialType[urlType]);else{const bestMaterialType=(0,material_helper.SL)(work);setSelectedManifestations(manifestationsByMaterialType[bestMaterialType]),(0,helpers_url.$u)({type:bestMaterialType})}}),[data]),isLoading||null==data||!data.work||!selectedManifestations)return react.createElement(material_MaterialSkeleton,null);const{work,work:{manifestations:{all:manifestations},relations:{hasReview}}}=data,pid=(0,general.hh)(work),detailsListData=(0,material_helper.nW)({manifestation:selectedManifestations[0],work,t}),infomediaIds=(0,material_helper.LX)(selectedManifestations),shouldOpenReviewDisclosure=!!(0,helpers_url.d6)("disclosure");return react.createElement("section",{className:"material-page"},react.createElement(material_MaterialHeader,{wid,work,selectedManifestations,setSelectedManifestations,selectedPeriodical,selectPeriodicalHandler:setSelectedPeriodical,isGlobalMaterial:"global"===workType},manifestations.map((manifestation=>react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:[manifestation],selectedPeriodical,work,setSelectedPeriodical}))),infomediaIds.length>0&&!(0,user.ok)()&&!isUserBlocked&&react.createElement(infomedia_InfomediaModal,{selectedManifestations,infoMediaId:infomediaIds[0]}),(0,material_buttons_helper.ft)("DigitalArticleService",selectedManifestations)&&!(0,user.ok)()&&!isUserBlocked&&react.createElement(digital_modal_DigitalModal,{pid:selectedManifestations[0].pid,workId:wid}),(0,material_helper.E1)(selectedManifestations)&&react.createElement(material_ReservationFindOnShelfModals,{patron:null==userData?void 0:userData.patron,manifestations:selectedManifestations,selectedPeriodical,work,setSelectedPeriodical})),react.createElement(material_MaterialDescription,{pid,work}),"local"===workType&&react.createElement(material_MaterialDisclosure,{title:`${t("editionsText")} (${manifestations.length})`,icon:Various_default(),dataCy:"material-editions-disclosure"},react.createElement(react.Fragment,null,(0,material_helper.zi)(manifestations).map((manifestation=>react.createElement(material_MaterialMainfestationItem,{key:manifestation.pid,manifestation,workId:wid}))))),react.createElement(material_MaterialDisclosure,{dataCy:"material-details-disclosure",title:t("detailsText"),icon:Receipt_default()},react.createElement(MaterialDetailsList.A,{id:`material-details-${wid}`,className:"pl-80 pb-48",data:detailsListData})),hasReview&&hasReview.length>0&&react.createElement(DisclosureControllable.A,{id:"reviews",showContent:shouldOpenReviewDisclosure,cyData:"material-reviews-disclosure",summary:react.createElement(DisclosureSummary.A,{title:t("reviewsText"),mainIconPath:Create_default()})},react.createElement(MaterialReviews,{pids:hasReview.map((review=>review.pid))})))};try{material.displayName="material",material.__docgenInfo={description:"",displayName:"material",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.tsx#material"]={docgenInfo:material.__docgenInfo,name:"material",path:"src/apps/material/material.tsx#material"})}catch(__react_docgen_typescript_loader_error){}const material_entry=(0,utils_config.NV)((0,url.nU)((0,utils_text.i)((({wid})=>react.createElement(guarded_app.A,{app:"material"},react.createElement(material_material,{wid}))))));try{materialentry.displayName="materialentry",materialentry.__docgenInfo={description:"",displayName:"materialentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},alreadyReservedText:{defaultValue:null,description:"",name:"alreadyReservedText",required:!0,type:{name:"string"}},approveReservationText:{defaultValue:null,description:"",name:"approveReservationText",required:!0,type:{name:"string"}},blockedButtonText:{defaultValue:null,description:"",name:"blockedButtonText",required:!0,type:{name:"string"}},cantReserveText:{defaultValue:null,description:"",name:"cantReserveText",required:!0,type:{name:"string"}},cantViewReviewText:{defaultValue:null,description:"",name:"cantViewReviewText",required:!0,type:{name:"string"}},cantViewText:{defaultValue:null,description:"",name:"cantViewText",required:!0,type:{name:"string"}},changeEmailText:{defaultValue:null,description:"",name:"changeEmailText",required:!0,type:{name:"string"}},changeSmsNumberText:{defaultValue:null,description:"",name:"changeSmsNumberText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},closeText:{defaultValue:null,description:"",name:"closeText",required:!0,type:{name:"string"}},daysText:{defaultValue:null,description:"",name:"daysText",required:!0,type:{name:"string"}},descriptionHeadlineText:{defaultValue:null,description:"",name:"descriptionHeadlineText",required:!0,type:{name:"string"}},detailsListAudienceText:{defaultValue:null,description:"",name:"detailsListAudienceText",required:!0,type:{name:"string"}},detailsListAgeRangeText:{defaultValue:null,description:"",name:"detailsListAgeRangeText",required:!0,type:{name:"string"}},detailsListAuthorsText:{defaultValue:null,description:"",name:"detailsListAuthorsText",required:!0,type:{name:"string"}},detailsListNotesText:{defaultValue:null,description:"",name:"detailsListNotesText",required:!0,type:{name:"string"}},detailsListPhysicalDescriptionText:{defaultValue:null,description:"",name:"detailsListPhysicalDescriptionText",required:!0,type:{name:"string"}},detailsListHostPublicationText:{defaultValue:null,description:"",name:"detailsListHostPublicationText",required:!0,type:{name:"string"}},detailsListSourceText:{defaultValue:null,description:"",name:"detailsListSourceText",required:!0,type:{name:"string"}},detailsListPartsText:{defaultValue:null,description:"",name:"detailsListPartsText",required:!0,type:{name:"string"}},detailsListContributorsText:{defaultValue:null,description:"",name:"detailsListContributorsText",required:!0,type:{name:"string"}},detailsListEditionText:{defaultValue:null,description:"",name:"detailsListEditionText",required:!0,type:{name:"string"}},detailsListFirstEditionYearText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearText",required:!0,type:{name:"string"}},detailsListFirstEditionYearUnknownText:{defaultValue:null,description:"",name:"detailsListFirstEditionYearUnknownText",required:!0,type:{name:"string"}},detailsListGenreAndFormText:{defaultValue:null,description:"",name:"detailsListGenreAndFormText",required:!0,type:{name:"string"}},detailsListIsbnText:{defaultValue:null,description:"",name:"detailsListIsbnText",required:!0,type:{name:"string"}},detailsListLanguageText:{defaultValue:null,description:"",name:"detailsListLanguageText",required:!0,type:{name:"string"}},detailsListOriginalTitleText:{defaultValue:null,description:"",name:"detailsListOriginalTitleText",required:!0,type:{name:"string"}},detailsListPlayTimeText:{defaultValue:null,description:"",name:"detailsListPlayTimeText",required:!0,type:{name:"string"}},detailsListPublisherText:{defaultValue:null,description:"",name:"detailsListPublisherText",required:!0,type:{name:"string"}},detailsListScopeText:{defaultValue:null,description:"",name:"detailsListScopeText",required:!0,type:{name:"string"}},detailsListTypeText:{defaultValue:null,description:"",name:"detailsListTypeText",required:!0,type:{name:"string"}},detailsOfTheMaterialText:{defaultValue:null,description:"",name:"detailsOfTheMaterialText",required:!0,type:{name:"string"}},detailsText:{defaultValue:null,description:"",name:"detailsText",required:!0,type:{name:"string"}},editionsText:{defaultValue:null,description:"",name:"editionsText",required:!0,type:{name:"string"}},editionText:{defaultValue:null,description:"",name:"editionText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},expandMoreText:{defaultValue:null,description:"",name:"expandMoreText",required:!0,type:{name:"string"}},fictionNonfictionText:{defaultValue:null,description:"",name:"fictionNonfictionText",required:!0,type:{name:"string"}},filmAdaptationsText:{defaultValue:null,description:"",name:"filmAdaptationsText",required:!0,type:{name:"string"}},findOnBookshelfText:{defaultValue:null,description:"",name:"findOnBookshelfText",required:!0,type:{name:"string"}},findOnShelfModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"findOnShelfModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfModalListFindOnShelfText:{defaultValue:null,description:"",name:"findOnShelfModalListFindOnShelfText",required:!0,type:{name:"string"}},findOnShelfModalListItemCountText:{defaultValue:null,description:"",name:"findOnShelfModalListItemCountText",required:!0,type:{name:"string"}},findOnShelfModalListMaterialText:{defaultValue:null,description:"",name:"findOnShelfModalListMaterialText",required:!0,type:{name:"string"}},findOnShelfModalNoLocationSpecifiedText:{defaultValue:null,description:"",name:"findOnShelfModalNoLocationSpecifiedText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalEditionDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalEditionDropdownText",required:!0,type:{name:"string"}},findOnShelfModalPeriodicalYearDropdownText:{defaultValue:null,description:"",name:"findOnShelfModalPeriodicalYearDropdownText",required:!0,type:{name:"string"}},findOnShelfModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"findOnShelfModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},findOnShelfTableDescriptionText:{defaultValue:null,description:"",name:"findOnShelfTableDescriptionText",required:!0,type:{name:"string"}},firstAvailableEditionText:{defaultValue:null,description:"",name:"firstAvailableEditionText",required:!0,type:{name:"string"}},getOnlineText:{defaultValue:null,description:"",name:"getOnlineText",required:!0,type:{name:"string"}},goToText:{defaultValue:null,description:"",name:"goToText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},identifierText:{defaultValue:null,description:"",name:"identifierText",required:!0,type:{name:"string"}},infomediaModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"infomediaModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},infomediaModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"infomediaModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},inSameSeriesText:{defaultValue:null,description:"",name:"inSameSeriesText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},instantLoanSubTitleText:{defaultValue:null,description:"",name:"instantLoanSubTitleText",required:!0,type:{name:"string"}},instantLoanTitleText:{defaultValue:null,description:"",name:"instantLoanTitleText",required:!0,type:{name:"string"}},instantLoanUnderlineDescriptionText:{defaultValue:null,description:"",name:"instantLoanUnderlineDescriptionText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},librariesHaveTheMaterialText:{defaultValue:null,description:"",name:"librariesHaveTheMaterialText",required:!0,type:{name:"string"}},listenOnlineText:{defaultValue:null,description:"",name:"listenOnlineText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},loginToSeeReviewText:{defaultValue:null,description:"",name:"loginToSeeReviewText",required:!0,type:{name:"string"}},materialHeaderAllEditionsText:{defaultValue:null,description:"",name:"materialHeaderAllEditionsText",required:!0,type:{name:"string"}},materialHeaderAuthorByText:{defaultValue:null,description:"",name:"materialHeaderAuthorByText",required:!0,type:{name:"string"}},materialIsAvailableInAnotherEditionText:{defaultValue:null,description:"",name:"materialIsAvailableInAnotherEditionText",required:!0,type:{name:"string"}},materialIsIncludedText:{defaultValue:null,description:"",name:"materialIsIncludedText",required:!0,type:{name:"string"}},materialIsLoanedOutText:{defaultValue:null,description:"",name:"materialIsLoanedOutText",required:!0,type:{name:"string"}},materialReservationInfoText:{defaultValue:null,description:"",name:"materialReservationInfoText",required:!0,type:{name:"string"}},materialsInStockInfoText:{defaultValue:null,description:"",name:"materialsInStockInfoText",required:!0,type:{name:"string"}},missingDataText:{defaultValue:null,description:"",name:"missingDataText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormEmailHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormEmailInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormEmailInputFieldLabelText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormSmsHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldDescriptionText",required:!0,type:{name:"string"}},modalReservationFormSmsInputFieldLabelText:{defaultValue:null,description:"",name:"modalReservationFormSmsInputFieldLabelText",required:!0,type:{name:"string"}},notLivingInMunicipalityText:{defaultValue:null,description:"",name:"notLivingInMunicipalityText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},numberInQueueText:{defaultValue:null,description:"",name:"numberInQueueText",required:!0,type:{name:"string"}},okButtonText:{defaultValue:null,description:"",name:"okButtonText",required:!0,type:{name:"string"}},onlineLimitMonthAudiobookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthAudiobookInfoText",required:!0,type:{name:"string"}},onlineLimitMonthEbookInfoText:{defaultValue:null,description:"",name:"onlineLimitMonthEbookInfoText",required:!0,type:{name:"string"}},openOrderAuthenticationErrorText:{defaultValue:null,description:"",name:"openOrderAuthenticationErrorText",required:!0,type:{name:"string"}},openOrderErrorMissingPincodeText:{defaultValue:null,description:"",name:"openOrderErrorMissingPincodeText",required:!0,type:{name:"string"}},openOrderInvalidOrderText:{defaultValue:null,description:"",name:"openOrderInvalidOrderText",required:!0,type:{name:"string"}},openOrderNoServicerequesterText:{defaultValue:null,description:"",name:"openOrderNoServicerequesterText",required:!0,type:{name:"string"}},openOrderNotOwnedIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedNoIllLocText:{defaultValue:null,description:"",name:"openOrderNotOwnedNoIllLocText",required:!0,type:{name:"string"}},openOrderNotOwnedWrongIllMediumtypeText:{defaultValue:null,description:"",name:"openOrderNotOwnedWrongIllMediumtypeText",required:!0,type:{name:"string"}},openOrderOrsErrorText:{defaultValue:null,description:"",name:"openOrderOrsErrorText",required:!0,type:{name:"string"}},openOrderOwnedOwnCatalogueText:{defaultValue:null,description:"",name:"openOrderOwnedOwnCatalogueText",required:!0,type:{name:"string"}},openOrderOwnedWrongMediumtypeText:{defaultValue:null,description:"",name:"openOrderOwnedWrongMediumtypeText",required:!0,type:{name:"string"}},openOrderResponseTitleText:{defaultValue:null,description:"",name:"openOrderResponseTitleText",required:!0,type:{name:"string"}},openOrderServiceUnavailableText:{defaultValue:null,description:"",name:"openOrderServiceUnavailableText",required:!0,type:{name:"string"}},openOrderStatusOwnedAcceptedText:{defaultValue:null,description:"",name:"openOrderStatusOwnedAcceptedText",required:!0,type:{name:"string"}},openOrderUnknownErrorText:{defaultValue:null,description:"",name:"openOrderUnknownErrorText",required:!0,type:{name:"string"}},openOrderUnknownPickupagencyText:{defaultValue:null,description:"",name:"openOrderUnknownPickupagencyText",required:!0,type:{name:"string"}},openOrderUnknownUserText:{defaultValue:null,description:"",name:"openOrderUnknownUserText",required:!0,type:{name:"string"}},openOrderUserBlockedByAgencyText:{defaultValue:null,description:"",name:"openOrderUserBlockedByAgencyText",required:!0,type:{name:"string"}},openOrderUserNoLongerExistOnAgencyText:{defaultValue:null,description:"",name:"openOrderUserNoLongerExistOnAgencyText",required:!0,type:{name:"string"}},openOrderUserNotVerifiedText:{defaultValue:null,description:"",name:"openOrderUserNotVerifiedText",required:!0,type:{name:"string"}},orderDigitalCopyButtonLoadingText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonLoadingText",required:!0,type:{name:"string"}},orderDigitalCopyButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyButtonText",required:!0,type:{name:"string"}},orderDigitalCopyDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyEmailLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyEmailLabelText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackButtonText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackButtonText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorAgencyNotSubscribedText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorInvalidPickupBranchText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMissingClientConfigurationText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorPidNotReservableText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorUnauthenticatedUserText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackOkText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackOkText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackTitleText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackBorchkUserNotVerifiedText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackBorchkUserNotVerifiedText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackUnknownUserText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackUnknownUserText",required:!0,type:{name:"string"}},orderDigitalCopyModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"orderDigitalCopyModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"orderDigitalCopyModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},orderDigitalCopyFeedbackErrorMissingMunicipalityagencyidText:{defaultValue:null,description:"",name:"orderDigitalCopyFeedbackErrorMissingMunicipalityagencyidText",required:!0,type:{name:"string"}},orderDigitalCopyTitleText:{defaultValue:null,description:"",name:"orderDigitalCopyTitleText",required:!0,type:{name:"string"}},outOfText:{defaultValue:null,description:"",name:"outOfText",required:!0,type:{name:"string"}},periodicalSelectEditionText:{defaultValue:null,description:"",name:"periodicalSelectEditionText",required:!0,type:{name:"string"}},periodicalSelectYearText:{defaultValue:null,description:"",name:"periodicalSelectYearText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},queueText:{defaultValue:null,description:"",name:"queueText",required:!0,type:{name:"string"}},ratingIsText:{defaultValue:null,description:"",name:"ratingIsText",required:!0,type:{name:"string"}},readArticleText:{defaultValue:null,description:"",name:"readArticleText",required:!0,type:{name:"string"}},receiveEmailWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveEmailWhenMaterialReadyText",required:!0,type:{name:"string"}},receiveSmsWhenMaterialReadyText:{defaultValue:null,description:"",name:"receiveSmsWhenMaterialReadyText",required:!0,type:{name:"string"}},reservableFromAnotherLibraryText:{defaultValue:null,description:"",name:"reservableFromAnotherLibraryText",required:!0,type:{name:"string"}},reservationErrorsDescriptionText:{defaultValue:null,description:"",name:"reservationErrorsDescriptionText",required:!0,type:{name:"string"}},reservationErrorsTitleText:{defaultValue:null,description:"",name:"reservationErrorsTitleText",required:!0,type:{name:"string"}},reservationModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"reservationModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},reservationModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"reservationModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},reservationSuccesIsReservedForYouText:{defaultValue:null,description:"",name:"reservationSuccesIsReservedForYouText",required:!0,type:{name:"string"}},reservationSuccessPreferredPickupBranchText:{defaultValue:null,description:"",name:"reservationSuccessPreferredPickupBranchText",required:!0,type:{name:"string"}},reservationSuccesTitleText:{defaultValue:null,description:"",name:"reservationSuccesTitleText",required:!0,type:{name:"string"}},reserveBookText:{defaultValue:null,description:"",name:"reserveBookText",required:!0,type:{name:"string"}},reserveText:{defaultValue:null,description:"",name:"reserveText",required:!0,type:{name:"string"}},reserveWithMaterialTypeText:{defaultValue:null,description:"",name:"reserveWithMaterialTypeText",required:!0,type:{name:"string"}},reviewsText:{defaultValue:null,description:"",name:"reviewsText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},seeOnlineText:{defaultValue:null,description:"",name:"seeOnlineText",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},subjectNumberText:{defaultValue:null,description:"",name:"subjectNumberText",required:!0,type:{name:"string"}},tryAginButtonText:{defaultValue:null,description:"",name:"tryAginButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedInstantLoanBranchesConfig:{defaultValue:null,description:"",name:"blacklistedInstantLoanBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},instantLoanConfig:{defaultValue:null,description:"",name:"instantLoanConfig",required:!0,type:{name:"string"}},smsNotificationsForReservationsEnabledConfig:{defaultValue:null,description:"",name:"smsNotificationsForReservationsEnabledConfig",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/material/material.entry.tsx#materialentry"]={docgenInfo:materialentry.__docgenInfo,name:"materialentry",path:"src/apps/material/material.entry.tsx#materialentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const material_dev={title:"Apps / Material",component:material_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},wid:{name:"Work ID",defaultValue:"work-of:870970-basis:52557240",control:{type:"text"}},smsNotificationsForReservationsEnabledConfig:{name:"SMS notifications for reservations is enabled",defaultValue:"1",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},blacklistedInstantLoanBranchesConfig:{name:"Blacklisted Instant Loan branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024,DK-775164",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},materialHeaderAllEditionsText:{name:"Text for the fiction edition text",defaultValue:"All editions",control:{type:"text"}},materialHeaderAuthorByText:{name:"By (author)",defaultValue:"By",control:{type:"text"}},periodicalSelectYearText:{name:"Year",defaultValue:"Year",control:{type:"text"}},periodicalSelectEditionText:{name:"Edition/Week",defaultValue:"Edition",control:{type:"text"}},reserveBookText:{name:"Reserve",defaultValue:"Reserve book",control:{type:"text"}},reserveText:{name:"Reserve",defaultValue:"Reserve",control:{type:"text"}},reserveWithMaterialTypeText:{name:"Reserve",defaultValue:"Reserve @materialType",control:{type:"text"}},reservableFromAnotherLibraryText:{name:"Reservable on another library",defaultValue:"Ordered from another library.",control:{type:"text"}},findOnBookshelfText:{name:"Find on bookshelf",defaultValue:"Find on shelf",control:{type:"text"}},descriptionHeadlineText:{name:"Description headline",defaultValue:"Description",control:{type:"text"}},identifierText:{name:"Identifier/topic text",defaultValue:"Tags",control:{type:"text"}},inSameSeriesText:{name:"In same series as",defaultValue:"In the same series",control:{type:"text"}},numberDescriptionText:{name:"Number",defaultValue:"Nr.",control:{type:"text"}},subjectNumberText:{name:"Subject number (Emnetal)",defaultValue:"Emnetal",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},loginToSeeReviewText:{name:"Login to see Review",defaultValue:"Login to see the review.",control:{type:"text"}},cantViewReviewText:{name:"Cannot view Review",defaultValue:"Cannot view the review.",control:{type:"text"}},ratingIsText:{name:"Rating is",defaultValue:"Rating of this item is @heartCount out of @numberOfHeartsPossible hearts",control:{type:"text"}},outOfText:{name:"X 'out of' Y",defaultValue:"out of",control:{type:"text"}},detailsOfTheMaterialText:{name:"Details of the material",defaultValue:"Details about the material",control:{type:"text"}},editionsText:{name:"Editions",defaultValue:"Editions",control:{type:"text"}},fictionNonfictionText:{name:"Fiction Nonfiction",defaultValue:"Fictional",control:{type:"text"}},detailsText:{name:"Details",defaultValue:"Details",control:{type:"text"}},reviewsText:{name:"Reviews",defaultValue:"Reviews",control:{type:"text"}},detailsListTypeText:{name:"Type",defaultValue:"Type",control:{type:"text"}},detailsListLanguageText:{name:"Language",defaultValue:"Language",control:{type:"text"}},detailsListContributorsText:{name:"Contributors",defaultValue:"Contributors",control:{type:"text"}},detailsListOriginalTitleText:{name:"Original title",defaultValue:"Original title",control:{type:"text"}},detailsListIsbnText:{name:"ISBN",defaultValue:"ISBN",control:{type:"text"}},detailsListScopeText:{name:"Scope",defaultValue:"Scope",control:{type:"text"}},detailsListPublisherText:{name:"Publisher",defaultValue:"Publisher",control:{type:"text"}},detailsListAudienceText:{name:"Audience",defaultValue:"Audience",control:{type:"text"}},detailsListAgeRangeText:{name:"Age range",defaultValue:"for @ageRange year olds",control:{type:"text"}},detailsListGenreAndFormText:{name:"Genre and form",defaultValue:"Genre",control:{type:"text"}},detailsListFirstEditionYearText:{name:"First edition year",defaultValue:"first edition year",control:{type:"text"}},detailsListPlayTimeText:{name:"Play time",defaultValue:"Play time",control:{type:"text"}},detailsListEditionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},detailsListAuthorsText:{name:"Authors",defaultValue:"Authors",control:{type:"text"}},detailsListNotesText:{name:"Notes",defaultValue:"Notes",control:{type:"text"}},detailsListPhysicalDescriptionText:{name:"Dimensions",defaultValue:"Dimensions",control:{type:"text"}},detailsListHostPublicationText:{name:"Host Publication",defaultValue:"Host Publication",control:{type:"text"}},detailsListSourceText:{name:"Source",defaultValue:"Source",control:{type:"text"}},detailsListPartsText:{name:"Contents",defaultValue:"Contents",control:{type:"text"}},editionText:{name:"Edition",defaultValue:"Edition",control:{type:"text"}},readArticleText:{name:"Read article",defaultValue:"Read article",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},getOnlineText:{name:"Get online",defaultValue:"Get online",control:{type:"text"}},seeOnlineText:{name:"See online",defaultValue:"See online",control:{type:"text"}},listenOnlineText:{name:"Listen online",defaultValue:"Listen online",control:{type:"text"}},cantReserveText:{name:"Can't be reserved",defaultValue:"Can't be reserved",control:{type:"text"}},notLivingInMunicipalityText:{name:"Not living in municipality",defaultValue:"You don't live in the municipality where this library is located.",control:{type:"text"}},blockedButtonText:{name:"Blocked button text",defaultValue:"User blocked",control:{type:"text"}},cantViewText:{name:"Can't be viewed",defaultValue:"Can't be viewed",control:{type:"text"}},goToText:{name:"Go to",defaultValue:"Go to @source",control:{type:"text"}},materialIsLoanedOutText:{name:"Material is loaned out",defaultValue:"Material is loaned out",control:{type:"text"}},materialIsIncludedText:{name:"Material is included",defaultValue:"This material doesn't count towards your loan quota",control:{type:"text"}},materialsInStockInfoText:{name:"Materials in stock info text",defaultValue:'{"type":"plural","text":["We have 1 copy of the material in stock. ","We have @count copies of the material in stock."]}',control:{type:"text"}},materialReservationInfoText:{name:"Material Reservation info text",defaultValue:'{"type":"plural","text":["1 copy has been reserved.","@count copies have been reserved."]}',control:{type:"text"}},onlineLimitMonthEbookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible e-books this month",control:{type:"text"}},onlineLimitMonthAudiobookInfoText:{name:"Online limit info text",defaultValue:"You have borrowed @count out of @limit possible audio-books this month",control:{type:"text"}},approveReservationText:{name:"Approve reservation",defaultValue:"Approve reservation",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{name:"Pick up at",defaultValue:"Pick up at",control:{type:"text"}},receiveSmsWhenMaterialReadyText:{name:"You will receive an SMS when the material is ready",defaultValue:"You will receive an SMS when the material is ready",control:{type:"text"}},receiveEmailWhenMaterialReadyText:{name:"Receive mail when the material is ready",defaultValue:"You will receive an email when the material is ready",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{name:"Have no interest after",defaultValue:"Have no interest after",control:{type:"text"}},daysText:{name:"Days",defaultValue:"Days",control:{type:"text"}},reservationSuccesTitleText:{name:"Reservation Success title",defaultValue:"Material is available and reserved for you!",control:{type:"text"}},reservationSuccesIsReservedForYouText:{name:"Reservation Success Title",defaultValue:"is reserved for you",control:{type:"text"}},reservationSuccessPreferredPickupBranchText:{name:"Reservation Preferred pickup branch",defaultValue:"Material is available and you will get a message when it is ready for pickup - pickup at @branch",control:{type:"text"}},reservationErrorsTitleText:{name:"Reservation Error title",defaultValue:"Failed to reserve the material",control:{type:"text"}},reservationErrorsDescriptionText:{name:"Reservation Error description",defaultValue:"We're sorry. Unfortunately, there has been an error. Try again, please.",control:{type:"text"}},tryAginButtonText:{name:"Try again button text",defaultValue:"Try again",control:{type:"text"}},okButtonText:{name:"Ok button text",defaultValue:"Ok",control:{type:"text"}},missingDataText:{name:"Missing data text",defaultValue:"Missing data",control:{type:"text"}},reservationModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},reservationModalCloseModalAriaLabelText:{name:"Close Reservation modal",defaultValue:"Close reservation modal",control:{type:"text"}},librariesHaveTheMaterialText:{name:"Libraries have the material",defaultValue:"libraries have material",control:{type:"text"}},findOnShelfModalScreenReaderModalDescriptionText:{name:"Reservation modal screen reader description",defaultValue:"Modal for reservation",control:{type:"text"}},findOnShelfModalCloseModalAriaLabelText:{name:"Close findOnShelf modal",defaultValue:"Close reservation modal",control:{type:"text"}},findOnShelfTableDescriptionText:{name:"Find on shelf table description",defaultValue:"Find @work on shelf in the @branch branch",control:{type:"text"}},findOnShelfModalListMaterialText:{name:"Material",defaultValue:"Material",control:{type:"text"}},findOnShelfModalListFindOnShelfText:{name:"Find it on shelf",defaultValue:"Find it on shelf",control:{type:"text"}},findOnShelfModalListItemCountText:{name:"Home",defaultValue:"home",control:{type:"text"}},findOnShelfModalNoLocationSpecifiedText:{name:"No location for find on shelf specified",defaultValue:"-",control:{type:"text"}},findOnShelfModalPeriodicalYearDropdownText:{name:"Find on shelf modal periodical dropdown - choose year",defaultValue:"Choose periodical year",control:{type:"text"}},findOnShelfModalPeriodicalEditionDropdownText:{name:"Find on shelf modal periodical dropdown - choose edition/volume",defaultValue:"Choose periodical edition",control:{type:"text"}},numberInQueueText:{name:"Number in queue text",defaultValue:"You are number @number in the queue.",control:{type:"text"}},alreadyReservedText:{name:"Already reserved text",defaultValue:"You already reserved this material",control:{type:"text"}},closeText:{name:"Close text",defaultValue:"Close",control:{type:"text"}},modalReservationFormEmailHeaderTitleText:{name:"Modal reservation form email header title",defaultValue:"Change email",control:{type:"text"}},modalReservationFormEmailHeaderDescriptionText:{name:"Modal reservation form email header description",defaultValue:"If you wish to receive notification emails you can add or change your email address here.",control:{type:"text"}},modalReservationFormEmailInputFieldLabelText:{name:"Modal reservation form email input field label",defaultValue:"Email",control:{type:"text"}},modalReservationFormEmailInputFieldDescriptionText:{name:"Modal reservation form email input field description",defaultValue:"Add email",control:{type:"text"}},modalReservationFormSmsHeaderTitleText:{name:"Modal reservation form sms header title",defaultValue:"Change phone number",control:{type:"text"}},modalReservationFormSmsHeaderDescriptionText:{name:"Modal reservation form sms header description",defaultValue:"If you wish to receive notification sms you can add or change your phone number here.",control:{type:"text"}},modalReservationFormSmsInputFieldLabelText:{name:"Modal reservation form sms input field label",defaultValue:"Phone number",control:{type:"text"}},modalReservationFormSmsInputFieldDescriptionText:{name:"Modal reservation form sms input field description",defaultValue:"Phone number",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},infomediaModalScreenReaderModalDescriptionText:{name:"Infomedia modal screen reader description",defaultValue:"Modal for infomedia",control:{type:"text"}},infomediaModalCloseModalAriaLabelText:{name:"Close infomedia modal",defaultValue:"Close infomedia modal",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},orderDigitalCopyModalScreenReaderModalDescriptionText:{name:"Order digital copy modal screen reader description",defaultValue:"Modal for Order digital copy",control:{type:"text"}},orderDigitalCopyModalCloseModalAriaLabelText:{name:"Close order digital copy modal",defaultValue:"Close Order digital copy modal",control:{type:"text"}},orderDigitalCopyTitleText:{name:"Order digital copy title text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyDescriptionText:{name:"Order digital copy description text",defaultValue:"You can order a digital copy of this material. The digital copy will be sent to your email address.",control:{type:"text"}},orderDigitalCopyButtonText:{name:"Order digital copy button text",defaultValue:"Order digital copy",control:{type:"text"}},orderDigitalCopyButtonLoadingText:{name:"Order digital copy button loading text",defaultValue:"Ordering digital copy",control:{type:"text"}},orderDigitalCopyFeedbackTitleText:{name:"Order digital copy feedback title",defaultValue:"Digital copy receipt",control:{type:"text"}},orderDigitalCopyFeedbackErrorAgencyNotSubscribedText:{name:"Order digital copy agency not subscribed",defaultValue:"The agency is not subscribed to the service. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorInvalidPickupBranchText:{name:"Order digital copy invalid pickup branch",defaultValue:"The pickup branch is not valid. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorMissingClientConfigurationText:{name:"Order digital copy missing client configuration",defaultValue:"The client configuration is missing. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorPidNotReservableText:{name:"Order digital copy pid not reservable",defaultValue:"The material is not reservable. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackErrorUnauthenticatedUserText:{name:"Order digital copy unauthenticated user",defaultValue:"You are not logged in. You can order the digital copy by contacting the agency.",control:{type:"text"}},orderDigitalCopyFeedbackOkText:{name:"Order digital copy success description text",defaultValue:"The digital copy has been ordered. You will receive an email when the digital copy is ready.",control:{type:"text"}},orderDigitalCopyFeedbackButtonText:{name:"Order digital copy success button text",defaultValue:"Close",control:{type:"text"}},orderDigitalCopyFeedbackBorchkUserBlockedByAgencyText:{name:"Borchk user blocked by agency text",defaultValue:"Borchk user blocked by agency",control:{type:"text"}},orderDigitalCopyFeedbackBorchkUserNotVerifiedText:{name:"Borchk user not verified text",defaultValue:"Borchk user not verified",control:{type:"text"}},orderDigitalCopyFeedbackBorchkUserNoLongerExistOnAgencyText:{name:"Borchk user no longer exists on agency text",defaultValue:"Borchk user no longer exists on agency",control:{type:"text"}},orderDigitalCopyFeedbackErrorMunicipalityagencyidNotFoundText:{name:"Error municipality agency ID not found text",defaultValue:"Error municipality agency ID not found",control:{type:"text"}},orderDigitalCopyFeedbackUnknownUserText:{name:"Unknown user text",defaultValue:"Unknown user",control:{type:"text"}},orderDigitalCopyEmailLabelText:{name:"Order digital copy error email text",defaultValue:"Email",control:{type:"text"}},orderDigitalCopyFeedbackErrorMissingMunicipalityagencyidText:{name:"Error missing municipality agency ID text",defaultValue:"Error missing municipality agency ID",control:{type:"text"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},materialIsAvailableInAnotherEditionText:{name:"Skip queue material is available in another edition",defaultValue:"Skip the queue - The material is available in another edition - @title @authorAndYear - reservations: @reservations",control:{type:"text"}},detailsListFirstEditionYearUnknownText:{name:"Unknown",defaultValue:"Unknown",control:{type:"text"}},firstAvailableEditionText:{name:"First available edition",defaultValue:"First available edition",control:{type:"text"}},filmAdaptationsText:{name:"Film adaptations text",defaultValue:"Film adaptations",control:{type:"text"}},expandMoreText:{name:"Expand more text",defaultValue:"Expand more",control:{type:"text"}},changeSmsNumberText:{name:"Change sms number text",defaultValue:"Change sms number",control:{type:"text"}},changeEmailText:{name:"Change email text",defaultValue:"Change email",control:{type:"text"}},instantLoanTitleText:{name:"Instant loan title",control:{type:"text"},defaultValue:"Hent bogen nu"},instantLoanSubTitleText:{name:"Instant loan subtitle",control:{type:"text"},defaultValue:"Spring køen over og hent bogen nu på"},instantLoanUnderlineDescriptionText:{name:"Instant loan underline description",control:{type:"text"},defaultValue:"Bogen er tilgængelig på disse biblioteker nær dig"},instantLoanConfig:{name:"Instant loan config",control:{type:"text"},defaultValue:'{\n "threshold": "1",\n "matchStrings": ["31 dages lånetid til alm lånere"],\n "enabled": "true" }'},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":"14", "label":"14 days" } }',control:{type:"text"}},openOrderResponseTitleText:{name:"Reservation Success title",defaultValue:"Order from another library:",control:{type:"text"}},openOrderAuthenticationErrorText:{name:"Open order authentication error text",defaultValue:"Authentication error occurred",control:{type:"text"}},openOrderUserBlockedByAgencyText:{name:"Open order user blocked by agency text",defaultValue:"You are blocked by the agency",control:{type:"text"}},openOrderUserNotVerifiedText:{name:"Open order user not verified text",defaultValue:"User could not be verified",control:{type:"text"}},openOrderUserNoLongerExistOnAgencyText:{name:"Open order user no longer exists on agency text",defaultValue:"User no longer exists at the specified agency",control:{type:"text"}},openOrderInvalidOrderText:{name:"Open order invalid order text",defaultValue:"Your order is invalid",control:{type:"text"}},openOrderNotOwnedIllLocText:{name:"Open order item localized for ILL text",defaultValue:"Your material has been ordered from another library",control:{type:"text"}},openOrderNotOwnedNoIllLocText:{name:"Open order item not localized for ILL text",defaultValue:"Item not available and not localized for ILL",control:{type:"text"}},openOrderNotOwnedWrongIllMediumtypeText:{name:"Open order wrong ILL medium type text",defaultValue:"Item not available, ILL of this medium type not accepted",control:{type:"text"}},openOrderNoServicerequesterText:{name:"Open order no service requester text",defaultValue:"Service requester is obligatory",control:{type:"text"}},openOrderOrsErrorText:{name:"Open order ORS error text",defaultValue:"Error occurred while sending order to ORS",control:{type:"text"}},openOrderStatusOwnedAcceptedText:{name:"Open order status owned accepted text",defaultValue:"Your order is accepted",control:{type:"text"}},openOrderOwnedOwnCatalogueText:{name:"Open order available in own catalogue text",defaultValue:"Item available, order through the library's catalogue",control:{type:"text"}},openOrderOwnedWrongMediumtypeText:{name:"Open order wrong medium type for available item text",defaultValue:"Item available but medium type not accepted",control:{type:"text"}},openOrderServiceUnavailableText:{name:"Open order service unavailable text",defaultValue:"Service is currently unavailable",control:{type:"text"}},openOrderUnknownErrorText:{name:"Open order unknown error text",defaultValue:"An unknown error occurred",control:{type:"text"}},openOrderUnknownPickupagencyText:{name:"Open order unknown pickup agency text",defaultValue:"Specified pickup agency not found",control:{type:"text"}},openOrderUnknownUserText:{name:"Open order unknown user text",defaultValue:"User not found",control:{type:"text"}},openOrderErrorMissingPincodeText:{name:"Open order error missing pincode text",defaultValue:"Missing pincode",control:{type:"text"}}}},Template=args=>react.createElement(material_entry,args),Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={wid:"work-of:870970-basis:06373674"};const Infomedia=Template.bind({});Infomedia.args={wid:"work-of:870971-avis:35731733"};const HarryPotter=Template.bind({});HarryPotter.args={wid:"work-of:870970-basis:22629344"};const TurenGårTilRom=Template.bind({});TurenGårTilRom.args={wid:"work-of:870970-basis:61991484"};const Digital=Template.bind({});Digital.args={wid:"work-of:870971-tsart:34310815"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={wid:"work-of:870970-basis:54129807"};const EBogBlaTitle=Template.bind({});EBogBlaTitle.args={wid:"work-of:870970-basis:52880831"};const LangePeter=Template.bind({});LangePeter.args={wid:"work-of:870970-basis:01196669"};const material_dev_InstantLoan=Template.bind({});material_dev_InstantLoan.args={wid:"work-of:870970-basis:134015012"};const Dinosaurierfedern=Template.bind({});Dinosaurierfedern.args={wid:"work-of:870970-basis:44805421"};const Underverden=Template.bind({});Underverden.args={wid:"work-of:870970-basis:52886619"};const overbygningsMatriale=Template.bind({});overbygningsMatriale.args={wid:"work-of:870970-basis:44926407"};const globalMaterial=Template.bind({});globalMaterial.args={wid:"work-of:870970-basis:07185995"};const onlyOneEdition=Template.bind({});onlyOneEdition.args={wid:"work-of:870970-basis:52796202"};const digitalArticle=Template.bind({});digitalArticle.args={wid:"work-of:870971-tsart:36297484"};const inLargeSameSeriesAndIrregularFaustId=Template.bind({});inLargeSameSeriesAndIrregularFaustId.args={wid:"work-of:150086-netmusik:BIS-2067"}},"./src/apps/menu/menu.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{UserMenu:()=>UserMenu,default:()=>menu_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),icon_profile=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),icon_profile_default=__webpack_require__.n(icon_profile),url=__webpack_require__("./src/core/utils/url.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const menu_not_logged_in=()=>{const t=(0,utils_text.F)(),u=(0,url.Ik)(),menuLoginUrl=u("menuLoginUrl"),menuSignUpUrl=u("menuSignUpUrl"),{userMenuAnonymous:userMenuAnonymousModalId}=(0,modal_helpers.c6)();return react.createElement(modal.A,{classNames:"modal-right modal--no-padding",modalId:userMenuAnonymousModalId,closeModalAriaLabelText:t("menuNotAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuNotAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement("div",{className:"modal-login modal-login--anonymous"},react.createElement(Link.A,{href:menuLoginUrl,className:"btn-primary btn-filled btn-large arrow__hover--right-small"},t("menuLoginText")),react.createElement(Link.A,{href:menuSignUpUrl,className:"mt-32 link-tag color-secondary-gray modal-login__btn-create-profile"},t("menuSignUpText"))))};try{menunotloggedin.displayName="menunotloggedin",menunotloggedin.__docgenInfo={description:"",displayName:"menunotloggedin",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"]={docgenInfo:menunotloggedin.__docgenInfo,name:"menunotloggedin",path:"src/apps/menu/menu-not-logged-in/menu-not-logged-in.tsx#menunotloggedin"})}catch(__react_docgen_typescript_loader_error){}var user=__webpack_require__("./src/core/utils/helpers/user.ts");const MenuNavigationItem=({loansCount,reservationCount,feeCount,menuNavigationItem,dataCy="menu-navigation-item"})=>{const dataMap={1:loansCount,2:reservationCount,4:feeCount},{link,name,dataId}=menuNavigationItem;return react.createElement("li",{"data-cy":`${dataCy}-${name.toLowerCase()}`,className:"link-filters mb-16"},react.createElement("div",{className:"link-filters__tag-wrapper"},react.createElement("a",{href:link,className:"link-tag link-tag link-filters__tag","aria-label":`${name} ${dataMap[dataId]||""}`},name),0!==dataMap[dataId]&&react.createElement("span",{className:"link-filters__counter","aria-hidden":"true"},dataMap[dataId])))},menu_navigation_list_MenuNavigationItem=MenuNavigationItem;try{MenuNavigationItem.displayName="MenuNavigationItem",MenuNavigationItem.__docgenInfo={description:"",displayName:"MenuNavigationItem",props:{loansCount:{defaultValue:null,description:"",name:"loansCount",required:!0,type:{name:"number"}},reservationCount:{defaultValue:null,description:"",name:"reservationCount",required:!0,type:{name:"number"}},feeCount:{defaultValue:null,description:"",name:"feeCount",required:!0,type:{name:"number"}},menuNavigationItem:{defaultValue:null,description:"",name:"menuNavigationItem",required:!0,type:{name:"MenuNavigationDataType"}},dataCy:{defaultValue:{value:"menu-navigation-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"]={docgenInfo:MenuNavigationItem.__docgenInfo,name:"MenuNavigationItem",path:"src/apps/menu/menu-navigation-list/MenuNavigationItem.tsx#MenuNavigationItem"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),dashboard_notification_list=__webpack_require__("./src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx"),usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const MenuLoggedInContent=({pageSize})=>{var _userData$patron;const t=(0,utils_text.F)(),u=(0,url.Ik)(),userProfileUrl=u("userProfileUrl"),logoutUrl=u("logoutUrl"),config=(0,utils_config.UK)(),{all:{reservations}}=(0,useReservations.A)(),{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue}}=(0,useLoans.A)(),{data:patronData}=(0,usePatronData.I)(),{data:fbsFees=[]}=(0,fbs.J2)({includepaid:!1,includenonpayable:!0}),menuNavigationData=config("menuNavigationDataConfig",{transformer:"jsonParse"}),[userData,setUserData]=(0,react.useState)(),[feeCount,setFeeCount]=(0,react.useState)(0);(0,react.useEffect)((()=>{setUserData(patronData)}),[patronData]),(0,react.useEffect)((()=>{fbsFees&&setFeeCount(fbsFees.length)}),[fbsFees]);const showNotifications=0!==loansOverdue.length||0!==loansSoonOverdue.length||0!==reservations.length;return react.createElement("div",{className:"modal-login modal-login--authenticated"},react.createElement("div",{className:"modal-login__container"},react.createElement("div",{className:"modal-header"},react.createElement("div",{className:"modal-header__avatar"},react.createElement("div",{className:"avatar bg-global-secondary"},react.createElement("img",{src:icon_profile_default(),alt:""}))),react.createElement("div",{className:"modal-header__name text-header-h4","data-cy":"menu-patron-name"},null==userData||null===(_userData$patron=userData.patron)||void 0===_userData$patron?void 0:_userData$patron.name),react.createElement(Link.A,{href:userProfileUrl,className:"link-tag modal-header__link color-secondary-gray"},t("menuUserProfileUrlText"))),showNotifications&&react.createElement("div",{className:"modal-profile__container"},react.createElement(dashboard_notification_list.A,{pageSize,columns:!1})),react.createElement("nav",{className:"modal-profile__container","aria-label":t("menuProfileLinksAriaLabelText")},react.createElement("ul",{className:"modal-profile__links"},menuNavigationData.map((menuNavigationItem=>react.createElement(menu_navigation_list_MenuNavigationItem,{menuNavigationItem,loansCount:loans.length,reservationCount:reservations.length,feeCount}))))),react.createElement("div",{className:"modal-profile__btn-logout mx-32"},react.createElement(Link.A,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:logoutUrl},t("menuLogOutText")))))},menu_logged_in_MenuLoggedInContent=MenuLoggedInContent;try{MenuLoggedInContent.displayName="MenuLoggedInContent",MenuLoggedInContent.__docgenInfo={description:"",displayName:"MenuLoggedInContent",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"]={docgenInfo:MenuLoggedInContent.__docgenInfo,name:"MenuLoggedInContent",path:"src/apps/menu/menu-logged-in/MenuLoggedInContent.tsx#MenuLoggedInContent"})}catch(__react_docgen_typescript_loader_error){}const menu_logged_in=({pageSize})=>{const{userMenuAuthenticated:userMenuAuthenticatedModalId}=(0,modal_helpers.c6)(),t=(0,utils_text.F)();return react.createElement(modal.A,{modalId:userMenuAuthenticatedModalId,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:t("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement(menu_logged_in_MenuLoggedInContent,{pageSize}))};try{menuloggedin.displayName="menuloggedin",menuloggedin.__docgenInfo={description:"",displayName:"menuloggedin",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"]={docgenInfo:menuloggedin.__docgenInfo,name:"menuloggedin",path:"src/apps/menu/menu-logged-in/menu-logged-in.tsx#menuloggedin"})}catch(__react_docgen_typescript_loader_error){}var TextLineSkeleton=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const menu_user_unregistered_MenuUserUnregisteredContent=()=>{const t=(0,utils_text.F)(),logoutUrl=(0,url.Ik)()("logoutUrl");return react.createElement("div",{className:"modal-login modal-login--anonymous"},react.createElement(Link.A,{className:"btn-primary btn-filled btn-large arrow__hover--right-small",href:logoutUrl},t("menuLogOutText")))},menu_user_unregistered=()=>{const{userMenuUnregistered:userMenuUnregisteredModalId}=(0,modal_helpers.c6)(),t=(0,utils_text.F)();return react.createElement(modal.A,{modalId:userMenuUnregisteredModalId,classNames:"modal-right modal--no-padding",closeModalAriaLabelText:t("menuAuthenticatedCloseButtonText"),screenReaderModalDescriptionText:t("menuAuthenticatedModalDescriptionText"),isSlider:!0},react.createElement(menu_user_unregistered_MenuUserUnregisteredContent,null))},menu_menu=({pageSize})=>{var _userData$patron,_userData$patron2;const{open}=(0,modal.X)(),t=(0,utils_text.F)(),{userMenuAuthenticated:userMenuAuthenticatedModalId,userMenuAnonymous:userMenuAnonymousModalId,userMenuUnregistered:userMenuUnregisteredModalId}=(0,modal_helpers.c6)(),{isLoading,data:userData}=(0,usePatronData.I)(),openMenu=()=>{(0,user.u7)()?open(userMenuUnregisteredModalId):(0,user.ok)()?open(userMenuAnonymousModalId):open(userMenuAuthenticatedModalId)};return react.createElement(react.Fragment,null,react.createElement("button",{className:"header__menu-profile header__button btn-ui",type:"button","aria-label":isLoading?t("searchHeaderLoginText"):null!=userData&&userData.patron?t("menuUserIconAriaLabelText"):t("menuUserIconAriaLabelLoggedOutText"),onClick:()=>openMenu(),onKeyDown:e=>"Enter"===e.key&&openMenu(),tabIndex:0},react.createElement("img",{src:icon_profile_default(),alt:""}),isLoading&&react.createElement("span",{className:"text-small-caption"},react.createElement(TextLineSkeleton.A,{width:50})),!isLoading&&!(null!=userData&&null!==(_userData$patron=userData.patron)&&void 0!==_userData$patron&&_userData$patron.name)&&react.createElement("span",{className:"text-small-caption"},t("searchHeaderLoginText")),!isLoading&&(null==userData||null===(_userData$patron2=userData.patron)||void 0===_userData$patron2?void 0:_userData$patron2.name)&&react.createElement("span",{className:"text-small-caption"},userData.patron.name)),react.createElement(menu_logged_in,{pageSize}),react.createElement(menu_user_unregistered,null),react.createElement(menu_not_logged_in,null))};try{menu.displayName="menu",menu.__docgenInfo={description:"",displayName:"menu",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.tsx#menu"]={docgenInfo:menu.__docgenInfo,name:"menu",path:"src/apps/menu/menu.tsx#menu"})}catch(__react_docgen_typescript_loader_error){}var general=__webpack_require__("./src/core/utils/helpers/general.ts");const menu_entry=(0,url.nU)((0,utils_config.NV)((0,utils_text.i)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeLoanList");return react.createElement(menu_menu,{pageSize})}))));try{menuentry.displayName="menuentry",menuentry.__docgenInfo={description:"",displayName:"menuentry",props:{menuUserProfileUrlText:{defaultValue:null,description:"",name:"menuUserProfileUrlText",required:!0,type:{name:"string"}},userProfileUrl:{defaultValue:null,description:"",name:"userProfileUrl",required:!0,type:{name:"string"}},menuNavigationDataConfig:{defaultValue:null,description:"",name:"menuNavigationDataConfig",required:!0,type:{name:"string"}},menuNotificationLoansExpiredText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredText",required:!0,type:{name:"string"}},menuNotificationLoansExpiredUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiredUrl",required:!0,type:{name:"string"}},readyForLoanText:{defaultValue:null,description:"",name:"readyForLoanText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonText:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonText",required:!0,type:{name:"string"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:null,description:"",name:"menuNotificationLoansExpiringSoonUrl",required:!0,type:{name:"string"}},menuNotificationReadyForPickupText:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupText",required:!0,type:{name:"string"}},menuNotificationReadyForPickupUrl:{defaultValue:null,description:"",name:"menuNotificationReadyForPickupUrl",required:!0,type:{name:"string"}},menuLogOutText:{defaultValue:null,description:"",name:"menuLogOutText",required:!0,type:{name:"string"}},loansSoonOverdueText:{defaultValue:null,description:"",name:"loansSoonOverdueText",required:!0,type:{name:"string"}},loansOverdueText:{defaultValue:null,description:"",name:"loansOverdueText",required:!0,type:{name:"string"}},logoutUrl:{defaultValue:null,description:"",name:"logoutUrl",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},feeListDaysText:{defaultValue:null,description:"",name:"feeListDaysText",required:!0,type:{name:"string"}},menuLoginText:{defaultValue:null,description:"",name:"menuLoginText",required:!0,type:{name:"string"}},menuLoginUrl:{defaultValue:null,description:"",name:"menuLoginUrl",required:!0,type:{name:"string"}},menuSignUpText:{defaultValue:null,description:"",name:"menuSignUpText",required:!0,type:{name:"string"}},reservationsReadyText:{defaultValue:null,description:"",name:"reservationsReadyText",required:!0,type:{name:"string"}},menuSignUpUrl:{defaultValue:null,description:"",name:"menuSignUpUrl",required:!0,type:{name:"string"}},menuProfileLinksAriaLabelText:{defaultValue:null,description:"",name:"menuProfileLinksAriaLabelText",required:!0,type:{name:"string"}},menuUserIconAriaLabelText:{defaultValue:null,description:"",name:"menuUserIconAriaLabelText",required:!0,type:{name:"string"}},menuUserIconAriaLabelLoggedOutText:{defaultValue:null,description:"",name:"menuUserIconAriaLabelLoggedOutText",required:!0,type:{name:"string"}},menuNotAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuNotAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedCloseButtonText:{defaultValue:null,description:"",name:"menuAuthenticatedCloseButtonText",required:!0,type:{name:"string"}},menuAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:null,description:"",name:"menuNotAuthenticatedModalDescriptionText",required:!0,type:{name:"string"}},physicalLoansUrl:{defaultValue:null,description:"",name:"physicalLoansUrl",required:!0,type:{name:"string"}},reservationsUrl:{defaultValue:null,description:"",name:"reservationsUrl",required:!0,type:{name:"string"}},searchHeaderLoginText:{defaultValue:null,description:"",name:"searchHeaderLoginText",required:!0,type:{name:"string"}},searchHeaderFavoritesText:{defaultValue:null,description:"",name:"searchHeaderFavoritesText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!0,type:{name:"number"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!0,type:{name:"number"}},groupModalDueDateLinkToPageWithFeesText:{defaultValue:null,description:"",name:"groupModalDueDateLinkToPageWithFeesText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},groupModalDueDateMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateMaterialText",required:!0,type:{name:"string"}},groupModalDueDateDigitalMaterialText:{defaultValue:null,description:"",name:"groupModalDueDateDigitalMaterialText",required:!0,type:{name:"string"}},groupModalGoToMaterialText:{defaultValue:null,description:"",name:"groupModalGoToMaterialText",required:!0,type:{name:"string"}},groupModalDueDateHeaderText:{defaultValue:null,description:"",name:"groupModalDueDateHeaderText",required:!0,type:{name:"string"}},groupModalCheckboxText:{defaultValue:null,description:"",name:"groupModalCheckboxText",required:!0,type:{name:"string"}},groupModalHiddenLabelCheckboxOnMaterialText:{defaultValue:null,description:"",name:"groupModalHiddenLabelCheckboxOnMaterialText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},groupModalButtonText:{defaultValue:null,description:"",name:"groupModalButtonText",required:!0,type:{name:"string"}},groupModalDueDateWarningLoanOverdueText:{defaultValue:null,description:"",name:"groupModalDueDateWarningLoanOverdueText",required:!0,type:{name:"string"}},groupModalLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalLoansAriaDescriptionText",required:!0,type:{name:"string"}},groupModalLoansCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalLoansCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedInterLibraryLoanText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedMaxRenewalsReachedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedMaxRenewalsReachedText",required:!0,type:{name:"string"}},groupModalRenewLoanDeniedReservedText:{defaultValue:null,description:"",name:"groupModalRenewLoanDeniedReservedText",required:!0,type:{name:"string"}},renewGroupModalLoansButtonText:{defaultValue:null,description:"",name:"renewGroupModalLoansButtonText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessStatusText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessStatusText",required:!0,type:{name:"string"}},renewGroupModalLoansSuccessTitleText:{defaultValue:null,description:"",name:"renewGroupModalLoansSuccessTitleText",required:!0,type:{name:"string"}},renewMaterialLoanButtonText:{defaultValue:null,description:"",name:"renewMaterialLoanButtonText",required:!0,type:{name:"string"}},renewMaterialLoanErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorStatusText",required:!0,type:{name:"string"}},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanNoRenewalsPossibleErrorTitleText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessStatusText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessStatusText",required:!0,type:{name:"string"}},renewMaterialLoanSuccessTitleText:{defaultValue:null,description:"",name:"renewMaterialLoanSuccessTitleText",required:!0,type:{name:"string"}},renewProcessingText:{defaultValue:null,description:"",name:"renewProcessingText",required:!0,type:{name:"string"}},renewCannotBeRenewedText:{defaultValue:null,description:"",name:"renewCannotBeRenewedText",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},groupModalReservationsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"groupModalReservationsCloseModalAriaLabelText",required:!0,type:{name:"string"}},groupModalReservationsLoansAriaDescriptionText:{defaultValue:null,description:"",name:"groupModalReservationsLoansAriaDescriptionText",required:!0,type:{name:"string"}},readyForLoanCounterLabelText:{defaultValue:null,description:"",name:"readyForLoanCounterLabelText",required:!0,type:{name:"string"}},removeAllReservationsText:{defaultValue:null,description:"",name:"removeAllReservationsText",required:!0,type:{name:"string"}},pickUpLatestText:{defaultValue:null,description:"",name:"pickUpLatestText",required:!0,type:{name:"string"}},reservationsReadyForPickupText:{defaultValue:null,description:"",name:"reservationsReadyForPickupText",required:!0,type:{name:"string"}},physicalReservationsHeaderText:{defaultValue:null,description:"",name:"physicalReservationsHeaderText",required:!0,type:{name:"string"}},digitalReservationsHeaderText:{defaultValue:null,description:"",name:"digitalReservationsHeaderText",required:!0,type:{name:"string"}},materialDetailsWarningLoanOverdueText:{defaultValue:null,description:"",name:"materialDetailsWarningLoanOverdueText",required:!0,type:{name:"string"}},materialDetailsPhysicalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsPhysicalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsLoanDateLabelText:{defaultValue:null,description:"",name:"materialDetailsLoanDateLabelText",required:!0,type:{name:"string"}},materialDetailsMaterialNumberLabelText:{defaultValue:null,description:"",name:"materialDetailsMaterialNumberLabelText",required:!0,type:{name:"string"}},materialDetailsLinkToPageWithFeesText:{defaultValue:null,description:"",name:"materialDetailsLinkToPageWithFeesText",required:!0,type:{name:"string"}},materialDetailsOverdueText:{defaultValue:null,description:"",name:"materialDetailsOverdueText",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},materialDetailsGoToEreolenText:{defaultValue:null,description:"",name:"materialDetailsGoToEreolenText",required:!0,type:{name:"string"}},materialDetailsDigitalDueDateLabelText:{defaultValue:null,description:"",name:"materialDetailsDigitalDueDateLabelText",required:!0,type:{name:"string"}},materialDetailsRenewLoanButtonText:{defaultValue:null,description:"",name:"materialDetailsRenewLoanButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/menu/menu.entry.tsx#menuentry"]={docgenInfo:menuentry.__docgenInfo,name:"menuentry",path:"src/apps/menu/menu.entry.tsx#menuentry"})}catch(__react_docgen_typescript_loader_error){}var groupModalArgs=__webpack_require__("./src/core/storybook/groupModalArgs.ts"),loanGroupModalArgs=__webpack_require__("./src/core/storybook/loanGroupModalArgs.ts"),renewalArgs=__webpack_require__("./src/core/storybook/renewalArgs.ts"),reservationGroupModalArgs=__webpack_require__("./src/core/storybook/reservationGroupModalArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),materialDetailsModalArgs=__webpack_require__("./src/core/storybook/materialDetailsModalArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const WrappedMenu=(0,utils_text.i)((0,url.nU)((0,utils_config.NV)(menu_entry))),WrappedStoryHeader=(0,utils_text.i)((0,url.nU)((0,utils_config.NV)(story_header_dev_inc.A))),menu_dev={title:"Apps / Header",component:WrappedMenu,argTypes:{...serviceUrlArgs.A,...groupModalArgs.A,...loanGroupModalArgs.A,...renewalArgs.A,...reservationMaterialDetailsArgs.A,...reservationGroupModalArgs.A,...deleteReservationModalArgs.A,...materialDetailsModalArgs.A,...globalTextArgs.A,...globalConfigArgs.A,materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},menuUserProfileUrlText:{defaultValue:"My Account",control:{type:"text"}},userProfileUrl:{defaultValue:"/YourProfile",control:{type:"text"}},menuNavigationDataConfig:{defaultValue:'[{"name":"Dashboard","link":"/user/me/dashboard","dataId":"40"},{"name":"Loans","link":"/user/me/loans","dataId":"1"},{"name":"Reservations","link":"/user/me/reservations","dataId":"2"},{"name":"My list","link":"/user/me/favorites","dataId":"20"},{"name":"Fees & Replacement costs","link":"/user/me/fees","dataId":"4"}]',control:{type:"text"}},menuNotificationLoansExpiredText:{defaultValue:"loans expired",control:{type:"text"}},menuUserIconAriaLabelText:{defaultValue:"Open user menu",control:{type:"text"}},menuUserIconAriaLabelLoggedOutText:{defaultValue:"Open login menu",control:{type:"text"}},menuNotificationLoansExpiredUrl:{defaultValue:"/LoansExpired",control:{type:"text"}},menuNotificationLoansExpiringSoonText:{defaultValue:"loans expiring soon",control:{type:"text"}},menuNotificationLoansExpiringSoonUrl:{defaultValue:"/LoansExpiringSoon",control:{type:"text"}},menuNotificationReadyForPickupText:{defaultValue:"reservations ready for pickup",control:{type:"text"}},menuNotAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedCloseButtonText:{defaultValue:"Close user menu",control:{type:"text"}},menuAuthenticatedModalDescriptionText:{defaultValue:"The user modal",control:{type:"text"}},menuNotAuthenticatedModalDescriptionText:{defaultValue:"The user modal, log in or create a user",control:{type:"text"}},menuNotificationReadyForPickupUrl:{defaultValue:"/ReservationsReadyForPickup",control:{type:"text"}},menuLogOutText:{defaultValue:"Log out",control:{type:"text"}},reservationsReadyText:{defaultValue:"Ready for you",control:{type:"text"}},readyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},loansSoonOverdueText:{defaultValue:"To be returned soon",control:{type:"text"}},statusBadgeWarningText:{control:{type:"text"},defaultValue:"Expires soon"},loansOverdueText:{defaultValue:"Returned too late",control:{type:"text"}},menuProfileLinksAriaLabelText:{defaultValue:"Profile links",control:{type:"text"}},logoutUrl:{defaultValue:"/Logout",control:{type:"text"}},physicalLoansUrl:{defaultValue:"/user/me/loans",control:{type:"text"}},reservationsUrl:{defaultValue:"/user/me/reservations",control:{type:"text"}},menuLoginText:{defaultValue:"Log in",control:{type:"text"}},menuLoginUrl:{defaultValue:"/Login",control:{type:"text"}},menuSignUpText:{defaultValue:"Sign up",control:{type:"text"}},menuSignUpUrl:{defaultValue:"/Signup",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},searchHeaderLoginText:{defaultValue:"Login",control:{type:"text"}},searchHeaderFavoritesText:{defaultValue:"Liked",control:{type:"text"}}}},UserMenu=args=>{const menu=react.createElement(WrappedMenu,args);return react.createElement(WrappedStoryHeader,{userProfile:menu})}},"./src/apps/opening-hours-editor/OpeningHoursEditor.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,default:()=>OpeningHoursEditor_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),dist=__webpack_require__("./node_modules/@fullcalendar/react/dist/index.js"),timegrid=__webpack_require__("./node_modules/@fullcalendar/timegrid/index.js"),daygrid=__webpack_require__("./node_modules/@fullcalendar/daygrid/index.js"),interaction=__webpack_require__("./node_modules/@fullcalendar/interaction/index.js"),da=__webpack_require__("./node_modules/@fullcalendar/core/locales/da.js"),reload_logo_black=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/logo/reload_logo_black.svg"),reload_logo_black_default=__webpack_require__.n(reload_logo_black),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min);const DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_none="none",DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_weekly="weekly",DplOpeningHoursListGET200ItemRepetitionType_none="none",DplOpeningHoursListGET200ItemRepetitionType_weekly="weekly",formatDateTimeString=(date,time)=>`${date}T${time}:00`,formatFullCalendarEventToCmsEventEdit=event=>{if(!event.title||!event.backgroundColor)throw new Error("Invalid event format");const startDate=dayjs_min_default()(event.startStr),endDate=dayjs_min_default()(event.endStr);return{id:Number(event.id),category:{title:event.title,color:event.backgroundColor},date:startDate.format("YYYY-MM-DD"),start_time:startDate.format("HH:mm"),end_time:endDate.format("HH:mm"),repetition:event.repetition,branch_id:0}},formatDateStr=date=>dayjs_min_default()(date).format("YYYY-MM-DDTHH:mm:ssZ"),adjustEndDateBasedOnStartDate=(startDay,endDay)=>{const start=dayjs_min_default()(startDay),end=dayjs_min_default()(endDay);return start.isSame(end,"day")?endDay:start.hour(end.hour()).minute(end.minute()).second(end.second()).toDate()},extractTime=date=>dayjs_min_default()(date).format("HH:mm"),updateDateTime=(date,timeStr)=>{const[hours,minutes]=timeStr.split(":").map(Number);return dayjs_min_default()(date).hour(hours).minute(minutes).toDate()},getWeekDayName=date=>dayjs_min_default()(date).format("dddd"),getDateString=date=>dayjs_min_default()(date).format("DD-MM-YYYY"),getStringForDateInput=date=>dayjs_min_default()(date).format("YYYY-MM-DD"),isOpeningHourWeeklyRepetition=event=>{var _event$extendedProps,_event$extendedProps$,_event$event$extended,_event$event$extended2;return"event"in event?(null===(_event$event$extended=event.event.extendedProps)||void 0===_event$event$extended||null===(_event$event$extended2=_event$event$extended.repetition)||void 0===_event$event$extended2?void 0:_event$event$extended2.type)===DplOpeningHoursListGET200ItemRepetitionType_weekly:(null===(_event$extendedProps=event.extendedProps)||void 0===_event$extendedProps||null===(_event$extendedProps$=_event$extendedProps.repetition)||void 0===_event$extendedProps$?void 0:_event$extendedProps$.type)===DplOpeningHoursListGET200ItemRepetitionType_weekly},OpeningHoursEditorEventContent=({eventInput,iconAltText})=>{const{event}=eventInput;return react.createElement("div",{className:"opening-hours-editor-event-content","data-cy":"opening-hours-editor-event-content"},react.createElement("div",null,react.createElement("b",null,event.title),react.createElement("div",null,extractTime(event.start)," - ",extractTime(event.end))),isOpeningHourWeeklyRepetition(event)&&react.createElement("div",{className:"opening-hours-editor-event-content__series-icon"},react.createElement("img",{src:reload_logo_black_default(),alt:iconAltText})))},opening_hours_editor_OpeningHoursEditorEventContent=OpeningHoursEditorEventContent;try{OpeningHoursEditorEventContent.displayName="OpeningHoursEditorEventContent",OpeningHoursEditorEventContent.__docgenInfo={description:"",displayName:"OpeningHoursEditorEventContent",props:{eventInput:{defaultValue:null,description:"",name:"eventInput",required:!0,type:{name:"EventInput"}},iconAltText:{defaultValue:null,description:"",name:"iconAltText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/OpeningHoursEditorEventContent.tsx#OpeningHoursEditorEventContent"]={docgenInfo:OpeningHoursEditorEventContent.__docgenInfo,name:"OpeningHoursEditorEventContent",path:"src/apps/opening-hours-editor/OpeningHoursEditorEventContent.tsx#OpeningHoursEditorEventContent"})}catch(__react_docgen_typescript_loader_error){}var es=__webpack_require__("./node_modules/react-query/es/index.js"),dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const opening_hours_editor_useOpeningHoursEditor=()=>{const openingHoursBranchId=(0,utils_config.UK)()("openingHoursBranchIdConfig",{transformer:"stringToNumber"}),[datesSet,setDatseSet]=(0,react.useState)(null),queryClient=(0,es.useQueryClient)(),{data:openingHoursData}=(0,dpl_cms.Dp)({branch_id:openingHoursBranchId,...datesSet&&{from_date:getStringForDateInput(datesSet.start),to_date:getStringForDateInput(datesSet.end)}},{enabled:!!datesSet}),{mutate:removeOpeningHours}=(0,dpl_cms.v2)(),{mutate:createOpeningHours}=(0,dpl_cms.hi)(),{mutate:updateOpeningHours}=(0,dpl_cms.I1)(),[events,setEvents]=(0,react.useState)([]);(0,react.useEffect)((()=>{if(openingHoursData){const formattedEvents=openingHoursData.map((({category,date,start_time,end_time,id,repetition})=>({id:id.toString(),title:category.title,start:formatDateTimeString(date,start_time),end:formatDateTimeString(date,end_time),color:category.color,repetition})));setEvents(formattedEvents)}}),[openingHoursData]);const onSuccess=()=>{queryClient.invalidateQueries((0,dpl_cms.J0)({branch_id:openingHoursBranchId}))},onError=message=>{alert(message),window.location.reload()};return{events,handleEventAdd:event=>{createOpeningHours({data:{...event,branch_id:openingHoursBranchId},params:{_format:"json"}},{onSuccess:()=>{onSuccess()},onError:()=>{onError("Failed to create opening hours")}})},handleEventRemove:({eventId,repetition_id})=>{removeOpeningHours({id:eventId,params:{_format:"json",...repetition_id?{repetition_id}:{}}},{onSuccess:()=>{onSuccess()},onError:()=>{onError("Failed to remove opening hours")}})},handleEventEditing:event=>{updateOpeningHours({id:event.id.toString(),data:{...event,branch_id:openingHoursBranchId},params:{_format:"json"}},{onSuccess:()=>{onSuccess()},onError:()=>{onError("Failed to update opening hours")}})},handleDatesSet:datesInView=>{setDatseSet(datesInView)}}},EventForm=({initialTitle,startDate,endDate,onSubmit,openingHoursCategories,children,isRepeatedOpeningHour})=>{const t=(0,utils_text.F)(),initialCategory=initialTitle?openingHoursCategories.find((category=>category.title===initialTitle)):openingHoursCategories[0],initialStartTime=extractTime(startDate),initialEndTime=extractTime(endDate),weekDayName=getWeekDayName(startDate),startDateString=getDateString(startDate),[startTime,setStartTime]=(0,react.useState)(initialStartTime),[endTime,setEndTime]=(0,react.useState)(initialEndTime),[category,setCategory]=(0,react.useState)(initialCategory),isSameTime=startTime===endTime,[isRepeated,setIsRepeated]=(0,react.useState)(!1),[repeatedEndDate,setRepeatedEndDate]=(0,react.useState)(null);(0,react.useEffect)((()=>{setCategory(initialCategory),setStartTime(initialStartTime),setEndTime(initialEndTime),setIsRepeated(!1),setRepeatedEndDate(null)}),[initialCategory,initialEndTime,initialStartTime]),(0,react.useEffect)((()=>{isRepeated||setRepeatedEndDate(null)}),[isRepeated]);return react.createElement("form",{onSubmit:e=>{e.preventDefault(),category&&onSubmit({category,startTime,endTime,startDate,repeatedEndDate})},className:"opening-hours-editor-form","data-cy":"opening-hours-editor-form"},react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-title"},t("openingHoursEventFormCategoryText")),react.createElement("select",{"data-cy":"opening-hours-editor-form-select",className:"opening-hours-editor-form__select",id:"event-form-title",value:null==category?void 0:category.title,onChange:e=>{setCategory(openingHoursCategories.find((item=>item.title===e.target.value)))}},openingHoursCategories.map((categoryItem=>react.createElement("option",{key:categoryItem.title,value:categoryItem.title},categoryItem.title)))),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-start-time"},t("openingHoursEventFormStartTimeText")),react.createElement("input",{"data-cy":"opening-hours-editor-form-start-time",className:"opening-hours-editor-form__time-input",id:"event-form-start-time",type:"time",value:startTime,onChange:e=>setStartTime(e.target.value)}),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-end-time"},t("openingHoursEventFormEndTimeText")),react.createElement("input",{"data-cy":"opening-hours-editor-form-end-time",className:"opening-hours-editor-form__time-input",id:"event-form-end-time",type:"time",value:endTime,onChange:e=>setEndTime(e.target.value),min:startTime,max:"00:00"}),isRepeatedOpeningHour&&react.createElement(react.Fragment,null,react.createElement("div",{className:"opening-hours-editor-form__checkbox"},react.createElement("input",{id:"event-form-repeated","data-cy":"opening-hours-editor-form-repeated",type:"checkbox",checked:isRepeated,onChange:e=>setIsRepeated(e.target.checked)}),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-repeated"},t("openingHoursEventFormRepeatedText",{placeholders:{"@startDate":startDateString,"@weekDayName":weekDayName}}))),react.createElement("label",{className:"opening-hours-editor-form__label",htmlFor:"event-form-end-date"},t("openingHoursEventFormEndDateText")),react.createElement("input",{"data-cy":"opening-hours-editor-form-end-date",type:"date",className:"opening-hours-editor-form__time-input",id:"event-form-end-date",min:getStringForDateInput(startDate),disabled:!isRepeated,required:isRepeated,value:repeatedEndDate||"",onChange:e=>setRepeatedEndDate(e.target.value)})),react.createElement("button",{"data-cy":"opening-hours-editor-form-submit",type:"submit",className:"opening-hours-editor-form__submit",disabled:isSameTime},t("openingHoursEventFormSubmitText")),children)},opening_hours_editor_EventForm=EventForm;try{EventForm.displayName="EventForm",EventForm.__docgenInfo={description:"",displayName:"EventForm",props:{initialTitle:{defaultValue:null,description:"",name:"initialTitle",required:!1,type:{name:"string | undefined"}},startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"Date"}},endDate:{defaultValue:null,description:"",name:"endDate",required:!0,type:{name:"Date"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(EventFormOnSubmitType: EventFormOnSubmitType) => void"}},openingHoursCategories:{defaultValue:null,description:"",name:"openingHoursCategories",required:!0,type:{name:"OpeningHoursCategoriesType[]"}},isRepeatedOpeningHour:{defaultValue:null,description:"",name:"isRepeatedOpeningHour",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/EventForm.tsx#EventForm"]={docgenInfo:EventForm.__docgenInfo,name:"EventForm",path:"src/apps/opening-hours-editor/EventForm.tsx#EventForm"})}catch(__react_docgen_typescript_loader_error){}const useDialog=({onClose}={})=>{const[dialogContent,setDialogContent]=(0,react.useState)(null),dialogRef=(0,react.useRef)(null);return{dialogContent,dialogRef,openDialogWithContent:content=>{var _dialogRef$current;setDialogContent(content),null===(_dialogRef$current=dialogRef.current)||void 0===_dialogRef$current||_dialogRef$current.showModal()},closeDialog:()=>{dialogRef.current&&(onClose&&onClose(),dialogRef.current.close())}}},dialog_useDialog=useDialog;try{useDialog.displayName="useDialog",useDialog.__docgenInfo={description:"",displayName:"useDialog",props:{onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/useDialog.tsx#useDialog"]={docgenInfo:useDialog.__docgenInfo,name:"useDialog",path:"src/components/dialog/useDialog.tsx#useDialog"})}catch(__react_docgen_typescript_loader_error){}var icon_cross=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"),icon_cross_default=__webpack_require__.n(icon_cross);const useEscapeKey=({closeDialog})=>{(0,react.useEffect)((()=>{const handleKeyDown=e=>{"Escape"===e.key&&closeDialog()};return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)}}),[closeDialog])},dialog_useEscapeKey=useEscapeKey;try{useEscapeKey.displayName="useEscapeKey",useEscapeKey.__docgenInfo={description:"",displayName:"useEscapeKey",props:{closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/useEscapeKey.tsx#useEscapeKey"]={docgenInfo:useEscapeKey.__docgenInfo,name:"useEscapeKey",path:"src/components/dialog/useEscapeKey.tsx#useEscapeKey"})}catch(__react_docgen_typescript_loader_error){}const Dialog=(0,react.forwardRef)((({children,closeDialog},ref)=>(dialog_useEscapeKey({closeDialog}),react.createElement("dialog",{className:"dialog",ref,onClick:({currentTarget,target})=>{currentTarget===target&&closeDialog()}},react.createElement("button",{type:"button",onClick:closeDialog,className:"dialog__close-button"},react.createElement("img",{src:icon_cross_default(),alt:"","aria-label":"Close dialog"})),children)))),dialog_Dialog=Dialog;try{Dialog.displayName="Dialog",Dialog.__docgenInfo={description:"",displayName:"Dialog",props:{closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/dialog/Dialog.tsx#Dialog"]={docgenInfo:Dialog.__docgenInfo,name:"Dialog",path:"src/components/dialog/Dialog.tsx#Dialog"})}catch(__react_docgen_typescript_loader_error){}var OptionValue=function(OptionValue){return OptionValue.This="This",OptionValue.All="All",OptionValue}(OptionValue||{});const ConfirmEditRepeatedOpeningHour=({confirmSubmit,closeDialog,title})=>{const t=(0,utils_text.F)(),options=[{value:OptionValue.This,label:t("openingHoursEditEventConfirmOptionThisText"),cy:"opening-hours-editor-form__radio-this"},{value:OptionValue.All,label:t("openingHoursEditEventConfirmOptionAllText"),cy:"opening-hours-editor-form__radio-all"}],[selectedOption,setSelectedOption]=(0,react.useState)(options[0].value),handleRadioChange=event=>{event.target.value!==OptionValue.This&&event.target.value!==OptionValue.All||setSelectedOption(event.target.value)};return react.createElement("form",{className:"opening-hours-editor-form"},react.createElement("h2",{className:"opening-hours-editor-form__label"},title),options.map((({value,label,cy})=>react.createElement("div",{className:"opening-hours-editor-form__radio",key:value},react.createElement("input",{"data-cy":cy,type:"radio",id:value,value,checked:selectedOption===value,onChange:handleRadioChange}),react.createElement("label",{htmlFor:value},label)))),react.createElement("button",{className:"opening-hours-editor-form__cancel","data-cy":"opening-hours-editor-form__cancel",type:"button",onClick:()=>{closeDialog(),setSelectedOption(options[0].value)}},t("openingHoursConfirmAddRepeatedCancelText")),react.createElement("button",{className:"opening-hours-editor-form__submit","data-cy":"opening-hours-editor-form__confirm",type:"button",onClick:e=>{e.preventDefault(),confirmSubmit(selectedOption===OptionValue.All),setSelectedOption(options[0].value)}},t("openingHoursConfirmRepeatedSubmitText")))},opening_hours_editor_ConfirmEditRepeatedOpeningHour=ConfirmEditRepeatedOpeningHour;try{ConfirmEditRepeatedOpeningHour.displayName="ConfirmEditRepeatedOpeningHour",ConfirmEditRepeatedOpeningHour.__docgenInfo={description:"",displayName:"ConfirmEditRepeatedOpeningHour",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},confirmSubmit:{defaultValue:null,description:"",name:"confirmSubmit",required:!0,type:{name:"(editSerie: boolean) => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/ConfirmEditRepeatedOpeningHour.tsx#ConfirmEditRepeatedOpeningHour"]={docgenInfo:ConfirmEditRepeatedOpeningHour.__docgenInfo,name:"ConfirmEditRepeatedOpeningHour",path:"src/apps/opening-hours-editor/ConfirmEditRepeatedOpeningHour.tsx#ConfirmEditRepeatedOpeningHour"})}catch(__react_docgen_typescript_loader_error){}const DialogFormEdit=({eventInfo,handleEventEditing,closeDialog:closeEditDialog,handleEventRemove,openingHoursCategories})=>{const t=(0,utils_text.F)(),{dialogContent,openDialogWithContent,closeDialog,dialogRef}=dialog_useDialog();if(!eventInfo.start||!eventInfo.end)return alert(t("openingHoursInvalidEventText")),null;const handleEventRemoveConfirm=editSerie=>{handleEventRemove({eventId:eventInfo.id,...editSerie?{repetition_id:eventInfo.extendedProps.repetition.id}:{}}),eventInfo.remove(),closeDialog(),closeEditDialog()};return react.createElement(react.Fragment,null,react.createElement(opening_hours_editor_EventForm,{initialTitle:eventInfo.title,startDate:eventInfo.start,endDate:eventInfo.end,onSubmit:({category,startTime,endTime})=>{if(!eventInfo.start||!eventInfo.end)return void alert(t("openingHoursInvalidEventText"));const startDate=updateDateTime(eventInfo.start,startTime);let endDate=updateDateTime(eventInfo.end,endTime);endDate=adjustEndDateBasedOnStartDate(startDate,endDate),eventInfo.setProp("title",category.title),eventInfo.setProp("color",category.color),eventInfo.setDates(startDate,endDate);const cmsEvent={id:eventInfo.id,category,title:eventInfo.title,backgroundColor:eventInfo.backgroundColor,startStr:eventInfo.startStr,endStr:eventInfo.endStr,repetition:{type:DplOpeningHoursListGET200ItemRepetitionType_none}},handleEventEditConfirm=editSerie=>{editSerie?(handleEventEditing(formatFullCalendarEventToCmsEventEdit({...cmsEvent,repetition:{type:DplOpeningHoursListGET200ItemRepetitionType_weekly,weekly_data:{end_date:eventInfo.extendedProps.repetition.weekly_data.end_date}}})),closeDialog(),closeEditDialog()):(handleEventEditing(formatFullCalendarEventToCmsEventEdit(cmsEvent)),closeDialog(),closeEditDialog())};isOpeningHourWeeklyRepetition(eventInfo)?openDialogWithContent(react.createElement(opening_hours_editor_ConfirmEditRepeatedOpeningHour,{title:t("openingHoursEditEventTitleText"),confirmSubmit:handleEventEditConfirm,closeDialog})):(handleEventEditing(formatFullCalendarEventToCmsEventEdit(cmsEvent)),closeEditDialog())},openingHoursCategories},react.createElement("button",{"data-cy":"opening-hours-editor-form__remove",className:"opening-hours-editor-form__remove",type:"button",onClick:()=>{isOpeningHourWeeklyRepetition(eventInfo)?openDialogWithContent(react.createElement(opening_hours_editor_ConfirmEditRepeatedOpeningHour,{title:t("openingHoursRemoveEventTitleText"),confirmSubmit:handleEventRemoveConfirm,closeDialog})):handleEventRemoveConfirm(!1)}},t("openingHoursRemoveEventButtonText"))),react.createElement(dialog_Dialog,{closeDialog,ref:dialogRef},dialogContent))},opening_hours_editor_DialogFormEdit=DialogFormEdit;try{DialogFormEdit.displayName="DialogFormEdit",DialogFormEdit.__docgenInfo={description:"",displayName:"DialogFormEdit",props:{eventInfo:{defaultValue:null,description:"",name:"eventInfo",required:!0,type:{name:"EventImpl"}},handleEventEditing:{defaultValue:null,description:"",name:"handleEventEditing",required:!0,type:{name:"(event: DplOpeningHoursUpdatePATCH200Item) => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}},handleEventRemove:{defaultValue:null,description:"",name:"handleEventRemove",required:!0,type:{name:"({ eventId, repetition_id }: HandleEventRemoveType) => void"}},openingHoursCategories:{defaultValue:null,description:"",name:"openingHoursCategories",required:!0,type:{name:"OpeningHoursCategoriesType[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/DialogFormEdit.tsx#DialogFormEdit"]={docgenInfo:DialogFormEdit.__docgenInfo,name:"DialogFormEdit",path:"src/apps/opening-hours-editor/DialogFormEdit.tsx#DialogFormEdit"})}catch(__react_docgen_typescript_loader_error){}const ConfirmAddRepeatedOpeningHour=({startDate,category,startTime,endTime,repeatedEndDate,confirmSubmit,closeDialog})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"opening-hours-editor-form","data-cy":"opening-hours-editor-confirm-add-repeated-form"},react.createElement("h2",{className:"opening-hours-editor-form__label"},t("openingHoursConfirmAddRepeatedText")),react.createElement("table",{className:"opening-hours-editor-form__table","data-cy":"opening-hours-editor-form__table"},react.createElement("tbody",null,react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormCategoryText"),":"),react.createElement("td",null,category.title)),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormStartTimeText"),":"),react.createElement("td",null,startTime)),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormEndTimeText"),":"),react.createElement("td",null,endTime)),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormStartDateText"),":"),react.createElement("td",null,getDateString(startDate))),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormEndDateText"),":"),react.createElement("td",null,getDateString(repeatedEndDate))),react.createElement("tr",null,react.createElement("td",null,t("openingHoursEventFormEveryWeekdayText"),":"),react.createElement("td",null,getWeekDayName(startDate))))),react.createElement("button",{"data-cy":"opening-hours-editor-form__cancel",type:"button",className:"opening-hours-editor-form__cancel",onClick:closeDialog},t("openingHoursConfirmAddRepeatedCancelText")),react.createElement("button",{"data-cy":"opening-hours-editor-form__confirm",type:"button",className:"opening-hours-editor-form__submit",onClick:()=>{confirmSubmit(),closeDialog()}},t("openingHoursConfirmRepeatedSubmitText")))},opening_hours_editor_ConfirmAddRepeatedOpeningHour=ConfirmAddRepeatedOpeningHour;try{ConfirmAddRepeatedOpeningHour.displayName="ConfirmAddRepeatedOpeningHour",ConfirmAddRepeatedOpeningHour.__docgenInfo={description:"",displayName:"ConfirmAddRepeatedOpeningHour",props:{startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"Date"}},category:{defaultValue:null,description:"",name:"category",required:!0,type:{name:"OpeningHoursCategoriesType"}},startTime:{defaultValue:null,description:"",name:"startTime",required:!0,type:{name:"string"}},endTime:{defaultValue:null,description:"",name:"endTime",required:!0,type:{name:"string"}},repeatedEndDate:{defaultValue:null,description:"",name:"repeatedEndDate",required:!0,type:{name:"Date"}},confirmSubmit:{defaultValue:null,description:"",name:"confirmSubmit",required:!0,type:{name:"() => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx#ConfirmAddRepeatedOpeningHour"]={docgenInfo:ConfirmAddRepeatedOpeningHour.__docgenInfo,name:"ConfirmAddRepeatedOpeningHour",path:"src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx#ConfirmAddRepeatedOpeningHour"})}catch(__react_docgen_typescript_loader_error){}const DialogFormAdd=({selectedEventInfo,handleEventAdd,closeDialog:closeAddDialog,openingHoursCategories})=>{const{dialogContent,openDialogWithContent,closeDialog,dialogRef}=dialog_useDialog(),calendarApi=selectedEventInfo.view.calendar,isDayGridMonth="dayGridMonth"===selectedEventInfo.view.type,isTimeGridWeek="timeGridWeek"===selectedEventInfo.view.type;return react.createElement(react.Fragment,null,react.createElement(opening_hours_editor_EventForm,{openingHoursCategories,startDate:selectedEventInfo.start,endDate:selectedEventInfo.end,onSubmit:({category,startTime,endTime,startDate,repeatedEndDate})=>{const start=updateDateTime(selectedEventInfo.start,startTime),startStr=formatDateStr(start);let end=updateDateTime(selectedEventInfo.end,endTime),{endStr}=selectedEventInfo;if(isTimeGridWeek){const adjustedEnd=((startDay,endDay)=>{let adjustedEndDay;const start=dayjs_min_default()(startDay),end=dayjs_min_default()(endDay);return adjustedEndDay=start.isSame(end,"day")?end:start.add(1,"day").startOf("day"),{end:adjustedEndDay.toDate(),endStr:formatDateStr(adjustedEndDay.toDate())}})(start,end);end=adjustedEnd.end,endStr=adjustedEnd.endStr}if(isDayGridMonth){const adjustedEnd=((startDay,endDay)=>{const adjustedEndDay=adjustEndDateBasedOnStartDate(startDay,endDay);return{end:adjustedEndDay,endStr:formatDateStr(adjustedEndDay)}})(start,end);end=adjustedEnd.end,endStr=adjustedEnd.endStr}const newFullCalenderEvent={...selectedEventInfo,start,startStr,end,endStr,title:category.title,color:category.color,allDay:!1};calendarApi.addEvent(newFullCalenderEvent),calendarApi.unselect();const cmsEvent=(event=>{if(!event.title||!event.color)throw new Error("Invalid event format");const startDate=dayjs_min_default()(event.startStr),endDate=dayjs_min_default()(event.endStr);return{id:Number(event.id),category:{title:event.title,color:event.color},date:startDate.format("YYYY-MM-DD"),start_time:startDate.format("HH:mm"),end_time:endDate.format("HH:mm"),repetition:event.repetition,branch_id:0}})({...newFullCalenderEvent,repetition:{type:repeatedEndDate?DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_weekly:DplOpeningHoursCreatePOSTOpeningHoursInstanceBodyRepetitionType_none,...repeatedEndDate?{weekly_data:{end_date:repeatedEndDate}}:{}}});repeatedEndDate?openDialogWithContent(react.createElement(opening_hours_editor_ConfirmAddRepeatedOpeningHour,{startDate,category,startTime,endTime,repeatedEndDate:new Date(repeatedEndDate),confirmSubmit:()=>{handleEventAdd(cmsEvent),closeAddDialog()},closeDialog})):(handleEventAdd(cmsEvent),closeAddDialog())},isRepeatedOpeningHour:!0}),react.createElement(dialog_Dialog,{closeDialog,ref:dialogRef},dialogContent))},opening_hours_editor_DialogFormAdd=DialogFormAdd;try{DialogFormAdd.displayName="DialogFormAdd",DialogFormAdd.__docgenInfo={description:"",displayName:"DialogFormAdd",props:{selectedEventInfo:{defaultValue:null,description:"",name:"selectedEventInfo",required:!0,type:{name:"DateSelectArg"}},handleEventAdd:{defaultValue:null,description:"",name:"handleEventAdd",required:!0,type:{name:"(event: DplOpeningHoursCreatePOSTOpeningHoursInstanceBody) => void"}},closeDialog:{defaultValue:null,description:"",name:"closeDialog",required:!0,type:{name:"() => void"}},openingHoursCategories:{defaultValue:null,description:"",name:"openingHoursCategories",required:!0,type:{name:"OpeningHoursCategoriesType[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/DialogFormAdd.tsx#DialogFormAdd"]={docgenInfo:DialogFormAdd.__docgenInfo,name:"DialogFormAdd",path:"src/apps/opening-hours-editor/DialogFormAdd.tsx#DialogFormAdd"})}catch(__react_docgen_typescript_loader_error){}const OpeningHoursEditor=({initialDate})=>{var _fullCalendarRef$curr;const iconAltText=(0,utils_text.F)()("openingHoursRepeatedIconAltText"),openingHoursCategories=(0,utils_config.UK)()("openingHoursEditorCategoriesConfig",{transformer:"jsonParse"}),fullCalendarRef=react.useRef(null),fullCalendarApi=null===(_fullCalendarRef$curr=fullCalendarRef.current)||void 0===_fullCalendarRef$curr?void 0:_fullCalendarRef$curr.getApi(),{events,handleEventAdd,handleEventEditing,handleEventRemove,handleDatesSet}=opening_hours_editor_useOpeningHoursEditor(),{dialogContent,openDialogWithContent,closeDialog,dialogRef}=dialog_useDialog({onClose:()=>{fullCalendarApi&&fullCalendarApi.unselect()}});return react.createElement(react.Fragment,null,react.createElement(dialog_Dialog,{closeDialog,ref:dialogRef},dialogContent),react.createElement(dist.A,{initialDate:initialDate??void 0,ref:fullCalendarRef,plugins:[daygrid.A,timegrid.A,interaction.Ay],headerToolbar:{left:"dayGridMonth,timeGridWeek",center:"title",right:"prev,next today"},initialView:"timeGridWeek",locale:da.A,selectable:!0,select:selectedEventInfo=>openDialogWithContent(react.createElement(opening_hours_editor_DialogFormAdd,{selectedEventInfo,handleEventAdd,openingHoursCategories,closeDialog})),unselectAuto:!1,eventClick:clickInfo=>openDialogWithContent(react.createElement(opening_hours_editor_DialogFormEdit,{eventInfo:clickInfo.event,handleEventEditing,handleEventRemove,openingHoursCategories,closeDialog})),eventContent:eventInput=>opening_hours_editor_OpeningHoursEditorEventContent({eventInput,iconAltText}),events,stickyHeaderDates:!0,height:"auto",selectMirror:!0,allDaySlot:!1,datesSet:handleDatesSet}))},opening_hours_editor_OpeningHoursEditor=OpeningHoursEditor;try{OpeningHoursEditor.displayName="OpeningHoursEditor",OpeningHoursEditor.__docgenInfo={description:"",displayName:"OpeningHoursEditor",props:{initialDate:{defaultValue:null,description:"",name:"initialDate",required:!1,type:{name:"Date | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/OpeningHoursEditor.tsx#OpeningHoursEditor"]={docgenInfo:OpeningHoursEditor.__docgenInfo,name:"OpeningHoursEditor",path:"src/apps/opening-hours-editor/OpeningHoursEditor.tsx#OpeningHoursEditor"})}catch(__react_docgen_typescript_loader_error){}const OpeningHoursEditor_entry=(0,utils_config.NV)((0,url.nU)((0,utils_text.i)((({initialDate=new Date})=>react.createElement(opening_hours_editor_OpeningHoursEditor,{initialDate})))));try{OpeningHoursEditorentry.displayName="OpeningHoursEditorentry",OpeningHoursEditorentry.__docgenInfo={description:"",displayName:"OpeningHoursEditorentry",props:{openingHoursRemoveEventButtonText:{defaultValue:null,description:"",name:"openingHoursRemoveEventButtonText",required:!0,type:{name:"string"}},openingHoursInvalidEventText:{defaultValue:null,description:"",name:"openingHoursInvalidEventText",required:!0,type:{name:"string"}},openingHoursEventFormCategoryText:{defaultValue:null,description:"",name:"openingHoursEventFormCategoryText",required:!0,type:{name:"string"}},openingHoursEventFormStartTimeText:{defaultValue:null,description:"",name:"openingHoursEventFormStartTimeText",required:!0,type:{name:"string"}},openingHoursEventFormEndTimeText:{defaultValue:null,description:"",name:"openingHoursEventFormEndTimeText",required:!0,type:{name:"string"}},openingHoursEventFormSubmitText:{defaultValue:null,description:"",name:"openingHoursEventFormSubmitText",required:!0,type:{name:"string"}},openingHoursEventFormRepeatedText:{defaultValue:null,description:"",name:"openingHoursEventFormRepeatedText",required:!0,type:{name:"string"}},openingHoursEventFormEndDateText:{defaultValue:null,description:"",name:"openingHoursEventFormEndDateText",required:!0,type:{name:"string"}},openingHoursEventFormEveryWeekdayText:{defaultValue:null,description:"",name:"openingHoursEventFormEveryWeekdayText",required:!0,type:{name:"string"}},openingHoursEventFormStartDateText:{defaultValue:null,description:"",name:"openingHoursEventFormStartDateText",required:!0,type:{name:"string"}},openingHoursConfirmAddRepeatedText:{defaultValue:null,description:"",name:"openingHoursConfirmAddRepeatedText",required:!0,type:{name:"string"}},openingHoursConfirmAddRepeatedCancelText:{defaultValue:null,description:"",name:"openingHoursConfirmAddRepeatedCancelText",required:!0,type:{name:"string"}},openingHoursConfirmRepeatedSubmitText:{defaultValue:null,description:"",name:"openingHoursConfirmRepeatedSubmitText",required:!0,type:{name:"string"}},openingHoursRepeatedIconAltText:{defaultValue:null,description:"",name:"openingHoursRepeatedIconAltText",required:!0,type:{name:"string"}},openingHoursEditEventConfirmOptionThisText:{defaultValue:null,description:"",name:"openingHoursEditEventConfirmOptionThisText",required:!0,type:{name:"string"}},openingHoursEditEventConfirmOptionAllText:{defaultValue:null,description:"",name:"openingHoursEditEventConfirmOptionAllText",required:!0,type:{name:"string"}},openingHoursRemoveEventTitleText:{defaultValue:null,description:"",name:"openingHoursRemoveEventTitleText",required:!0,type:{name:"string"}},openingHoursEditEventTitleText:{defaultValue:null,description:"",name:"openingHoursEditEventTitleText",required:!0,type:{name:"string"}},initialDate:{defaultValue:{value:"new Date()"},description:"",name:"initialDate",required:!1,type:{name:"Date | undefined"}},openingHoursEditorCategoriesConfig:{defaultValue:null,description:"",name:"openingHoursEditorCategoriesConfig",required:!0,type:{name:"string"}},openingHoursBranchIdConfig:{defaultValue:null,description:"",name:"openingHoursBranchIdConfig",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours-editor/OpeningHoursEditor.entry.tsx#OpeningHoursEditorentry"]={docgenInfo:OpeningHoursEditorentry.__docgenInfo,name:"OpeningHoursEditorentry",path:"src/apps/opening-hours-editor/OpeningHoursEditor.entry.tsx#OpeningHoursEditorentry"})}catch(__react_docgen_typescript_loader_error){}const OpeningHoursEditor_dev={title:"Apps / Opening Hours Editor",component:OpeningHoursEditor_entry,argTypes:{...serviceUrlArgs.A,openingHoursRemoveEventButtonText:{name:"Opening hours remove event button",defaultValue:"Remove event",control:{type:"text"}},openingHoursInvalidEventText:{name:"Opening hours invalid event text",defaultValue:"Invalid event. No start or end time",control:{type:"text"}},openingHoursEditorCategoriesConfig:{name:"Opening hours categories",defaultValue:'[{"title":"\\u00c5bent","color":"#B3DC6C"},{"title":"Telefontid","color":"#FBE983"},{"title":"Borgerservice","color":"lightblue"}]',control:{type:"text"}},openingHoursBranchIdConfig:{name:"Opening hours branch id",defaultValue:"12",control:{type:"text"}},initialDate:{name:"Initial date to show",defaultValue:new Date("2024-03-25"),control:{type:"date"}},openingHoursEventFormCategoryText:{name:"Opening hours event form category",defaultValue:"Opening hour",control:{type:"text"}},openingHoursEventFormStartTimeText:{name:"Opening hours event form start time",defaultValue:"Start time",control:{type:"text"}},openingHoursEventFormEndTimeText:{name:"Opening hours event form end time",defaultValue:"End time",control:{type:"text"}},openingHoursEventFormSubmitText:{name:"Opening hours event form submit",defaultValue:"Submit",control:{type:"text"}},openingHoursEventFormRepeatedText:{name:"Opening hours event form repeated",defaultValue:"Repeat opening hour weekly every @weekDayName from @startDate",control:{type:"text"}},openingHoursEventFormEndDateText:{name:"Opening hours event to end date",defaultValue:"End date",control:{type:"text"}},openingHoursEventFormStartDateText:{name:"Opening hours event form start date",defaultValue:"Start date",control:{type:"text"}},openingHoursEventFormEveryWeekdayText:{name:"Opening hours event form every weekday",defaultValue:"Every",control:{type:"text"}},openingHoursConfirmAddRepeatedText:{name:"Opening hours confirm add repeated",defaultValue:"Do you want to add this repeated opening hour?",control:{type:"text"}},openingHoursConfirmAddRepeatedCancelText:{name:"Opening hours confirm add repeated cancel",defaultValue:"Cancel",control:{type:"text"}},openingHoursConfirmRepeatedSubmitText:{name:"Opening hours confirm add repeated submit",defaultValue:"I'm sure",control:{type:"text"}},openingHoursRepeatedIconAltText:{name:"Opening hours repeated icon alt text",defaultValue:"Repeated opening hour",control:{type:"text"}},openingHoursEditEventConfirmOptionThisText:{name:"Opening hours remove event confirm option this",defaultValue:"Only this instance",control:{type:"text"}},openingHoursEditEventConfirmOptionAllText:{name:"Opening hours remove event confirm option all",defaultValue:"This and future instances",control:{type:"text"}},openingHoursRemoveEventTitleText:{name:"Opening hours remove event title",defaultValue:"Remove opening hour",control:{type:"text"}},openingHoursEditEventTitleText:{name:"Opening hours edit event title",defaultValue:"Edit opening hour",control:{type:"text"}}}},App=args=>react.createElement(OpeningHoursEditor_entry,args)},"./src/apps/opening-hours/OpeningHours.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>OpeningHours_dev,materialWithoutType:()=>materialWithoutType});var react=__webpack_require__("./node_modules/react/index.js"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),ArrowLeft=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ArrowLeft.svg"),ArrowLeft_default=__webpack_require__.n(ArrowLeft),ArrowRight=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ArrowRight.svg"),ArrowRight_default=__webpack_require__.n(ArrowRight),dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),clsx=(__webpack_require__("./node_modules/dayjs/locale/da.js"),__webpack_require__("./node_modules/clsx/dist/clsx.mjs"));const opening_hours_OpeningHourWeekListSkeleton=()=>react.createElement("ul",{className:"opening-hours__content"},[...Array(5)].map((()=>react.createElement("li",{className:"opening-hours__row"},react.createElement("div",{className:"opening-hours__individual-day ssc-line ssc-line-headline"}),react.createElement("ul",null,[...Array(3)].map(((_,index)=>{const isOdd=index%2==0;return react.createElement("li",null,react.createElement("div",{className:(0,clsx.A)("ssc-line",{"ssc-line--odd":!isOdd})}))}))))))),OpeningHoursDayEntry=({data,isOdd})=>{const{start_time:startTime,end_time:endTime,category}=data;return react.createElement("li",{className:(0,clsx.A)("opening-hours__individual-opening",{"opening-hours__individual-opening--odd":isOdd})},react.createElement("div",{className:"opening-hours__category"},category.title),react.createElement("div",{className:"opening-hours__time"},startTime," - ",endTime))},opening_hours_OpeningHoursDayEntry=OpeningHoursDayEntry;try{OpeningHoursDayEntry.displayName="OpeningHoursDayEntry",OpeningHoursDayEntry.__docgenInfo={description:"",displayName:"OpeningHoursDayEntry",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"DplOpeningHoursListGET200Item"}},isOdd:{defaultValue:null,description:"",name:"isOdd",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHoursDayEntry.tsx#OpeningHoursDayEntry"]={docgenInfo:OpeningHoursDayEntry.__docgenInfo,name:"OpeningHoursDayEntry",path:"src/apps/opening-hours/OpeningHoursDayEntry.tsx#OpeningHoursDayEntry"})}catch(__react_docgen_typescript_loader_error){}var upperFirst=__webpack_require__("./node_modules/lodash/upperFirst.js"),upperFirst_default=__webpack_require__.n(upperFirst),weekOfYear=__webpack_require__("./node_modules/dayjs/plugin/weekOfYear.js"),weekOfYear_default=__webpack_require__.n(weekOfYear);dayjs_min_default().locale("da"),dayjs_min_default().extend(weekOfYear_default());const getNextWeek=date=>dayjs_min_default()(date).add(1,"week").toDate(),getPreviousWeek=date=>dayjs_min_default()(date).subtract(1,"week").toDate(),formatWeekString=(translationKey,date)=>{const week=(date=>dayjs_min_default()(date).week().toString())(date),year=(date=>dayjs_min_default()(date).year().toString())(date);return`${translationKey} ${week}, ${year}`},formatDateToWeekday=date=>{const formattedAsWeekday=dayjs_min_default()(date).format("dddd");var string;return string=formattedAsWeekday,upperFirst_default()(string)},formatDateForAPI=date=>dayjs_min_default()(date).format("YYYY-MM-DD"),getWeekStartAndEndDate=(date=new Date)=>({start:dayjs_min_default()(date).startOf("week").toDate(),end:dayjs_min_default()(date).endOf("week").toDate()}),opening_hours_OpeningHourWeekList=({data,isLoading})=>{const t=(0,utils_text.F)();return isLoading?react.createElement(opening_hours_OpeningHourWeekListSkeleton,null):react.createElement("ul",{className:"opening-hours__content","data-cy":"opening-hours-week-list"},data.map((({dateTime,openingHourEntries})=>{const dateAsWeekday=formatDateToWeekday(dateTime),formattedDateForDisplay=dayjs_min_default()(dateTime).format("DD/MM");return react.createElement("li",{key:formattedDateForDisplay,className:"opening-hours__row"},react.createElement("h3",{className:"opening-hours__individual-day"},`${dateAsWeekday}: d. ${formattedDateForDisplay}`),openingHourEntries.length>0?react.createElement("ul",null,openingHourEntries.map(((item,categoryIndex)=>react.createElement(opening_hours_OpeningHoursDayEntry,{key:item.id,data:item,isOdd:categoryIndex%2==0})))):react.createElement("p",null,t("libraryIsClosedText")))})))};try{OpeningHourWeekList.displayName="OpeningHourWeekList",OpeningHourWeekList.__docgenInfo={description:"",displayName:"OpeningHourWeekList",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"GroupedOpeningHours"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHourWeekList.tsx#OpeningHourWeekList"]={docgenInfo:OpeningHourWeekList.__docgenInfo,name:"OpeningHourWeekList",path:"src/apps/opening-hours/OpeningHourWeekList.tsx#OpeningHourWeekList"})}catch(__react_docgen_typescript_loader_error){}var dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts");const opening_hours_useOpeningHours=function useOpeningHours(initialDate,branchId){const[currentWeekRange,setCurrentWeekRange]=(0,react.useState)((()=>getWeekStartAndEndDate(initialDate))),[groupedOpeningHours,setGroupedOpeningHours]=(0,react.useState)([]),{data:openingHours,error,isLoading}=(0,dpl_cms.Dp)({branch_id:branchId,from_date:formatDateForAPI(currentWeekRange.start),to_date:formatDateForAPI(currentWeekRange.end)});(0,react.useEffect)((()=>{if(!isLoading&&!error&&openingHours){const newGroupedOpeningHours=((startDate,endDate,openingHours)=>{const startDay=dayjs_min_default()(startDate),endDay=dayjs_min_default()(endDate);let currentDay=startDay;const allDays=[];for(;!currentDay.isAfter(endDay);)allDays.push(currentDay.toDate()),currentDay=currentDay.add(1,"day");return allDays.map((day=>({dateTime:day,openingHourEntries:openingHours.filter((individualOpeningHour=>dayjs_min_default()(individualOpeningHour.date).isSame(day,"day"))).sort(((a,b)=>{const startTimeComparison=a.start_time.localeCompare(b.start_time);return 0!==startTimeComparison?startTimeComparison:a.end_time.localeCompare(b.end_time)}))})))})(currentWeekRange.start,currentWeekRange.end,openingHours);setGroupedOpeningHours(newGroupedOpeningHours)}}),[openingHours,currentWeekRange,isLoading,error]);const navigateToPreviousWeek=(0,react.useCallback)((()=>{setCurrentWeekRange((prev=>{const previousWeek=getPreviousWeek(prev.start);return getWeekStartAndEndDate(previousWeek)}))}),[]),navigateToNextWeek=(0,react.useCallback)((()=>{setCurrentWeekRange((prev=>{const nextWeek=getNextWeek(prev.start);return getWeekStartAndEndDate(nextWeek)}))}),[]);return{groupedOpeningHours,currentWeekRange,navigateToPreviousWeek,navigateToNextWeek,isLoading}},OpeningHours=({branchId,initialDate})=>{const{currentWeekRange,groupedOpeningHours,navigateToPreviousWeek,navigateToNextWeek,isLoading}=opening_hours_useOpeningHours(initialDate,branchId),t=(0,utils_text.F)(),nextWeekDate=getNextWeek(currentWeekRange.start),previousWeekDate=getPreviousWeek(currentWeekRange.start),nextWeekString=formatWeekString(t("showOpeningHoursForWeekText"),nextWeekDate),previousWeekString=formatWeekString(t("showOpeningHoursForWeekText"),previousWeekDate),currentWeekString=formatWeekString(t("weekText"),currentWeekRange.start);return react.createElement("div",{className:"opening-hours"},react.createElement("div",{className:"opening-hours__header"},react.createElement("h2",{className:"opening-hours__heading"},t("openingHoursHeadingText")),react.createElement("div",{className:"opening-hours__navigation-controls"},react.createElement("button",{"data-cy":"opening-hours-previous-week-button",className:"opening-hours__navigation-control","aria-label":previousWeekString,onClick:navigateToPreviousWeek,type:"button"},react.createElement("img",{src:ArrowLeft_default(),alt:""})),react.createElement("div",{className:"opening-hours__week-display"},currentWeekString),react.createElement("button",{"data-cy":"opening-hours-next-week-button",className:"opening-hours__navigation-control opening-hours__navigation-control--next","aria-label":nextWeekString,onClick:navigateToNextWeek,type:"button"},react.createElement("img",{src:ArrowRight_default(),alt:""})))),react.createElement(opening_hours_OpeningHourWeekList,{data:groupedOpeningHours,isLoading}))},opening_hours_OpeningHours=OpeningHours;try{OpeningHours.displayName="OpeningHours",OpeningHours.__docgenInfo={description:"",displayName:"OpeningHours",props:{branchId:{defaultValue:null,description:"",name:"branchId",required:!0,type:{name:"number"}},initialDate:{defaultValue:null,description:"",name:"initialDate",required:!0,type:{name:"Date"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHours.tsx#OpeningHours"]={docgenInfo:OpeningHours.__docgenInfo,name:"OpeningHours",path:"src/apps/opening-hours/OpeningHours.tsx#OpeningHours"})}catch(__react_docgen_typescript_loader_error){}const OpeningHours_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({branchId,initialDate=new Date})=>react.createElement(opening_hours_OpeningHours,{branchId,initialDate})))));try{OpeningHoursentry.displayName="OpeningHoursentry",OpeningHoursentry.__docgenInfo={description:"",displayName:"OpeningHoursentry",props:{branchId:{defaultValue:null,description:"",name:"branchId",required:!0,type:{name:"number"}},initialDate:{defaultValue:{value:"new Date()"},description:"",name:"initialDate",required:!1,type:{name:"Date | undefined"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/opening-hours/OpeningHours.entry.tsx#OpeningHoursentry"]={docgenInfo:OpeningHoursentry.__docgenInfo,name:"OpeningHoursentry",path:"src/apps/opening-hours/OpeningHours.entry.tsx#OpeningHoursentry"})}catch(__react_docgen_typescript_loader_error){}const OpeningHours_dev={title:"Apps / Opening Hours",component:OpeningHours_entry,argTypes:{initialDate:{defaultValue:new Date("2024-03-25"),control:{type:"date"}},branchId:{defaultValue:12,control:{type:"number"}},showOpeningHoursForWeekText:{defaultValue:"Show opening hours for week",control:{type:"text"}},weekText:{defaultValue:"Week",control:{type:"text"}},libraryIsClosedText:{defaultValue:"The library is closed this day",control:{type:"text"}},openingHoursHeadingText:{defaultValue:"Opening hours",control:{type:"text"}},...globalConfigArgs.A,...globalTextArgs.A,...serviceUrlArgs.A}},Default=args=>react.createElement(OpeningHours_entry,args),materialWithoutType=Default.bind({})},"./src/apps/patron-page/PatronPage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PatronPageEntry:()=>PatronPage_dev_PatronPageEntry,default:()=>PatronPage_dev});var react=__webpack_require__("./node_modules/react/index.js"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),set=__webpack_require__("./node_modules/lodash/set.js"),set_default=__webpack_require__.n(set),Link=__webpack_require__("./src/components/atoms/links/Link.tsx");const BasicDetailsSection=({patron})=>{const t=(0,utils_text.F)(),{address:{coName,street,postalCode,city,country}={coName:"",street:"",postalCode:"",city:"",country:""},name}=patron||{};return react.createElement("section",null,react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageBasicDetailsHeaderText")),react.createElement("div",{className:"dpl-patron-info"},react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsNameLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},name),react.createElement("h3",{className:"dpl-patron-info__label text-header-h4"},t("patronPageBasicDetailsAddressLabelText")),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",null,coName),react.createElement("div",null,street),react.createElement("div",null,postalCode),react.createElement("div",null,city),react.createElement("div",null,country))))},sections_BasicDetailsSection=BasicDetailsSection;try{BasicDetailsSection.displayName="BasicDetailsSection",BasicDetailsSection.__docgenInfo={description:"",displayName:"BasicDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"]={docgenInfo:BasicDetailsSection.__docgenInfo,name:"BasicDetailsSection",path:"src/apps/patron-page/sections/BasicDetailsSection.tsx#BasicDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var ContactInfoSection=__webpack_require__("./src/components/contact-info-section/ContactInfoSection.tsx"),BranchesDropdown=__webpack_require__("./src/apps/patron-page/util/BranchesDropdown.tsx");const ReservationDetailsSection=({patron,changePatron})=>{const t=(0,utils_text.F)();return react.createElement("section",{"data-cy":"pickup-reservations-section"},react.createElement("h2",{className:"text-header-h4 mt-64 mb-16"},t("patronPageChangePickupHeaderText")),react.createElement("p",{className:"text-body-small-regular mb-8"},t("patronPageChangePickupBodyText")),react.createElement(BranchesDropdown.A,{classNames:"dropdow dropdown__desktop",selected:(null==patron?void 0:patron.preferredPickupBranch)||"",onChange:newPreferredPickupBranch=>changePatron(newPreferredPickupBranch,"preferredPickupBranch")}))},sections_ReservationDetailsSection=ReservationDetailsSection;try{ReservationDetailsSection.displayName="ReservationDetailsSection",ReservationDetailsSection.__docgenInfo={description:"",displayName:"ReservationDetailsSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"]={docgenInfo:ReservationDetailsSection.__docgenInfo,name:"ReservationDetailsSection",path:"src/apps/patron-page/sections/ReservationDetailsSection.tsx#ReservationDetailsSection"})}catch(__react_docgen_typescript_loader_error){}var PincodeSection=__webpack_require__("./src/apps/patron-page/sections/PincodeSection.tsx"),publizon=__webpack_require__("./src/core/publizon/publizon.ts");const StatusSection=()=>{const t=(0,utils_text.F)(),alwaysAvailableEreolenUrl=(0,url.Ik)()("alwaysAvailableEreolenUrl"),{data:libraryProfileFetched}=(0,publizon.PF)(),{isSuccess,data}=(0,publizon.VM)(),[libraryProfile,setLibraryProfile]=(0,react.useState)(null),[patronData,setPatronData]=(0,react.useState)(null);(0,react.useEffect)((()=>{isSuccess&&data&&data.userData&&setPatronData(data.userData)}),[isSuccess,data]),(0,react.useEffect)((()=>{libraryProfileFetched&&setLibraryProfile(libraryProfileFetched)}),[libraryProfileFetched]);const{maxConcurrentAudioLoansPerBorrower,maxConcurrentEbookLoansPerBorrower,maxConcurrentAudioReservationsPerBorrower=0,maxConcurrentEbookReservationsPerBorrower=0}=libraryProfile||{};let patronEbookLoans=0;null!=patronData&&patronData.totalEbookLoans&&(patronEbookLoans=Math.abs(null==patronData?void 0:patronData.totalEbookLoans)||0);let patronAudioBookLoans=0;null!=patronData&&patronData.totalAudioLoans&&(patronAudioBookLoans=Math.abs(null==patronData?void 0:patronData.totalAudioLoans)||0);let eBookLoanPercent=100;maxConcurrentEbookLoansPerBorrower&&(eBookLoanPercent=patronEbookLoans/maxConcurrentEbookLoansPerBorrower*100);let audioBookLoanPercent=100;return maxConcurrentAudioLoansPerBorrower&&(audioBookLoanPercent=patronAudioBookLoans/maxConcurrentAudioLoansPerBorrower*100),react.createElement("section",{className:"dpl-status-loans"},libraryProfile&&react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h4 mt-64 mb-16"},t("patronPageStatusSectionHeaderText")),react.createElement("div",{className:"text-body-small-regular mb-8"},t("patronPageStatusSectionBodyText")," ",react.createElement(Link.A,{href:alwaysAvailableEreolenUrl},t("patronPageStatusSectionLinkText"))),react.createElement("div",{className:"text-body-small-regular mt-8 mb-8"},t("patronPageStatusSectionReservationsText",{placeholders:{"@countEbooks":maxConcurrentEbookReservationsPerBorrower,"@countAudiobooks":maxConcurrentAudioReservationsPerBorrower}})),react.createElement("div",{className:"dpl-status-loans__column"},react.createElement("div",{className:"dpl-status mt-32"},react.createElement("h3",{className:"text-small-caption"},t("patronPageStatusSectionLoanHeaderText")),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label text-body-medium-medium",htmlFor:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionLoansEbooksText")),void 0!==maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"patron-page-status-section-out-of-text"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},void 0!==maxConcurrentEbookLoansPerBorrower&&react.createElement("div",{className:"bg-identity-primary",role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelEbooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentEbookLoansPerBorrower}}),style:{width:`${eBookLoanPercent}%`}}))),react.createElement("div",{className:"dpl-progress-bar text-small-caption color-secondary-gray"},react.createElement("div",{className:"dpl-progress-bar__header"},react.createElement("label",{className:"text-label",htmlFor:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionLoansAudioBooksText")),void 0!==maxConcurrentAudioLoansPerBorrower&&react.createElement("div",{className:"text-label",id:"max-concurrent-audio-loans-per-borrower"},t("patronPageStatusSectionOutOfText",{placeholders:{"@this":patronAudioBookLoans,"@that":maxConcurrentAudioLoansPerBorrower}}))),react.createElement("div",{className:"dpl-progress-bar__progress-bar bg-global-secondary"},void 0!==maxConcurrentAudioLoansPerBorrower&&react.createElement("div",{role:"figure","aria-label":t("patronPageStatusSectionOutOfAriaLabelAudioBooksText",{placeholders:{"@this":patronEbookLoans,"@that":maxConcurrentAudioLoansPerBorrower}}),className:"bg-identity-primary",style:{width:`${audioBookLoanPercent}%`}})))))))},sections_StatusSection=StatusSection;try{StatusSection.displayName="StatusSection",StatusSection.__docgenInfo={description:"",displayName:"StatusSection",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/StatusSection.tsx#StatusSection"]={docgenInfo:StatusSection.__docgenInfo,name:"StatusSection",path:"src/apps/patron-page/sections/StatusSection.tsx#StatusSection"})}catch(__react_docgen_typescript_loader_error){}var PromoBar=__webpack_require__("./src/components/promo-bar/PromoBar.tsx");const NotificationComponent=({notificationMessage})=>react.createElement(PromoBar.A,{text:notificationMessage,type:"info"}),notification_NotificationComponent=NotificationComponent;try{NotificationComponent.displayName="NotificationComponent",NotificationComponent.__docgenInfo={description:"",displayName:"NotificationComponent",props:{notificationMessage:{defaultValue:null,description:"",name:"notificationMessage",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/notification/NotificationComponent.tsx#NotificationComponent"]={docgenInfo:NotificationComponent.__docgenInfo,name:"NotificationComponent",path:"src/components/notification/NotificationComponent.tsx#NotificationComponent"})}catch(__react_docgen_typescript_loader_error){}const useNotificationMessage=({timeout=5e3,scrollToTop=!0}={})=>{const[notificationMessage,setNotificationMessage]=(0,react.useState)(null);return[()=>notificationMessage?react.createElement(notification_NotificationComponent,{notificationMessage}):null,text=>{setNotificationMessage(text),scrollToTop&&window.scrollTo(0,0),timeout&&setTimeout((()=>{setNotificationMessage(null)}),timeout)}]};try{useNotificationMessage.displayName="useNotificationMessage",useNotificationMessage.__docgenInfo={description:"",displayName:"useNotificationMessage",props:{timeout:{defaultValue:{value:"5000"},description:"",name:"timeout",required:!1,type:{name:"number | undefined"}},scrollToTop:{defaultValue:{value:"true"},description:"",name:"scrollToTop",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useNotificationMessage.tsx#useNotificationMessage"]={docgenInfo:useNotificationMessage.__docgenInfo,name:"useNotificationMessage",path:"src/core/utils/useNotificationMessage.tsx#useNotificationMessage"})}catch(__react_docgen_typescript_loader_error){}var usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const sections_BasicDetailsSectionSkeleton=()=>react.createElement("div",{className:"dpl-patron-info ssc"},react.createElement("div",{className:"dpl-patron-info__label"},react.createElement("div",{className:"ssc-head-line w-10"})),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",{className:"ssc-head-line w-20 mts"})),react.createElement("div",{className:"dpl-patron-info__label"},react.createElement("div",{className:"ssc-head-line w-10"})),react.createElement("div",{className:"dpl-patron-info__text"},react.createElement("div",{className:"ssc-head-line w-40 mts"}))),PatronPageSkeleton=()=>{const t=(0,utils_text.F)();return react.createElement("form",{className:"dpl-patron-page"},react.createElement("h1",{className:"text-header-h1 my-32"},t("patronPageHeaderText")),react.createElement("h2",{className:"text-header-h4 mt-32 mb-16"},t("patronPageBasicDetailsHeaderText")),react.createElement(sections_BasicDetailsSectionSkeleton,null),react.createElement(ContactInfoSection.A,{changePatron:()=>{},patron:null,inLine:!1,showCheckboxes:!0}))},patron_page_PatronPageSkeleton=PatronPageSkeleton;try{PatronPageSkeleton.displayName="PatronPageSkeleton",PatronPageSkeleton.__docgenInfo={description:"",displayName:"PatronPageSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPageSkeleton.tsx#PatronPageSkeleton"]={docgenInfo:PatronPageSkeleton.__docgenInfo,name:"PatronPageSkeleton",path:"src/apps/patron-page/PatronPageSkeleton.tsx#PatronPageSkeleton"})}catch(__react_docgen_typescript_loader_error){}var useSavePatron=__webpack_require__("./src/core/utils/useSavePatron.tsx");const PatronPage=()=>{const t=(0,utils_text.F)(),deletePatronUrl=(0,url.Ik)()("deletePatronUrl"),{data:patronData,isLoading}=(0,usePatronData.I)(),[patron,setPatron]=(0,react.useState)(null),[pin,setPin]=(0,react.useState)(null),[isPinChangeValid,setIsPinChangeValid]=(0,react.useState)(!0),[disableSubmitButton,setDisableSubmitButton]=(0,react.useState)(!1),[successPinMessage,setSuccessPinMessage]=(0,react.useState)(null),[NotificationComponent,handleNotificationMessage]=useNotificationMessage(),{savePatron,savePincode}=(0,useSavePatron.A)({patron:patron||void 0,fetchHandlers:{savePatron:{onSuccess:()=>{setDisableSubmitButton(!1),handleNotificationMessage(t("patronPageHandleResponseInformationText"))},onError:()=>{setDisableSubmitButton(!1)}},savePincode:{onSuccess:()=>{setDisableSubmitButton(!1),setSuccessPinMessage(t("patronPinSavedSuccessText")),handleNotificationMessage(t("patronPageHandleResponseInformationText"))},onError:()=>{setDisableSubmitButton(!1)}}}});if((0,react.useEffect)((()=>{patronData&&patronData.patron&&setPatron(patronData.patron)}),[patronData]),isLoading||!patron)return react.createElement(patron_page_PatronPageSkeleton,null);const changePatron=(newValue,key)=>{const copyUser=JSON.parse(JSON.stringify(patron));set_default()(copyUser,key,newValue),setPatron(copyUser)},handleSubmit=e=>{e.preventDefault(),patron&&(setDisableSubmitButton(!0),pin?savePincode({pincode:pin,libraryCardNumber:patron.patronId.toString()}):savePatron(patron))};return react.createElement("form",{className:"dpl-patron-page",onSubmit:e=>handleSubmit(e)},react.createElement("h1",{className:"text-header-h1 my-32"},t("patronPageHeaderText")),react.createElement(NotificationComponent,null),patron&&react.createElement(sections_BasicDetailsSection,{patron}),react.createElement("div",{className:"patron-page-info"},patron&&react.createElement(ContactInfoSection.A,{changePatron,patron,inLine:!1,showCheckboxes:!0}),(null==patron?void 0:patron.resident)&&react.createElement(sections_StatusSection,null),patron&&react.createElement(sections_ReservationDetailsSection,{changePatron,patron}),patron&&react.createElement(PincodeSection.A,{changePincode:setPin,required:!1,setIsPinValid:setIsPinChangeValid}),successPinMessage&&react.createElement("p",{className:"text-body-small-regular mb-8 mt-8",role:"alert"},successPinMessage),react.createElement("button",{"data-cy":"save-user-patron",className:"mt-48 btn-primary btn-filled btn-small arrow__hover--right-small ",type:"submit",disabled:disableSubmitButton||!isPinChangeValid},t(disableSubmitButton?"patronPageLoadingText":"patronPageSaveButtonText")),react.createElement("div",{className:"text-body-small-regular mt-32"},t("patronPageDeleteProfileText")," ",react.createElement(Link.A,{id:"delete-patron-link",href:deletePatronUrl,className:"link-tag"},t("patronPageDeleteProfileLinkText")))))},patron_page_PatronPage=PatronPage;try{PatronPage.displayName="PatronPage",PatronPage.__docgenInfo={description:"",displayName:"PatronPage",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.tsx#PatronPage"]={docgenInfo:PatronPage.__docgenInfo,name:"PatronPage",path:"src/apps/patron-page/PatronPage.tsx#PatronPage"})}catch(__react_docgen_typescript_loader_error){}var withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const PatronPage_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((()=>react.createElement(patron_page_PatronPage,null))))));try{PatronPageentry.displayName="PatronPageentry",PatronPageentry.__docgenInfo={description:"",displayName:"PatronPageentry",props:{blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},pincodeLengthMinConfig:{defaultValue:null,description:"",name:"pincodeLengthMinConfig",required:!0,type:{name:"string"}},pincodeLengthMaxConfig:{defaultValue:null,description:"",name:"pincodeLengthMaxConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},textNotificationsEnabledConfig:{defaultValue:null,description:"",name:"textNotificationsEnabledConfig",required:!0,type:{name:"string"}},minAgeConfig:{defaultValue:null,description:"",name:"minAgeConfig",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},patronContactEmailCheckboxText:{defaultValue:null,description:"",name:"patronContactEmailCheckboxText",required:!0,type:{name:"string"}},patronContactEmailLabelText:{defaultValue:null,description:"",name:"patronContactEmailLabelText",required:!0,type:{name:"string"}},patronContactInfoHeaderText:{defaultValue:null,description:"",name:"patronContactInfoHeaderText",required:!0,type:{name:"string"}},patronContactPhoneCheckboxText:{defaultValue:null,description:"",name:"patronContactPhoneCheckboxText",required:!0,type:{name:"string"}},patronContactPhoneLabelText:{defaultValue:null,description:"",name:"patronContactPhoneLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsAddressLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsAddressLabelText",required:!0,type:{name:"string"}},patronPageBasicDetailsHeaderText:{defaultValue:null,description:"",name:"patronPageBasicDetailsHeaderText",required:!0,type:{name:"string"}},patronPageBasicDetailsNameLabelText:{defaultValue:null,description:"",name:"patronPageBasicDetailsNameLabelText",required:!0,type:{name:"string"}},patronPageChangePickupBodyText:{defaultValue:null,description:"",name:"patronPageChangePickupBodyText",required:!0,type:{name:"string"}},patronPageChangePickupHeaderText:{defaultValue:null,description:"",name:"patronPageChangePickupHeaderText",required:!0,type:{name:"string"}},patronPageChangePincodeBodyText:{defaultValue:null,description:"",name:"patronPageChangePincodeBodyText",required:!0,type:{name:"string"}},patronPageChangePincodeHeaderText:{defaultValue:null,description:"",name:"patronPageChangePincodeHeaderText",required:!0,type:{name:"string"}},patronPageConfirmPincodeLabelText:{defaultValue:null,description:"",name:"patronPageConfirmPincodeLabelText",required:!0,type:{name:"string"}},patronPageDeleteProfileLinkText:{defaultValue:null,description:"",name:"patronPageDeleteProfileLinkText",required:!0,type:{name:"string"}},patronPageDeleteProfileText:{defaultValue:null,description:"",name:"patronPageDeleteProfileText",required:!0,type:{name:"string"}},patronPageHandleResponseInformationText:{defaultValue:null,description:"",name:"patronPageHandleResponseInformationText",required:!0,type:{name:"string"}},patronPageHeaderText:{defaultValue:null,description:"",name:"patronPageHeaderText",required:!0,type:{name:"string"}},patronPageLoadingText:{defaultValue:null,description:"",name:"patronPageLoadingText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionAriaText",required:!0,type:{name:"string"}},patronPageOpenPauseReservationsSectionText:{defaultValue:null,description:"",name:"patronPageOpenPauseReservationsSectionText",required:!0,type:{name:"string"}},patronPagePauseReservationsBodyText:{defaultValue:null,description:"",name:"patronPagePauseReservationsBodyText",required:!0,type:{name:"string"}},patronPagePauseReservationsHeaderText:{defaultValue:null,description:"",name:"patronPagePauseReservationsHeaderText",required:!0,type:{name:"string"}},patronPagePhoneInputMessageText:{defaultValue:null,description:"",name:"patronPagePhoneInputMessageText",required:!0,type:{name:"string"}},patronPagePincodeLabelText:{defaultValue:null,description:"",name:"patronPagePincodeLabelText",required:!0,type:{name:"string"}},patronPagePincodesNotTheSameText:{defaultValue:null,description:"",name:"patronPagePincodesNotTheSameText",required:!0,type:{name:"string"}},patronPagePincodeTooShortValidationText:{defaultValue:null,description:"",name:"patronPagePincodeTooShortValidationText",required:!0,type:{name:"string"}},patronPageSaveButtonText:{defaultValue:null,description:"",name:"patronPageSaveButtonText",required:!0,type:{name:"string"}},patronPageStatusSectionBodyText:{defaultValue:null,description:"",name:"patronPageStatusSectionBodyText",required:!0,type:{name:"string"}},patronPageStatusSectionHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionLinkText:{defaultValue:null,description:"",name:"patronPageStatusSectionLinkText",required:!0,type:{name:"string"}},patronPageStatusSectionLoanHeaderText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoanHeaderText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansAudioBooksText",required:!0,type:{name:"string"}},patronPageStatusSectionLoansEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionLoansEbooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelAudioBooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfAriaLabelEbooksText",required:!0,type:{name:"string"}},patronPageStatusSectionOutOfText:{defaultValue:null,description:"",name:"patronPageStatusSectionOutOfText",required:!0,type:{name:"string"}},patronPageStatusSectionReservationsText:{defaultValue:null,description:"",name:"patronPageStatusSectionReservationsText",required:!0,type:{name:"string"}},patronPinSavedSuccessText:{defaultValue:null,description:"",name:"patronPinSavedSuccessText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},pauseReservationModalDateRangeLabelText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangeLabelText",required:!0,type:{name:"string"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangePlaceholderText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},pickupBranchesDropdownLabelText:{defaultValue:null,description:"",name:"pickupBranchesDropdownLabelText",required:!0,type:{name:"string"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:null,description:"",name:"pickupBranchesDropdownNothingSelectedText",required:!0,type:{name:"string"}},deletePatronUrl:{defaultValue:null,description:"",name:"deletePatronUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},alwaysLoanableEreolenUrl:{defaultValue:null,description:"",name:"alwaysLoanableEreolenUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"]={docgenInfo:PatronPageentry.__docgenInfo,name:"PatronPageentry",path:"src/apps/patron-page/PatronPage.entry.tsx#PatronPageentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),pincodeArgs=__webpack_require__("./src/core/storybook/pincodeArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const PatronPage_dev={title:"Apps / Patron page",component:PatronPage_entry,argTypes:{...serviceUrlArgs.A,...pincodeArgs.A,...blockedArgs.A,...globalTextArgs.A,...globalConfigArgs.A,pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},deletePatronUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},textNotificationsEnabledConfig:{defaultValue:"1",control:{type:"text"}},alwaysAvailableEreolenUrl:{defaultValue:"https://images.unsplash.com/photo-1560888126-5c13ad3f9345?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2371&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},patronPageHeaderText:{defaultValue:"Patron profile page",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},pauseReservationModalDateRangeLabelText:{defaultValue:"Pause period",control:{type:"text"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:"Choose pause period",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},patronPageBasicDetailsHeaderText:{defaultValue:"Basic details",control:{type:"text"}},patronPageBasicDetailsNameLabelText:{defaultValue:"Name",control:{type:"text"}},patronPageBasicDetailsAddressLabelText:{defaultValue:"Address",control:{type:"text"}},patronContactInfoHeaderText:{defaultValue:"Contact information",control:{type:"text"}},patronContactPhoneLabelText:{defaultValue:"Phone number",control:{type:"text"}},patronContactPhoneCheckboxText:{defaultValue:"Receive text messages about your loans, reservations, and so forth. This may cost money.",control:{type:"text"}},patronContactEmailLabelText:{defaultValue:"E-mail",control:{type:"text"}},patronContactEmailCheckboxText:{defaultValue:"Receive emails about your loans, reservations, and so forth",control:{type:"text"}},patronPageStatusSectionHeaderText:{defaultValue:"Digital loans (eReolen)",control:{type:"text"}},patronPageStatusSectionBodyText:{defaultValue:"There is a number of materials without limitation to amounts of loans per month.",control:{type:"text"}},patronPageStatusSectionLinkText:{defaultValue:"Click here, to see titles always eligible to be loaned",control:{type:"text"}},patronPageStatusSectionLoanHeaderText:{defaultValue:"Loans per month",control:{type:"text"}},patronPageStatusSectionLoansEbooksText:{defaultValue:"E-books",control:{type:"text"}},patronPageStatusSectionLoansAudioBooksText:{defaultValue:"Audiobooks",control:{type:"text"}},patronPageChangePickupHeaderText:{defaultValue:"Reservations",control:{type:"text"}},patronPageChangePickupBodyText:{defaultValue:"Change pickup body text",control:{type:"text"}},pickupBranchesDropdownLabelText:{defaultValue:"Choose pickup branch",control:{type:"text"}},pickupBranchesDropdownNothingSelectedText:{defaultValue:"Nothing selected",control:{type:"text"}},patronPagePauseReservationsHeaderText:{defaultValue:"Pause physical reservations",control:{type:"text"}},patronPagePauseReservationsBodyText:{defaultValue:"Patron page pause reservations body text",control:{type:"text"}},patronPageOpenPauseReservationsSectionText:{defaultValue:"Pause your reservations",control:{type:"text"}},patronPageOpenPauseReservationsSectionAriaText:{defaultValue:"This checkbox opens a modal where you can put your current reservations on a pause, when the time period picked has ended, the reservations will be resumed",control:{type:"text"}},patronPageChangePincodeHeaderText:{defaultValue:"Pincode",control:{type:"text"}},patronPageChangePincodeBodyText:{defaultValue:"Change current pin by entering a new pin and saving",control:{type:"text"}},patronPinSavedSuccessText:{defaultValue:"Pincode was saved",control:{type:"text"}},patronPagePincodeLabelText:{defaultValue:"New pin",control:{type:"text"}},patronPageConfirmPincodeLabelText:{defaultValue:"Confirm new pin",control:{type:"text"}},patronPagePincodeTooShortValidationText:{defaultValue:"The pincode should be minimum @pincodeLengthMin and maximum @pincodeLengthMax characters long",control:{type:"text"}},patronPagePincodesNotTheSameText:{defaultValue:"The pincodes are not the same",control:{type:"text"}},patronPageSaveButtonText:{defaultValue:"Save",control:{type:"text"}},patronPageDeleteProfileText:{defaultValue:"Do you wish to delete your library profile?",control:{type:"text"}},patronPageDeleteProfileLinkText:{defaultValue:"Delete your profile",control:{type:"text"}},patronPageStatusSectionReservationsText:{defaultValue:"You can reserve @countEbooks ebooks and @countAudiobooks audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfText:{defaultValue:"@this out of @that",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelAudioBooksText:{defaultValue:"You used @this audiobooks out of you quota of @that audiobooks",control:{type:"text"}},patronPageStatusSectionOutOfAriaLabelEbooksText:{defaultValue:"You used @this ebooks out of you quota of @that ebooks",control:{type:"text"}},patronPagePhoneInputMessageText:{name:"Phone input validation message",defaultValue:"The phone number must be 6 to 15 characters in length and should be comprised solely of numbers or begin with a +",control:{type:"text"}},patronPageHandleResponseInformationText:{defaultValue:"Your changes are saved.",control:{type:"text"}},patronPageLoadingText:{name:"Loading",defaultValue:"Loading..",control:{type:"text"}}}},PatronPage_dev_PatronPageEntry=(props=>react.createElement(PatronPage_entry,props)).bind({});PatronPage_dev_PatronPageEntry.args={}},"./src/apps/patron-page/sections/PincodeSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/input/TextInput.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const PincodeSection=({changePincode,required,isFlex=!1,setIsPinValid})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),config=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_2__.UK)(),pincodeLengthMin=parseInt(config("pincodeLengthMinConfig"),10),pincodeLengthMax=parseInt(config("pincodeLengthMaxConfig"),10),[pincodeValidation,setPincodeValidation]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),[pincode,setPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(""),[confirmPincode,setConfirmPincode]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("");return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(changePincode(null),setPincodeValidation(""),pincode&&confirmPincode){if(pincode.length>pincodeLengthMax||pincode.lengthsetPincode(newPin),value:pincode,label:t("patronPagePincodeLabelText"),validation:pincodeValidation,description:t("pincodeSectionDescriptionText")}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_input_TextInput__WEBPACK_IMPORTED_MODULE_1__.A,{className:"patron__input patron__input--desktop",id:"pincode-confirm-input",pattern:"[0-9]*",required,inputmode:"numeric",type:"password",onChange:newPin=>setConfirmPincode(newPin),value:confirmPincode,label:t("patronPageConfirmPincodeLabelText"),description:t("pincodeSectionDescriptionText")})))},__WEBPACK_DEFAULT_EXPORT__=PincodeSection;try{PincodeSection.displayName="PincodeSection",PincodeSection.__docgenInfo={description:"",displayName:"PincodeSection",props:{changePincode:{defaultValue:null,description:"",name:"changePincode",required:!0,type:{name:"(newPin: string | null) => void"}},required:{defaultValue:null,description:"",name:"required",required:!0,type:{name:"boolean"}},isFlex:{defaultValue:{value:"false"},description:"",name:"isFlex",required:!1,type:{name:"boolean | undefined"}},setIsPinValid:{defaultValue:null,description:"",name:"setIsPinValid",required:!0,type:{name:"Dispatch>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"]={docgenInfo:PincodeSection.__docgenInfo,name:"PincodeSection",path:"src/apps/patron-page/sections/PincodeSection.tsx#PincodeSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/patron-page/util/BranchesDropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1__),clsx__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/branches.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx");const BranchesDropdown=({selected,onChange,classNames,required=!1,footnote})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),branches=(0,_core_utils_branches__WEBPACK_IMPORTED_MODULE_2__.ov)("blacklistedPickupBranchesConfig");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:"branches-dropdown",className:"text-body-medium-medium mt-32 mb-8"},`${t("pickupBranchesDropdownLabelText")}${required?"*":null}`),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_4__.A)(`dropdown mt-8 ${classNames||""}`,[{"mb-32":!footnote},{"mb-8":footnote}])},branches&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("select",{required:!0,id:"branches-dropdown",onChange:({target})=>onChange(target.value),className:"dropdown__select"},""===selected&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:"",className:"dropdown__option",selected:""===selected,disabled:!0},t("pickupBranchesDropdownNothingSelectedText")),branches.map((({branchId,title})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("option",{value:branchId,selected:selected===branchId,className:"dropdown__option"},title)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dropdown__arrows"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"dropdown__arrow",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})))),footnote&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"dropdown__footnote"},footnote))},__WEBPACK_DEFAULT_EXPORT__=BranchesDropdown;try{BranchesDropdown.displayName="BranchesDropdown",BranchesDropdown.__docgenInfo={description:"",displayName:"BranchesDropdown",props:{selected:{defaultValue:null,description:"",name:"selected",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},required:{defaultValue:{value:"false"},description:"",name:"required",required:!1,type:{name:"boolean | undefined"}},footnote:{defaultValue:null,description:"",name:"footnote",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"]={docgenInfo:BranchesDropdown.__docgenInfo,name:"BranchesDropdown",path:"src/apps/patron-page/util/BranchesDropdown.tsx#BranchesDropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommendation/recommendation.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{App:()=>App,Skeleton:()=>Skeleton,default:()=>recommendation_dev});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),recommendedMaterialDisplayTypeData=__webpack_require__("./src/apps/recommended-material/recommendedMaterialDisplayTypeData.ts"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),RecommendedMaterialSkeleton=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx");const RecommendationSkeleton=({positionImageRight})=>react.createElement("div",{className:(0,clsx.A)("recommendation",positionImageRight&&"recommendation--reversed")},react.createElement(RecommendedMaterialSkeleton.A,null),react.createElement("div",{className:"recommendation__texts ssc-text-wrapper"},react.createElement("div",{className:"recommendation__title ssc-text-wrapper"},react.createElement("div",{className:"ssc-line ssc-header"}),react.createElement("div",{className:"ssc-line ssc-header"})),react.createElement("div",{className:"recommendation__description"},react.createElement("div",{className:"ssc-line"}),react.createElement("div",{className:"ssc-line"}),react.createElement("div",{className:"ssc-line"}),react.createElement("div",{className:"ssc-line"})))),recommendation_RecommendationSkeleton=RecommendationSkeleton;try{RecommendationSkeleton.displayName="RecommendationSkeleton",RecommendationSkeleton.__docgenInfo={description:"",displayName:"RecommendationSkeleton",props:{positionImageRight:{defaultValue:null,description:"",name:"positionImageRight",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommendation/RecommendationSkeleton.tsx#RecommendationSkeleton"]={docgenInfo:RecommendationSkeleton.__docgenInfo,name:"RecommendationSkeleton",path:"src/apps/recommendation/RecommendationSkeleton.tsx#RecommendationSkeleton"})}catch(__react_docgen_typescript_loader_error){}var guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),RecommendedMaterial=__webpack_require__("./src/apps/recommended-material/RecommendedMaterial.tsx");const recommendation_recommendation=({wid,materialType,positionImageRight})=>{const materialUrl=(0,url.Ik)()("materialUrl"),{data,isLoading}=(0,graphql.RR)({wid});if(isLoading||null==data||!data.work)return react.createElement(recommendation_RecommendationSkeleton,null);const{work:{titles:{full:materialFullTitle},abstract}}=data,materialFullUrl=(0,helpers_url.Qj)(materialUrl,wid,materialType),materialDescription=null==abstract?void 0:abstract[0];return react.createElement("div",{className:(0,clsx.A)("recommendation",positionImageRight&&"recommendation--reversed"),"data-cy":"recommendation"},react.createElement(RecommendedMaterial.A,{wid,materialType}),react.createElement(Link.A,{href:materialFullUrl,className:"recommendation__texts arrow__hover--right-small"},react.createElement("h3",{className:"recommendation__title","data-cy":"recommendation-title"},materialFullTitle),react.createElement("p",{className:"recommendation__description","data-cy":"recommendation-description"},materialDescription),react.createElement(arrow.A,null)))};try{recommendation.displayName="recommendation",recommendation.__docgenInfo={description:"",displayName:"recommendation",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},positionImageRight:{defaultValue:null,description:"",name:"positionImageRight",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommendation/recommendation.tsx#recommendation"]={docgenInfo:recommendation.__docgenInfo,name:"recommendation",path:"src/apps/recommendation/recommendation.tsx#recommendation"})}catch(__react_docgen_typescript_loader_error){}const recommendation_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({wid,materialType,positionImageRight})=>react.createElement(guarded_app.A,{app:"recommendation"},react.createElement(recommendation_recommendation,{wid,materialType,positionImageRight}))))));try{recommendationentry.displayName="recommendationentry",recommendationentry.__docgenInfo={description:"",displayName:"recommendationentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},positionImageRight:{defaultValue:null,description:"",name:"positionImageRight",required:!1,type:{name:"boolean | undefined"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommendation/recommendation.entry.tsx#recommendationentry"]={docgenInfo:recommendationentry.__docgenInfo,name:"recommendationentry",path:"src/apps/recommendation/recommendation.entry.tsx#recommendationentry"})}catch(__react_docgen_typescript_loader_error){}const recommendation_dev={title:"Apps / Recommendation",component:recommendation_entry,argTypes:{wid:{defaultValue:"work-of:870970-basis:22383590",control:{type:"text"}},materialType:{defaultValue:"bog",control:{type:"select",options:recommendedMaterialDisplayTypeData.A}},positionImageRight:{defaultValue:!1,control:{type:"boolean"}},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A}},App=args=>react.createElement(recommendation_entry,args),Skeleton=(args=>react.createElement(recommendation_RecommendationSkeleton,args)).bind({});Skeleton.argTypes={positionImageRight:{defaultValue:!1,control:{type:"boolean"}}}},"./src/apps/recommended-material/RecommendedMaterial.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Skeleton:()=>Skeleton,default:()=>RecommendedMaterial_dev,materialWithoutType:()=>materialWithoutType});var react=__webpack_require__("./node_modules/react/index.js"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),RecommendedMaterial=__webpack_require__("./src/apps/recommended-material/RecommendedMaterial.tsx");const RecommendedMaterial_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({wid,materialType})=>react.createElement(guarded_app.A,{app:"recommended-material"},react.createElement(RecommendedMaterial.A,{wid,materialType}))))));try{RecommendedMaterialentry.displayName="RecommendedMaterialentry",RecommendedMaterialentry.__docgenInfo={description:"",displayName:"RecommendedMaterialentry",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommended-material/RecommendedMaterial.entry.tsx#RecommendedMaterialentry"]={docgenInfo:RecommendedMaterialentry.__docgenInfo,name:"RecommendedMaterialentry",path:"src/apps/recommended-material/RecommendedMaterial.entry.tsx#RecommendedMaterialentry"})}catch(__react_docgen_typescript_loader_error){}var RecommendedMaterialSkeleton=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx"),recommendedMaterialDisplayTypeData=__webpack_require__("./src/apps/recommended-material/recommendedMaterialDisplayTypeData.ts");const RecommendedMaterial_dev={title:"Apps / Recommended Material",component:RecommendedMaterial_entry,argTypes:{wid:{defaultValue:"work-of:870970-basis:22383590",control:{type:"text"}},materialType:{defaultValue:"bog",control:{type:"select",options:recommendedMaterialDisplayTypeData.A}},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},...globalTextArgs.A,...serviceUrlArgs.A}},Default=args=>react.createElement(RecommendedMaterial_entry,args),materialWithoutType=Default.bind({});materialWithoutType.args={materialType:void 0};const Skeleton=(()=>react.createElement(RecommendedMaterialSkeleton.A,null)).bind({})},"./src/apps/recommended-material/RecommendedMaterial.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_query__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-query/es/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-redux/es/index.js"),_components_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_components_cover_cover__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/cover/cover.tsx"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/text.tsx"),_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/core/utils/url.tsx"),_material_helper__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/apps/material/helper.ts"),_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx");const RecommendedMaterial=({wid,materialType,partOfGrid=!1})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_8__.F)(),materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_10__.Ik)()("materialUrl"),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_2__.wA)(),queryClient=(0,react_query__WEBPACK_IMPORTED_MODULE_1__.useQueryClient)(),{data,isLoading}=(0,_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_5__.RR)({wid});if(isLoading||null==data||!data.work)return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_RecommendedMaterialSkeleton__WEBPACK_IMPORTED_MODULE_12__.A,{partOfGrid});const{work:{titles:{full:fullTitle},manifestations:{bestRepresentation},creators}}=data,work=data.work,materialManifestationForDisplay=materialType?(0,_material_helper__WEBPACK_IMPORTED_MODULE_11__.xb)(work,materialType):bestRepresentation,{pid}=materialManifestationForDisplay,author=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_7__.sP)((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_7__.UV)(creators),t),materialFullUrl=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_13__.Qj)(materialUrl,wid,materialType);return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_14__.A)("recommended-material",partOfGrid&&"recommended-material--in-grid")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"recommended-material__icon"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__.A,{title:String(fullTitle),id:wid,addToListRequest:id=>{dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__.A5)({type:"addFavorite",args:{id,queryClient},app:"material"}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_cover_cover__WEBPACK_IMPORTED_MODULE_4__.Y,{ids:[pid],url:materialFullUrl,size:"large",animate:!0,alt:"",shadow:"medium"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"recommended-material__texts"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_9__.A,{href:materialFullUrl,className:"recommended-material__description",dataCy:"recommended-description"},fullTitle),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_atoms_links_Link__WEBPACK_IMPORTED_MODULE_9__.A,{href:materialFullUrl,className:"recommended-material__author",dataCy:"recommended-author"},author)))},__WEBPACK_DEFAULT_EXPORT__=RecommendedMaterial;try{RecommendedMaterial.displayName="RecommendedMaterial",RecommendedMaterial.__docgenInfo={description:"",displayName:"RecommendedMaterial",props:{wid:{defaultValue:null,description:"",name:"wid",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"bog"'},{value:'"e-bog"'},{value:'"film"'},{value:'"lydbog (online)"'},{value:'"lydbog"'},{value:'"node"'},{value:'"playstation 5"'},{value:'"tegneserie"'},{value:'"artikel"'},{value:'"avisartikel"'},{value:'"artikel (online)"'},{value:'"spil"'},{value:'"cd"'},{value:'"tidsskrift"'}]}},partOfGrid:{defaultValue:{value:"false"},description:"",name:"partOfGrid",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommended-material/RecommendedMaterial.tsx#RecommendedMaterial"]={docgenInfo:RecommendedMaterial.__docgenInfo,name:"RecommendedMaterial",path:"src/apps/recommended-material/RecommendedMaterial.tsx#RecommendedMaterial"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommended-material/RecommendedMaterialSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const RecommendedMaterialSkeleton=({partOfGrid})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.A)("recommended-material",{"recommended-material--in-grid":partOfGrid})},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square w-30 recommended-material__icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square image-square"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-text-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line"}))),__WEBPACK_DEFAULT_EXPORT__=RecommendedMaterialSkeleton;try{RecommendedMaterialSkeleton.displayName="RecommendedMaterialSkeleton",RecommendedMaterialSkeleton.__docgenInfo={description:"",displayName:"RecommendedMaterialSkeleton",props:{partOfGrid:{defaultValue:null,description:"",name:"partOfGrid",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommended-material/RecommendedMaterialSkeleton.tsx#RecommendedMaterialSkeleton"]={docgenInfo:RecommendedMaterialSkeleton.__docgenInfo,name:"RecommendedMaterialSkeleton",path:"src/apps/recommended-material/RecommendedMaterialSkeleton.tsx#RecommendedMaterialSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/recommended-material/recommendedMaterialDisplayTypeData.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={None:"",Bog:"bog",Billedbog:"billedbog","Billedbog (Online)":"billedbog (online)","E-bog":"e-bog",CD:"cd",Podcast:"podcast","Musik (Online)":"musik (online)",Film:"film","Film (Online)":"film (online)",Lydbog:"lydbog","Lydbog (Online)":"lydbog (online)","Lydbog (CD-MP3)":"lydbog (cd-mp3)",Artikel:"artikel","Artikel (Online)":"artikel (online)",Tegneserie:"tegneserie","Tegneserie (Online)":"tegneserie (online)",Tidsskrift:"tidsskrift","Tidsskrift (Online)":"tidsskrift (online)"}},"./src/apps/recommender/Recommender.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{RecommenderEntry:()=>Recommender_dev_RecommenderEntry,default:()=>Recommender_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx");const InspirationRecommender=()=>{const t=(0,utils_text.F)(),defaultSearchFromConfig=(0,utils_config.UK)()("emptyRecommenderSearchConfig"),{inspiration:inspirationLimit}=(0,general.fL)(),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null),{data}=(0,graphql.KG)({limit:inspirationLimit,q:{all:defaultSearchFromConfig},offset:0});return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),null===recommendedMaterials?null:react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__title text-header-h1"},t("recommenderTitleInspirationText")),react.createElement("ul",{className:"recommender__grid"},recommendedMaterials&&recommendedMaterials.search.works.map((work=>react.createElement(SimpleMaterial.A,{app:"inspiration-recommender",work})))))},recommender_InspirationRecommender=InspirationRecommender;try{InspirationRecommender.displayName="InspirationRecommender",InspirationRecommender.__docgenInfo={description:"",displayName:"InspirationRecommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"]={docgenInfo:InspirationRecommender.__docgenInfo,name:"InspirationRecommender",path:"src/apps/recommender/InspirationRecommender.tsx#InspirationRecommender"})}catch(__react_docgen_typescript_loader_error){}var material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx");const RecommendList=({material,loanOrReservationFaust,titleKey})=>{const t=(0,utils_text.F)(),{recommender:recommenderLimit}=(0,general.fL)(),{data}=(0,graphql.Nr)({faust:loanOrReservationFaust,limit:recommenderLimit}),[recommendedMaterials,setRecommendedMaterials]=(0,react.useState)(null);return(0,react.useEffect)((()=>{data&&setRecommendedMaterials(data)}),[data]),react.createElement(react.Fragment,null,material&&material.title&&react.createElement("h2",{className:"recommender__title text-header-h1"},t(titleKey,{placeholders:{"@title":material.title}})),react.createElement("ul",{className:"recommender__triple-grid"},recommendedMaterials&&recommendedMaterials.recommend.result.map((({work})=>react.createElement(SimpleMaterial.A,{work,app:"recommender"})))))},recommender_RecommendList=(0,__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx").A)((0,material_fetch_hoc.A)(RecommendList));try{RecommendList.displayName="RecommendList",RecommendList.__docgenInfo={description:"",displayName:"RecommendList",props:{loanOrReservationFaust:{defaultValue:null,description:"",name:"loanOrReservationFaust",required:!0,type:{name:"string"}},titleKey:{defaultValue:null,description:"",name:"titleKey",required:!0,type:{name:"enum",value:[{value:'"recommenderTitleLoansText"'},{value:'"recommenderTitleReservationsText"'}]}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/RecommendList.tsx#RecommendList"]={docgenInfo:RecommendList.__docgenInfo,name:"RecommendList",path:"src/apps/recommender/RecommendList.tsx#RecommendList"})}catch(__react_docgen_typescript_loader_error){}var useReservations=__webpack_require__("./src/core/utils/useReservations.tsx"),useLoans=__webpack_require__("./src/core/utils/useLoans.tsx");const Recommender=()=>{const[loanForRecommender,setLoanForRecommender]=(0,react.useState)(null),[reservationForRecommender,setReservationForRecommender]=(0,react.useState)(null),{fbs:{loans:physicalLoans,isLoading:fbsLoansLoading}}=(0,useLoans.A)(),{fbs:{reservations:physicalReservations,isLoading:fbsReservationsLoading}}=(0,useReservations.A)();(0,react.useEffect)((()=>{if(null!==physicalLoans){const newestLoan=(0,general.EA)(physicalLoans).reverse();newestLoan.length>0&&setLoanForRecommender(newestLoan[0])}if(null!==physicalReservations){const newestReservation=(0,general.Y2)(physicalReservations).reverse();newestReservation.length>0&&setReservationForRecommender(newestReservation[0])}}),[physicalLoans,physicalReservations,setLoanForRecommender]);const stillLoading=fbsReservationsLoading||fbsLoansLoading;return react.createElement("div",{className:"recommender recommender--padding-desktop recommender--triple-desktop"},loanForRecommender&&loanForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleLoansText",item:loanForRecommender,loanOrReservationFaust:loanForRecommender.faust}),!loanForRecommender&&reservationForRecommender&&reservationForRecommender.faust&&react.createElement(recommender_RecommendList,{titleKey:"recommenderTitleReservationsText",item:reservationForRecommender,loanOrReservationFaust:reservationForRecommender.faust}),!loanForRecommender&&!reservationForRecommender&&!stillLoading&&react.createElement(recommender_InspirationRecommender,null))},recommender_Recommender=Recommender;try{Recommender.displayName="Recommender",Recommender.__docgenInfo={description:"",displayName:"Recommender",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.tsx#Recommender"]={docgenInfo:Recommender.__docgenInfo,name:"Recommender",path:"src/apps/recommender/Recommender.tsx#Recommender"})}catch(__react_docgen_typescript_loader_error){}var url=__webpack_require__("./src/core/utils/url.tsx"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx");const Recommender_entry=(0,url.nU)((0,utils_config.NV)((0,utils_text.i)((()=>react.createElement(guarded_app.A,{app:"recommender"},react.createElement(recommender_Recommender,null))))));try{Recommenderentry.displayName="Recommenderentry",Recommenderentry.__docgenInfo={description:"",displayName:"Recommenderentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},emptyRecommenderSearchConfig:{defaultValue:null,description:"",name:"emptyRecommenderSearchConfig",required:!0,type:{name:"string"}},recommenderTitleLoansText:{defaultValue:null,description:"",name:"recommenderTitleLoansText",required:!0,type:{name:"string"}},recommenderTitleReservationsText:{defaultValue:null,description:"",name:"recommenderTitleReservationsText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},recommenderTitleInspirationText:{defaultValue:null,description:"",name:"recommenderTitleInspirationText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/recommender/Recommender.entry.tsx#Recommenderentry"]={docgenInfo:Recommenderentry.__docgenInfo,name:"Recommenderentry",path:"src/apps/recommender/Recommender.entry.tsx#Recommenderentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const Recommender_dev={title:"Apps / Recommender",component:Recommender_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,emptyRecommenderSearchConfig:{defaultValue:"Mimbo jimbo",control:{type:"text"}},recommenderTitleLoansText:{control:{type:"text"},defaultValue:"Because you have borrowed @title you may also like"},recommenderTitleReservationsText:{control:{type:"text"},defaultValue:"Because you have reserved @title you may also like"},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},recommenderTitleInspirationText:{control:{type:"text"},defaultValue:"For your inspiration"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}}}},Recommender_dev_RecommenderEntry=(props=>react.createElement(Recommender_entry,props)).bind({});Recommender_dev_RecommenderEntry.args={}},"./src/apps/reservation-list/list/reservation-list.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ReservationListDigitalDetailsModal:()=>ReservationListDigitalDetailsModal,ReservationListEntry:()=>reservation_list_dev_ReservationListEntry,ReservationListPauseModal:()=>ReservationListPauseModal,ReservationListPhysicalDetailsModal:()=>ReservationListPhysicalDetailsModal,default:()=>reservation_list_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),es=(__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),modal=__webpack_require__("./src/core/utils/modal.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const reservation_pause_toggler=({user})=>{const t=(0,utils_text.F)(),{open}=(0,modal.X)(),{pauseReservation}=(0,modal_helpers.c6)(),[onHoldDates,setOnHoldDates]=(0,react.useState)();return(0,react.useEffect)((()=>{user&&user.onHold&&user.onHold.from&&user.onHold.to?setOnHoldDates(`${(0,date.Yq)(user.onHold.from)} - ${(0,date.Yq)(user.onHold.to)}`):user&&null===user.onHold&&setOnHoldDates("")}),[user]),react.createElement("div",{className:"dpl-pause-reservation-component m-32"},react.createElement("div",{className:"dpl-pause-reservation-component__pagefold"}),react.createElement("div",{className:"dpl-pause-reservation-component__flex"},react.createElement("div",{className:"dpl-pause-reservation-component__flex__reservation-icon"},react.createElement("img",{src:Reservations_default(),alt:""})),react.createElement("div",{className:"dpl-pause-reservation-component__flex__text"},t(onHoldDates?"reservationListPauseReservationOnHoldText":"reservationListPauseReservationText")),onHoldDates&&react.createElement("span",{"aria-label":t("reservationListOnHoldAriaText"),className:"dpl-pause-reservation-component__flex__badge"},onHoldDates),react.createElement("div",{className:"dpl-pause-reservation-component__flex__button"},react.createElement("button",{"aria-label":t("reservationListPauseReservationAriaModalText"),type:"button",onClick:()=>{open(pauseReservation)},className:"btn-primary btn-filled btn-small"},t("reservationListPauseReservationButtonText")))))};try{reservationpausetoggler.displayName="reservationpausetoggler",reservationpausetoggler.__docgenInfo={description:"",displayName:"reservationpausetoggler",props:{user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"]={docgenInfo:reservationpausetoggler.__docgenInfo,name:"reservationpausetoggler",path:"src/apps/reservation-list/list/reservation-pause-toggler.tsx#reservationpausetoggler"})}catch(__react_docgen_typescript_loader_error){}var empty_list=__webpack_require__("./src/components/empty-list/empty-list.tsx");const EmptyReservations=()=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"list-reservation-container m-32"},react.createElement(empty_list.A,{classNames:"mt-24",emptyListText:t("reservationListAllEmptyText")}))},list_EmptyReservations=EmptyReservations;try{EmptyReservations.displayName="EmptyReservations",EmptyReservations.__docgenInfo={description:"",displayName:"EmptyReservations",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"]={docgenInfo:EmptyReservations.__docgenInfo,name:"EmptyReservations",path:"src/apps/reservation-list/list/EmptyReservations.tsx#EmptyReservations"})}catch(__react_docgen_typescript_loader_error){}var dayjs_min=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs_min_default=__webpack_require__.n(dayjs_min),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),build=__webpack_require__("./node_modules/react-flatpickr/build/index.js"),da=(__webpack_require__("./node_modules/flatpickr/dist/flatpickr.css"),__webpack_require__("./node_modules/flatpickr/dist/l10n/da.js"));const DateRangeInput=({setStartDate,setEndDate,startDate,endDate,label,placeholder,className="date-range",dataCy="date-range"})=>{const refLabel=react.useRef(null),value=startDate&&endDate?[dayjs_min_default()(startDate).toDate(),dayjs_min_default()(endDate).toDate()]:void 0;return react.createElement("div",{"data-cy":dataCy,className},react.createElement("div",{className:"date-range__input"},react.createElement("label",{ref:refLabel,htmlFor:"date-range",className:"text-body-medium-regular"},label),react.createElement(build.A,{id:"date-range",value,options:{altInput:!0,altFormat:"j. F Y",minDate:dayjs_min_default()().toDate(),locale:da.Danish,dateFormat:"d-m-Y",static:!0,mode:"range",onOpen:()=>{var _refLabel$current;null===(_refLabel$current=refLabel.current)||void 0===_refLabel$current||_refLabel$current.scrollIntoView()},onReady:(dates,currentDateStr,self)=>{var _self$altInput,_self$altInput2,_self$altInput2$getAt;null===(_self$altInput=self.altInput)||void 0===_self$altInput||_self$altInput.setAttribute("aria-label",label);const classes=(null===(_self$altInput2=self.altInput)||void 0===_self$altInput2||null===(_self$altInput2$getAt=_self$altInput2.getAttribute("class"))||void 0===_self$altInput2$getAt?void 0:_self$altInput2$getAt.split(" "))||[];var _self$altInput3,_self$altInput4;!dates.length&&placeholder&&(null===(_self$altInput3=self.altInput)||void 0===_self$altInput3||_self$altInput3.setAttribute("placeholder",placeholder));dates.length||classes.includes("empty-date-range")||(classes.push("empty-date-range"),null===(_self$altInput4=self.altInput)||void 0===_self$altInput4||_self$altInput4.setAttribute("class",classes.join(" ")))},onValueUpdate:(dates,currentDateStr,self)=>{var _self$altInput5,_self$altInput5$getAt;const classes=(null===(_self$altInput5=self.altInput)||void 0===_self$altInput5||null===(_self$altInput5$getAt=_self$altInput5.getAttribute("class"))||void 0===_self$altInput5$getAt?void 0:_self$altInput5$getAt.split(" "))||[];var _self$altInput6;dates.length&&classes.includes("empty-date-range")&&(classes.splice(classes.indexOf("empty-date-range"),1),null===(_self$altInput6=self.altInput)||void 0===_self$altInput6||_self$altInput6.setAttribute("class",classes.join(" ")))}},onChange:([start,end])=>{start&&end&&(setStartDate(dayjs_min_default()(start).format("YYYY-MM-DD")),setEndDate(dayjs_min_default()(end).format("YYYY-MM-DD")))}})))},date_inputs_DateRangeInput=DateRangeInput;try{DateRangeInput.displayName="DateRangeInput",DateRangeInput.__docgenInfo={description:"",displayName:"DateRangeInput",props:{setStartDate:{defaultValue:null,description:"",name:"setStartDate",required:!0,type:{name:"(date: string) => void"}},setEndDate:{defaultValue:null,description:"",name:"setEndDate",required:!0,type:{name:"(date: string) => void"}},startDate:{defaultValue:null,description:"",name:"startDate",required:!0,type:{name:"string"}},endDate:{defaultValue:null,description:"",name:"endDate",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | undefined"}},className:{defaultValue:{value:"date-range"},description:"",name:"className",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"date-range"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/date-inputs/DateRangeInput.tsx#DateRangeInput"]={docgenInfo:DateRangeInput.__docgenInfo,name:"DateRangeInput",path:"src/components/date-inputs/DateRangeInput.tsx#DateRangeInput"})}catch(__react_docgen_typescript_loader_error){}var useSavePatron=__webpack_require__("./src/core/utils/useSavePatron.tsx");const pause_reservation=({id,user})=>{var _user$onHold,_user$onHold2,_user$onHold5,_user$onHold6;const t=(0,utils_text.F)(),pauseReservationInfoUrl=(0,url.Ik)()("pauseReservationInfoUrl"),{close}=(0,modal.X)(),{pauseReservation}=(0,modal_helpers.c6)(),[isLoading,setIsLoading]=(0,react.useState)(!1),{savePatron}=(0,useSavePatron.A)({patron:user,fetchHandlers:{savePatron:{onSuccess:()=>{setIsLoading(!1),close(pauseReservation)},onError:()=>{setIsLoading(!1)}}}}),saveFormId=(0,react.useId)(),currentDate=dayjs_min_default()().format("YYYY-MM-DD"),[startDate,setStartDate]=(0,react.useState)(currentDate),[endDate,setEndDate]=(0,react.useState)(""),pauseActive=(null==user||null===(_user$onHold=user.onHold)||void 0===_user$onHold?void 0:_user$onHold.from)&&(null==user||null===(_user$onHold2=user.onHold)||void 0===_user$onHold2?void 0:_user$onHold2.to),saveDates=(0,react.useCallback)(((start,end)=>{user&&(setIsLoading(!0),savePatron({onHold:{from:""===start?void 0:start,to:""===end?void 0:end}}))}),[savePatron,user]),resetPauseDates=(0,react.useCallback)((()=>{setStartDate(currentDate),setEndDate(""),saveDates()}),[currentDate,saveDates]);return(0,react.useEffect)((()=>{var _user$onHold3,_user$onHold4;null!=user&&null!==(_user$onHold3=user.onHold)&&void 0!==_user$onHold3&&_user$onHold3.from&&setStartDate(user.onHold.from),null!=user&&null!==(_user$onHold4=user.onHold)&&void 0!==_user$onHold4&&_user$onHold4.to&&setEndDate(user.onHold.to)}),[null==user||null===(_user$onHold5=user.onHold)||void 0===_user$onHold5?void 0:_user$onHold5.from,null==user||null===(_user$onHold6=user.onHold)||void 0===_user$onHold6?void 0:_user$onHold6.to]),react.createElement(modal.A,{modalId:id,classNames:"modal-cta",closeModalAriaLabelText:t("pauseReservationModalCloseModalText"),screenReaderModalDescriptionText:t("pauseReservationModalAriaDescriptionText")},react.createElement("div",{className:"modal-pause__container"},react.createElement("h2",{className:"text-header-h3"},t("pauseReservationModalHeaderText")),react.createElement("div",{className:"modal-pause__subtitle"},react.createElement("p",{className:"text-body-medium-regular"},t("pauseReservationModalBodyText"))),react.createElement("form",{id:saveFormId,onSubmit:e=>{e.preventDefault(),startDate&&endDate&&saveDates(startDate,endDate)}},react.createElement("div",{className:"modal-pause__date-range"},react.createElement(date_inputs_DateRangeInput,{setStartDate,setEndDate,startDate,endDate,label:t("pauseReservationModalDateRangeLabelText"),placeholder:t("pauseReservationModalDateRangePlaceholderText")}))),react.createElement("div",{className:"modal-pause__text-link"},react.createElement("p",{className:"text-body-small-regular"},t("pauseReservationModalBelowInputsText"))),react.createElement("p",{className:"text-body-small-regular"},react.createElement(Link.A,{id:"pause-reservation-info-link",href:pauseReservationInfoUrl,className:"link-tag"},t("pauseReservationModalLinkText"))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement("button",{type:"submit",form:saveFormId,className:"btn-primary btn-filled btn-small",disabled:isLoading},t("pauseReservationModalSaveButtonLabelText")),pauseActive&&react.createElement("button",{type:"button",onClick:resetPauseDates,className:"btn-primary btn-small mt-16"},t("pauseReservationModalCancelButtonLabelText")))))};try{pausereservation.displayName="pausereservation",pausereservation.__docgenInfo={description:"",displayName:"pausereservation",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"PatronV5"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"]={docgenInfo:pausereservation.__docgenInfo,name:"pausereservation",path:"src/apps/reservation-list/modal/pause-reservation/pause-reservation.tsx#pausereservation"})}catch(__react_docgen_typescript_loader_error){}var delete_reservation_modal=__webpack_require__("./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),material_info=__webpack_require__("./src/apps/loan-list/materials/stackable-material/material-info.tsx"),reservation_info=__webpack_require__("./src/apps/reservation-list/reservation-material/reservation-info.tsx"),list_material_skeleton=__webpack_require__("./src/apps/reservation-list/reservation-material/list-material-skeleton.tsx");const reservation_material=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({material,reservation,focused,openReservationDetailsModal,identifier,dataCy="reservation-material"})=>{const openDetailsModal=()=>{openReservationDetailsModal(reservation)},isDigital=!!identifier;return react.createElement("li",null,react.createElement("div",{"data-cy":dataCy,className:"list-reservation my-32 cursor-pointer arrow__hover--right-small",role:"button",onClick:()=>openDetailsModal(),onKeyUp:e=>{"Enter"!==e.key&&"Space"!==e.key||openDetailsModal()},tabIndex:0},material&&react.createElement(material_info.A,{arrowLabelledBy:`${reservation.identifier||reservation.faust}-title`,focused,openDetailsModal,periodical:reservation.periodical,material,isbnForCover:reservation.identifier||""}),react.createElement(reservation_info.A,{reservationInfo:reservation,openReservationDetailsModal,isDigital})))}),list_material_skeleton.A),list_material_skeleton.A);try{reservationmaterial.displayName="reservationmaterial",reservationmaterial.__docgenInfo={description:"",displayName:"reservationmaterial",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},focused:{defaultValue:null,description:"",name:"focused",required:!0,type:{name:"boolean"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},dataCy:{defaultValue:{value:"reservation-material"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"]={docgenInfo:reservationmaterial.__docgenInfo,name:"reservationmaterial",path:"src/apps/reservation-list/reservation-material/reservation-material.tsx#reservationmaterial"})}catch(__react_docgen_typescript_loader_error){}const list_list=({reservations,header,pageSize,emptyListDataCy,emptyListLabel,openReservationDetailsModal})=>{const[dataReady,setDataReady]=(0,react.useState)(!1),[displayedReservations,setDisplayedReservations]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:reservations.length,pageSize});return(0,useDeepCompareEffect.A)((()=>{reservations&&(setDisplayedReservations((0,general.L1)(reservations,itemsShown)),setDataReady(!0))}),[itemsShown,reservations]),dataReady?react.createElement("div",null,react.createElement("div",{className:"dpl-list-buttons m-32"},react.createElement("h2",{"data-cy":"reservation-list-header",className:"dpl-list-buttons__header"},react.createElement(react.Fragment,null,header,react.createElement("div",{className:"dpl-list-buttons__power"},reservations.length)))),react.createElement("div",{"data-cy":"list-reservation-container"},dataReady&&react.createElement(react.Fragment,null,react.createElement("ul",{className:"list-reservation-container"},displayedReservations.map(((reservation,i)=>react.createElement(reservation_material,{focused:firstInNewPage===i,openReservationDetailsModal,key:(0,reservation_type.OQ)(reservation),item:reservation,reservation})))),react.createElement(PagerComponent,null)),!displayedReservations.length&&react.createElement(empty_list.A,{classNames:"mt-24",dataCy:emptyListDataCy,emptyListText:emptyListLabel}))):react.createElement("div",null)};try{list.displayName="list",list.__docgenInfo={description:"",displayName:"list",props:{reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},emptyListDataCy:{defaultValue:null,description:"",name:"emptyListDataCy",required:!0,type:{name:"string"}},emptyListLabel:{defaultValue:null,description:"",name:"emptyListLabel",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/list.tsx#list"]={docgenInfo:list.__docgenInfo,name:"list",path:"src/apps/reservation-list/list/list.tsx#list"})}catch(__react_docgen_typescript_loader_error){}var helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts"),useReservations=__webpack_require__("./src/core/utils/useReservations.tsx");const DisplayedReservations=({pageSize,openReservationDetailsModal})=>{const t=(0,utils_text.F)(),{all:{readyToLoan:readyToLoanReservations},fbs:{queued:reservedReservationsFBS},publizon:{queued:reservedReservationsPublizon}}=(0,useReservations.A)();return react.createElement(react.Fragment,null,react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListReadyForPickupTitleText"),reservations:(0,helpers.LQ)(readyToLoanReservations),emptyListDataCy:"reservation-list-ready-for-pickup-empty-list",emptyListLabel:t("reservationListReadyForPickupEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListPhysicalReservationsHeaderText"),reservations:(0,helpers.hm)(reservedReservationsFBS),emptyListDataCy:"reservation-list-physical-reservations-empty-list",emptyListLabel:t("reservationListPhysicalReservationsEmptyText")}),react.createElement(list_list,{openReservationDetailsModal,pageSize,header:t("reservationListDigitalReservationsHeaderText"),emptyListDataCy:"reservation-list-digital-reservations-empty-list",reservations:(0,helpers.LQ)(reservedReservationsPublizon),emptyListLabel:t("reservationListDigitalReservationsEmptyText")}))},list_DisplayedReservations=DisplayedReservations;try{DisplayedReservations.displayName="DisplayedReservations",DisplayedReservations.__docgenInfo={description:"",displayName:"DisplayedReservations",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!0,type:{name:"(reservation: Nullable>) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"]={docgenInfo:DisplayedReservations.__docgenInfo,name:"DisplayedReservations",path:"src/apps/reservation-list/list/DisplayedReservations.tsx#DisplayedReservations"})}catch(__react_docgen_typescript_loader_error){}var material_details_modal=__webpack_require__("./src/apps/loan-list/modal/material-details-modal.tsx"),reservation_details=__webpack_require__("./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const reservation_list_skeleton=()=>react.createElement(react.Fragment,null,react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-48"}),react.createElement(list_material_skeleton.A,null)),react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-80"}),react.createElement(list_material_skeleton.A,null)),react.createElement("ul",{className:"ssc"},react.createElement("div",{className:"ssc-head-line w-10 mx-32 mt-80"}),react.createElement(list_material_skeleton.A,null)));try{reservationlistskeleton.displayName="reservationlistskeleton",reservationlistskeleton.__docgenInfo={description:"",displayName:"reservationlistskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list-skeleton.tsx#reservationlistskeleton"]={docgenInfo:reservationlistskeleton.__docgenInfo,name:"reservationlistskeleton",path:"src/apps/reservation-list/list/reservation-list-skeleton.tsx#reservationlistskeleton"})}catch(__react_docgen_typescript_loader_error){}var usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const reservation_list=({pageSize})=>{const t=(0,utils_text.F)(),{modalIds}=(0,es.d4)((s=>s.modal)),{open}=(0,modal.X)(),{pauseReservation,deleteReservation,reservationDetails}=(0,modal_helpers.c6)(),[reservationWithDetails,setReservationWithDetails]=(0,react.useState)(null),[reservationToDelete,setReservationToDelete]=(0,react.useState)(null),{data:userData,isLoading:isLoadingUserData}=(0,usePatronData.I)(),{all:{reservations:allReservations,isLoading}}=(0,useReservations.A)(),allListsEmpty=0===allReservations.length&&!isLoading;return(0,useDeepCompareEffect.A)((()=>{const modalUrlParam=(0,helpers_url.d6)("modal"),resDetails=reservationDetails;if(modalUrlParam&&modalUrlParam.includes(resDetails)){const queryReservationId=(0,modal_helpers.dI)(modalUrlParam,resDetails);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type.OQ)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}const deleteRes=deleteReservation;if(modalUrlParam&&modalUrlParam.includes(deleteRes)){const queryReservationId=(0,modal_helpers.dI)(modalUrlParam,deleteRes);if(queryReservationId&&allReservations){const reservationFromQuery=allReservations.filter((reservation=>(0,reservation_type.OQ)(reservation)===queryReservationId)).at(0);reservationFromQuery&&setReservationWithDetails(reservationFromQuery)}}}),[allReservations,reservationDetails,deleteReservation]),react.createElement(react.Fragment,null,react.createElement("div",{className:`reservation-list-page ${(0,general.eD)(modalIds)}`},react.createElement("h1",{className:"text-header-h1 m-32"},t("reservationListHeaderText")),isLoadingUserData&&react.createElement("div",{className:"ssc"},react.createElement("div",{className:"ssc-square w-90 ml-32 my-32"})),(null==userData?void 0:userData.patron)&&react.createElement(reservation_pause_toggler,{user:userData.patron}),isLoading&&0===allReservations.length&&react.createElement(reservation_list_skeleton,null),allListsEmpty&&react.createElement(list_EmptyReservations,null),!allListsEmpty&&react.createElement(list_DisplayedReservations,{openReservationDetailsModal:reservationForModal=>{setReservationWithDetails(reservationForModal),open((0,material_details_modal.bk)(reservationForModal))},pageSize})),(null==userData?void 0:userData.patron)&&react.createElement(pause_reservation,{user:null==userData?void 0:userData.patron,id:pauseReservation}),reservationToDelete&&react.createElement(delete_reservation_modal.A,{modalId:(0,delete_reservation_modal.g)(reservationToDelete),reservations:[reservationToDelete]}),reservationWithDetails&&react.createElement(material_details_modal.Ay,{modalId:(0,material_details_modal.bk)(reservationWithDetails)},react.createElement(reservation_details.A,{openReservationDeleteModal:reservationForModal=>{setReservationToDelete(reservationForModal),open((0,delete_reservation_modal.g)(reservationForModal))},item:reservationWithDetails,reservation:reservationWithDetails})))};try{reservationlist.displayName="reservationlist",reservationlist.__docgenInfo={description:"",displayName:"reservationlist",props:{pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.tsx#reservationlist"]={docgenInfo:reservationlist.__docgenInfo,name:"reservationlist",path:"src/apps/reservation-list/list/reservation-list.tsx#reservationlist"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx"),withIsPatronBlockedHoc=__webpack_require__("./src/core/utils/withIsPatronBlockedHoc.tsx");const reservation_list_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((0,withIsPatronBlockedHoc.A)((({pageSizeDesktop,pageSizeMobile})=>{const pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile},"pageSizeReservationList");return react.createElement(reservation_list,{pageSize})})))));try{reservationlistentry.displayName="reservationlistentry",reservationlistentry.__docgenInfo={description:"",displayName:"reservationlistentry",props:{pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},expiresSoonText:{defaultValue:null,description:"",name:"expiresSoonText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},pauseReservationModalBodyText:{defaultValue:null,description:"",name:"pauseReservationModalBodyText",required:!0,type:{name:"string"}},pauseReservationModalCancelButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalCancelButtonLabelText",required:!0,type:{name:"string"}},pauseReservationModalCloseModalText:{defaultValue:null,description:"",name:"pauseReservationModalCloseModalText",required:!0,type:{name:"string"}},pauseReservationModalDateRangeLabelText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangeLabelText",required:!0,type:{name:"string"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:null,description:"",name:"pauseReservationModalDateRangePlaceholderText",required:!0,type:{name:"string"}},pauseReservationModalHeaderText:{defaultValue:null,description:"",name:"pauseReservationModalHeaderText",required:!0,type:{name:"string"}},pauseReservationModalLinkText:{defaultValue:null,description:"",name:"pauseReservationModalLinkText",required:!0,type:{name:"string"}},pauseReservationModalSaveButtonLabelText:{defaultValue:null,description:"",name:"pauseReservationModalSaveButtonLabelText",required:!0,type:{name:"string"}},physicalLoansTitleText:{defaultValue:null,description:"",name:"physicalLoansTitleText",required:!0,type:{name:"string"}},publizonAudioBookText:{defaultValue:null,description:"",name:"publizonAudioBookText",required:!0,type:{name:"string"}},publizonEbookText:{defaultValue:null,description:"",name:"publizonEbookText",required:!0,type:{name:"string"}},publizonPodcastText:{defaultValue:null,description:"",name:"publizonPodcastText",required:!0,type:{name:"string"}},reservationDetailsExpiresText:{defaultValue:null,description:"",name:"reservationDetailsExpiresText",required:!0,type:{name:"string"}},reservationDetailsExpiresTitleText:{defaultValue:null,description:"",name:"reservationDetailsExpiresTitleText",required:!0,type:{name:"string"}},reservationListAllEmptyText:{defaultValue:null,description:"",name:"reservationListAllEmptyText",required:!0,type:{name:"string"}},reservationListYouAreInQueueText:{defaultValue:null,description:"",name:"reservationListYouAreInQueueText",required:!0,type:{name:"string"}},reservationListAvailableInText:{defaultValue:null,description:"",name:"reservationListAvailableInText",required:!0,type:{name:"string"}},reservationListDaysText:{defaultValue:null,description:"",name:"reservationListDaysText",required:!0,type:{name:"string"}},reservationListDayText:{defaultValue:null,description:"",name:"reservationListDayText",required:!0,type:{name:"string"}},reservationListDigitalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListDigitalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListDigitalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListFirstInQueueText:{defaultValue:null,description:"",name:"reservationListFirstInQueueText",required:!0,type:{name:"string"}},reservationListHeaderText:{defaultValue:null,description:"",name:"reservationListHeaderText",required:!0,type:{name:"string"}},reservationListInQueueText:{defaultValue:null,description:"",name:"reservationListInQueueText",required:!0,type:{name:"string"}},reservationListLoanBeforeText:{defaultValue:null,description:"",name:"reservationListLoanBeforeText",required:!0,type:{name:"string"}},reservationListNumberInQueueText:{defaultValue:null,description:"",name:"reservationListNumberInQueueText",required:!0,type:{name:"string"}},reservationListOnHoldAriaText:{defaultValue:null,description:"",name:"reservationListOnHoldAriaText",required:!0,type:{name:"string"}},reservationListPauseReservationAriaModalText:{defaultValue:null,description:"",name:"reservationListPauseReservationAriaModalText",required:!0,type:{name:"string"}},reservationListPauseReservationButtonText:{defaultValue:null,description:"",name:"reservationListPauseReservationButtonText",required:!0,type:{name:"string"}},reservationListPauseReservationOnHoldText:{defaultValue:null,description:"",name:"reservationListPauseReservationOnHoldText",required:!0,type:{name:"string"}},reservationListPauseReservationText:{defaultValue:null,description:"",name:"reservationListPauseReservationText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsEmptyText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsEmptyText",required:!0,type:{name:"string"}},reservationListPhysicalReservationsHeaderText:{defaultValue:null,description:"",name:"reservationListPhysicalReservationsHeaderText",required:!0,type:{name:"string"}},reservationListReadyForPickupEmptyText:{defaultValue:null,description:"",name:"reservationListReadyForPickupEmptyText",required:!0,type:{name:"string"}},reservationListReadyForPickupTitleText:{defaultValue:null,description:"",name:"reservationListReadyForPickupTitleText",required:!0,type:{name:"string"}},blockedPatronDTitleText:{defaultValue:null,description:"",name:"blockedPatronDTitleText",required:!0,type:{name:"string"}},blockedPatronDBodyText:{defaultValue:null,description:"",name:"blockedPatronDBodyText",required:!0,type:{name:"string"}},blockedPatronSTitleText:{defaultValue:null,description:"",name:"blockedPatronSTitleText",required:!0,type:{name:"string"}},blockedPatronSBodyText:{defaultValue:null,description:"",name:"blockedPatronSBodyText",required:!0,type:{name:"string"}},blockedPatronFTitleText:{defaultValue:null,description:"",name:"blockedPatronFTitleText",required:!0,type:{name:"string"}},blockedPatronFBodyText:{defaultValue:null,description:"",name:"blockedPatronFBodyText",required:!0,type:{name:"string"}},blockedPatronETitleText:{defaultValue:null,description:"",name:"blockedPatronETitleText",required:!0,type:{name:"string"}},blockedPatronEBodyText:{defaultValue:null,description:"",name:"blockedPatronEBodyText",required:!0,type:{name:"string"}},blockedPatronWTitleText:{defaultValue:null,description:"",name:"blockedPatronWTitleText",required:!0,type:{name:"string"}},blockedPatronWBodyText:{defaultValue:null,description:"",name:"blockedPatronWBodyText",required:!0,type:{name:"string"}},blockedPatronOTitleText:{defaultValue:null,description:"",name:"blockedPatronOTitleText",required:!0,type:{name:"string"}},blockedPatronOBodyText:{defaultValue:null,description:"",name:"blockedPatronOBodyText",required:!0,type:{name:"string"}},blockedPatronUTitleText:{defaultValue:null,description:"",name:"blockedPatronUTitleText",required:!0,type:{name:"string"}},blockedPatronUBodyText:{defaultValue:null,description:"",name:"blockedPatronUBodyText",required:!0,type:{name:"string"}},blockedPatronELinkText:{defaultValue:null,description:"",name:"blockedPatronELinkText",required:!0,type:{name:"string"}},blockedPatronELinkUrl:{defaultValue:null,description:"",name:"blockedPatronELinkUrl",required:!0,type:{name:"string"}},blockedPatronCloseModalAriaLabelText:{defaultValue:null,description:"",name:"blockedPatronCloseModalAriaLabelText",required:!0,type:{name:"string"}},blockedPatronModalAriaDescriptionText:{defaultValue:null,description:"",name:"blockedPatronModalAriaDescriptionText",required:!0,type:{name:"string"}},BlockedPatronEntryTextProps:{defaultValue:null,description:"",name:"BlockedPatronEntryTextProps",required:!0,type:{name:"string"}},redirectOnBlocked:{defaultValue:null,description:"",name:"redirectOnBlocked",required:!0,type:{name:"string"}},expirationWarningDaysBeforeConfig:{defaultValue:null,description:"",name:"expirationWarningDaysBeforeConfig",required:!0,type:{name:"string"}},pauseReservationStartDateConfig:{defaultValue:null,description:"",name:"pauseReservationStartDateConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!0,type:{name:"string"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},ereolenMyPageUrl:{defaultValue:null,description:"",name:"ereolenMyPageUrl",required:!0,type:{name:"string"}},pauseReservationInfoUrl:{defaultValue:null,description:"",name:"pauseReservationInfoUrl",required:!0,type:{name:"string"}},deleteReservationModalHeaderText:{defaultValue:null,description:"",name:"deleteReservationModalHeaderText",required:!0,type:{name:"string"}},deleteReservationModalDeleteQuestionText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteQuestionText",required:!0,type:{name:"string"}},deleteReservationModalNotRegrettableText:{defaultValue:null,description:"",name:"deleteReservationModalNotRegrettableText",required:!0,type:{name:"string"}},deleteReservationModalDeleteButtonText:{defaultValue:null,description:"",name:"deleteReservationModalDeleteButtonText",required:!0,type:{name:"string"}},deleteReservationModalCloseModalText:{defaultValue:null,description:"",name:"deleteReservationModalCloseModalText",required:!0,type:{name:"string"}},deleteReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"deleteReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:null,description:"",name:"reservationDetailsRemoveDigitalReservationText",required:!0,type:{name:"string"}},reservationDetailsDateOfReservationTitleText:{defaultValue:null,description:"",name:"reservationDetailsDateOfReservationTitleText",required:!0,type:{name:"string"}},reservationDetailsNumberInQueueLabelText:{defaultValue:null,description:"",name:"reservationDetailsNumberInQueueLabelText",required:!0,type:{name:"string"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:null,description:"",name:"reservationDetailsNoInterestAfterTitleText",required:!0,type:{name:"string"}},reservationDetailsChangeText:{defaultValue:null,description:"",name:"reservationDetailsChangeText",required:!0,type:{name:"string"}},reservationDetailsPickUpAtTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickUpAtTitleText",required:!0,type:{name:"string"}},reservationDetailsButtonRemoveText:{defaultValue:null,description:"",name:"reservationDetailsButtonRemoveText",required:!0,type:{name:"string"}},reservationDetailsStatusTitleText:{defaultValue:null,description:"",name:"reservationDetailsStatusTitleText",required:!0,type:{name:"string"}},reservationDetailsBorrowBeforeText:{defaultValue:null,description:"",name:"reservationDetailsBorrowBeforeText",required:!0,type:{name:"string"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:null,description:"",name:"reservationDetailsDigitalReservationGoToEreolenText",required:!0,type:{name:"string"}},reservationDetailsReadyForLoanText:{defaultValue:null,description:"",name:"reservationDetailsReadyForLoanText",required:!0,type:{name:"string"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:null,description:"",name:"reservationDetailsPickupDeadlineTitleText",required:!0,type:{name:"string"}},interestPeriodsConfig:{defaultValue:null,description:"",name:"interestPeriodsConfig",required:!0,type:{name:"string"}},reservationDetailsConfig:{defaultValue:null,description:"",name:"reservationDetailsConfig",required:!0,type:{name:"string"}},shiftText:{defaultValue:null,description:"",name:"shiftText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormPickupHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormPickupHeaderDescriptionText",required:!0,type:{name:"string"}},saveButtonText:{defaultValue:null,description:"",name:"saveButtonText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},chooseOneText:{defaultValue:null,description:"",name:"chooseOneText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},reservationSuccessTitleText:{defaultValue:null,description:"",name:"reservationSuccessTitleText",required:!0,type:{name:"string"}},reservationSuccessSubTitleText:{defaultValue:null,description:"",name:"reservationSuccessSubTitleText",required:!0,type:{name:"string"}},reservationerrorTitleText:{defaultValue:null,description:"",name:"reservationerrorTitleText",required:!0,type:{name:"string"}},reservationerrorSubTitleText:{defaultValue:null,description:"",name:"reservationerrorSubTitleText",required:!0,type:{name:"string"}},reservationStatusButtonText:{defaultValue:null,description:"",name:"reservationStatusButtonText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"]={docgenInfo:reservationlistentry.__docgenInfo,name:"reservationlistentry",path:"src/apps/reservation-list/list/reservation-list.entry.tsx#reservationlistentry"})}catch(__react_docgen_typescript_loader_error){}var serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),blockedArgs=__webpack_require__("./src/core/storybook/blockedArgs.ts"),reservationMaterialDetailsArgs=__webpack_require__("./src/core/storybook/reservationMaterialDetailsArgs.ts"),deleteReservationModalArgs=__webpack_require__("./src/core/storybook/deleteReservationModalArgs.ts"),reservationListArgs=__webpack_require__("./src/core/storybook/reservationListArgs.ts"),globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts");const reservation_list_dev={title:"Apps / Reservation list",component:reservation_list_entry,argTypes:{...serviceUrlArgs.A,...deleteReservationModalArgs.A,...reservationMaterialDetailsArgs.A,...blockedArgs.A,...reservationListArgs.A,...globalTextArgs.A,blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},ereolenHomepageUrl:{defaultValue:"https://ereolen.dk/",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListYouAreInQueueText:{defaultValue:"You are in the reservation queue",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}}},decorators:[esm.V]},Template=props=>react.createElement(reservation_list_entry,props),reservation_list_dev_ReservationListEntry=Template.bind({});reservation_list_dev_ReservationListEntry.args={};const{reservationDetails}=(0,modal_helpers.c6)(),ReservationListDigitalDetailsModal=Template.bind({});ReservationListDigitalDetailsModal.parameters={query:{modal:`${reservationDetails}9788702319361`}};const ReservationListPhysicalDetailsModal=Template.bind({});ReservationListPhysicalDetailsModal.parameters={query:{modal:`${reservationDetails}4698559133`}};const{pauseReservation}=(0,modal_helpers.c6)(),ReservationListPauseModal=Template.bind({});ReservationListPauseModal.parameters={query:{modal:pauseReservation}}},"./src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>delete_reservation_modal,g:()=>deleteReservationModalId});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts");const requestsAndReservations=({reservations,operations})=>{const{physical:reservationsPhysical,digital:reservationsDigital}=(reservations=>reservations.length?{physical:reservations.filter(reservation_type.uT).map((({reservationIds})=>reservationIds)).flat(),digital:reservations.filter(reservation_type.BP).map((({identifier})=>identifier))}:{physical:[],digital:[]})(reservations),requests=[];return reservationsPhysical.length&&requests.push({params:{params:{reservationid:reservationsPhysical}},operation:operations.physical}),reservationsDigital.length&&reservationsDigital.forEach((id=>{requests.push({params:{identifier:String(id)},operation:operations.digital})})),{requests,reservationsPhysical,reservationsDigital}};var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const delete_reservation_content=({deleteReservation,reservationsCount,deletionStatus})=>{const t=(0,utils_text.F)(),deleteReservationCallback=(0,react.useCallback)((()=>{deleteReservation()}),[deleteReservation]),buttonLabel=(({reservationsCount,deletionStatus,t})=>"pending"===deletionStatus?t("deleteReservationModalDeleteProcessingText"):t("deleteReservationModalDeleteButtonText",{count:reservationsCount}))({t,reservationsCount,deletionStatus});return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h3"},t("deleteReservationModalHeaderText",{count:reservationsCount})),react.createElement("div",{className:"mt-48 color-secondary-gray"},react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalDeleteQuestionText",{count:reservationsCount})),react.createElement("p",{className:"text-body-medium-regular"},t("deleteReservationModalNotRegrettableText"))),react.createElement("div",{className:"modal-pause__button mt-48"},react.createElement(Button.$,{dataCy:"delete-reservation-button",label:buttonLabel,buttonType:"none",variant:"filled",disabled:"pending"===deletionStatus,collapsible:!1,onClick:deleteReservationCallback,size:"small"})))};try{deletereservationcontent.displayName="deletereservationcontent",deletereservationcontent.__docgenInfo={description:"",displayName:"deletereservationcontent",props:{deleteReservation:{defaultValue:null,description:"",name:"deleteReservation",required:!0,type:{name:"() => void"}},reservationsCount:{defaultValue:null,description:"",name:"reservationsCount",required:!0,type:{name:"number"}},deletionStatus:{defaultValue:null,description:"",name:"deletionStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"]={docgenInfo:deletereservationcontent.__docgenInfo,name:"deletereservationcontent",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-content.tsx#deletereservationcontent"})}catch(__react_docgen_typescript_loader_error){}var fbs=__webpack_require__("./src/core/fbs/fbs.ts"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),ModalMessage=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");function deleteReservationModalId(reservation){return`${String((0,modal_helpers.c6)().reservationDelete)}${(0,reservation_type.OQ)(reservation)}`}const delete_reservation_modal=({modalId,reservations})=>{const t=(0,utils_text.F)(),queryClient=(0,es.useQueryClient)(),{mutate:deletePhysicalReservation}=(0,fbs.g1)(),{mutate:deleteDigitalReservation}=(0,publizon.de)(),[deletedReservations,setDeletedReservations]=(0,react.useState)(null),{requests,reservationsPhysical,reservationsDigital}=(0,react.useMemo)((()=>requestsAndReservations({operations:{digital:deleteDigitalReservation,physical:deletePhysicalReservation},reservations})),[deleteDigitalReservation,deletePhysicalReservation,reservations]),{handler:removeReservationsHandler,requestStatus,setRequestStatus}=(0,useRequestsWithStatus.mi)({requests,onSuccess:()=>{setDeletedReservations(reservations.length),queryClient.invalidateQueries((0,publizon.tt)()),queryClient.invalidateQueries((0,fbs.vN)())}});if(!reservations)return null;const ctaButtonParams={text:t("deleteReservationModalButtonText"),closeAllModals:!0,callback:()=>{setRequestStatus("idle"),setDeletedReservations(null)}};return react.createElement(modal.A,{modalId,classNames:"modal-cta modal-padding",closeModalAriaLabelText:t("deleteReservationModalCloseModalText"),screenReaderModalDescriptionText:t("deleteReservationModalAriaDescriptionText"),eventCallbacks:{close:()=>{setRequestStatus("idle"),setDeletedReservations(null)}}},["idle","pending"].includes(requestStatus)&&react.createElement(delete_reservation_content,{deleteReservation:()=>{(reservationsPhysical.length||reservationsDigital.length)&&removeReservationsHandler()},reservationsCount:reservations.length,deletionStatus:requestStatus}),"success"===requestStatus&&react.createElement(ModalMessage.A,{title:t("deleteReservationModalSuccessTitleText",{count:deletedReservations??1}),subTitle:t("deleteReservationModalSuccessStatusText",{count:deletedReservations??0}),ctaButton:ctaButtonParams}),"error"===requestStatus&&react.createElement(ModalMessage.A,{title:t("deleteReservationModalErrorsTitleText"),subTitle:t("deleteReservationModalErrorsStatusText"),ctaButton:ctaButtonParams}))};try{deleteReservationModalId.displayName="deleteReservationModalId",deleteReservationModalId.__docgenInfo={description:"",displayName:"deleteReservationModalId",props:{dateOfReservation:{defaultValue:null,description:"",name:"dateOfReservation",required:!1,type:{name:"string | null | undefined"}},expiryDate:{defaultValue:null,description:"",name:"expiryDate",required:!1,type:{name:"string | null | undefined"}},pickupDeadline:{defaultValue:null,description:"",name:"pickupDeadline",required:!1,type:{name:"string | null | undefined"}},numberInQueue:{defaultValue:null,description:"",name:"numberInQueue",required:!1,type:{name:"number | null | undefined"}},state:{defaultValue:null,description:"",name:"state",required:!1,type:{name:"string | null | undefined"}},expectedRedeemDateUtc:{defaultValue:null,description:"",name:"expectedRedeemDateUtc",required:!1,type:{name:"string | null | undefined"}},pickupNumber:{defaultValue:null,description:'The reservation number. This is, contrary to the name, a string containing, as an example, "Reserveringshylde 111"',name:"pickupNumber",required:!1,type:{name:"string | null | undefined"}},pickupBranch:{defaultValue:null,description:"",name:"pickupBranch",required:!1,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | null | undefined"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},reservationType:{defaultValue:null,description:"",name:"reservationType",required:!1,type:{name:"string | null | undefined"}},faust:{defaultValue:null,description:"",name:"faust",required:!1,type:{name:"string | null | undefined"}},identifier:{defaultValue:null,description:"",name:"identifier",required:!1,type:{name:"string | null | undefined"}},reservationIds:{defaultValue:null,description:"",name:"reservationIds",required:!1,type:{name:"number[] | null | undefined"}},loanId:{defaultValue:null,description:"",name:"loanId",required:!1,type:{name:"number | null | undefined"}},details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"]={docgenInfo:deleteReservationModalId.__docgenInfo,name:"deleteReservationModalId",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deleteReservationModalId"})}catch(__react_docgen_typescript_loader_error){}try{deletereservationmodal.displayName="deletereservationmodal",deletereservationmodal.__docgenInfo={description:"",displayName:"deletereservationmodal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},reservations:{defaultValue:null,description:"",name:"reservations",required:!0,type:{name:"Nullable>[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"]={docgenInfo:deletereservationmodal.__docgenInfo,name:"deletereservationmodal",path:"src/apps/reservation-list/modal/delete-reservation/delete-reservation-modal.tsx#deletereservationmodal"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/modal/reservation-details/reservation-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>reservation_details});var react=__webpack_require__("./node_modules/react/index.js"),reservation_type=__webpack_require__("./src/core/utils/types/reservation-type.ts"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),modal_details_header=__webpack_require__("./src/components/modal-details-header/modal-details-header.tsx"),Reservations=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reservations.svg"),Reservations_default=__webpack_require__.n(Reservations),Loans=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Loans.svg"),Loans_default=__webpack_require__.n(Loans),utils_text=__webpack_require__("./src/core/utils/text.tsx"),list_details=__webpack_require__("./src/components/list-details/list-details.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts");const digital_list_details=({reservation})=>{const t=(0,utils_text.F)(),{expiryDate,dateOfReservation,pickupDeadline,state}=reservation;return react.createElement(react.Fragment,null,expiryDate&&"readyForPickup"===state&&react.createElement(list_details.A,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsExpiresText",{placeholders:{"@date":(0,date.r6)(expiryDate)}})}),pickupDeadline&&"reserved"===state&&react.createElement(list_details.A,{icon:Reservations_default(),title:t("reservationDetailsStatusTitleText"),labels:t("reservationDetailsBorrowBeforeText",{placeholders:{"@date":(0,date.r6)(pickupDeadline)}})}),dateOfReservation&&react.createElement(list_details.A,{icon:Loans_default(),labels:(0,date.r6)(dateOfReservation),title:t("reservationDetailsDateOfReservationTitleText")}))};try{digitallistdetails.displayName="digitallistdetails",digitallistdetails.__docgenInfo={description:"",displayName:"digitallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"]={docgenInfo:digitallistdetails.__docgenInfo,name:"digitallistdetails",path:"src/apps/reservation-list/modal/reservation-details/digital-list-details.tsx#digitallistdetails"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx");const reservation_details_buttons=({openReservationDeleteModal,classNames,buttonClassNames,reservation})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:`modal-details__buttons ${classNames}`},react.createElement(Button.$,{label:t("reservationDetailsButtonRemoveText"),onClick:()=>openReservationDeleteModal(reservation),classNames:buttonClassNames,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled"}))};try{reservationdetailsbuttons.displayName="reservationdetailsbuttons",reservationdetailsbuttons.__docgenInfo={description:"",displayName:"reservationdetailsbuttons",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},buttonClassNames:{defaultValue:null,description:"",name:"buttonClassNames",required:!1,type:{name:"string | undefined"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"]={docgenInfo:reservationdetailsbuttons.__docgenInfo,name:"reservationdetailsbuttons",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-buttons.tsx#reservationdetailsbuttons"})}catch(__react_docgen_typescript_loader_error){}var icon_btn_external_link=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),icon_btn_external_link_default=__webpack_require__.n(icon_btn_external_link),LinkButton=__webpack_require__("./src/components/Buttons/LinkButton.tsx");const reservation_details_redirect=({reservation,openReservationDeleteModal,className,linkClassNames,externalLink})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:`modal-details__buttons ${className}`},react.createElement(Button.$,{buttonType:"none",label:t("reservationDetailsRemoveDigitalReservationText"),size:"small",variant:"outline",collapsible:!1,disabled:!1,onClick:()=>openReservationDeleteModal(reservation),classNames:linkClassNames,dataCy:"remove-digital-reservation-button"}),react.createElement(LinkButton.A,{dataCy:"go-to-ereolen-button",size:"small",url:externalLink,variant:"filled",id:"go-to-ereolen-button"},t("reservationDetailsDigitalReservationGoToEreolenText"),react.createElement("img",{src:icon_btn_external_link_default(),className:"btn-icon invert",alt:""})))};try{reservationdetailsredirect.displayName="reservationdetailsredirect",reservationdetailsredirect.__docgenInfo={description:"",displayName:"reservationdetailsredirect",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},linkClassNames:{defaultValue:null,description:"",name:"linkClassNames",required:!1,type:{name:"string | undefined"}},externalLink:{defaultValue:null,description:"",name:"externalLink",required:!0,type:{name:"URL"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"]={docgenInfo:reservationdetailsredirect.__docgenInfo,name:"reservationdetailsredirect",path:"src/apps/reservation-list/modal/reservation-details/reservation-details-redirect.tsx#reservationdetailsredirect"})}catch(__react_docgen_typescript_loader_error){}var digital_material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/digital-material-fetch-hoc.tsx"),Ebook=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Ebook.svg"),Ebook_default=__webpack_require__.n(Ebook),Location=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Location.svg"),Location_default=__webpack_require__.n(Location),LoanHistory=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/LoanHistory.svg"),LoanHistory_default=__webpack_require__.n(LoanHistory),es=__webpack_require__("./node_modules/react-query/es/index.js"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),PickupModal=__webpack_require__("./src/components/reservation/forms/PickupModal.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),forms_helper=__webpack_require__("./src/components/reservation/forms/helper.ts"),utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),ReservationFormListItem=__webpack_require__("./src/components/reservation/ReservationFormListItem.tsx"),NoInterestAfterModal=__webpack_require__("./src/components/reservation/forms/NoInterestAfterModal.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const physical_list_details=({reservation,reservation:{numberInQueue,pickupBranch,expiryDate,pickupDeadline,dateOfReservation,pickupNumber,reservationIds}})=>{const config=(0,utils_config.UK)(),t=(0,utils_text.F)(),{open}=(0,modal.X)(),queryClient=(0,es.useQueryClient)(),{mutate}=(0,fbs.cK)(),interestPeriods=config("interestPeriodsConfig",{transformer:"jsonParse"}),[selectedInterest,setSelectedInterest]=(0,react.useState)(null),[selectedBranch,setSelectedBranch]=(0,react.useState)(pickupBranch),[reservationStatus,setReservationStatus]=(0,react.useState)("idle"),openModal=type=>()=>{open((0,forms_helper.zW)(type))},branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config("blacklistedPickupBranchesConfig",{transformer:"stringToArray"}),whitelistBranches=(0,utils_branches.z5)(branches,blacklistBranches),isReadyForPickup=(0,helpers.JU)([reservation]).length>0,saveChanges=formSelectValue=>{if(setReservationStatus("pending"),!reservationIds||0===reservationIds.length||!selectedBranch)return console.error("Missing reservationId or selectedBranch"),void setReservationStatus("error");const reservationsChanges=(({formSelectValue,reservationIds,expiryDate,selectedBranch})=>{const getSelectedPickupBranch=value=>"string"==typeof value?value:selectedBranch;return reservationIds.map((reservationId=>{return{expiryDate:(value=formSelectValue,"number"==typeof value?(0,helper.ZI)(value):expiryDate??""),pickupBranch:getSelectedPickupBranch(formSelectValue),reservationId};var value}))})({formSelectValue,reservationIds,expiryDate,selectedBranch});mutate({data:{reservations:reservationsChanges}},{onSuccess:()=>{setReservationStatus("success"),queryClient.invalidateQueries((0,fbs.vN)())},onError:()=>{setReservationStatus("error")}})};return react.createElement(react.Fragment,null,numberInQueue&&react.createElement(list_details.A,{icon:Ebook_default(),title:t("reservationDetailsStatusTitleText"),labels:[t("reservationDetailsNumberInQueueLabelText",{placeholders:{"@count":numberInQueue}})]}),pickupBranch&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:Location_default(),title:t("reservationDetailsPickUpAtTitleText"),text:(0,helper.C4)(selectedBranch??pickupBranch,whitelistBranches),changeHandler:openModal("pickup"),buttonAriaLabel:t("changePickupLocationText"),subText:pickupNumber??"",isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(PickupModal.A,{branches:whitelistBranches,defaultBranch:pickupBranch,selectBranchHandler:setSelectedBranch,saveCallback:saveChanges,reservationStatus,setReservationStatus})),expiryDate&&react.createElement(react.Fragment,null,react.createElement(ReservationFormListItem.A,{icon:LoanHistory_default(),title:t("reservationDetailsNoInterestAfterTitleText"),text:selectedInterest?(0,date.Yq)((0,helper.ZI)(selectedInterest)):(0,date.Yq)(expiryDate),changeHandler:openModal("interestPeriod"),buttonAriaLabel:t("changeInterestPeriodText"),isPossibleToChangeReservationDetails:!isReadyForPickup}),!isReadyForPickup&&react.createElement(NoInterestAfterModal.A,{selectedInterest:selectedInterest??Number(interestPeriods.defaultInterestPeriod.value),setSelectedInterest,saveCallback:saveChanges,reservationStatus,setReservationStatus})),pickupDeadline&&react.createElement(list_details.A,{icon:Reservations_default(),title:t("reservationDetailsPickupDeadlineTitleText"),labels:[(0,date.Yq)(pickupDeadline)]}),dateOfReservation&&react.createElement(list_details.A,{icon:Loans_default(),title:t("reservationDetailsDateOfReservationTitleText"),labels:[(0,date.Yq)(dateOfReservation)]}))};try{physicallistdetails.displayName="physicallistdetails",physicallistdetails.__docgenInfo={description:"",displayName:"physicallistdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},material:{defaultValue:null,description:"",name:"material",required:!1,type:{name:"Nullable> | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"]={docgenInfo:physicallistdetails.__docgenInfo,name:"physicallistdetails",path:"src/apps/reservation-list/modal/reservation-details/physical-list-details.tsx#physicallistdetails"})}catch(__react_docgen_typescript_loader_error){}var MaterialButtonLoading=__webpack_require__("./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),url=__webpack_require__("./src/core/utils/url.tsx");const reservation_details=(0,digital_material_fetch_hoc.A)((0,material_fetch_hoc.A)((({reservation,material,openReservationDeleteModal})=>{const t=(0,utils_text.F)(),ereolenHomepageUrl=(0,url.Ik)()("ereolenHomepageUrl"),config=(0,utils_config.UK)(),[externalUrl,setExternalUrl]=(0,react.useState)(null),{state,identifier}=reservation,{authors,pid,year,title,description,materialType}=material||{},{allowRemoveReadyReservations}=config("reservationDetailsConfig",{transformer:"jsonParse"}),allowUserRemoveReadyReservations="readyForPickup"===state&&allowRemoveReadyReservations||"readyForPickup"!==state,{data:complexSearchData,isLoading:isLoadingComplexSearch}=(0,graphql.D3)({cql:`term.isbn=${identifier}`,offset:0,limit:1,filters:{}},{enabled:!!identifier});return(0,react.useEffect)((()=>{if(!complexSearchData||0===complexSearchData.complexSearch.hitcount)return;const matchingManifestations=((manifestations,identifier)=>manifestations.filter((manifestation=>manifestation.identifiers.find((id=>id.value.replace(/\D/g,"")===identifier.replace(/\D/g,""))))))(complexSearchData.complexSearch.works[0].manifestations.all,identifier||"");setExternalUrl(new URL((manifestations=>{const manifestationWithEreolAccess=manifestations.find((manifestation=>manifestation.access.find((access=>"Ereol"===access.__typename)))),ereolAccess=null==manifestationWithEreolAccess?void 0:manifestationWithEreolAccess.access.find((access=>"Ereol"===access.__typename));return null==ereolAccess?void 0:ereolAccess.url})(matchingManifestations)||ereolenHomepageUrl))}),[complexSearchData,identifier,ereolenHomepageUrl]),react.createElement("div",{className:"modal-details__container"},material&&react.createElement(react.Fragment,null,react.createElement(modal_details_header.A,{isbnForCover:identifier||"",authors,year,title,pid,description,materialType,series:material.series},"readyForPickup"===state&&react.createElement("div",{className:"status-label status-label--info"},t("reservationDetailsReadyForLoanText"))),(0,reservation_type.uT)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{classNames:"modal-details__buttons--hide-on-mobile",openReservationDeleteModal,reservation}),(0,reservation_type.BP)(reservation)&&isLoadingComplexSearch&&react.createElement("div",{className:"modal-details__buttons modal-details__buttons--hide-on-mobile"},react.createElement(MaterialButtonLoading.A,{classNames:"modal-details__buttons--hide-on-mobile"})),(0,reservation_type.BP)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,reservation,className:"modal-details__buttons--hide-on-mobile",linkClassNames:"mx-16",externalLink:externalUrl}),react.createElement("div",{className:"modal-details__list"},(0,reservation_type.BP)(reservation)&&react.createElement(digital_list_details,{reservation}),(0,reservation_type.uT)(reservation)&&react.createElement(physical_list_details,{reservation})),(0,reservation_type.uT)(reservation)&&allowUserRemoveReadyReservations&&react.createElement(reservation_details_buttons,{buttonClassNames:"modal-details__buttons__full-width",openReservationDeleteModal,reservation}),(0,reservation_type.BP)(reservation)&&!isLoadingComplexSearch&&externalUrl&&react.createElement(reservation_details_redirect,{openReservationDeleteModal,linkClassNames:"my-16",reservation,externalLink:externalUrl})))})));try{reservationdetails.displayName="reservationdetails",reservationdetails.__docgenInfo={description:"",displayName:"reservationdetails",props:{reservation:{defaultValue:null,description:"",name:"reservation",required:!0,type:{name:"Nullable>"}},openReservationDeleteModal:{defaultValue:null,description:"",name:"openReservationDeleteModal",required:!0,type:{name:"(deleteReservation: Nullable>) => void"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"]={docgenInfo:reservationdetails.__docgenInfo,name:"reservationdetails",path:"src/apps/reservation-list/modal/reservation-details/reservation-details.tsx#reservationdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/reservation-material/list-material-skeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation my-32 ssc"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square cover--size-small"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__information"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-30 mb-24"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-100 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-70 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mb-4"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__status"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__counter"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-circle w-100"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-reservation__deadline"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-30 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-20 mb-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-20 mb-4"})))));try{listmaterialskeleton.displayName="listmaterialskeleton",listmaterialskeleton.__docgenInfo={description:"",displayName:"listmaterialskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/list-material-skeleton.tsx#listmaterialskeleton"]={docgenInfo:listmaterialskeleton.__docgenInfo,name:"listmaterialskeleton",path:"src/apps/reservation-list/reservation-material/list-material-skeleton.tsx#listmaterialskeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/reservation-material/reservation-info.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>reservation_info});var react=__webpack_require__("./node_modules/react/index.js"),icon_check=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-check.svg"),icon_check_default=__webpack_require__.n(icon_check),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/components/reservation/helper.ts"),ArrowButton=__webpack_require__("./src/components/Buttons/ArrowButton.tsx"),status_circle_icon=__webpack_require__("./src/apps/loan-list/materials/utils/status-circle-icon.tsx");const InfoLabel=({dataCy="info-label",children})=>react.createElement("div",{"data-cy":dataCy,className:"status-label status-label--info"},children),labels_InfoLabel=InfoLabel;try{InfoLabel.displayName="InfoLabel",InfoLabel.__docgenInfo={description:"",displayName:"InfoLabel",props:{dataCy:{defaultValue:{value:"info-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/labels/InfoLabel.tsx#InfoLabel"]={docgenInfo:InfoLabel.__docgenInfo,name:"InfoLabel",path:"src/components/atoms/labels/InfoLabel.tsx#InfoLabel"})}catch(__react_docgen_typescript_loader_error){}const reservation_status=({reservationInfo,openReservationDetailsModal,color,percent,empty=!1,info,label,children,showArrow=!0,className})=>{const shouldRenderReservationDeadline=info||(Array.isArray(label)?label.length>0:!!label);return react.createElement("div",{className:className??"list-reservation__status"},react.createElement("div",{className:"list-reservation__counter color-secondary-gray"},!empty&&react.createElement(status_circle_icon.A,{color,percent},children)),shouldRenderReservationDeadline&&react.createElement("div",null,react.createElement("div",{className:"list-reservation__deadline"},info&&react.createElement(labels_InfoLabel,null,info),"string"==typeof label&&react.createElement("p",{className:"text-small-caption"},label),Array.isArray(label)&&label.map((localLabel=>react.createElement("p",{className:"text-small-caption"},localLabel))))),showArrow&&react.createElement(ArrowButton.A,{arrowLabelledBy:`${(null==reservationInfo?void 0:reservationInfo.identifier)||(null==reservationInfo?void 0:reservationInfo.faust)}-title`,cursorPointer:!0,clickEventHandler:()=>{openReservationDetailsModal&&reservationInfo&&openReservationDetailsModal(reservationInfo)}}))};try{reservationstatus.displayName="reservationstatus",reservationstatus.__docgenInfo={description:"",displayName:"reservationstatus",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!1,type:{name:"Nullable> | undefined"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string | undefined"}},empty:{defaultValue:{value:"false"},description:"",name:"empty",required:!1,type:{name:"boolean | undefined"}},percent:{defaultValue:null,description:"",name:"percent",required:!0,type:{name:"number"}},info:{defaultValue:null,description:"",name:"info",required:!1,type:{name:"string | undefined"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string | string[]"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"]={docgenInfo:reservationstatus.__docgenInfo,name:"reservationstatus",path:"src/apps/reservation-list/reservation-material/reservation-status.tsx#reservationstatus"})}catch(__react_docgen_typescript_loader_error){}var utils_branches=__webpack_require__("./src/core/utils/branches.tsx"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const reservation_info=({reservationInfo,openReservationDetailsModal,showStatusCircleIcon=!0,showArrow=!0,reservationStatusClassNameOverride,isDigital})=>{const t=(0,utils_text.F)(),{state,expiryDate,pickupBranch,numberInQueue,pickupDeadline,pickupNumber}=reservationInfo,[pickupLibrary,setPickupLibrary]=(0,react.useState)(""),{success}=(0,general.jM)(),branches=(0,utils_branches.ov)("blacklistedPickupBranchesConfig");(0,useDeepCompareEffect.A)((()=>{branches&&pickupBranch&&setPickupLibrary((0,helper.C4)(pickupBranch,branches))}),[branches,pickupBranch]);const getInfo=()=>{if(!(isDigital&&expiryDate||pickupDeadline))return"";const date=(isDigital?expiryDate:pickupDeadline)??null;return date?(0,helpers.Fk)({pickupBranch,date,t,isDigital}):""};if("readyForPickup"===state)return react.createElement(reservation_status,{color:success,percent:100,info:getInfo(),label:isDigital?[t("reservationListDigitalPickupText")]:[pickupLibrary,pickupNumber||""],reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("div",{className:"counter__value color-secondary-gray"},react.createElement("img",{src:icon_check_default(),alt:""}),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListReadyText"))));if("reserved"===state&&pickupBranch&&numberInQueue&&expiryDate){const numberInLineLabel=1===numberInQueue?t("reservationListFirstInQueueText"):t("reservationListNumberInQueueText",{placeholders:{"@count":numberInQueue-1}});return react.createElement(reservation_status,{percent:1/numberInQueue*100,label:showStatusCircleIcon?numberInLineLabel:"",reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},numberInQueue),react.createElement("span",{className:"counter__label color-secondary-gray"},t("reservationListInQueueText")))}if("reserved"===state&&!pickupBranch&&pickupDeadline){const daysBetweenTodayAndPickup=(0,general.m2)(pickupDeadline),reservationAvailableLabel=showStatusCircleIcon?t("reservationListAvailableInText",{placeholders:{"@count":(0,general.m2)(pickupDeadline)}}):"";return react.createElement(reservation_status,{percent:(0,general.m2)(pickupDeadline)/100,label:reservationAvailableLabel,reservationInfo,openReservationDetailsModal,empty:!showStatusCircleIcon,showArrow,className:reservationStatusClassNameOverride},react.createElement("span",{className:"counter__value color-secondary-gray"},(0,general.m2)(pickupDeadline)>0?daysBetweenTodayAndPickup:0," "),react.createElement("span",{className:"counter__label color-secondary-gray"},t(1===daysBetweenTodayAndPickup?"reservationListDayText":"reservationListDaysText")))}return react.createElement(reservation_status,{reservationInfo,openReservationDetailsModal,percent:0,label:"",empty:!0,showArrow,className:reservationStatusClassNameOverride})};try{reservationinfo.displayName="reservationinfo",reservationinfo.__docgenInfo={description:"",displayName:"reservationinfo",props:{reservationInfo:{defaultValue:null,description:"",name:"reservationInfo",required:!0,type:{name:"Nullable>"}},openReservationDetailsModal:{defaultValue:null,description:"",name:"openReservationDetailsModal",required:!1,type:{name:"((reservation: Nullable>) => void) | undefined"}},showStatusCircleIcon:{defaultValue:{value:"true"},description:"",name:"showStatusCircleIcon",required:!1,type:{name:"boolean | undefined"}},showArrow:{defaultValue:{value:"true"},description:"",name:"showArrow",required:!1,type:{name:"boolean | undefined"}},reservationStatusClassNameOverride:{defaultValue:null,description:"",name:"reservationStatusClassNameOverride",required:!1,type:{name:"string | undefined"}},isDigital:{defaultValue:null,description:"",name:"isDigital",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"]={docgenInfo:reservationinfo.__docgenInfo,name:"reservationinfo",path:"src/apps/reservation-list/reservation-material/reservation-info.tsx#reservationinfo"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/reservation-list/utils/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Fk:()=>getReservationStatusInfoLabel,Iw:()=>getStatusText,JU:()=>getReadyForPickup,LQ:()=>sortByOldestPickupDeadline,hm:()=>sortByNumberInQueue});var _core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/helpers/date.ts"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts");const sortByOldestPickupDeadline=list=>list.sort(((objA,objB)=>new Date(objA.pickupDeadline||new Date).getTime()-new Date(objB.pickupDeadline||new Date).getTime())),sortByNumberInQueue=reservations=>[...reservations].sort(((a,b)=>(a.numberInQueue||0)-(b.numberInQueue||0))),getReadyForPickup=list=>list.filter((({state})=>"readyForPickup"===state)),infoLabelTextType_pickUpLatest="reservationPickUpLatestText",infoLabelTextType_loanBefore="reservationListLoanBeforeText",getReservationStatusInfoLabel=({pickupBranch,date,isDigital,t})=>t(pickupBranch?infoLabelTextType_pickUpLatest:infoLabelTextType_loanBefore,{placeholders:{"@date":(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_0__.SL)({date,isDigital})}}),getStatusText=({identifier,state,pickupDeadline,faust,numberInQueue},t)=>identifier&&"reserved"===state?pickupDeadline?t("reservationListAvailableInText",{placeholders:{"@count":(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.m2)(pickupDeadline)}}):t("reservationListYouAreInQueueText"):faust&&numberInQueue?t("dashboardNumberInLineText",{count:numberInQueue,placeholders:{"@count":numberInQueue}}):""},"./src/apps/search-header/search-header.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Search:()=>Search,default:()=>search_header_dev});var react=__webpack_require__("./node_modules/react/index.js"),story_header_dev_inc=__webpack_require__("./src/components/search-bar/story-header.dev.inc.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const getAutosuggestCategoryList=t=>[{render:t("autosuggestBookCategoryText"),term:material_type.wP.book,facet:"materialTypesSpecific"},{render:t("autosuggestEbookCategoryText"),term:material_type.wP.ebook,facet:"materialTypesSpecific"},{render:t("autosuggestFilmCategoryText"),term:material_type.wP.movie,facet:"workTypes"},{render:t("autosuggestAudioBookCategoryText"),term:material_type.wP.audioBook,facet:"materialTypesSpecific"},{render:t("autosuggestMusicCategoryText"),term:material_type.wP.music,facet:"workTypes"},{render:t("autosuggestGameCategoryText"),term:material_type.wP.game,facet:"workTypes"},{render:t("autosuggestAnimatedSeriesCategoryText"),term:material_type.wP.animatedSeries,facet:"materialTypesSpecific"}];function determineSuggestionTerm(suggestion){var _suggestion$work;return suggestion.type===graphql.hC.Composit?(null===(_suggestion$work=suggestion.work)||void 0===_suggestion$work?void 0:_suggestion$work.titles.main[0])||"incomplete data":suggestion.term}function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,categoryData.map(((item,incorrectIndex)=>{const index=incorrectIndex+textAndMaterialDataLength;return react.createElement("li",_extends({className:(0,clsx.A)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index}),key:`${item.term}-${index}`},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},`${item.term} ${t("inText")}`),react.createElement("div",{className:"boxed-text text-tags noselect ml-8"},getAutosuggestCategoryList(t)[incorrectIndex].render))})))};try{autosuggestcategory.displayName="autosuggestcategory",autosuggestcategory.__docgenInfo={description:"",displayName:"autosuggestcategory",props:{categoryData:{defaultValue:null,description:"",name:"categoryData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textAndMaterialDataLength:{defaultValue:null,description:"",name:"textAndMaterialDataLength",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"autosuggest-category-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"]={docgenInfo:autosuggestcategory.__docgenInfo,name:"autosuggestcategory",path:"src/components/autosuggest-category/autosuggest-category.tsx#autosuggestcategory"})}catch(__react_docgen_typescript_loader_error){}var cover=__webpack_require__("./src/components/cover/cover.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),helper=__webpack_require__("./src/apps/material/helper.ts");function autosuggest_material_extends(){return autosuggest_material_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,materialData.map(((item,incorrectIndex)=>{const index=incorrectIndex+textDataLength,{work}=item;if(!work)return null;const{workId,titles,creators,manifestations:{all:allManifestations,bestRepresentation}}=work,authors=(0,general.UV)(creators),manifestationLanguageIsoCode=bestRepresentation&&(0,helper.PG)([bestRepresentation]),coverPids=(0,general.e$)(allManifestations??[]);return react.createElement("li",autosuggest_material_extends({className:(0,clsx.A)("autosuggest__material-item",{"autosuggest__material-item--two":2===materialData.length,"autosuggest__material-item--one":1===materialData.length,"autosuggest__material-item--highlight":highlightedIndex===index}),key:workId},getItemProps({item,index}),{"data-cy":dataCy}),react.createElement("div",{className:"autosuggest__material-card"},react.createElement(cover.Y,{animate:!0,size:"xsmall",ids:coverPids,bestRepresentation,shadow:"small"}),react.createElement("div",{className:"autosuggest__info"},react.createElement("div",{lang:manifestationLanguageIsoCode,className:"text-body-medium-medium autosuggest__title"},titles.main[0]),react.createElement("div",{className:"text-body-small-regular autosuggest__author"},(0,general.sP)(authors,t)))))})))};try{autosuggestmaterial.displayName="autosuggestmaterial",autosuggestmaterial.__docgenInfo={description:"",displayName:"autosuggestmaterial",props:{materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'[] | { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},textDataLength:{defaultValue:null,description:"",name:"textDataLength",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"autosuggest-material-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"]={docgenInfo:autosuggestmaterial.__docgenInfo,name:"autosuggestmaterial",path:"src/components/autosuggest-material/autosuggest-material.tsx#autosuggestmaterial"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_text_item_extends(){return autosuggest_text_item_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{var _item$work,_item$work2;const isoLang=(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.manifestations.bestRepresentation)&&(0,helper.PG)([item.work.manifestations.bestRepresentation]),t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement("li",autosuggest_text_item_extends({className:classes.textSuggestion,key:generateItemId(item)},getItemProps({item,index}),{"data-cy":dataCy,lang:isoLang}),react.createElement("p",{className:"autosuggest__text text-body-medium-regular"},item.type===graphql.hC.Creator?`${item.term} (${t("stringSuggestionAuthorText")})`:null,item.type===graphql.hC.Subject?`${item.term} (${t("stringSuggestionTopicText")})`:null,item.type===graphql.hC.Composit?`${null===(_item$work2=item.work)||void 0===_item$work2?void 0:_item$work2.titles.main} (${t("stringSuggestionWorkText")})`:null,item.type===graphql.hC.Title?`${item.term} (${t("stringSuggestionWorkText")})`:null)))};try{autosuggesttextitem.displayName="autosuggesttextitem",autosuggesttextitem.__docgenInfo={description:"",displayName:"autosuggesttextitem",props:{classes:{defaultValue:null,description:"",name:"classes",required:!0,type:{name:"{ textSuggestion: string; }"}},item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }'}},index:{defaultValue:null,description:"",name:"index",required:!0,type:{name:"number"}},generateItemId:{defaultValue:null,description:"",name:"generateItemId",required:!0,type:{name:'(objectItem: { __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }) => string'}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},dataCy:{defaultValue:{value:"autosuggest-text-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"]={docgenInfo:autosuggesttextitem.__docgenInfo,name:"autosuggesttextitem",path:"src/components/autosuggest-text/autosuggest-text-item.tsx#autosuggesttextitem"})}catch(__react_docgen_typescript_loader_error){}function itemToString(objectItem){var _objectItem$work;return objectItem.type===graphql.hC.Composit?(null===(_objectItem$work=objectItem.work)||void 0===_objectItem$work?void 0:_objectItem$work.titles.main[0])||"incomplete data":objectItem.term}function generateItemId(objectItem){return`${objectItem.__typename}-${itemToString(objectItem)}-${Math.random().toString(36)}`.replace(/\s+/g,"-")}const AutosuggestText=({textData,highlightedIndex,getItemProps})=>react.createElement(react.Fragment,null,textData.map(((item,index)=>{const classes={textSuggestion:(0,clsx.A)("autosuggest__text-item text-body-medium-regular px-24",{"autosuggest__text-item--highlight":highlightedIndex===index})};return react.createElement(autosuggest_text_item,{classes,item,index,generateItemId,getItemProps})})));try{itemToString.displayName="itemToString",itemToString.__docgenInfo={description:"",displayName:"itemToString",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#itemToString"]={docgenInfo:itemToString.__docgenInfo,name:"itemToString",path:"src/components/autosuggest-text/autosuggest-text.tsx#itemToString"})}catch(__react_docgen_typescript_loader_error){}try{generateItemId.displayName="generateItemId",generateItemId.__docgenInfo={description:"",displayName:"generateItemId",props:{__typename:{defaultValue:null,description:"",name:"__typename",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"Suggestion"'}]}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"COMPOSIT"'},{value:'"CREATOR"'},{value:'"SUBJECT"'},{value:'"TITLE"'}]}},term:{defaultValue:null,description:"",name:"term",required:!0,type:{name:"string"}},work:{defaultValue:null,description:"",name:"work",required:!1,type:{name:'{ __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ __typename?: "Corporation" | undefined; display: string; } | { ...; })[]; manifestations: { ...; }; } | null | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"]={docgenInfo:generateItemId.__docgenInfo,name:"generateItemId",path:"src/components/autosuggest-text/autosuggest-text.tsx#generateItemId"})}catch(__react_docgen_typescript_loader_error){}try{AutosuggestText.displayName="AutosuggestText",AutosuggestText.__docgenInfo={description:"",displayName:"AutosuggestText",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"]={docgenInfo:AutosuggestText.__docgenInfo,name:"AutosuggestText",path:"src/components/autosuggest-text/autosuggest-text.tsx#AutosuggestText"})}catch(__react_docgen_typescript_loader_error){}try{autosuggesttext.displayName="autosuggesttext",autosuggesttext.__docgenInfo={description:"",displayName:"autosuggesttext",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"]={docgenInfo:autosuggesttext.__docgenInfo,name:"autosuggesttext",path:"src/components/autosuggest-text/autosuggest-text.tsx#autosuggesttext"})}catch(__react_docgen_typescript_loader_error){}function autosuggest_extends(){return autosuggest_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,utils_text.F)();return isLoading&&!textData?react.createElement("ul",{className:"autosuggest pb-16","data-cy":dataCy},react.createElement("li",{className:"ml-24"},t("loadingText"))):react.createElement(react.Fragment,null,react.createElement("ul",autosuggest_extends({className:"autosuggest pb-16"},getMenuProps(),{style:isOpen?{}:{display:"none"},"data-cy":dataCy}),react.createElement(AutosuggestText,{textData,highlightedIndex,getItemProps}),materialData.length>0&&react.createElement(autosuggest_material,{materialData,getItemProps,highlightedIndex,textDataLength:textData.length}),categoryData&&categoryData.length>0&&react.createElement(autosuggest_category,{categoryData,getItemProps,highlightedIndex,textAndMaterialDataLength:textData.length+materialData.length})))};try{Autosuggest.displayName="Autosuggest",Autosuggest.__docgenInfo={description:"",displayName:"Autosuggest",props:{textData:{defaultValue:null,description:"",name:"textData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},materialData:{defaultValue:null,description:"",name:"materialData",required:!0,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[]'}},status:{defaultValue:null,description:"",name:"status",required:!0,type:{name:"string"}},getMenuProps:{defaultValue:null,description:"",name:"getMenuProps",required:!0,type:{name:"(options?: (UseComboboxGetMenuPropsOptions & Options) | undefined, otherOptions?: GetPropsCommonOptions | undefined) => Overwrite<...>"}},highlightedIndex:{defaultValue:null,description:"",name:"highlightedIndex",required:!0,type:{name:"number"}},getItemProps:{defaultValue:null,description:"",name:"getItemProps",required:!0,type:{name:'(options: UseComboboxGetItemPropsOptions<{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } |...'}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},categoryData:{defaultValue:null,description:"",name:"categoryData",required:!1,type:{name:'{ __typename?: "Suggestion" | undefined; type: SuggestionType; term: string; work?: { __typename?: "Work" | undefined; workId: string; titles: { __typename?: "WorkTitles" | undefined; main: string[]; }; creators: ({ ...; } | { ...; })[]; manifestations: { ...; }; } | null | undefined; }[] | undefined'}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},dataCy:{defaultValue:{value:"autosuggest"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/autosuggest/autosuggest.tsx#Autosuggest"]={docgenInfo:Autosuggest.__docgenInfo,name:"Autosuggest",path:"src/components/autosuggest/autosuggest.tsx#Autosuggest"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const HeaderDropdown=({redirectTo,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"header__menu-dropdown","data-cy":"search-header-dropdown"},react.createElement("ul",{role:"menu"},react.createElement("li",{role:"presentation"},react.createElement("a",{ref:headerDropdownRef,role:"menuitem",className:"header__menu-dropdown-item hide-linkstyle",href:String(advancedSearchUrl),onClick:e=>{e.preventDefault(),redirectTo(advancedSearchUrl)},onKeyUp:e=>"Enter"===e.key?(e.preventDefault(),redirectTo(advancedSearchUrl)):"ArrowDown"===e.key||"ArrowUp"===e.key||"Escape"===e.key?setIsHeaderDropdownOpen(!1):null,onBlur:()=>setIsHeaderDropdownOpen(!1)},t("headerDropdownItemAdvancedSearchText")))))},header_dropdown_HeaderDropdown=HeaderDropdown;try{HeaderDropdown.displayName="HeaderDropdown",HeaderDropdown.__docgenInfo={description:"",displayName:"HeaderDropdown",props:{redirectTo:{defaultValue:null,description:"",name:"redirectTo",required:!0,type:{name:"(url: URL) => void"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"Dispatch>"}},headerDropdownRef:{defaultValue:null,description:"",name:"headerDropdownRef",required:!0,type:{name:"RefObject"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"]={docgenInfo:HeaderDropdown.__docgenInfo,name:"HeaderDropdown",path:"src/components/header-dropdown/HeaderDropdown.tsx#HeaderDropdown"})}catch(__react_docgen_typescript_loader_error){}const search_header=()=>{const t=(0,utils_text.F)(),u=(0,url.Ik)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),advancedSearchUrl=u("advancedSearchUrl"),[q,setQ]=(0,react.useState)(""),[qWithoutQuery,setQWithoutQuery]=(0,react.useState)(q),[suggestItems,setSuggestItems]=(0,react.useState)([]),[currentlySelectedItem,setCurrentlySelectedItem]=(0,react.useState)(""),[isAutosuggestOpen,setIsAutosuggestOpen]=(0,react.useState)(!1),{data,isLoading,status}=(0,graphql.Yu)({q},{enabled:q.length>=3}),[isHeaderDropdownOpen,setIsHeaderDropdownOpen]=(0,react.useState)(!1),[highlightedIndexAfterClick,setHighlightedIndexAfterClick]=(0,react.useState)(null),{track}=(0,useStatistics.B)();(0,react.useEffect)((()=>{if(data){const arrayOfResults=data.suggest.result;setSuggestItems(arrayOfResults)}}),[data]);const originalData=suggestItems,textData=[],materialData=[],categoryData=[];let nonWorkSuggestion,orderedData=[];originalData&&(nonWorkSuggestion=function findNonWorkSuggestion(originalData){return originalData.find((item=>item.type!==graphql.hC.Title&&item.type!==graphql.hC.Composit))}(originalData),originalData.forEach((item=>{(item.type===graphql.hC.Composit||item.type===graphql.hC.Title)&&item.work&&materialData.length<3?materialData.push(item):textData.push(item)})),orderedData=textData.concat(materialData),nonWorkSuggestion&&(getAutosuggestCategoryList(t).forEach((()=>{categoryData.push(nonWorkSuggestion)})),orderedData=orderedData.concat(categoryData))),(0,react.useEffect)((()=>{data&&data.suggest.result.length>0?setIsAutosuggestOpen(!0):setIsAutosuggestOpen(!1)}),[data]),(0,react.useEffect)((()=>{qWithoutQuery.length>2?setIsAutosuggestOpen(!0):setIsAutosuggestOpen(!1)}),[qWithoutQuery]);const{getMenuProps,highlightedIndex,getItemProps,getInputProps,getLabelProps}=(0,downshift_esm.Bp)({isOpen:isAutosuggestOpen,items:orderedData,inputValue:qWithoutQuery,defaultIsOpen:!1,onInputValueChange:function handleInputValueChange(changes){var _selectedItem$work;const{inputValue,selectedItem,type}=changes;if(void 0!==inputValue){if(type===downshift_esm.Bp.stateChangeTypes.InputChange)return setQ(inputValue),void setQWithoutQuery(inputValue);if(setQWithoutQuery(inputValue),selectedItem&&(type===downshift_esm.Bp.stateChangeTypes.ItemClick||type===downshift_esm.Bp.stateChangeTypes.InputKeyDownEnter))if(null!==(_selectedItem$work=selectedItem.work)&&void 0!==_selectedItem$work&&_selectedItem$work.workId&&function isDisplayedAsWorkSuggestion(selectedItem,currentMaterialData){const dataWithWorkId=currentMaterialData.filter((item=>{var _item$work;return(null===(_item$work=item.work)||void 0===_item$work?void 0:_item$work.workId)===(null==selectedItem?void 0:selectedItem.workId)}));return Boolean(dataWithWorkId.length)}(selectedItem.work,materialData))track("click",{id:statistics.o.autosuggestClick.id,name:statistics.o.autosuggestClick.name,trackedData:selectedItem.work.titles.main.join(", ")}).then((()=>{var _selectedItem$work2;(0,helpers_url.SE)((0,helpers_url.Qj)(materialUrl,null===(_selectedItem$work2=selectedItem.work)||void 0===_selectedItem$work2?void 0:_selectedItem$work2.workId))}));else if(nonWorkSuggestion&&changes.selectedItem&&nonWorkSuggestion.term===changes.selectedItem.term&&highlightedIndexAfterClick&&highlightedIndexAfterClick>=textData.concat(materialData).length){const highlightedCategoryIndex=highlightedIndexAfterClick-(textData.length+materialData.length),selectedItemString=determineSuggestionTerm(changes.selectedItem);track("click",{id:statistics.o.autosuggestClick.id,name:statistics.o.autosuggestClick.name,trackedData:selectedItemString}).then((()=>{const{term,facet}=getAutosuggestCategoryList(t)[highlightedCategoryIndex];(0,helpers_url.SE)((0,helpers_url.fN)({searchUrl,selectedItemString,filter:{[facet]:term}}))}))}else track("click",{id:statistics.o.autosuggestClick.id,name:statistics.o.autosuggestClick.name,trackedData:determineSuggestionTerm(selectedItem)}).then((()=>{(0,helpers_url.SE)((0,helpers_url.zy)(searchUrl,determineSuggestionTerm(selectedItem)))}))}},onSelectedItemChange:function handleSelectedItemChange(changes){const{selectedItem}=changes;selectedItem&&setCurrentlySelectedItem(determineSuggestionTerm(selectedItem))},selectedItem:currentlySelectedItem,onHighlightedIndexChange:function handleHighlightedIndexChange(changes){const{type}=changes;let{highlightedIndex}=changes;if(type===downshift_esm.Bp.stateChangeTypes.MenuMouseLeave)return;if(type===downshift_esm.Bp.stateChangeTypes.ItemMouseMove)return void(void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex));if(type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowUp&&type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownEnter||void 0!==highlightedIndex&&highlightedIndex>-1&&setHighlightedIndexAfterClick(highlightedIndex),highlightedIndex&&highlightedIndex<0)return void setIsAutosuggestOpen(!1);highlightedIndex||(highlightedIndex=0);const currentItemValue=determineSuggestionTerm(orderedData[highlightedIndex]);type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowDown&&type!==downshift_esm.Bp.stateChangeTypes.InputKeyDownArrowUp?setQ(currentItemValue):setQWithoutQuery(currentItemValue)}}),headerDropdownRef=react.useRef(null);(0,useClickAway.A)(headerDropdownRef,(()=>{setTimeout((()=>{setIsHeaderDropdownOpen(!1)}),100)}));const[redirectUrl,setRedirectUrl]=(0,react.useState)((0,helpers_url.zy)(searchUrl,q));return(0,react.useEffect)((()=>{'"'===q.trim().charAt(0)&&'"'===q.trim().charAt(q.length-1)&&'""'!==q.trim()&&'"'!==q.trim()?setRedirectUrl((0,helpers_url.x4)(advancedSearchUrl,q)):setRedirectUrl((0,helpers_url.zy)(searchUrl,q))}),[q,advancedSearchUrl,searchUrl]),react.createElement("div",{className:"header__menu-second"},react.createElement("div",{className:"header__menu-search"},react.createElement(search_bar.A,{q,getInputProps,getLabelProps,qWithoutQuery,setQWithoutQuery,isHeaderDropdownOpen,setIsHeaderDropdownOpen,redirectUrl}),react.createElement(Autosuggest,{textData,materialData,categoryData,status,getMenuProps,highlightedIndex,getItemProps,isOpen:isAutosuggestOpen,isLoading}),isHeaderDropdownOpen&&react.createElement(header_dropdown_HeaderDropdown,{redirectTo:helpers_url.SE,setIsHeaderDropdownOpen,headerDropdownRef,advancedSearchUrl})))};try{searchheader.displayName="searchheader",searchheader.__docgenInfo={description:"",displayName:"searchheader",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.tsx#searchheader"]={docgenInfo:searchheader.__docgenInfo,name:"searchheader",path:"src/apps/search-header/search-header.tsx#searchheader"})}catch(__react_docgen_typescript_loader_error){}const search_header_entry=(0,url.nU)((0,utils_text.i)((()=>react.createElement(search_header,null))));try{searchheaderentry.displayName="searchheaderentry",searchheaderentry.__docgenInfo={description:"",displayName:"searchheaderentry",props:{searchHeaderIconAltText:{defaultValue:null,description:"",name:"searchHeaderIconAltText",required:!1,type:{name:"string | undefined"}},searchHeaderInputLabelText:{defaultValue:null,description:"",name:"searchHeaderInputLabelText",required:!1,type:{name:"string | undefined"}},inputPlaceholderText:{defaultValue:null,description:"",name:"inputPlaceholderText",required:!1,type:{name:"string | undefined"}},stringSuggestionAuthorText:{defaultValue:null,description:"",name:"stringSuggestionAuthorText",required:!1,type:{name:"string | undefined"}},stringSuggestionWorkText:{defaultValue:null,description:"",name:"stringSuggestionWorkText",required:!1,type:{name:"string | undefined"}},stringSuggestionTopicText:{defaultValue:null,description:"",name:"stringSuggestionTopicText",required:!1,type:{name:"string | undefined"}},searchHeaderDropdownText:{defaultValue:null,description:"",name:"searchHeaderDropdownText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!1,type:{name:"string | undefined"}},autosuggestBookCategoryText:{defaultValue:null,description:"",name:"autosuggestBookCategoryText",required:!0,type:{name:"string"}},autosuggestEbookCategoryText:{defaultValue:null,description:"",name:"autosuggestEbookCategoryText",required:!0,type:{name:"string"}},autosuggestFilmCategoryText:{defaultValue:null,description:"",name:"autosuggestFilmCategoryText",required:!0,type:{name:"string"}},autosuggestAudioBookCategoryText:{defaultValue:null,description:"",name:"autosuggestAudioBookCategoryText",required:!0,type:{name:"string"}},autosuggestMusicCategoryText:{defaultValue:null,description:"",name:"autosuggestMusicCategoryText",required:!0,type:{name:"string"}},autosuggestGameCategoryText:{defaultValue:null,description:"",name:"autosuggestGameCategoryText",required:!0,type:{name:"string"}},autosuggestAnimatedSeriesCategoryText:{defaultValue:null,description:"",name:"autosuggestAnimatedSeriesCategoryText",required:!0,type:{name:"string"}},inText:{defaultValue:null,description:"",name:"inText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},searchNoValidCharactersErrorText:{defaultValue:null,description:"",name:"searchNoValidCharactersErrorText",required:!0,type:{name:"string"}},headerDropdownItemAdvancedSearchText:{defaultValue:null,description:"",name:"headerDropdownItemAdvancedSearchText",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},errorMessagesConfig:{defaultValue:null,description:"",name:"errorMessagesConfig",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-header/search-header.entry.tsx#searchheaderentry"]={docgenInfo:searchheaderentry.__docgenInfo,name:"searchheaderentry",path:"src/apps/search-header/search-header.entry.tsx#searchheaderentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const search_header_dev={title:"Apps / Header",component:search_header_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},searchHeaderIconAltText:{name:"Alt text for search button image",defaultValue:"search icon",control:{type:"text"}},searchHeaderInputLabelText:{name:"Search header input label",defaultValue:"The main search field.",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Search among the library's materials",control:{type:"text"}},stringSuggestionAuthorText:{name:"String suggestion spec - author",defaultValue:"author",control:{type:"text"}},stringSuggestionWorkText:{name:"String suggestion spec - work",defaultValue:"material",control:{type:"text"}},stringSuggestionTopicText:{name:"String suggestion spec - topic",defaultValue:"topic",control:{type:"text"}},searchUrl:{name:"Base search url",defaultValue:"/search",control:{type:"text"}},advancedSearchUrl:{name:"Advanced search url",defaultValue:"/advanced-search",control:{type:"text"}},searchHeaderDropdownText:{name:"Search header advanced search icon label",defaultValue:"Dropdown with additional search functions",control:{type:"text"}},materialUrl:{name:"Base material page url",defaultValue:"/work/:workid",control:{type:"text"}},autosuggestBookCategoryText:{name:"Book category",defaultValue:"Books",control:{type:"text"}},autosuggestEbookCategoryText:{name:"Ebook category",defaultValue:"E-books",control:{type:"text"}},autosuggestFilmCategoryText:{name:"Movie category",defaultValue:"Movies",control:{type:"text"}},autosuggestAudioBookCategoryText:{name:"Audio book category",defaultValue:"Audio books",control:{type:"text"}},autosuggestMusicCategoryText:{name:"Music category",defaultValue:"Music",control:{type:"text"}},autosuggestGameCategoryText:{name:"Game category",defaultValue:"Games",control:{type:"text"}},autosuggestAnimatedSeriesCategoryText:{name:"Animated series category",defaultValue:"Animated series",control:{type:"text"}},inText:{name:"x 'in' y",defaultValue:"in",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},searchNoValidCharactersErrorText:{name:"Search non-whitespace character error",defaultValue:"Input must contain at least one non-whitespace character.",control:{type:"text"}},headerDropdownItemAdvancedSearchText:{name:"Advanced search menu text",defaultValue:"Advanced search",control:{type:"text"}}}},Search=args=>react.createElement(story_header_dev_inc.A,{search:react.createElement(search_header_entry,args)})},"./src/apps/search-result/search-result-zero-hits.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({dataCy="search-result-zero-hits"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"card-list-page","data-cy":dataCy},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h1",{className:"text-header-h2 search-result-title my-112","data-cy":"search-result-zero-hits"},t("noSearchResultText")))};try{searchresultzerohits.displayName="searchresultzerohits",searchresultzerohits.__docgenInfo={description:"",displayName:"searchresultzerohits",props:{dataCy:{defaultValue:{value:"search-result-zero-hits"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"]={docgenInfo:searchresultzerohits.__docgenInfo,name:"searchresultzerohits",path:"src/apps/search-result/search-result-zero-hits.tsx#searchresultzerohits"})}catch(__react_docgen_typescript_loader_error){}},"./src/apps/search-result/search-result.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SearchResult:()=>search_result_dev_SearchResult,default:()=>search_result_dev});var react=__webpack_require__("./node_modules/react/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),guarded_app=__webpack_require__("./src/components/guarded-app.tsx"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const SearchResultHeader=({hitcount,q})=>{const t=(0,utils_text.F)(),classes=(0,clsx.A)(["text-header-h2","mb-16","search-result-title"]);return react.createElement("h1",{className:classes,"data-cy":"search-result-header","aria-live":"polite"},`${t("showingResultsForText",{placeholders:{"@query":q}})} (${hitcount})`)},search_result_header_SearchResultHeader=(0,react.memo)(SearchResultHeader);try{SearchResultHeader.displayName="SearchResultHeader",SearchResultHeader.__docgenInfo={description:"",displayName:"SearchResultHeader",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"]={docgenInfo:SearchResultHeader.__docgenInfo,name:"SearchResultHeader",path:"src/components/search-bar/search-result-header/SearchResultHeader.tsx#SearchResultHeader"})}catch(__react_docgen_typescript_loader_error){}var use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),SearchResultList=__webpack_require__("./src/components/card-item-list/SearchResultList.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),mapValues=__webpack_require__("./node_modules/lodash/mapValues.js"),mapValues_default=__webpack_require__.n(mapValues),branches=__webpack_require__("./src/core/utils/branches.tsx"),invalid_switch_case=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts");const allFacetFields=[graphql.SW.WorkTypes,graphql.SW.Creators,graphql.SW.Subjects,graphql.SW.FictionNonfiction,graphql.SW.ChildrenOrAdults,graphql.SW.AccessTypes,graphql.SW.MainLanguages,graphql.SW.GenreAndForm,graphql.SW.MaterialTypesSpecific,graphql.SW.FictionalCharacters],createFilters=(facets,branchIdList)=>{return{...(filters=facets,Object.keys(filters).reduce(((acc,key)=>({...acc,[key]:Object.keys(filters[key])})),{})),...branchIdList?{branchId:branchIdList}:{}};var filters};function useGetFacets(query,filters){const cleanBranches=(0,branches.Ay)(),{data,isLoading}=(0,graphql.V0)({q:{all:query},facets:allFacetFields,facetLimit:10,filters:createFilters(filters,cleanBranches)},{keepPreviousData:!0,placeholderData:{search:{facets:(facets=allFacetFields,facets.map((facet=>({name:facet,values:[{key:"",term:""}]}))))}}});var facets;return{facets:(null==data?void 0:data.search.facets)||null,isLoading}}function getAllFilterPathsAsString(filterObject){const mappedFilterValues=mapValues_default()(filterObject,(filter=>Object.keys(filter))),filterNames=Object.keys(mappedFilterValues);let allFilterPathsAsString="";return filterNames.forEach((filterName=>{mappedFilterValues[filterName].forEach((filterValue=>{""!==allFilterPathsAsString&&(allFilterPathsAsString=allFilterPathsAsString.concat(";")),allFilterPathsAsString=allFilterPathsAsString.concat(`facet.${filterName}:${filterValue}`)}))})),allFilterPathsAsString}var useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),dpl_cms=__webpack_require__("./src/core/dpl-cms/dpl-cms.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const CampaignBody=({campaignData})=>react.createElement("section",{className:"campaign mt-35","data-cy":"campaign-body"},campaignData.image&&campaignData.image.url&&react.createElement("img",{"data-cy":"campaign-image",className:"campaign__image "+(campaignData.text?"":"campaign__image--full-width"),src:campaignData.image.url,alt:campaignData.image.alt}),campaignData.text&&react.createElement("h4",{className:"campaign__title campaign__title--ellipsis"},campaignData.text)),campaign_CampaignBody=CampaignBody;try{CampaignBody.displayName="CampaignBody",CampaignBody.__docgenInfo={description:"",displayName:"CampaignBody",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/CampaignBody.tsx#CampaignBody"]={docgenInfo:CampaignBody.__docgenInfo,name:"CampaignBody",path:"src/components/campaign/CampaignBody.tsx#CampaignBody"})}catch(__react_docgen_typescript_loader_error){}const Campaign=({campaignData})=>{const{track}=(0,useStatistics.B)();if(!campaignData.title)return null;const trackClick=()=>track("click",{id:statistics.o.campaignClick.id,name:statistics.o.campaignClick.name,trackedData:campaignData.title});return campaignData.url?react.createElement(LinkNoStyle.A,{url:new URL(campaignData.url),trackClick,className:"cursor-pointer"},react.createElement(campaign_CampaignBody,{campaignData})):react.createElement(campaign_CampaignBody,{campaignData})},campaign_Campaign=Campaign;try{Campaign.displayName="Campaign",Campaign.__docgenInfo={description:"",displayName:"Campaign",props:{campaignData:{defaultValue:null,description:"",name:"campaignData",required:!0,type:{name:"CampaignMatchPOST200Data"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/campaign/Campaign.tsx#Campaign"]={docgenInfo:Campaign.__docgenInfo,name:"Campaign",path:"src/components/campaign/Campaign.tsx#Campaign"})}catch(__react_docgen_typescript_loader_error){}var useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx"),upperFirst=__webpack_require__("./node_modules/lodash/upperFirst.js"),upperFirst_default=__webpack_require__.n(upperFirst),isEmpty=__webpack_require__("./node_modules/lodash/isEmpty.js"),isEmpty_default=__webpack_require__.n(isEmpty),Button=__webpack_require__("./src/components/Buttons/Button.tsx"),icon_cross=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"),icon_cross_default=__webpack_require__.n(icon_cross);const ButtonTag=react.forwardRef((({onClick,selected,children,size,removable=!1,dataCy},ref)=>{const className=(0,clsx.A)("tag",selected&&"tag--fill",size&&`tag--${size}`,"cursor-pointer");return react.createElement("button",{ref,type:"button","aria-pressed":selected,className,onClick,"data-cy":dataCy},children,removable&&react.createElement("img",{className:"tag-icon",src:icon_cross_default(),alt:""}))})),Buttons_ButtonTag=ButtonTag;try{ButtonTag.displayName="ButtonTag",ButtonTag.__docgenInfo={description:"",displayName:"ButtonTag",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"MouseEventHandler"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"large"'}]}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},removable:{defaultValue:{value:"false"},description:"",name:"removable",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonTag.tsx#ButtonTag"]={docgenInfo:ButtonTag.__docgenInfo,name:"ButtonTag",path:"src/components/Buttons/ButtonTag.tsx#ButtonTag"})}catch(__react_docgen_typescript_loader_error){}var DisclosureControllable=__webpack_require__("./src/components/Disclosures/DisclosureControllable.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx");const FacetBrowserModalBody=({facets})=>{const{filters,addToFilter,removeFromFilter}=(0,useFilterHandler.A)(),t=(0,utils_text.F)(),{close}=(0,modal.X)(),{track}=(0,useStatistics.B)();return(0,useDeepCompareEffect.A)((()=>{isEmpty_default()(filters)||track("click",{id:statistics.o.searchFacets.id,name:statistics.o.searchFacets.name,trackedData:getAllFilterPathsAsString(filters)})}),[filters]),react.createElement("section",{className:"facet-browser"},react.createElement("header",{className:"facet-browser__header"},react.createElement("h2",{className:"text-header-h3"},t("filterListText"))),facets.map((facet=>{const{name,values}=facet;if(0===values.length)return null;const hasSelectedTerms=Boolean(filters[name]);return react.createElement(DisclosureControllable.A,{key:name,cyData:`facet-browser-${name}`,id:name,showContent:hasSelectedTerms,className:"disclosure--full-width",summary:react.createElement(DisclosureSummary.A,{title:t(`facet${upperFirst_default()(name)}Text`),className:"disclosure__headline--no-padding"})},react.createElement("ul",{className:"facet-browser__facet-group"},values.map((termItem=>{const{term}=termItem,selected=Boolean(filters[name]&&filters[name][term]);if(!termItem.term)return null;return react.createElement("li",null,react.createElement(Buttons_ButtonTag,{key:term,onClick:e=>(e.stopPropagation(),selected?removeFromFilter({facet:name,term:termItem}):addToFilter({facet:name,term:termItem})),selected,dataCy:`facet-browser-${name}-${term}`},termItem.term," ",(null==termItem?void 0:termItem.score)&&`(${termItem.score})`))}))))})),react.createElement(Button.$,{classNames:"facet-browser__results-btn",label:t("showResultsText"),buttonType:"none",disabled:!1,collapsible:!1,size:"medium",variant:"filled",onClick:()=>{close("facet-browser-modal")}}))},facet_browser_FacetBrowserModalBody=FacetBrowserModalBody;try{FacetBrowserModalBody.displayName="FacetBrowserModalBody",FacetBrowserModalBody.__docgenInfo={description:"",displayName:"FacetBrowserModalBody",props:{facets:{defaultValue:null,description:"",name:"facets",required:!0,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"]={docgenInfo:FacetBrowserModalBody.__docgenInfo,name:"FacetBrowserModalBody",path:"src/components/facet-browser/FacetBrowserModalBody.tsx#FacetBrowserModalBody"})}catch(__react_docgen_typescript_loader_error){}const FacetBrowserModal=({q})=>{const t=(0,utils_text.F)(),{filters}=(0,useFilterHandler.A)(),{facets,isLoading}=useGetFacets(q,filters);return react.createElement(modal.A,{classNames:"modal-right modal--no-padding",modalId:"facet-browser-modal",screenReaderModalDescriptionText:t("facetBrowserModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("facetBrowserModalCloseModalAriaLabelText"),isSlider:!0},isLoading||!facets?null:react.createElement(facet_browser_FacetBrowserModalBody,{facets}))},facet_browser_FacetBrowserModal=FacetBrowserModal;try{FacetBrowserModal.displayName="FacetBrowserModal",FacetBrowserModal.__docgenInfo={description:"",displayName:"FacetBrowserModal",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"]={docgenInfo:FacetBrowserModal.__docgenInfo,name:"FacetBrowserModal",path:"src/components/facet-browser/FacetBrowserModal.tsx#FacetBrowserModal"})}catch(__react_docgen_typescript_loader_error){}const facet_line_FacetLineSelected=()=>{const{filters,removeFromFilter}=(0,useFilterHandler.A)(),buttonsRef=(0,react.useRef)({}),t=(0,utils_text.F)();return(0,react.useEffect)((()=>{const lastFacet=Object.keys(filters).slice(-1)[0];if(lastFacet){var _buttonsRef$current;const lastTerm=Object.keys(filters[lastFacet]).slice(-1)[0];null===(_buttonsRef$current=buttonsRef.current[`${lastFacet}-${lastTerm}`])||void 0===_buttonsRef$current||_buttonsRef$current.focus()}}),[filters]),react.createElement("section",null,react.createElement("h2",{className:"hide-visually"},t("intelligentFiltersSelectedAccessibleHeadlineText")),react.createElement("ul",{className:"facet-line-selected-terms"},Object.entries(filters).map((([facet,value])=>react.createElement(react.Fragment,{key:facet},Object.entries(value).map((([label,term])=>react.createElement("li",{key:`${facet}-${label}`,className:"facet-line-selected-terms__item"},react.createElement(Buttons_ButtonTag,{ref:el=>{buttonsRef.current[`${facet}-${label}`]=el},selected:!0,removable:!0,onClick:()=>removeFromFilter({facet,term}),dataCy:`facet-line-selected-term-${label}`},label)))))))))};var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx");const FacetLineFilters=({facets=[]})=>{const t=(0,utils_text.F)(),{open}=(0,modal.X)(),{filters,addToFilter}=(0,useFilterHandler.A)(),facetMap=(facets=>facets.reduce(((acc,facet)=>{const newAcc={...acc};return facet.values.forEach((value=>{const combinedKey=`${facet.name}:${value.key}`;newAcc[combinedKey]=value})),newAcc}),{}))(facets),formatValuesToDropdown=(facet,values)=>values.map((value=>({label:value.term,value:value.key})));return react.createElement("section",null,react.createElement("h2",{className:"hide-visually"},t("intelligentFiltersAccessibleHeadlineText")),react.createElement("ul",{className:"facet-line mt-48"},facets.map((({name,values})=>{if(values.length>1){const translatedName=(name=>{switch(name){case graphql.SW.AccessTypes:return"facetAccessTypesText";case graphql.SW.CanAlwaysBeLoaned:return"facetCanAlwaysBeLoanedText";case graphql.SW.ChildrenOrAdults:return"facetChildrenOrAdultsText";case graphql.SW.Creators:return"facetCreatorsText";case graphql.SW.Dk5:return"facetDk5Text";case graphql.SW.FictionNonfiction:return"facetFictionNonfictionText";case graphql.SW.FictionalCharacters:return"facetFictionalCharactersText";case graphql.SW.GenreAndForm:return"facetGenreAndFormText";case graphql.SW.MainLanguages:return"facetMainLanguagesText";case graphql.SW.MaterialTypesGeneral:return"facetMaterialTypesGeneralText";case graphql.SW.MaterialTypesSpecific:return"facetMaterialTypesSpecificText";case graphql.SW.Subjects:return"facetSubjectsText";case graphql.SW.WorkTypes:return"facetWorkTypesText";case graphql.SW.Year:return"facetYearText";default:return(0,invalid_switch_case.A)(name)}})(name);return react.createElement("li",{className:"facet-line__item"},react.createElement(Dropdown.A,{cyData:`facet-line-${name}-dropdown`,placeholder:{label:t(translatedName),value:""},options:formatValuesToDropdown(0,values),ariaLabel:t(translatedName),arrowIcon:"chevron",classNames:"dropdown--grey-borders",innerClassNames:{select:"dropdown__select--inline",arrowWrapper:"dropdown__arrows--inline "},handleOnChange:e=>((e,facet)=>{const term=((facetName,termName,facetMap)=>facetMap[`${facetName}:${termName}`])(facet,e.target.value,facetMap);term&&addToFilter({facet,term})})(e,name)}))}return react.createElement(react.Fragment,null,values.map((termObj=>{var _filters$name;const{term,score}=termObj;return null!=filters&&null!==(_filters$name=filters[name])&&void 0!==_filters$name&&_filters$name[term]?null:react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{key:term,onClick:()=>addToFilter({facet:name,term:termObj}),selected:!1,dataCy:`facet-line-term-${term}`},`${term} (${score})`))})))})),react.createElement("li",{className:"facet-line__item"},react.createElement(Buttons_ButtonTag,{onClick:()=>open("facet-browser-modal"),dataCy:"facet-line-open-browser"},t("addMoreFiltersText")))))},facet_line_FacetLineFilters=(0,react.memo)(FacetLineFilters);try{FacetLineFilters.displayName="FacetLineFilters",FacetLineFilters.__docgenInfo={description:"",displayName:"FacetLineFilters",props:{facets:{defaultValue:{value:"[]"},description:"",name:"facets",required:!1,type:{name:"FacetResult[]"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"]={docgenInfo:FacetLineFilters.__docgenInfo,name:"FacetLineFilters",path:"src/components/facet-line/FacetLineFilters.tsx#FacetLineFilters"})}catch(__react_docgen_typescript_loader_error){}const FacetLineFiltersSkeleton=()=>react.createElement(react.Fragment,null,react.createElement("div",{className:"card-list-page__skeleton-facet-line--mobile"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}),react.createElement("div",{className:"ssc-head-line mb"}))),react.createElement("div",{className:"card-list-page__skeleton-facet-line--desktop"},react.createElement("div",{className:"ssc mt-48"},react.createElement("div",{className:"ssc-head-line mb"})))),facet_line_FacetLineFiltersSkeleton=FacetLineFiltersSkeleton;try{FacetLineFiltersSkeleton.displayName="FacetLineFiltersSkeleton",FacetLineFiltersSkeleton.__docgenInfo={description:"",displayName:"FacetLineFiltersSkeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"]={docgenInfo:FacetLineFiltersSkeleton.__docgenInfo,name:"FacetLineFiltersSkeleton",path:"src/components/facet-line/FacetLineFiltersSkeleton.tsx#FacetLineFiltersSkeleton"})}catch(__react_docgen_typescript_loader_error){}const FacetLine=({q})=>{const{filters}=(0,useFilterHandler.A)(),cleanBranches=(0,branches.Ay)(),{data,isLoading}=(0,graphql.vQ)({q:{all:q},facetsLimit:6,valuesLimit:5,filters:createFilters(filters,cleanBranches)});return react.createElement(react.Fragment,null,isLoading&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),data&&react.createElement(facet_line_FacetLineFilters,{facets:data.search.intelligentFacets}),react.createElement(facet_line_FacetLineSelected,null))},facet_line_FacetLine=(0,react.memo)(FacetLine);try{FacetLine.displayName="FacetLine",FacetLine.__docgenInfo={description:"",displayName:"FacetLine",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/facet-line/FacetLine.tsx#FacetLine"]={docgenInfo:FacetLine.__docgenInfo,name:"FacetLine",path:"src/components/facet-line/FacetLine.tsx#FacetLine"})}catch(__react_docgen_typescript_loader_error){}var helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),card_list_item_skeleton=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx");const search_result_skeleton=({q,hideFacetLine=!1})=>{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement("h1",{className:"text-header-h2 mb-16 search-result-title text-loading"},!hideFacetLine&&t("showingResultsForText",{placeholders:{"@query":q}}),hideFacetLine&&t("showingResultsForWithoutQueryText")),!hideFacetLine&&react.createElement(facet_line_FacetLineFiltersSkeleton,null),react.createElement("ul",{className:"card-list-page__list my-32"},[...Array(5)].map((()=>react.createElement("li",null,react.createElement(card_list_item_skeleton.A,null))))))};try{searchresultskeleton.displayName="searchresultskeleton",searchresultskeleton.__docgenInfo={description:"",displayName:"searchresultskeleton",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},hideFacetLine:{defaultValue:{value:"false"},description:"",name:"hideFacetLine",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"]={docgenInfo:searchresultskeleton.__docgenInfo,name:"searchresultskeleton",path:"src/apps/search-result/search-result-skeleton.tsx#searchresultskeleton"})}catch(__react_docgen_typescript_loader_error){}var search_result_zero_hits=__webpack_require__("./src/apps/search-result/search-result-zero-hits.tsx");const search_result_not_valid_search=({dataCy="search-result-not-valid-search"})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"card-list-page","data-cy":dataCy},react.createElement("h1",{className:"text-header-h2 search-result-title my-112","data-cy":"search-result-zero-hits"},t("invalidSearchText")),react.createElement("p",{className:"text-body-medium-regular"},t("invalidSearchDescriptionText")))};try{searchresultnotvalidsearch.displayName="searchresultnotvalidsearch",searchresultnotvalidsearch.__docgenInfo={description:"",displayName:"searchresultnotvalidsearch",props:{dataCy:{defaultValue:{value:"search-result-not-valid-search"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result-not-valid-search.tsx#searchresultnotvalidsearch"]={docgenInfo:searchresultnotvalidsearch.__docgenInfo,name:"searchresultnotvalidsearch",path:"src/apps/search-result/search-result-not-valid-search.tsx#searchresultnotvalidsearch"})}catch(__react_docgen_typescript_loader_error){}const search_result=({q,pageSize})=>{const{filters,clearFilter,addFilterFromUrlParamListener}=(0,useFilterHandler.A)(),cleanBranches=(0,branches.Ay)(),[resultItems,setResultItems]=(0,react.useState)(null),[hitcount,setHitCount]=(0,react.useState)(0),[canWeTrackHitcount,setCanWeTrackHitcount]=(0,react.useState)(!1),{PagerComponent,page}=(0,use_pager.A)({hitcount,pageSize}),{mutate}=(0,dpl_cms.Fg)(),[campaignData,setCampaignData]=(0,react.useState)(null),{facets:campaignFacets}=useGetFacets(q,filters);(0,useDeepCompareEffect.A)((()=>{setResultItems([])}),[q,pageSize,filters]);const{track}=(0,useStatistics.B)();(0,react.useEffect)((()=>{track("click",{id:statistics.o.searchQuery.id,name:statistics.o.searchQuery.name,trackedData:q})}),[q]),(0,useDeepCompareEffect.A)((()=>{campaignFacets&&mutate({data:campaignFacets,params:{_format:"json"}},{onSuccess:campaign=>{setCampaignData(campaign)}})}),[campaignFacets,mutate]),(0,react.useEffect)((()=>{addFilterFromUrlParamListener(graphql.SW.MaterialTypesSpecific),addFilterFromUrlParamListener(graphql.SW.WorkTypes)}),[addFilterFromUrlParamListener]);const{data,isLoading}=(0,graphql.KG)({q:{all:q},offset:page*pageSize,limit:pageSize,filters:createFilters(filters,cleanBranches)},{enabled:q.length>=3});if((0,react.useEffect)((()=>{if(!data)return;const{search:{works:resultWorks,hitcount:resultCount}}=data;setHitCount(resultCount),setResultItems(page>0?prev=>null===prev?[...resultWorks]:[...prev,...resultWorks]:resultWorks)}),[data,page]),(0,react.useEffect)((()=>{canWeTrackHitcount?track("click",{id:statistics.o.searchResultCount.id,name:statistics.o.searchResultCount.name,trackedData:hitcount?hitcount.toString():"0"}):setCanWeTrackHitcount(!0)}),[hitcount]),(0,react.useEffect)((()=>{var _campaignData$data;null!=campaignData&&null!==(_campaignData$data=campaignData.data)&&void 0!==_campaignData$data&&_campaignData$data.title&&track("click",{id:statistics.o.campaignShown.id,name:statistics.o.campaignShown.name,trackedData:campaignData.data.title})}),[campaignData]),(0,react.useEffect)((()=>{"usePersistedFilters"!==(0,helpers_url.d6)("filters")&&clearFilter()}),[clearFilter]),!q||q.length<3)return react.createElement(search_result_not_valid_search,null);const shouldShowZeroHits=()=>!isLoading&&0===hitcount;return react.createElement("div",{className:"card-list-page"},isLoading&&react.createElement(search_result_skeleton,{q}),shouldShowZeroHits()&&react.createElement(search_result_zero_hits.A,null),!isLoading&&!shouldShowZeroHits()&&resultItems&&react.createElement(react.Fragment,null,react.createElement(search_result_header_SearchResultHeader,{hitcount,q}),react.createElement(facet_line_FacetLine,{q}),campaignData&&campaignData.data&&react.createElement(campaign_Campaign,{campaignData:campaignData.data}),react.createElement(SearchResultList.A,{resultItems,page,pageSize}),react.createElement(PagerComponent,{isLoading})),null!==resultItems&&react.createElement(facet_browser_FacetBrowserModal,{q}))};try{searchresult.displayName="searchresult",searchresult.__docgenInfo={description:"",displayName:"searchresult",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.tsx#searchresult"]={docgenInfo:searchresult.__docgenInfo,name:"searchresult",path:"src/apps/search-result/search-result.tsx#searchresult"})}catch(__react_docgen_typescript_loader_error){}const search_result_entry=(0,config.NV)((0,url.nU)((0,utils_text.i)((({q,pageSizeDesktop,pageSizeMobile})=>{const{q:searchQuery}=(0,general.tI)({q}),pageSize=(0,general.Ki)({desktop:pageSizeDesktop,mobile:pageSizeMobile});return react.createElement("div",null,(searchQuery||""===searchQuery)&&react.createElement(guarded_app.A,{app:"search-result"},react.createElement(search_result,{q:searchQuery,pageSize})))}))));try{searchresultentry.displayName="searchresultentry",searchresultentry.__docgenInfo={description:"",displayName:"searchresultentry",props:{q:{defaultValue:null,description:"",name:"q",required:!1,type:{name:"string | undefined"}},pageSizeDesktop:{defaultValue:null,description:"",name:"pageSizeDesktop",required:!1,type:{name:"number | undefined"}},pageSizeMobile:{defaultValue:null,description:"",name:"pageSizeMobile",required:!1,type:{name:"number | undefined"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},searchUrl:{defaultValue:null,description:"",name:"searchUrl",required:!0,type:{name:"string"}},advancedSearchUrl:{defaultValue:null,description:"",name:"advancedSearchUrl",required:!0,type:{name:"string"}},fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},loanListEreolenUrl:{defaultValue:null,description:"",name:"loanListEreolenUrl",required:!0,type:{name:"string"}},feesPageUrl:{defaultValue:null,description:"",name:"feesPageUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},fbiLocalBaseUrl:{defaultValue:null,description:"",name:"fbiLocalBaseUrl",required:!0,type:{name:"string"}},fbiGlobalBaseUrl:{defaultValue:null,description:"",name:"fbiGlobalBaseUrl",required:!0,type:{name:"string"}},authUrl:{defaultValue:null,description:"",name:"authUrl",required:!0,type:{name:"string"}},ereolenHomepageUrl:{defaultValue:null,description:"",name:"ereolenHomepageUrl",required:!0,type:{name:"string"}},blacklistedAvailabilityBranchesConfig:{defaultValue:null,description:"",name:"blacklistedAvailabilityBranchesConfig",required:!0,type:{name:"string"}},blacklistedPickupBranchesConfig:{defaultValue:null,description:"",name:"blacklistedPickupBranchesConfig",required:!1,type:{name:"string | undefined"}},blacklistedSearchBranchesConfig:{defaultValue:null,description:"",name:"blacklistedSearchBranchesConfig",required:!1,type:{name:"string | undefined"}},branchesConfig:{defaultValue:null,description:"",name:"branchesConfig",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}},addMoreFiltersText:{defaultValue:null,description:"",name:"addMoreFiltersText",required:!0,type:{name:"string"}},byAuthorText:{defaultValue:null,description:"",name:"byAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},facetAccessTypesText:{defaultValue:null,description:"",name:"facetAccessTypesText",required:!0,type:{name:"string"}},facetBrowserModalCloseModalAriaLabelText:{defaultValue:null,description:"",name:"facetBrowserModalCloseModalAriaLabelText",required:!0,type:{name:"string"}},facetBrowserModalScreenReaderModalDescriptionText:{defaultValue:null,description:"",name:"facetBrowserModalScreenReaderModalDescriptionText",required:!0,type:{name:"string"}},facetCanAlwaysBeLoanedText:{defaultValue:null,description:"",name:"facetCanAlwaysBeLoanedText",required:!0,type:{name:"string"}},facetChildrenOrAdultsText:{defaultValue:null,description:"",name:"facetChildrenOrAdultsText",required:!0,type:{name:"string"}},facetCreatorsText:{defaultValue:null,description:"",name:"facetCreatorsText",required:!0,type:{name:"string"}},facetDk5Text:{defaultValue:null,description:"",name:"facetDk5Text",required:!0,type:{name:"string"}},facetFictionalCharactersText:{defaultValue:null,description:"",name:"facetFictionalCharactersText",required:!0,type:{name:"string"}},facetFictionNonfictionText:{defaultValue:null,description:"",name:"facetFictionNonfictionText",required:!0,type:{name:"string"}},facetGenreAndFormText:{defaultValue:null,description:"",name:"facetGenreAndFormText",required:!0,type:{name:"string"}},facetMainLanguagesText:{defaultValue:null,description:"",name:"facetMainLanguagesText",required:!0,type:{name:"string"}},facetMaterialTypesText:{defaultValue:null,description:"",name:"facetMaterialTypesText",required:!0,type:{name:"string"}},facetMaterialTypesGeneralText:{defaultValue:null,description:"",name:"facetMaterialTypesGeneralText",required:!0,type:{name:"string"}},facetMaterialTypesSpecificText:{defaultValue:null,description:"",name:"facetMaterialTypesSpecificText",required:!0,type:{name:"string"}},facetSubjectsText:{defaultValue:null,description:"",name:"facetSubjectsText",required:!0,type:{name:"string"}},facetWorkTypesText:{defaultValue:null,description:"",name:"facetWorkTypesText",required:!0,type:{name:"string"}},facetYearText:{defaultValue:null,description:"",name:"facetYearText",required:!0,type:{name:"string"}},filterListText:{defaultValue:null,description:"",name:"filterListText",required:!0,type:{name:"string"}},inSeriesText:{defaultValue:null,description:"",name:"inSeriesText",required:!0,type:{name:"string"}},loadingText:{defaultValue:null,description:"",name:"loadingText",required:!0,type:{name:"string"}},numberDescriptionText:{defaultValue:null,description:"",name:"numberDescriptionText",required:!0,type:{name:"string"}},resultPagerStatusText:{defaultValue:null,description:"",name:"resultPagerStatusText",required:!0,type:{name:"string"}},showingResultsForText:{defaultValue:null,description:"",name:"showingResultsForText",required:!0,type:{name:"string"}},noSearchResultText:{defaultValue:null,description:"",name:"noSearchResultText",required:!0,type:{name:"string"}},showMoreText:{defaultValue:null,description:"",name:"showMoreText",required:!0,type:{name:"string"}},showResultsText:{defaultValue:null,description:"",name:"showResultsText",required:!0,type:{name:"string"}},invalidSearchText:{defaultValue:null,description:"",name:"invalidSearchText",required:!0,type:{name:"string"}},invalidSearchDescriptionText:{defaultValue:null,description:"",name:"invalidSearchDescriptionText",required:!0,type:{name:"string"}},intelligentFiltersAccessibleHeadlineText:{defaultValue:null,description:"",name:"intelligentFiltersAccessibleHeadlineText",required:!0,type:{name:"string"}},intelligentFiltersSelectedAccessibleHeadlineText:{defaultValue:null,description:"",name:"intelligentFiltersSelectedAccessibleHeadlineText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/search-result/search-result.entry.tsx#searchresultentry"]={docgenInfo:searchresultentry.__docgenInfo,name:"searchresultentry",path:"src/apps/search-result/search-result.entry.tsx#searchresultentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const search_result_dev={title:"Apps / Search Result",component:search_result_entry,argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,q:{name:"Search string",defaultValue:"harry",control:{type:"text"}},pageSizeDesktop:{name:"Number of search result items on desktop",defaultValue:50,control:{type:"number"}},pageSizeMobile:{name:"Number of search result items on mobile",defaultValue:20,control:{type:"number"}},authUrl:{name:"Url where user can authenticate",defaultValue:"",control:{type:"text"}},searchUrl:{name:"Path to the search result page",defaultValue:"/search",control:{type:"text"}},materialUrl:{name:"Path to the material page",defaultValue:"/work/:workid",control:{type:"text"}},etAlText:{name:"Et al. Text",defaultValue:"et al.",control:{type:"text"}},byAuthorText:{name:"By (author) Text",defaultValue:"By",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},numberDescriptionText:{name:"Number description",defaultValue:"Nr.",control:{type:"text"}},inSeriesText:{name:"In series",defaultValue:"in series",control:{type:"text"}},showingResultsForText:{name:"Showing results for",defaultValue:"Showing results for “@query”",control:{type:"text"}},noSearchResultText:{name:"0-hit search result",defaultValue:"Your search has 0 results",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted Pickup branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},facetBrowserModalScreenReaderModalDescriptionText:{name:"facet browser screen reader modal description text",defaultValue:"Modal for facet browser",control:{type:"text"}},facetBrowserModalCloseModalAriaLabelText:{name:"facet browser close modal aria label text",defaultValue:"Close facet browser modal",control:{type:"text"}},facetAccessTypesText:{name:"Access types text",defaultValue:"Access types",control:{type:"text"}},facetCanAlwaysBeLoanedText:{name:"Can always be loaned text",defaultValue:"Can always be loaned",control:{type:"text"}},facetChildrenOrAdultsText:{name:"Children or adults text",defaultValue:"Children or adults",control:{type:"text"}},facetCreatorsText:{name:"Creators text",defaultValue:"Creators",control:{type:"text"}},facetDk5Text:{name:"Dk5 text",defaultValue:"Dk5",control:{type:"text"}},facetFictionalCharactersText:{name:"Fictional characters text",defaultValue:"Fictional characters",control:{type:"text"}},facetFictionNonfictionText:{name:"Fiction or nonfiction text",defaultValue:"Fiction or nonfiction",control:{type:"text"}},facetGenreAndFormText:{name:"Genre and form text",defaultValue:"Genre and form",control:{type:"text"}},facetMainLanguagesText:{name:"Main languages text",defaultValue:"Main languages",control:{type:"text"}},facetMaterialTypesText:{name:"Material types text",defaultValue:"Material types",control:{type:"text"}},facetMaterialTypesGeneralText:{name:"Material types general text",defaultValue:"Material types general",control:{type:"text"}},facetMaterialTypesSpecificText:{name:"Material types specific text",defaultValue:"Material types specific",control:{type:"text"}},facetSubjectsText:{name:"Subjects text",defaultValue:"Subjects",control:{type:"text"}},facetWorkTypesText:{name:"Work types text",defaultValue:"Work types",control:{type:"text"}},facetYearText:{name:"Year text",defaultValue:"Year",control:{type:"text"}},showResultsText:{name:"Show results text",defaultValue:"Show results",control:{type:"text"}},filterListText:{name:"Filter list text",defaultValue:"Filter list",control:{type:"text"}},addMoreFiltersText:{name:"Add more filters text",defaultValue:"+ more filters",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading",control:{type:"text"}},invalidSearchText:{name:"Invalid search headline",defaultValue:"Invalid search",control:{type:"text"}},invalidSearchDescriptionText:{name:"Invalid search description",defaultValue:"Your search is invalid. Please try again. In order to perform a valid search, you need to include at least three letters.",control:{type:"text"}},intelligentFiltersAccessibleHeadlineText:{name:"Intelligent filters accessible headline",defaultValue:"Available filters",control:{type:"text"}},intelligentFiltersSelectedAccessibleHeadlineText:{name:"Intelligent filters - selected - accessible headline",defaultValue:"Selected filters",control:{type:"text"}}}},search_result_dev_SearchResult=args=>react.createElement(search_result_entry,args)},"./src/apps/search-result/useFilterHandler.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/filter.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/url.ts");const __WEBPACK_DEFAULT_EXPORT__=()=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),filters=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)((state=>state.filter)),clearFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.MR)("filters"),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.IU)())}),[dispatch]),addToFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>{"usePersistedFilters"!==(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.d6)("filters")&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.$u)({filters:"usePersistedFilters"}),dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.WQ)(payload))}),[dispatch]),removeFromFilter=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((payload=>dispatch((0,_core_filter_slice__WEBPACK_IMPORTED_MODULE_2__.TF)(payload))),[dispatch]);return{filters,addToFilter,removeFromFilter,clearFilter,addFilterFromUrlParamListener:facet=>{const urlFilter=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_3__.d6)(facet);urlFilter&&addToFilter({facet,term:{key:"key",term:urlFilter}})}}}},"./src/apps/something-similar/SomethingSimilar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SomethingSimilarEntry:()=>SomethingSimilar_dev_SomethingSimilarEntry,default:()=>SomethingSimilar_dev});var react=__webpack_require__("./node_modules/react/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-queryparams/dist/esm/index.js"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),material_fetch_hoc=__webpack_require__("./src/apps/loan-list/materials/utils/material-fetch-hoc.tsx"),SimpleMaterial=__webpack_require__("./src/components/simple-material/SimpleMaterial.tsx"),url=__webpack_require__("./src/core/utils/helpers/url.ts");const SomethingSimilarList=({id,material})=>{const t=(0,utils_text.F)(),{somethingSimilarAuthor:somethingSimilarAuthorLimit,somethingSimilar:somethingSimilarLimit}=(0,general.fL)(),[somethingSimilar,setSomethingSimilar]=(0,react.useState)(null),[authorMaterials,setAuthorMaterials]=(0,react.useState)(null),[recommendView,setRecommendView]=(0,react.useState)("similar"),{data:somethingSimilarData}=(0,graphql.Nr)({faust:id,limit:somethingSimilarLimit}),setViewHandler=(0,react.useCallback)((inputView=>{(0,url.$u)({"recommender-view":inputView}),setRecommendView(inputView)}),[setRecommendView]),{data:byAuthorData}=(0,graphql.KG)({limit:somethingSimilarAuthorLimit,q:{all:null==material?void 0:material.firstAuthor},offset:0});return(0,react.useEffect)((()=>{somethingSimilarData&&setSomethingSimilar(somethingSimilarData.recommend.result.map((({work})=>work)))}),[somethingSimilarData]),(0,react.useEffect)((()=>{byAuthorData&&setAuthorMaterials(byAuthorData.search.works)}),[byAuthorData]),react.createElement(react.Fragment,null,react.createElement("h2",{className:"recommender__left-title text-header-h1"},t("somethingSimilarTitleText")),react.createElement("div",{className:"recommender__buttons"},react.createElement("button",{type:"button",onClick:()=>setRecommendView("similar"),className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"button-link":"")},t("somethingSimilarSomethingSimilarAuthorText")),react.createElement("button",{onClick:()=>setViewHandler("author"),type:"button",className:"text-body-medium-regular color-primary-black cursor-pointer button-link--bright "+(recommendView?"":"button-link")},t("somethingSimilarByTheSameAuthorText"))),react.createElement("ul",{className:"recommender__grid"},recommendView&&somethingSimilar&&somethingSimilar.map((work=>react.createElement(SimpleMaterial.A,{app:"something-similar",bright:!0,work}))),!recommendView&&authorMaterials&&authorMaterials.map((work=>react.createElement(SimpleMaterial.A,{app:"something-similar",bright:!0,work})))))},something_similar_SomethingSimilarList=(0,material_fetch_hoc.A)(SomethingSimilarList);try{SomethingSimilarList.displayName="SomethingSimilarList",SomethingSimilarList.__docgenInfo={description:"",displayName:"SomethingSimilarList",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},digitalMaterial:{defaultValue:null,description:"",name:"digitalMaterial",required:!1,type:{name:"Product | null | undefined"}},item:{defaultValue:null,description:"",name:"item",required:!1,type:{name:"Nullable>; }>> | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"]={docgenInfo:SomethingSimilarList.__docgenInfo,name:"SomethingSimilarList",path:"src/apps/something-similar/SomethingSimilarList.tsx#SomethingSimilarList"})}catch(__react_docgen_typescript_loader_error){}const SomethingSimilar=({faust})=>react.createElement("div",{className:"recommender recommender--bright"},faust&&react.createElement(something_similar_SomethingSimilarList,{id:faust,item:{faust}})),something_similar_SomethingSimilar=SomethingSimilar;try{SomethingSimilar.displayName="SomethingSimilar",SomethingSimilar.__docgenInfo={description:"",displayName:"SomethingSimilar",props:{faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"]={docgenInfo:SomethingSimilar.__docgenInfo,name:"SomethingSimilar",path:"src/apps/something-similar/SomethingSimilar.tsx#SomethingSimilar"})}catch(__react_docgen_typescript_loader_error){}var config=__webpack_require__("./src/core/utils/config.tsx");const SomethingSimilar_entry=(0,__webpack_require__("./src/core/utils/url.tsx").nU)((0,config.NV)((0,utils_text.i)((({faust})=>react.createElement(something_similar_SomethingSimilar,{faust})))));try{SomethingSimilarentry.displayName="SomethingSimilarentry",SomethingSimilarentry.__docgenInfo={description:"",displayName:"SomethingSimilarentry",props:{fbsBaseUrl:{defaultValue:null,description:"",name:"fbsBaseUrl",required:!0,type:{name:"string"}},publizonBaseUrl:{defaultValue:null,description:"",name:"publizonBaseUrl",required:!0,type:{name:"string"}},dplCmsBaseUrl:{defaultValue:null,description:"",name:"dplCmsBaseUrl",required:!0,type:{name:"string"}},coverBaseUrl:{defaultValue:null,description:"",name:"coverBaseUrl",required:!0,type:{name:"string"}},materialBaseUrl:{defaultValue:null,description:"",name:"materialBaseUrl",required:!0,type:{name:"string"}},fbiBaseUrl:{defaultValue:null,description:"",name:"fbiBaseUrl",required:!0,type:{name:"string"}},materialUrl:{defaultValue:null,description:"",name:"materialUrl",required:!0,type:{name:"string"}},somethingSimilarTitleText:{defaultValue:null,description:"",name:"somethingSimilarTitleText",required:!0,type:{name:"string"}},materialByAuthorText:{defaultValue:null,description:"",name:"materialByAuthorText",required:!0,type:{name:"string"}},materialAndAuthorText:{defaultValue:null,description:"",name:"materialAndAuthorText",required:!0,type:{name:"string"}},etAlText:{defaultValue:null,description:"",name:"etAlText",required:!0,type:{name:"string"}},somethingSimilarByTheSameAuthorText:{defaultValue:null,description:"",name:"somethingSimilarByTheSameAuthorText",required:!0,type:{name:"string"}},somethingSimilarSomethingSimilarAuthorText:{defaultValue:null,description:"",name:"somethingSimilarSomethingSimilarAuthorText",required:!0,type:{name:"string"}},faust:{defaultValue:null,description:"",name:"faust",required:!0,type:{name:"string"}},alertErrorCloseText:{defaultValue:null,description:"",name:"alertErrorCloseText",required:!0,type:{name:"string"}},alertErrorMessageText:{defaultValue:null,description:"",name:"alertErrorMessageText",required:!0,type:{name:"string"}},multiselectAllOptionText:{defaultValue:null,description:"",name:"multiselectAllOptionText",required:!0,type:{name:"string"}},groupModalGoToMaterialAriaLabelText:{defaultValue:null,description:"",name:"groupModalGoToMaterialAriaLabelText",required:!0,type:{name:"string"}},availabilityAvailableText:{defaultValue:null,description:"",name:"availabilityAvailableText",required:!0,type:{name:"string"}},availabilityUnavailableText:{defaultValue:null,description:"",name:"availabilityUnavailableText",required:!0,type:{name:"string"}},loansNotOverdueText:{defaultValue:null,description:"",name:"loansNotOverdueText",required:!0,type:{name:"string"}},patronContactInfoBodyText:{defaultValue:null,description:"",name:"patronContactInfoBodyText",required:!0,type:{name:"string"}},pauseReservationModalBelowInputsText:{defaultValue:null,description:"",name:"pauseReservationModalBelowInputsText",required:!0,type:{name:"string"}},materialDetailsCloseModalAriaLabelText:{defaultValue:null,description:"",name:"materialDetailsCloseModalAriaLabelText",required:!0,type:{name:"string"}},findOnShelfExpandButtonExplanationText:{defaultValue:null,description:"",name:"findOnShelfExpandButtonExplanationText",required:!0,type:{name:"string"}},reservationsStillInQueueForText:{defaultValue:null,description:"",name:"reservationsStillInQueueForText",required:!0,type:{name:"string"}},materialDetailsModalAriaDescriptionText:{defaultValue:null,description:"",name:"materialDetailsModalAriaDescriptionText",required:!0,type:{name:"string"}},changePickupLocationText:{defaultValue:null,description:"",name:"changePickupLocationText",required:!0,type:{name:"string"}},changeInterestPeriodText:{defaultValue:null,description:"",name:"changeInterestPeriodText",required:!0,type:{name:"string"}},modalReservationFormPickupLabelText:{defaultValue:null,description:"",name:"modalReservationFormPickupLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionPickupText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionPickupText",required:!0,type:{name:"string"}},closeModalAriaLabelPickupText:{defaultValue:null,description:"",name:"closeModalAriaLabelPickupText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderTitleText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderTitleText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterHeaderDescriptionText",required:!0,type:{name:"string"}},modalReservationFormNoInterestAfterLabelText:{defaultValue:null,description:"",name:"modalReservationFormNoInterestAfterLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionEmailText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionEmailText",required:!0,type:{name:"string"}},screenReaderModalDescriptionInterestPeriodText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionInterestPeriodText",required:!0,type:{name:"string"}},screenReaderModalDescriptionSmsText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionSmsText",required:!0,type:{name:"string"}},closeModalAriaLabelEmailText:{defaultValue:null,description:"",name:"closeModalAriaLabelEmailText",required:!0,type:{name:"string"}},closeModalAriaLabelInterestPeriodText:{defaultValue:null,description:"",name:"closeModalAriaLabelInterestPeriodText",required:!0,type:{name:"string"}},closeModalAriaLabelSmsText:{defaultValue:null,description:"",name:"closeModalAriaLabelSmsText",required:!0,type:{name:"string"}},deleteReservationModalButtonText:{defaultValue:null,description:"",name:"deleteReservationModalButtonText",required:!0,type:{name:"string"}},pauseReservationModalAriaDescriptionText:{defaultValue:null,description:"",name:"pauseReservationModalAriaDescriptionText",required:!0,type:{name:"string"}},acceptModalAriaDescriptionText:{defaultValue:null,description:"",name:"acceptModalAriaDescriptionText",required:!0,type:{name:"string"}},addToFavoritesAriaLabelText:{defaultValue:null,description:"",name:"addToFavoritesAriaLabelText",required:!0,type:{name:"string"}},removeFromFavoritesAriaLabelText:{defaultValue:null,description:"",name:"removeFromFavoritesAriaLabelText",required:!0,type:{name:"string"}},acceptModalAriaLabelText:{defaultValue:null,description:"",name:"acceptModalAriaLabelText",required:!0,type:{name:"string"}},acceptModalHeaderText:{defaultValue:null,description:"",name:"acceptModalHeaderText",required:!0,type:{name:"string"}},acceptModalAreYouSureText:{defaultValue:null,description:"",name:"acceptModalAreYouSureText",required:!0,type:{name:"string"}},acceptModalBodyText:{defaultValue:null,description:"",name:"acceptModalBodyText",required:!0,type:{name:"string"}},acceptModalCancelButtonText:{defaultValue:null,description:"",name:"acceptModalCancelButtonText",required:!0,type:{name:"string"}},acceptModalAcceptButtonText:{defaultValue:null,description:"",name:"acceptModalAcceptButtonText",required:!0,type:{name:"string"}},isLoadingHeartText:{defaultValue:null,description:"",name:"isLoadingHeartText",required:!0,type:{name:"string"}},reservationPickUpLatestText:{defaultValue:null,description:"",name:"reservationPickUpLatestText",required:!0,type:{name:"string"}},reservationListReadyText:{defaultValue:null,description:"",name:"reservationListReadyText",required:!0,type:{name:"string"}},reservationListDigitalPickupText:{defaultValue:null,description:"",name:"reservationListDigitalPickupText",required:!0,type:{name:"string"}},pincodeSectionDescriptionText:{defaultValue:null,description:"",name:"pincodeSectionDescriptionText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"]={docgenInfo:SomethingSimilarentry.__docgenInfo,name:"SomethingSimilarentry",path:"src/apps/something-similar/SomethingSimilar.entry.tsx#SomethingSimilarentry"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const SomethingSimilar_dev={title:"Apps / Something similar",component:SomethingSimilar_entry,decorators:[esm.V],argTypes:{...serviceUrlArgs.A,...globalTextArgs.A,...globalConfigArgs.A,somethingSimilarTitleText:{control:{type:"text"},defaultValue:"Other materials"},materialUrl:{defaultValue:"/work/:workid",control:{type:"text"}},materialByAuthorText:{control:{type:"text"},defaultValue:"By"},materialAndAuthorText:{control:{type:"text"},defaultValue:"and"},etAlText:{control:{type:"text"},defaultValue:"et al."},somethingSimilarByTheSameAuthorText:{control:{type:"text"},defaultValue:"By the same author"},faust:{control:{type:"text"},defaultValue:"48953786"},somethingSimilarSomethingSimilarAuthorText:{control:{type:"text"},defaultValue:"Something similar"}}},SomethingSimilar_dev_SomethingSimilarEntry=(props=>react.createElement(SomethingSimilar_entry,props)).bind({})},"./src/components/Buttons/ArrowButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx");const ArrowButton=({cursorPointer=!1,clickEventHandler,keyUpEventHandler,arrowLabelledBy,classNames=""})=>{const pointer=cursorPointer&&{cursor:"pointer"}||{cursor:"inherit"};return react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"aria-labelledby":arrowLabelledBy,className:`${classNames} arrow-button`,style:pointer,type:"button",onClick:e=>{clickEventHandler&&(e.stopPropagation(),clickEventHandler())},onKeyUp:e=>{keyUpEventHandler&&(e.stopPropagation(),keyUpEventHandler(e))}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_icons_arrow_arrow__WEBPACK_IMPORTED_MODULE_1__.A,null))},__WEBPACK_DEFAULT_EXPORT__=ArrowButton;try{ArrowButton.displayName="ArrowButton",ArrowButton.__docgenInfo={description:"",displayName:"ArrowButton",props:{cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean"}},clickEventHandler:{defaultValue:null,description:"",name:"clickEventHandler",required:!1,type:{name:"(() => void) | undefined"}},keyUpEventHandler:{defaultValue:null,description:"",name:"keyUpEventHandler",required:!1,type:{name:"((e: KeyboardEvent) => void) | undefined"}},arrowLabelledBy:{defaultValue:null,description:"",name:"arrowLabelledBy",required:!0,type:{name:"string"}},classNames:{defaultValue:{value:""},description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ArrowButton.tsx#ArrowButton"]={docgenInfo:ArrowButton.__docgenInfo,name:"ArrowButton",path:"src/components/Buttons/ArrowButton.tsx#ArrowButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/Button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>Button});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const Button=({label,buttonType,disabled,collapsible,size,variant,onClick,iconClassNames,id,classNames,dataCy})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{"data-cy":dataCy||"button",type:"button",className:`btn-primary btn-${variant} btn-${size} ${disabled?"btn-outline":""} arrow__hover--right-small ${classNames??""}`,disabled,onClick,id},label,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_1__.a,{buttonType,iconClassNames,collapsible}));try{Button.displayName="Button",Button.__docgenInfo={description:"",displayName:"Button",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},buttonType:{defaultValue:null,description:"",name:"buttonType",required:!0,type:{name:"enum",value:[{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"boolean"}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/Button.tsx#Button"]={docgenInfo:Button.__docgenInfo,name:"Button",path:"src/components/Buttons/Button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/ButtonIcon.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{a:()=>ButtonIcon});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/arrow-ui/icon-arrow-ui-small-right.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/buttons/icon-btn-external-link.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2__),clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const ButtonIcon=({buttonType,collapsible,iconClassNames})=>{const iconClassName=`btn-icon ${(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)({"btn-collapsible":collapsible},[iconClassNames])}`;return"default"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ml-16"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_arrow_ui_icon_arrow_ui_small_right_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""})):"external-link"===buttonType?react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:iconClassName,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_buttons_icon_btn_external_link_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:""}):null};try{ButtonIcon.displayName="ButtonIcon",ButtonIcon.__docgenInfo={description:"",displayName:"ButtonIcon",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},collapsible:{defaultValue:null,description:"",name:"collapsible",required:!1,type:{name:"boolean | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/ButtonIcon.tsx#ButtonIcon"]={docgenInfo:ButtonIcon.__docgenInfo,name:"ButtonIcon",path:"src/components/Buttons/ButtonIcon.tsx#ButtonIcon"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Buttons/LinkButton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/ButtonIcon.tsx");const LinkButton=({buttonType,children,classNames,dataCy="link-button",iconClassNames,isNewTab=!1,size="medium",trackClick,url,variant="filled",ariaLabelledBy,id})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_1__.A,{href:url,isNewTab,className:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)("btn-primary",`btn-${variant}`,`btn-${size}`,"arrow__hover--right-small","hide-linkstyle",classNames),trackClick,dataCy,ariaLabelledBy,id},children,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ButtonIcon__WEBPACK_IMPORTED_MODULE_2__.a,{buttonType,iconClassNames})),__WEBPACK_DEFAULT_EXPORT__=LinkButton;try{LinkButton.displayName="LinkButton",LinkButton.__docgenInfo={description:"",displayName:"LinkButton",props:{buttonType:{defaultValue:null,description:"",name:"buttonType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"search"'},{value:'"none"'},{value:'"default"'},{value:'"external-link"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"link-button"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},iconClassNames:{defaultValue:null,description:"",name:"iconClassNames",required:!1,type:{name:"string | undefined"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},size:{defaultValue:{value:"medium"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},variant:{defaultValue:{value:"filled"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"outline"'},{value:'"filled"'}]}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Buttons/LinkButton.tsx#LinkButton"]={docgenInfo:LinkButton.__docgenInfo,name:"LinkButton",path:"src/components/Buttons/LinkButton.tsx#LinkButton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureControllable.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const DisclosureControllable=({id,children,showContent=!1,cyData,className,summary})=>{const[isOpen,setIsOpen]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(showContent),toggleOpen=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setIsOpen((prevIsOpen=>!prevIsOpen))}),[]),handleClick=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{toggleOpen()}),[toggleOpen]),handleKeyDown=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((e=>{"Enter"===e.key&&toggleOpen()}),[toggleOpen]),disclosureId=`disclosure-${id}`;return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.A)("disclosure text-body-large",className)},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":cyData,onClick:handleClick,onKeyDown:handleKeyDown,role:"button",tabIndex:0,"aria-controls":disclosureId,"aria-expanded":isOpen},summary),isOpen&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:disclosureId},children))},__WEBPACK_DEFAULT_EXPORT__=DisclosureControllable;try{DisclosureControllable.displayName="DisclosureControllable",DisclosureControllable.__docgenInfo={description:"",displayName:"DisclosureControllable",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},showContent:{defaultValue:{value:"false"},description:"",name:"showContent",required:!1,type:{name:"boolean | undefined"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void) | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"]={docgenInfo:DisclosureControllable.__docgenInfo,name:"DisclosureControllable",path:"src/components/Disclosures/DisclosureControllable.tsx#DisclosureControllable"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/DisclosureSummary.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Disclosures_DisclosureSummary});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs");const Heading=({children,level,className})=>{const HeadingTag=level;return react.createElement(HeadingTag,{className},children)},Heading_Heading=Heading;try{Heading.displayName="Heading",Heading.__docgenInfo={description:"",displayName:"Heading",props:{level:{defaultValue:null,description:"",name:"level",required:!0,type:{name:"enum",value:[{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Heading/Heading.tsx#Heading"]={docgenInfo:Heading.__docgenInfo,name:"Heading",path:"src/components/Heading/Heading.tsx#Heading"})}catch(__react_docgen_typescript_loader_error){}const Pagefold=({text,state,dataCy="page-fold"})=>react.createElement("div",{"data-cy":dataCy,className:"pagefold-parent--xsmall availability-label--unselected text-label availability-label"},react.createElement("div",{className:`pagefold-triangle--xsmall pagefold-triangle--${state}`}),react.createElement("p",{className:"text-label-normal ml-24 mr-8"},text)),pagefold_Pagefold=Pagefold;try{Pagefold.displayName="Pagefold",Pagefold.__docgenInfo={description:"",displayName:"Pagefold",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},state:{defaultValue:null,description:"",name:"state",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"alert"'}]}},dataCy:{defaultValue:{value:"page-fold"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/pagefold/Pagefold.tsx#Pagefold"]={docgenInfo:Pagefold.__docgenInfo,name:"Pagefold",path:"src/components/pagefold/Pagefold.tsx#Pagefold"})}catch(__react_docgen_typescript_loader_error){}var utils_text=__webpack_require__("./src/core/utils/text.tsx");const DisclosureSummary=({title,headingLevel="h3",mainIconPath,isAvailable,itemRef,className,dataCy="disclosure-summary"})=>{const t=(0,utils_text.F)();return react.createElement("summary",{ref:itemRef,className:(0,clsx.A)("disclosure__headline text-body-large ",className),"data-cy":dataCy},mainIconPath&&react.createElement("div",{className:"disclosure__icon bg-identity-tint-120"},react.createElement("img",{className:"invert",src:mainIconPath,alt:""})),react.createElement(Heading_Heading,{level:headingLevel,className:"text-body-large disclosure__text"+(void 0!==isAvailable?"--shorter":"")},title),void 0!==isAvailable&&react.createElement(pagefold_Pagefold,{text:t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText"),state:isAvailable?"success":"alert"}),react.createElement("img",{className:"disclosure__expand noselect",src:ExpandMore_default(),alt:""}))},Disclosures_DisclosureSummary=DisclosureSummary;try{DisclosureSummary.displayName="DisclosureSummary",DisclosureSummary.__docgenInfo={description:"",displayName:"DisclosureSummary",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},headingLevel:{defaultValue:{value:"h3"},description:"",name:"headingLevel",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"h2"'},{value:'"h3"'},{value:'"h4"'},{value:'"h5"'}]}},mainIconPath:{defaultValue:null,description:"",name:"mainIconPath",required:!1,type:{name:"string | undefined"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},itemRef:{defaultValue:null,description:"",name:"itemRef",required:!1,type:{name:"MutableRefObject | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"disclosure-summary"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"]={docgenInfo:DisclosureSummary.__docgenInfo,name:"DisclosureSummary",path:"src/components/Disclosures/DisclosureSummary.tsx#DisclosureSummary"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Disclosures/disclosure.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/lazy-load.ts");const __WEBPACK_DEFAULT_EXPORT__=({children,open,dataCy="disclosure",className,summary})=>{const{itemRef,hasBeenVisible:showItem}=(0,_core_utils_helpers_lazy_load__WEBPACK_IMPORTED_MODULE_1__.H)(),summaryWithRef=react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(summary,{itemRef});return react__WEBPACK_IMPORTED_MODULE_0__.createElement("details",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_2__.A)("disclosure text-body-large",className),open,"data-cy":dataCy},summaryWithRef,showItem&&children)};try{disclosure.displayName="disclosure",disclosure.__docgenInfo={description:"",displayName:"disclosure",props:{open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"disclosure"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},summary:{defaultValue:null,description:"",name:"summary",required:!0,type:{name:"ReactElement>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Disclosures/disclosure.tsx#disclosure"]={docgenInfo:disclosure.__docgenInfo,name:"disclosure",path:"src/components/Disclosures/disclosure.tsx#disclosure"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/Dropdown/Dropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>Dropdown_Dropdown});var clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react=__webpack_require__("./node_modules/react/index.js"),icon_triangle=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-triangle.svg"),icon_triangle_default=__webpack_require__.n(icon_triangle),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore);const DropdownIcon=({arrowIcon})=>"triangles"===arrowIcon?react.createElement("span",null,react.createElement("img",{className:"dropdown__arrow",src:icon_triangle_default(),alt:""}),react.createElement("img",{className:"dropdown__arrow dropdown__arrow--bottom",src:icon_triangle_default(),alt:""})):"chevron"===arrowIcon?react.createElement("img",{className:"dropdown__arrow",src:ExpandMore_default(),alt:""}):null,Dropdown_DropdownIcon=DropdownIcon;try{DropdownIcon.displayName="DropdownIcon",DropdownIcon.__docgenInfo={description:"",displayName:"DropdownIcon",props:{arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"]={docgenInfo:DropdownIcon.__docgenInfo,name:"DropdownIcon",path:"src/components/Dropdown/DropdownIcon.tsx#DropdownIcon"})}catch(__react_docgen_typescript_loader_error){}const Dropdown=({arrowIcon,ariaLabel,options,classNames,innerClassNames,handleOnChange,placeholder,cyData,label,id,labelledBy,defaultValue})=>{const classes={root:(0,clsx.A)("dropdown",classNames),select:(0,clsx.A)("dropdown__select",null==innerClassNames?void 0:innerClassNames.select),option:(0,clsx.A)("dropdown__option",null==innerClassNames?void 0:innerClassNames.option),arrowWrapper:(0,clsx.A)("dropdown__arrows",null==innerClassNames?void 0:innerClassNames.arrowWrapper)},optionsList=placeholder?[placeholder,...options]:options;return react.createElement("div",{className:classes.root},label&&react.createElement("label",{htmlFor:id},label),react.createElement("div",{className:classes.root},react.createElement("select",{id,"data-cy":cyData,className:classes.select,"aria-labelledby":labelledBy,"aria-label":ariaLabel,onChange:e=>{handleOnChange&&e.target.value&&handleOnChange(e)}},optionsList.map((({label:optionsLabel,value,disabled})=>react.createElement("option",{key:optionsLabel,value,className:classes.option,disabled,selected:value.toString()===(null==defaultValue?void 0:defaultValue.toString())},optionsLabel)))),react.createElement("div",{className:classes.arrowWrapper},react.createElement(Dropdown_DropdownIcon,{arrowIcon}))))},Dropdown_Dropdown=Dropdown;try{Dropdown.displayName="Dropdown",Dropdown.__docgenInfo={description:"",displayName:"Dropdown",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"Option[]"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}},arrowIcon:{defaultValue:null,description:"",name:"arrowIcon",required:!0,type:{name:"enum",value:[{value:'"triangles"'},{value:'"chevron"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},innerClassNames:{defaultValue:null,description:"",name:"innerClassNames",required:!1,type:{name:"{ select?: string | undefined; option?: string | undefined; arrowWrapper?: string | undefined; } | undefined"}},handleOnChange:{defaultValue:null,description:"",name:"handleOnChange",required:!1,type:{name:"((e: ChangeEvent) => void) | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"Option | undefined"}},cyData:{defaultValue:null,description:"",name:"cyData",required:!1,type:{name:"string | undefined"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"FormSelectValue | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/Dropdown/Dropdown.tsx#Dropdown"]={docgenInfo:Dropdown.__docgenInfo,name:"Dropdown",path:"src/components/Dropdown/Dropdown.tsx#Dropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/GroupModalContent.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js"),_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/checkbox/Checkbox.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/general.ts");const GroupModalContent=({amountOfSelectableMaterials,selectableMaterials=[],selectedMaterials=[],selectMaterials,buttonComponent,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)(),intersectionRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_4__.A)(intersectionRef,{threshold:0}),checkBoxComponent=void 0!==selectMaterials&&amountOfSelectableMaterials>0?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_checkbox_Checkbox__WEBPACK_IMPORTED_MODULE_1__.A,{selected:0!==amountOfSelectableMaterials&&selectedMaterials.length===amountOfSelectableMaterials,disabled:0===amountOfSelectableMaterials,id:"checkbox-select-all",onChecked:()=>{selectMaterials&&(selectedMaterials.length===amountOfSelectableMaterials?selectMaterials((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_3__.CT)([])):selectMaterials(selectableMaterials))},label:t("groupModalCheckboxText")}):null;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box",ref:intersectionRef},checkBoxComponent,buttonComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__list"},children),!(null!=intersection&&intersection.isIntersecting)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"button-box button-box--sticky-bottom"},checkBoxComponent,buttonComponent))},__WEBPACK_DEFAULT_EXPORT__=GroupModalContent;try{GroupModalContent.displayName="GroupModalContent",GroupModalContent.__docgenInfo={description:"",displayName:"GroupModalContent",props:{amountOfSelectableMaterials:{defaultValue:null,description:"",name:"amountOfSelectableMaterials",required:!0,type:{name:"number"}},selectableMaterials:{defaultValue:{value:"[]"},description:"",name:"selectableMaterials",required:!1,type:{name:"Nullable>; }>>[] | undefined"}},selectedMaterials:{defaultValue:{value:"[]"},description:"",name:"selectedMaterials",required:!1,type:{name:"Nullable>; }>>[] | undefined"}},buttonComponent:{defaultValue:null,description:"",name:"buttonComponent",required:!0,type:{name:"ReactNode"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!1,type:{name:"((materialIds: Nullable>; }>>[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"]={docgenInfo:GroupModalContent.__docgenInfo,name:"GroupModalContent",path:"src/components/GroupModal/GroupModalContent.tsx#GroupModalContent"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/LoansGroupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>createLoanModalId,A:()=>GroupModal_LoansGroupModal});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),GroupModalContent=__webpack_require__("./src/components/GroupModal/GroupModalContent.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),fbs=__webpack_require__("./src/core/fbs/fbs.ts"),selectable_material=__webpack_require__("./src/apps/loan-list/materials/selectable-material/selectable-material.tsx"),loan_type=__webpack_require__("./src/core/utils/types/loan-type.ts"),use_pager=__webpack_require__("./src/components/result-pager/use-pager.tsx"),StatusMessage=__webpack_require__("./src/apps/loan-list/materials/selectable-material/StatusMessage.tsx"),status_badge=__webpack_require__("./src/apps/loan-list/materials/utils/status-badge.tsx"),date=__webpack_require__("./src/core/utils/helpers/date.ts"),helpers=__webpack_require__("./src/apps/loan-list/utils/helpers.ts");const GroupModalLoansList=({materials,selectedMaterials,openDetailsModal,selectMaterials,pageSize})=>{const groupedMaterials=materials.sort(((a,b)=>Number(!!b.isRenewable)-Number(!!a.isRenewable))),t=(0,utils_text.F)(),[displayedMaterials,setDisplayedMaterials]=(0,react.useState)([]),{itemsShown,PagerComponent,firstInNewPage}=(0,use_pager.A)({hitcount:groupedMaterials.length,pageSize});(0,react.useEffect)((()=>{setDisplayedMaterials([...groupedMaterials].splice(0,itemsShown))}),[itemsShown,groupedMaterials]);const onMaterialChecked=item=>{const selectedMaterialsCopy=[...selectedMaterials],indexOfItemToRemove=selectedMaterials.indexOf(item);indexOfItemToRemove>-1?selectedMaterialsCopy.splice(indexOfItemToRemove,1):selectedMaterialsCopy.push(item),selectMaterials(selectedMaterialsCopy)};return react.createElement(react.Fragment,null,react.createElement("ul",{className:"modal-loan__list-materials"},displayedMaterials.map(((loanType,i)=>react.createElement(selectable_material.A,{focused:firstInNewPage===i,statusBadgeComponent:react.createElement(status_badge.A,{badgeDate:loanType.dueDate,neutralText:(0,helpers.V_)(loanType,date.Yq,t)}),statusBadgeComponentMobile:react.createElement(status_badge.A,{badgeDate:loanType.dueDate,neutralText:(0,helpers.V_)(loanType,date.Yq,t),mobileVersion:!0}),statusMessageComponentDesktop:react.createElement(StatusMessage.A,{className:"list-materials__status__note-desktop",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),statusMessageComponentMobile:react.createElement(StatusMessage.A,{className:"list-materials__status__note-mobile",loanType:loanType.loanType,renewalStatusList:loanType.renewalStatusList}),item:loanType,openDetailsModal:item=>{(0,loan_type.R)(item)&&openDetailsModal(item)},key:loanType.faust,selected:selectedMaterials.includes(loanType),onMaterialChecked,disabled:!loanType.isRenewable})))),react.createElement(PagerComponent,{classNames:"result-pager--margin-bottom"}))},GroupModal_GroupModalLoansList=GroupModalLoansList;try{GroupModalLoansList.displayName="GroupModalLoansList",GroupModalLoansList.__docgenInfo={description:"",displayName:"GroupModalLoansList",props:{materials:{defaultValue:null,description:"",name:"materials",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},selectedMaterials:{defaultValue:null,description:"",name:"selectedMaterials",required:!0,type:{name:"Nullable>; }>>[]"}},selectMaterials:{defaultValue:null,description:"",name:"selectMaterials",required:!0,type:{name:"(materialIds: Nullable>; }>>[]) => void"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"]={docgenInfo:GroupModalLoansList.__docgenInfo,name:"GroupModalLoansList",path:"src/components/GroupModal/GroupModalLoansList.tsx#GroupModalLoansList"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),renewal=__webpack_require__("./src/core/utils/helpers/renewal.ts");const LoansGroupModalButton=({materialsToRenew,renewableMaterials,renewSelected,renewingStatus})=>{const t=(0,utils_text.F)(),materialsCount=materialsToRenew.length,label=(0,renewal.OX)({isRenewable:renewableMaterials>0,renewingStatus,t,defaultText:t("groupModalButtonText",{count:materialsCount,placeholders:{"@count":materialsCount}})});return react.createElement(Button.$,{dataCy:"loans-group-modal-button",label,buttonType:"none",id:"renew-several",variant:"filled",disabled:0===renewableMaterials||"pending"===renewingStatus,collapsible:!1,onClick:renewSelected,size:"small"})},GroupModal_LoansGroupModalButton=LoansGroupModalButton;try{LoansGroupModalButton.displayName="LoansGroupModalButton",LoansGroupModalButton.__docgenInfo={description:"",displayName:"LoansGroupModalButton",props:{materialsToRenew:{defaultValue:null,description:"",name:"materialsToRenew",required:!0,type:{name:"Nullable>; }>>[]"}},renewableMaterials:{defaultValue:null,description:"",name:"renewableMaterials",required:!0,type:{name:"number"}},renewSelected:{defaultValue:null,description:"",name:"renewSelected",required:!0,type:{name:"() => void"}},renewingStatus:{defaultValue:null,description:"",name:"renewingStatus",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"]={docgenInfo:LoansGroupModalButton.__docgenInfo,name:"LoansGroupModalButton",path:"src/components/GroupModal/LoansGroupModalButton.tsx#LoansGroupModalButton"})}catch(__react_docgen_typescript_loader_error){}var RenewalModalMessage=__webpack_require__("./src/components/renewal/RenewalModalMessage.tsx"),useRequestsWithStatus=__webpack_require__("./src/core/utils/useRequestsWithStatus.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const createLoanModalId=(dueDate,dueDateModal,allLoansId)=>dueDate&&dueDateModal?(0,modal_helpers.Q0)(String(dueDateModal),[dueDate]):(0,modal_helpers.Q0)("",[String(allLoansId)]),LoansGroupModal=({dueDate,loansModal,openDetailsModal,pageSize,children})=>{const t=(0,utils_text.F)(),{mutate}=(0,fbs.Oc)(),{dueDateModal,allLoansId}=(0,modal_helpers.c6)(),queryClient=(0,es.useQueryClient)(),modalIdUsed=createLoanModalId(dueDate,dueDateModal,allLoansId),renewableMaterials=(0,general.oq)(loansModal),[materialsToRenew,setMaterialsToRenew]=(0,react.useState)([]),[renewingResponse,setRenewingResponse]=(0,react.useState)(null),{track}=(0,useStatistics.B)(),{handler:renew,requestStatus:renewingStatus,setRequestStatus:setRenewingStatus}=(0,useRequestsWithStatus.$K)({request:{params:{data:materialsToRenew.map((material=>material.loanId??0))},operation:mutate},onError:()=>{setRenewingResponse(null)},onSuccess:result=>{queryClient.invalidateQueries((0,fbs.$4)()),result&&setRenewingResponse(result)}}),renewSelected=(0,react.useCallback)((()=>{const renewWhatMaterials=renewableMaterials===materialsToRenew.length?"renewAllMaterials":"renewSelectedMaterials",trackedData=renewableMaterials===materialsToRenew.length?`Forny_alle_materialer (${materialsToRenew.length})`:`Forny_valgte_materialer (${materialsToRenew.length})`;track("click",{id:statistics.o[renewWhatMaterials].id,name:statistics.o[renewWhatMaterials].name,trackedData}),renew()}),[renew]);(0,react.useEffect)((()=>{setMaterialsToRenew((0,general.CT)(loansModal))}),[loansModal]);const selectMaterials=materialIds=>{setMaterialsToRenew(materialIds)},showSuccessMessage="success"===renewingStatus,countRenewed=(0,renewal.Pl)(renewingResponse);return react.createElement(modal.A,{modalId:modalIdUsed,closeModalAriaLabelText:t("groupModalLoansCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("groupModalLoansAriaDescriptionText"),eventCallbacks:{close:()=>setRenewingStatus("idle")},classNames:showSuccessMessage?"modal-cta modal-padding":""},["idle","pending"].includes(renewingStatus)&&react.createElement("div",{className:"modal-loan"},children,react.createElement(GroupModalContent.A,{selectMaterials,selectedMaterials:materialsToRenew,amountOfSelectableMaterials:renewableMaterials,selectableMaterials:(0,general.CT)(loansModal),buttonComponent:react.createElement(GroupModal_LoansGroupModalButton,{materialsToRenew,renewableMaterials,renewSelected,renewingStatus})},react.createElement(GroupModal_GroupModalLoansList,{materials:loansModal,selectedMaterials:materialsToRenew,openDetailsModal,selectMaterials,pageSize}))),!["idle","pending"].includes(renewingStatus)&&react.createElement(RenewalModalMessage.A,{messageType:"success"===renewingStatus?"success":"error",renewingResponse,modalId:modalIdUsed,setRenewingStatus,texts:{successTitleText:t("renewGroupModalLoansSuccessTitleText"),successStatusText:t("renewGroupModalLoansSuccessStatusText",{count:countRenewed}),noRenewalsPossibleErrorTitleText:t("renewGroupModalLoansNoRenewalsPossibleErrorTitleText"),noRenewalsPossibleErrorStatusText:t("renewGroupModalLoansNoRenewalsPossibleErrorStatusText"),errorTitleText:t("renewGroupModalLoansErrorTitleText"),errorStatusText:t("renewGroupModalLoansErrorStatusText"),buttonText:t("renewGroupModalLoansButtonText")}}))},GroupModal_LoansGroupModal=LoansGroupModal;try{LoansGroupModal.displayName="LoansGroupModal",LoansGroupModal.__docgenInfo={description:"",displayName:"LoansGroupModal",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},loansModal:{defaultValue:null,description:"",name:"loansModal",required:!0,type:{name:"LoanType[]"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},openDetailsModal:{defaultValue:null,description:"",name:"openDetailsModal",required:!0,type:{name:"(loan: LoanType) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"]={docgenInfo:LoansGroupModal.__docgenInfo,name:"LoansGroupModal",path:"src/components/GroupModal/LoansGroupModal.tsx#LoansGroupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/SimpleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const SimpleModalHeader=({header})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header))),__WEBPACK_DEFAULT_EXPORT__=SimpleModalHeader;try{SimpleModalHeader.displayName="SimpleModalHeader",SimpleModalHeader.__docgenInfo={description:"",displayName:"SimpleModalHeader",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"]={docgenInfo:SimpleModalHeader.__docgenInfo,name:"SimpleModalHeader",path:"src/components/GroupModal/SimpleModalHeader.tsx#SimpleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/GroupModal/StatusCircleModalHeader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/loan-list/materials/utils/warning-bar.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/url.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx");const StatusCircleModalHeader=({dueDate,header,subHeader,statusCircleComponent})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.F)(),feesPageUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_3__.Ik)()("feesPageUrl");return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-loan__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"mr-32"},statusCircleComponent),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-loan__title text-header-h2"},header),subHeader&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"text-body-large"},subHeader))),dueDate&&(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.El)(dueDate)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__warning"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_apps_loan_list_materials_utils_warning_bar__WEBPACK_IMPORTED_MODULE_1__.A,{leftLink:feesPageUrl,linkText:t("groupModalDueDateLinkToPageWithFeesText"),overdueText:t("groupModalDueDateWarningLoanOverdueText")})))},__WEBPACK_DEFAULT_EXPORT__=StatusCircleModalHeader;try{StatusCircleModalHeader.displayName="StatusCircleModalHeader",StatusCircleModalHeader.__docgenInfo={description:"",displayName:"StatusCircleModalHeader",props:{dueDate:{defaultValue:null,description:"",name:"dueDate",required:!1,type:{name:"string | null | undefined"}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"string"}},subHeader:{defaultValue:null,description:"",name:"subHeader",required:!1,type:{name:"string | undefined"}},statusCircleComponent:{defaultValue:null,description:"",name:"statusCircleComponent",required:!0,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"]={docgenInfo:StatusCircleModalHeader.__docgenInfo,name:"StatusCircleModalHeader",path:"src/components/GroupModal/StatusCircleModalHeader.tsx#StatusCircleModalHeader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/alert/alert.dev.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Info:()=>Info,Success:()=>Success,Warning:()=>Warning,default:()=>alert_dev});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),reach_alert_esm=__webpack_require__("./node_modules/@reach/alert/dist/reach-alert.esm.js");function Alert({className,message,type,variant}){return react.createElement(reach_alert_esm.A,{className:`dpl-alert dpl-alert--${variant} ${className}`,type},message)}Alert.propTypes={className:prop_types_default().string,message:prop_types_default().string,type:prop_types_default().oneOf(["assertive","polite"]),variant:prop_types_default().oneOf(["info","success","warning","blank"])},Alert.defaultProps={className:"",message:"Hov, der opstod en fejl!",type:"polite",variant:"info"};const alert_alert=Alert,alert_dev={title:"Components/Alert"},Template=args=>react.createElement(alert_alert,args),Info=Template.bind({}),Warning=Template.bind({});Warning.args={variant:"warning",message:"Noget gik galt"};const Success=Template.bind({});Success.args={variant:"success",message:"Det lykkedes"}},"./src/components/atoms/icons/arrow/arrow.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg",{width:"61",height:"9",viewBox:"0 0 61 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__body",d:"M60 4.5H0",stroke:"black"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("path",{className:"arrow__head",d:"M60.3537 4.85355C60.5489 4.65829 60.5489 4.34171 60.3537 4.14645L57.1717 0.96447C56.9764 0.769208 56.6598 0.769208 56.4646 0.96447C56.2693 1.15973 56.2693 1.47631 56.4646 1.67157L59.293 4.5L56.4646 7.32843C56.2693 7.52369 56.2693 7.84027 56.4646 8.03553C56.6598 8.2308 56.9764 8.2308 57.1717 8.03553L60.3537 4.85355ZM60.0001 4H57.0001V5H60.0001V4Z",fill:"black"}))},"./src/components/atoms/input/TextInput.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextInput=({id,label,description,validation,type,onChange,value,className,pattern,inputmode,required,title,placeholder})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:(0,clsx__WEBPACK_IMPORTED_MODULE_1__.A)("dpl-input",className,[{"dpl-input--invalid":!!validation}])},react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",{htmlFor:id},required?`${label}*`:label),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{className:"text-body-medium-medium",required,"aria-describedby":description?`description-${id}`:"",id,"data-cy":id,type,pattern,inputMode:inputmode,onChange:e=>{onChange(e.target.value)},value,"aria-labelledby":validation?`validation-${id}`:"",title,placeholder}),description&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"dpl-input__description",id:`description-${id}`},description),validation&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{id:`validation-${id}`,className:"dpl-input__validation",role:"alert"},validation)),__WEBPACK_DEFAULT_EXPORT__=TextInput;try{TextInput.displayName="TextInput",TextInput.__docgenInfo={description:"",displayName:"TextInput",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"number"'},{value:'"text"'},{value:'"email"'},{value:'"password"'},{value:'"tel"'}]}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},required:{defaultValue:null,description:"",name:"required",required:!1,type:{name:"boolean | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!1,type:{name:"string | undefined"}},validation:{defaultValue:null,description:"",name:"validation",required:!1,type:{name:"string | undefined"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},pattern:{defaultValue:null,description:"",name:"pattern",required:!1,type:{name:"string | undefined"}},inputmode:{defaultValue:null,description:"",name:"inputmode",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"numeric"'}]}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string | undefined"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/input/TextInput.tsx#TextInput"]={docgenInfo:TextInput.__docgenInfo,name:"TextInput",path:"src/components/atoms/input/TextInput.tsx#TextInput"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/Link.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>links_Link});var react=__webpack_require__("./node_modules/react/index.js"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts");const handleTracking=({e,trackClick,isNewTab,url})=>{e.preventDefault(),trackClick().then((()=>{isNewTab&&window.open(url.href,"_blank"),(0,helpers_url.SE)(url)}))},getLinkHandler=({type,trackClick,isNewTab,url,stopPropagation})=>e=>{if(stopPropagation&&e.stopPropagation(),!trackClick)return;const{key}=e;"keyup"!==type||"keyup"!==e.type||"Enter"!==key?"click"===type&&"click"===e.type&&handleTracking({e,isNewTab,trackClick,url}):handleTracking({e,isNewTab,trackClick,url})},Link=({href,children,isNewTab=!1,className,id,trackClick,dataCy,ariaLabelledBy,stopPropagation=!1,isHiddenFromScreenReaders})=>{const handleClick=getLinkHandler({type:"click",isNewTab,stopPropagation,url:href,trackClick}),handleKeyUp=getLinkHandler({type:"keyup",isNewTab,stopPropagation,url:href,trackClick});return react.createElement("a",{id,"data-cy":dataCy||id,href:href.toString(),target:isNewTab?"_blank":void 0,rel:"noreferrer",className,onClick:handleClick,onKeyUp:handleKeyUp,"aria-labelledby":ariaLabelledBy,tabIndex:isHiddenFromScreenReaders?-1:0,"aria-hidden":isHiddenFromScreenReaders},children)},links_Link=Link;try{Link.displayName="Link",Link.__docgenInfo={description:"",displayName:"Link",props:{href:{defaultValue:null,description:"",name:"href",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},stopPropagation:{defaultValue:{value:"false"},description:"",name:"stopPropagation",required:!1,type:{name:"boolean | undefined"}},isHiddenFromScreenReaders:{defaultValue:null,description:"",name:"isHiddenFromScreenReaders",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/Link.tsx#Link"]={docgenInfo:Link.__docgenInfo,name:"Link",path:"src/components/atoms/links/Link.tsx#Link"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/atoms/links/LinkNoStyle.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Link__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/atoms/links/Link.tsx");const LinkNoStyle=({url,children,isNewTab=!1,className,trackClick,dataCy="link-no-style",ariaLabelledBy,isHiddenFromScreenReaders})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Link__WEBPACK_IMPORTED_MODULE_1__.A,{href:url,isNewTab,className:`hide-linkstyle ${className||""}`,trackClick,dataCy,ariaLabelledBy,isHiddenFromScreenReaders},children),__WEBPACK_DEFAULT_EXPORT__=LinkNoStyle;try{LinkNoStyle.displayName="LinkNoStyle",LinkNoStyle.__docgenInfo={description:"",displayName:"LinkNoStyle",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"URL"}},isNewTab:{defaultValue:{value:"false"},description:"",name:"isNewTab",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},trackClick:{defaultValue:null,description:"",name:"trackClick",required:!1,type:{name:"(() => Promise) | undefined"}},dataCy:{defaultValue:{value:"link-no-style"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},ariaLabelledBy:{defaultValue:null,description:"",name:"ariaLabelledBy",required:!1,type:{name:"string | undefined"}},isHiddenFromScreenReaders:{defaultValue:null,description:"",name:"isHiddenFromScreenReaders",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"]={docgenInfo:LinkNoStyle.__docgenInfo,name:"LinkNoStyle",path:"src/components/atoms/links/LinkNoStyle.tsx#LinkNoStyle"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/author-year/authorYear.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({author,year})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,author&&author,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")"));try{authorYear.displayName="authorYear",authorYear.__docgenInfo={description:"",displayName:"authorYear",props:{author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"string | null"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/author-year/authorYear.tsx#authorYear"]={docgenInfo:authorYear.__docgenInfo,name:"authorYear",path:"src/components/author-year/authorYear.tsx#authorYear"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label-inside.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var clsx__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Check.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1__),_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/skeletons/TextLineSkeleton.tsx");const __WEBPACK_DEFAULT_EXPORT__=({selected,isLoading,isAvailable,manifestText,availabilityText,quantity})=>{const availableTriangleCss=isAvailable?"success":"alert",classes={triangle:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)({"pagefold-triangle--none":selected},{[`pagefold-triangle--xsmall pagefold-triangle--${availableTriangleCss}`]:!selected}),check:(0,clsx__WEBPACK_IMPORTED_MODULE_3__.A)("availability-label__check",selected&&"selected")};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:classes.triangle}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:classes.check,src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_Check_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:""}),manifestText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"availability-label__text text-label-semibold ml-24","data-cy":"availability-label-type"},manifestText),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label__divider ml-4"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:`availability-label__text text-label-normal ${manifestText?"ml-4":"ml-24"} mr-8`,"data-cy":"availability-label-status"},isLoading?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_skeletons_TextLineSkeleton__WEBPACK_IMPORTED_MODULE_2__.A,{width:40}):availabilityText),quantity&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"availability-label--divider ml-4"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-label-normal mx-8"},quantity," stk")))};try{availabilitylabelinside.displayName="availabilitylabelinside",availabilitylabelinside.__docgenInfo={description:"",displayName:"availabilitylabelinside",props:{selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!0,type:{name:"boolean"}},isAvailable:{defaultValue:null,description:"",name:"isAvailable",required:!1,type:{name:"boolean | undefined"}},manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},availabilityText:{defaultValue:null,description:"",name:"availabilityText",required:!1,type:{name:"string | undefined"}},quantity:{defaultValue:null,description:"",name:"quantity",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"]={docgenInfo:availabilitylabelinside.__docgenInfo,name:"availabilitylabelinside",path:"src/components/availability-label/availability-label-inside.tsx#availabilitylabelinside"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-label.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Available:()=>Available,EBogPrinsenHarry:()=>EBogPrinsenHarry,MoreThanOneID:()=>MoreThanOneID,Selected:()=>Selected,Unavailable:()=>Unavailable,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/availability-label.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Availability Label",component:_availability_label__WEBPACK_IMPORTED_MODULE_5__.Y,argTypes:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_2__.A,..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_6__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_7__.A,faustIds:{name:"Faust Ids",control:{type:"array"}},manifestText:{name:"Manifestation text",control:{type:"text"}},url:{name:"Link",control:{type:"text"}},selected:{name:"selected",control:{type:"boolean"}},blacklistedAvailabilityBranchesConfig:{name:"Blacklisted Availability branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},cursorPointer:{name:"Cursor pointer",control:{type:"boolean"}},dataCy:{name:"Cypress data attribute",control:{type:"text"}},isbns:{name:"ISBN",control:{type:"text"}},accessTypes:{name:"Access types",options:[...Object.values(_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.cs)],control:{type:"check"}}},args:{manifestText:"Bog",availabilityText:"Hjemme",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_8__.Lu)()),selected:!1}},Template=args=>{const ConfiguredAvailabilityLabel=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_4__.nU)((0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.NV)(_availability_label__WEBPACK_IMPORTED_MODULE_5__.Y));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(ConfiguredAvailabilityLabel,args)},Available=Template.bind({});Available.args={faustIds:["61435867"]};const MoreThanOneID=Template.bind({});MoreThanOneID.args={faustIds:["62523611","62150041","61435867"]};const Selected=Template.bind({});Selected.args={faustIds:["62523611"],manifestText:"lydbog (cd-mp3)",selected:!0};const Unavailable=Template.bind({});Unavailable.args={faustIds:["62523611"],manifestText:"ebog"};const EBogPrinsenHarry=Template.bind({});EBogPrinsenHarry.args={isbns:["9788763844123"],manifestText:"ebog",accessTypes:[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_1__.cs.Online]}},"./src/components/availability-label/availability-label.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>AvailabilityLabel});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx"),_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/statistics/useStatistics.ts"),_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/statistics/statistics.ts"),_helper__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/availability-label/helper.ts"),_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/availability-label/availability-label-inside.tsx");const AvailabilityLabel=({manifestText,accessTypes,access,selected=!1,url,faustIds,handleSelectManifestation,cursorPointer=!1,dataCy="availability-label",isbns,isVisualOnly})=>{const{track}=(0,_core_statistics_useStatistics__WEBPACK_IMPORTED_MODULE_3__.B)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)(),{isLoading,isAvailable}=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.z2)({accessTypes,access,faustIds,isbn:isbns?isbns[0]:null,manifestText}),availabilityText=t(isAvailable?"availabilityAvailableText":"availabilityUnavailableText");(0,react_use__WEBPACK_IMPORTED_MODULE_7__.A)((()=>{selected&&track("click",{id:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.o.materialStatus.id,name:_core_statistics_statistics__WEBPACK_IMPORTED_MODULE_4__.o.materialStatus.name,trackedData:availabilityText})}),[faustIds,selected]);const availabilityLabel=react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label_inside__WEBPACK_IMPORTED_MODULE_6__.A,{selected,isLoading:!!isLoading,isAvailable:!!isAvailable,manifestText,availabilityText}),parentClass=(0,_helper__WEBPACK_IMPORTED_MODULE_5__.Mk)({selected,cursorPointer});return isVisualOnly?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:parentClass,"data-cy":dataCy},availabilityLabel):url&&!handleSelectManifestation?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_LinkNoStyle__WEBPACK_IMPORTED_MODULE_2__.A,{className:parentClass,url,"data-cy":dataCy},availabilityLabel):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:parentClass,type:"button",onClick:handleSelectManifestation,"data-cy":dataCy,"aria-pressed":selected},availabilityLabel)};try{AvailabilityLabel.displayName="AvailabilityLabel",AvailabilityLabel.__docgenInfo={description:"",displayName:"AvailabilityLabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#AvailabilityLabel"]={docgenInfo:AvailabilityLabel.__docgenInfo,name:"AvailabilityLabel",path:"src/components/availability-label/availability-label.tsx#AvailabilityLabel"})}catch(__react_docgen_typescript_loader_error){}try{availabilitylabel.displayName="availabilitylabel",availabilitylabel.__docgenInfo={description:"",displayName:"availabilitylabel",props:{manifestText:{defaultValue:null,description:"",name:"manifestText",required:!0,type:{name:"string"}},accessTypes:{defaultValue:null,description:"",name:"accessTypes",required:!0,type:{name:"AccessTypeCode[]"}},access:{defaultValue:null,description:"",name:"access",required:!0,type:{name:'("AccessUrl" | "DigitalArticleService" | "Ereol" | "InfomediaService" | "InterLibraryLoan" | undefined)[]'}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},handleSelectManifestation:{defaultValue:null,description:"",name:"handleSelectManifestation",required:!1,type:{name:"(() => void | undefined) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}},dataCy:{defaultValue:{value:"availability-label"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isbns:{defaultValue:null,description:"",name:"isbns",required:!0,type:{name:"string[]"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-label.tsx#availabilitylabel"]={docgenInfo:availabilitylabel.__docgenInfo,name:"availabilitylabel",path:"src/components/availability-label/availability-label.tsx#availabilitylabel"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/availability-labels.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>AvailabilityLabels});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_availability_label__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/availability-label/availability-label.tsx"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/apps/material/helper.ts");const AvailabilityLabels=({manifestations,workId,selectedManifestations,setSelectedManifestations,cursorPointer=!1})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.Ik)()("materialUrl"),allMaterialTypes=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.JB)(manifestations),manifestationsByMaterialType=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.Zh)(manifestations);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,allMaterialTypes.map((materialType=>{const isTheOnlyLabel=1===allMaterialTypes.length,manifestationsOfMaterialType=manifestationsByMaterialType[materialType],faustIds=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.bn)(manifestationsOfMaterialType).sort(),identifiers=(0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_4__.AC)(manifestationsOfMaterialType),url=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.Qj)(materialUrl,workId,materialType),accessTypesCodes=manifestationsOfMaterialType.map((manifest=>manifest.accessTypes.map((accessType=>accessType.code)))).flat(),access=manifestationsOfMaterialType.map((manifest=>manifest.access.map((acc=>acc.__typename)))).flat();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_availability_label__WEBPACK_IMPORTED_MODULE_3__.Y,{key:faustIds.join("-"),url,cursorPointer,faustIds,manifestText:materialType,accessTypes:accessTypesCodes,access,selected:selectedManifestations&&materialType===(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_1__.JB)(selectedManifestations)[0],handleSelectManifestation:setSelectedManifestations?()=>{setSelectedManifestations(manifestationsOfMaterialType),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.$u)({type:materialType})}:void 0,isbns:identifiers,isVisualOnly:isTheOnlyLabel})})))};try{AvailabilityLabels.displayName="AvailabilityLabels",AvailabilityLabels.__docgenInfo={description:"",displayName:"AvailabilityLabels",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workId:{defaultValue:null,description:"",name:"workId",required:!0,type:{name:"`work-of:${number}-${string}:${string}`"}},selectedManifestations:{defaultValue:null,description:"",name:"selectedManifestations",required:!1,type:{name:"Manifestation[] | undefined"}},setSelectedManifestations:{defaultValue:null,description:"",name:"setSelectedManifestations",required:!1,type:{name:"((manifestations: Manifestation[]) => void) | undefined"}},cursorPointer:{defaultValue:{value:"false"},description:"",name:"cursorPointer",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/availability-label/availability-labels.tsx#AvailabilityLabels"]={docgenInfo:AvailabilityLabels.__docgenInfo,name:"AvailabilityLabels",path:"src/components/availability-label/availability-labels.tsx#AvailabilityLabels"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/availability-label/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Mk:()=>getParentAvailabilityLabelClass,z2:()=>useAvailabilityData});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),publizon=__webpack_require__("./src/core/publizon/publizon.ts"),utils_config=__webpack_require__("./src/core/utils/config.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx"),useGetAvailability=__webpack_require__("./src/core/utils/useGetAvailability.ts");const publizonProductStatuses={0:{isAvailable:!0,meaning:"Unknown"},1:{isAvailable:!0,meaning:"Unknown"},2:{isAvailable:!0,meaning:"Unknown"},3:{isAvailable:!0,meaning:"Unknown"},4:{isAvailable:!0,meaning:"Reservable"},5:{isAvailable:!1,meaning:"Reservation queue on the material"},6:{isAvailable:!0,meaning:"Unknown"},7:{isAvailable:!0,meaning:"Unknown"}};var material_type=__webpack_require__("./src/core/utils/types/material-type.ts");const useAvailabilityData=({accessTypes,access,faustIds,isbn,manifestText})=>{const[isAvailable,setIsAvailable]=(0,react.useState)(null),config=(0,utils_config.UK)(),isOnline=(null==accessTypes?void 0:accessTypes.includes(graphql.cs.Online))??!1,[isCostFree,setIsCostFree]=(0,react.useState)(null),[isLoading,setIsLoading]=(0,react.useState)(null);(0,react.useEffect)((()=>{isOnline&&setIsAvailable(!0)}),[isOnline]),(0,react.useEffect)((()=>{manifestText===material_type.sN.article&&null===isAvailable&&setIsAvailable(!0)}),[manifestText,isAvailable]);const{isLoading:isLoadingIdentifier}=(0,publizon.wK)(isbn??"",{query:{enabled:isOnline&&null!==isbn&&manifestText!==material_type.sN.article,onSuccess:res=>{var _res$product;!1!==(null==res||null===(_res$product=res.product)||void 0===_res$product?void 0:_res$product.costFree)?setIsCostFree(!0):setIsCostFree(!1)}}}),{isLoading:isLoadingProductInfo}=(0,publizon.Qo)(isbn||"",{enabled:isOnline&&!!isbn&&!1===isCostFree&&access.some((acc=>"Ereol"===acc))&&manifestText!==material_type.sN.article,onSuccess:res=>{res&&res.loanStatus?setIsAvailable(publizonProductStatuses[res.loanStatus].isAvailable):setIsAvailable(!1)}}),{isLoading:isLoadingAvailability}=(0,useGetAvailability.A)({faustIds:faustIds??[],config,options:{query:{enabled:!isOnline&&null!==faustIds&&manifestText!==material_type.sN.article,onSuccess:data=>{null!=data&&data.some((item=>item.available))&&setIsAvailable(!0)}}}});return(0,react.useEffect)((()=>{manifestText!==material_type.sN.article&&setIsLoading((isLoadingAvailability||isLoadingIdentifier||isLoadingProductInfo)&&null===isAvailable)}),[isLoadingAvailability,isLoadingIdentifier,isLoadingProductInfo,isAvailable,manifestText]),{isLoading,isAvailable}},getParentAvailabilityLabelClass=({selected,cursorPointer})=>(0,clsx.A)({"pagefold-parent--none availability-label--selected":selected},{"pagefold-parent--xsmall availability-label--unselected":!selected},{"cursor-pointer":cursorPointer},"text-label","availability-label")},"./src/components/button-favourite/button-favourite.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,favourite:()=>favourite});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_button_favourite__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;ereact__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedButtonFavourite,_extends({},args,{addToListRequest:id=>{}}))).bind({});favourite.args={}},"./src/components/button-favourite/button-favourite.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>button_favourite});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-query/es/index.js"),Reload=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/Reload.svg"),Reload_default=__webpack_require__.n(Reload);const IconFavourite=({fill,darkBackground})=>{let classes=fill?"icon-favourite icon-favourite--filled":"icon-favourite";return darkBackground&&(classes=fill?"icon-favourite--bright-filled":"icon-favourite--bright"),react.createElement("svg",{height:"24",width:"24",className:classes,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},react.createElement("path",{d:"M11.5 20L10.2675 18.921C5.89 15.1035 3 12.5858 3 9.49591C3 6.9782 5.057 5 7.675 5C9.154 5 10.5735 5.66213 11.5 6.70845C12.4265 5.66213 13.846 5 15.325 5C17.943 5 20 6.9782 20 9.49591C20 12.5858 17.11 15.1035 12.7325 18.9292L11.5 20Z",strokeWidth:"2"}))};try{IconFavourite.displayName="IconFavourite",IconFavourite.__docgenInfo={description:"",displayName:"IconFavourite",props:{fill:{defaultValue:null,description:"",name:"fill",required:!1,type:{name:"boolean | undefined"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/icon-favourite/icon-favourite.tsx#IconFavourite"]={docgenInfo:IconFavourite.__docgenInfo,name:"IconFavourite",path:"src/components/icon-favourite/icon-favourite.tsx#IconFavourite"})}catch(__react_docgen_typescript_loader_error){}var material_list=__webpack_require__("./src/core/material-list-api/material-list.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts");const button_favourite=({id,addToListRequest,darkBackground,title})=>{const queryClient=(0,es.useQueryClient)(),[fillState,setFillState]=(0,react.useState)(!1),[isLoadingHeart,setIsLoadingHeart]=(0,react.useState)(!0),t=(0,utils_text.F)(),{mutate}=(0,material_list.Xi)(),{track}=(0,useStatistics.B)();(0,react.useEffect)((()=>{setIsLoadingHeart(!0),mutate({listId:"default",itemId:id},{onSuccess:()=>{setFillState(!0),setIsLoadingHeart(!1)},onError:()=>{setFillState(!1),setIsLoadingHeart(!1)}})}),[id,mutate]);const handleClick=(0,react.useCallback)((e=>{fillState?((0,material_list.Ai)("default",id,queryClient),setFillState(!1)):(track("click",{id:statistics.o.addToFavorites.id,name:statistics.o.addToFavorites.name,trackedData:id}),addToListRequest(id),setFillState(!0)),e.stopPropagation()}),[addToListRequest,fillState,id,queryClient,track]);return react.createElement("button",{type:"button","aria-label":t(fillState?"removeFromFavoritesAriaLabelText":"addToFavoritesAriaLabelText",{placeholders:{"@title":title}}),onClick:handleClick,className:"button-favourite"},isLoadingHeart&&react.createElement("img",{src:Reload_default(),alt:t("isLoadingHeartText")}),!isLoadingHeart&&react.createElement(IconFavourite,{darkBackground,fill:fillState}))};try{buttonfavourite.displayName="buttonfavourite",buttonfavourite.__docgenInfo={description:"",displayName:"buttonfavourite",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"ButtonFavouriteId"}},darkBackground:{defaultValue:null,description:"",name:"darkBackground",required:!1,type:{name:"boolean | undefined"}},addToListRequest:{defaultValue:null,description:"",name:"addToListRequest",required:!0,type:{name:"(id: ButtonFavouriteId) => void"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-favourite/button-favourite.tsx#buttonfavourite"]={docgenInfo:buttonfavourite.__docgenInfo,name:"buttonfavourite",path:"src/components/button-favourite/button-favourite.tsx#buttonfavourite"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/MaterialListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const MaterialListItem=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,ref)=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{ref,tabIndex:-1},props.children))),__WEBPACK_DEFAULT_EXPORT__=MaterialListItem;try{MaterialListItem.displayName="MaterialListItem",MaterialListItem.__docgenInfo={description:"",displayName:"MaterialListItem",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"]={docgenInfo:MaterialListItem.__docgenInfo,name:"MaterialListItem",path:"src/components/card-item-list/MaterialListItem.tsx#MaterialListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/SearchResultList.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/general.ts"),_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item.tsx"),_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx"),_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/card-item-list/MaterialListItem.tsx");const SearchResultList=({resultItems,page,pageSize})=>{const worksAreLoaded=!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(resultItems),lastItemRef=react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((()=>{page>0&&lastItemRef.current&&lastItemRef.current.focus()}),[page,resultItems]),react__WEBPACK_IMPORTED_MODULE_1__.createElement("ul",{className:"card-list-page__list my-32","data-cy":"search-result-list"},!worksAreLoaded&&[...Array(5)].map((()=>react__WEBPACK_IMPORTED_MODULE_1__.createElement("li",null,react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item_skeleton__WEBPACK_IMPORTED_MODULE_4__.A,null)))),worksAreLoaded&&resultItems.map(((item,i)=>{const isFirstNewItem=i===page*pageSize;return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_MaterialListItem__WEBPACK_IMPORTED_MODULE_5__.A,{key:item.workId,ref:isFirstNewItem?lastItemRef:null},react__WEBPACK_IMPORTED_MODULE_1__.createElement(_card_list_item_card_list_item__WEBPACK_IMPORTED_MODULE_3__.A,{item,coverTint:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_2__.J$)(i),resultNumber:i+1}))})))},__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(SearchResultList);try{SearchResultList.displayName="SearchResultList",SearchResultList.__docgenInfo={description:"",displayName:"SearchResultList",props:{resultItems:{defaultValue:null,description:"",name:"resultItems",required:!0,type:{name:"Work[]"}},page:{defaultValue:null,description:"",name:"page",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/SearchResultList.tsx#SearchResultList"]={docgenInfo:SearchResultList.__docgenInfo,name:"SearchResultList",path:"src/components/card-item-list/SearchResultList.tsx#SearchResultList"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const CardListItemSkeleton=()=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("article",{className:"card-list-item ssc"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-square cover--size-small"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-head-line w-60 mb"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-60 mbs"}," "))),__WEBPACK_DEFAULT_EXPORT__=(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(CardListItemSkeleton);try{cardlistitemskeleton.displayName="cardlistitemskeleton",cardlistitemskeleton.__docgenInfo={description:"",displayName:"cardlistitemskeleton",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"]={docgenInfo:cardlistitemskeleton.__docgenInfo,name:"cardlistitemskeleton",path:"src/components/card-item-list/card-list-item/card-list-item-skeleton.tsx#cardlistitemskeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/card-item-list/card-list-item/card-list-item.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>card_list_item});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),react_query_es=__webpack_require__("./node_modules/react-query/es/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),arrow=__webpack_require__("./src/components/atoms/icons/arrow/arrow.tsx"),availability_labels=__webpack_require__("./src/components/availability-label/availability-labels.tsx"),button_favourite=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),cover=__webpack_require__("./src/components/cover/cover.tsx");const card_list_item_cover=({ids,bestRepresentation,alt,url,tint,linkAriaLabelledBy})=>react.createElement(cover.Y,{animate:!0,ids,bestRepresentation,size:"small",alt:String(alt),url,tint,linkAriaLabelledBy});try{cardlistitemcover.displayName="cardlistitemcover",cardlistitemcover.__docgenInfo={description:"",displayName:"cardlistitemcover",props:{url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string | undefined"}},displaySize:{defaultValue:null,description:"",name:"displaySize",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'},{value:'"2xsmall"'}]}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},ids:{defaultValue:null,description:"",name:"ids",required:!0,type:{name:"string[]"}},bestRepresentation:{defaultValue:null,description:"",name:"bestRepresentation",required:!1,type:{name:"Manifestation | undefined"}},idType:{defaultValue:null,description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"pid"'},{value:'"faust"'},{value:'"isbn"'},{value:'"issn"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"medium"'}]}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"]={docgenInfo:cardlistitemcover.__docgenInfo,name:"cardlistitemcover",path:"src/components/card-item-list/card-list-item/card-list-item-cover.tsx#cardlistitemcover"})}catch(__react_docgen_typescript_loader_error){}var HorizontalTermLine=__webpack_require__("./src/components/horizontal-term-line/HorizontalTermLine.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),guardedRequests_slice=__webpack_require__("./src/core/guardedRequests.slice.ts"),useStatistics=__webpack_require__("./src/core/statistics/useStatistics.ts"),statistics=__webpack_require__("./src/core/statistics/statistics.ts"),lazy_load=__webpack_require__("./src/core/utils/helpers/lazy-load.ts"),helper=__webpack_require__("./src/apps/material/helper.ts"),useFilterHandler=__webpack_require__("./src/apps/search-result/useFilterHandler.tsx"),head=__webpack_require__("./node_modules/lodash/head.js"),head_default=__webpack_require__.n(head),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const SubjectNumber=({shelfmark:{shelfmark},className=""})=>react.createElement("div",{className},shelfmark),subject_number_SubjectNumber=SubjectNumber;try{SubjectNumber.displayName="SubjectNumber",SubjectNumber.__docgenInfo={description:"",displayName:"SubjectNumber",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:"Shelfmark"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/subject-number/SubjectNumber.tsx#SubjectNumber"]={docgenInfo:SubjectNumber.__docgenInfo,name:"SubjectNumber",path:"src/components/subject-number/SubjectNumber.tsx#SubjectNumber"})}catch(__react_docgen_typescript_loader_error){}const card_list_item=({item,item:{titles:{full:fullTitle},series,creators,manifestations:{all:manifestations,bestRepresentation},workId},coverTint,resultNumber,dataCy="card-list-item"})=>{var _firstItemInSeries$nu;const searchTitleId=(0,react.useId)(),t=(0,utils_text.F)(),u=(0,url.Ik)(),searchUrl=u("searchUrl"),materialUrl=u("materialUrl"),{filters}=(0,useFilterHandler.A)(),materialTypeFromFilters=((filters,manifestations)=>{const materialTypeFilter=head_default()(Object.keys(filters[graphql.SW.MaterialTypesSpecific]||{}).sort()),allMaterialTypes=(0,general.JB)(manifestations);return materialTypeFilter&&allMaterialTypes.includes(materialTypeFilter)?materialTypeFilter:void 0})(filters,manifestations),bookManifestation=(0,helper.oj)(manifestations),dispatch=(0,es.wA)(),queryClient=(0,react_query_es.useQueryClient)(),author=(0,general.sP)((0,general.UV)(creators),t),manifestationPids=(0,general.e$)(manifestations),firstItemInSeries=(0,helper.w2)(series).shift(),materialFullUrl=(0,helpers_url.Qj)(materialUrl,workId,materialTypeFromFilters),languageIsoCode=(0,helper.PG)(manifestations),{shelfmark}=bestRepresentation,{track}=(0,useStatistics.B)(),{itemRef,hasBeenVisible:showItem}=(0,lazy_load.H)(),handleClick=(0,react.useCallback)((()=>{track("click",{id:statistics.o.searchResultNumberClick.id,name:statistics.o.searchResultNumberClick.name,trackedData:resultNumber.toString()}).then((()=>{(0,helpers_url.SE)(materialFullUrl)}))}),[materialFullUrl]);return react.createElement("article",{ref:itemRef,"data-cy":dataCy,className:"card-list-item arrow__hover--right-small",onClick:()=>{handleClick()},onKeyUp:e=>"Enter"===e.key&&handleClick},react.createElement("div",{className:"card-list-item__cover"},showItem&&react.createElement(card_list_item_cover,{ids:manifestationPids,bestRepresentation:bookManifestation??bestRepresentation,url:materialFullUrl,tint:coverTint,linkAriaLabelledBy:searchTitleId})),react.createElement("div",{className:"card-list-item__text"},react.createElement("div",{className:"card-list-item__meta"},showItem&&react.createElement(button_favourite.A,{title:fullTitle[0],id:workId,addToListRequest:id=>{dispatch((0,guardedRequests_slice.A5)({type:"addFavorite",args:{id,queryClient},app:"search-result"}))}}),firstItemInSeries&&react.createElement(HorizontalTermLine.A,{title:`${t("numberDescriptionText")} ${null===(_firstItemInSeries$nu=firstItemInSeries.numberInSeries)||void 0===_firstItemInSeries$nu?void 0:_firstItemInSeries$nu.number}`,subTitle:t("inSeriesText"),linkList:[{url:(0,helpers_url.zy)(searchUrl,firstItemInSeries.title),term:firstItemInSeries.title}]})),!(0,general.G)(bestRepresentation)&&shelfmark&&react.createElement(subject_number_SubjectNumber,{className:"text-tags color-secondary-gray mt-8",shelfmark}),react.createElement("h2",{className:"card-list-item__title text-header-h4 mb-4","data-cy":"card-list-item-title",lang:languageIsoCode,id:searchTitleId},react.createElement(Link.A,{href:materialFullUrl,stopPropagation:!0},fullTitle)),author&&item&&react.createElement("p",{className:"text-small-caption","data-cy":"card-list-item-author"},`${t("byAuthorText")} ${author}`,(0,general.C2)(item)?` (${(0,general.C2)(item)})`:"")),react.createElement("div",{className:"card-list-item__availability","data-cy":"card-list-item-availability"},showItem&&react.createElement(availability_labels.F,{cursorPointer:!0,workId,manifestations})),react.createElement(arrow.A,null))};try{cardlistitem.displayName="cardlistitem",cardlistitem.__docgenInfo={description:"",displayName:"cardlistitem",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"Work"}},coverTint:{defaultValue:null,description:"",name:"coverTint",required:!0,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},resultNumber:{defaultValue:null,description:"",name:"resultNumber",required:!0,type:{name:"number"}},dataCy:{defaultValue:{value:"card-list-item"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"]={docgenInfo:cardlistitem.__docgenInfo,name:"cardlistitem",path:"src/components/card-item-list/card-list-item/card-list-item.tsx#cardlistitem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/checkbox/Checkbox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>checkbox_Checkbox});var react=__webpack_require__("./node_modules/react/index.js");const icon_checkbox=()=>react.createElement("svg",{width:"20px",height:"20px"},react.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})),checkbox_Checkbox=({id,label,hideLabel,className,selected,onChecked,disabled,ariaLabel,focused,isVisualOnly,labelledBy})=>react.createElement("div",{className:`checkbox ${className||""}`},react.createElement("input",{autoFocus:focused,id,className:"checkbox__input",onChange:e=>{var checked;checked=e.target.checked,onChecked&&onChecked(checked)},checked:selected,type:"checkbox","aria-label":isVisualOnly&&labelledBy?void 0:ariaLabel,"aria-labelledby":isVisualOnly&&labelledBy?labelledBy:void 0,disabled}),react.createElement("label",{className:"checkbox__label",htmlFor:id,"data-cy":id},react.createElement("span",{className:"checkbox__icon","aria-labelledby":labelledBy},react.createElement(icon_checkbox,null)),label&&react.createElement("span",{"data-cy":"checkbox-text",className:"checkbox__text text-small-caption color-secondary-gray "+(hideLabel?"checkbox__text--hide-visually":"")},label)));try{Checkbox.displayName="Checkbox",Checkbox.__docgenInfo={description:"",displayName:"Checkbox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"ReactNode"}},hideLabel:{defaultValue:null,description:"",name:"hideLabel",required:!1,type:{name:"boolean | undefined"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean | undefined"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean | undefined"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},onChecked:{defaultValue:null,description:"",name:"onChecked",required:!1,type:{name:"((value: boolean) => void) | undefined"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!1,type:{name:"string | undefined"}},focused:{defaultValue:null,description:"",name:"focused",required:!1,type:{name:"boolean | undefined"}},isVisualOnly:{defaultValue:null,description:"",name:"isVisualOnly",required:!1,type:{name:"boolean | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/checkbox/Checkbox.tsx#Checkbox"]={docgenInfo:Checkbox.__docgenInfo,name:"Checkbox",path:"src/components/checkbox/Checkbox.tsx#Checkbox"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/contact-info-section/ContactInfoSection.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>contact_info_section_ContactInfoSection});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),utils_config=__webpack_require__("./src/core/utils/config.tsx");const ContactInfoInputs=({isInline,children,dataCy="contact-info-input",className})=>{if(!isInline)return react.createElement("div",{className,"data-cy":dataCy},children);const renderableChildren=react.Children.toArray(children);return react.createElement("div",{className:(0,clsx.A)(className,{"dpl-input__flex":isInline}),"data-cy":dataCy},renderableChildren.map(((child,i)=>{const childClassName=(0,clsx.A)("patron__input--desktop",{"mr-16":i{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement(TextInput.A,{className,id:"phone-input",required:isRequired,type:"tel",pattern:"\\+?[0-9]{6,15}",title:t("patronPagePhoneInputMessageText"),onChange:newPhoneNumber=>changePatron(newPhoneNumber,"phoneNumber"),value:null==patron?void 0:patron.phoneNumber,label:t("patronContactPhoneLabelText")}),showCheckboxes&&react.createElement(Checkbox.A,{className:"mt-8 mb-16",onChecked:newReceiveSms=>changePatron(newReceiveSms,"receiveSms"),id:"phone-messages",selected:null==patron?void 0:patron.receiveSms,disabled:!1,label:t("patronContactPhoneCheckboxText")}))},contact_info_section_ContactInfoPhone=ContactInfoPhone;try{ContactInfoPhone.displayName="ContactInfoPhone",ContactInfoPhone.__docgenInfo={description:"",displayName:"ContactInfoPhone",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"]={docgenInfo:ContactInfoPhone.__docgenInfo,name:"ContactInfoPhone",path:"src/components/contact-info-section/ContactInfoPhone.tsx#ContactInfoPhone"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoEmail=({className="",patron,changePatron,showCheckboxes,isRequired=!1})=>{const t=(0,utils_text.F)();return react.createElement(react.Fragment,null,react.createElement(TextInput.A,{className,id:"email-address-input",type:"email",required:isRequired,onChange:newEmail=>changePatron(newEmail,"emailAddress"),value:null==patron?void 0:patron.emailAddress,label:t("patronContactEmailLabelText")}),showCheckboxes&&react.createElement(Checkbox.A,{className:"mt-8 mb-16",onChecked:newReceiveEmail=>changePatron(newReceiveEmail,"receiveEmail"),id:"email-messages",selected:null==patron?void 0:patron.receiveEmail,disabled:!1,label:t("patronContactEmailCheckboxText")}))},contact_info_section_ContactInfoEmail=ContactInfoEmail;try{ContactInfoEmail.displayName="ContactInfoEmail",ContactInfoEmail.__docgenInfo={description:"",displayName:"ContactInfoEmail",props:{className:{defaultValue:{value:""},description:"",name:"className",required:!1,type:{name:"string | undefined"}},patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},isRequired:{defaultValue:{value:"false"},description:"",name:"isRequired",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"]={docgenInfo:ContactInfoEmail.__docgenInfo,name:"ContactInfoEmail",path:"src/components/contact-info-section/ContactInfoEmail.tsx#ContactInfoEmail"})}catch(__react_docgen_typescript_loader_error){}const ContactInfoSection=({patron,inLine=!1,isDouble=!1,changePatron,showCheckboxes,requiredFields=[]})=>{const inputsClass=(0,clsx.A)("dpl-input",[{input__desktop:inLine},{"dpl-input--double":isDouble}]),textNotificationsEnabledConfig="1"===(0,utils_config.UK)()("textNotificationsEnabledConfig");return react.createElement("section",{"data-cy":"patron-page-contact-info",className:"create-patron-page__row"},react.createElement(contact_info_section_ContactInfoInputs,{isInline:inLine},react.createElement(contact_info_section_ContactInfoPhone,{className:inputsClass,changePatron,patron,isRequired:requiredFields.includes("phone"),showCheckboxes:showCheckboxes&&textNotificationsEnabledConfig}),react.createElement(contact_info_section_ContactInfoEmail,{className:(0,clsx.A)(inputsClass,{"mt-32":!textNotificationsEnabledConfig&&!inLine}),changePatron,patron,isRequired:requiredFields.includes("email"),showCheckboxes})))},contact_info_section_ContactInfoSection=ContactInfoSection;try{ContactInfoSection.displayName="ContactInfoSection",ContactInfoSection.__docgenInfo={description:"",displayName:"ContactInfoSection",props:{patron:{defaultValue:null,description:"",name:"patron",required:!0,type:{name:"PatronV5 | PatronSettingsV3 | null"}},inLine:{defaultValue:{value:"false"},description:"",name:"inLine",required:!1,type:{name:"boolean | undefined"}},isDouble:{defaultValue:{value:"false"},description:"",name:"isDouble",required:!1,type:{name:"boolean | undefined"}},changePatron:{defaultValue:null,description:"",name:"changePatron",required:!0,type:{name:"ChangePatronProps"}},showCheckboxes:{defaultValue:null,description:"",name:"showCheckboxes",required:!0,type:{name:"boolean"}},requiredFields:{defaultValue:{value:"[]"},description:"",name:"requiredFields",required:!1,type:{name:'("email" | "phone")[] | undefined'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"]={docgenInfo:ContactInfoSection.__docgenInfo,name:"ContactInfoSection",path:"src/components/contact-info-section/ContactInfoSection.tsx#ContactInfoSection"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/cover/cover.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__,item:()=>item});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_url__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/url.tsx"),_core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components / Cover",component:_cover__WEBPACK_IMPORTED_MODULE_1__.Y,argTypes:{..._core_storybook_serviceUrlArgs__WEBPACK_IMPORTED_MODULE_3__.A,..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_4__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_5__.A,size:{name:"Image size",control:{type:"radio"}},tint:{name:"Background color tint",control:{type:"radio"}},animate:{name:"Use animation",control:{type:"boolean"}},id:{name:"PID",control:{type:"text"}},url:{name:"URL",control:{type:"string"}},alt:{name:"Alt text",control:{type:"text"}}},args:{id:"870970-basis:45234401",size:"small",animate:!0,tint:"120",url:new URL("/",(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_6__.Lu)()),alt:"alt text for the image"}},WrappedCover=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_2__.nU)(_cover__WEBPACK_IMPORTED_MODULE_1__.Y),item=(args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedCover,args)).bind({});item.args={}},"./src/components/cover/cover.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Y:()=>Cover});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class CoverServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","CoverServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},libraryToken=(0,token.gf)(token._L),headers={...libraryToken?{Authorization:`Bearer ${libraryToken}`}:{},...additionalHeaders},body=data?JSON.stringify(data):null,serviceUrl=(({baseUrl,url,params})=>`${baseUrl}${url}?${new URLSearchParams(params)}`)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.cover),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new CoverServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof CoverServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.A(message,serviceUrl)}return null},getGetCoverCollectionQueryOptions=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/api/v2/covers",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher({url:"/api/v2/covers",method:"GET",params,signal}))(params,signal),...queryOptions}};var LinkNoStyle=__webpack_require__("./src/components/atoms/links/LinkNoStyle.tsx");const cover_image=({src,altText,animate,setImageLoaded,shadow})=>react.createElement("img",{onLoad:setImageLoaded,className:(0,clsx.A)("cover__img",{"cover__img--animate":animate},{"cover__img--shadow-small":"small"===shadow,"cover__img--shadow-medium":"medium"===shadow}),src,alt:altText||""});try{coverimage.displayName="coverimage",coverimage.__docgenInfo={description:"",displayName:"coverimage",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}},altText:{defaultValue:null,description:"",name:"altText",required:!1,type:{name:"string | undefined"}},animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},setImageLoaded:{defaultValue:null,description:"",name:"setImageLoaded",required:!0,type:{name:"() => void"}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"medium"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover-image.tsx#coverimage"]={docgenInfo:coverimage.__docgenInfo,name:"coverimage",path:"src/components/cover/cover-image.tsx#coverimage"})}catch(__react_docgen_typescript_loader_error){}var first=__webpack_require__("./node_modules/lodash/first.js"),first_default=__webpack_require__.n(first);const getUrl=(cover,size)=>{var _cover$imageUrls,_cover$imageUrls$size;return null===(_cover$imageUrls=cover.imageUrls)||void 0===_cover$imageUrls||null===(_cover$imageUrls$size=_cover$imageUrls[size])||void 0===_cover$imageUrls$size?void 0:_cover$imageUrls$size.url},getCoverUrl=({coverData,bestRepresentation,size})=>{if(!coverData)return null;const covers=(({coverData,size})=>coverData?coverData.filter((cover=>getUrl(cover,size))):[])({coverData,size}),firstCover=first_default()(covers);if(!bestRepresentation&&firstCover&&getUrl(firstCover,size))return getUrl(firstCover,size);const bestRepresentationCover=first_default()(covers.filter((cover=>bestRepresentation&&cover.id===bestRepresentation.pid)));return bestRepresentationCover&&getUrl(bestRepresentationCover,size)?getUrl(bestRepresentationCover,size):firstCover&&getUrl(firstCover,size)?getUrl(firstCover,size):null};const Cover=({url,alt,size,displaySize,animate,tint,ids,bestRepresentation,idType="pid",shadow,linkAriaLabelledBy})=>{const[imageLoaded,setImageLoaded]=(0,react.useState)(null),handleSetImageLoaded=(0,react.useCallback)((()=>{setImageLoaded(!0)}),[]);let dataSize=size;"xsmall"===dataSize?dataSize="small":"xlarge"===dataSize&&(dataSize="large");const{data}=((params,options)=>{const queryOptions=getGetCoverCollectionQueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query})({type:idType,identifiers:ids,sizes:[dataSize]}),coverSrc=getCoverUrl({coverData:data,bestRepresentation,size:dataSize}),coverDisplaySize=displaySize||size,classes={wrapper:(0,clsx.A)("cover",`cover--size-${coverDisplaySize}`,`cover--aspect-${coverDisplaySize}`,imageLoaded||{default:"bg-identity-tint-120",120:"bg-identity-tint-120",100:"bg-identity-tint-100",80:"bg-identity-tint-80",40:"bg-identity-tint-40",20:"bg-identity-tint-20"}[tint||"default"])};return url?react.createElement(LinkNoStyle.A,{className:classes.wrapper,url,ariaLabelledBy:linkAriaLabelledBy,isHiddenFromScreenReaders:!alt},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:alt,animate,shadow})):react.createElement("div",{className:classes.wrapper},coverSrc&&react.createElement(cover_image,{setImageLoaded:handleSetImageLoaded,src:coverSrc,altText:alt,animate,shadow}))};try{Cover.displayName="Cover",Cover.__docgenInfo={description:"",displayName:"Cover",props:{animate:{defaultValue:null,description:"",name:"animate",required:!0,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!0,type:{name:"enum",value:[{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'}]}},displaySize:{defaultValue:null,description:"",name:"displaySize",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'},{value:'"original"'},{value:'"2xsmall"'}]}},tint:{defaultValue:null,description:"",name:"tint",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"20"'},{value:'"40"'},{value:'"80"'},{value:'"100"'},{value:'"120"'}]}},ids:{defaultValue:null,description:"",name:"ids",required:!0,type:{name:"string[]"}},bestRepresentation:{defaultValue:null,description:"",name:"bestRepresentation",required:!1,type:{name:"Manifestation | undefined"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string | undefined"}},url:{defaultValue:null,description:"",name:"url",required:!1,type:{name:"URL | undefined"}},idType:{defaultValue:{value:"pid"},description:"",name:"idType",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"pid"'},{value:'"faust"'},{value:'"isbn"'},{value:'"issn"'}]}},shadow:{defaultValue:null,description:"",name:"shadow",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"small"'},{value:'"medium"'}]}},linkAriaLabelledBy:{defaultValue:null,description:"",name:"linkAriaLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/cover/cover.tsx#Cover"]={docgenInfo:Cover.__docgenInfo,name:"Cover",path:"src/components/cover/cover.tsx#Cover"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/empty-list/empty-list.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=({emptyListText,dataCy="empty-list",classNames=""})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":dataCy,className:`dpl-list-empty ${classNames}`},emptyListText);try{emptylist.displayName="emptylist",emptylist.__docgenInfo={description:"",displayName:"emptylist",props:{emptyListText:{defaultValue:null,description:"",name:"emptyListText",required:!0,type:{name:"string"}},dataCy:{defaultValue:{value:"empty-list"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},classNames:{defaultValue:{value:""},description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/empty-list/empty-list.tsx#emptylist"]={docgenInfo:emptylist.__docgenInfo,name:"emptylist",path:"src/components/empty-list/empty-list.tsx#emptylist"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/error-boundary-alert/ErrorBoundaryAlert.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ErrorBoundaryAlert:()=>ErrorBoundaryAlert,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_ErrorBoundaryAlertBody__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/config.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;ereact__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedErrorBoundaryAlertBody,_extends({},args,{resetErrorBoundary:()=>{alert("Close button clicked!")}}))},"./src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>error_boundary_alert_ErrorBoundaryAlertBody});var react=__webpack_require__("./node_modules/react/index.js"),CloseLarge=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/CloseLarge.svg"),CloseLarge_default=__webpack_require__.n(CloseLarge),utils_text=__webpack_require__("./src/core/utils/text.tsx");const icon_warning=()=>react.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},react.createElement("ellipse",{cx:"20",cy:"19.9822",rx:"20",ry:"19.9822",fill:"#D22D43"}),react.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.0463 24.75C20.4263 24.75 20.7404 24.4678 20.7901 24.1018L20.7969 24V11C20.7969 10.5858 20.4608 10.25 20.0463 10.25C19.6662 10.25 19.3521 10.5322 19.3024 10.8982L19.2956 11V24C19.2956 24.4142 19.6317 24.75 20.0463 24.75ZM20.0463 29.75C20.8754 29.75 21.5476 29.0784 21.5476 28.25C21.5476 27.4216 20.8754 26.75 20.0463 26.75C19.2171 26.75 18.5449 27.4216 18.5449 28.25C18.5449 29.0784 19.2171 29.75 20.0463 29.75Z",fill:"#F6F5F0"})),ErrorBoundaryAlertBody=({message,resetErrorBoundary,showCloseButton})=>{const t=(0,utils_text.F)();return react.createElement("div",{className:"error-message"},react.createElement("div",{className:"error-message__icon"},react.createElement(icon_warning,null)),react.createElement("div",{className:"error-message__description"},message),showCloseButton&&react.createElement("button",{type:"button",className:"error-message__btn-close","aria-label":t("errorBoundaryAlertBodyButtonAriaText"),onClick:resetErrorBoundary},react.createElement("img",{src:CloseLarge_default(),alt:t("errorBoundaryAlertBodyButtonAriaText")})))},error_boundary_alert_ErrorBoundaryAlertBody=ErrorBoundaryAlertBody;try{ErrorBoundaryAlertBody.displayName="ErrorBoundaryAlertBody",ErrorBoundaryAlertBody.__docgenInfo={description:"A simple alert that serves as the foundation of all alerts.",displayName:"ErrorBoundaryAlertBody",props:{message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"string"}},resetErrorBoundary:{defaultValue:null,description:"",name:"resetErrorBoundary",required:!0,type:{name:"() => void"}},showCloseButton:{defaultValue:null,description:"",name:"showCloseButton",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx#ErrorBoundaryAlertBody"]={docgenInfo:ErrorBoundaryAlertBody.__docgenInfo,name:"ErrorBoundaryAlertBody",path:"src/components/error-boundary-alert/ErrorBoundaryAlertBody.tsx#ErrorBoundaryAlertBody"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,Periodical:()=>Periodical,default:()=>FindOnShelfModal_dev});var react=__webpack_require__("./node_modules/react/index.js"),material_dev=__webpack_require__("./src/apps/material/material.dev.tsx"),serviceUrlArgs=__webpack_require__("./src/core/storybook/serviceUrlArgs.ts"),config=__webpack_require__("./src/core/utils/config.tsx"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),url=__webpack_require__("./src/core/utils/url.tsx"),MaterialButtonsFindOnShelf=__webpack_require__("./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx"),FindOnShelfModal=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx"),graphql=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const mockedManifestationData=[{pid:"870970-basis:52557240",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:graphql.dn.Fiction},materialTypes:[{materialTypeSpecific:{display:"bog"}}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763844116"}],contributors:[{display:"Ulla Lauridsen",roles:[{function:{singular:"oversætter"}}]}],edition:{summary:"1. udgave, 3. oplag (2018)",publicationYear:{display:"2016"}},audience:{generalAudience:[],ages:[]},notes:[],physicalDescriptions:[{numberOfPages:null,summary:""}],accessTypes:[{code:graphql.cs.Physical}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}},{pid:"870970-basis:52643414",genreAndForm:["slægtsromaner"],source:["Bibliotekskatalog"],titles:{main:["De syv søstre (mp3)"],original:["The seven sisters"]},fictionNonfiction:{display:"SKOENLITTERATUR",code:"FICTION"},materialTypes:[{materialTypeSpecific:{display:"lydbog (cd-mp3)"}}],creators:[{display:"Lucinda Riley",__typename:"Person"}],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"9788763850636"}],contributors:[{display:"Maria Stokholm",roles:[{function:{singular:"indlæser"}}]},{display:"Ulla Lauridsen",roles:[{function:{singular:"oversætter"}}]}],edition:{summary:"1. lydbogsudgave",publicationYear:{display:"2016"}},audience:{generalAudience:[],ages:[]},notes:[{display:["Gengivelse af bogen","Indlæst efter 1. udgave. 2016. ISBN: 9788763844116"]}],physicalDescriptions:[{numberOfPages:null,summary:""}],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:{postfix:"Postfix, 24",shelfmark:"60.7"},catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}];var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const[storySelectedPeriodical,setStorySelectedPeriodical]=(0,react.useState)({volume:"",volumeYear:"2022",displayText:"2022, nr. 29",volumeNumber:"29",itemNumber:"5313131426"});args.selectedPeriodical=storySelectedPeriodical,args.setSelectedPeriodical=setStorySelectedPeriodical;const{manifestations:[{pid}]}=args;return react.createElement(react.Fragment,null,react.createElement(WrappedMaterialButtonsFindOnShelf,_extends({},args,{size:"small",faustIds:[(0,general.G_)(pid)]})),react.createElement(WrappedFindOnShelfModal,args))},Default=Template.bind({});Default.args={};const Periodical=Template.bind({});Periodical.args={manifestations:[{pid:"870970-basis:06373674",genreAndForm:[],source:["Bibliotekskatalog"],titles:{main:["Alt for damerne"],original:[]},fictionNonfiction:{display:"FAGLITTERATUR",code:"NONFICTION"},materialTypes:[{materialTypeSpecific:{display:"tidsskrift"}}],creators:[],publisher:[""],languages:{main:[{display:"dansk",isoCode:"dan"}]},identifiers:[{value:"0002-6506"}],contributors:[],edition:{summary:"",publicationYear:{display:"1946"}},audience:{generalAudience:[],ages:[]},notes:[{display:["[Nr. 1, 1946]-"]},{display:["Ugentlig"]},{display:["Tidligere udgivet: Kbh. : Gutenberghus Bladene","Hertil findes tillæg","Hertil findes årligt tillæg med titel: Skønhed"]}],physicalDescriptions:[],accessTypes:[{code:"PHYSICAL"}],access:[{__typename:"DigitalArticleService",issn:"00026506"},{__typename:"InterLibraryLoan",loanIsPossible:!0}],shelfmark:null,catalogueCodes:{nationalBibliography:[],otherCatalogues:[]}}]}},"./src/components/find-on-shelf/FindOnShelfModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>find_on_shelf_FindOnShelfModal,f:()=>FindOnShelfModal_findOnShelfModalId});var react=__webpack_require__("./node_modules/react/index.js"),general=__webpack_require__("./src/core/utils/helpers/general.ts"),modal=__webpack_require__("./src/core/utils/modal.tsx"),partition=__webpack_require__("./node_modules/lodash/partition.js"),partition_default=__webpack_require__.n(partition),helper=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./src/apps/material/helper.ts")),utils_text=__webpack_require__("./src/core/utils/text.tsx"),disclosure=__webpack_require__("./src/components/Disclosures/disclosure.tsx");const FindOnShelfManifestationListItem=({shelfmark,department,location,sublocation,title,publicationYear,numberAvailable})=>{const t=(0,utils_text.F)(),locationArray=[department,location,sublocation,shelfmark?`${shelfmark.shelfmark} ${shelfmark.postfix}`:void 0].filter((el=>el));return react.createElement("li",{className:"find-on-shelf__row text-body-medium-regular",role:"row"},react.createElement("span",{className:"find-on-shelf__material-text",role:"cell"},title,publicationYear&&` (${publicationYear})`),react.createElement("span",{role:"cell"},locationArray.length?locationArray.join(" · "):t("findOnShelfModalNoLocationSpecifiedText")),react.createElement("span",{className:"find-on-shelf__item-count-text",role:"cell"},numberAvailable))},find_on_shelf_FindOnShelfManifestationListItem=FindOnShelfManifestationListItem;try{FindOnShelfManifestationListItem.displayName="FindOnShelfManifestationListItem",FindOnShelfManifestationListItem.__docgenInfo={description:"",displayName:"FindOnShelfManifestationListItem",props:{shelfmark:{defaultValue:null,description:"",name:"shelfmark",required:!0,type:{name:'{ __typename?: "Shelfmark" | undefined; postfix?: string | null | undefined; shelfmark: string; } | null | undefined'}},department:{defaultValue:null,description:"",name:"department",required:!0,type:{name:"string | undefined"}},location:{defaultValue:null,description:"",name:"location",required:!0,type:{name:"string | undefined"}},sublocation:{defaultValue:null,description:"",name:"sublocation",required:!0,type:{name:"string | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},publicationYear:{defaultValue:null,description:"",name:"publicationYear",required:!0,type:{name:"string | null"}},numberAvailable:{defaultValue:null,description:"",name:"numberAvailable",required:!0,type:{name:"number"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"]={docgenInfo:FindOnShelfManifestationListItem.__docgenInfo,name:"FindOnShelfManifestationListItem",path:"src/components/find-on-shelf/FindOnShelfManifestationListItem.tsx#FindOnShelfManifestationListItem"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfManifestationList=({libraryBranchHoldings})=>{const t=(0,utils_text.F)();return react.createElement("ul",{className:"find-on-shelf",role:"table","aria-label":t("findOnShelfTableDescriptionText",{placeholders:{"@work":libraryBranchHoldings[0].manifestation.titles.main[0],"@branch":libraryBranchHoldings[0].holding.branch.title}})},react.createElement("li",{className:"find-on-shelf__header-row text-small-caption",role:"row"},react.createElement("span",{className:"find-on-shelf__material-header",role:"columnheader"},t("findOnShelfModalListMaterialText")),react.createElement("span",{role:"columnheader"},t("findOnShelfModalListFindOnShelfText")),react.createElement("span",{className:"find-on-shelf__item-count-header capitalize-first",role:"columnheader"},t("findOnShelfModalListItemCountText"))),libraryBranchHoldings.map((branchHolding=>{var _branchHolding$holdin,_branchHolding$holdin2,_branchHolding$holdin3;return react.createElement(find_on_shelf_FindOnShelfManifestationListItem,{shelfmark:branchHolding.manifestation.shelfmark,department:null===(_branchHolding$holdin=branchHolding.holding.department)||void 0===_branchHolding$holdin?void 0:_branchHolding$holdin.title,location:null===(_branchHolding$holdin2=branchHolding.holding.location)||void 0===_branchHolding$holdin2?void 0:_branchHolding$holdin2.title,sublocation:null===(_branchHolding$holdin3=branchHolding.holding.sublocation)||void 0===_branchHolding$holdin3?void 0:_branchHolding$holdin3.title,title:branchHolding.manifestation.titles.main.join(", "),publicationYear:(0,general.Ey)(branchHolding.manifestation),numberAvailable:(0,helper.Uc)(branchHolding.holding.materials),key:branchHolding.holding.branch.branchId})})))},find_on_shelf_FindOnShelfManifestationList=FindOnShelfManifestationList;try{FindOnShelfManifestationList.displayName="FindOnShelfManifestationList",FindOnShelfManifestationList.__docgenInfo={description:"",displayName:"FindOnShelfManifestationList",props:{libraryBranchHoldings:{defaultValue:null,description:"",name:"libraryBranchHoldings",required:!0,type:{name:"ManifestationHoldings"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"]={docgenInfo:FindOnShelfManifestationList.__docgenInfo,name:"FindOnShelfManifestationList",path:"src/components/find-on-shelf/FindOnShelfManifestationList.tsx#FindOnShelfManifestationList"})}catch(__react_docgen_typescript_loader_error){}var Dropdown=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),periodical_helper=__webpack_require__("./src/components/material/periodical/helper.ts");const find_on_shelf_FindOnShelfPeriodicalDropdowns=({manifestationsHoldings,setSelectedPeriodical,selectedPeriodical})=>{const t=(0,utils_text.F)(),periodicalEditionsBase=(0,periodical_helper.Qp)(manifestationsHoldings[0].holdings),groupedPeriodicalEditionsBase=(0,general.kj)(periodicalEditionsBase,"volumeYear"),periodicalEditions=(0,periodical_helper.LM)(groupedPeriodicalEditionsBase),sortedPeriodicalYears=Object.keys(periodicalEditions).sort(),[selectedYear,setSelectedYear]=(0,react.useState)(selectedPeriodical.volumeYear);return react.createElement("div",{className:"modal-find-on-shelf__periodical-dropdowns"},react.createElement(Dropdown.A,{classNames:"dropdown--grey-borders",options:sortedPeriodicalYears.map((volumeYear=>({label:volumeYear,value:volumeYear}))),arrowIcon:"chevron",defaultValue:selectedYear,handleOnChange:event=>{(0,periodical_helper.yF)(event.target.value,setSelectedYear,setSelectedPeriodical,periodicalEditions,groupedPeriodicalEditionsBase)},ariaLabel:t("findOnShelfModalPeriodicalYearDropdownText")}),selectedYear&&react.createElement(Dropdown.A,{classNames:"dropdown--grey-borders",options:periodicalEditions[selectedYear].map((periodicalEdition=>({label:periodicalEdition,value:periodicalEdition}))),arrowIcon:"chevron",defaultValue:selectedPeriodical.volumeNumber,handleOnChange:event=>{(0,periodical_helper.HO)(groupedPeriodicalEditionsBase,selectedYear,event.target.value,setSelectedPeriodical)},ariaLabel:t("findOnShelfModalPeriodicalEditionDropdownText")}))};try{FindOnShelfPeriodicalDropdowns.displayName="FindOnShelfPeriodicalDropdowns",FindOnShelfPeriodicalDropdowns.__docgenInfo={description:"",displayName:"FindOnShelfPeriodicalDropdowns",props:{manifestationsHoldings:{defaultValue:null,description:"",name:"manifestationsHoldings",required:!0,type:{name:"HoldingsForBibliographicalRecordV3[]"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"]={docgenInfo:FindOnShelfPeriodicalDropdowns.__docgenInfo,name:"FindOnShelfPeriodicalDropdowns",path:"src/components/find-on-shelf/FindOnShelfPeriodicalDropdowns.tsx#FindOnShelfPeriodicalDropdowns"})}catch(__react_docgen_typescript_loader_error){}var utils_config=__webpack_require__("./src/core/utils/config.tsx"),DisclosureSummary=__webpack_require__("./src/components/Disclosures/DisclosureSummary.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const findOnShelfModalId=faustIds=>constructModalId("find-on-shelf-modal",faustIds.sort()),FindOnShelfModalBody=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const config=(0,utils_config.UK)(),t=(0,utils_text.F)(),faustIdArray=(0,general.e$)(manifestations).map((manifestationPid=>(0,general.G_)(manifestationPid))),{data,isLoading}=(0,helper.us)({faustIds:faustIdArray,useAvailabilityBlacklist:!0,config}),author=(0,general.sP)((0,general.UV)(authors),t),title=workTitles.join(", "),isPeriodical=manifestations.some((manifestation=>manifestation.materialTypes.some((materialType=>"tidsskrift"===materialType.materialTypeSpecific.display))));if(!data||data.length<1)return null;const pairedManifestationsWithBranches=data.map(((holdingsPerManifestation,index)=>holdingsPerManifestation.holdings.map((holding=>({manifestation:manifestations[index],holding}))))).flat(),allBranches=data.map((item=>item.holdings.map((holding=>holding.branch.branchId)))).flat();let finalData=Array.from(new Set(allBranches)).map((branch=>pairedManifestationsWithBranches.filter((manifestationWithBranch=>manifestationWithBranch.holding.branch.branchId===branch))));function orderManifestationHoldingsAlphabetically(a,b){return a[0].holding.branch.title.localeCompare(b[0].holding.branch.title,"da-DK")}selectedPeriodical&&(finalData=finalData.map((branchManifestationHoldings=>branchManifestationHoldings.map((manifestationHoldings=>({...manifestationHoldings,holding:{...manifestationHoldings.holding,materials:manifestationHoldings.holding.materials.filter((material=>{var _material$periodical;return(null===(_material$periodical=material.periodical)||void 0===_material$periodical?void 0:_material$periodical.volumeNumber)===selectedPeriodical.volumeNumber&&material.periodical.volumeYear===selectedPeriodical.volumeYear}))}}))).filter((manifestationHoldings=>null!==manifestationHoldings)))));const[availableManifestationHoldings,unavailableManifestationHoldings]=partition_default()(finalData,helper.XX),finalDataToShow=availableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b))).concat(unavailableManifestationHoldings.sort(((a,b)=>orderManifestationHoldingsAlphabetically(a,b)))).sort((manifestationHolding=>manifestationHolding[0].holding.branch.branchId.endsWith("00")?-1:1)).filter((libraryBranch=>!config("blacklistedAvailabilityBranchesConfig",{transformer:"stringToArray"}).includes(libraryBranch[0].holding.branch.branchId)));return react.createElement(react.Fragment,null,react.createElement("h2",{className:"text-header-h2 modal-find-on-shelf__headline"},title,author&&` / ${author}`),isPeriodical&&selectedPeriodical&&react.createElement(find_on_shelf_FindOnShelfPeriodicalDropdowns,{manifestationsHoldings:data,setSelectedPeriodical,selectedPeriodical}),isLoading&&react.createElement("p",{className:"text-body-large ml-16 mt-96"},t("loadingText")),!isLoading&&react.createElement(react.Fragment,null,react.createElement("div",{className:"text-small-caption modal-find-on-shelf__caption"},`${(0,helper.CL)(finalDataToShow)} ${t("librariesHaveTheMaterialText")}`),finalDataToShow.map((libraryBranch=>react.createElement(disclosure.A,{key:libraryBranch[0].holding.branch.branchId,open:1===finalData.length,className:"disclosure--full-width",dataCy:"find-on-shelf-modal-body-disclosure",summary:react.createElement(DisclosureSummary.A,{title:libraryBranch[0].holding.branch.title,isAvailable:(0,helper.XX)(libraryBranch)})},react.createElement(find_on_shelf_FindOnShelfManifestationList,{libraryBranchHoldings:libraryBranch}))))))},find_on_shelf_FindOnShelfModalBody=FindOnShelfModalBody;try{findOnShelfModalId.displayName="findOnShelfModalId",findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"]={docgenInfo:findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModalBody.displayName="FindOnShelfModalBody",FindOnShelfModalBody.__docgenInfo={description:"",displayName:"FindOnShelfModalBody",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"]={docgenInfo:FindOnShelfModalBody.__docgenInfo,name:"FindOnShelfModalBody",path:"src/components/find-on-shelf/FindOnShelfModalBody.tsx#FindOnShelfModalBody"})}catch(__react_docgen_typescript_loader_error){}const FindOnShelfModal_findOnShelfModalId=faustIds=>(0,modal_helpers.Q0)("find-on-shelf-modal",faustIds.sort()),FindOnShelfModal=({manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical})=>{const t=(0,utils_text.F)(),faustIds=(0,general.bn)(manifestations),modalId=`${FindOnShelfModal_findOnShelfModalId(faustIds)}`;return react.createElement(modal.A,{modalId,screenReaderModalDescriptionText:t("findOnShelfModalScreenReaderModalDescriptionText"),closeModalAriaLabelText:t("findOnShelfModalCloseModalAriaLabelText"),classNames:"modal-details modal-find-on-shelf"},react.createElement(find_on_shelf_FindOnShelfModalBody,{manifestations,workTitles,authors,selectedPeriodical,setSelectedPeriodical}))},find_on_shelf_FindOnShelfModal=FindOnShelfModal;try{FindOnShelfModal_findOnShelfModalId.displayName="findOnShelfModalId",FindOnShelfModal_findOnShelfModalId.__docgenInfo={description:"",displayName:"findOnShelfModalId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"]={docgenInfo:FindOnShelfModal_findOnShelfModalId.__docgenInfo,name:"findOnShelfModalId",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#findOnShelfModalId"})}catch(__react_docgen_typescript_loader_error){}try{FindOnShelfModal.displayName="FindOnShelfModal",FindOnShelfModal.__docgenInfo={description:"",displayName:"FindOnShelfModal",props:{manifestations:{defaultValue:null,description:"",name:"manifestations",required:!0,type:{name:"Manifestation[]"}},workTitles:{defaultValue:null,description:"",name:"workTitles",required:!0,type:{name:"string[]"}},authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:'({ __typename: "Corporation"; display: string; } | { __typename: "Person"; display: string; })[]'}},selectedPeriodical:{defaultValue:null,description:"",name:"selectedPeriodical",required:!0,type:{name:"PeriodicalEdition | null"}},setSelectedPeriodical:{defaultValue:null,description:"",name:"setSelectedPeriodical",required:!0,type:{name:"(selectedPeriodical: PeriodicalEdition) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"]={docgenInfo:FindOnShelfModal.__docgenInfo,name:"FindOnShelfModal",path:"src/components/find-on-shelf/FindOnShelfModal.tsx#FindOnShelfModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/guarded-app.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/date.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/user.ts");const __WEBPACK_DEFAULT_EXPORT__=({app,children})=>{const dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),{request:persistedRequest}=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)((state=>state.guardedRequests)),isApplicationBlocked=persistedRequest&&!(0,_core_utils_helpers_user__WEBPACK_IMPORTED_MODULE_4__.ok)(),didAuthenticate=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.d6)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.l0);return console.debug("PERSISTED REQUEST:",persistedRequest),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{persistedRequest&&(console.debug("HAS REQUEST EXPIRED?",(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.d2)(persistedRequest)),console.debug("CURRENT TIMESTAMP",(0,_core_utils_helpers_date__WEBPACK_IMPORTED_MODULE_3__.Ay)()),console.debug("EXPIRE TIMESTAMP",persistedRequest.expire),(0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.d2)(persistedRequest)&&dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.ss)()))}),[dispatch,persistedRequest]),(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(!isApplicationBlocked)return;const{app:persistedRequestApp}=persistedRequest;didAuthenticate&&app===persistedRequestApp&&(dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.Cp)(persistedRequest)),(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.MR)(_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.l0),dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_2__.ss)()))}),[app,didAuthenticate,dispatch,isApplicationBlocked,persistedRequest]),isApplicationBlocked?react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null):react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,children)};try{guardedapp.displayName="guardedapp",guardedapp.__docgenInfo={description:"",displayName:"guardedapp",props:{app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'},{value:'"recommended-material"'},{value:'"recommendation"'},{value:'"material-grid-automatic"'},{value:'"material-grid-manual"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/guarded-app.tsx#guardedapp"]={docgenInfo:guardedapp.__docgenInfo,name:"guardedapp",path:"src/components/guarded-app.tsx#guardedapp"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/hello/hello.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{HelloAnimal:()=>HelloAnimal,HelloHuman:()=>HelloHuman,HelloWorld:()=>HelloWorld,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_hello__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/hello/hello.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const WrappedHello=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.i)(_hello__WEBPACK_IMPORTED_MODULE_1__.F),__WEBPACK_DEFAULT_EXPORT__={title:"Components/Hello",component:WrappedHello,argTypes:{..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_3__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_4__.A,whatText:{defaultValue:"world",control:{type:"text"}},shouldBeEmphasized:{defaultValue:!0}}},Template=props=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedHello,props),HelloWorld=Template.bind({}),HelloHuman=Template.bind({});HelloWorld.args={whatText:"human"};const HelloAnimal=Template.bind({});HelloWorld.args={whatText:"animal"}},"./src/components/hello/hello.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>Hello});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const Hello=({shouldBeEmphasized})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,"Hello"," ",shouldBeEmphasized?react__WEBPACK_IMPORTED_MODULE_0__.createElement("strong",null,t("whatText")):t("whatText"),"!")};try{Hello.displayName="Hello",Hello.__docgenInfo={description:"",displayName:"Hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#Hello"]={docgenInfo:Hello.__docgenInfo,name:"Hello",path:"src/components/hello/hello.tsx#Hello"})}catch(__react_docgen_typescript_loader_error){}try{hello.displayName="hello",hello.__docgenInfo={description:"",displayName:"hello",props:{shouldBeEmphasized:{defaultValue:null,description:"",name:"shouldBeEmphasized",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/hello/hello.tsx#hello"]={docgenInfo:hello.__docgenInfo,name:"hello",path:"src/components/hello/hello.tsx#hello"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/horizontal-term-line/HorizontalTermLine.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>horizontal_term_line_HorizontalTermLine});var react=__webpack_require__("./node_modules/react/index.js"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),utils_text=__webpack_require__("./src/core/utils/text.tsx");const ButtonExpand=({showMore,setShowMore})=>{const t=(0,utils_text.F)();return react.createElement("button",{className:"button-expand",type:"button",onClick:()=>setShowMore(!showMore),"aria-label":t("expandMoreText")},react.createElement("img",{className:(0,clsx.A)("button-expand__image",{"button-expand__image--expanded":showMore}),src:ExpandMore_default(),alt:""}))},button_expand_ButtonExpand=ButtonExpand;try{ButtonExpand.displayName="ButtonExpand",ButtonExpand.__docgenInfo={description:"",displayName:"ButtonExpand",props:{showMore:{defaultValue:null,description:"",name:"showMore",required:!0,type:{name:"boolean"}},setShowMore:{defaultValue:null,description:"",name:"setShowMore",required:!0,type:{name:"(showMore: boolean) => void"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/button-expand/ButtonExpand.tsx#ButtonExpand"]={docgenInfo:ButtonExpand.__docgenInfo,name:"ButtonExpand",path:"src/components/button-expand/ButtonExpand.tsx#ButtonExpand"})}catch(__react_docgen_typescript_loader_error){}const HorizontalTermLine=({title,subTitle,linkList,dataCy="horizontal-term-line"})=>{const[showMore,setShowMore]=(0,react.useState)(!1),itemsToShow=showMore?linkList:linkList.slice(0,3),showMoreButton=linkList.length>3;return 0===linkList.length?null:react.createElement("div",{"data-cy":dataCy,className:"text-small-caption horizontal-term-line"},react.createElement("h3",{className:"text-label-bold"},title||""," ",subTitle&&react.createElement("span",{className:"text-small-caption"},` ${subTitle}`)),itemsToShow.map((item=>{const{term,url}=item;return react.createElement("span",{key:term},react.createElement(Link.A,{href:url,className:"link-tag",stopPropagation:!0},term))})),showMoreButton&&react.createElement(button_expand_ButtonExpand,{showMore,setShowMore}))},horizontal_term_line_HorizontalTermLine=HorizontalTermLine;try{HorizontalTermLine.displayName="HorizontalTermLine",HorizontalTermLine.__docgenInfo={description:"",displayName:"HorizontalTermLine",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string | undefined"}},linkList:{defaultValue:null,description:"",name:"linkList",required:!0,type:{name:"{ url: URL; term: string; }[]"}},dataCy:{defaultValue:{value:"horizontal-term-line"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"]={docgenInfo:HorizontalTermLine.__docgenInfo,name:"HorizontalTermLine",path:"src/components/horizontal-term-line/HorizontalTermLine.tsx#HorizontalTermLine"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/list-details/list-details.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const __WEBPACK_DEFAULT_EXPORT__=({icon,title,labels,showSelect,setShowSelect,idForLabelledBy,children})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__icon"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5",id:idForLabelledBy},title),"string"==typeof labels&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},labels),"string"!=typeof labels&&labels.map((label=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{key:label,className:"text-small-caption"},label)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"list-details__dropdown"},children)),null!==showSelect&&!showSelect&&setShowSelect&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{type:"button",className:"link-tag",onClick:()=>setShowSelect(!0)},t("reservationDetailsChangeText")))};try{listdetails.displayName="listdetails",listdetails.__docgenInfo={description:"",displayName:"listdetails",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},labels:{defaultValue:null,description:"",name:"labels",required:!0,type:{name:"string | string[]"}},showSelect:{defaultValue:null,description:"",name:"showSelect",required:!1,type:{name:"boolean | undefined"}},setShowSelect:{defaultValue:null,description:"",name:"setShowSelect",required:!1,type:{name:"((show: boolean) => void) | undefined"}},idForLabelledBy:{defaultValue:null,description:"",name:"idForLabelledBy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/list-details/list-details.tsx#listdetails"]={docgenInfo:listdetails.__docgenInfo,name:"listdetails",path:"src/components/list-details/list-details.tsx#listdetails"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/MaterialDetailsList.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{w:()=>ListItemType,A:()=>material_MaterialDetailsList});var react=__webpack_require__("./node_modules/react/index.js");const description_list=({data,classNames,id})=>react.createElement("dl",{id,className:`list-description ${classNames??""}`,"data-cy":"list-description"},data.map((item=>{const{label,value}=item;return react.createElement("div",{className:"list-description__item"},react.createElement("dt",{className:"list-description__key"},label),react.createElement("dd",{className:"list-description__value"},value))})));try{descriptionlist.displayName="descriptionlist",descriptionlist.__docgenInfo={description:"",displayName:"descriptionlist",props:{classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"{ label: string; value: ReactNode; }[]"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/description-list/description-list.tsx#descriptionlist"]={docgenInfo:descriptionlist.__docgenInfo,name:"descriptionlist",path:"src/components/description-list/description-list.tsx#descriptionlist"})}catch(__react_docgen_typescript_loader_error){}let ListItemType=function(ListItemType){return ListItemType.Standard="standard",ListItemType.Link="link",ListItemType.List="list",ListItemType}({});const ListItem=({value})=>0===value.length?null:react.createElement("ul",{className:"list-description__value--list"},value.map((item=>react.createElement("li",{key:item},item)))),MaterialDetailsListRow=({type,value})=>{switch(type){case ListItemType.Link:return react.createElement("span",{className:"link-tag pr-4"},value);case ListItemType.List:return Array.isArray(value)?react.createElement(ListItem,{value}):null;default:return react.createElement("span",null,value)}},MaterialDetailsList=({data,className,id})=>{const listData=data.filter((item=>item.value)).map((item=>{const{label,value,type}=item;return{label,value:react.createElement(MaterialDetailsListRow,{type,value})}}));return react.createElement(description_list,{id,data:listData,classNames:className})},material_MaterialDetailsList=MaterialDetailsList;try{MaterialDetailsList.displayName="MaterialDetailsList",MaterialDetailsList.__docgenInfo={description:"",displayName:"MaterialDetailsList",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | undefined"}},data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"ListData"}},id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"]={docgenInfo:MaterialDetailsList.__docgenInfo,name:"MaterialDetailsList",path:"src/components/material/MaterialDetailsList.tsx#MaterialDetailsList"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/generic/MaterialButtonLoading.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const MaterialButtonLoading=({size,classNames})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.$,{label:t("loadingText"),buttonType:"none",variant:"filled",disabled:!0,collapsible:!1,size:size||"large",classNames:classNames||""})},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonLoading;try{MaterialButtonLoading.displayName="MaterialButtonLoading",MaterialButtonLoading.__docgenInfo={description:"",displayName:"MaterialButtonLoading",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"]={docgenInfo:MaterialButtonLoading.__docgenInfo,name:"MaterialButtonLoading",path:"src/components/material/material-buttons/generic/MaterialButtonLoading.tsx#MaterialButtonLoading"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/material-buttons/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BG:()=>isArticle,D7:()=>hasCorrectAccessType,S5:()=>hasCorrectMaterialType,ft:()=>hasCorrectAccess});var _core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/types/material-type.ts");const hasCorrectAccess=(desiredAccess,manifestations)=>manifestations.some((manifestation=>manifestation.access.some((({__typename})=>__typename.toLowerCase()===desiredAccess.toLowerCase())))),hasCorrectAccessType=(desiredAccessType,manifestations)=>manifestations.some((manifestation=>manifestation.accessTypes.some((type=>type.code===desiredAccessType)))),hasCorrectMaterialType=(desiredMaterialType,manifestations)=>manifestations.some((manifestation=>manifestation.materialTypes.some((type=>type.materialTypeSpecific.display.toLowerCase()===desiredMaterialType.toLowerCase())))),isArticle=manifestations=>((desiredPartialMaterialType,manifestations)=>manifestations.some((manifestation=>manifestation.materialTypes.some((type=>type.materialTypeSpecific.display.toLowerCase().includes(desiredPartialMaterialType.toLowerCase()))))))(_core_utils_types_material_type__WEBPACK_IMPORTED_MODULE_0__.sN.article,manifestations)},"./src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/Buttons/Button.tsx"),_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/find-on-shelf/FindOnShelfModal.tsx");const MaterialButtonsFindOnShelf=({size,faustIds,dataCy="material-buttons-find-on-shelf"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_2__.F)(),{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.X)(),modalId=(0,_find_on_shelf_FindOnShelfModal__WEBPACK_IMPORTED_MODULE_4__.f)(faustIds),onClick=()=>{open(modalId)};return"small"!==size?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_3__.$,{label:t("findOnBookshelfText"),buttonType:"none",variant:"outline",disabled:!1,collapsible:!1,size:"large",onClick,dataCy}):react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{className:"link-tag text-small-caption material-manifestation-item__find capitalize-all btn-ui","aria-describedby":t("findOnShelfExpandButtonExplanationText"),onClick,onKeyUp:e=>{"Enter"===e.key&&onClick()},tabIndex:0,type:"button","data-cy":dataCy},t("findOnBookshelfText"))},__WEBPACK_DEFAULT_EXPORT__=MaterialButtonsFindOnShelf;try{MaterialButtonsFindOnShelf.displayName="MaterialButtonsFindOnShelf",MaterialButtonsFindOnShelf.__docgenInfo={description:"",displayName:"MaterialButtonsFindOnShelf",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"xsmall"'},{value:'"small"'},{value:'"medium"'},{value:'"large"'},{value:'"xlarge"'}]}},faustIds:{defaultValue:null,description:"",name:"faustIds",required:!0,type:{name:"string[]"}},dataCy:{defaultValue:{value:"material-buttons-find-on-shelf"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"]={docgenInfo:MaterialButtonsFindOnShelf.__docgenInfo,name:"MaterialButtonsFindOnShelf",path:"src/components/material/material-buttons/physical/MaterialButtonsFindOnShelf.tsx#MaterialButtonsFindOnShelf"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/material/periodical/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{HO:()=>handleSelectEdition,LM:()=>filterAndSortPeriodicalEditions,Qp:()=>makePeriodicalEditionsFromHoldings,Vf:()=>getLatestEditionFromYear,yF:()=>handleSelectYear});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/mapValues.js"),lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_mapValues__WEBPACK_IMPORTED_MODULE_1__);const getLatestEditionFromYear=(year,groupList)=>groupList[year][groupList[year].length-1];function makePeriodicalEditionsFromHoldings(holdings){return holdings.map((holding=>holding.materials.flat().map((material=>({...material.periodical,itemNumber:material.itemNumber}))))).flat()}function filterAndSortPeriodicalEditions(baseData){const yearVolumes=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(baseData,(editions=>editions.map((edition=>edition.volumeNumber)))),yearVolumesSorted=lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumes,(volumes=>volumes.filter((volume=>!!volume)).sort(((a,b)=>a.localeCompare(b,"da-DK",{numeric:!0})))));return lodash_mapValues__WEBPACK_IMPORTED_MODULE_1___default()(yearVolumesSorted,(volumes=>lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(volumes)))}function handleSelectEdition(groupList,year,editionToMatch,selectPeriodicalHandler){const changedFullPeriodicalEdition=groupList[year].find((edition=>edition.volumeNumber===editionToMatch));changedFullPeriodicalEdition&&selectPeriodicalHandler(changedFullPeriodicalEdition)}function handleSelectYear(year,setYear,selectPeriodicalHandler,periodicalEditions,groupList){setYear(year);handleSelectEdition(groupList,year,getLatestEditionFromYear(year,periodicalEditions),selectPeriodicalHandler)}},"./src/components/message/modal-message/ModalMessage.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ModalMessageExample:()=>ModalMessageExample,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/modal.tsx"),_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const{open}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.X)();return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{open("modal-message")}),[open]),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_1__.A,{modalId:"modal-message",closeModalAriaLabelText:"close",screenReaderModalDescriptionText:"modal message story",classNames:"modal-cta modal-padding"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,_extends({},props,{ctaButton:{modalId:"modal-message",text:"Man"}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",null,"Hello, I am some extra info")))}).bind({})},"./src/components/message/modal-message/ModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>modal_message_ModalMessage});var react=__webpack_require__("./node_modules/react/index.js"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react);try{withFocusTrap.displayName="withFocusTrap",withFocusTrap.__docgenInfo={description:"",displayName:"withFocusTrap",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withFocusTrap.tsx#withFocusTrap"]={docgenInfo:withFocusTrap.__docgenInfo,name:"withFocusTrap",path:"src/core/utils/withFocusTrap.tsx#withFocusTrap"})}catch(__react_docgen_typescript_loader_error){}const Message=({children,title,subTitle})=>react.createElement(react.Fragment,null,react.createElement("h2",{"data-cy":"message-title",className:"text-header-h2"},title),react.createElement("div",{className:"color-secondary-gray text-body-medium-regular mt-48"},react.createElement("p",{"data-cy":"message-subtitle"},subTitle)),children&&react.createElement("div",null,children)),modal_message_Message=Message;try{Message.displayName="Message",Message.__docgenInfo={description:"",displayName:"Message",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/Message.tsx#Message"]={docgenInfo:Message.__docgenInfo,name:"Message",path:"src/components/message/modal-message/Message.tsx#Message"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/components/Buttons/Button.tsx"),modal=__webpack_require__("./src/core/utils/modal.tsx");const ModalMessage=react.forwardRef((props=>{const{close,closeAll}=(0,modal.X)(),{ctaButton,...messageProps}=props;return react.createElement("div",{className:"modal-cta__container"},react.createElement(modal_message_Message,messageProps),react.createElement("div",{className:"modal-cta__buttons mt-48"},ctaButton&&react.createElement(Button.$,{dataCy:ctaButton.dataCy??"modal-cta-button",classNames:"modal-message__confirm-button",label:ctaButton.text,buttonType:"none",disabled:!1,collapsible:!1,size:"small",variant:"filled",onClick:()=>{ctaButton.callback&&ctaButton.callback(),ctaButton.modalId&&close(ctaButton.modalId),ctaButton.closeAllModals&&closeAll()}})))})),modal_message_ModalMessage=(Component=ModalMessage,({withFocusTrap,...props})=>react.createElement(focus_trap_react_default(),{focusTrapOptions:{allowOutsideClick:!0}},react.createElement(Component,props)));var Component;try{ModalMessage.displayName="ModalMessage",ModalMessage.__docgenInfo={description:"",displayName:"ModalMessage",props:{ctaButton:{defaultValue:null,description:"",name:"ctaButton",required:!1,type:{name:"({ text: string; callback?: (() => void) | undefined; dataCy?: string | undefined; } & (RequiredModalId | RequireCloseAllModals)) | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!0,type:{name:"string"}},withFocusTrap:{defaultValue:null,description:"",name:"withFocusTrap",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/message/modal-message/ModalMessage.tsx#ModalMessage"]={docgenInfo:ModalMessage.__docgenInfo,name:"ModalMessage",path:"src/components/message/modal-message/ModalMessage.tsx#ModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/modal-details-header/modal-details-header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_cover_cover__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/cover/cover.tsx");const __WEBPACK_DEFAULT_EXPORT__=({authors,year,title,pid,description,materialType,isbnForCover,periodical,series,children})=>{const coverIds=[pid||isbnForCover];return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__cover"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"material-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"material material--large bg-identity-tint-120 material__animate"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_1__.Y,{ids:coverIds,idType:pid?"pid":"isbn",size:"large",animate:!1,alt:description||""})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__material"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"modal-details__tags"},materialType&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"status-label status-label--outline"},materialType),children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2",{className:"modal-details__title text-header-h2"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular","data-cy":"modal-authors"},authors,year&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null," (",year,")")),periodical&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-medium-regular"},periodical),series&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{"data-cy":"modal-series",className:"text-body-medium-regular"},series)))};try{modaldetailsheader.displayName="modaldetailsheader",modaldetailsheader.__docgenInfo={description:"",displayName:"modaldetailsheader",props:{authors:{defaultValue:null,description:"",name:"authors",required:!0,type:{name:"string | null | undefined"}},year:{defaultValue:null,description:"",name:"year",required:!0,type:{name:"string | null | undefined"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string | null | undefined"}},pid:{defaultValue:null,description:"",name:"pid",required:!1,type:{name:"`${number}-${string}:${string}` | null | undefined"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string | null | undefined"}},materialType:{defaultValue:null,description:"",name:"materialType",required:!0,type:{name:"string | null | undefined"}},isbnForCover:{defaultValue:null,description:"",name:"isbnForCover",required:!0,type:{name:"string"}},periodical:{defaultValue:null,description:"",name:"periodical",required:!1,type:{name:"string | null | undefined"}},series:{defaultValue:null,description:"",name:"series",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"]={docgenInfo:modaldetailsheader.__docgenInfo,name:"modaldetailsheader",path:"src/components/modal-details-header/modal-details-header.tsx#modaldetailsheader"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/multiselect/Multiselect.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,MultipleSelected:()=>MultipleSelected,SingleSelected:()=>SingleSelected,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_Multiselect__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/multiselect/Multiselect.tsx"),_core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),_core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/storybook/globalConfigArgs.ts"),_core_utils_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/url.tsx");const WrappedMultiselect=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_4__.i)((0,_core_utils_url__WEBPACK_IMPORTED_MODULE_5__.nU)(_Multiselect__WEBPACK_IMPORTED_MODULE_1__.A)),options=[{item:"alertErrorMessageText",value:"1"},{item:"availabilityAvailableText",value:"2"},{item:"availabilityUnavailableText",value:"3"}],__WEBPACK_DEFAULT_EXPORT__={title:"Components / Multiselect",component:WrappedMultiselect,argTypes:{..._core_storybook_globalTextArgs__WEBPACK_IMPORTED_MODULE_2__.A,..._core_storybook_globalConfigArgs__WEBPACK_IMPORTED_MODULE_3__.A,caption:{name:"Caption",control:{type:"text"}},updateExternalState:{table:{disable:!0}}},args:{caption:"Title",options}},Template=args=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(WrappedMultiselect,args),Default=Template.bind({}),SingleSelected=Template.bind({});SingleSelected.args={defaultValue:options.slice(0,1)};const MultipleSelected=Template.bind({});MultipleSelected.args={defaultValue:options.slice(0,2)}},"./src/components/multiselect/Multiselect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>multiselect_Multiselect});var react=__webpack_require__("./node_modules/react/index.js"),ExpandMore=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),ExpandMore_default=__webpack_require__.n(ExpandMore),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),useClickAway=__webpack_require__("./node_modules/react-use/esm/useClickAway.js"),useDeepCompareEffect=__webpack_require__("./node_modules/react-use/esm/useDeepCompareEffect.js"),Checkbox=__webpack_require__("./src/components/checkbox/Checkbox.tsx");const multiselect_useMultiselectOptions=function useMultiselectOptions(options,allOption){return{allOptions:[allOption,...options]}};var utils_text=__webpack_require__("./src/core/utils/text.tsx");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const id=(0,react.useId)(),t=(0,utils_text.F)(),ref=(0,react.useRef)(null),[isDropdownOpen,setIsDropdownOpen]=(0,react.useState)(!1),updateState=(updateKey,value)=>{updateExternalState&&updateKey&&updateExternalState.externalUpdateFunction({key:updateKey,value})},{allOptions}=multiselect_useMultiselectOptions(options,{item:"multiselectAllOptionText",value:"all"}),initialSelectedOptions=defaultValue.length>0?defaultValue:allOptions.slice(0,1),{getDropdownProps,setSelectedItems,selectedItems}=(0,downshift_esm.mH)({initialSelectedItems:initialSelectedOptions});(0,useClickAway.A)(ref,(()=>{setIsDropdownOpen(!1)})),(0,useDeepCompareEffect.A)((()=>{setSelectedItems(initialSelectedOptions)}),[setSelectedItems,initialSelectedOptions]);const{getToggleButtonProps,getMenuProps,highlightedIndex,getItemProps}=((isDropdownOpen,allOptions,selectedItems,setSelectedItems,handleSelectedItems)=>(0,downshift_esm.WM)({isOpen:isDropdownOpen,selectedItem:null,items:allOptions,stateReducer:(state,actionAndChanges)=>{const{changes,type}=actionAndChanges;switch(type){case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownEnter:case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownSpaceButton:case downshift_esm.WM.stateChangeTypes.ItemClick:return{...changes,isOpen:!0}}return changes},onStateChange:({type,selectedItem:newSelectedItem})=>{switch(type){case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownSpaceButton:case downshift_esm.WM.stateChangeTypes.ItemClick:case downshift_esm.WM.stateChangeTypes.ToggleButtonKeyDownEnter:if(newSelectedItem&&!selectedItems.find((item=>item.value===newSelectedItem.value)))return void setSelectedItems(handleSelectedItems(selectedItems,newSelectedItem,allOptions.length));if(newSelectedItem&&selectedItems.find((item=>item.value===newSelectedItem.value))){if(1===selectedItems.length)return;const newSelectedItems=selectedItems.filter((item=>item.value!==newSelectedItem.value));setSelectedItems(handleSelectedItems(newSelectedItems,null,allOptions.length))}}}}))(isDropdownOpen,allOptions,selectedItems,setSelectedItems,((allCurrentlySelected,newSelected,allPossibleOptions)=>newSelected?allCurrentlySelected.find((item=>"all"===item.value))&&"all"!==newSelected.value?((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>{const newValue=[...selectedItems.filter((item=>"all"!==item.value)),newSelected];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(allCurrentlySelected,newSelected,updateState,updateExternalState,setSelectedItems):"all"!==newSelected.value&&[...allCurrentlySelected,newSelected].length===allPossibleOptions-1?((updateState,updateExternalState,setSelectedItems)=>{const newValue=[{item:"multiselectAllOptionText",value:"all"}];return updateState(null==updateExternalState?void 0:updateExternalState.key,newValue),setSelectedItems(newValue),newValue})(updateState,updateExternalState,setSelectedItems):"all"===newSelected.value?(updateState(null==updateExternalState?void 0:updateExternalState.key,[newSelected]),setSelectedItems([newSelected]),[newSelected]):((selectedItems,newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,[...selectedItems,newSelected]),setSelectedItems([...selectedItems,newSelected]),[...selectedItems,newSelected]))(selectedItems,newSelected,updateState,updateExternalState,setSelectedItems):((newSelected,updateState,updateExternalState,setSelectedItems)=>(updateState(null==updateExternalState?void 0:updateExternalState.key,newSelected),setSelectedItems(newSelected),newSelected))(allCurrentlySelected,updateState,updateExternalState,setSelectedItems)));return react.createElement(react.Fragment,null,caption&&react.createElement("div",{className:"multiselect__caption"},caption),react.createElement("div",{className:"multiselect",ref,"data-cy":dataCy},react.createElement("button",_extends({type:"button",className:"multiselect focus-styling"},getToggleButtonProps(getDropdownProps({preventKeyAction:isDropdownOpen})),{onClick:()=>{setIsDropdownOpen(!isDropdownOpen)},onKeyUp:e=>{"Enter"===e.key&&setIsDropdownOpen(!isDropdownOpen)}}),react.createElement("div",{className:"multiselect__selected"},selectedItems.map(((singularitem,index)=>(index>0?", ":"")+t(singularitem.item)))),react.createElement("div",{className:"multiselect__opener"},react.createElement("img",{className:(0,clsx.A)("multiselect__icon",{"dropdown__arrow--bottom":isDropdownOpen}),src:ExpandMore_default(),alt:""}))),react.createElement("ul",_extends({className:"multiselect__options"},getMenuProps(),{style:isDropdownOpen?{}:{display:"none"}}),allOptions.map(((item,index)=>{const downshiftProps={...getItemProps({item,index})};return react.createElement("li",_extends({className:(0,clsx.A)("multiselect__option",{"multiselect__option--highlighted":highlightedIndex===index}),key:`${item.value}${item.item}`},getItemProps({item,index}),{role:"option","aria-selected":!!selectedItems.find((selected=>selected.value===item.value))}),react.createElement("span",{id:`multiselect-label-${downshiftProps.id}`},t(item.item)),react.createElement("div",{className:"checkbox multiselect__checkbox"},react.createElement(Checkbox.A,{id:`${id}-${index.toString()}`,selected:!!selectedItems.find((selected=>selected.value===item.value)),isVisualOnly:!0,labelledBy:`multiselect-label-${downshiftProps.id}`})))})))))},multiselect_Multiselect=Multiselect;try{Multiselect.displayName="Multiselect",Multiselect.__docgenInfo={description:"",displayName:"Multiselect",props:{dataCy:{defaultValue:{value:"multiselect"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},caption:{defaultValue:null,description:"",name:"caption",required:!1,type:{name:"string | undefined"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"MultiselectOption[]"}},defaultValue:{defaultValue:{value:"[]"},description:"",name:"defaultValue",required:!1,type:{name:"MultiselectOption[] | undefined"}},updateExternalState:{defaultValue:null,description:"",name:"updateExternalState",required:!1,type:{name:"MultiselectExternalUpdate | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/multiselect/Multiselect.tsx#Multiselect"]={docgenInfo:Multiselect.__docgenInfo,name:"Multiselect",path:"src/components/multiselect/Multiselect.tsx#Multiselect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/promo-bar/PromoBar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>promo_bar_PromoBar});var react=__webpack_require__("./node_modules/react/index.js"),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),icon_info=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-info.svg"),icon_info_default=__webpack_require__.n(icon_info);const PromoBarIcon=({type})=>"info"===type?react.createElement("img",{src:icon_info_default(),alt:"",className:"ml-4"}):null;try{PromoBarIcon.displayName="PromoBarIcon",PromoBarIcon.__docgenInfo={description:"",displayName:"PromoBarIcon",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:'"info"'}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"]={docgenInfo:PromoBarIcon.__docgenInfo,name:"PromoBarIcon",path:"src/components/promo-bar/PromoBarIcon.tsx#PromoBarIcon"})}catch(__react_docgen_typescript_loader_error){}const PromoBar=({text,classNames,type,sticky,theme})=>react.createElement("section",{className:(0,clsx.A)("promo-bar",classNames,{"promo-bar--sticky":sticky,"promo-bar--dark":"dark"===theme})},type&&react.createElement(PromoBarIcon,{type}),react.createElement("p",{className:"text-small-caption"},text)),promo_bar_PromoBar=PromoBar;try{PromoBar.displayName="PromoBar",PromoBar.__docgenInfo={description:"",displayName:"PromoBar",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"info"'}]}},sticky:{defaultValue:null,description:"",name:"sticky",required:!1,type:{name:"boolean | undefined"}},theme:{defaultValue:null,description:"",name:"theme",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"dark"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/promo-bar/PromoBar.tsx#PromoBar"]={docgenInfo:PromoBar.__docgenInfo,name:"PromoBar",path:"src/components/promo-bar/PromoBar.tsx#PromoBar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/renewal/RenewalModalMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/renewal.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const RenewalModalMessage=({messageType,renewingResponse,modalId,setRenewingStatus,texts:{successTitleText,successStatusText,noRenewalsPossibleErrorTitleText,noRenewalsPossibleErrorStatusText,errorTitleText,errorStatusText,buttonText}})=>{const succeededRenewalCount=renewingResponse?(0,_core_utils_helpers_renewal__WEBPACK_IMPORTED_MODULE_1__.TO)(renewingResponse).length:0,showSuccessMessage="success"===messageType&&succeededRenewalCount>0,showNoRenewalsPossibleErrorMessage="success"===messageType&&0===succeededRenewalCount,showErrorMessage="error"===messageType;return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,showSuccessMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,{title:successTitleText,subTitle:successStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showNoRenewalsPossibleErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,{title:noRenewalsPossibleErrorTitleText,subTitle:noRenewalsPossibleErrorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}),showErrorMessage&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_2__.A,{title:errorTitleText,subTitle:errorStatusText,ctaButton:{text:buttonText,modalId,callback:()=>setRenewingStatus("idle")}}))},__WEBPACK_DEFAULT_EXPORT__=RenewalModalMessage;try{RenewalModalMessage.displayName="RenewalModalMessage",RenewalModalMessage.__docgenInfo={description:"",displayName:"RenewalModalMessage",props:{messageType:{defaultValue:null,description:"",name:"messageType",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"error"'}]}},renewingResponse:{defaultValue:null,description:"",name:"renewingResponse",required:!0,type:{name:"RenewedLoanV2[] | null"}},modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},setRenewingStatus:{defaultValue:null,description:"",name:"setRenewingStatus",required:!0,type:{name:"(status: RequestStatus) => void"}},texts:{defaultValue:null,description:"",name:"texts",required:!0,type:{name:"{ successTitleText: string; successStatusText: string; noRenewalsPossibleErrorTitleText: string; noRenewalsPossibleErrorStatusText: string; errorTitleText: string; errorStatusText: string; buttonText: string; }"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"]={docgenInfo:RenewalModalMessage.__docgenInfo,name:"RenewalModalMessage",path:"src/components/renewal/RenewalModalMessage.tsx#RenewalModalMessage"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/ReservationFormListItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx");const ReservationFormListItem=({icon,title,text,subText,changeHandler,buttonAriaLabel,isPossibleToChangeReservationDetails=!0})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-modal-list-item","data-cy":"reservation-form-list-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:icon,alt:""}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{"data-cy":"reservation-modal-list-item-text",className:"reservation-modal-list-item-text"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h5"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},(null==text?void 0:text.length)>0?text:t("missingDataText")),subText&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-small-caption"},subText)),changeHandler&&isPossibleToChangeReservationDetails&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("button",{onClick:changeHandler,type:"button",className:"link-tag text-small-caption cursor-pointer","aria-label":buttonAriaLabel},t("shiftText")))},__WEBPACK_DEFAULT_EXPORT__=ReservationFormListItem;try{ReservationFormListItem.displayName="ReservationFormListItem",ReservationFormListItem.__docgenInfo={description:"",displayName:"ReservationFormListItem",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},subText:{defaultValue:null,description:"",name:"subText",required:!1,type:{name:"string | undefined"}},changeHandler:{defaultValue:null,description:"",name:"changeHandler",required:!1,type:{name:"(() => void) | undefined"}},buttonAriaLabel:{defaultValue:null,description:"",name:"buttonAriaLabel",required:!1,type:{name:"string | undefined"}},isPossibleToChangeReservationDetails:{defaultValue:{value:"true"},description:"",name:"isPossibleToChangeReservationDetails",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"]={docgenInfo:ReservationFormListItem.__docgenInfo,name:"ReservationFormListItem",path:"src/components/reservation/ReservationFormListItem.tsx#ReservationFormListItem"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ModalReservationFormSelect.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),clsx__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/Dropdown/Dropdown.tsx"),_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/modal.tsx"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_helper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/reservation/forms/helper.ts"),_ReservationForm__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/components/reservation/forms/ReservationForm.tsx"),_helper__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/components/reservation/helper.ts"),_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/message/modal-message/ModalMessage.tsx");const ModalReservationFormSelect=({type,header,items,defaultSelectedItem,selectHandler,ariaLabel,saveCallback,reservationStatus,setReservationStatus})=>{const{close}=(0,_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.X)(),t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),[selectedItem,setSelectedItem]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultSelectedItem),{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText}=((type,t)=>({modalId:(0,_helper__WEBPACK_IMPORTED_MODULE_4__.zW)(type),screenReaderModalDescriptionText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.He)(type,"screenReaderModalDescriptionText")),closeModalAriaLabelText:t((0,_helper__WEBPACK_IMPORTED_MODULE_6__.He)(type,"closeModalAriaLabelText"))}))(type,t);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_core_utils_modal__WEBPACK_IMPORTED_MODULE_2__.A,{modalId,screenReaderModalDescriptionText,closeModalAriaLabelText,eventCallbacks:{close:()=>{setReservationStatus&&setReservationStatus("idle")}},classNames:(0,clsx__WEBPACK_IMPORTED_MODULE_8__.A)([{"modal-cta modal-padding":"success"===reservationStatus||"error"===reservationStatus}])},"success"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.A,{title:t("reservationSuccessTitleText"),subTitle:t("reservationSuccessSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),"error"===reservationStatus&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_message_modal_message_ModalMessage__WEBPACK_IMPORTED_MODULE_7__.A,{title:t("reservationerrorTitleText"),subTitle:t("reservationerrorSubTitleText"),ctaButton:{modalId:"pickup",text:t("reservationStatusButtonText"),callback:()=>setReservationStatus&&setReservationStatus("idle")}}),(!reservationStatus||"idle"===reservationStatus||"pending"===reservationStatus)&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ReservationForm__WEBPACK_IMPORTED_MODULE_5__.A,{title:header.title,description:header.description,onSubmit:()=>{selectHandler(selectedItem),saveCallback?saveCallback(selectedItem):close((0,_helper__WEBPACK_IMPORTED_MODULE_4__.zW)(type))},buttonLabel:"pending"===reservationStatus?t("loadingText"):void 0},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Dropdown_Dropdown__WEBPACK_IMPORTED_MODULE_1__.A,{options:items.map((({label,value})=>({label,value}))),ariaLabel,arrowIcon:"chevron",handleOnChange:event=>{const{value}=event.target,typedValue=(0,_helper__WEBPACK_IMPORTED_MODULE_4__.Tb)(type)?Number(value):value;setSelectedItem(typedValue)},defaultValue:selectedItem,placeholder:{label:t("chooseOneText"),disabled:!0,value:""},cyData:"modal-reservation-form-select"})))},__WEBPACK_DEFAULT_EXPORT__=ModalReservationFormSelect;try{ModalReservationFormSelect.displayName="ModalReservationFormSelect",ModalReservationFormSelect.__docgenInfo={description:"",displayName:"ModalReservationFormSelect",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"sms"'},{value:'"pickup"'},{value:'"interestPeriod"'}]}},header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"{ title: string; description: string[]; }"}},items:{defaultValue:null,description:"",name:"items",required:!0,type:{name:"{ label: string; value: TValue; }[]"}},defaultSelectedItem:{defaultValue:null,description:"",name:"defaultSelectedItem",required:!0,type:{name:"FormSelectValue"}},selectHandler:{defaultValue:null,description:"",name:"selectHandler",required:!0,type:{name:"(value: TSelectValue) => void"}},ariaLabel:{defaultValue:null,description:"",name:"ariaLabel",required:!0,type:{name:"string"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"((value: TSaveValue) => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"]={docgenInfo:ModalReservationFormSelect.__docgenInfo,name:"ModalReservationFormSelect",path:"src/components/reservation/forms/ModalReservationFormSelect.tsx#ModalReservationFormSelect"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/NoInterestAfterModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx"),_core_utils_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/config.tsx");const NoInterestAfterModal=({selectedInterest,setSelectedInterest,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)(),interstPeriods=(0,_core_utils_config__WEBPACK_IMPORTED_MODULE_3__.UK)()("interestPeriodsConfig",{transformer:"jsonParse"});return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.A,{type:"interestPeriod",header:{title:t("modalReservationFormNoInterestAfterHeaderTitleText"),description:[t("modalReservationFormNoInterestAfterHeaderDescriptionText")]},items:interstPeriods.interestPeriods,defaultSelectedItem:selectedInterest,selectHandler:value=>{setSelectedInterest(Number(value))},ariaLabel:t("modalReservationFormNoInterestAfterLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=NoInterestAfterModal;try{NoInterestAfterModal.displayName="NoInterestAfterModal",NoInterestAfterModal.__docgenInfo={description:"",displayName:"NoInterestAfterModal",props:{selectedInterest:{defaultValue:null,description:"",name:"selectedInterest",required:!0,type:{name:"number"}},setSelectedInterest:{defaultValue:null,description:"",name:"setSelectedInterest",required:!0,type:{name:"(value: number) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"((value: TValue) => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"]={docgenInfo:NoInterestAfterModal.__docgenInfo,name:"NoInterestAfterModal",path:"src/components/reservation/forms/NoInterestAfterModal.tsx#NoInterestAfterModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/PickupModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/reservation/forms/ModalReservationFormSelect.tsx");const PickupModal=({branches,defaultBranch,selectBranchHandler,saveCallback,reservationStatus,setReservationStatus})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)(),formatBranches=branches.map((branch=>({value:branch.branchId,label:branch.title})));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ModalReservationFormSelect__WEBPACK_IMPORTED_MODULE_2__.A,{type:"pickup",header:{title:t("modalReservationFormPickupHeaderTitleText"),description:[t("modalReservationFormPickupHeaderDescriptionText")]},items:formatBranches,defaultSelectedItem:defaultBranch,selectHandler:value=>{selectBranchHandler(String(value))},ariaLabel:t("modalReservationFormPickupLabelText"),saveCallback,reservationStatus,setReservationStatus})},__WEBPACK_DEFAULT_EXPORT__=PickupModal;try{PickupModal.displayName="PickupModal",PickupModal.__docgenInfo={description:"",displayName:"PickupModal",props:{branches:{defaultValue:null,description:"",name:"branches",required:!0,type:{name:"AgencyBranch[]"}},defaultBranch:{defaultValue:null,description:"",name:"defaultBranch",required:!0,type:{name:"string"}},selectBranchHandler:{defaultValue:null,description:"",name:"selectBranchHandler",required:!0,type:{name:"(value: string) => void"}},saveCallback:{defaultValue:null,description:"",name:"saveCallback",required:!1,type:{name:"((value: TValue) => void) | undefined"}},reservationStatus:{defaultValue:null,description:"",name:"reservationStatus",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"success"'},{value:'"idle"'},{value:'"pending"'},{value:'"error"'}]}},setReservationStatus:{defaultValue:null,description:"",name:"setReservationStatus",required:!1,type:{name:"((status: RequestStatus) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/PickupModal.tsx#PickupModal"]={docgenInfo:PickupModal.__docgenInfo,name:"PickupModal",path:"src/components/reservation/forms/PickupModal.tsx#PickupModal"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/ReservationForm.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_core_utils_text__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/text.tsx"),_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/components/Buttons/Button.tsx");const ReservationForm=({title,description,children,onSubmit,buttonLabel,disabledButton,cyData="reservation-form"})=>{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_1__.F)();return react__WEBPACK_IMPORTED_MODULE_0__.createElement("section",{className:"reservation-modal reservation-form"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__content"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("h3",{className:"text-header-h3 mb-35","data-cy":`${cyData}-title`},title),description.map((paragraph=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"text-body-large","data-cy":`${cyData}-description`},paragraph)))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("form",null,children&&react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__body mt-35"},children),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"reservation-form__footer mt-48"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Buttons_Button__WEBPACK_IMPORTED_MODULE_2__.$,{label:buttonLabel||t("saveButtonText"),buttonType:"none",disabled:disabledButton??!1,collapsible:!1,size:"xlarge",variant:"filled",onClick:onSubmit,dataCy:`${cyData}-button`})))))},__WEBPACK_DEFAULT_EXPORT__=ReservationForm;try{ReservationForm.displayName="ReservationForm",ReservationForm.__docgenInfo={description:"",displayName:"ReservationForm",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string[]"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"() => void"}},buttonLabel:{defaultValue:null,description:"",name:"buttonLabel",required:!1,type:{name:"string | undefined"}},disabledButton:{defaultValue:null,description:"",name:"disabledButton",required:!1,type:{name:"boolean | undefined"}},cyData:{defaultValue:{value:"reservation-form"},description:"",name:"cyData",required:!1,type:{name:"string | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/reservation/forms/ReservationForm.tsx#ReservationForm"]={docgenInfo:ReservationForm.__docgenInfo,name:"ReservationForm",path:"src/components/reservation/forms/ReservationForm.tsx#ReservationForm"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/reservation/forms/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L8:()=>saveText,Tb:()=>modalReservationFormSelectTypeIsInterestPeriod,zW:()=>modalReservationFormId});const modalReservationFormId=type=>`modal-reservation-form-${type}`,saveText=({type,changedText,savedText,patron,savePatron})=>{const textDiffers=changedText!==savedText,updatedPatronData=(({type,value,patron:{preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber}})=>{const defaultData={preferredPickupBranch,preferredLanguage,receiveSms,receivePostalMail,receiveEmail,emailAddress,phoneNumber};switch(type){case"email":return{...defaultData,emailAddress:value,receiveEmail:!0};case"sms":return{...defaultData,phoneNumber:value,receiveSms:!0};default:return null}})({type,value:changedText,patron});if(!updatedPatronData)throw new Error("Cannot construct updated patron data");textDiffers&&savePatron(updatedPatronData)};function modalReservationFormSelectTypeIsInterestPeriod(type){return"interestPeriod"===type}},"./src/components/reservation/helper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B6:()=>getInputType,C4:()=>getPreferredBranch,CF:()=>getAuthorLine,En:()=>getNoInterestAfter,He:()=>getReservationModalTypeTranslation,QW:()=>getInstantLoanBranchHoldings,Qr:()=>isConfigValueOne,ZI:()=>getFutureDateString,c8:()=>getFutureDateStringISO,hn:()=>getManifestationsToReserve,kd:()=>removePrefixFromBranchId,mR:()=>getInstantLoanBranchHoldingsAboveThreshold,pS:()=>translateOpenOrderStatus,wT:()=>constructReservationData});__webpack_require__("./node_modules/core-js/modules/esnext.map.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.find-key.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.includes.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.key-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-keys.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.map-values.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.merge.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.map.update.js");var dayjs__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_13__),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/utils/helpers/invalid-switch-case.ts"),_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/core/dbc-gateway/generated/graphql.tsx");const isConfigValueOne=configValue=>"1"===configValue,getPreferredBranch=(id,array)=>{const locationItem=array.find((item=>item.branchId===id));return locationItem?locationItem.title:id},getNoInterestAfter=(days,interestPeriod,t)=>{const interestPeriodFound=interestPeriod.interestPeriods.find((period=>period.value.toString()===days.toString()));return interestPeriodFound?interestPeriodFound.label:`${days} ${t("daysText")}`},getFutureDateString=num=>dayjs__WEBPACK_IMPORTED_MODULE_13___default()().add(num,"day").format("YYYY-MM-DD"),getFutureDateStringISO=num=>dayjs__WEBPACK_IMPORTED_MODULE_13___default()().add(num,"day").format("YYYY-MM-DDTHH:mm:ssZ"),constructReservations=({manifestations,pickupBranch,expiryDate,periodical})=>manifestations.map((manifestation=>(({manifestation:{pid},pickupBranch,expiryDate,periodical})=>({recordId:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.G_)(pid),...pickupBranch?{pickupBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical}:{}}))({manifestation,pickupBranch,expiryDate,periodical}))),constructReservationData=({manifestations,selectedBranch,expiryDate,periodical})=>({reservations:constructReservations({manifestations,...selectedBranch?{pickupBranch:selectedBranch}:{},...expiryDate?{expiryDate}:{},...periodical?{periodical:{volumeNumber:periodical.volumeNumber,volumeYear:periodical.volumeYear}}:{}}),...manifestations.length>1?{type:"parallel"}:{}}),getAuthorLine=(manifestation,t)=>{const{creators}=manifestation,publicationYear=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.Ey)(manifestation),author=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.sP)((0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.UV)(creators),t)||null;let year="";return publicationYear&&(year=publicationYear),(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.G)(manifestation)&&(year=`(${t("materialHeaderAllEditionsText")})`),author?[t("materialHeaderAuthorByText"),author,year].join(" "):null},getManifestationsToReserve=(reservableManifestations,isPeriodical)=>isPeriodical?reservableManifestations:!reservableManifestations||reservableManifestations.length<1?[]:(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.G)(reservableManifestations[0])?reservableManifestations:[(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_14__.yr)(reservableManifestations)],getReservationModalTypeTranslation=(name,type)=>{const isCloseModal="closeModalAriaLabelText"===type;switch(name){case"sms":return isCloseModal?"closeModalAriaLabelSmsText":"screenReaderModalDescriptionSmsText";case"email":return isCloseModal?"closeModalAriaLabelEmailText":"screenReaderModalDescriptionEmailText";case"interestPeriod":return isCloseModal?"closeModalAriaLabelInterestPeriodText":"screenReaderModalDescriptionInterestPeriodText";case"pickup":return isCloseModal?"closeModalAriaLabelPickupText":"screenReaderModalDescriptionPickupText";default:return(0,_core_utils_helpers_invalid_switch_case__WEBPACK_IMPORTED_MODULE_16__.A)(name)}},getInstantLoanBranchHoldings=(branchHoldings,whitelist,instantLoanStrings)=>{const whitelistBranchIds=whitelist.map((({branchId})=>branchId));return(branchHoldings=>{const processedBranches=new Map;return branchHoldings.forEach((({branch,materials})=>{const{branchId}=branch,storedBranch=processedBranches.get(branchId);storedBranch?processedBranches.set(branchId,{branch,materials:[...materials,...storedBranch.materials]}):processedBranches.set(branchId,{branch,materials})})),[...processedBranches.values()]})(branchHoldings.filter((({branch})=>whitelistBranchIds.includes(branch.branchId)))).map((({branch,materials})=>({branch,materials:materials.filter((({materialGroup,available})=>instantLoanStrings.some((instantLoanString=>instantLoanString===materialGroup.description))&&available))}))).filter((({materials})=>materials.length>0))},getInstantLoanBranchHoldingsAboveThreshold=(instantLoanBranchHoldings,instantLoanThresholdConfig)=>instantLoanBranchHoldings.filter((({materials})=>materials.length>=Number(instantLoanThresholdConfig??0))),removePrefixFromBranchId=branchId=>branchId.split("-")[1],translateOpenOrderStatus=(status,t)=>{const statusTextMap={[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OwnedAccepted]:"openOrderStatusOwnedAcceptedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.AuthenticationError]:"openOrderAuthenticationErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.BorchkUserBlockedByAgency]:"openOrderUserBlockedByAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.BorchkUserNotVerified]:"openOrderUserNotVerifiedText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.BorchkUserNoLongerExistOnAgency]:"openOrderUserNoLongerExistOnAgencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.InvalidOrder]:"openOrderInvalidOrderText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NotOwnedIllLoc]:"openOrderNotOwnedIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NotOwnedNoIllLoc]:"openOrderNotOwnedNoIllLocText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NotOwnedWrongIllMediumtype]:"openOrderNotOwnedWrongIllMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.NoServicerequester]:"openOrderNoServicerequesterText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OrsError]:"openOrderOrsErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OwnedOwnCatalogue]:"openOrderOwnedOwnCatalogueText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.OwnedWrongMediumtype]:"openOrderOwnedWrongMediumtypeText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.ServiceUnavailable]:"openOrderServiceUnavailableText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.UnknownError]:"openOrderUnknownErrorText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.UnknownPickupagency]:"openOrderUnknownPickupagencyText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.UnknownUser]:"openOrderUnknownUserText",[_core_dbc_gateway_generated_graphql__WEBPACK_IMPORTED_MODULE_15__.jh.ErrorMissingPincode]:"openOrderErrorMissingPincodeText"};return statusTextMap[status]?t(statusTextMap[status]):""},getInputType=type=>{switch(type){case"email":return"email";case"sms":return"tel";default:return"text"}}},"./src/components/result-pager/use-pager.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>use_pager});var react=__webpack_require__("./node_modules/react/index.js"),utils_text=__webpack_require__("./src/core/utils/text.tsx");function ResultPager({setPageHandler,itemsShown,hitcount,isLoading,classNames}){const t=(0,utils_text.F)();return react.createElement("div",{className:`result-pager ${classNames}`},react.createElement("p",{className:"text-small-caption result-pager__title"},t("resultPagerStatusText",{placeholders:{"@itemsShown":itemsShown,"@hitcount":hitcount}})),itemsShown!==hitcount&&react.createElement("button",{disabled:isLoading,type:"button",className:"btn-primary btn-outline btn-medium arrow__hover--right-small uppercase",onClick:setPageHandler},t(isLoading?"loadingText":"showMoreText")))}const result_pager=ResultPager;try{ResultPager.displayName="ResultPager",ResultPager.__docgenInfo={description:"",displayName:"ResultPager",props:{setPageHandler:{defaultValue:null,description:"",name:"setPageHandler",required:!0,type:{name:"() => void"}},itemsShown:{defaultValue:null,description:"",name:"itemsShown",required:!0,type:{name:"number"}},hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!0,type:{name:"string"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/result-pager.tsx#ResultPager"]={docgenInfo:ResultPager.__docgenInfo,name:"ResultPager",path:"src/components/result-pager/result-pager.tsx#ResultPager"})}catch(__react_docgen_typescript_loader_error){}const use_pager=({hitcount,pageSize,overrideItemsShown})=>{const[itemsShown,setItemsShown]=(0,react.useState)(pageSize>=hitcount?hitcount:pageSize),[page,setPage]=(0,react.useState)(0),[firstInNewPage,setFirstInNewPage]=(0,react.useState)(null);(0,react.useEffect)((()=>{setItemsShown(pageSize>hitcount?hitcount:pageSize)}),[hitcount,pageSize]);const pagehandler=()=>{const currentPage=page+1,itemsOnPage=(currentPage+1)*pageSize,onLastPage=itemsOnPage>hitcount;setFirstInNewPage(itemsOnPage-pageSize),setItemsShown(onLastPage?hitcount:itemsOnPage),setPage(currentPage)};return{itemsShown,PagerComponent:({isLoading,classNames=""})=>hitcount?react.createElement(result_pager,{itemsShown:overrideItemsShown?overrideItemsShown():itemsShown,hitcount,classNames,setPageHandler:pagehandler,isLoading}):null,page,firstInNewPage}};try{usepager.displayName="usepager",usepager.__docgenInfo={description:"",displayName:"usepager",props:{hitcount:{defaultValue:null,description:"",name:"hitcount",required:!0,type:{name:"number"}},pageSize:{defaultValue:null,description:"",name:"pageSize",required:!0,type:{name:"number"}},overrideItemsShown:{defaultValue:null,description:"",name:"overrideItemsShown",required:!1,type:{name:"(() => number) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/result-pager/use-pager.tsx#usepager"]={docgenInfo:usepager.__docgenInfo,name:"usepager",path:"src/components/result-pager/use-pager.tsx#usepager"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/search-bar.dev.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,default:()=>search_bar_dev});var react=__webpack_require__("./node_modules/react/index.js"),search_bar=__webpack_require__("./src/components/search-bar/search-bar.tsx"),downshift_esm=__webpack_require__("./node_modules/downshift/dist/downshift.esm.js");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const[q,setQ]=(0,react.useState)(""),{getInputProps}=(0,downshift_esm.Bp)({items:["Item 1","Item 2"],inputValue:q,defaultIsOpen:!1,onInputValueChange:({inputValue})=>{setQ(inputValue)}});return react.createElement("div",{className:"header__menu-second"},react.createElement("form",{action:"https://bibliotek.dk/search",className:"header__menu-search"},react.createElement(search_bar.A,_extends({},storybookArgs,{getInputProps}))))};try{searchbardevinc.displayName="searchbardevinc",searchbardevinc.__docgenInfo={description:"",displayName:"searchbardevinc",props:{storybookArgs:{defaultValue:null,description:"",name:"storybookArgs",required:!0,type:{name:"SearchBarProps"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"]={docgenInfo:searchbardevinc.__docgenInfo,name:"searchbardevinc",path:"src/components/search-bar/search-bar.dev.inc.tsx#searchbardevinc"})}catch(__react_docgen_typescript_loader_error){}var globalTextArgs=__webpack_require__("./src/core/storybook/globalTextArgs.ts"),globalConfigArgs=__webpack_require__("./src/core/storybook/globalConfigArgs.ts");const search_bar_dev={title:"Components / Search Bar",component:search_bar.A,argTypes:{...globalTextArgs.A,...globalConfigArgs.A,altText:{name:"Alt text for search button image",defaultValue:"søgeikon",control:{type:"text"}},inputPlaceholderText:{name:"Input field placeholder",defaultValue:"Søg blandt bibliotekets materialer",control:{type:"text"}}}},Default=args=>react.createElement(search_bar_dev_inc,{storybookArgs:args})},"./src/components/search-bar/search-bar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2__),clsx__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),_core_utils_text__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/text.tsx"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts");function _extends(){return _extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e{const t=(0,_core_utils_text__WEBPACK_IMPORTED_MODULE_3__.F)(),handleDropdownMenu=()=>{setIsHeaderDropdownOpen((prev=>!prev))};return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("label",_extends({className:"hide-visually"},getLabelProps()),t("searchHeaderInputLabelText")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",_extends({required:!0,pattern:".*\\S+.*",title:t("searchNoValidCharactersErrorText"),name:"q",className:"header__menu-search-input text-body-medium-regular","data-cy":dataCy,type:"text",placeholder:t("inputPlaceholderText"),"aria-label":t("inputPlaceholderText"),onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.SE)(redirectUrl)}},getInputProps({onChange:e=>{setQWithoutQuery(e.target.value)}}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:t("searchHeaderIconAltText"),className:"header__menu-search-icon",onClick:()=>{qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.SE)(redirectUrl)},onKeyUp:e=>{"Enter"===e.key&&qWithoutQuery===q&&q.length>0&&(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_4__.SE)(redirectUrl)}}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_2___default(),alt:t("searchHeaderDropdownText"),className:(0,clsx__WEBPACK_IMPORTED_MODULE_5__.A)("header__menu-dropdown-icon",{"header__menu-dropdown-icon--expanded":isHeaderDropdownOpen}),onClick:e=>{e.preventDefault(),e.stopPropagation(),handleDropdownMenu()},onKeyUp:e=>{"Enter"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation(),handleDropdownMenu())},tabIndex:0,"aria-label":t("searchHeaderDropdownText"),"data-cy":"search-header-dropdown-icon","aria-expanded":isHeaderDropdownOpen}))};try{searchbar.displayName="searchbar",searchbar.__docgenInfo={description:"",displayName:"searchbar",props:{q:{defaultValue:null,description:"",name:"q",required:!0,type:{name:"string"}},getInputProps:{defaultValue:null,description:"",name:"getInputProps",required:!0,type:{name:"(options?: (UseComboboxGetInputPropsOptions & Options) | undefined, otherOptions?: GetPropsCommonOptions | undefined) => Overwrite<...>"}},getLabelProps:{defaultValue:null,description:"",name:"getLabelProps",required:!0,type:{name:"(options?: (UseComboboxGetLabelPropsOptions & Options) | undefined) => Overwrite"}},dataCy:{defaultValue:{value:"search-header-input"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},qWithoutQuery:{defaultValue:null,description:"",name:"qWithoutQuery",required:!0,type:{name:"string"}},setQWithoutQuery:{defaultValue:null,description:"",name:"setQWithoutQuery",required:!0,type:{name:"(value: string) => void"}},isHeaderDropdownOpen:{defaultValue:null,description:"",name:"isHeaderDropdownOpen",required:!0,type:{name:"boolean"}},setIsHeaderDropdownOpen:{defaultValue:null,description:"",name:"setIsHeaderDropdownOpen",required:!0,type:{name:"(value: boolean | ((prevState: boolean) => boolean)) => void"}},redirectUrl:{defaultValue:null,description:"",name:"redirectUrl",required:!0,type:{name:"URL"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/search-bar.tsx#searchbar"]={docgenInfo:searchbar.__docgenInfo,name:"searchbar",path:"src/components/search-bar/search-bar.tsx#searchbar"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/search-bar/story-header.dev.inc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-menu.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-search.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-profile.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-heart.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross-medium.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6__),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"),_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7__);const __WEBPACK_DEFAULT_EXPORT__=({search,userProfile})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("header",{className:"header"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__logo-desktop"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{className:"header__logo-desktop-link",href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"logo",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKEAAAAgCAYAAAB6vRjLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABRSSURBVHgB7VwLeFTVtV5r73POTCYJIQmBJJPwEBABkwBBRIEU6LXWZ20Rbq312U9vvbZWW7X1ai3tbdVWW+3Vttx+1Yp6tYK12l61eG1BRQEhkISHIGgSMpOEVzJhksnMeex91z7DxMwY8uBpSv/vO9+cs85+77XXXo99BoKs5GDXpZW+BMcIa2HizUll09XIS66EE4gGVvozVW+Anfn11Hf1vGRhvF2TH03QAlhSGdTKWgM5c4vgOIPq3lrPzmxYCqeNhFMcmgTITDwgYBocI+yFmF4EWmZ3mgOODicWHtU/h35TX2gguASWKZP7HKX0NoJAOO7AmAnS2gQRBqc4TvkB6A5DeheALqf6W95q6CvtznEXeOAo4Ah+sS6cWQ/DGQE4xaHBP9EFK9t7NaIxrHXEZfdl170UUrRaGO3VtKxbUcrLpJTDAbGGaez/ZF3wa80Z534+v/3dvYH8z8wjuXahw7R3WFt4snSc2SjZs78rsl65oSPrLqbpdXbbwVZwnMuJvqVIVN+rZfuujUrDe5f86GFog9bGvFlzpC0uRUdWyc7OGcSln5cITcC0J/yzsp7FVavsRDt3jhvn8XyUdjNDXARSDkXGXhZDfI1MQpEwxdPFHetqYBDhn0zYDTIUug45Gx8BrvTE0EqYqxnYskIKUaHe0x4tadLHSMv5AiK8vn9kKATbiN4Wni5j1u0M5b+BxExUCdFZFwq0DJGM3+4gxEjVEZQ7jeg+VZZoa7tRAGRFhfkEPbbCvrZpkuHtpA6Y9GzEGwSng2NVBNe0nkNPN7kkKbHRM3WJBOdaeognE+JObOvopHdpVPd7RBpUTHhKbMeaxC+TIfBY90sAXttXvtM9LRdIlBXEU7uNNO9U/70LNGTcNd5o+qdkBbIykjJINICzq1HIkbpgD378AjXg/BEh5DiScF/prU4EeVDTtfP8f/i+BoYxH5F1gC2vaTbKS9T7QFpphbSdKyjlPmboFf6//ZfOvWkXU4OiMEhxSkhC2tZm0s/M7jSU/bA9mF6hBJPweB4c3rG+KnC/eTEI+VlguJ1+J9iRcCmlWtVVpqE97Y9uejrxfCvk58UbIGv9Zta9CB9vqYdtK+Af82Ob3oBFi9TjyoBnyu/Acm6VjllOz5tRMyaCaXokk48XRje+DfPmqXSvBLTSN0DAQhiE6JEJa0fP9Xrq9o+xPcZ8zrBIGpouO6MH0YGNVmb26jGhVSE4CryfOSM307LLEOVZYOi5gvYltM1G0Wm9s7fcWzW9stKCYwiSWs8hir92p6Hk5bS33tJrvpjlSjq9YPiBuubyAohaj9J4POQgjiXT4ozUwZPC2dNjQZq2F82+GdBtl9qakwrFdvVj61wn9wKwSNQr3A2MdSalEzICgxRJ40iToge0su9g4MD1gsEZzLKYq3WQMyEhN/RwS4hW51KaxCV+s3I7DASSFwd46a8hElUKdW68bLurbEZKVUGVWRfQyx6NWvJ/xkHNXjgGIGVs3Shn61PdaUE+mTwk7JZ+5WeC66a1hOZ+h8jTHoL9zm/gJEFwTvwv4R8JyTqhkHNAiIekgEm0JnvWF8kao+3hW2BbbzV4p9wgSXmHfoKG727Kf5NiwJ5TkGyUMIb0pl94GawI6uXT4CQCde5KL7u+6TY1NjrXvuFvqoxQ+7PhZMHQ45KS4ekJkjsHiBNgkCKV0frNUCQ189B0fhs02n7Q/zwwAN+anEJ60NuNWukcOFmwnXfVD3PENMG1O4bHNu6ihTeX9t3PE7mFLILdcIKBHeFXiOH2o+1c2WCUvbAbJt/TyA+8RAvjbBikOHrr2LbvCepTbobjA58j5LKgp/SkrHLNK/5OP3GrU9qPBbSSRlp4K2k1aaDxJfmxDR/BCYYfPthPAuAaWtDNaIsFjLH/FBLPJZVmHwxS9CL5MIQcnyFrrVJoWoy24EIk3xS5H85MTUn+qcV1vokvjo683wT9hGSskibyfx0hdhq0FmgjLnFscSNJmaStjgY3n5TzR+j2AhggkGE9VbRG4zRBZkr9yEnfZGtQitrD5bfQmKw2YypnBTHexZQrQzLYyhEfLzh36KNddjHTguQGXEMVJkVaJkB6BJCvoa1zcw+NW0/qSeb0tAwbyMQQBjaCo9I6QVJiu0B68m5BZTAWZ7Lm0qvSAdo3OPtDc+We1lIBTgZyUSkd9h2aiKsxM82CozIbTzwwwEo+oeVKZCssTX7rtFjNjiQ6OUoD+pTvohA/osfkOLDBf18Urbo+8fhnOO3WaSz94R7qFILhd41c+E3+npqO7i/qfOUFmuU8QpGFRalN4oZ3XkF0/ZtwHEFjsZOiD2NgSNaYROguCOU+P1RG5MKFfM9bbd4RzSsiSCsGThICGdMvR9NeSh6mlf5zhl6mIinbh03ITA953lUCQni9M0ZG1q+HQYRPbseIf8/yaV9NZcD4K5TFdvUDFAW4J/UdRRGuOJBz9hDoCxo+UGxV/zyVARVGRyqbtJzh1xMjrE6tWljmVXAcEeQlb1G0oZgWWlTYVlfbFAO6DVi+3Mnf83rHyWRABY/fswJssZd2pouCq1tWB3nZExkhzwrFgLRr7dybJbbCIEMyEyLakhl3DQlX7u8tkyfb/DWFt7YlZZXg7WyLVkCvtbGd/lj1Pb1NpJpoqXvupDBXkh+M9KB5e/PmZsBxAlnlc+hSesHDxQfXtMCnFHk73gmDV19AC/UDstjPllJcR7/n0JiuAZ1dNL2pctD5C5OYkPwjzVErVN1XpuH7trV3SueVVLqQsrS3fCRpVvRHkvgj69ZKzusguW2j7fCeXDhOoMjuxKgPi4rs6u/Dpxz+SOXGwmfvnkT66VyBcB16+OwP5uRUFMeqdsIgRLKzmrMPxotdsf5k9AwZshNC4SQaBzGm10ycVUE/YiGKUcmp3Ui3E7vaRguG543IhIb34XjAD5u3QzsMGuCiRRQ/gTfdS+0Zq2DQIokJSUb1K7TkZjQ000mhSRWo7wWOFXOgn5Bk0qKV3BzUvANyKTVAyQ3Ez584MEBu+GaStH8qMquXfZx24oWI/A4hxdKRsO1JWV6uB6usx8mMKvaLzfMPJ8GVwRJ8ccfvVboiucUN5Mply3jj1fc/RWG/AqLNhxOIepg0myO5bRBfGCk2/woGAf6xDzAwVO6kualk9wSULf61QSubRobW99ykjI+lRTQXkb3pukg6T0OQO+aRWO79qP/kyYgv7viMRBwJH7MppzpU3nwYoBnzkXfqKEPjNzJbvF8Y3fgMDBCMwyhyb8ylvld1d/V8mnFKHOUSgPcJDUvUZXMsR037gTrfx6S4mfybBSpNTMAyh1vTpbB+C0eLhQstEOYFVN5ZMEB4opYfIrH/cCzrcjhFcGoc5QKxd5S5ZUs30saAVqaOZZ21zwQlLZs8eTmFpC+o7fRdaIHG7vmb8uZMI1fItbRV+1DXtmKMLUm4bnrE8uWMDcubyWNmBpVVmSBXQ2l6to6LKAyojpUZqPH6iCl+Nx5q3CP+ewsqKmJtkUUYjZEgw4nBnHNuV/TCW87/BS5e7Mq15rSzZ5pWdCETIod0+HYSfa8UxSpXIBze4AuWX+yTtS03cVWpV1uW23jIB+o76xIRMz9HDvsM2gpauYHPFUSqunyMTbnnzBASKpgBb9l726eQ034SZqQvxSi2SJ9cCI5sgE6TgkmWOgVu0fvVfqvmaffwb/fxM86abIvYNeRGyhMoO4F7Xh9pVnZ9VHdCmVAzvEOhs5+JbduXQpFWuOWYHNxU34dgXaOhRqpAHxJ2NeEDLbNpO36QXEE/BMWI3SBa21bTsHpQBXBITyWr9Jp9ObNm5+1/J3yYKrhooZi6ZefT/c8VIZRVkt3RAS9Jxz2l7U6StB30crilQZ/ypeJo1Sor1HEhxkw3BCqFPB1C7e7B2F05Oeqkdyygld5lxyL3qe0L3e/GBKfr3wOsVB06+V7q5CvUQ0m2rKpfTm8+62j8/tyWqgYJi1mj/sdHZDT6TTxUlhSCOzG8JcjK7vaL6p/G+x2uUGPiMIqeAQylRasiXe+KaGsdmvxByhgj3cZwP5GjhFTKDUFeerm0q7+Q0KEDaeULhRl9FqXLazaTZDfY5k2U7tnWCfZ1Z27bZp7Q7VhYziX9SXcg7WzSw+T4JCLigWg0ekQBKS7xvCAr+Z66dmsl9/h2Ny+nQS+jAd3a3GlX9lkA4koyZj5nI1xEbibFoKXRtvb7YABo74CbibEqyL+6gyyjS5HxOcD5L2lyssk7+4D6boQk1Z9oLhe7VZK0pnqvVde4lhZru29qITHBD4lO0g/vlhxnU1nXS3Bt+tuC2tSZqXXuzZuUoWnsOcWAVOAz/pEFaoFBs/HKROnAN+h2jyqDc5xFbHQzucEk6Si3NI/43PCkgoT0okEqDIPzMn0Zb3TRJUlzxMcoeDGfJPflkuFOYspL9vjK3YhX69C5Q8k4e4D0Y06G5kPU57mosS9T/+upqq9k7/IsUOlO7HYsxPw9aVPOHdFZ9W5vyUzLvA4lDutOozh25dhw1T7lbBwwiHlosi5St0woKeNa3Q4ZIb+aDn0foLUN/WsqmqPum4ypdY5tb2UgZ8IAQAw/k8KdIHR2W3Fk02uKRhGmzZ2hyMW0TU3nu/T8fKhcF4QzOU3mYvL/NRQ7NUvdzItroDljeoUNtk5W71+K7ZrEAlgb1EonE3N/B9GZRM9rEvUxCh6YLdoT1Nnzadt/mWeLr+Ou12LxjjvnqVGh7fMpv1X9+0NZ1jXwEtWWC5z9zapvf06UZSI+cVp004/ch8Bm8iRMivcJcKN/Ts63Ex9hNelT0x2wl9qmeSE9Ph8JhSYzJkYLZO8VxTbd2SUdjSljaff5iUQ5mx6fO25M6GNaj1KWvDTP12XNqBjd9l6PBwcCetlVtrDv/gSrIf/bkYbMWLrvZRjiW+c+2ALF/tZSGsEF0rF/3Owt/Wt+tKa2t/yjOjY0J5i/3QzvS2NpIB3Zd4iyOyyRpsQb+oc1wSGXcs6BtWHqb5AkzViE3r83EF7PUDJYVBHzKE+X9CYGzI/fsBRHvlxEfcw59PBk9zAp83mHiTaLhBZeSWV9tiuLI1xPgAAnSRJ6pOzxE1iG4kD3rwBty9pNjK12bU+8HFtHdYwEYGzQmLKB6nLTkcT1qYkkF5yb7oiZ0OqIhFK5jFbGLKWDGLQJ2J32FYdxTxRp4eh7tIJ/yrxZSwva33ZPhzRlzJkkOg/eQT34KsgU/yViszdd/2/olxu9p7Z2rBwVXvfL7rSAd+p9aNp3OTbeSI93wQAhQR6BSAbQbZY0Kj3pcb2CoYcZuj+FukciiyQ524kBqexaKtw9JNxQdM6K4sCazkNlxNvOMZPpGk/KRWU5Dkahm0f3cJ6ew9FT+YJqy8CUNlMD1KcQbdBxFEwoHPkeBVrJQpS+jwuW4zWODU5MKJnlO3xuOYwU6QedSOtPg54p+6g3aU4k1LNkoXi2w+HbuS3rDsIxBDoyGLcOnGF9Jl60XI2rOy0+b1aaNE0aaGbCQMDRUiKCVA1vgrQK5/HxmjsHfTIi6bDWod8/FHZs+FqCHoTyYVHopLGOtqVk2ZJelFXR0dz+OBlAX2SN4ceI5uZDS8SXMxP3U1n3JzIEMmfkxsLt6WNh2zE5rEvhBvX5kGLWV4s7NixI0D+E07IAvFmJNh+xYTLqzkto9cnXU+mkcKbTyvP1rxRk0nJGSMc57NbGGD5abH7peTgK0JaQGcqanZ24PvSUnS5s55vqndDY5r7yB1/6yQ3qd8ukSQZZ7VfEC8VPxGn3TTy/4LBtQIgfgN3TesUGisao2zO08ByaoWn0soFlDUtiIlrguersYPNV6vwgTWi4Y8uhvszf7Skfq+6bM84dLrj1gofxDw2edW73/ILhG0N3r25FE2+jXGQR46IGXvZF911Hp3s+gJjxou3DZrl/1aKO0WGkc4uHa9uCvulT4VjAq9XTLhYiPXN+0Cg/Q5F2wrghBs9Y6rZZy7wp3tcjhOu30vQ7aFBq+06MAdoCVJxzIFuPzZl2b8t4i1wPi4/K908McE+4va0ucRm22EK0CRLYtkzvkKf7zC/EowF25gdD3+ebpXDud10aBvuZ+27xYltI6Vrt5s6mHbWHBrsHPAVqQhznWyOqzO0NWLLBkSYp/zKNoi3PjWpb7X47YhkZrcr1QYt5tr1tc529bHPtlmXLjBFWTiUy9g6t8tFoWzVBLF3tRMKbSb/6DLWn2pdlvNNTpYWwqV7omlpEaVTXz3dllA4vdGa8SpraVtIJZ2W2HKwNYsl6LWbVkBWbT0bEq4UzMvpcmP1BYZTqBlBG2FDpmOupz2t83FdDbVZ/HrAfdelGhEhpxLrERVpO40AqKY5t3EUx2C+qDh0uDa2EWsa0y/yzc/6FrL7vkvDrxzF03MINfl6+tfHHyo8ERwimYQQ530MhuRBdne7FNVIhWIDp/GGpa5cOPTT51A/TTatrrmbldkjjLYpGDuEnqSPFxBzkNmL1QtMX+SMb1ybqkRrcC8oXzXgHo7UT7wI7QJGZrk9Ai6yatdJjXEmivYpUldE0CeWUxgSd3d52unVvIt0oc+12bhh307tdlMZBEVe91DfLuse4nNqxFNUfN6GcRcybIxh7ydA9VybUFQ3i/eAa71JfRsY2riAn+28ZY740oX8DFrYKoeP5lP9VmvN0uqaDy6T4a91LrpqEsUFjFR8TI0kVYrpuxen6/uTx1ty6Qde7jsK1TbCvZRyXqL5Sf2aSFCqgNCttzTOrqDPupD8m/z6lnL+++uYbSb+6jFZSOapNWcpqYuy/aLlySXfLTJ1UFrr9VdKPyGfEzyKNr4AmxqH0tZTvTeTaawWxS18/Wul3rCFXriTdbbSG88YctcNcbtigQziXH2lZ6oQ7VDamQXlhlBb5UY0TlcWoLC+V1Xk8D+y6bV6zxguxmIXz5iWdTPl/+jv2xktbiOwAAAAASUVORK5CYII=",alt:"Logo of libary"})))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav",{className:"header__menu-first","aria-label":"Primary site navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-mobile"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--small header__menu-navigation-button header__button",id:"header-sidebar-nav__toggle","aria-controls":"sidebarNav","aria-expanded":"false",role:"button",tabIndex:0},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--small"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_menu_svg__WEBPACK_IMPORTED_MODULE_1___default(),alt:"List of bookmarks"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-navigation-logo"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"logo-fallback"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-name"},"Lyngby-Taarbæk"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("p",{className:"logo-fallback__text-libraries"},"Bibliotekerne")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__menu-navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Børn & forældre")))),userProfile||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-profile header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_profile_svg__WEBPACK_IMPORTED_MODULE_3___default(),alt:"Profile"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Login")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-bookmarked header__button"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_heart_svg__WEBPACK_IMPORTED_MODULE_4___default(),alt:"List of bookmarks"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Liked")))),search||react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__menu-search"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{name:"q",className:"header__menu-search-input text-body-medium-regular",type:"text",autoComplete:"off",placeholder:"Cannot search in this story"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("input",{type:"image",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_search_svg__WEBPACK_IMPORTED_MODULE_2___default(),className:"header__menu-search-icon",alt:"search icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{className:"header__menu-dropdown-icon",src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_collection_ExpandMore_svg__WEBPACK_IMPORTED_MODULE_7___default(),alt:"expand dropdown icon"}))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-parent--medium"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"pagefold-triangle--medium"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header__clock-items"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_watch_static_svg__WEBPACK_IMPORTED_MODULE_5___default(),className:"mb-8",alt:"clock icon"}),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"Fredag"),react__WEBPACK_IMPORTED_MODULE_0__.createElement("span",{className:"text-small-caption"},"28 Maj")))),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav","data-open":"closed"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav__background-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav__menu-wrapper"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"header-sidebar-nav__close-menu-button",id:"js-header-sidebar-nav__close-menu-button",tabIndex:0,role:"button","aria-label":"Close menu"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("img",{src:_danskernesdigitalebibliotek_dpl_design_system_build_icons_basic_icon_cross_medium_svg__WEBPACK_IMPORTED_MODULE_6___default(),alt:"Close menu"})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("nav",{"aria-label":"Sidebar site navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("ul",{className:"header__menu-navigation"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Det sker")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Biblioteker & åbningstider")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Digitale tilbud")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Litteratur")),react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"header__menu-navigation-item"},react__WEBPACK_IMPORTED_MODULE_0__.createElement("a",{href:"/",className:"header__menu-navigation-link text-body-medium-regular hide-linkstyle"},"Børn & forældre"))))))));try{storyheaderdevinc.displayName="storyheaderdevinc",storyheaderdevinc.__docgenInfo={description:"",displayName:"storyheaderdevinc",props:{search:{defaultValue:null,description:"",name:"search",required:!1,type:{name:"ReactNode"}},userProfile:{defaultValue:null,description:"",name:"userProfile",required:!1,type:{name:"ReactNode"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"]={docgenInfo:storyheaderdevinc.__docgenInfo,name:"storyheaderdevinc",path:"src/components/search-bar/story-header.dev.inc.tsx#storyheaderdevinc"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/simple-material/SimpleMaterial.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),react_query__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-query/es/index.js"),_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/components/button-favourite/button-favourite.tsx"),_cover_cover__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/components/cover/cover.tsx"),_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/general.ts"),_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/core/utils/helpers/url.ts"),_atoms_links_Link__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/components/atoms/links/Link.tsx"),_core_utils_url__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/utils/url.tsx");const SimpleMaterial=({bright,work:{titles:{full:fullTitle},creators,workId},work,app})=>{const materialUrl=(0,_core_utils_url__WEBPACK_IMPORTED_MODULE_8__.Ik)()("materialUrl"),dispatch=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.wA)(),queryClient=(0,react_query__WEBPACK_IMPORTED_MODULE_2__.useQueryClient)(),materialFullUrl=(0,_core_utils_helpers_url__WEBPACK_IMPORTED_MODULE_9__.Qj)(materialUrl,workId);let authors=null;const inputContributorsArray=null==creators?void 0:creators.map((({display})=>display));inputContributorsArray&&(authors=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_5__.Zc)(!0,inputContributorsArray));const manifestationPid=(0,_core_utils_helpers_general__WEBPACK_IMPORTED_MODULE_5__.hh)(work),title=fullTitle[0];return react__WEBPACK_IMPORTED_MODULE_0__.createElement("li",{className:"simple-material "+(bright?" simple-material--bright":"")},react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__cover-container"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_cover_cover__WEBPACK_IMPORTED_MODULE_4__.Y,{animate:!0,size:"medium",ids:[manifestationPid]})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__favourite"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_button_favourite_button_favourite__WEBPACK_IMPORTED_MODULE_3__.A,{title,darkBackground:!bright,id:workId,addToListRequest:id=>{dispatch((0,_core_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_6__.A5)({type:"addFavorite",args:{id,queryClient},app}))}})),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__meta"},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_atoms_links_Link__WEBPACK_IMPORTED_MODULE_7__.A,{href:materialFullUrl,className:"simple-material__title"},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"simple-material__author"},authors)))},__WEBPACK_DEFAULT_EXPORT__=SimpleMaterial;try{SimpleMaterial.displayName="SimpleMaterial",SimpleMaterial.__docgenInfo={description:"",displayName:"SimpleMaterial",props:{work:{defaultValue:null,description:"",name:"work",required:!0,type:{name:"Work"}},bright:{defaultValue:null,description:"",name:"bright",required:!1,type:{name:"boolean | undefined"}},app:{defaultValue:null,description:"",name:"app",required:!0,type:{name:"enum",value:[{value:'"material"'},{value:'"search-result"'},{value:'"advanced-search"'},{value:'"recommender"'},{value:'"something-similar"'},{value:'"favorites-list-mc"'},{value:'"inspiration-recommender"'},{value:'"recommended-material"'},{value:'"recommendation"'},{value:'"material-grid-automatic"'},{value:'"material-grid-manual"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"]={docgenInfo:SimpleMaterial.__docgenInfo,name:"SimpleMaterial",path:"src/components/simple-material/SimpleMaterial.tsx#SimpleMaterial"})}catch(__react_docgen_typescript_loader_error){}},"./src/components/skeletons/TextLineSkeleton.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const TextLineSkeleton=({width=40})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement("div",{className:"ssc-line w-100",style:{width:`${width}px`}}),__WEBPACK_DEFAULT_EXPORT__=TextLineSkeleton;try{TextLineSkeleton.displayName="TextLineSkeleton",TextLineSkeleton.__docgenInfo={description:"",displayName:"TextLineSkeleton",props:{width:{defaultValue:{value:"40"},description:"",name:"width",required:!1,type:{name:"number | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"]={docgenInfo:TextLineSkeleton.__docgenInfo,name:"TextLineSkeleton",path:"src/components/skeletons/TextLineSkeleton.tsx#TextLineSkeleton"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/blockedModal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,ht:()=>setHasBeenVisible});const blockedModalSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"blockedModal",initialState:{data:{hasBeenVisible:!1}},reducers:{setHasBeenVisible(state,action){state.data.hasBeenVisible||action.payload.hasBeenVisible&&(state.data={...state.data,...action.payload})}}}),{setHasBeenVisible}=blockedModalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=blockedModalSlice.reducer},"./src/core/config.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Qw:()=>addConfigEntries});const configSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"config",initialState:{data:{}},reducers:{addConfigEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addConfigEntries}=configSlice.actions,__WEBPACK_DEFAULT_EXPORT__=configSlice.reducer},"./src/core/configuration/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>configuration,FI:()=>getConf,jM:()=>getDeviceConf});var lib=__webpack_require__("./node_modules/react-device-detect/dist/lib.js");const page_size_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":20}}'),page_size_loan_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),page_size_reservation_list_namespaceObject=JSON.parse('{"mobile":{"pageSize":10},"desktop":{"pageSize":25}}'),recommender_material_limits_namespaceObject=JSON.parse('{"recommender":4,"inspiration":4,"somethingSimilar":4,"somethingSimilarAuthor":4}'),cover_tints_namespaceObject=JSON.parse('{"coverTints":["100","40","80","120","20"]}'),colors_namespaceObject=JSON.parse('{"default":"#484848","danger":"#d5364a","warning":"#f7bf42","success":"#068802"}');var modal_ids=__webpack_require__("./src/core/configuration/modal-ids.json");const getConf=(type,configuration,device)=>{const subConf=configuration[type];return device?subConf[device]:subConf},getDeviceConf=(type,configuration)=>{const device=lib.Fr?"mobile":"desktop";return getConf(type,configuration,device)},configuration={pageSize:page_size_namespaceObject,coverTints:cover_tints_namespaceObject,pageSizeLoanList:page_size_loan_list_namespaceObject,pageSizeReservationList:page_size_reservation_list_namespaceObject,colors:colors_namespaceObject,recommenderMaterialLimits:recommender_material_limits_namespaceObject,modalIds:modal_ids,reservation:JSON.parse('{"defaultInterestDaysForOpenOrder":90}'),payment:JSON.parse('{"paymentChangeDate":"2020-10-27"}')}},"./src/core/dbc-gateway/generated/graphql.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{cs:()=>AccessTypeCode,nm:()=>CopyRequestStatus,SW:()=>FacetField,dn:()=>FictionNonfictionCode,Fl:()=>HoldingsStatus,jh:()=>SubmitOrderStatus,hC:()=>SuggestionType,CY:()=>WorkType,YP:()=>useComplexSearchWithPaginationQuery,D3:()=>useComplexSearchWithPaginationWorkAccessQuery,ET:()=>useGetInfomediaQuery,NM:()=>useGetManifestationViaBestRepresentationByFaustQuery,V3:()=>useGetManifestationViaMaterialByFaustQuery,VL:()=>useGetMaterialGloballyQuery,RR:()=>useGetMaterialQuery,BG:()=>useGetReviewManifestationsQuery,OZ:()=>useGetSmallWorkQuery,vQ:()=>useIntelligentFacetsQuery,Bv:()=>useOpenOrderMutation,Dp:()=>usePlaceCopyMutation,Nr:()=>useRecommendFromFaustQuery,V0:()=>useSearchFacetQuery,KG:()=>useSearchWithPaginationQuery,Yu:()=>useSuggestionsFromQueryStringQuery});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),core_token=__webpack_require__("./src/core/token.js"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class DbcGateWayHttpError extends FetcherCriticalHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","DbcGateWayHttpError")}}var extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts");const queryMap={complexSearchWithPagination:extractServiceBaseUrls.TJ.fbiLocal,complexSearchWithPaginationWorkAccess:extractServiceBaseUrls.TJ.fbiLocal,getMaterial:extractServiceBaseUrls.TJ.fbiLocal,intelligentFacets:extractServiceBaseUrls.TJ.fbiLocal,recommendFromFaust:extractServiceBaseUrls.TJ.fbiLocal,searchFacet:extractServiceBaseUrls.TJ.fbiLocal,searchWithPagination:extractServiceBaseUrls.TJ.fbiLocal,suggestionsFromQueryString:extractServiceBaseUrls.TJ.fbiLocal,getInfomedia:extractServiceBaseUrls.TJ.fbiGlobal,getManifestationViaBestRepresentationByFaust:extractServiceBaseUrls.TJ.fbiGlobal,getManifestationViaMaterialByFaust:extractServiceBaseUrls.TJ.fbiGlobal,getMaterialGlobally:extractServiceBaseUrls.TJ.fbiGlobal,getReviewManifestations:extractServiceBaseUrls.TJ.fbiGlobal,getSmallWork:extractServiceBaseUrls.TJ.fbiGlobal,openOrder:extractServiceBaseUrls.TJ.fbiGlobal,default:extractServiceBaseUrls.TJ.fbi},resolveBaseUrl=query=>query?(0,extractServiceBaseUrls.aW)(queryMap[query]||queryMap.default):(0,extractServiceBaseUrls.aW)(queryMap.default);const fetcher=(query,variables)=>context=>{const url=(context=>{if(!context)return resolveBaseUrl();const{queryKey}=context,[queryName]=queryKey;return resolveBaseUrl(queryName)})(context),token=(0,core_token.gf)(core_token.CI)||(0,core_token.gf)(core_token._L);return fetch(url,{method:"POST",headers:{"Content-Type":"application/json",...token?{Authorization:`Bearer ${token}`}:{}},body:JSON.stringify({query,variables})}).then((async response=>{if(!response.ok)throw new DbcGateWayHttpError(response.status,response.statusText);const json=await response.json();if(json.errors){const{message}=json.errors[0];throw new Error(message)}return json.data})).catch((error=>{if(error instanceof DbcGateWayHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,query)}))};let AccessTypeCode=function(AccessTypeCode){return AccessTypeCode.NotSpecified="NOT_SPECIFIED",AccessTypeCode.Online="ONLINE",AccessTypeCode.Physical="PHYSICAL",AccessTypeCode.Unknown="UNKNOWN",AccessTypeCode}({}),ComplexSearchFacets=function(ComplexSearchFacets){return ComplexSearchFacets.Accesstype="ACCESSTYPE",ComplexSearchFacets.Ages="AGES",ComplexSearchFacets.Cataloguecode="CATALOGUECODE",ComplexSearchFacets.Contributor="CONTRIBUTOR",ComplexSearchFacets.Contributorfunction="CONTRIBUTORFUNCTION",ComplexSearchFacets.Creator="CREATOR",ComplexSearchFacets.Creatorcontributor="CREATORCONTRIBUTOR",ComplexSearchFacets.Creatorcontributorfunction="CREATORCONTRIBUTORFUNCTION",ComplexSearchFacets.Creatorfunction="CREATORFUNCTION",ComplexSearchFacets.Fictionalcharacter="FICTIONALCHARACTER",ComplexSearchFacets.Filmnationality="FILMNATIONALITY",ComplexSearchFacets.Gameplatform="GAMEPLATFORM",ComplexSearchFacets.Generalaudience="GENERALAUDIENCE",ComplexSearchFacets.Generalmaterialtype="GENERALMATERIALTYPE",ComplexSearchFacets.Genreandform="GENREANDFORM",ComplexSearchFacets.Hostpublication="HOSTPUBLICATION",ComplexSearchFacets.Issue="ISSUE",ComplexSearchFacets.Language="LANGUAGE",ComplexSearchFacets.Let="LET",ComplexSearchFacets.Libraryrecommendation="LIBRARYRECOMMENDATION",ComplexSearchFacets.Lix="LIX",ComplexSearchFacets.Mainlanguage="MAINLANGUAGE",ComplexSearchFacets.Mediacouncilagerestriction="MEDIACOUNCILAGERESTRICTION",ComplexSearchFacets.Mood="MOOD",ComplexSearchFacets.Musicalensembleorcast="MUSICALENSEMBLEORCAST",ComplexSearchFacets.Narrativetechnique="NARRATIVETECHNIQUE",ComplexSearchFacets.Pegi="PEGI",ComplexSearchFacets.Players="PLAYERS",ComplexSearchFacets.Primarytarget="PRIMARYTARGET",ComplexSearchFacets.Publicationyear="PUBLICATIONYEAR",ComplexSearchFacets.Series="SERIES",ComplexSearchFacets.Setting="SETTING",ComplexSearchFacets.Specificmaterialtype="SPECIFICMATERIALTYPE",ComplexSearchFacets.Spokenlanguage="SPOKENLANGUAGE",ComplexSearchFacets.Subject="SUBJECT",ComplexSearchFacets.Subtitlelanguage="SUBTITLELANGUAGE",ComplexSearchFacets.Typeofscore="TYPEOFSCORE",ComplexSearchFacets}({}),CopyRequestStatus=function(CopyRequestStatus){return CopyRequestStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",CopyRequestStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",CopyRequestStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",CopyRequestStatus.ErrorAgencyNotSubscribed="ERROR_AGENCY_NOT_SUBSCRIBED",CopyRequestStatus.ErrorInvalidPickupBranch="ERROR_INVALID_PICKUP_BRANCH",CopyRequestStatus.ErrorMissingClientConfiguration="ERROR_MISSING_CLIENT_CONFIGURATION",CopyRequestStatus.ErrorMissingMunicipalityagencyid="ERROR_MISSING_MUNICIPALITYAGENCYID",CopyRequestStatus.ErrorMunicipalityagencyidNotFound="ERROR_MUNICIPALITYAGENCYID_NOT_FOUND",CopyRequestStatus.ErrorPidNotReservable="ERROR_PID_NOT_RESERVABLE",CopyRequestStatus.ErrorUnauthenticatedUser="ERROR_UNAUTHENTICATED_USER",CopyRequestStatus.Ok="OK",CopyRequestStatus.UnknownUser="UNKNOWN_USER",CopyRequestStatus}({}),FacetField=function(FacetField){return FacetField.AccessTypes="accessTypes",FacetField.Age="age",FacetField.CanAlwaysBeLoaned="canAlwaysBeLoaned",FacetField.ChildrenOrAdults="childrenOrAdults",FacetField.Creators="creators",FacetField.Dk5="dk5",FacetField.FictionNonfiction="fictionNonfiction",FacetField.FictionalCharacters="fictionalCharacters",FacetField.GeneralAudience="generalAudience",FacetField.GenreAndForm="genreAndForm",FacetField.Let="let",FacetField.LibraryRecommendation="libraryRecommendation",FacetField.Lix="lix",FacetField.MainLanguages="mainLanguages",FacetField.MaterialTypesGeneral="materialTypesGeneral",FacetField.MaterialTypesSpecific="materialTypesSpecific",FacetField.Subjects="subjects",FacetField.WorkTypes="workTypes",FacetField.Year="year",FacetField}({}),FictionNonfictionCode=function(FictionNonfictionCode){return FictionNonfictionCode.Fiction="FICTION",FictionNonfictionCode.Nonfiction="NONFICTION",FictionNonfictionCode.NotSpecified="NOT_SPECIFIED",FictionNonfictionCode}({}),HoldingsStatus=function(HoldingsStatus){return HoldingsStatus.OnLoan="OnLoan",HoldingsStatus.OnShelf="OnShelf",HoldingsStatus}({}),SubjectType=function(SubjectType){return SubjectType.Corporation="CORPORATION",SubjectType.Environment="ENVIRONMENT",SubjectType.FictionalCharacter="FICTIONAL_CHARACTER",SubjectType.FictionalLocation="FICTIONAL_LOCATION",SubjectType.FilmNationality="FILM_NATIONALITY",SubjectType.Laesekompasset="LAESEKOMPASSET",SubjectType.LibraryOfCongressSubjectHeading="LIBRARY_OF_CONGRESS_SUBJECT_HEADING",SubjectType.Location="LOCATION",SubjectType.MedicalSubjectHeading="MEDICAL_SUBJECT_HEADING",SubjectType.Mood="MOOD",SubjectType.MoodChildren="MOOD_CHILDREN",SubjectType.MusicalInstrumentation="MUSICAL_INSTRUMENTATION",SubjectType.MusicCountryOfOrigin="MUSIC_COUNTRY_OF_ORIGIN",SubjectType.MusicTimePeriod="MUSIC_TIME_PERIOD",SubjectType.NationalAgriculturalLibrary="NATIONAL_AGRICULTURAL_LIBRARY",SubjectType.Person="PERSON",SubjectType.Perspective="PERSPECTIVE",SubjectType.Reality="REALITY",SubjectType.Style="STYLE",SubjectType.Tempo="TEMPO",SubjectType.TimePeriod="TIME_PERIOD",SubjectType.Title="TITLE",SubjectType.Topic="TOPIC",SubjectType.TopicChildren="TOPIC_CHILDREN",SubjectType}({}),SubmitOrderStatus=function(SubmitOrderStatus){return SubmitOrderStatus.AuthenticationError="AUTHENTICATION_ERROR",SubmitOrderStatus.BorchkUserBlockedByAgency="BORCHK_USER_BLOCKED_BY_AGENCY",SubmitOrderStatus.BorchkUserNotVerified="BORCHK_USER_NOT_VERIFIED",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency="BORCHK_USER_NO_LONGER_EXIST_ON_AGENCY",SubmitOrderStatus.ErrorMissingPincode="ERROR_MISSING_PINCODE",SubmitOrderStatus.InvalidOrder="INVALID_ORDER",SubmitOrderStatus.NotOwnedIllLoc="NOT_OWNED_ILL_LOC",SubmitOrderStatus.NotOwnedNoIllLoc="NOT_OWNED_NO_ILL_LOC",SubmitOrderStatus.NotOwnedWrongIllMediumtype="NOT_OWNED_WRONG_ILL_MEDIUMTYPE",SubmitOrderStatus.NoServicerequester="NO_SERVICEREQUESTER",SubmitOrderStatus.OrsError="ORS_ERROR",SubmitOrderStatus.OwnedAccepted="OWNED_ACCEPTED",SubmitOrderStatus.OwnedOwnCatalogue="OWNED_OWN_CATALOGUE",SubmitOrderStatus.OwnedWrongMediumtype="OWNED_WRONG_MEDIUMTYPE",SubmitOrderStatus.ServiceUnavailable="SERVICE_UNAVAILABLE",SubmitOrderStatus.UnknownError="UNKNOWN_ERROR",SubmitOrderStatus.UnknownPickupagency="UNKNOWN_PICKUPAGENCY",SubmitOrderStatus.UnknownUser="UNKNOWN_USER",SubmitOrderStatus}({}),SuggestionType=function(SuggestionType){return SuggestionType.Composit="COMPOSIT",SuggestionType.Creator="CREATOR",SuggestionType.Subject="SUBJECT",SuggestionType.Title="TITLE",SuggestionType}({}),WorkType=function(WorkType){return WorkType.Analysis="ANALYSIS",WorkType.Article="ARTICLE",WorkType.Bookdescription="BOOKDESCRIPTION",WorkType.Game="GAME",WorkType.Literature="LITERATURE",WorkType.Map="MAP",WorkType.Movie="MOVIE",WorkType.Music="MUSIC",WorkType.Other="OTHER",WorkType.Periodica="PERIODICA",WorkType.Portrait="PORTRAIT",WorkType.Review="REVIEW",WorkType.Sheetmusic="SHEETMUSIC",WorkType.Track="TRACK",WorkType}({});const WithLanguagesFragmentDoc="\n fragment WithLanguages on Manifestation {\n languages {\n main {\n display\n isoCode\n }\n }\n}\n ",ManifestationBasicDetailsFragmentDoc=`\n fragment ManifestationBasicDetails on Manifestation {\n ...WithLanguages\n pid\n titles {\n full\n }\n abstract\n materialTypes {\n materialTypeSpecific {\n display\n }\n }\n creators {\n display\n }\n edition {\n publicationYear {\n display\n }\n }\n series {\n title\n numberInSeries {\n number\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,WorkSmallFragmentDoc=`\n fragment WorkSmall on Work {\n workId\n titles {\n full\n original\n }\n abstract\n creators {\n display\n __typename\n }\n series {\n ...SeriesSimple\n }\n seriesMembers {\n workId\n titles {\n main\n full\n original\n }\n }\n workYear {\n year\n }\n genreAndForm\n manifestations {\n ...ManifestationsSimple\n }\n}\n \n fragment SeriesSimple on Series {\n title\n isPopular\n numberInSeries {\n display\n number\n }\n readThisFirst\n readThisWhenever\n}\n \n${`\n fragment ManifestationsSimple on Manifestations {\n all {\n ...ManifestationsSimpleFields\n }\n latest {\n ...ManifestationsSimpleFields\n }\n bestRepresentation {\n ...ManifestationsSimpleFields\n }\n}\n ${`\n fragment ManifestationsSimpleFields on Manifestation {\n pid\n genreAndForm\n source\n ...WithLanguages\n titles {\n main\n original\n }\n fictionNonfiction {\n display\n code\n }\n materialTypes {\n materialTypeSpecific {\n display\n }\n }\n creators {\n display\n __typename\n }\n publisher\n identifiers {\n value\n }\n contributors {\n display\n roles {\n function {\n singular\n }\n }\n }\n edition {\n summary\n publicationYear {\n display\n }\n }\n dateFirstEdition {\n display\n year\n }\n audience {\n generalAudience\n ages {\n display\n }\n }\n notes {\n display\n }\n languages {\n notes\n }\n physicalDescriptions {\n summary\n numberOfPages\n playingTime\n }\n hostPublication {\n summary\n }\n manifestationParts {\n parts {\n title\n }\n }\n accessTypes {\n code\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n shelfmark {\n postfix\n shelfmark\n }\n workYear {\n year\n }\n catalogueCodes {\n nationalBibliography\n otherCatalogues\n }\n}\n ${WithLanguagesFragmentDoc}`}`}`,WorkMediumFragmentDoc=`\n fragment WorkMedium on Work {\n ...WorkSmall\n materialTypes {\n materialTypeSpecific {\n display\n }\n }\n mainLanguages {\n display\n isoCode\n }\n subjects {\n all {\n display\n }\n dbcVerified {\n display\n }\n }\n fictionNonfiction {\n display\n code\n }\n dk5MainEntry {\n display\n }\n relations {\n hasReview {\n pid\n }\n hasAdaptation {\n ownerWork {\n workId\n workTypes\n titles {\n main\n }\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`,GetSmallWorkDocument=`\n query getSmallWork($id: String!) {\n work(id: $id) {\n ...WorkSmall\n }\n}\n ${WorkSmallFragmentDoc}`,useGetSmallWorkQuery=(variables,options)=>(0,es.useQuery)(["getSmallWork",variables],fetcher(GetSmallWorkDocument,variables),options),GetManifestationViaMaterialByFaustDocument=`\n query getManifestationViaMaterialByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ...ManifestationBasicDetails\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaMaterialByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaMaterialByFaust",variables],fetcher(GetManifestationViaMaterialByFaustDocument,variables),options),GetManifestationViaBestRepresentationByFaustDocument=`\n query getManifestationViaBestRepresentationByFaust($faust: String!) {\n manifestation(faust: $faust) {\n ownerWork {\n manifestations {\n bestRepresentation {\n ...ManifestationBasicDetails\n }\n }\n }\n }\n}\n ${ManifestationBasicDetailsFragmentDoc}`,useGetManifestationViaBestRepresentationByFaustQuery=(variables,options)=>(0,es.useQuery)(["getManifestationViaBestRepresentationByFaust",variables],fetcher(GetManifestationViaBestRepresentationByFaustDocument,variables),options),GetMaterialDocument=`\n query getMaterial($wid: String!) {\n work(id: $wid) {\n ...WorkMedium\n }\n}\n ${WorkMediumFragmentDoc}`,useGetMaterialQuery=(variables,options)=>(0,es.useQuery)(["getMaterial",variables],fetcher(GetMaterialDocument,variables),options),GetMaterialGloballyDocument=`\n query getMaterialGlobally($wid: String!) {\n work(id: $wid) {\n ...WorkMedium\n }\n}\n ${WorkMediumFragmentDoc}`,useGetMaterialGloballyQuery=(variables,options)=>(0,es.useQuery)(["getMaterialGlobally",variables],fetcher(GetMaterialGloballyDocument,variables),options),useGetInfomediaQuery=(variables,options)=>(0,es.useQuery)(["getInfomedia",variables],fetcher("\n query getInfomedia($id: String!) {\n infomedia(id: $id) {\n error\n article {\n headLine\n text\n }\n }\n}\n ",variables),options),useGetReviewManifestationsQuery=(variables,options)=>(0,es.useQuery)(["getReviewManifestations",variables],fetcher("\n query getReviewManifestations($pid: [String!]!) {\n manifestations(pid: $pid) {\n ...ManifestationReviewFields\n }\n}\n \n fragment ManifestationReviewFields on Manifestation {\n pid\n creators {\n display\n }\n access {\n __typename\n ... on InfomediaService {\n id\n }\n ... on DigitalArticleService {\n issn\n }\n ... on AccessUrl {\n url\n origin\n }\n }\n edition {\n publicationYear {\n display\n }\n }\n hostPublication {\n title\n issue\n }\n creators {\n display\n }\n physicalDescriptions {\n summary\n }\n dateFirstEdition {\n display\n }\n workYear {\n display\n }\n review {\n rating\n reviewByLibrarians {\n content\n heading\n type\n manifestations {\n pid\n titles {\n main\n }\n }\n }\n }\n}\n ",variables),options),useOpenOrderMutation=options=>(0,es.useMutation)(["openOrder"],(variables=>fetcher("\n mutation openOrder($input: SubmitOrderInput!) {\n submitOrder(input: $input, dryRun: false) {\n status\n message\n orderId\n }\n}\n ",variables)()),options),RecommendFromFaustDocument=`\n query recommendFromFaust($faust: String!, $limit: Int!) {\n recommend(faust: $faust, limit: $limit) {\n result {\n work {\n ...WorkSmall\n }\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useRecommendFromFaustQuery=(variables,options)=>(0,es.useQuery)(["recommendFromFaust",variables],fetcher(RecommendFromFaustDocument,variables),options),SearchWithPaginationDocument=`\n query searchWithPagination($q: SearchQuery!, $offset: Int!, $limit: PaginationLimit!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["searchWithPagination",variables],fetcher(SearchWithPaginationDocument,variables),options),useComplexSearchWithPaginationWorkAccessQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPaginationWorkAccess",variables],fetcher("\n query complexSearchWithPaginationWorkAccess($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkAccess\n }\n }\n}\n \n fragment WorkAccess on Work {\n workId\n manifestations {\n ...ManifestationsAccess\n }\n}\n \n fragment ManifestationsAccess on Manifestations {\n all {\n pid\n identifiers {\n type\n value\n }\n access {\n __typename\n ... on AccessUrl {\n origin\n url\n loginRequired\n }\n ... on InfomediaService {\n id\n }\n ... on InterLibraryLoan {\n loanIsPossible\n }\n ... on Ereol {\n origin\n url\n canAlwaysBeLoaned\n }\n ... on DigitalArticleService {\n issn\n }\n }\n }\n}\n ",variables),options),ComplexSearchWithPaginationDocument=`\n query complexSearchWithPagination($cql: String!, $offset: Int!, $limit: PaginationLimit!, $filters: ComplexSearchFilters!) {\n complexSearch(cql: $cql, filters: $filters) {\n hitcount\n works(offset: $offset, limit: $limit) {\n ...WorkSmall\n }\n }\n}\n ${WorkSmallFragmentDoc}`,useComplexSearchWithPaginationQuery=(variables,options)=>(0,es.useQuery)(["complexSearchWithPagination",variables],fetcher(ComplexSearchWithPaginationDocument,variables),options),SuggestionsFromQueryStringDocument=`\n query suggestionsFromQueryString($q: String!) {\n suggest(q: $q) {\n result {\n type\n term\n work {\n workId\n titles {\n main\n }\n creators {\n display\n }\n manifestations {\n all {\n pid\n }\n bestRepresentation {\n pid\n ...WithLanguages\n }\n }\n }\n }\n }\n}\n ${WithLanguagesFragmentDoc}`,useSuggestionsFromQueryStringQuery=(variables,options)=>(0,es.useQuery)(["suggestionsFromQueryString",variables],fetcher(SuggestionsFromQueryStringDocument,variables),options),useSearchFacetQuery=(variables,options)=>(0,es.useQuery)(["searchFacet",variables],fetcher("\n query searchFacet($q: SearchQuery!, $facets: [FacetField!]!, $facetLimit: Int!, $filters: SearchFilters) {\n search(q: $q, filters: $filters) {\n facets(facets: $facets) {\n name\n values(limit: $facetLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),useIntelligentFacetsQuery=(variables,options)=>(0,es.useQuery)(["intelligentFacets",variables],fetcher("\n query intelligentFacets($q: SearchQuery!, $facetsLimit: Int!, $valuesLimit: Int!, $filters: SearchFilters!) {\n search(q: $q, filters: $filters) {\n intelligentFacets(limit: $facetsLimit) {\n name\n values(limit: $valuesLimit) {\n key\n term\n score\n }\n }\n }\n}\n ",variables),options),usePlaceCopyMutation=options=>(0,es.useMutation)(["placeCopy"],(variables=>fetcher("\n mutation placeCopy($input: CopyRequestInput!) {\n elba {\n placeCopyRequest(input: $input) {\n status\n }\n }\n}\n ",variables)()),options);try{ComplexSearchFacets.displayName="ComplexSearchFacets",ComplexSearchFacets.__docgenInfo={description:"The supported facet fields",displayName:"ComplexSearchFacets",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#ComplexSearchFacets"]={docgenInfo:ComplexSearchFacets.__docgenInfo,name:"ComplexSearchFacets",path:"src/core/dbc-gateway/generated/graphql.tsx#ComplexSearchFacets"})}catch(__react_docgen_typescript_loader_error){}try{FacetField.displayName="FacetField",FacetField.__docgenInfo={description:"The supported facet fields",displayName:"FacetField",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#FacetField"]={docgenInfo:FacetField.__docgenInfo,name:"FacetField",path:"src/core/dbc-gateway/generated/graphql.tsx#FacetField"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnLoan.displayName="HoldingsStatus.OnLoan",HoldingsStatus.OnLoan.__docgenInfo={description:"Holding is on loan",displayName:"HoldingsStatus.OnLoan",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"]={docgenInfo:HoldingsStatus.OnLoan.__docgenInfo,name:"HoldingsStatus.OnLoan",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnLoan"})}catch(__react_docgen_typescript_loader_error){}try{HoldingsStatus.OnShelf.displayName="HoldingsStatus.OnShelf",HoldingsStatus.OnShelf.__docgenInfo={description:"Holding is physically available at the branch",displayName:"HoldingsStatus.OnShelf",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"]={docgenInfo:HoldingsStatus.OnShelf.__docgenInfo,name:"HoldingsStatus.OnShelf",path:"src/core/dbc-gateway/generated/graphql.tsx#HoldingsStatus.OnShelf"})}catch(__react_docgen_typescript_loader_error){}try{SubjectType.Person.displayName="SubjectType.Person",SubjectType.Person.__docgenInfo={description:"added for manifestation.parts.creators/person - they get a type from small-rye",displayName:"SubjectType.Person",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"]={docgenInfo:SubjectType.Person.__docgenInfo,name:"SubjectType.Person",path:"src/core/dbc-gateway/generated/graphql.tsx#SubjectType.Person"})}catch(__react_docgen_typescript_loader_error){}try{SubjectType.TopicChildren.displayName="SubjectType.TopicChildren",SubjectType.TopicChildren.__docgenInfo={description:"Subject describing selected topics for children, and a rating.",displayName:"SubjectType.TopicChildren",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubjectType.TopicChildren"]={docgenInfo:SubjectType.TopicChildren.__docgenInfo,name:"SubjectType.TopicChildren",path:"src/core/dbc-gateway/generated/graphql.tsx#SubjectType.TopicChildren"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.AuthenticationError.displayName="SubmitOrderStatus.AuthenticationError",SubmitOrderStatus.AuthenticationError.__docgenInfo={description:"Authentication error",displayName:"SubmitOrderStatus.AuthenticationError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"]={docgenInfo:SubmitOrderStatus.AuthenticationError.__docgenInfo,name:"SubmitOrderStatus.AuthenticationError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.AuthenticationError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserBlockedByAgency.displayName="SubmitOrderStatus.BorchkUserBlockedByAgency",SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo={description:"Borchk: User is blocked by agency",displayName:"SubmitOrderStatus.BorchkUserBlockedByAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserBlockedByAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserBlockedByAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserBlockedByAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNotVerified.displayName="SubmitOrderStatus.BorchkUserNotVerified",SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo={description:"Borchk: User could not be verified",displayName:"SubmitOrderStatus.BorchkUserNotVerified",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"]={docgenInfo:SubmitOrderStatus.BorchkUserNotVerified.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNotVerified",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNotVerified"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.displayName="SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo={description:"Borchk: User is no longer loaner at the provided pickupbranch",displayName:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"]={docgenInfo:SubmitOrderStatus.BorchkUserNoLongerExistOnAgency.__docgenInfo,name:"SubmitOrderStatus.BorchkUserNoLongerExistOnAgency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.BorchkUserNoLongerExistOnAgency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.ErrorMissingPincode.displayName="SubmitOrderStatus.ErrorMissingPincode",SubmitOrderStatus.ErrorMissingPincode.__docgenInfo={description:"Pincode was not found in arguments",displayName:"SubmitOrderStatus.ErrorMissingPincode",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ErrorMissingPincode"]={docgenInfo:SubmitOrderStatus.ErrorMissingPincode.__docgenInfo,name:"SubmitOrderStatus.ErrorMissingPincode",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ErrorMissingPincode"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.InvalidOrder.displayName="SubmitOrderStatus.InvalidOrder",SubmitOrderStatus.InvalidOrder.__docgenInfo={description:"Order does not validate",displayName:"SubmitOrderStatus.InvalidOrder",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"]={docgenInfo:SubmitOrderStatus.InvalidOrder.__docgenInfo,name:"SubmitOrderStatus.InvalidOrder",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.InvalidOrder"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedIllLoc.displayName="SubmitOrderStatus.NotOwnedIllLoc",SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item localised for ILL",displayName:"SubmitOrderStatus.NotOwnedIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedNoIllLoc.displayName="SubmitOrderStatus.NotOwnedNoIllLoc",SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo={description:"Item not available at pickupAgency, item not localised for ILL",displayName:"SubmitOrderStatus.NotOwnedNoIllLoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"]={docgenInfo:SubmitOrderStatus.NotOwnedNoIllLoc.__docgenInfo,name:"SubmitOrderStatus.NotOwnedNoIllLoc",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedNoIllLoc"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NotOwnedWrongIllMediumtype.displayName="SubmitOrderStatus.NotOwnedWrongIllMediumtype",SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo={description:"Item not available at pickupAgency, ILL of mediumType not accepted",displayName:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"]={docgenInfo:SubmitOrderStatus.NotOwnedWrongIllMediumtype.__docgenInfo,name:"SubmitOrderStatus.NotOwnedWrongIllMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NotOwnedWrongIllMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.NoServicerequester.displayName="SubmitOrderStatus.NoServicerequester",SubmitOrderStatus.NoServicerequester.__docgenInfo={description:"ServiceRequester is obligatory",displayName:"SubmitOrderStatus.NoServicerequester",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"]={docgenInfo:SubmitOrderStatus.NoServicerequester.__docgenInfo,name:"SubmitOrderStatus.NoServicerequester",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.NoServicerequester"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OrsError.displayName="SubmitOrderStatus.OrsError",SubmitOrderStatus.OrsError.__docgenInfo={description:"Error sending order to ORS",displayName:"SubmitOrderStatus.OrsError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"]={docgenInfo:SubmitOrderStatus.OrsError.__docgenInfo,name:"SubmitOrderStatus.OrsError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OrsError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedAccepted.displayName="SubmitOrderStatus.OwnedAccepted",SubmitOrderStatus.OwnedAccepted.__docgenInfo={description:"Item available at pickupAgency, order accepted",displayName:"SubmitOrderStatus.OwnedAccepted",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"]={docgenInfo:SubmitOrderStatus.OwnedAccepted.__docgenInfo,name:"SubmitOrderStatus.OwnedAccepted",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedAccepted"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedOwnCatalogue.displayName="SubmitOrderStatus.OwnedOwnCatalogue",SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo={description:"Item available at pickupAgency, item may be ordered through the library's catalogue",displayName:"SubmitOrderStatus.OwnedOwnCatalogue",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"]={docgenInfo:SubmitOrderStatus.OwnedOwnCatalogue.__docgenInfo,name:"SubmitOrderStatus.OwnedOwnCatalogue",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedOwnCatalogue"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.OwnedWrongMediumtype.displayName="SubmitOrderStatus.OwnedWrongMediumtype",SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo={description:"Item available at pickupAgency, order of mediumType not accepted",displayName:"SubmitOrderStatus.OwnedWrongMediumtype",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"]={docgenInfo:SubmitOrderStatus.OwnedWrongMediumtype.__docgenInfo,name:"SubmitOrderStatus.OwnedWrongMediumtype",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.OwnedWrongMediumtype"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.ServiceUnavailable.displayName="SubmitOrderStatus.ServiceUnavailable",SubmitOrderStatus.ServiceUnavailable.__docgenInfo={description:"Service unavailable",displayName:"SubmitOrderStatus.ServiceUnavailable",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"]={docgenInfo:SubmitOrderStatus.ServiceUnavailable.__docgenInfo,name:"SubmitOrderStatus.ServiceUnavailable",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.ServiceUnavailable"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownError.displayName="SubmitOrderStatus.UnknownError",SubmitOrderStatus.UnknownError.__docgenInfo={description:"Unknown error occured, status is unknown",displayName:"SubmitOrderStatus.UnknownError",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"]={docgenInfo:SubmitOrderStatus.UnknownError.__docgenInfo,name:"SubmitOrderStatus.UnknownError",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownError"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownPickupagency.displayName="SubmitOrderStatus.UnknownPickupagency",SubmitOrderStatus.UnknownPickupagency.__docgenInfo={description:"PickupAgency not found",displayName:"SubmitOrderStatus.UnknownPickupagency",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"]={docgenInfo:SubmitOrderStatus.UnknownPickupagency.__docgenInfo,name:"SubmitOrderStatus.UnknownPickupagency",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownPickupagency"})}catch(__react_docgen_typescript_loader_error){}try{SubmitOrderStatus.UnknownUser.displayName="SubmitOrderStatus.UnknownUser",SubmitOrderStatus.UnknownUser.__docgenInfo={description:"User not found",displayName:"SubmitOrderStatus.UnknownUser",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"]={docgenInfo:SubmitOrderStatus.UnknownUser.__docgenInfo,name:"SubmitOrderStatus.UnknownUser",path:"src/core/dbc-gateway/generated/graphql.tsx#SubmitOrderStatus.UnknownUser"})}catch(__react_docgen_typescript_loader_error){}try{useOpenOrderMutation.displayName="useOpenOrderMutation",useOpenOrderMutation.__docgenInfo={description:"",displayName:"useOpenOrderMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"]={docgenInfo:useOpenOrderMutation.__docgenInfo,name:"useOpenOrderMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#useOpenOrderMutation"})}catch(__react_docgen_typescript_loader_error){}try{usePlaceCopyMutation.displayName="usePlaceCopyMutation",usePlaceCopyMutation.__docgenInfo={description:"",displayName:"usePlaceCopyMutation",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"]={docgenInfo:usePlaceCopyMutation.__docgenInfo,name:"usePlaceCopyMutation",path:"src/core/dbc-gateway/generated/graphql.tsx#usePlaceCopyMutation"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/dpl-cms/dpl-cms.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{J0:()=>getDplOpeningHoursListGETQueryKey,Fg:()=>useCampaignMatchPOST,hi:()=>useDplOpeningHoursCreatePOST,v2:()=>useDplOpeningHoursDeleteDELETE,Dp:()=>useDplOpeningHoursListGET,I1:()=>useDplOpeningHoursUpdatePATCH,vS:()=>useProxyUrlGET});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class DplCmsServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","DplCmsServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.gf)(core_token.CI)??(0,core_token.gf)(core_token._L),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.dplCms),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new DplCmsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof DplCmsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.A(message,serviceUrl)}return null},getCampaignMatchPOSTMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data,params}=props??{};return((campaignMatchPOSTBodyItem,params)=>fetcher_fetcher({url:"/dpl_campaign/match",method:"POST",headers:{"Content-Type":"application/json"},data:campaignMatchPOSTBodyItem,params}))(data,params)},...mutationOptions}},useCampaignMatchPOST=options=>{const mutationOptions=getCampaignMatchPOSTMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getDplOpeningHoursCreatePOSTMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data,params}=props??{};return((dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params)=>fetcher_fetcher({url:"/api/v1/opening_hours",method:"POST",headers:{"Content-Type":"application/json"},data:dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params}))(data,params)},...mutationOptions}},useDplOpeningHoursCreatePOST=options=>{const mutationOptions=getDplOpeningHoursCreatePOSTMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getDplOpeningHoursListGETQueryKey=params=>["/api/v1/opening_hours",...params?[params]:[]],getDplOpeningHoursListGETQueryOptions=(params,queryOptions)=>({queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getDplOpeningHoursListGETQueryKey(params),queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/api/v1/opening_hours",method:"GET",params,signal}))(params,signal),...queryOptions}),useDplOpeningHoursListGET=(params,queryOptions)=>{const options=getDplOpeningHoursListGETQueryOptions(params,queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query},getDplOpeningHoursDeleteDELETEMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{id,params}=props??{};return((id,params)=>fetcher_fetcher({url:`/api/v1/opening_hours/${id}`,method:"DELETE",params}))(id,params)},...mutationOptions}},useDplOpeningHoursDeleteDELETE=options=>{const mutationOptions=getDplOpeningHoursDeleteDELETEMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getDplOpeningHoursUpdatePATCHMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{id,data,params}=props??{};return((id,dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params)=>fetcher_fetcher({url:`/api/v1/opening_hours/${id}`,method:"PATCH",headers:{"Content-Type":"application/json"},data:dplOpeningHoursCreatePOSTOpeningHoursInstanceBody,params}))(id,data,params)},...mutationOptions}},useDplOpeningHoursUpdatePATCH=options=>{const mutationOptions=getDplOpeningHoursUpdatePATCHMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getProxyUrlGETQueryOptions=(params,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/dpl-url-proxy",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/dpl-url-proxy",method:"GET",params,signal}))(params,signal),...queryOptions}},useProxyUrlGET=(params,queryOptions)=>{const options=getProxyUrlGETQueryOptions(params,queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query}},"./src/core/errors/InvalidUrlError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}__webpack_require__.d(__webpack_exports__,{A:()=>InvalidUrlError});class InvalidUrlError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1),_defineProperty(this,"name","InvalidUrlError")}}},"./src/core/fbs/fbs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PC:()=>getAvailabilityV3,BK:()=>getGetHoldingsV3QueryKey,$4:()=>getGetLoansV2QueryKey,gm:()=>getGetPatronInformationByPatronIdV2QueryKey,vN:()=>getGetReservationsV2QueryKey,eu:()=>useAddReservationsV2,AQ:()=>useCreateV4,g1:()=>useDeleteReservations,io:()=>useGetAvailabilityV3,J2:()=>useGetFeesV2,pF:()=>useGetHoldingsV3,zw:()=>useGetLoansV2,wq:()=>useGetPatronInformationByPatronIdV2,$6:()=>useGetReservationsV2,Oc:()=>useRenewLoansV2,cK:()=>useUpdateReservations,AZ:()=>useUpdateV5});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherCriticalHttpError=__webpack_require__("./src/core/fetchers/FetcherCriticalHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FbsServiceHttpError extends FetcherCriticalHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","FbsServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,user.dG)()??(0,core_token.gf)(core_token._L),baseUrl=(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.fbs),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl,url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new FbsServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof FbsServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,serviceUrl)}return null},getDeleteReservationsMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{params}=props??{};return(params=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"DELETE",params}))(params)},...mutationOptions}},useDeleteReservations=options=>{const mutationOptions=getDeleteReservationsMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getUpdateReservationsMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations",method:"PUT",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useUpdateReservations=options=>{const mutationOptions=getUpdateReservationsMutationOptions(options);return(0,es.useMutation)(mutationOptions)},getGetReservationsV2QueryKey=()=>["/external/v1/agencyid/patrons/patronid/reservations/v2"],getGetReservationsV2QueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetReservationsV2QueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"GET",signal}))(signal),...queryOptions}},useGetReservationsV2=options=>{const queryOptions=getGetReservationsV2QueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getAddReservationsV2MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/v1/agencyid/patrons/patronid/reservations/v2",method:"POST",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useAddReservationsV2=options=>{const mutationOptions=getAddReservationsV2MutationOptions(options);return(0,es.useMutation)(mutationOptions)},getAvailabilityV3=(params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/availability/v3",method:"GET",params,signal}),useGetAvailabilityV3=(params,options)=>{const queryOptions=((params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/catalog/availability/v3",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>getAvailabilityV3(params,signal),...queryOptions}})(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetHoldingsV3QueryKey=params=>["/external/agencyid/catalog/holdings/v3",...params?[params]:[]],getGetHoldingsV3QueryOptions=(params,options)=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetHoldingsV3QueryKey(params),queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/catalog/holdings/v3",method:"GET",params,signal}))(params,signal),...queryOptions}},useGetHoldingsV3=(params,options)=>{const queryOptions=getGetHoldingsV3QueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetFeesV2QueryOptions=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/external/agencyid/patron/patronid/fees/v2",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/external/agencyid/patron/patronid/fees/v2",method:"GET",params,signal}))(params,signal),...queryOptions}},useGetFeesV2=(params,options)=>{const queryOptions=getGetFeesV2QueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getCreateV4MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/v4",method:"POST",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useCreateV4=options=>{const mutationOptions=getCreateV4MutationOptions(options);return(0,es.useMutation)(mutationOptions)},getRenewLoansV2MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/renew/v2",method:"POST",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useRenewLoansV2=options=>{const mutationOptions=getRenewLoansV2MutationOptions(options);return(0,es.useMutation)(mutationOptions)},getGetLoansV2QueryKey=()=>["/external/agencyid/patrons/patronid/loans/v2"],getGetLoansV2QueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetLoansV2QueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/loans/v2",method:"GET",signal}))(signal),...queryOptions}},useGetLoansV2=options=>{const queryOptions=getGetLoansV2QueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetPatronInformationByPatronIdV2QueryKey=()=>["/external/agencyid/patrons/patronid/v2"],getGetPatronInformationByPatronIdV2QueryOptions=queryOptions=>({queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetPatronInformationByPatronIdV2QueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v2",method:"GET",signal}))(signal),...queryOptions}),useGetPatronInformationByPatronIdV2=queryOptions=>{const options=getGetPatronInformationByPatronIdV2QueryOptions(queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query},getUpdateV5MutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{data}=props??{};return fetcher_fetcher({url:"/external/agencyid/patrons/patronid/v5",method:"PUT",headers:{"Content-Type":"application/json"},data})},...mutationOptions}},useUpdateV5=options=>{const mutationOptions=getUpdateV5MutationOptions(options);return(0,es.useMutation)(mutationOptions)}},"./src/core/fetchers/FetchFailedCriticalError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetchFailedCriticalError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetchFailedCriticalError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedCriticalError"),_defineProperty(this,"useErrorBoundary",!0),this.context=context}}},"./src/core/fetchers/FetchFailedError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetchFailedError});var _FetcherError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fetchers/FetcherError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetchFailedError extends _FetcherError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(message,context){super(message),_defineProperty(this,"context",void 0),_defineProperty(this,"name","FetchFailedError"),_defineProperty(this,"useErrorBoundary",!1),this.context=context}}},"./src/core/fetchers/FetcherCriticalHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetcherCriticalHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetcherCriticalHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!0)}}},"./src/core/fetchers/FetcherError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}__webpack_require__.d(__webpack_exports__,{A:()=>FetcherError});class FetcherError extends Error{constructor(message,context){super(message),this.message=message,this.context=context,_defineProperty(this,"name","FetcherError")}}},"./src/core/fetchers/FetcherHttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>FetcherHttpError});var _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/errors/HttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class FetcherHttpError extends _utils_errors_HttpError__WEBPACK_IMPORTED_MODULE_0__.A{constructor(status,message,context){super(status,message,context),this.status=status,this.message=message,this.context=context,_defineProperty(this,"useErrorBoundary",!1)}}},"./src/core/fetchers/helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z4:()=>getServiceUrlWithParams});const getServiceUrlWithParams=({baseUrl,url,params})=>{const urlParams=params?`?${(data=>{let params;return"string"==typeof data||void 0===data?params=new URLSearchParams(data):(params=new URLSearchParams,Object.entries(data).forEach((([key,value])=>{Array.isArray(value)?value.forEach((inner=>{params.append(key,inner.toString())})):params.append(key,value.toString())}))),params})(params)}`:"";return`${baseUrl}${url}${urlParams}`}},"./src/core/filter.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,IU:()=>clear,TF:()=>remove,WQ:()=>add});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const initialState={},filterState=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.Z0)({name:"filter",initialState,reducers:{add(state,action){const{facet,term}=action.payload;return{...state,[facet]:{...state[facet],[term.term]:term}}},remove(state,action){const{facet,term}=action.payload,selectedFacet={...state[facet]};if(delete selectedFacet[term.term],0===Object.keys(selectedFacet).length){const stateCopy={...state};return delete stateCopy[facet],stateCopy}return{...state,[facet]:selectedFacet}},clear:()=>initialState}}),{add,remove,clear}=filterState.actions,__WEBPACK_DEFAULT_EXPORT__=filterState.reducer},"./src/core/guardedRequests.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A5:()=>guardedRequest,Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Cp:()=>reRunRequest,d2:()=>hasRequestExpired,l0:()=>AUTH_PARAM,ss:()=>removeRequest});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/material-list-api/material-list.ts"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/helpers/date.ts"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/utils/helpers/url.ts"),_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/helpers/user.ts");const AUTH_PARAM="didAuthenticate",requestCallbacks={addFavorite:({id,queryClient})=>(0,_material_list_api_material_list__WEBPACK_IMPORTED_MODULE_0__.B5)("default",id,queryClient)},hasRequestExpired=({expire})=>!expire||(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.Ay)()>expire,guardedRequests=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.Z0)({name:"guardedRequests",initialState:{request:null},reducers:{addRequest(state,action){const{payload:request}=action;null!=request&&request.expire||(request.expire=(0,_utils_helpers_date__WEBPACK_IMPORTED_MODULE_2__.Ay)()+60),state.request=request},removeRequest(state){state.request=null}}}),{addRequest,removeRequest}=guardedRequests.actions,getRequestCallback=type=>null==requestCallbacks?void 0:requestCallbacks[type],requestCallbackExists=type=>Boolean(getRequestCallback(type)),guardedRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.zD)("guardedRequests/performRequest",(async(requestItem,{dispatch,fulfillWithValue,getState})=>{const{type,args}=requestItem;if(!requestCallbackExists(type))return fulfillWithValue({status:"ignored",message:"Nothing to do"});(0,_utils_helpers_user__WEBPACK_IMPORTED_MODULE_3__.ok)()&&(dispatch(addRequest(requestItem)),_store__WEBPACK_IMPORTED_MODULE_1__.qj.flush().then((()=>{const{authUrl}=(state=>{const{url:{data}}=state;return(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.tP)(data)})(getState());if(authUrl){const returnUrl=(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.gG)({[AUTH_PARAM]:"1"});(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_5__.bX)({authUrl,returnUrl})}}))),console.debug("PERFORMING REQUEST CALLBACK");return getRequestCallback(type)(args)})),reRunRequest=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_4__.zD)("guardedRequests/reRunRequest",(async(requestItem,{fulfillWithValue})=>{const{type,args}=requestItem;if(requestCallbackExists(type)){const requestCallback=getRequestCallback(type);return console.debug("RERUNNING REQUEST"),requestCallback(args)}return fulfillWithValue({status:"success",message:""})})),__WEBPACK_DEFAULT_EXPORT__=guardedRequests.reducer},"./src/core/material-list-api/material-list.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B5:()=>addItem,Ai:()=>removeItem,M7:()=>useGetList,Xi:()=>useHasItem});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedError=__webpack_require__("./src/core/fetchers/FetchFailedError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class MaterialListServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","MaterialListServiceHttpError")}}const fetcher=async({url,method,params,data})=>{const additionalHeaders="object"===(null==data?void 0:data.headers)?null==data?void 0:data.headers:{},userToken=(0,token.gf)(token.CI),headers={...userToken?{Authorization:`Bearer ${userToken}`}:{},...additionalHeaders,"Accept-Version":"2"},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.materialList),url,params});try{const response=await fetch(serviceUrl,{method,headers,body});if(!response.ok)throw new MaterialListServiceHttpError(response.status,response.statusText,serviceUrl);if("get"===method)try{return await response.json()}catch(error){throw new Error("The response body contains invalid JSON")}}catch(error){if(error instanceof MaterialListServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedError.A(message,serviceUrl)}return null},getGetListQueryKey=(listId,params)=>[`/list/${listId}`,...params?[params]:[]],useGetList=(listId,params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??getGetListQueryKey(listId,params),query=(0,es.useQuery)(queryKey,(({signal})=>((listId,params,signal)=>fetcher({url:`/list/${listId}`,method:"get",signal,params}))(listId,params,signal)),{enabled:!!listId,...queryOptions});return{queryKey,...query}},useHasItem=options=>{const{mutation:mutationOptions}=options??{};return(0,es.useMutation)((props=>{const{listId,itemId}=props??{};return((listId,itemId,signal)=>fetcher({url:`/list/${listId}/${itemId}`,method:"head",signal}))(listId,itemId)}),mutationOptions)},addItem=(listId,itemId,queryClient)=>fetcher({url:`/list/${listId}/${itemId}`,method:"put"}).then((()=>queryClient.invalidateQueries(getGetListQueryKey(listId)))),removeItem=(listId,itemId,queryClient)=>fetcher({url:`/list/${listId}/${itemId}`,method:"delete"}).then((()=>queryClient.invalidateQueries(getGetListQueryKey(listId))))},"./src/core/modal.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Oo:()=>closeModal,ch:()=>closeLastModal,qf:()=>openModal,s7:()=>closeAllModals});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/helpers/url.ts");const focusContainerArray=[],returnFocusElement=()=>{const element=focusContainerArray.pop();return element&&element.focus(),element},removeModalIdFromUrl=state=>{if(state.modalIds&&state.modalIds.length>0){const lastModalId=state.modalIds[state.modalIds.length-1];(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.$u)({modal:lastModalId})}else(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.MR)("modal")},modalSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.Z0)({name:"modal",initialState:{modalIds:[]},reducers:{openModal(state,action){if(window.document&&(document.body.style.overflow="hidden"),action.payload.modalId&&!state.modalIds.includes(action.payload.modalId)){state.modalIds.push(action.payload.modalId);const alreadyOpenModals=new URLSearchParams(window.location.search).get("modal");alreadyOpenModals!==action.payload.modalId&&window.history.pushState("","",(0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.xl)(new URL((0,_utils_helpers_url__WEBPACK_IMPORTED_MODULE_0__.Lu)()),{modal:`${alreadyOpenModals??""}${action.payload.modalId}`}))}const{activeElement}=document;var elementToStore;activeElement&&"BODY"!==activeElement.tagName&&(elementToStore=activeElement)&&focusContainerArray.push(elementToStore)},closeModal(state,action){const modalId=state.modalIds.pop();state.modalIds.indexOf(action.payload.modalId)>-1&&state.modalIds.splice(state.modalIds.indexOf(action.payload.modalId),1),modalId&&(removeModalIdFromUrl(state),returnFocusElement()),0===state.modalIds.length&&(document.body.style.overflow="")},closeLastModal(state){document.body.style.overflow="";state.modalIds.pop()&&(removeModalIdFromUrl(state),returnFocusElement())},closeAllModals(state){document.body.style.overflow="",state.modalIds=[],removeModalIdFromUrl(state),returnFocusElement()}}}),{openModal,closeModal,closeLastModal,closeAllModals}=modalSlice.actions,__WEBPACK_DEFAULT_EXPORT__=modalSlice.reducer},"./src/core/publizon/publizon.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{tt:()=>getGetV1UserReservationsQueryKey,de:()=>useDeleteV1UserReservationsIdentifier,PF:()=>useGetV1LibraryProfile,Qo:()=>useGetV1LoanstatusIdentifier,wK:()=>useGetV1ProductsIdentifier,VM:()=>useGetV1UserLoans,pA:()=>useGetV1UserReservations});var es=__webpack_require__("./node_modules/react-query/es/index.js"),FetchFailedCriticalError=__webpack_require__("./src/core/fetchers/FetchFailedCriticalError.ts"),helpers=__webpack_require__("./src/core/fetchers/helpers.ts"),core_token=__webpack_require__("./src/core/token.js"),extractServiceBaseUrls=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),FetcherHttpError=__webpack_require__("./src/core/fetchers/FetcherHttpError.ts");function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class PublizonServiceHttpError extends FetcherHttpError.A{constructor(...args){super(...args),_defineProperty(this,"name","PublizonServiceHttpError")}}const fetcher_fetcher=async({url,method,headers,params,data})=>{const token=(0,core_token.gf)(core_token.CI)??(0,core_token.gf)(core_token._L),authHeaders=token?{Authorization:`Bearer ${token}`}:{},body=data?JSON.stringify(data):null,serviceUrl=(0,helpers.Z4)({baseUrl:(0,extractServiceBaseUrls.aW)(extractServiceBaseUrls.TJ.publizon),url,params});try{const response=await fetch(serviceUrl,{method,headers:{...headers,...authHeaders},body});if(!response.ok)throw new PublizonServiceHttpError(response.status,response.statusText,serviceUrl);try{return await response.json()}catch(e){if(!(e instanceof SyntaxError))throw e}}catch(error){if(error instanceof PublizonServiceHttpError)throw error;const message=error instanceof Error?error.message:"Unknown error";throw new FetchFailedCriticalError.A(message,serviceUrl)}return null},getGetV1LibraryProfileQueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??["/v1/library/profile"],queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/v1/library/profile",method:"GET",signal}))(signal),...queryOptions}},useGetV1LibraryProfile=options=>{const queryOptions=getGetV1LibraryProfileQueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetV1UserLoansQueryOptions=(params,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(params=>["/v1/user/loans",...params?[params]:[]])(params);return{queryKey,queryFn:({signal})=>((params,signal)=>fetcher_fetcher({url:"/v1/user/loans",method:"GET",params,signal}))(params,signal),...queryOptions}},useGetV1UserLoans=(params,options)=>{const queryOptions=getGetV1UserLoansQueryOptions(params,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetV1LoanstatusIdentifierQueryOptions=(identifier,queryOptions)=>{const queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/loanstatus/${identifier}`])(identifier);return{queryKey,queryFn:({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/loanstatus/${identifier}`,method:"GET",signal}))(identifier,signal),enabled:!!identifier,...queryOptions}},useGetV1LoanstatusIdentifier=(identifier,queryOptions)=>{const options=getGetV1LoanstatusIdentifierQueryOptions(identifier,queryOptions),query=(0,es.useQuery)(options);return query.queryKey=options.queryKey,query},getGetV1ProductsIdentifierQueryOptions=(identifier,options)=>{const{query:queryOptions}=options??{},queryKey=(null==queryOptions?void 0:queryOptions.queryKey)??(identifier=>[`/v1/products/${identifier}`])(identifier);return{queryKey,queryFn:({signal})=>((identifier,signal)=>fetcher_fetcher({url:`/v1/products/${identifier}`,method:"GET",signal}))(identifier,signal),enabled:!!identifier,...queryOptions}},useGetV1ProductsIdentifier=(identifier,options)=>{const queryOptions=getGetV1ProductsIdentifierQueryOptions(identifier,options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getGetV1UserReservationsQueryKey=()=>["/v1/user/reservations"],getGetV1UserReservationsQueryOptions=options=>{const{query:queryOptions}=options??{};return{queryKey:(null==queryOptions?void 0:queryOptions.queryKey)??getGetV1UserReservationsQueryKey(),queryFn:({signal})=>(signal=>fetcher_fetcher({url:"/v1/user/reservations",method:"GET",signal}))(signal),...queryOptions}},useGetV1UserReservations=options=>{const queryOptions=getGetV1UserReservationsQueryOptions(options),query=(0,es.useQuery)(queryOptions);return query.queryKey=queryOptions.queryKey,query},getDeleteV1UserReservationsIdentifierMutationOptions=options=>{const{mutation:mutationOptions}=options??{};return{mutationFn:props=>{const{identifier}=props??{};return(identifier=>fetcher_fetcher({url:`/v1/user/reservations/${identifier}`,method:"DELETE"}))(identifier)},...mutationOptions}},useDeleteV1UserReservationsIdentifier=options=>{const mutationOptions=getDeleteV1UserReservationsIdentifierMutationOptions(options);return(0,es.useMutation)(mutationOptions)}},"./src/core/statistics/statistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>statistics});const statistics={searchQuery:{id:10,name:"OSS"},searchResultCount:{id:11,name:"OSS Results"},searchFacets:{id:20,name:"Søgning Facet"},materialType:{id:24,name:"Materialetype"},materialGenre:{id:25,name:"Materiale Genre"},materialLanguage:{id:29,name:"Materiale Sprog"},materialSource:{id:30,name:"Materiale Kilde"},materialTargetAudience:{id:31,name:"Materiale Målgruppe"},materialTopicNumber:{id:32,name:"Materiale - DK5-nummer (Emnetal)"},materialFictionNonFiction:{id:33,name:"Materiale Fiktion/nonfiktion"},materialStatus:{id:38,name:"Materiale Status"},searchResultNumberClick:{id:42,name:"Søgning - Resultatnummer klik"},campaignClick:{id:48,name:"Kampagneklik"},reservation:{id:50,name:"Reserver"},onlineReservation:{id:51,name:"Se online"},autosuggestClick:{id:54,name:"Autosuggest - klik"},campaignShown:{id:62,name:"KampagnePlus Titel"},renewSelectedMaterials:{id:55,name:"Forny valgte materialer"},renewAllMaterials:{id:56,name:"Forny alle materialer"},addToFavorites:{id:61,name:"Tilføj til liste"}}},"./src/core/statistics/useStatistics.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function useStatistics(){return window.wts||(window.wts={push(trackingProps){console.log(`Tracking: ${trackingProps[0]}, ${trackingProps[1]}, ${JSON.stringify(trackingProps[2])}`)}}),{track:(eventType,trackParameters)=>{const eventData={linkId:trackParameters.name,customClickParameter:{}};return eventData.customClickParameter[trackParameters.id]=trackParameters.trackedData,window.wts.push(["send",eventType,eventData]),new Promise((resolve=>{setTimeout((()=>{resolve("resolved")}),500)}))}}}__webpack_require__.d(__webpack_exports__,{B:()=>useStatistics})},"./src/core/store.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M_:()=>store,d4:()=>useSelector,qj:()=>persistor});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/redux/es/redux.js"),react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),redux_persist__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/redux-persist/es/index.js"),redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/redux-persist/lib/storage/session.js"),_text_slice__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/text.slice.ts"),_user_slice__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/user.slice.js"),_modal_slice__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/core/modal.slice.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/core/url.slice.ts"),_filter_slice__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/core/filter.slice.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/core/config.slice.ts"),_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/core/blockedModal.slice.ts"),_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/core/guardedRequests.slice.ts"),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts");const persistConfig={key:"dpl-react",storage:redux_persist_lib_storage_session__WEBPACK_IMPORTED_MODULE_2__.A,blacklist:["text","url","modal","config","blockedModal"]},store=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_12__.U1)({middleware:getDefaultMiddleware=>[...getDefaultMiddleware(),_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_11__.Ay],reducer:(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.rL)(persistConfig,(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_13__.HY)({user:_user_slice__WEBPACK_IMPORTED_MODULE_4__.Ay,text:_text_slice__WEBPACK_IMPORTED_MODULE_3__.Ay,modal:_modal_slice__WEBPACK_IMPORTED_MODULE_5__.Ay,url:_url_slice__WEBPACK_IMPORTED_MODULE_6__.Ay,config:_config_slice__WEBPACK_IMPORTED_MODULE_8__.Ay,guardedRequests:_guardedRequests_slice__WEBPACK_IMPORTED_MODULE_10__.Ay,blockedModal:_blockedModal_slice__WEBPACK_IMPORTED_MODULE_9__.Ay,filter:_filter_slice__WEBPACK_IMPORTED_MODULE_7__.Ay})),devTools:!1}),persistor=(0,redux_persist__WEBPACK_IMPORTED_MODULE_1__.GM)(store),useSelector=react_redux__WEBPACK_IMPORTED_MODULE_0__.d4},"./src/core/storybook/blockedArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blockedPatronDTitleText:{defaultValue:"D Title",control:{type:"text"}},blockedPatronDBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronSTitleText:{defaultValue:"S Title",control:{type:"text"}},blockedPatronSBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronFTitleText:{defaultValue:"F Title",control:{type:"text"}},blockedPatronFBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronETitleText:{defaultValue:"You have exceeded your fee limit",control:{type:"text"}},blockedPatronEBodyText:{defaultValue:"You are therefore not able to borrow or reserve materials from the library",control:{type:"text"}},blockedPatronWTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronWBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. Please contact the library for further information",control:{type:"text"}},blockedPatronOTitleText:{defaultValue:"O title",control:{type:"text"}},blockedPatronOBodyText:{defaultValue:"Lorem ipsum",control:{type:"text"}},blockedPatronUTitleText:{defaultValue:"Your user is blocked",control:{type:"text"}},blockedPatronUBodyText:{defaultValue:"You therefore cannot reserve, borrow or renew loans. $Please contact the library for further information",control:{type:"text"}},blockedPatronELinkText:{defaultValue:"Pay your fees here",control:{type:"text"}},blockedPatronELinkUrl:{defaultValue:"https://unsplash.com/photos/r077pfFsdaU",control:{type:"text"}},blockedPatronCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close blocked patron modal"},blockedPatronModalAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal alerts you, that your patron has been blocked"},redirectOnBlockedUrl:{control:{type:"text"},defaultValue:"https://unsplash.com/photos/r077pfFsdaU"}}},"./src/core/storybook/deleteReservationModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={deleteReservationModalHeaderText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalDeleteQuestionText:{defaultValue:'{"type":"plural","text":["Do you want to cancel your reservation?","Do you want to cancel your reservations?"]}',control:{type:"text"}},deleteReservationModalNotRegrettableText:{defaultValue:"You cannot regret this action",control:{type:"text"}},deleteReservationModalDeleteButtonText:{defaultValue:'{"type":"plural","text":["Cancel reservation","Cancel reservations"]}',control:{type:"text"}},deleteReservationModalCloseModalText:{defaultValue:"Close delete reservation modal",control:{type:"text"}},deleteReservationModalAriaDescriptionText:{defaultValue:"This button opens a modal that covers the entire page and contains the possibility to delete a selected reservation, or multiple selected reservations",control:{type:"text"}}}},"./src/core/storybook/globalConfigArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={errorMessagesConfig:{name:"Configuration for error messages behaviour",defaultValue:'{"containerId":"dpl-react-apps-error-messages","shouldOnlyShowOneError":true,"showCloseButton":true}',control:{type:"text"}}}},"./src/core/storybook/globalTextArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={alertErrorCloseText:{name:"Alert error close text",defaultValue:"close",control:{type:"text"}},alertErrorMessageText:{name:"Alert error message text",defaultValue:"An error occurred",control:{type:"text"}},multiselectAllOptionText:{name:"Multiselect - all option",defaultValue:"All",control:{type:"text"}},groupModalGoToMaterialAriaLabelText:{defaultValue:"Go to @label material details",control:{type:"text"}},availabilityAvailableText:{name:"Availability: available text",defaultValue:"Available",control:{type:"text"}},availabilityUnavailableText:{name:"Availability: unavailable text",defaultValue:"Unavailable",control:{type:"text"}},loansNotOverdueText:{defaultValue:"Longer return time",control:{type:"text"}},patronContactInfoBodyText:{defaultValue:"Patron contact info body text",control:{type:"text"}},pauseReservationModalBelowInputsText:{defaultValue:"Pause reservation modal below inputs text",control:{type:"text"}},materialDetailsCloseModalAriaLabelText:{defaultValue:"Close material details modal",control:{type:"text"}},findOnShelfExpandButtonExplanationText:{name:"Find on shelf expand button explanation text",defaultValue:"This button opens a modal",control:{type:"text"}},reservationsStillInQueueForText:{defaultValue:"Still in queue",control:{type:"text"}},materialDetailsModalAriaDescriptionText:{defaultValue:"This modal shows material details, and makes it possible to renew a material, of that material is renewable",control:{type:"text"}},changePickupLocationText:{name:"Change pickup location text",defaultValue:"Change pickup location",control:{type:"text"}},changeInterestPeriodText:{name:"Change interest period text",defaultValue:"Change interest period",control:{type:"text"}},modalReservationFormPickupLabelText:{name:"Modal reservation form pickup branch input label",defaultValue:"Change pickup location for your reservation.",control:{type:"text"}},screenReaderModalDescriptionPickupText:{name:"Screen reader modal description for pickup",defaultValue:"Change pickup location modal",control:{type:"text"}},closeModalAriaLabelPickupText:{name:"Close modal aria-label pickup",defaultValue:"Close pickup location modal",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterLabelText:{name:"Modal reservation form no interest after input label",defaultValue:"Change the amount of time after which you're no longer interested in this material.",control:{type:"text"}},screenReaderModalDescriptionInterestPeriodText:{name:"Screen reader modal description for interest period",defaultValue:"Change interest period modal",control:{type:"text"}},screenReaderModalDescriptionEmailText:{name:"Screen reader modal description for email",defaultValue:"Change email modal",control:{type:"text"}},screenReaderModalDescriptionSmsText:{name:"Screen reader modal description for sms",defaultValue:"Change mobile number modal",control:{type:"text"}},closeModalAriaLabelInterestPeriodText:{name:"Close modal aria-label interest period ",defaultValue:"Close interest period modal",control:{type:"text"}},closeModalAriaLabelSmsText:{name:"Close modal aria-label sms",defaultValue:"Close change mobile number modal",control:{type:"text"}},closeModalAriaLabelEmailText:{name:"Close modal aria-label email",defaultValue:"Close change email modal",control:{type:"text"}},deleteReservationModalButtonText:{name:"Delete reservation modal delete button text",defaultValue:"Ok",control:{type:"text"}},acceptModalAriaLabelText:{defaultValue:"accept modal aria label text",control:{type:"text"}},pauseReservationModalAriaDescriptionText:{defaultValue:"This modal makes it possible to pause your physical reservations",control:{type:"text"}},addToFavoritesAriaLabelText:{defaultValue:"Add @title to favorites list",control:{type:"text"}},removeFromFavoritesAriaLabelText:{defaultValue:"Remove @title from favorites list",control:{type:"text"}},acceptModalAriaDescriptionText:{defaultValue:"accept modal aria description text",control:{type:"text"}},acceptModalHeaderText:{defaultValue:"Hov, dit gebyr forhøjes!",control:{type:"text"}},acceptModalBodyText:{defaultValue:"Fornyer du dine lån, forhøjes dit gebyr. Alle materialer ikke kan fornys og lånet splittes derfor op. Ved overskredne lån modtager du et gebyr pr. lån og derfor forhøjes dit samlede gebyr, hvis du vælger at gå videre med at fornye.",control:{type:"text"}},acceptModalAreYouSureText:{defaultValue:"Er du sikker på du vil fornye?",control:{type:"text"}},acceptModalAcceptButtonText:{defaultValue:"Ja, forny mulige",control:{type:"text"}},acceptModalCancelButtonText:{defaultValue:"Annuller fornyelse",control:{type:"text"}},isLoadingHeartText:{defaultValue:"Indlæser",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},reservationListDigitalPickupText:{defaultValue:"Online access",control:{type:"text"}},errorBoundaryAlertBodyButtonAriaText:{defaultValue:"Close error message",control:{type:"text"}},loadingText:{defaultValue:"Loading...",control:{type:"text"}},pincodeSectionDescriptionText:{defaultValue:"Length of 4 characters",control:{type:"text"}}}},"./src/core/storybook/groupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalDueDateLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},groupModalDueDateMaterialText:{control:{type:"text"},defaultValue:"To be returned @date"},groupModalDueDateDigitalMaterialText:{control:{type:"text"},defaultValue:"Expires @date"},groupModalGoToMaterialText:{defaultValue:"Go to material details",control:{type:"text"}},groupModalDueDateHeaderText:{control:{type:"text"},defaultValue:"Due date @date"},resultPagerStatusText:{defaultValue:"Showing @itemsShown out of @hitcount elements",control:{type:"text"}},groupModalCheckboxText:{control:{type:"text"},defaultValue:"Choose all"},groupModalHiddenLabelCheckboxOnMaterialText:{control:{type:"text"},defaultValue:"Select @label"},pageSizeDesktop:{defaultValue:10,control:{type:"number"}},pageSizeMobile:{defaultValue:5,control:{type:"number"}},showMoreText:{defaultValue:"show more",control:{type:"text"}}}},"./src/core/storybook/loanGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalRenewLoanDeniedMaxRenewalsReachedText:{control:{type:"text"},defaultValue:"Can't be renewed further"},groupModalDueDateWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},groupModalRenewLoanDeniedReservedText:{control:{type:"text"},defaultValue:"Reserved by another patron"},groupModalRenewLoanDeniedInterLibraryLoanText:{defaultValue:"Lent by another library",control:{type:"text"}},groupModalLoansCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped loans"},groupModalLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to renew materials"},groupModalButtonText:{control:{type:"text"},defaultValue:"Renewable (@count)"}}},"./src/core/storybook/materialDetailsModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={materialDetailsWarningLoanOverdueText:{control:{type:"text"},defaultValue:"The due date of return is exceeded, therefore you will be charged a fee, when the item is returned"},materialDetailsPhysicalDueDateLabelText:{control:{type:"text"},defaultValue:"Afleveres"},materialDetailsLoanDateLabelText:{control:{type:"text"},defaultValue:"Loan date"},materialDetailsMaterialNumberLabelText:{control:{type:"text"},defaultValue:"Material Item Number"},materialDetailsLinkToPageWithFeesText:{control:{type:"text"},defaultValue:"Read more about fees"},materialDetailsOverdueText:{control:{type:"text"},defaultValue:"Expired"},materialDetailsGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},materialDetailsDigitalDueDateLabelText:{control:{type:"text"},defaultValue:"Expires"},materialDetailsRenewLoanButtonText:{control:{type:"text"},defaultValue:"Renew your loan"},feesPageUrl:{defaultValue:"/user/me/fees",control:{type:"text"}},viewFeesAndCompensationRatesUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}},ereolenMyPageUrl:{defaultValue:"https://unsplash.com/photos/wd6YQy0PJt8",control:{type:"text"}}}},"./src/core/storybook/pincodeArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={pincodeLengthMinConfig:{defaultValue:"4",control:{type:"number"}},pincodeLengthMaxConfig:{defaultValue:"5",control:{type:"number"}}}},"./src/core/storybook/renewalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={renewProcessingText:{control:{type:"text"},defaultValue:"Processing..."},renewButtonText:{control:{type:"text"},defaultValue:"Renew"},renewMaterialLoanSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loan"},renewMaterialLoanSuccessStatusText:{control:{type:"text"},defaultValue:"1 loan was renewed."},renewMaterialLoanNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"The loan could not be renewed"},renewMaterialLoanNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, your loan could not be renewed."},renewMaterialLoanErrorTitleText:{control:{type:"text"},defaultValue:"Renewal of your loan failed"},renewMaterialLoanErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loan. Please try again."},renewMaterialLoanButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansSuccessTitleText:{control:{type:"text"},defaultValue:"You have renewed your loans"},renewGroupModalLoansSuccessStatusText:{control:{type:"text"},defaultValue:'{"type":"plural","text":["1 loan has been renewed.","@count loans have been renewed."]}'},renewGroupModalLoansErrorTitleText:{control:{type:"text"},defaultValue:"Renewing your loans failed"},renewGroupModalLoansErrorStatusText:{control:{type:"text"},defaultValue:"Something went wrong renewing your loans. Please try again."},renewGroupModalLoansButtonText:{control:{type:"text"},defaultValue:"Ok"},renewGroupModalLoansNoRenewalsPossibleErrorTitleText:{control:{type:"text"},defaultValue:"No loans could be renewed"},renewGroupModalLoansNoRenewalsPossibleErrorStatusText:{control:{type:"text"},defaultValue:"For some reason, no one of your loans could be renewed."},renewCannotBeRenewedText:{control:{type:"text"},defaultValue:"Cannot be renewed"}}},"./src/core/storybook/reservationGroupModalArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={groupModalReservationsCloseModalAriaLabelText:{control:{type:"text"},defaultValue:"Close modal with grouped reservations"},groupModalReservationsLoansAriaDescriptionText:{control:{type:"text"},defaultValue:"This modal makes it possible to delete reservations"},readyForLoanCounterLabelText:{defaultValue:"Ready",control:{type:"text"}},removeAllReservationsText:{defaultValue:'{"type":"plural","text":["Remove reservation (@amount)","Remove reservations (@amount)"]}',control:{type:"text"}},pickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},reservationsReadyForPickupText:{defaultValue:"Reservations ready for pickup",control:{type:"text"}},physicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},digitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}}}},"./src/core/storybook/reservationListArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedSearchBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},expirationWarningDaysBeforeConfig:{defaultValue:"6",control:{type:"text"}},pauseReservationStartDateConfig:{defaultValue:"2022-06-30",control:{type:"text"}},blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},pageSizeDesktop:{defaultValue:20,control:{type:"number"}},pageSizeMobile:{defaultValue:10,control:{type:"number"}},ereolenMyPageUrl:{defaultValue:"https://ereolen.dk/user/me/",control:{type:"text"}},pauseReservationInfoUrl:{defaultValue:"https://images.unsplash.com/photo-1571043733612-d5444ff7d4ae?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1335&q=80",control:{type:"text"}},reservationListHeaderText:{defaultValue:"Your reservations",control:{type:"text"}},reservationListPhysicalReservationsHeaderText:{defaultValue:"Physical reservations",control:{type:"text"}},reservationListDigitalReservationsHeaderText:{defaultValue:"Digital reservations",control:{type:"text"}},reservationListReadyForPickupTitleText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationListReadyForPickupEmptyText:{defaultValue:"At the moment you have 0 reservations ready for pickup",control:{type:"text"}},reservationListPhysicalReservationsEmptyText:{defaultValue:"At the moment you have 0 physical reservations",control:{type:"text"}},reservationListAllEmptyText:{defaultValue:"At the moment you have 0 reservations",control:{type:"text"}},reservationListDigitalReservationsEmptyText:{defaultValue:"At the moment you have 0 reservations on digital items",control:{type:"text"}},reservationListReadyText:{defaultValue:"Ready",control:{type:"text"}},materialByAuthorText:{defaultValue:"By",control:{type:"text"}},materialAndAuthorText:{defaultValue:"and",control:{type:"text"}},etAlText:{defaultValue:"et al.",control:{type:"text"}},reservationListNumberInQueueText:{defaultValue:"There are @count people in the queue before you",control:{type:"text"}},reservationListFirstInQueueText:{defaultValue:"You are at the front of the queue",control:{type:"text"}},reservationListInQueueText:{defaultValue:"queued",control:{type:"text"}},reservationPickUpLatestText:{defaultValue:"Pick up before @date",control:{type:"text"}},publizonEbookText:{defaultValue:"E-book",control:{type:"text"}},publizonAudioBookText:{defaultValue:"Audiobook",control:{type:"text"}},publizonPodcastText:{defaultValue:"Podcast",control:{type:"text"}},reservationListLoanBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationListYouAreInQueueText:{defaultValue:"You are in the reservation queue",control:{type:"text"}},reservationListAvailableInText:{defaultValue:"Available in @count days",control:{type:"text"}},reservationListDaysText:{defaultValue:"days",control:{type:"text"}},reservationListDayText:{defaultValue:"day",control:{type:"text"}},reservationDetailsExpiresTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsDigitalMaterialExpiresTitleText:{defaultValue:"Borrow before",control:{type:"text"}},reservationDetailsExpiresText:{defaultValue:"Your reservation expires @date!",control:{type:"text"}},reservationDetailsSaveText:{defaultValue:"Save",control:{type:"text"}},reservationDetailsCancelText:{defaultValue:"Cancel",control:{type:"text"}},reservationListPauseReservationText:{defaultValue:"Pause your reservations",control:{type:"text"}},reservationListPauseReservationOnHoldText:{defaultValue:"Your reservations are paused",control:{type:"text"}},reservationListOnHoldAriaText:{defaultValue:"Reservations have been paused in the following time span: ",control:{type:"text"}},reservationListPauseReservationAriaModalText:{defaultValue:"Opens a modal that covers the entire page where it is possible to pause physical reservations",control:{type:"text"}},reservationListPauseReservationButtonText:{defaultValue:"Settings",control:{type:"text"}},pauseReservationModalHeaderText:{defaultValue:"Pause reservations on physical items",control:{type:"text"}},pauseReservationModalBodyText:{defaultValue:"Pause your reservations early, since reservations that are already being processed, will not be paused.",control:{type:"text"}},pauseReservationModalDateRangeLabelText:{defaultValue:"Pause period",control:{type:"text"}},pauseReservationModalDateRangePlaceholderText:{defaultValue:"Choose pause period",control:{type:"text"}},pauseReservationModalCloseModalText:{defaultValue:"Close pause reservations modal",control:{type:"text"}},pauseReservationModalLinkText:{defaultValue:"Read more about pausing reservertions and what that means here",control:{type:"text"}},pauseReservationModalSaveButtonLabelText:{defaultValue:"Save",control:{type:"text"}},pauseReservationModalCancelButtonLabelText:{defaultValue:"Cancel pause",control:{type:"text"}},listDetailsNothingSelectedLabelText:{defaultValue:"Pick",control:{type:"text"}},showMoreText:{name:"Show more Text",defaultValue:"show more",control:{type:"text"}},resultPagerStatusText:{name:"Result pager status text",defaultValue:"Showing @itemsShown out of @hitcount results",control:{type:"text"}},deleteReservationModalSuccessTitleText:{name:"Delete reservation modal success title text",defaultValue:'{"type":"plural","text":["Reservation deleted","Reservations deleted"]}',control:{type:"text"}},deleteReservationModalSuccessStatusText:{name:"Delete reservation modal success status text",defaultValue:'{"type":"plural","text":["One reservation was deleted","@count reservations were deleted"]}',control:{type:"text"}},deleteReservationModalErrorsTitleText:{name:"Delete reservation modal errors title text",defaultValue:"An error occurred",control:{type:"text"}},deleteReservationModalErrorsStatusText:{name:"Delete reservation modal errors status text",defaultValue:"One or more reservations could not be deleted, please try again.",control:{type:"text"}},deleteReservationModalDeleteProcessingText:{name:"Delete reservation modal delete processing text",defaultValue:"Processing...",control:{type:"text"}}}},"./src/core/storybook/reservationMaterialDetailsArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={blacklistedPickupBranchesConfig:{name:"Blacklisted branches",defaultValue:"FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",control:{type:"text"}},branchesConfig:{name:"Branches",defaultValue:'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',control:{type:"text"}},reservationDetailsConfig:{defaultValue:'{"allowRemoveReadyReservations": true}',control:{type:"text"}},interestPeriodsConfig:{defaultValue:'{ "interestPeriods":[ { "value":14, "label":"14 days" }, { "value":30, "label":"1 month" }, { "value":60, "label":"2 months" }, { "value":90, "label":"3 months" }, { "value":180, "label":"6 months" }, { "value":365, "label":"1 year" } ], "defaultInterestPeriod":{ "value":14, "label":"14 days" } }',control:{type:"text"}},reservationDetailsRemoveDigitalReservationText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsDateOfReservationTitleText:{defaultValue:"Date of reservation",control:{type:"text"}},reservationDetailsNoInterestAfterTitleText:{defaultValue:"Not interested after",control:{type:"text"}},reservationDetailsChangeText:{defaultValue:"Apply changes",control:{type:"text"}},reservationDetailsPickUpAtTitleText:{defaultValue:"Pickup branch",control:{type:"text"}},reservationDetailsButtonRemoveText:{defaultValue:"Remove your reservation",control:{type:"text"}},reservationDetailsStatusTitleText:{defaultValue:"Status",control:{type:"text"}},reservationDetailsBorrowBeforeText:{defaultValue:"Borrow before @date",control:{type:"text"}},reservationDetailsDigitalReservationGoToEreolenText:{defaultValue:"Go to eReolen",control:{type:"text"}},reservationDetailsReadyForLoanText:{defaultValue:"Ready for pickup",control:{type:"text"}},reservationDetailsPickupDeadlineTitleText:{defaultValue:"Pickup deadline",control:{type:"text"}},reservationDetailsNumberInQueueLabelText:{defaultValue:"@count queued",control:{type:"text"}},shiftText:{name:"Change",defaultValue:"Change",control:{type:"text"}},modalReservationFormPickupHeaderTitleText:{name:"Modal reservation form pickup header title",defaultValue:"Change pick-up location",control:{type:"text"}},modalReservationFormPickupHeaderDescriptionText:{name:"Modal reservation form pickup header description",defaultValue:"If you wish to change the pick-up location for your reservation, you can do it here.",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderTitleText:{name:"Modal reservation form no interest after header title",defaultValue:"Change date of interest",control:{type:"text"}},modalReservationFormNoInterestAfterHeaderDescriptionText:{name:"Modal reservation form no interest after header description",defaultValue:"If you wish to change the amount of time after which you're no longer interested in the material, you can do it here.",control:{type:"text"}},saveButtonText:{name:"Save button text",defaultValue:"Save",control:{type:"text"}},chooseOneText:{name:"Choose one text",defaultValue:"Choose one",control:{type:"text"}},loadingText:{name:"Loading",defaultValue:"Loading...",control:{type:"text"}},reservationSuccessTitleText:{name:"Reservation success title",defaultValue:"Your reservation has been changed",control:{type:"text"}},reservationSuccessSubTitleText:{name:"Reservation success sub title",defaultValue:"Click the button below to close this window",control:{type:"text"}},reservationerrorTitleText:{name:"Reservation error title",defaultValue:"Something went wrong",control:{type:"text"}},reservationerrorSubTitleText:{name:"Reservation error sub title",defaultValue:"Click the button below to close this window and try again",control:{type:"text"}},reservationStatusButtonText:{name:"Reservation success button text",defaultValue:"Close",control:{type:"text"}}}},"./src/core/storybook/serviceUrlArgs.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts"),process=__webpack_require__("./node_modules/process/browser.js");const __WEBPACK_DEFAULT_EXPORT__={[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbs]:{name:"Base url for the FBS API",defaultValue:process.env.FBS_BASEURL??"https://fbs-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.publizon]:{name:"Base url for the Publizon API",defaultValue:process.env.PUBLIZON_BASEURL??"https://pubhub-openplatform.dbc.dk",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.dplCms]:{name:"Base url for the DPL CMS API",defaultValue:process.env.CMS_BASEURL??"https://dpl-cms.docker",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.cover]:{name:"Base url for the cover service",defaultValue:"https://cover.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.materialList]:{name:"Base url for the material list service",defaultValue:"https://prod.materiallist.dandigbib.org",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbi]:{name:"Base url for the FBI API",defaultValue:"https://fbi-api.dbc.dk/next-present/graphql",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbiLocal]:{name:"Base url for the FBI API (local inventory)",defaultValue:"https://fbi-api.dbc.dk/next/graphql",control:{type:"text"}},[_utils_reduxMiddleware_extractServiceBaseUrls__WEBPACK_IMPORTED_MODULE_0__.TJ.fbiGlobal]:{name:"Base url for the FBI API (global inventory)",defaultValue:"https://fbi-api.dbc.dk/next-present/graphql",control:{type:"text"}}}},"./src/core/text.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,vn:()=>addTextEntries});const textSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"text",initialState:{data:{}},reducers:{addTextEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addTextEntries}=textSlice.actions,__WEBPACK_DEFAULT_EXPORT__=textSlice.reducer},"./src/core/token.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{CI:()=>TOKEN_USER_KEY,WG:()=>setToken,_L:()=>TOKEN_LIBRARY_KEY,g2:()=>TOKEN_UNREGISTERED_USER_KEY,gf:()=>getToken,y0:()=>hasToken});const tokens={},TOKEN_UNREGISTERED_USER_KEY="unregistered-user",TOKEN_USER_KEY="user",TOKEN_LIBRARY_KEY="library";function setToken(type,value){tokens[type]=value}function hasToken(type){return Boolean(tokens[type])}function getToken(type){return tokens[type]}},"./src/core/url.slice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,hx:()=>addUrlEntries});const urlSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"url",initialState:{data:{}},reducers:{addUrlEntries(state,action){state.data={...state.data,...action.payload.entries}}}}),{addUrlEntries}=urlSlice.actions,__WEBPACK_DEFAULT_EXPORT__=urlSlice.reducer},"./src/core/user.slice.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Qn:()=>setStatusAuthenticated,xE:()=>setStatusUnauthenticated});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const attemptAuthentication=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.zD)("user/attemptAuthentication",(()=>Promise.resolve())),userSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.Z0)({name:"user",initialState:{status:"unauthenticated"},reducers:{updateStatus(state,action){"unauthenticated"!==state.status&&"attempting"!==state.status||(action.payload.hasToken?state.status="authenticated":action.payload.doFail&&"attempting"===state.status&&(state.status="failed"))},setStatusAuthenticated(state){state.status="authenticated"},setStatusUnauthenticated(state){state.status="unauthenticated"}},extraReducers:{[attemptAuthentication.pending]:state=>{state.status="attempting"}}}),{updateStatus,setStatusAuthenticated,setStatusUnauthenticated}=userSlice.actions,__WEBPACK_DEFAULT_EXPORT__=userSlice.reducer},"./src/core/utils/branches.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,ov:()=>useGetBranches,z5:()=>excludeBlacklistedBranches});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const excludeBlacklistedBranches=(branches,blacklist)=>branches.filter((item=>!blacklist.includes(item.branchId))),cleanBranchesId=branches=>branches.map((branch=>{const matches=/-(\d*)/g.exec(branch.branchId);return matches?matches[1]:""})).filter((item=>item)),useGetBranches=key=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.UK)(),branches=config("branchesConfig",{transformer:"jsonParse"}),blacklistBranches=config(key,{transformer:"stringToArray"});return excludeBlacklistedBranches(branches,blacklistBranches)},__WEBPACK_DEFAULT_EXPORT__=()=>{const branches=useGetBranches("blacklistedSearchBranchesConfig");return cleanBranchesId(branches)};try{cleanBranchesId.displayName="cleanBranchesId",cleanBranchesId.__docgenInfo={description:"",displayName:"cleanBranchesId",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#cleanBranchesId"]={docgenInfo:cleanBranchesId.__docgenInfo,name:"cleanBranchesId",path:"src/core/utils/branches.tsx#cleanBranchesId"})}catch(__react_docgen_typescript_loader_error){}try{useGetBranches.displayName="useGetBranches",useGetBranches.__docgenInfo={description:"",displayName:"useGetBranches",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/branches.tsx#useGetBranches"]={docgenInfo:useGetBranches.__docgenInfo,name:"useGetBranches",path:"src/core/utils/branches.tsx#useGetBranches"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/config.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NV:()=>withConfig,UK:()=>useConfig});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_config_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/config.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useConfig=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.d4)((state=>state.config));return(key,options)=>{if("string"!=typeof data[key])throw new Error(`Config entry "${key}" is not defined.`);return"jsonParse"===(null==options?void 0:options.transformer)?JSON.parse(data[key]):"stringToArray"===(null==options?void 0:options.transformer)?data[key].split(","):"stringToNumber"===(null==options?void 0:options.transformer)?Number(data[key]):null==data?void 0:data[key]}},withConfig=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.A)(Component,"Config",_config_slice__WEBPACK_IMPORTED_MODULE_1__.Qw);try{withConfig.displayName="withConfig",withConfig.__docgenInfo={description:"",displayName:"withConfig",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/config.tsx#withConfig"]={docgenInfo:withConfig.__docgenInfo,name:"withConfig",path:"src/core/utils/config.tsx#withConfig"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/errors/HttpError.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function _defineProperty(e,r,t){return(r=function _toPropertyKey(t){var i=function _toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}__webpack_require__.d(__webpack_exports__,{A:()=>HttpError});class HttpError extends Error{constructor(status,message,context){super(message),this.status=status,this.message=message,this.context=context,_defineProperty(this,"name","HttpError"),_defineProperty(this,"statusCode",void 0),this.statusCode=status}}},"./src/core/utils/helpers/currency.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function formatCurrency(number){return number.toLocaleString("da-DK",{style:"currency",currency:"DKK"})}__webpack_require__.d(__webpack_exports__,{v:()=>formatCurrency})},"./src/core/utils/helpers/date.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,SL:()=>formatDateDependingOnDigitalMaterial,Yq:()=>formatDate,r6:()=>formatDateTime});var dayjs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/dayjs/dayjs.min.js"),dayjs__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);const formatDate=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY"),formatDateTime=date=>dayjs__WEBPACK_IMPORTED_MODULE_0___default()(date).format("DD-MM-YYYY HH:mm"),formatDateDependingOnDigitalMaterial=({date,isDigital})=>isDigital?formatDateTime(date):formatDate(date),__WEBPACK_DEFAULT_EXPORT__=()=>Math.floor(Date.now()/1e3)},"./src/core/utils/helpers/general.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AQ:()=>patronAgeValid,C2:()=>getReleaseYearSearchResult,CT:()=>getRenewableMaterials,EA:()=>sortByLoanDate,El:()=>materialIsOverdue,Ey:()=>getManifestationPublicationYear,G:()=>materialIsFiction,G_:()=>convertPostIdToFaustId,Gm:()=>getAuthorNames,IN:()=>getReviewRelease,J$:()=>getCoverTint,JB:()=>getMaterialTypes,Ki:()=>pageSizeGlobal,L1:()=>getListItems,OH:()=>convertPostIdsToFaustIds,Sy:()=>orderManifestationsByYear,UV:()=>flattenCreators,VZ:()=>getManifestationType,X6:()=>daysBetweenDates,Y2:()=>sortByReservationDate,Y5:()=>getAllPids,ZG:()=>tallyUpFees,Zc:()=>getContributors,bn:()=>getAllFaustIds,e$:()=>getManifestationsPids,eD:()=>getScrollClass,fL:()=>getRecommenderMaterialLimits,hh:()=>getWorkPid,jM:()=>getColors,kj:()=>groupObjectArrayByProperty,m2:()=>daysBetweenTodayAndDate,ng:()=>stringifyValue,oq:()=>getAmountOfRenewableLoans,sP:()=>creatorsToString,tI:()=>getParams,yr:()=>getLatestManifestation,yy:()=>getPublicationName});var lodash_uniq__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/uniq.js"),lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_0__),dayjs__WEBPACK_IMPORTED_MODULE_18__=(__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js"),__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/dayjs/dayjs.min.js")),dayjs__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_18__),_configuration__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/configuration/index.ts"),_url__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/core/utils/helpers/url.ts"),_store__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/store.ts"),_currency__WEBPACK_IMPORTED_MODULE_22__=(__webpack_require__("./src/core/utils/helpers/modal-helpers.ts"),__webpack_require__("./src/core/utils/helpers/currency.ts"));const getManifestationPublicationYear=manifestation=>{var _manifestation$editio,_manifestation$editio2;return(null===(_manifestation$editio=manifestation.edition)||void 0===_manifestation$editio||null===(_manifestation$editio2=_manifestation$editio.publicationYear)||void 0===_manifestation$editio2?void 0:_manifestation$editio2.display)||null},orderManifestationsByYear=(manifestations,order="desc")=>manifestations.sort(((a,b)=>{const currentDate=Number(getManifestationPublicationYear(a)),prevDate=Number(getManifestationPublicationYear(b));return"desc"===order?prevDate-currentDate:currentDate-prevDate})),flattenCreators=creators=>creators.map((creator=>creator.display)),creatorsToString=(creators,t)=>{if(creators.length>1){return`${creators.slice(0,2).join(", ")} ${t("etAlText")}`}return creators[0]},getLatestManifestation=manifestations=>orderManifestationsByYear(manifestations,"desc")[0],getWorkPid=work=>work.manifestations.bestRepresentation.pid||null,getCoverTint=index=>{const conf=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.FI)("coverTints",_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay),{coverTints}=conf;if(coverTints){return coverTints[index%coverTints.length]}},getColors=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.FI)("colors",_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay),getRecommenderMaterialLimits=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.FI)("recommenderMaterialLimits",_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay),daysBetweenTodayAndDate=date=>{const inputDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(date)),today=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date);return Math.ceil(inputDate.diff(today,"day",!0))},daysBetweenDates=(firstDate,secondDate)=>{const inputFirstDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(firstDate)),inputSecondDate=dayjs__WEBPACK_IMPORTED_MODULE_18___default()(new Date(secondDate));return Math.ceil(inputFirstDate.diff(inputSecondDate,"day",!0))},convertPostIdToFaustId=postId=>{const matches=postId.match(/^[0-9]+-[a-z]+:([a-zA-Z0-9-]+)$/);if(null!=matches&&matches[1])return null==matches?void 0:matches[1];throw new Error(`Unable to extract faust id from post id "${postId}"`)},convertPostIdsToFaustIds=postIds=>postIds.map((pid=>convertPostIdToFaustId(pid))),getParams=props=>Object.entries(props).reduce(((acc,[property,value])=>{const paramValue=value||(0,_url__WEBPACK_IMPORTED_MODULE_23__.d6)(property);return{...acc,[property]:paramValue?String(paramValue):""}}),{}),sortByLoanDate=list=>list.sort(((a,b)=>new Date(a.loanDate||new Date).getTime()-new Date(b.loanDate||new Date).getTime())),sortByReservationDate=list=>list.sort(((objA,objB)=>new Date(objA.dateOfReservation||new Date).getTime()-new Date(objB.dateOfReservation||new Date).getTime())),getRenewableMaterials=list=>list.filter((({isRenewable})=>isRenewable)),getAmountOfRenewableLoans=list=>getRenewableMaterials(list).length,groupObjectArrayByProperty=(array,property)=>array.reduce(((result,current)=>{const groupBy=current[property];if(!groupBy)return result;const key=String(groupBy);return key in result?{...result,[key]:[...result[key],current]}:{...result,[key]:[current]}}),{}),getManifestationsPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),stringifyValue=value=>value?String(value):"",materialIsFiction=({fictionNonfiction})=>"FICTION"===(null==fictionNonfiction?void 0:fictionNonfiction.code),getListItems=(list,itemsShown)=>[...list].splice(0,itemsShown),pageSizeGlobal=(pageSizes,configName)=>{let pageSize=0;return pageSize=null!=pageSizes&&pageSizes.desktop&&null!=pageSizes&&pageSizes.mobile?(({desktop,mobile})=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.jM)("pageSize",{pageSize:{mobile:{pageSize:mobile},desktop:{pageSize:desktop}}});return Number(pageSize)})(pageSizes):(pageSizeConf=>{const{pageSize}=(0,_configuration__WEBPACK_IMPORTED_MODULE_19__.jM)(pageSizeConf,_configuration__WEBPACK_IMPORTED_MODULE_19__.Ay);return Number(pageSize)})(configName||"pageSize"),pageSize},materialIsOverdue=date=>dayjs__WEBPACK_IMPORTED_MODULE_18___default()().isAfter(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(date),"day"),tallyUpFees=fees=>(0,_currency__WEBPACK_IMPORTED_MODULE_22__.v)(fees.reduce(((total,{amount})=>total+amount),0)),getMaterialTypes=(manifestations,onlyFirstType=!0)=>onlyFirstType?lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map(((type,i)=>0===i?type.materialTypeSpecific.display:null)))).flat().filter((type=>null!==type))):lodash_uniq__WEBPACK_IMPORTED_MODULE_0___default()(manifestations.map((manifest=>manifest.materialTypes.map((type=>{var _type$materialTypeSpe;return null===(_type$materialTypeSpe=type.materialTypeSpecific)||void 0===_type$materialTypeSpe?void 0:_type$materialTypeSpe.display})))).flat()),getManifestationType=manifestations=>getMaterialTypes(manifestations)[0],getAllPids=manifestations=>manifestations.map((manifestation=>manifestation.pid)),getAllFaustIds=manifestations=>convertPostIdsToFaustIds(getAllPids(manifestations)),getScrollClass=modalIds=>modalIds.length>0?"scroll-lock-background":"";const patronAgeValid=(cpr,minAge)=>{const cprDate=function getDateFromCpr(cprInput){const dateSegments=cprInput.replace(/[^\d]/g,"").substring(0,6).match(/.{1,2}/g);if(dateSegments){const[day,month,year]=dateSegments;let prefix="";prefix=Number(year)<21?"20":"19";const yearWithPrefix=Number(`${prefix}${year}`);return new Date(Date.UTC(yearWithPrefix,Number(month)-1,Number(day),0,0,0,0))}return null}(cpr);if(null===cprDate)return!1;return dayjs__WEBPACK_IMPORTED_MODULE_18___default()().diff(dayjs__WEBPACK_IMPORTED_MODULE_18___default()(cprDate),"year")>minAge},getAuthorNames=(creators,by,and)=>{const names=creators.map((({display})=>display));let returnContentString="";return 0===names.length||(returnContentString=1===names.length?`${by?`${by} `:""}${names.join(", ")}`:`${by?`${by} `:""} ${names.slice(0,-1).join(", ")} ${and?`${and} `:""}${names.slice(-1)}`),returnContentString},getPublicationName=hostPublication=>hostPublication?hostPublication.title:"",getReviewRelease=(dateFirstEdition,workYear,edition)=>{var _edition$publicationY;return(null==dateFirstEdition?void 0:dateFirstEdition.display)||(null==workYear?void 0:workYear.display)||(null==edition||null===(_edition$publicationY=edition.publicationYear)||void 0===_edition$publicationY?void 0:_edition$publicationY.display)||null},getReleaseYearSearchResult=work=>{const{latest,bestRepresentation}=work.manifestations,manifestation=bestRepresentation||latest;var _work$workYear,_work$workYear2,_manifestation$workYe,_manifestation$dateFi,_manifestation$editio3,_manifestation$editio4;return materialIsFiction(work)?null===(_work$workYear=work.workYear)||void 0===_work$workYear?void 0:_work$workYear.year:materialIsFiction(manifestation)?(null===(_work$workYear2=work.workYear)||void 0===_work$workYear2?void 0:_work$workYear2.year)||(null===(_manifestation$workYe=manifestation.workYear)||void 0===_manifestation$workYe?void 0:_manifestation$workYe.year)||(null===(_manifestation$dateFi=manifestation.dateFirstEdition)||void 0===_manifestation$dateFi?void 0:_manifestation$dateFi.year)||(null===(_manifestation$editio3=manifestation.edition)||void 0===_manifestation$editio3||null===(_manifestation$editio4=_manifestation$editio3.publicationYear)||void 0===_manifestation$editio4?void 0:_manifestation$editio4.display):getManifestationPublicationYear(latest)||""},getContributors=(short,creators)=>{const{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_20__.M_.getState();if(creators&&creators.length>0){if(2===creators.length)return`${texts.materialByAuthorText} ${creators.join(` ${texts.materialAndAuthorText} `)}`;if(creators.length>2)return short?((creators,byText,etAlText)=>`${byText} ${creators.slice(0,2).join(", ")} ${etAlText}`)(creators,texts.materialByAuthorText,texts.etAlText):((creators,byText,andText)=>`${byText} ${creators.slice(0,-1).join(", ")} ${andText} ${creators.slice(-1)}`)(creators,texts.materialByAuthorText,texts.materialAndAuthorText)}return creators[0]}},"./src/core/utils/helpers/invalid-switch-case.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=function invalidSwitchCase(x){return console.error(`Invalid case for ${x}`),x}},"./src/core/utils/helpers/lazy-load.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>useItemHasBeenVisible});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_use__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-use/esm/useIntersection.js");const useItemHasBeenVisible=()=>{const itemRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),intersection=(0,react_use__WEBPACK_IMPORTED_MODULE_1__.A)(itemRef,{root:null,rootMargin:"0%",threshold:0}),isInViewPort=Boolean(null==intersection?void 0:intersection.isIntersecting),[hasBeenVisible,setHasBeenVisible]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{hasBeenVisible||isInViewPort&&setHasBeenVisible(!0)}),[hasBeenVisible,isInViewPort]),{itemRef,hasBeenVisible:isInViewPort||hasBeenVisible}}},"./src/core/utils/helpers/list-mapper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$U:()=>mapFBSLoanToLoanType,Ml:()=>mapManifestationToBasicDetailsType,hg:()=>mapPublizonReservationToReservationType,ji:()=>mapPublizonLoanToLoanType,sl:()=>mapFBSReservationGroupToReservationType,z7:()=>mapProductToBasicDetailsType});var lodash_values__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/values.js"),lodash_values__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_values__WEBPACK_IMPORTED_MODULE_0__),lodash_keys__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/lodash/keys.js"),lodash_keys__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_1__),lodash_head__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/lodash/head.js"),lodash_head__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash_head__WEBPACK_IMPORTED_MODULE_2__),_store__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/store.ts"),_general__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/general.ts");function getSeriesString(series){return series.map((({title,numberInSeries})=>{var _numberInSeries$numbe;return numberInSeries&&numberInSeries.number?`${title} ${null===(_numberInSeries$numbe=numberInSeries.number)||void 0===_numberInSeries$numbe?void 0:_numberInSeries$numbe[0]}`:title})).join(", ")}const mapPublizonLoanToLoanType=list=>list.map((({loanExpireDateUtc,orderDateUtc,libraryBook})=>({dueDate:loanExpireDateUtc,loanDate:orderDateUtc,isRenewable:!1,materialItemNumber:(null==libraryBook?void 0:libraryBook.identifier)||"",renewalStatusList:[],loanType:null,identifier:(null==libraryBook?void 0:libraryBook.identifier)||null,faust:null,loanId:null}))),mapFBSLoanToLoanType=list=>list.map((({loanDetails,isRenewable,renewalStatusList})=>{var _loanDetails$periodic;return{dueDate:loanDetails.dueDate,loanDate:loanDetails.loanDate,periodical:(null===(_loanDetails$periodic=loanDetails.periodical)||void 0===_loanDetails$periodic?void 0:_loanDetails$periodic.displayText)||"",renewalStatusList,isRenewable,materialItemNumber:loanDetails.materialItemNumber,loanType:loanDetails.loanType,identifier:null,faust:loanDetails.recordId||null,loanId:loanDetails.loanId,details:loanDetails.ilBibliographicRecord?{title:loanDetails.ilBibliographicRecord.title,authors:loanDetails.ilBibliographicRecord.author,authorsShort:loanDetails.ilBibliographicRecord.author,firstAuthor:loanDetails.ilBibliographicRecord.author,year:loanDetails.ilBibliographicRecord.publicationDate,lang:loanDetails.ilBibliographicRecord.language}:null}})),mapProductToBasicDetailsType=material=>{const{publicationDate,title,description,productType,contributors,externalProductId,languageCode}=material,{text:{data:texts}}=_store__WEBPACK_IMPORTED_MODULE_3__.M_.getState(),digitalProductType={1:texts.publizonEbookText,2:texts.publizonAudioBookText,4:texts.publizonPodcastText},authors=(null==contributors?void 0:contributors.map((({firstName,lastName})=>`${firstName} ${lastName}`)))||[];return{title,lang:languageCode,periodical:null,year:publicationDate?(date=publicationDate,new Date(date).getFullYear()):"",description,materialType:productType?digitalProductType[productType]:"",externalProductId:null==externalProductId?void 0:externalProductId.id,authors:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!1,authors):"",authorsShort:contributors?(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!0,authors):""};var date},mapManifestationToBasicDetailsType=material=>{var _languages$main,_languages$main$;const{edition,abstract,titles,pid,materialTypes,creators,series,languages}=material,isoCode=(null==languages||null===(_languages$main=languages.main)||void 0===_languages$main||null===(_languages$main$=_languages$main[0])||void 0===_languages$main$?void 0:_languages$main$.isoCode)??"",description=abstract?abstract[0]:"",{full:[fullText]}=titles||{full:[]},{publicationYear}=edition||{},{display:year}=publicationYear||{},inputContributorsArray=(null==creators?void 0:creators.map((({display})=>display)))||[],firstAuthor=creators&&creators.length?creators[0].display:"";return{lang:isoCode,authors:(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!1,inputContributorsArray),authorsShort:(0,_general__WEBPACK_IMPORTED_MODULE_4__.Zc)(!0,inputContributorsArray),firstAuthor,pid,title:fullText,year,description,series:series&&series.length>0?getSeriesString(series):"",materialType:materialTypes?materialTypes[0].materialTypeSpecific.display:void 0}},mapPublizonReservationToReservationType=list=>list.map((({identifier,createdDateUtc,status,expectedRedeemDateUtc,productTitle,expireDateUtc})=>({identifier,faust:null,dateOfReservation:createdDateUtc,expiryDate:expireDateUtc,state:status?{1:"reserved",2:"readyForPickup",3:"redeemed",4:"cancelled",5:"expired"}[status]:null,title:productTitle,pickupDeadline:expectedRedeemDateUtc}))),mapFBSReservationGroupToReservationType=list=>list.map((({dateOfReservation,expiryDate,numberInQueue,state,pickupBranch,pickupDeadline,pickupNumber,periodical,records,ilBibliographicRecord})=>({periodical:(null==periodical?void 0:periodical.displayText)||"",faust:lodash_head__WEBPACK_IMPORTED_MODULE_2___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_1___default()(records)),dateOfReservation,expiryDate,numberInQueue,state:"readyForPickup"===state?"readyForPickup":"reserved",pickupBranch,pickupDeadline,pickupNumber,reservationIds:lodash_values__WEBPACK_IMPORTED_MODULE_0___default()(records),details:ilBibliographicRecord?{title:ilBibliographicRecord.title,authors:ilBibliographicRecord.author,authorsShort:ilBibliographicRecord.author,firstAuthor:ilBibliographicRecord.author,year:ilBibliographicRecord.publicationDate,lang:ilBibliographicRecord.language}:null})))},"./src/core/utils/helpers/modal-helpers.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q0:()=>constructModalId,c6:()=>getModalIds,dI:()=>getDetailsModalId,eF:()=>containsDueDateModalQueryParam,xx:()=>dateFromDueDateModalQueryParam});var _configuration__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/configuration/index.ts");const constructModalId=(prefix,fragments)=>[prefix,...fragments].join("-"),getModalIds=()=>(0,_configuration__WEBPACK_IMPORTED_MODULE_0__.FI)("modalIds",_configuration__WEBPACK_IMPORTED_MODULE_0__.Ay),containsDueDateModalQueryParam=queryParam=>{const{dueDateModal}=getModalIds(),regex=new RegExp(`${dueDateModal}\\d{4}-\\d{2}-\\d{2}`,"g"),dateFound=queryParam.match(regex);return dateFound?dateFound[0]:null},dateFromDueDateModalQueryParam=queryParam=>{const dateFound=queryParam.match(/\d{4}-\d{2}-\d{2}/g);return dateFound?dateFound[0]:null},getDetailsModalId=(queryParam,prefix)=>{const regexIdentifier=new RegExp(`(?<=${prefix})((\\d{13})|((\\d{10}))||((\\d{9}))|(\\d{8}))`,"g"),modalId=queryParam.match(regexIdentifier);if(modalId){const[returnId]=modalId;return returnId}return""}},"./src/core/utils/helpers/renewal.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TO:()=>filterRenewResponseData,OX:()=>getRenewButtonLabel,Pl:()=>succeededRenewalCount});let RenewStatus=function(RenewStatus){return RenewStatus.renewed="renewed",RenewStatus.deniedReserved="deniedReserved",RenewStatus.deniedMaxRenewalsReached="deniedMaxRenewalsReached",RenewStatus.deniedLoanerIsBlocked="deniedLoanerIsBlocked",RenewStatus.deniedMaterialIsNotLoanable="deniedMaterialIsNotLoanable",RenewStatus.deniedMaterialIsNotFound="deniedMaterialIsNotFound",RenewStatus.deniedLoanerNotFound="deniedLoanerNotFound",RenewStatus.deniedLoaningProfileNotFound="deniedLoaningProfileNotFound",RenewStatus.deniedOtherReason="deniedOtherReason",RenewStatus}({});const filterRenewResponseData=data=>data.filter((loan=>loan.renewalStatus[0]===RenewStatus.renewed)),succeededRenewalCount=renewingResponse=>filterRenewResponseData(renewingResponse||[]).length,getRenewButtonLabel=({isRenewable,renewingStatus,t,defaultText})=>isRenewable?"pending"===renewingStatus?t("renewProcessingText"):defaultText??t("renewButtonText"):t("renewCannotBeRenewedText")},"./src/core/utils/helpers/url.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$u:()=>setQueryParametersInUrl,Ks:()=>isUrlValid,Lu:()=>getCurrentLocation,MR:()=>removeQueryParametersFromUrl,Qj:()=>constructMaterialUrl,SE:()=>redirectTo,bX:()=>redirectToLoginAndBack,d6:()=>getUrlQueryParam,fN:()=>constructSearchUrlWithFilter,gG:()=>currentLocationWithParametersUrl,tP:()=>turnUrlStringsIntoObjects,x4:()=>constructAdvancedSearchUrl,xl:()=>appendQueryParametersToUrl,zy:()=>constructSearchUrl});const getCurrentLocation=()=>String(window.location),appendQueryParametersToUrl=(url,parameters)=>{const processedUrl=new URL(url);return Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,encodeURI(parameters[key]))})),processedUrl},getUrlQueryParam=param=>{const queryParams=new URLSearchParams(window.location.search);return queryParams.get(param)?decodeURI(String(queryParams.get(param))):null},setQueryParametersInUrl=parameters=>{const processedUrl=new URL(getCurrentLocation());Object.keys(parameters).forEach((key=>{processedUrl.searchParams.set(key,parameters[key])})),window.history.replaceState(null,"",processedUrl)},removeQueryParametersFromUrl=parameter=>{const processedUrl=new URL(getCurrentLocation());var replacementUrl;processedUrl.searchParams.delete(parameter),replacementUrl=processedUrl,window.history.replaceState(null,"",replacementUrl)},redirectTo=url=>{window.location.assign(String(url))},processUrlPlaceholders=(url,placeholders)=>{let processedUrl=url;return placeholders.forEach((placeholder=>{const[name,replacement]=placeholder;processedUrl=((url,placeholderName,replacement)=>{const regex=new RegExp(`${placeholderName}`,"g");return url.match(regex)?url.replace(regex,replacement):url})(processedUrl,name,replacement)})),processedUrl},constructMaterialUrl=(url,workId,type)=>{const materialUrl=new URL(url);return materialUrl.pathname=processUrlPlaceholders(materialUrl.pathname,[[":workid",workId]]),type?appendQueryParametersToUrl(materialUrl,{type}):materialUrl},constructSearchUrl=(searchUrl,q)=>appendQueryParametersToUrl(searchUrl,{q}),constructAdvancedSearchUrl=(advancedSearchUrl,q)=>appendQueryParametersToUrl(advancedSearchUrl,{advancedSearchCql:q}),constructSearchUrlWithFilter=args=>{const{searchUrl,selectedItemString,filter}=args;return appendQueryParametersToUrl(searchUrl,{q:selectedItemString,...filter})},turnUrlStringsIntoObjects=urls=>Object.keys(urls).reduce(((acc,key)=>({...acc,[key]:new URL(urls[key],getCurrentLocation())})),{});function redirectToLoginAndBack({authUrl,returnUrl,trackingFunction}){const{pathname,search,hash}=returnUrl,redirectUrl=appendQueryParametersToUrl(authUrl,{"current-path":`${pathname}${search}${hash}`});trackingFunction&&trackingFunction().then((()=>redirectTo(redirectUrl))),redirectTo(redirectUrl)}const isUrlValid=text=>{try{const url=new URL(text);return"http:"===url.protocol||"https:"===url.protocol}catch(err){return!1}},currentLocationWithParametersUrl=params=>appendQueryParametersToUrl(new URL(getCurrentLocation()),params)},"./src/core/utils/helpers/usePatronData.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>usePatronData});var _fbs_fbs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fbs/fbs.ts"),_user__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/utils/helpers/user.ts");const usePatronData=()=>(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_0__.wq)({enabled:!(0,_user__WEBPACK_IMPORTED_MODULE_1__.ok)()})},"./src/core/utils/helpers/user.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{dG:()=>getUserToken,lT:()=>isBlocked,ok:()=>isAnonymous,u7:()=>isUnregistered,vn:()=>isResident});var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/lodash/isEmpty.js"),lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__),_token__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/token.js");const isAnonymous=()=>!(0,_token__WEBPACK_IMPORTED_MODULE_1__.y0)("user"),isUnregistered=()=>(0,_token__WEBPACK_IMPORTED_MODULE_1__.y0)("unregistered-user"),isBlocked=patron=>!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(patron.blockStatus),isResident=patron=>patron.resident,getUserToken=()=>isUnregistered()?(0,_token__WEBPACK_IMPORTED_MODULE_1__.gf)(_token__WEBPACK_IMPORTED_MODULE_1__.g2):isAnonymous()?null:(0,_token__WEBPACK_IMPORTED_MODULE_1__.gf)(_token__WEBPACK_IMPORTED_MODULE_1__.CI)},"./src/core/utils/modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>modal,X:()=>useModalButtonHandler});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),CloseLarge=__webpack_require__("./node_modules/@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/CloseLarge.svg"),CloseLarge_default=__webpack_require__.n(CloseLarge),clsx=__webpack_require__("./node_modules/clsx/dist/clsx.mjs"),focus_trap_react=__webpack_require__("./node_modules/focus-trap-react/dist/focus-trap-react.js"),focus_trap_react_default=__webpack_require__.n(focus_trap_react),modal_slice=__webpack_require__("./src/core/modal.slice.ts"),user=__webpack_require__("./src/core/utils/helpers/user.ts"),url=__webpack_require__("./src/core/utils/helpers/url.ts"),process=__webpack_require__("./node_modules/process/browser.js");const isVitestEnvironment=void 0!==process&&process.env&&process.env.VITEST;function Modal({modalId,closeModalAriaLabelText,children,screenReaderModalDescriptionText,classNames,isSlider,dataCy="modal",eventCallbacks}){const dispatch=(0,es.wA)(),{modalIds}=(0,es.d4)((s=>s.modal));if((0,react.useEffect)((()=>{var _searchParams$get,_searchParams$get2;const searchParams=new URLSearchParams(window.location.search);null!==(_searchParams$get=searchParams.get("modal"))&&void 0!==_searchParams$get&&_searchParams$get.includes(modalId)&&dispatch((0,modal_slice.qf)({modalId})),!searchParams.get("modal")||null!==(_searchParams$get2=searchParams.get("modal"))&&void 0!==_searchParams$get2&&_searchParams$get2.includes(modalId)||(searchParams.delete("modal"),window.history.replaceState({},"",window.location.href.replace(`&modal=${searchParams.get("modal")}`,"")),document.body.style.overflow="")}),[modalId,dispatch]),modalIds&&!modalIds.includes(modalId))return null;const close=()=>{null!=eventCallbacks&&eventCallbacks.close&&eventCallbacks.close(),dispatch((0,modal_slice.Oo)({modalId}))};return react.createElement(focus_trap_react_default(),{focusTrapOptions:{fallbackFocus:isVitestEnvironment?"body":void 0}},react.createElement("div",null,react.createElement("div",{className:"modal-backdrop",style:{zIndex:modalIds.indexOf(modalId)+20},onClick:()=>{close()}}),react.createElement("div",{className:(0,clsx.A)("modal",{"modal-show":modalIds.includes(modalId)},classNames),role:"dialog","aria-labelledby":`modal-${modalId}-description`,"data-cy":dataCy,style:{zIndex:modalIds.indexOf(modalId)+21}},react.createElement("div",{className:"modal__screen-reader-description",id:`modal-${modalId}-description`},screenReaderModalDescriptionText),react.createElement("button",{type:"button",className:"btn-ui modal-btn-close "+(isSlider?"":"modal-btn-close--offset"),style:{zIndex:modalIds.indexOf(modalId)+20},"aria-label":closeModalAriaLabelText,onClick:()=>{close()},"data-cy":`modal-${modalId}-close-button`},react.createElement("img",{src:CloseLarge_default(),alt:"",style:{pointerEvents:"none"}})),children)))}const useModalButtonHandler=()=>{const dispatch=(0,es.wA)();return{open:modalId=>dispatch((0,modal_slice.qf)({modalId})),close:modalId=>dispatch((0,modal_slice.Oo)({modalId})),closeAll:()=>dispatch((0,modal_slice.s7)()),openGuarded:({authUrl,modalId,trackOnlineView})=>{if((0,user.ok)()){const returnUrl=(0,url.gG)({modal:modalId});(0,url.bX)({authUrl,returnUrl,trackingFunction:trackOnlineView})}else trackOnlineView&&trackOnlineView(),dispatch((0,modal_slice.qf)({modalId}))}}},modal=Modal;try{Modal.displayName="Modal",Modal.__docgenInfo={description:"",displayName:"Modal",props:{modalId:{defaultValue:null,description:"",name:"modalId",required:!0,type:{name:"string"}},closeModalAriaLabelText:{defaultValue:null,description:"",name:"closeModalAriaLabelText",required:!0,type:{name:"string"}},screenReaderModalDescriptionText:{defaultValue:null,description:"",name:"screenReaderModalDescriptionText",required:!0,type:{name:"string"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string | undefined"}},dataCy:{defaultValue:{value:"modal"},description:"",name:"dataCy",required:!1,type:{name:"string | undefined"}},isSlider:{defaultValue:null,description:"",name:"isSlider",required:!1,type:{name:"boolean | undefined"}},eventCallbacks:{defaultValue:null,description:"",name:"eventCallbacks",required:!1,type:{name:"{ close?: (() => void) | undefined; } | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/modal.tsx#Modal"]={docgenInfo:Modal.__docgenInfo,name:"Modal",path:"src/core/utils/modal.tsx#Modal"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/reduxMiddleware/extractServiceBaseUrls.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,TJ:()=>serviceUrlKeys,aW:()=>getServiceBaseUrl});const serviceUrlKeys={fbs:"fbsBaseUrl",publizon:"publizonBaseUrl",dplCms:"dplCmsBaseUrl",cover:"coverBaseUrl",materialList:"materialListBaseUrl",fbi:"fbiBaseUrl",fbiLocal:"fbiLocalBaseUrl",fbiGlobal:"fbiGlobalBaseUrl"};let serviceBaseUrls={};const filterUrls=(urls,filterFunction)=>Object.keys(urls).filter(filterFunction).reduce(((obj,key)=>({...obj,[key]:urls[key]})),{}),getServiceBaseUrl=apiBaseUrlKey=>{if(!serviceBaseUrls[apiBaseUrlKey])throw new Error(`Service base url for ${apiBaseUrlKey} is not defined.`);return serviceBaseUrls[apiBaseUrlKey]},__WEBPACK_DEFAULT_EXPORT__=()=>next=>action=>{if("url/addUrlEntries"===String(action.type)){const{payload:{entries}}=action;serviceBaseUrls=filterUrls(entries,(key=>Object.values(serviceUrlKeys).includes(key)));const otherUrls=filterUrls(entries,(key=>!Object.values(serviceUrlKeys).includes(key)));return next({...action,payload:{entries:otherUrls}})}return next(action)}},"./src/core/utils/text.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F:()=>useText,i:()=>withText});var _store__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/store.ts"),_text_slice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/text.slice.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/utils/withSuffix.tsx");class TextDefinitionError extends Error{constructor(message){super(message),this.name="TextDefinitionError"}}const useText=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_0__.d4)((state=>state.text));return(key,{placeholders,count}={count:0})=>{if(!data)throw new Error("The translation store is broken.");if(void 0===data[key])throw new Error(`The translation for ${key} is not defined.`);const textDefinition=(rawText=>{if(!rawText.match(/^\{.*\}$/))return{type:"simple",text:[rawText]};try{const textDefinition=JSON.parse(rawText);if("object"==typeof textDefinition&&2===Object.keys(textDefinition).length&&Object.keys(textDefinition).includes("type")&&Object.keys(textDefinition).includes("text")&&["simple","plural"].includes((null==textDefinition?void 0:textDefinition.type)??"")&&Array.isArray(null==textDefinition?void 0:textDefinition.text)){const type=null==textDefinition?void 0:textDefinition.type,text=(null==textDefinition?void 0:textDefinition.text)??[];if(["simple"].includes(type)&&1!==text.length)throw new TextDefinitionError("Simple text definitions must have exactly one text entry");if(["plural"].includes(type)&&2!==text.length)throw new TextDefinitionError("Plural text definitions must have exactly two text entries");return textDefinition}}catch(error){const message=error instanceof Error?error.message:"Unknown error";throw new TextDefinitionError(`Could not parse rawText text format: ${rawText}. Message: ${message}`)}return{type:"simple",text:["Unknown text entry"]}})(data[key]),textPlaceholders={...placeholders??{}};"plural"===textDefinition.type&&(textPlaceholders["@count"]=String(count));const processedTexts=textPlaceholders?((texts,placeholders)=>texts.map((text=>text.replace(/@\w+/g,(match=>0===placeholders[match]?"0":String(placeholders[match]||match))))))(textDefinition.text,textPlaceholders):textDefinition.text;return"plural"===textDefinition.type?0===count?processedTexts[1]:processedTexts[1%(count??1)]:processedTexts[0]}},withText=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_2__.A)(Component,"Text",_text_slice__WEBPACK_IMPORTED_MODULE_1__.vn);try{withText.displayName="withText",withText.__docgenInfo={description:"",displayName:"withText",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/text.tsx#withText"]={docgenInfo:withText.__docgenInfo,name:"withText",path:"src/core/utils/text.tsx#withText"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/types/loan-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function isLoanType(item){return!!item.loanId||!!item.identifier}function loanId(loan){return String(loan.loanId||loan.identifier)}__webpack_require__.d(__webpack_exports__,{G:()=>loanId,R:()=>isLoanType})},"./src/core/utils/types/material-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{sN:()=>ManifestationMaterialType,wP:()=>AutosuggestCategory});let ManifestationMaterialType=function(ManifestationMaterialType){return ManifestationMaterialType.book="bog",ManifestationMaterialType.ebook="e-bog",ManifestationMaterialType.movie="film",ManifestationMaterialType.audioBook="lydbog (online)",ManifestationMaterialType.audioBookGeneric="lydbog",ManifestationMaterialType.music="node",ManifestationMaterialType.game="playstation 5",ManifestationMaterialType.animatedSeries="tegneserie",ManifestationMaterialType.article="artikel",ManifestationMaterialType.paperArticle="avisartikel",ManifestationMaterialType.onlineArticle="artikel (online)",ManifestationMaterialType.earticle="artikel",ManifestationMaterialType.boardGame="spil",ManifestationMaterialType.cdRom="cd",ManifestationMaterialType.magazine="tidsskrift",ManifestationMaterialType}({}),AutosuggestCategory=function(AutosuggestCategory){return AutosuggestCategory.book="bog",AutosuggestCategory.ebook="e-bog",AutosuggestCategory.movie="Film",AutosuggestCategory.audioBook="lydbog (online)",AutosuggestCategory.music="Musik",AutosuggestCategory.game="Spil",AutosuggestCategory.animatedSeries="tegneserie",AutosuggestCategory}({})},"./src/core/utils/types/reservation-type.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{BP:()=>isDigitalReservation,OQ:()=>reservationId,uT:()=>isPhysicalReservation});__webpack_require__("./node_modules/core-js/modules/esnext.string.at.js");function reservationId(reservation){return null!=reservation&&reservation.reservationIds&&reservation.reservationIds.length>0?String(reservation.reservationIds.at(0)):String(reservation.identifier)}function isPhysicalReservation(reservation){return!!reservation.faust&&!!reservation.reservationIds&&reservation.reservationIds.length>0}function isDigitalReservation(reservation){return!!reservation.identifier}},"./src/core/utils/url.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ik:()=>useUrls,nU:()=>withUrls});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts"),_url_slice__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/core/url.slice.ts"),_helpers_url__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/core/utils/helpers/url.ts"),_withSuffix__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/core/utils/withSuffix.tsx");const useUrls=()=>{const{data}=(0,_store__WEBPACK_IMPORTED_MODULE_1__.d4)((state=>state.url)),urls=(0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)((()=>(0,_helpers_url__WEBPACK_IMPORTED_MODULE_4__.tP)(data)),[data]);return(name,returnFalseIfUndefined=!1)=>{if(returnFalseIfUndefined)return urls[name]||!1;if(!urls[name])throw new Error(`The url ${name} is not defined`);return urls[name]}},withUrls=Component=>(0,_withSuffix__WEBPACK_IMPORTED_MODULE_3__.A)(Component,"Url",_url_slice__WEBPACK_IMPORTED_MODULE_2__.hx);try{withUrls.displayName="withUrls",withUrls.__docgenInfo={description:"",displayName:"withUrls",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/url.tsx#withUrls"]={docgenInfo:withUrls.__docgenInfo,name:"withUrls",path:"src/core/utils/url.tsx#withUrls"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useGetAvailability.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _fbs_fbs__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/fbs/fbs.ts"),_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/apps/material/helper.ts");const __WEBPACK_DEFAULT_EXPORT__=({faustIds,config,options})=>{const{data,isLoading,isError}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_0__.io)((0,_apps_material_helper__WEBPACK_IMPORTED_MODULE_1__.We)(faustIds,config,"availability"),options);return{data,isLoading,isError}}},"./src/core/utils/useLoanThresholds.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _config__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/core/utils/config.tsx");const __WEBPACK_DEFAULT_EXPORT__=()=>{const config=(0,_config__WEBPACK_IMPORTED_MODULE_0__.UK)();return{warning:Number(config("expirationWarningDaysBeforeConfig")),danger:0}}},"./src/core/utils/useLoans.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/esnext.set.add-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.delete-all.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.every.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.filter.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.find.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.intersection.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-disjoint-from.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-subset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.is-superset-of.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.join.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.map.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.reduce.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.some.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.symmetric-difference.js"),__webpack_require__("./node_modules/core-js/modules/esnext.set.union.js");var _fbs_fbs__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/core/fbs/fbs.ts"),_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/core/publizon/publizon.ts"),_helpers_general__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/core/utils/helpers/general.ts"),_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/core/utils/useLoanThresholds.tsx");const filterLoansNotOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"";return(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.m2)(due)-warning>0})),filterLoansOverdue=loans=>loans.filter((({dueDate})=>(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.El)(dueDate))),filterLoansSoonOverdue=(loans,warning)=>loans.filter((({dueDate})=>{const due=dueDate||"",daysUntilExpiration=(0,_helpers_general__WEBPACK_IMPORTED_MODULE_18__.m2)(due);return daysUntilExpiration-warning<=0&&daysUntilExpiration-warning>=-warning})),sortByDueDate=list=>list.sort(((a,b)=>new Date(a.dueDate||new Date).getTime()-new Date(b.dueDate||new Date).getTime())),__WEBPACK_DEFAULT_EXPORT__=()=>{const{data:loansFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_16__.zw)(),{data:loansPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,_publizon_publizon__WEBPACK_IMPORTED_MODULE_17__.VM)(),threshold=(0,_useLoanThresholds__WEBPACK_IMPORTED_MODULE_20__.A)(),loansIsLoading=isLoadingFbs||isLoadingPublizon,loansIsError=isErrorFbs||isErrorPublizon,mappedLoansFbs=loansFbs&&Array.isArray(loansFbs)?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.$U)(loansFbs):[],mappedLoansPublizon=null!=loansPublizon&&loansPublizon.loans?(0,_helpers_list_mapper__WEBPACK_IMPORTED_MODULE_19__.ji)(loansPublizon.loans).filter((item=>item.dueDate)):[],loans=sortByDueDate([...mappedLoansFbs,...mappedLoansPublizon]),loansOverdueFBS=filterLoansOverdue(mappedLoansFbs),LoansOverduePublizon=filterLoansOverdue(mappedLoansPublizon),loansOverdue=sortByDueDate([...loansOverdueFBS,...LoansOverduePublizon]),loansSoonOverdueFBS=filterLoansSoonOverdue(mappedLoansFbs,threshold.warning),loansSoonOverduePublizon=filterLoansSoonOverdue(mappedLoansPublizon,threshold.warning),loansSoonOverdue=sortByDueDate([...loansSoonOverdueFBS,...loansSoonOverduePublizon]),loansFarFromOverdueFBS=filterLoansNotOverdue(mappedLoansFbs,threshold.warning),loansFarFromOverduePublizon=filterLoansNotOverdue(mappedLoansPublizon,threshold.warning),loansFarFromOverdue=sortByDueDate([...loansFarFromOverdueFBS,...loansFarFromOverduePublizon]),loansSortedByDateFbs=sortByDueDate(mappedLoansFbs),loansSortedByDatePublizon=sortByDueDate(mappedLoansPublizon);return{all:{loans,overdue:loansOverdue,soonOverdue:loansSoonOverdue,farFromOverdue:loansFarFromOverdue,isLoading:loansIsLoading,isError:loansIsError},fbs:{loans:loansSortedByDateFbs,overdue:loansOverdueFBS,soonOverdue:loansSoonOverdueFBS,farFromOverdue:loansFarFromOverdueFBS,stackedMaterialsDueDates:(list=>Array.from(new Set(list.filter((({dueDate})=>null!==dueDate)).map((({dueDate})=>dueDate)).sort())))(mappedLoansFbs),isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{loans:loansSortedByDatePublizon,overdue:LoansOverduePublizon,soonOverdue:loansSoonOverduePublizon,farFromOverdue:loansFarFromOverduePublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/useRequestsWithStatus.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$K:()=>useSingleRequestWithStatus,mi:()=>useMultipleRequestsWithStatus});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");const useMultipleRequestsWithStatus=({requests,onError,onSuccess})=>{const[requestStatus,setRequestStatus]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)("idle");return{handler:(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((()=>{setRequestStatus("pending");const operations=[];requests.forEach((({params,operation})=>{if("function"!=typeof operation)throw new Error("Operation must be a function.");operations.push(new Promise(((resolve,reject)=>{operation(params,{onSuccess:result=>{resolve(result)},onError:error=>{reject(error)}})})))})),Promise.all(operations).then((allResults=>{setRequestStatus("success"),onSuccess&&onSuccess(allResults)})).catch((error=>{setRequestStatus("error"),onError&&onError(error)}))}),[requests,onSuccess,onError]),requestStatus,setRequestStatus}},useSingleRequestWithStatus=({request,onError,onSuccess})=>useMultipleRequestsWithStatus({requests:[request],onError:onError?errors=>onError(errors[0]):void 0,onSuccess:onSuccess?results=>{onSuccess(results[0])}:void 0});try{useMultipleRequestsWithStatus.displayName="useMultipleRequestsWithStatus",useMultipleRequestsWithStatus.__docgenInfo={description:"",displayName:"useMultipleRequestsWithStatus",props:{requests:{defaultValue:null,description:"",name:"requests",required:!0,type:{name:"{ params: TParams; operation: TRequest; }[]"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse[]) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((errors: unknown[]) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"]={docgenInfo:useMultipleRequestsWithStatus.__docgenInfo,name:"useMultipleRequestsWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useMultipleRequestsWithStatus"})}catch(__react_docgen_typescript_loader_error){}try{useSingleRequestWithStatus.displayName="useSingleRequestWithStatus",useSingleRequestWithStatus.__docgenInfo={description:"",displayName:"useSingleRequestWithStatus",props:{request:{defaultValue:null,description:"",name:"request",required:!0,type:{name:"{ params: TParams; operation: TRequest; }"}},onSuccess:{defaultValue:null,description:"",name:"onSuccess",required:!1,type:{name:"((results: TResponse) => void) | undefined"}},onError:{defaultValue:null,description:"",name:"onError",required:!1,type:{name:"((error: unknown) => void) | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"]={docgenInfo:useSingleRequestWithStatus.__docgenInfo,name:"useSingleRequestWithStatus",path:"src/core/utils/useRequestsWithStatus.tsx#useSingleRequestWithStatus"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/useReservations.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>utils_useReservations});var publizon=__webpack_require__("./src/core/publizon/publizon.ts"),list_mapper=__webpack_require__("./src/core/utils/helpers/list-mapper.ts"),helpers=__webpack_require__("./src/apps/reservation-list/utils/helpers.ts");const api_strings_namespaceObject_h="reserved";var reduce=__webpack_require__("./node_modules/lodash/reduce.js"),reduce_default=__webpack_require__.n(reduce),min=__webpack_require__("./node_modules/lodash/min.js"),min_default=__webpack_require__.n(min),map=__webpack_require__("./node_modules/lodash/map.js"),map_default=__webpack_require__.n(map),groupBy=__webpack_require__("./node_modules/lodash/groupBy.js"),groupBy_default=__webpack_require__.n(groupBy),fbs=__webpack_require__("./src/core/fbs/fbs.ts");function groupReservations(data){const reservationGroups=groupBy_default()(data,(reservation=>"parallel"===reservation.reservationType?reservation.transactionId:reservation.reservationId));return map_default()(reservationGroups,(reservationGroup=>({...reservationGroup[0],numberInQueue:min_default()(map_default()(reservationGroup,"numberInQueue")),records:reduce_default()(reservationGroup,((result,reservation)=>({...result,[reservation.recordId]:reservation.reservationId})),{})})))}const utils_useGetReservationGroups=()=>{const result=(0,fbs.$6)();return{...result,data:result.data&&Array.isArray(result.data)?groupReservations(result.data):null}};const getQueuedReservations=list=>[...list].filter((({state})=>state===api_strings_namespaceObject_h)),utils_useReservations=()=>{const{data:reservationsFbs,isLoading:isLoadingFbs,isError:isErrorFbs}=utils_useGetReservationGroups(),{data:reservationsPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}=(0,publizon.pA)(),reservationsIsLoading=isLoadingFbs||isLoadingPublizon,reservationsIsError=isErrorFbs||isErrorPublizon,mappedReservationsFbs=reservationsFbs?(0,list_mapper.sl)(reservationsFbs):[],mappedReservationsPublizon=null!=reservationsPublizon&&reservationsPublizon.reservations?(0,list_mapper.hg)(reservationsPublizon.reservations):[],reservations=[...mappedReservationsFbs,...mappedReservationsPublizon],reservationsReadyToLoanFBS=(0,helpers.JU)(mappedReservationsFbs),reservationsReadyToLoanPublizon=(0,helpers.JU)(mappedReservationsPublizon),reservationsReadyToLoan=[...reservationsReadyToLoanFBS,...reservationsReadyToLoanPublizon],reservationsQueuedFBS=getQueuedReservations(mappedReservationsFbs),reservationsQueuedPublizon=getQueuedReservations(mappedReservationsPublizon);return{all:{reservations,readyToLoan:reservationsReadyToLoan,queued:[...reservationsQueuedFBS,...reservationsQueuedPublizon],isLoading:reservationsIsLoading,isError:reservationsIsError},fbs:{reservations:mappedReservationsFbs,readyToLoan:reservationsReadyToLoanFBS,queued:reservationsQueuedFBS,isLoading:isLoadingFbs,isError:isErrorFbs},publizon:{reservations:mappedReservationsPublizon,readyToLoan:reservationsReadyToLoanPublizon,queued:reservationsQueuedPublizon,isLoading:isLoadingPublizon,isError:isErrorPublizon}}}},"./src/core/utils/useSavePatron.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react_query__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-query/es/index.js"),_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/fbs/fbs.ts");const useSavePatron=({patron,fetchHandlers})=>{const{mutate}=(0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__.AZ)(),queryClient=(0,react_query__WEBPACK_IMPORTED_MODULE_0__.useQueryClient)();return{savePatron:data=>{const{onSuccess,onError}=(null==fetchHandlers?void 0:fetchHandlers.savePatron)||{};patron&&mutate({data:{patron:{...patron,...data}}},{onSuccess:()=>{queryClient.invalidateQueries((0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__.gm)()),onSuccess&&onSuccess()},onError:()=>{onError&&onError()}})},savePincode:data=>{const{onSuccess,onError}=(null==fetchHandlers?void 0:fetchHandlers.savePincode)||{};patron&&mutate({data:{pincodeChange:data}},{onSuccess:()=>{queryClient.invalidateQueries((0,_fbs_fbs__WEBPACK_IMPORTED_MODULE_1__.gm)()),onSuccess&&onSuccess()},onError:()=>{onError&&onError()}})}}},__WEBPACK_DEFAULT_EXPORT__=useSavePatron;try{useSavePatron.displayName="useSavePatron",useSavePatron.__docgenInfo={description:"",displayName:"useSavePatron",props:{patron:{defaultValue:null,description:"",name:"patron",required:!1,type:{name:"PatronV5 | undefined"}},fetchHandlers:{defaultValue:null,description:"",name:"fetchHandlers",required:!1,type:{name:"{ savePatron?: FetchHandlers | undefined; savePincode?: FetchHandlers | undefined; } | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/useSavePatron.tsx#useSavePatron"]={docgenInfo:useSavePatron.__docgenInfo,name:"useSavePatron",path:"src/core/utils/useSavePatron.tsx#useSavePatron"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/withIsPatronBlockedHoc.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>utils_withIsPatronBlockedHoc});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),modal=__webpack_require__("./src/core/utils/modal.tsx"),utils_text=__webpack_require__("./src/core/utils/text.tsx"),BlockedTypes=function(BlockedTypes){return BlockedTypes.extendedExclusion="F",BlockedTypes.deceased="D",BlockedTypes.fee="E",BlockedTypes.selfcreated="W",BlockedTypes.stolen="O",BlockedTypes.exclusion="U",BlockedTypes.automatonBlocked="S",BlockedTypes}(BlockedTypes||{});const types_BlockedTypes=BlockedTypes;var url=__webpack_require__("./src/core/utils/url.tsx"),Link=__webpack_require__("./src/components/atoms/links/Link.tsx"),modal_helpers=__webpack_require__("./src/core/utils/helpers/modal-helpers.ts");const BlockedModal=({blockedStatus})=>{const t=(0,utils_text.F)(),blockedPatronELinkUrl=(0,url.Ik)()("blockedPatronELinkUrl",!0),{blockedModal}=(0,modal_helpers.c6)();return blockedStatus&&""!==blockedStatus?react.createElement(modal.A,{modalId:blockedModal,classNames:"modal-cta modal-padding",closeModalAriaLabelText:t("blockedPatronCloseModalAriaLabelText"),screenReaderModalDescriptionText:t("blockedPatronModalAriaDescriptionText")},react.createElement("div",{className:"modal-text__container"},react.createElement("h2",{className:"text-header-h3"},t(`blockedPatron${blockedStatus}TitleText`)),react.createElement("p",{className:"mt-48 mb-48 text-body-large"},t(`blockedPatron${blockedStatus}BodyText`)),blockedStatus===types_BlockedTypes.fee&&blockedPatronELinkUrl&&react.createElement(Link.A,{href:blockedPatronELinkUrl},t("blockedPatronELinkText")))):null},blocked_modal_BlockedModal=BlockedModal;try{BlockedModal.displayName="BlockedModal",BlockedModal.__docgenInfo={description:"",displayName:"BlockedModal",props:{blockedStatus:{defaultValue:null,description:"",name:"blockedStatus",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"]={docgenInfo:BlockedModal.__docgenInfo,name:"BlockedModal",path:"src/components/blocked-patron/blocked-modal/BlockedModal.tsx#BlockedModal"})}catch(__react_docgen_typescript_loader_error){}var blockedModal_slice=__webpack_require__("./src/core/blockedModal.slice.ts"),store=__webpack_require__("./src/core/store.ts"),helpers_url=__webpack_require__("./src/core/utils/helpers/url.ts"),usePatronData=__webpack_require__("./src/core/utils/helpers/usePatronData.ts");const withIsPatronBlockedHoc=Component=>({redirectOnBlocked,...props})=>{const dispatch=(0,es.wA)(),{open}=(0,modal.X)(),{blockedModal}=(0,modal_helpers.c6)(),[blockedFromViewingContentArray]=(0,react.useState)([types_BlockedTypes.deceased,types_BlockedTypes.automatonBlocked,types_BlockedTypes.extendedExclusion,types_BlockedTypes.stolen]),[blockedStatus,setBlockedStatus]=(0,react.useState)(),[blockedFromViewingContent,setBlockedFromViewingContent]=(0,react.useState)(null),{data:patronData}=(0,usePatronData.I)(),{data:{hasBeenVisible}}=(0,store.d4)((state=>state.blockedModal));return(0,react.useEffect)((()=>{var _patronData$patron,_patronData$patron2,_patronData$patron2$b;patronData&&(null!=patronData&&null!==(_patronData$patron=patronData.patron)&&void 0!==_patronData$patron&&_patronData$patron.blockStatus&&(null==patronData||null===(_patronData$patron2=patronData.patron)||void 0===_patronData$patron2||null===(_patronData$patron2$b=_patronData$patron2.blockStatus)||void 0===_patronData$patron2$b?void 0:_patronData$patron2$b.length)>0?(setBlockedStatus(patronData.patron.blockStatus[0].blockedReason),hasBeenVisible||"string"!=typeof blockedModal||(open(blockedModal),dispatch((0,blockedModal_slice.ht)({hasBeenVisible:!0})))):setBlockedFromViewingContent(!1))}),[blockedModal,dispatch,hasBeenVisible,open,patronData]),(0,react.useEffect)((()=>{blockedStatus&&(blockedFromViewingContentArray.includes(blockedStatus)?(setBlockedFromViewingContent(!0),(0,helpers_url.SE)(new URL(redirectOnBlocked))):setBlockedFromViewingContent(!1))}),[blockedFromViewingContentArray,blockedStatus,redirectOnBlocked]),react.createElement(react.Fragment,null,react.createElement(blocked_modal_BlockedModal,{blockedStatus:blockedStatus||""}),!blockedFromViewingContent&&react.createElement(Component,props))},utils_withIsPatronBlockedHoc=withIsPatronBlockedHoc;try{withIsPatronBlockedHoc.displayName="withIsPatronBlockedHoc",withIsPatronBlockedHoc.__docgenInfo={description:"",displayName:"withIsPatronBlockedHoc",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"]={docgenInfo:withIsPatronBlockedHoc.__docgenInfo,name:"withIsPatronBlockedHoc",path:"src/core/utils/withIsPatronBlockedHoc.tsx#withIsPatronBlockedHoc"})}catch(__react_docgen_typescript_loader_error){}},"./src/core/utils/withSuffix.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_store__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/core/store.ts");const __WEBPACK_DEFAULT_EXPORT__=(Component,suffix,reduxAction)=>props=>{const pattern=new RegExp(`.*${suffix}$`,"g"),suffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>String(prop).match(pattern)))),nonSuffixEntries=Object.fromEntries(Object.entries(props).filter((([prop])=>!String(prop).match(pattern))));return Object.keys(suffixEntries).length&&_store__WEBPACK_IMPORTED_MODULE_1__.M_.dispatch(reduxAction({entries:suffixEntries})),react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,nonSuffixEntries)}},"./storybook-init-framework-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js!./src/components/components.scss":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/css-loader/dist/runtime/sourceMaps.js"),_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__),_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js"),___CSS_LOADER_EXPORT___=__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__)()(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default());___CSS_LOADER_EXPORT___.push([module.id,".dpl-reset{animation:none 0s ease 0s 1 normal none running;backface-visibility:visible;background:#0000 none repeat 0 0/auto auto padding-box border-box scroll;border:none;border-collapse:initial;border-image:none;border-radius:0;border-spacing:0;bottom:auto;box-shadow:none;box-sizing:initial;caption-side:top;clear:none;clip:auto;color:#000;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-span:1;columns:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:inline;empty-cells:show;float:none;font-family:inherit;font-size:inherit;font-stretch:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;hyphens:none;left:auto;letter-spacing:normal;line-height:inherit;list-style:disc none outside;margin:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:2;outline:medium none invert;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:left;text-align-last:auto;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-origin:initial;transform-style:flat;transition:none 0s ease 0s;unicode-bidi:normal;vertical-align:initial;visibility:visible;white-space:normal;widows:2;word-spacing:normal;z-index:auto}:root{--reach-dialog:1}[data-reach-dialog-overlay]{background:#00000054;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0}[data-reach-dialog-content]{background:#fff;margin:10vh auto;outline:none;padding:2rem;width:50vw}","",{version:3,sources:["webpack://./src/components/reset.scss","webpack://./src/components/components.scss","webpack://./node_modules/@reach/dialog/styles.css"],names:[],mappings:"AAGA,WCFA,+CDGE,CAEA,2BAAA,CACA,wEAAA,CAEA,WAAA,CACA,uBAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,WAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CACA,UAAA,CACA,SAAA,CACA,UAAA,CAGA,mBAAA,CACA,iBAAA,CACA,oCAAA,CACA,aAAA,CACA,YAAA,CACA,cAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,mBAAA,CACA,iBAAA,CAIA,oBAAA,CAHA,kBAAA,CACA,oBAAA,CACA,mBAAA,CAKA,YAAA,CACA,SAAA,CACA,qBAAA,CALA,mBAAA,CAMA,4BAAA,CACA,QAAA,CACA,eAAA,CACA,cAAA,CACA,YAAA,CACA,WAAA,CACA,SAAA,CACA,SAAA,CACA,0BAAA,CACA,gBAAA,CACA,kBAAA,CACA,kBAAA,CACA,SAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,gBAAA,CACA,0BAAA,CACA,eAAA,CACA,UAAA,CAEA,UAAA,CACA,iBAAA,CACA,eAAA,CACA,oBAAA,CACA,oBAAA,CACA,aAAA,CACA,gBAAA,CACA,mBAAA,CACA,QAAA,CACA,cAAA,CACA,wBAAA,CACA,oBAAA,CACA,0BAAA,CACA,mBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA,CACA,QAAA,CACA,mBAAA,CACA,YCHF,CClFA,MACC,gBDuFD,CCpFA,4BACC,oBAAA,CAIA,QAAA,CACA,MAAA,CACA,aAAA,CALA,cAAA,CAEA,OAAA,CADA,KD2FD,CCpFA,4BAGC,eAAA,CADA,gBAAA,CAGA,YAAA,CADA,YAAA,CAHA,UD2FD",sourcesContent:["// This is not to be extended!\n// When using it use it as a class on a DOM element.\n\n.dpl-reset {\n animation: none 0s ease 0s 1 normal none running;\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n background: transparent none repeat 0 0 / auto auto padding-box border-box\n scroll;\n border: medium none currentColor;\n border-collapse: separate;\n border-image: none;\n border-radius: 0;\n border-spacing: 0;\n bottom: auto;\n box-shadow: none;\n box-sizing: content-box;\n caption-side: top;\n clear: none;\n clip: auto;\n color: #000;\n columns: auto;\n column-count: auto;\n column-fill: balance;\n column-gap: normal;\n column-rule: medium none currentColor;\n column-span: 1;\n column-width: auto;\n content: normal;\n counter-increment: none;\n counter-reset: none;\n cursor: auto;\n direction: ltr;\n display: inline;\n empty-cells: show;\n float: none;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n font-stretch: inherit;\n line-height: inherit;\n -webkit-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n left: auto;\n letter-spacing: normal;\n list-style: disc outside none;\n margin: 0;\n max-height: none;\n max-width: none;\n min-height: 0;\n min-width: 0;\n opacity: 1;\n orphans: 2;\n outline: medium none invert;\n overflow: visible;\n overflow-x: visible;\n overflow-y: visible;\n padding: 0;\n page-break-after: auto;\n page-break-before: auto;\n page-break-inside: auto;\n perspective: none;\n perspective-origin: 50% 50%;\n position: static;\n right: auto;\n -moz-tab-size: 8;\n tab-size: 8;\n table-layout: auto;\n text-align: left;\n text-align-last: auto;\n text-decoration: none;\n text-indent: 0;\n text-shadow: none;\n text-transform: none;\n top: auto;\n transform: none;\n transform-origin: 50% 50% 0;\n transform-style: flat;\n transition: none 0s ease 0s;\n unicode-bidi: normal;\n vertical-align: baseline;\n visibility: visible;\n white-space: normal;\n widows: 2;\n word-spacing: normal;\n z-index: auto;\n}\n",'@import "reset";\n@import "../../node_modules/@reach/dialog/styles";\n// Component specific styling should be included here:\n',"/* This code is subject to LICENSE in root of this repository */\n\n/* Used to detect in JavaScript if apps have loaded styles or not. */\n:root {\n\t--reach-dialog: 1;\n}\n\n[data-reach-dialog-overlay] {\n\tbackground: hsla(0, 0%, 0%, 0.33);\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\toverflow: auto;\n}\n\n[data-reach-dialog-content] {\n\twidth: 50vw;\n\tmargin: 10vh auto;\n\tbackground: white;\n\tpadding: 2rem;\n\toutline: none;\n}\n"],sourceRoot:""}]);const __WEBPACK_DEFAULT_EXPORT__=___CSS_LOADER_EXPORT___},"./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./apps/adgangsplatformen/auth.dev.jsx":"./src/apps/adgangsplatformen/auth.dev.jsx","./apps/adgangsplatformen/library-token.dev.tsx":"./src/apps/adgangsplatformen/library-token.dev.tsx","./apps/adgangsplatformen/user-token.dev.tsx":"./src/apps/adgangsplatformen/user-token.dev.tsx","./apps/advanced-search/AdvancedSearch.dev.tsx":"./src/apps/advanced-search/AdvancedSearch.dev.tsx","./apps/create-patron-user-info/CreatePatron.dev.tsx":"./src/apps/create-patron-user-info/CreatePatron.dev.tsx","./apps/dashboard/dashboard.dev.tsx":"./src/apps/dashboard/dashboard.dev.tsx","./apps/demo-modal/demo-modal.dev.tsx":"./src/apps/demo-modal/demo-modal.dev.tsx","./apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx":"./src/apps/favorites-list-material-component/FavoritesListMaterialComponent.dev.tsx","./apps/favorites-list/FavoritesList.dev.tsx":"./src/apps/favorites-list/FavoritesList.dev.tsx","./apps/fee-list/FeeList.dev.tsx":"./src/apps/fee-list/FeeList.dev.tsx","./apps/hello-world/hello-world.dev.tsx":"./src/apps/hello-world/hello-world.dev.tsx","./apps/loan-list/list/loan-list.dev.tsx":"./src/apps/loan-list/list/loan-list.dev.tsx","./apps/material-grid/automatic/MaterialGridAutomatic.dev.tsx":"./src/apps/material-grid/automatic/MaterialGridAutomatic.dev.tsx","./apps/material-grid/manual/MaterialGridManual.dev.tsx":"./src/apps/material-grid/manual/MaterialGridManual.dev.tsx","./apps/material-search/MaterialSearch.dev.tsx":"./src/apps/material-search/MaterialSearch.dev.tsx","./apps/material/material.dev.tsx":"./src/apps/material/material.dev.tsx","./apps/menu/menu.dev.tsx":"./src/apps/menu/menu.dev.tsx","./apps/opening-hours-editor/OpeningHoursEditor.dev.tsx":"./src/apps/opening-hours-editor/OpeningHoursEditor.dev.tsx","./apps/opening-hours/OpeningHours.dev.tsx":"./src/apps/opening-hours/OpeningHours.dev.tsx","./apps/patron-page/PatronPage.dev.tsx":"./src/apps/patron-page/PatronPage.dev.tsx","./apps/recommendation/recommendation.dev.tsx":"./src/apps/recommendation/recommendation.dev.tsx","./apps/recommended-material/RecommendedMaterial.dev.tsx":"./src/apps/recommended-material/RecommendedMaterial.dev.tsx","./apps/recommender/Recommender.dev.tsx":"./src/apps/recommender/Recommender.dev.tsx","./apps/reservation-list/list/reservation-list.dev.tsx":"./src/apps/reservation-list/list/reservation-list.dev.tsx","./apps/search-header/search-header.dev.tsx":"./src/apps/search-header/search-header.dev.tsx","./apps/search-result/search-result.dev.tsx":"./src/apps/search-result/search-result.dev.tsx","./apps/something-similar/SomethingSimilar.dev.tsx":"./src/apps/something-similar/SomethingSimilar.dev.tsx","./components/alert/alert.dev.jsx":"./src/components/alert/alert.dev.jsx","./components/availability-label/availability-label.dev.tsx":"./src/components/availability-label/availability-label.dev.tsx","./components/button-favourite/button-favourite.dev.tsx":"./src/components/button-favourite/button-favourite.dev.tsx","./components/cover/cover.dev.tsx":"./src/components/cover/cover.dev.tsx","./components/error-boundary-alert/ErrorBoundaryAlert.dev.tsx":"./src/components/error-boundary-alert/ErrorBoundaryAlert.dev.tsx","./components/find-on-shelf/FindOnShelfModal.dev.tsx":"./src/components/find-on-shelf/FindOnShelfModal.dev.tsx","./components/hello/hello.dev.tsx":"./src/components/hello/hello.dev.tsx","./components/message/modal-message/ModalMessage.dev.tsx":"./src/components/message/modal-message/ModalMessage.dev.tsx","./components/multiselect/Multiselect.dev.tsx":"./src/components/multiselect/Multiselect.dev.tsx","./components/search-bar/search-bar.dev.tsx":"./src/components/search-bar/search-bar.dev.tsx"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$"},"data:image/svg+xml,%3Csvg width=%27205%27 height=%278%27 viewBox=%270 0 205 8%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1.11133 6.87425C73.7223 0.129386 128.695 1.4981 203.889 1.8943%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E%0A":module=>{"use strict";module.exports="data:image/svg+xml,%3Csvg width=%27205%27 height=%278%27 viewBox=%270 0 205 8%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1.11133 6.87425C73.7223 0.129386 128.695 1.4981 203.889 1.8943%27 stroke=%27black%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E%0A"},'data:image/svg+xml,':module=>{"use strict";module.exports='data:image/svg+xml,'},'data:image/svg+xml,':module=>{"use strict";module.exports='data:image/svg+xml,'},'data:image/svg+xml;utf8, ':module=>{"use strict";module.exports='data:image/svg+xml;utf8, '},"?4f7e":()=>{},"?9140":()=>{},"?22b2":()=>{},"?ed3f":()=>{},"?b1b0":()=>{},"?1d7f":()=>{},"?2b08":()=>{},"./generated-stories-entry.cjs":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.dev\\.(jsx%7Ctsx))$")],module,!1)},"./src/core/configuration/date-format.json":module=>{"use strict";module.exports=JSON.parse('{"$k":"DD. MM. YYYY","rX":"D. MMMM YYYY","n2":"YYYY-MM-DD"}')},"./src/core/configuration/modal-ids.json":module=>{"use strict";module.exports=JSON.parse('{"allLoansId":"all-loans-id","pauseReservation":"pause-reservation","deleteReservation":"delete-reservation","deleteReservations":"delete-reservations","loanDetails":"loan-details-","acceptModal":"accept-fee","reservationDetails":"reservation-details-","dueDateModal":"due-date","feeDetails":"fee-details-","userMenuAuthenticated":"user-modal-authenticated","userMenuAnonymous":"user-modal-anonymous","userMenuUnregistered":"user-modal-unregistered","blockedModal":"blocked-modal","reservationsReady":"reservations-ready","reservationsQueued":"reservations-queued"}')}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[158],(()=>(__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/docs/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-docs/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-measure/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-outline/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-queryparams/dist/esm/preset/addDecorator.js-generated-config-entry.js"),__webpack_exec__("./.storybook/preview.js-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs"))));__webpack_require__.O()}]); \ No newline at end of file diff --git a/project.json b/project.json index 9bb9ec7a98..3c969a8b3b 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1721076123136,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"check":true,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"storybookVersion":"^6.5.0-beta.7","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.0-beta.7"},"@storybook/manager-webpack5":{"version":"6.5.0-beta.7"},"@storybook/react":{"version":"6.5.0-beta.7"}},"framework":{"name":"react"},"addons":{"@storybook/addon-essentials":{"version":"6.5.10"},"@storybook/addon-queryparams":{"version":"6.2.9"},"@storybook/preset-typescript":{"version":"3.0.0"},"@storybook/addon-postcss":{"options":{"postcssLoaderOptions":{}},"version":"2.0.0"}}} +{"generatedAt":1721076138929,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"yarn","version":"1.22.22"},"typescriptOptions":{"check":true,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"storybookVersion":"^6.5.0-beta.7","language":"typescript","storybookPackages":{"@storybook/builder-webpack5":{"version":"6.5.0-beta.7"},"@storybook/manager-webpack5":{"version":"6.5.0-beta.7"},"@storybook/react":{"version":"6.5.0-beta.7"}},"framework":{"name":"react"},"addons":{"@storybook/addon-essentials":{"version":"6.5.10"},"@storybook/addon-queryparams":{"version":"6.2.9"},"@storybook/preset-typescript":{"version":"3.0.0"},"@storybook/addon-postcss":{"options":{"postcssLoaderOptions":{}},"version":"2.0.0"}}}