@terrestris/shogun-admin 18.0.1 → 18.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +1 -1
- package/dist/js/{common.3b04f86d62e195f9.js → common.6b72d413fe1981cf.js} +2 -2
- package/dist/js/{common.3b04f86d62e195f9.js.map → common.6b72d413fe1981cf.js.map} +1 -1
- package/dist/js/{manifest.aa0113687342080a.js → manifest.a22bc14b22a40615.js} +3 -3
- package/dist/js/{manifest.aa0113687342080a.js.map → manifest.a22bc14b22a40615.js.map} +1 -1
- package/dist/mf-manifest.json +13 -21
- package/dist/mf-stats.json +13 -21
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_terrestris_shogun_admin=self.webpackChunk_terrestris_shogun_admin||[]).push([["5"],{71853(e,t,n){"use strict";n.d(t,{A:()=>l});var r,i=n(61586),a=n.n(i);r=a().INFO,a().useDefaults({defaultLevel:r});let l=a()},97060(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(82526),i=n(17508),a=n(34748);(0,r.Yx)(i.A).use(a.initReactI18next).init({resources:{de:{translation:{Index:{unauthorizedTitle:"Sie sind nicht berechtigt, diese Seite zu \xf6ffnen.",errorTitle:"Die Anwendung konnte nicht geladen werden. Pr\xfcfen Sie Ihre Konsole.",backToLoginButtonText:"Zur\xfcck zum Login"},App:{loading:"laden",loadFail:"Die Daten konnten nicht geladen werden. \xdcberpr\xfcfen Sie Ihre Konsole."},FullscreenWrapper:{fullscreen:"Vergr\xf6\xdfern",leaveFullscreen:"Verkleinern"},WelcomeDashboard:{applications:"Applikationen",applicationInfo:"… die die Welt bewegen",applicationSingular:"Applikation",applicationPlural:"Applikationen",layer:"Layer",layerInfo:"… die die Welt bewegen",layerSingluar:"Layer",layerPlural:"Layer",user:"Benutzer",userInfo:"… die die Welt verbessern",userSingular:"Benutzer",userPlural:"Benutzer"},DashboardStatistics:{statisticsTitle:"Insgesamt verf\xfcgbar"},Navigation:{content:"Inhalte",application:"Applikationen",layer:"Layer",user:"Benutzer",group:"Gruppen",status:"Status",metrics:"Metriken",logs:"Logs",logLevels:"Logging-Level",configuration:"Einstellungen",global:"Global",image:"Bilddateien",graphiql:"GraphiQL",swagger:"Swagger"},GeneralEntityRoot:{save:"{{entity}} speichern",reset:"{{entity}} zur\xfccksetzen",create:"{{entity}} erstellen",reminderModal:{title:"\xc4nderungen speichern?",description:"Die \xc4nderungen wurden noch nicht gespeichert, m\xf6chten Sie speichern?",accept:"Speichern",review:"\xc4nderungen zeigen",decline:"Verwerfen"},saveSuccess:"{{entity}} erfolgreich gespeichert",saveWarning:"{{entity}} wurde nicht gespeichert",saveFail:"Konnte {{entity}} nicht speichern",selectRevision:"Revision ausw\xe4hlen"},GeneralEntityTable:{cancelText:"Abbrechen",title:"Entit\xe4t l\xf6schen",contentInfo:'Die Entit\xe4t "{{entityName}}" wird gel\xf6scht!',contentConfirmInfo:"Bitte geben sie zum Best\xe4tigen den Namen ein:",deleteConfirm:"L\xf6schen erfolgreich",deleteConfirmDescript:'Die Entit\xe4t "{{entityName}}" wurde gel\xf6scht!',deleteFail:"L\xf6schen fehlgeschlagen",deleteFailDescript:'Die Entit\xe4t "{{entityName}}" konnte nicht gel\xf6scht werden!',columnId:"ID",columnName:"Name",tooltipReload:"Neu laden",tooltipDelete:"L\xf6schen",popupSearch:"Suche",popupFilter:"Filtern",popupReset:"Zur\xfccksetzen",paging:{nextPage:"N\xe4chste Seite",prevPage:"Vorherige Seite",itemsPerPage:"Seite",jumpTo:"Springe zu",page:"Seite",total:"Total"}},GeneralEntityForm:{userPermissionGridNoIdWarning:"Die Konfiguration muss gespeichert werden, bevor die Benutzerberechtigungen festgelegt werden k\xf6nnen.",groupPermissionGridNoIdWarning:"Die Konfiguration muss gespeichert werden, bevor die Gruppenberechtigungen festgelegt werden k\xf6nnen.",rolePermissionGridNoIdWarning:"Die Konfiguration muss gespeichert werden, bevor die Rollenberechtigungen festgelegt werden k\xf6nnen."},ImageFileRoot:{title:"Bilddateien",subTitle:"… die die Welt zeigen",button:"Bilddatei hochladen",success:"Upload erfolgreich",failure:"Fehler beim Upload",uploadSuccess:"Die Datei {{entityName}} wurde erfolgreich hochgeladen",uploadFailure:"Die Datei {{entityName}} konnte nicht hochgeladen werden"},ImageFileForm:{title:"Bilddatei",name:"Dateiname",uuid:"UUID",public:"\xd6ffentlich",preview:"Vorschau"},Logs:{logs:"Logs",logsInfo:"… die die Welt erkl\xe4ren",refresh:"Aktualisieren",autoReload:"Automatisches Nachladen",warningMessage:"Logs k\xf6nnen nicht angezeigt werden",warningDescribtion:"Hinweis: Um die Logs anzeigen zu k\xf6nnen ist es notwendig, dass die Logs in eine Datei geschrieben werden. Bitte die SHOGun API Konfiguration entsprechend \xfcberpr\xfcfen."},LinkField:{title:"\xd6ffne Link"},Metrics:{title:"Metriken",info:"… die die Welt vermessen"},GlobalSettings:{global:"Einstellungen",globalInfo:"… die die Welt lenken"},LogSettings:{logs:"Einstellungen",logsInfo:"… die die Welt lenken",tableName:"Name",tableLevel:"Level",searchPlaceholder:"Suchen…"},EvictCache:{clear:"Cache leeren",success:"Cache erfolgreich geleert",error:"Fehler beim Leeren des Cache"},User:{settings:"Profileinstellungen",info:"Info",logout:"Ausloggen"},Table:{filterTitle:"Filtermen\xfc",filterConfirm:"OK",filterReset:"Zur\xfccksetzen",filterEmptyText:"Keine Filter",filterCheckall:"Alles ausw\xe4hlen",filterSearchPlaceholder:"In Filtern suchen",emptyText:"Keine Daten",selectAll:"Diese Seite ausw\xe4hlen",selectInvert:"Diese Seite invertieren",selectNone:"Nichts ausw\xe4hlen",selectionAll:"Alles ausw\xe4hlen",sortTitle:"Sortieren",expand:"Zeile ausklappen",collapse:"Zeile einklappen",triggerDesc:"Klicken, um absteigend zu sortieren",triggerAsc:"Klicken, um aufsteigend zu sortieren",cancelSort:"Klicken, um Sortierung zur\xfcckzusetzen"},YesOrNoField:{yes:"Ja",no:"Nein"},InstancePermissionGrid:{loadErrorMsg:"Fehler beim Laden der Berechtigungen",updateErrorMsg:"Fehler beim Aktualisieren der Berechtigung",deleteErrorMsg:"Fehler beim L\xf6schen der Berechtigung",filterInputPlaceholder:"Suche…",filterSearchButtonText:"Suche",filterResetButtonText:"Zur\xfccksetzen",nameColumnTitle:"Name",permissionColumnTitle:"Berechtigung",deletePermissionButtonTooltip:"Berechtigung l\xf6schen"},PermissionSelect:{placeholder:"Berechtigung ausw\xe4hlen…",readLabel:"Lesen",readUpdateLabel:"Aktualisieren",readUpdateDeleteLabel:"Aktualisieren & L\xf6schen",adminLabel:"Besitzer"},PermissionModal:{loadErrorMsg:"Fehler beim Laden der Berechtigungen",openModalButtonTooltipTitle:"Berechtigung hinzuf\xfcgen",title:"Berechtigung hinzuf\xfcgen",paginationTotal:"Total",paginationNextPage:"N\xe4chste Seite",paginationPrevPage:"Vorherige Seite"},GroupPermissionGrid:{modal:{description:"W\xe4hlen Sie eine oder mehrere Gruppen sowie die zugeh\xf6rige Berechtigung aus.",referenceSelectLabel:"Gruppenname",referenceSelectExtra:"W\xe4hlen Sie die Gruppe aus der Liste aus oder geben Sie einen Suchbegriff (Gruppenname) ein",referenceSelectPlaceholder:"Gruppe ausw\xe4hlen…",permissionSelectLabel:"Berechtigung",permissionSelectExtra:"W\xe4hlen Sie die Berechtigung aus, die die Gruppe erhalten sollen.",saveErrorMsg:"Fehler beim Speichern der Berechtigung f\xfcr die Gruppen mit den IDs: {{referenceIds}}"}},UserPermissionGrid:{modal:{description:"W\xe4hlen Sie einen oder mehrere Nutzer sowie die zugeh\xf6rige Berechtigung aus.",referenceSelectLabel:"Nutzername oder Email Adresse",referenceSelectExtra:"W\xe4hlen Sie die Nutzer aus der Liste aus oder geben Sie einen Suchbegriff (Gruppenname oder Email Adresse) ein",referenceSelectPlaceholder:"Nutzer ausw\xe4hlen…",permissionSelectLabel:"Berechtigung",permissionSelectExtra:"W\xe4hlen Sie die Berechtigung aus, die die Nutzer erhalten sollen.",saveErrorMsg:"Fehler beim Speichern der Berechtigung f\xfcr die Nutzer mit den IDs: {{referenceIds}}"}},RolePermissionGrid:{modal:{description:"W\xe4hlen Sie einen oder mehrere Rolle sowie die zugeh\xf6rige Berechtigung aus.",referenceSelectLabel:"Rollenname",referenceSelectExtra:"W\xe4hlen Sie die Rolle aus der Liste aus oder geben Sie einen Suchbegriff (Rollenname) ein",referenceSelectPlaceholder:"Rolle ausw\xe4hlen…",permissionSelectLabel:"Berechtigung",permissionSelectExtra:"W\xe4hlen Sie die Berechtigung aus, die die Rolle erhalten sollen.",saveErrorMsg:"Fehler beim Speichern der Berechtigung f\xfcr die Rollen mit den IDs: {{referenceIds}}"}},ApplicationInfoModal:{clientAbout:"\xdcber",clientVersion:"Admin Version",backendVersion:"Backend Version",buildTime:"Build Zeit",applicationInfo:"Die Standardanwendung",title:"SHOGun-Admin Information"},LayerPreview:{title:"Layervorschau ({{layerName}})",tooltipTitle:"Layervorschau \xf6ffnen",extentErrorMsg:"Fehler beim Zoomen auf die Gesamtansicht des Layers.",addLayerErrorMsg:"Fehler beim Hinzuf\xfcgen des Layers zur Karte.",loadLayerErrorMsg:"Fehler beim Laden des Layers.",extentNotSupportedErrorMsg:"Zoomen auf Gesamtansicht wird f\xfcr diesen Typ nicht unterst\xfctzt."},VerifyProviderDetailsField:{title:"Keine Informationen des Authentication-Providers verf\xfcgbar"},UploadLayerButton:{success:{message:"Layer erfolgreich erstellt",description:"Datei {{fileName}} wurde erfolgreich geladen und der Layer {{layerName}} erstellt"},error:{message:"Konnte Layer nicht erstellen",description:"Fehler beim Hochladen der Datei {{fileName}}",descriptionSize:"Der Upload \xfcberschreitet das Limit von {{maxSize}} MB",descriptionFormat:"Der Dateityp ist nicht unterst\xfctzt ({{supportedFormats}})",descriptionZipContent:"Mehrere Geodatens\xe4tze innerhalb eines Archivs sind nicht unterst\xfctzt"},title:"Layer erstellen"},CreateAllUsersButton:{title:"Nutzer synchronisieren",tooltip:"F\xfcge alle fehlenden Nutzer aus dem Nutzerprovider hinzu",success:"Nutzer erfolgreich erstellt",error:"Fehler beim Erstellen der Nutzer"},CreateAllGroupsButton:{title:"Gruppen synchronisieren",tooltip:"F\xfcge alle fehlenden Gruppen aus dem Gruppenprovider hinzu",success:"Gruppen erfolgreich erstellt",error:"Fehler beim Erstellen der Gruppen"},CreateAllRolesButton:{title:"Rollen synchronisieren",tooltip:"F\xfcge alle fehlenden Rollen aus dem Rollenprovider hinzu",success:"Rollen erfolgreich erstellt",error:"Fehler beim Erstellen der Rollen"},JSONEditor:{formatDocumentTooltip:"Inhalt formatieren (Strg + Umschalt + I)"},CopyToClipboardButton:{tooltip:"In die Zwischenablage kopieren"},AddLayerModal:{title:"WMS Layer hinzuf\xfcgen",requestWmsGetCapabilitiesInstruction:"Bitte geben Sie eine g\xfcltige WMS GetCapabilities Adresse ein und best\xe4tigen Sie die Eingabe mit 'Enter ↲' oder \xfcber den Button rechts vom Eingabefeld.",addAllLayers:"Alle hinzuf\xfcgen",addSelectedLayers:"Auswahl hinzuf\xfcgen",inputPlaceholder:"WMS GetCapabilities URL angeben…",invalidUrlErrorMsg:"Ung\xfcltige URL. Bitte geben Sie eine g\xfcltige URL wie z.B. https://ows.terrestris.de/osm/service ein.",useBearerTokenLabel:"Auth?",useBearerTokenTooltip:"Authentifizierte Anfrage verwenden (f\xfcr interne Dienste)",version:"Version {{version}}",columnTitle:"Titel",columnName:"Name",columnExisting:"Vorhanden",columnPreview:"Layervorschau",errorDescription:"Das Capabilities Dokument konnte nicht geladen werden, bitte \xfcberpr\xfcfen Sie die URL.",existingLayerNote:'Ein Layer mit dem Namen "{{layerName}}" ist bereits vorhanden und \xfcber die folgenden Konfigurationen verf\xfcgbar:'},ToolbarAddLayerButton:{title:"WMS Layer hinzuf\xfcgen",tooltip:"WMS Layer auf Basis eines GetCapabilities Dokuments hinzuf\xfcgen",successMsg:"Layer erfolgreich hinzugef\xfcgt!",errorMsg:"Die Layer konnten nicht hinzugef\xfcgt werden!",warningMsg:"Es konnten nicht alle Layer hinzugef\xfcgt werden!",successSubTitle:"Die folgenden Layer wurden erfolgreich hinzugef\xfcgt:",errorSubTitle:"Die folgenden Layer konnten nicht hinzugef\xfcgt werden:"}}},en:{translation:{Index:{unauthorizedTitle:"You're not authorized to access this page.",errorTitle:"Failed to load the application. Check your console.",backToLoginButtonText:"Back to login"},App:{loading:"loading",loadFail:"Failed to load the initial data. Check your console."},FullscreenWrapper:{fullscreen:"Maximize",leaveFullscreen:"Minimize"},WelcomeDashboard:{applications:"Applications",applicationInfo:"… that move the world",applicationSingular:"Application",applicationPlural:"Applications",layer:"Layers",layerInfo:"… that move the world",layerSingluar:"Layer",layerPlural:"Layers",user:"User",userInfo:"… that improve the world",userSingular:"User",userPlural:"Users"},DashboardStatistics:{statisticsTitle:"Total available"},Navigation:{content:"Content",application:"Application",layer:"Layer",user:"User",group:"Group",status:"Status",metrics:"Metrics",logs:"Logs",logLevels:"Logging levels",configuration:"Configuration",global:"Global",image:"Images",graphiql:"GraphiQL",swagger:"Swagger"},GeneralEntityRoot:{save:"Save {{entity}}",reset:"Reset {{entity}}",create:"Create {{entity}}",reminderModal:{title:"Save changes?",description:"The changes have not yet been saved, do you want to save?",accept:"Save",review:"review changes",decline:"Discard"},saveSuccess:"{{entity}} successfully saved",saveWarning:"{{entity}} has not been saved",saveFail:"Could not save {{entity}}",selectRevision:"Select revision"},GeneralEntityTable:{cancelText:"Cancel",title:"Delete entity",contentInfo:'The entity "{{entityName}}" will be deleted!',contentConfirmInfo:"Please enter the name to confirm:",deleteConfirm:"Delete successful",deleteConfirmDescript:'The entity "{{entityName}}" was deleted',deleteFail:"Deletion failed",deleteFailDescript:'The entity "{{entityName}}" could not be deleted!',columnId:"ID",columnName:"Name",tooltipReload:"Reload",tooltipDelete:"Delete",popupSearch:"Search",popupFilter:"Filter",popupReset:"Reset",paging:{nextPage:"Next page",prevPage:"Previous page",itemsPerPage:"page",jumpTo:"Go to",page:"Page",total:"Total"}},GeneralEntityForm:{userPermissionGridNoIdWarning:"Configuration must be saved before the user permissions can be set.",groupPermissionGridNoIdWarning:"Configuration must be saved before the group permissions can be set.",rolePermissionGridNoIdWarning:"Configuration must be saved before the role permissions can be set."},ImageFileRoot:{title:"Images",subTitle:"… that show the world",button:"Upload image",success:"Upload successful",failure:"Error during upload",uploadSuccess:"The {{entityName}} file was successfully uploaded",uploadFailure:"The file {{entityName}} could not be uploaded"},ImageFileForm:{title:"Image",name:"Filename",uuid:"UUID",public:"Public",preview:"Preview"},Logs:{metric:"Metrics",metricsInfo:"… that measure the world",logs:"Logs",logsInfo:"… that explain the world",refresh:"Refresh",autoReload:"Hot reload",warningMessage:"Error while displaying the logs",warningDescribtion:"Note: In order to be able to display the logs, it is necessary that the logs are written to a file. Please check the SHOGun API configuration accordingly."},LinkField:{title:"Open link"},Metrics:{title:"Metrics",info:"… that measure the world"},GlobalSettings:{global:"Configuration",globalInfo:"… that guide the world"},LogSettings:{logs:"Configuration",logsInfo:"… that guide the world",tableName:"Name",tableLevel:"Level",searchPlaceholder:"Search by…"},EvictCache:{clear:"Clear cache",success:"Successfully cleared the cache",error:"Could not clear the cache"},User:{settings:"Profile settings",info:"Info",logout:"Logout"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},YesOrNoField:{yes:"Yes",no:"No"},ImageFileTable:{imageSingular:"Image",imagePlural:"Images",delete:"Delete {{entity}}",cancel:"Cancel",confirmInfo:"The {{entity}} will be deleted!",conFirmTooltip:"Do you really want to delete the {{entity}} file?",deletionInfo:"{{entity}} has been deleted",deletionDescription:'{{entity}} "{{record}}" has been deleted',deleteFail:"Deletion failed",deleteFailDescript:'The file "{{record}}" could not be deleted!',reloadTooltip:"Reload"},InstancePermissionGrid:{loadErrorMsg:"Error while loading the permissions",updateErrorMsg:"Error while updating the permission",deleteErrorMsg:"Error while deleting the permission",filterInputPlaceholder:"Search…",filterSearchButtonText:"Search",filterResetButtonText:"Reset",nameColumnTitle:"Name",permissionColumnTitle:"Permission",deletePermissionButtonTooltip:"Delete permission"},PermissionSelect:{placeholder:"Select a permission…",readLabel:"Read",readUpdateLabel:"Update",readUpdateDeleteLabel:"Update & Delete",adminLabel:"Owner"},PermissionModal:{loadErrorMsg:"Error while loading the permissions",openModalButtonTooltipTitle:"Add permission",title:"Add permission",paginationTotal:"Total",paginationNextPage:"Next page",paginationPrevPage:"Previous page"},GroupPermissionGrid:{modal:{description:"Select one or more groups and the respective permission.",referenceSelectLabel:"Group name",referenceSelectExtra:"Select groups from the list or search via name.",referenceSelectPlaceholder:"Select groups(s)…",permissionSelectLabel:"Permission",permissionSelectExtra:"Select the permission the groups should be granted.",saveErrorMsg:"Error while setting the permission for groups with IDs: {{referenceIds}}"}},UserPermissionGrid:{modal:{description:"Select one or more users and the respective permission.",referenceSelectLabel:"Username or email address",referenceSelectExtra:"Select users from the list or search via username or email address.",referenceSelectPlaceholder:"Select user(s)…",permissionSelectLabel:"Permission",permissionSelectExtra:"Select the permission the users should be granted.",saveErrorMsg:"Error while setting the permission for users with IDs: {{referenceIds}}"}},RolePermissionGrid:{modal:{description:"Select one or more roles and the respective permission.",referenceSelectLabel:"Role name",referenceSelectExtra:"Select roles from the list or search via role name.",referenceSelectPlaceholder:"Select role(s)…",permissionSelectLabel:"Permission",permissionSelectExtra:"Select the permission the roles should be granted.",saveErrorMsg:"Error while setting the permission for roles with IDs: {{referenceIds}}"}},ApplicationInfoModal:{clientAbout:"About",clientVersion:"Admin version",backendVersion:"Backend version",buildTime:"Build time",applicationInfo:"The default application",title:"SHOGun Admin info"},LayerPreview:{title:"Layer preview ({{layerName}})",tooltipTitle:"Open layer preview",extentErrorMsg:"Could not zoom to the extent of the layer.",addLayerErrorMsg:"Could not add the layer to the map.",loadLayerErrorMsg:"Error while loading the layer.",extentNotSupportedErrorMsg:"Zoom to layer is not supported for this type."},VerifyProviderDetailsField:{title:"No authentication provider information available"},UploadLayerButton:{success:{message:"Layer successfully created",description:"Successfully uploaded file {{fileName}} and created layer {{layerName}}"},error:{message:"Could not create layer",description:"Error while uploading file {{fileName}}",descriptionSize:"The file exceeds the upload limit of {{maxSize}} MB",descriptionFormat:"The given file type does not match the supported ones ({{supportedFormats}})",descriptionZipContent:"Multiple geodatasets within one archive are not supported"},title:"Create layer"},CreateAllUsersButton:{title:"Synchronize users",tooltip:"Add all missing users from the user provider",success:"Successfully created all users",error:"Could not create the users"},CreateAllGroupsButton:{title:"Synchronize groups",tooltip:"Add all missing groups from the group provider",success:"Successfully created all groups",error:"Could not create the groups"},CreateAllRolesButton:{title:"Synchronize roles",tooltip:"Add all missing roles from the role provider",success:"Successfully created all roles",error:"Could not create the roles"},JSONEditor:{formatDocumentTooltip:"Format content (Ctrl + Shift + I)"},CopyToClipboardButton:{tooltip:"Copy to clipboard"},AddLayerModal:{title:"Add WMS layer",requestWmsGetCapabilitiesInstruction:"Please enter a valid WMS GetCapabilities address and load it by pressing 'Enter ↲' or via the button to the right of the input field.",addAllLayers:"Add all",addSelectedLayers:"Add selected",inputPlaceholder:"Enter WMS GetCapabilities URL…",invalidUrlErrorMsg:"Invalid URL. Please enter a valid URL such as https://ows.terrestris.de/osm/service.",useBearerTokenLabel:"Auth?",useBearerTokenTooltip:"Use authenticated request (for internal services)",version:"Version {{version}}",columnTitle:"Title",columnName:"Name",columnExisting:"Available",columnPreview:"Layer preview",errorDescription:"The capabilities document could not be loaded, please check the URL.",existingLayerNote:'A layer with the name "{{layerName}}" is already added and available in the following configurations:'},ToolbarAddLayerButton:{title:"Add WMS layer",tooltip:"Add WMS layer from GetCapabilities document",successMsg:"Layer successfully added",errorMsg:"The layers could not be added",warningMsg:"Not all layers could be added",successSubTitle:"The following layers have been successfully added:",errorSubTitle:"The following layers could not be added:"}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},supportedLngs:["de","en"]});let l=r.Ay},32511(e,t,n){"use strict";n.d(t,{A:()=>a,a:()=>i});var r=(0,n(81309).Z0)({name:"appInfo",initialState:{commitHash:"",version:"",buildTime:"",userId:-1,authorities:[]},reducers:{setAppInfo:function(e,t){return t.payload}}}),i=r.actions.setAppInfo;let a=r.reducer},69182(e,t,n){"use strict";n.d(t,{A:()=>a,L:()=>i});var r=(0,n(81309).Z0)({name:"entityId",initialState:null,reducers:{setEntityId:function(e,t){return t.payload}}}),i=r.actions.setEntityId;let a=r.reducer},10721(e,t,n){"use strict";n.d(t,{A:()=>a,L:()=>i});var r=(0,n(81309).Z0)({name:"shogunInfoVisible",initialState:!1,reducers:{setVisible:function(e,t){return t.payload}}}),i=r.actions.setVisible;let a=r.reducer},8267(e,t,n){"use strict";n.d(t,{$4:()=>a,$Y:()=>l,Ay:()=>o});var r=(0,n(81309).Z0)({name:"jsonEditor",initialState:{originalEditorValues:void 0,isEditedManuallyMap:void 0},reducers:{setOriginalEditorValues:function(e,t){e.originalEditorValues=t.payload},setIsEditedManuallyMap:function(e,t){e.isEditedManuallyMap=t.payload}}}),i=r.actions,a=i.setOriginalEditorValues,l=i.setIsEditedManuallyMap;let o=r.reducer},70133(e,t,n){"use strict";n.d(t,{A:()=>a,M:()=>i});var r=(0,n(81309).Z0)({name:"layerSuggestionList",initialState:[],reducers:{setLayerSuggestionList:function(e,t){return t.payload}}}),i=r.actions.setLayerSuggestionList;let a=r.reducer},32559(e,t,n){"use strict";n.d(t,{A:()=>a,Y:()=>i});var r=(0,n(81309).Z0)({name:"swaggerDocs",initialState:{},reducers:{setOpenApiDocs:function(e,t){return t.payload}}}),i=r.actions.setOpenApiDocs;let a=r.reducer},54299(e,t,n){"use strict";n.d(t,{A:()=>a,i:()=>i});var r=(0,n(81309).Z0)({name:"userInfo",initialState:{authProviderId:"peter@pan.de"},reducers:{setUserInfo:function(e,t){return t.payload}}}),i=r.actions.setUserInfo;let a=r.reducer},35824(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>rj});var r=n(3371),i=n(15082),a=n(8674),l=n(74848),o=n(72660),s=n.n(o),c=n(91893),u=n(82439),d=n(4888),f=n(88040),h=n(28032),p=n(61586),m=n.n(p),g=n(69843),v=n.n(g),y=n(34748),b=n(84976),x=n(47767),j=n(25307),S=n.n(j),A=n(82640),w=n(48388),C=n(41599),_=n(97060),T=C.A.Option;let k=function(){var e=Object.keys(_.A.services.resourceStore.data);return(0,l.jsx)("div",{className:"language-select",children:(0,l.jsx)(C.A,{defaultValue:_.A.language||"en",onChange:function(e){_.A.changeLanguage(e)},children:e.map(function(e){return(0,l.jsx)(T,{value:e,children:e.toUpperCase()},e)})})})};var E=n(70591),P=n(68866),N=n(20506),F=n(76511),L=n(78667),I=n(45135);let D=function(){return(0,I.wA)()};var M=I.d4,R=n(80630);let G=function(){return(0,o.useContext)(R.Ay)};var B=n(10721),O=n(25227),U=n(45098),z=n(83386),Y=function(){function e(){(0,O._)(this,e)}return(0,U._)(e,null,[{key:"getInitials",value:function(e){var t,n,r,i,a=null==e||null==(n=e.providerDetails)||null==(t=n.firstName)?void 0:t.charAt(0),l=null==e||null==(i=e.providerDetails)||null==(r=i.lastName)?void 0:r.charAt(0);return v()(a)||v()(l)?"\uD83D\uDD27":a.toUpperCase()+l.toUpperCase()}},{key:"getGravatarUrl",value:function(e){var t=e.email,n=e.size,r=e.rating,i=e.defaultImage,a=e.force,l=(void 0===t?"":t).toLowerCase(),o=(0,z.md5)(l),s="".concat("https://www.gravatar.com/avatar/").concat(o,"?s=").concat(void 0===n?80:n,"&r=").concat(void 0===r?"g":r,"&d=").concat(void 0===i?"identicon":i);return void 0!==a&&a&&(s="".concat(s,"&f=y")),s}}]),e}();let V=function(){var e,t,n=M(function(e){return e.userInfo}),r=D(),i=(0,y.useTranslation)().t,a=G();if(v()(a))return null;var o=Y.getGravatarUrl({email:(null==(e=n.providerDetails)?void 0:e.email)||"",size:38}),s=(null==n||null==(t=n.providerDetails)?void 0:t.username)||(null==n?void 0:n.authProviderId),c=[];return s&&c.push({label:(0,l.jsx)("div",{className:"user-name",children:(0,l.jsx)("span",{children:s})}),key:"username"},{type:"divider"}),a.getKeycloak()&&c.push({label:i("User.settings"),icon:(0,l.jsx)(E.A,{}),key:"settings"}),c.push({label:i("User.info"),icon:(0,l.jsx)(P.A,{}),key:"info"},{type:"divider"}),c.push({label:i("User.logout"),icon:(0,l.jsx)(N.A,{}),key:"logout"}),(0,l.jsx)(F.A,{className:"user-menu",menu:{style:{width:256},className:"user-chip-menu",items:c,onClick:function(e){switch(e.key){case"info":r((0,B.L)(!0));break;case"settings":var t;null==a||null==(t=a.getKeycloak())||t.accountManagement();break;case"logout":var n=a.getKeycloak();n?n.logout():fetch("/auth/logout",{method:"POST",credentials:"same-origin"}).then(function(e){var t,n;200!==e.status||v()(null===S()||void 0===S()||null==(t=S().security)?void 0:t.tokenName)||(localStorage.removeItem(null===S()||void 0===S()||null==(n=S().security)?void 0:n.tokenName),window.location.href="/")})}}},trigger:["click"],children:(0,l.jsxs)("div",{children:[(0,l.jsx)(L.A,{src:o,size:"large",className:"userimage",children:o?"":Y.getInitials(n)}),(0,l.jsx)("span",{className:"username",children:s})]})})},H=function(){var e,t=(null==(e=S().path)?void 0:e.logo)||w;return(0,l.jsx)("header",{children:(0,l.jsx)(A.z,{className:"page-header",title:(0,l.jsxs)(b.N_,{to:"".concat(S().appPrefix,"/portal"),className:"header-link",children:[(0,l.jsx)("img",{className:"header-logo",src:t}),"SHOGun Admin"]}),extra:[(0,l.jsx)(k,{},"languageselect"),(0,l.jsx)(V,{},"user")]})})};var W=n(43710);let K=n.p+"52d336a1a5815768.gif",q=function(e){return(0,l.jsx)("img",(0,W._)({src:K,alt:"shogun spinner"},e))};var Z=n(69941),J=n(2129);let $=function(){var e=G();return(0,o.useCallback)(function(t){return(0,r._)(function(){var n,r,i,l;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(!(n=t.sourceConfig.url))return[2];return n.endsWith("?")&&(n=n.slice(0,-1)),r={SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:"2.0.0",OUTPUTFORMAT:"application/json",TYPENAMES:t.sourceConfig.layerNames},i={"Content-Type":"application/json"},[4,fetch("".concat(n,"?").concat(Z.Q.objectToRequestString(r)),{method:"GET",headers:t.sourceConfig.useBearerToken?(0,W._)({},i,(0,J.M)(null==e?void 0:e.getKeycloak())):i})];case 1:if(!(l=a.sent()).ok)throw Error("No successful response while executing a WFS DescribeFeatureType");return[4,l.json()];case 2:return[2,a.sent()]}})})()},[e])};var Q=n(565),X=n(86404),ee=n(87959),et=n(90697),en=n(2404),er=n.n(en),ei=n(20156),ea=n(5745),el=n(74315),eo=n(18182),es=n(15001),ec=n(98892),eu=n(82526),ed=n(62193),ef=n.n(ed),eh=n(95093),ep=n.n(eh),em=n(60141),eg=n(45588),ev=n(59648),ey=s().createContext(void 0),eb=function(e){var t=e.value,n=e.children;return(0,l.jsx)(ey.Provider,{value:t,children:n})},ex=n(65321),ej=n.n(ex),eS=n(55367),eA=n(47088),ew=n(32766),eC=function(e){function t(e){return(0,O._)(this,t),(0,eA._)(this,t,[e])}return(0,ew._)(t,e),t}(n(59059).G),e_=n(67476),eT=n(34259),ek=n(5955),eE=n(58156),eP=n.n(eE),eN=n(5287),eF=n.n(eN),eL=n(98023),eI=n.n(eL),eD=n(85015),eM=n.n(eD),eR=n(90179),eG=n.n(eR),eB=n(63560),eO=n.n(eB),eU=n(58673),ez=n(96501),eY=function(){function e(t){var n=t.entity,r=t.revisions,i=t.initialValues,a=t.service,l=t.formConfig,o=t.formValidator;(0,O._)(this,e),(0,e_._)(this,"entity",void 0),(0,e_._)(this,"revisions",void 0),(0,e_._)(this,"initialValues",void 0),(0,e_._)(this,"service",void 0),(0,e_._)(this,"formConfig",void 0),(0,e_._)(this,"formValidator",void 0),(0,e_._)(this,"nextUpdate",void 0),this.formValidator=o,this.service=a,this.formConfig=l,v()(n)||(this.entity=n),v()(r)||(this.revisions=r),this.initialValues=i}return(0,U._)(e,[{key:"getEntity",value:function(){return this.entity}},{key:"setFormValidator",value:function(e){this.formValidator=e}},{key:"load",value:function(e){return(0,r._)(function(){var t,n,r,i,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:return i=this,[4,null==(t=this.service)?void 0:t.findOne(e)];case 1:if(i.entity=a.sent(),!(null==(n=S().entityHistory)?void 0:n.enabled))return[3,3];return o=this,[4,null==(l=this.service)?void 0:l.findAllRevisions(e)];case 2:o.revisions=a.sent(),a.label=3;case 3:if(!eM()(null==(r=this.formConfig)?void 0:r.publicKey))return[3,5];return[4,this.service.isPublic(this.entity.id)];case 4:s=a.sent(),c=this.formConfig.publicKey,this.entity[c]=s,a.label=5;case 5:return this.initializeFormValues(),[2,{entity:this.entity,revisions:this.revisions}]}})}).call(this)}},{key:"loadRevision",value:function(e,t){return(0,r._)(function(){var n,r,i,l,o;return(0,a.YH)(this,function(a){switch(a.label){case 0:return[4,null==(n=this.service)?void 0:n.findRevision(e,t)];case 1:if(!(i=a.sent()))return[2,void 0];if(this.entity=i,!eM()(null==(r=this.formConfig)?void 0:r.publicKey))return[3,3];return[4,this.service.isPublic(this.entity.id)];case 2:l=a.sent(),o=this.formConfig.publicKey,this.entity[o]=l,a.label=3;case 3:return this.initializeFormValues(),[2,this.entity]}})}).call(this)}},{key:"createEntity",value:function(){var e,t=this.create(ez.A);return(null==(e=this.formConfig)?void 0:e.name)==="application"&&(t=this.create(eU.A)),this.entity=t,this.initializeFormValues(),this.entity}},{key:"delete",value:function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:if(v()(null==e?void 0:e.id))return[3,2];return[4,this.service.delete(null==e?void 0:e.id)];case 1:return t.sent(),[2,Promise.resolve()];case 2:return[2,Promise.reject()]}})}).call(this)}},{key:"findAll",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=this.service)?void 0:t.findAll(e)];case 1:return[2,n.sent()]}})}).call(this)}},{key:"updateEntity",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,r._)(function(){var n,r,i,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:n=!0,r=!1,i=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),l=this.formConfig.fields[Symbol.iterator](),a.label=2;case 2:if(n=(o=l.next()).done)return[3,5];if(s=o.value,!Object.prototype.hasOwnProperty.call(e,s.dataField))return[3,4];return[4,this.setEntityValue(s,structuredClone(e[s.dataField]))];case 3:a.sent(),a.label=4;case 4:return n=!0,[3,2];case 5:return[3,8];case 6:return c=a.sent(),r=!0,i=c,[3,8];case 7:try{n||null==l.return||l.return()}finally{if(r)throw i}return[7];case 8:return this.nextUpdate&&(this.formValidator&&!t?this.formValidator(this.nextUpdate):ev.A.warn("No formValidator set for EntityController or requested to skip validation"),this.nextUpdate=void 0),[2]}})}).call(this)}},{key:"saveOrUpdate",value:function(){return(0,r._)(function(){var e,t,n,r,i,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(n=eI()(null==(e=this.entity)?void 0:e.id),i=(r=this.formConfig.publicKey)?null==(t=this.entity)?void 0:t[r]:void 0,l=eG()(this.entity,["created","modified"].concat((0,ek._)(this.formConfig.fields.filter(function(e){return e.dataField===r||e.readOnly}).map(function(e){return e.dataField})))),n&&(l=(0,eT._)((0,W._)({},l),{id:null==(o=this.entity)?void 0:o.id})),s=this,!n)return[3,2];return[4,this.service.update(l)];case 1:return c=a.sent(),[3,4];case 2:return[4,this.service.add(l)];case 3:c=a.sent(),a.label=4;case 4:if(s.entity=c,!r)return[3,8];if(!i)return[3,6];return[4,this.service.setPublic(this.entity.id)];case 5:return a.sent(),[3,8];case 6:return[4,this.service.revokePublic(this.entity.id)];case 7:a.sent(),a.label=8;case 8:return[2,this.entity]}})}).call(this)}},{key:"getFormConfig",value:function(){return this.formConfig}},{key:"getInitialFormValues",value:function(){return this.initialValues}},{key:"isFieldValid",value:function(e,t){return{validateStatus:"success"}}},{key:"update",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=this.service)?void 0:t.update(e)];case 1:return[2,n.sent()]}})}).call(this)}},{key:"add",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=this.service)?void 0:t.add(e)];case 1:return[2,n.sent()]}})}).call(this)}},{key:"updateFormForDataFields",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=this.formConfig.fields[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;if(Array.isArray(l.dataField)){if(eF()(l.dataField,e)){var o={},s=!0,c=!1,u=void 0;try{for(var d,f=l.dataField[Symbol.iterator]();!(s=(d=f.next()).done);s=!0){var h=d.value;e.includes(h)&&eO()(o,h,eP()(this.entity,h))}}catch(e){c=!0,u=e}finally{try{s||null==f.return||f.return()}finally{if(c)throw u}}this.addFormChange(l.dataField,o)}}else e.includes(l.dataField)&&this.addFormChange(l.dataField,eP()(this.entity,l.dataField))}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"updateFormForComponents",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,l=this.formConfig.fields[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var o=a.value;!v()(o.component)&&e.includes(o.component)&&this.addFormChange(o.dataField,t)}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}}},{key:"setEntityValueByFieldConfig",value:function(e,t){if(!v()(this.entity))if(Array.isArray(e.dataField)){var n=!0,r=!1,i=void 0;try{for(var a,l=e.dataField[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var o=a.value;eO()(this.entity,o,eP()(t,o))}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}}else eO()(this.entity,e.dataField,t)}},{key:"getFormValueByFieldConfig",value:function(e){if(!Array.isArray(e.dataField))return eP()(this.entity,e.dataField);var t={},n=!0,r=!1,i=void 0;try{for(var a,l=e.dataField[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var o=a.value;eO()(t,o,eP()(this.entity,o))}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return t}},{key:"initializeFormValues",value:function(){var e={},t=!0,n=!1,r=void 0;try{for(var i,a=this.formConfig.fields[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;e[l.dataField]=this.getFormValue(l)}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}this.initialValues=e}},{key:"getDataFieldValue",value:function(e,t,n){return Array.isArray(e.dataField)&&e.dataField.includes(n)?t[n]:e.dataField===n?t:void 0}},{key:"hasDataFieldValue",value:function(e,t){return Array.isArray(e.dataField)&&e.dataField.includes(t)||e.dataField===t}},{key:"updateDataFieldValue",value:function(e,t,n,r){return Array.isArray(e.dataField)&&e.dataField.includes(n)?Object.assign(t,(0,e_._)({},n,r)):r}},{key:"addFormChangeForDataFields",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=this.formConfig.fields[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;if(Array.isArray(l.dataField)){if(eF()(l.dataField,e)){var o={},s=!0,c=!1,u=void 0;try{for(var d,f=l.dataField[Symbol.iterator]();!(s=(d=f.next()).done);s=!0){var h=d.value;e.includes(h)&&eO()(o,h,eP()(this.entity,h))}}catch(e){c=!0,u=e}finally{try{s||null==f.return||f.return()}finally{if(c)throw u}}this.addFormChange(l.dataField,o)}}else e.includes(l.dataField)&&this.addFormChange(l.dataField,eP()(this.entity,l.dataField))}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"addFormChange",value:function(e,t){this.nextUpdate||(this.nextUpdate={}),this.nextUpdate[e]||(this.nextUpdate[e]={}),this.nextUpdate[e]?Object.assign(this.nextUpdate[e],t):this.nextUpdate[e]=t}},{key:"setEntityValue",value:function(e,t){return(0,r._)(function(){return(0,a.YH)(this,function(n){return this.setEntityValueByFieldConfig(e,t),this.addFormChangeForDataFields([e.dataField]),[2]})}).call(this)}},{key:"getFormValue",value:function(e){var t=this.getFormValueByFieldConfig(e);if(t)return t}},{key:"create",value:function(e){return new e({})}}]),e}(),eV=function(){function e(){(0,O._)(this,e)}return(0,U._)(e,null,[{key:"createController",value:function(t){var n=t.endpoint,r=t.keycloak,i=t.entityType,a=t.formConfig,l=t.formValidator;return"application"===ej()(i)?e.createApplicationController({endpoint:n,keycloak:r,entityType:"application",formConfig:a,formValidator:l}):e.createGenericController({endpoint:n,keycloak:r,entityType:i,formConfig:a,formValidator:l})}},{key:"createApplicationController",value:function(e){return new eY({service:new eS.m({basePath:null==e?void 0:e.endpoint,keycloak:e.keycloak}),formValidator:null==e?void 0:e.formValidator,formConfig:null==e?void 0:e.formConfig})}},{key:"createGenericController",value:function(e){return new eY({service:new eC({basePath:null==e?void 0:e.endpoint,keycloak:e.keycloak}),formValidator:null==e?void 0:e.formValidator,formConfig:null==e?void 0:e.formConfig})}}]),e}(),eH=n(69182),eW=function e(){(0,O._)(this,e)};(0,e_._)(eW,"getTranslationFromConfig",function(e,t){var n=_.A.language,r="#i18n.";return v()(t)||v()(e)?{}:e&&e.startsWith(r)&&t[n]?(e=e.split(r)[1],t[n][e]):e});var eK=n(31035),eq=n(59053),eZ=n(4787),eJ=n(57486),e$=n(68738),eQ=n(88055),eX=n.n(eQ),e0=n(64116),e1=n(88026),e2=n(14678),e3=n.n(e2),e4=n(1882),e5=n.n(e4);let e8=function(e){var t=e.dateFormat,n=e.format,r=void 0===n?"text":n,i=e.formatFunction,a=e.numberOfDigits,o=e.suffix,s=(e.translationPrefix,e.value),c=e.valueKey,u=(0,e0._)(e,["dateFormat","format","formatFunction","numberOfDigits","suffix","translationPrefix","value","valueKey"]);if(e5()(i))return(0,l.jsx)(e1.A.Text,(0,eT._)((0,W._)({className:"displayfield"},u),{children:i(s)}));void 0!==c&&(s=eP()(s,c));var d=s;"date"===r&&s&&(d=ep()(s).format(void 0===t?"DD.MM.YYYY":t)),"json"!==r||ef()(s)||(d=JSON.stringify(s)),Array.isArray(d)&&(d=d.join(", "));var f=!v()(d)&&o?" ".concat(o):"";return e3()(s)?(0,l.jsx)(e1.A.Text,(0,eT._)((0,W._)({className:"displayfield"},u),{children:"".concat(new Intl.NumberFormat("de-DE").format(Number(s.toFixed(void 0===a?2:a)))).concat(f)})):(0,l.jsxs)(e1.A.Text,(0,eT._)((0,W._)({className:"displayfield"},u),{children:[d,f]}))};var e6=n(24850),e7=n(2543),e9=n(82042),te=n(8267),tt=n(25543);let tn=function e(t){var n=this;(0,O._)(this,e),(0,e_._)(this,"document",void 0),(0,e_._)(this,"getEntityDefinition",function(e){if(!v()(null==(r=n.document)||null==(t=r.components)?void 0:t.schemas)){var t,r,a,l,o,s=Object.entries(null!=(o=null==(l=n.document)||null==(a=l.components)?void 0:a.schemas)?o:{}).find(function(t){return(0,i._)(t,1)[0].toLowerCase()===e.toLowerCase()});return s?s[1]:void m().warn("The entity definition for ".concat(e," does not exist ")+"in the OpenAPI specification")}}),(0,e_._)(this,"getPropertyDefinition",function(e,t){var r=n.getEntityDefinition(e);if(r)return r.properties&&r.properties[t]?r.properties[t]:void m().warn("The property definition ".concat(t," for ").concat(e," ")+"does not exist in the OpenAPI specification")}),(0,e_._)(this,"getPropertyRefName",function(e,t){var r=n.getPropertyDefinition(e,t);if(!v()(r))return Object.hasOwn(r,"$ref")?n.getRefName(r):Object.hasOwn(r,"items")&&Object.hasOwn(r.items,"$ref")?n.getRefName(r.items):t}),(0,e_._)(this,"getPropertyType",function(e,t){var r=n.getPropertyDefinition(e,t);if(!v()(r))return Object.hasOwn(r,"type")?r.type:"object"}),(0,e_._)(this,"getJSONSchemaFromDocument",function(e,t,r){var i="http://shogun/shogun-schema-".concat(e.toLocaleLowerCase(),".json"),a=n.createDefinitions(),l=n.getPropertyType(t,r),o={$id:i,$schema:"http://json-schema.org/2020-12/schema#",definitions:a},s=void 0;return"object"!==l||v()(a)||(o=(0,W._)({},o,a[e]),s=(0,tt.validate)({},o)),"array"!==l||v()(a)||(o.items=a[e],o.type="array",s=(0,tt.validate)([],o)),!v()(s)&&(null==s?void 0:s.valid)||m().error("Invalid JSON schema detected: ",null==s?void 0:s.errors),o}),(0,e_._)(this,"createDefinitions",function(){var e,t,r,i,a={};if(!v()(null==(t=n.document)||null==(e=t.components)?void 0:e.schemas)){for(var l in null==(i=n.document)||null==(r=i.components)?void 0:r.schemas)if(!l.match(/^(.+)«(.+)»$/)){var o=eX()(n.document.components.schemas[l]);n.replaceRefs(o),n.applyDiscriminator(o),a[l]=o}return a}}),(0,e_._)(this,"getRefName",function(e){var t,n=null==(t=e.$ref)?void 0:t.split("/");return n[n.length-1]}),(0,e_._)(this,"replaceRefs",function(e){n.walkSchemaDefinition(e,function(e){Object.hasOwn(e,"$ref")&&n.replaceRef(e)})}),(0,e_._)(this,"replaceRef",function(e){e.$ref=n.replaceRefString(e.$ref)}),(0,e_._)(this,"replaceRefString",function(e){var t=e.split("/");return"#/definitions/".concat(t[t.length-1])}),(0,e_._)(this,"applyDiscriminator",function(e){var t,r=function(e){if(Object.hasOwn(e,"$ref")){var i=n.getEntityDefinition(n.getRefName(e));v()(i)?m().warn("Schema definition of ".concat(e," is not defined.")):n.walkSchemaDefinition(i,r)}else e.discriminator&&(t=e.discriminator)};n.walkSchemaDefinition(e,function(e){if(!Object.hasOwn(e,"$ref")&&Object.hasOwn(e,"oneOf")&&!v()(null==e?void 0:e.oneOf)){var a=[],l=!0,o=!1,s=void 0;try{for(var c,u=e.oneOf[Symbol.iterator]();!(l=(c=u.next()).done);l=!0){var d=c.value;if(n.walkSchemaDefinition(d,r),t){var f=t.propertyName,h=t.mapping;if(h){var p=!0,m=!1,g=void 0;try{for(var y,b=Object.entries(h)[Symbol.iterator]();!(p=(y=b.next()).done);p=!0){var x,j=(0,i._)(y.value,2),S=j[0],A=j[1],w={if:{properties:{},required:[]},then:{$ref:void 0}};w.if.properties[f]={},w.if.properties[f].const=S,v()(null==w||null==(x=w.if)?void 0:x.required)||w.if.required.push(f),w.then.$ref=n.replaceRefString(A),a.push(w)}}catch(e){m=!0,g=e}finally{try{p||null==b.return||b.return()}finally{if(m)throw g}}}}}}catch(e){o=!0,s=e}finally{try{l||null==u.return||u.return()}finally{if(o)throw s}}a.length>0&&(delete e.oneOf,e.allOf=a)}})}),(0,e_._)(this,"walkSchemaDefinition",function(e,t){if(t&&t(e),!Object.hasOwn(e,"$ref")){var r=e.type;if(e.properties){var i=!0,a=!1,l=void 0;try{for(var o,s=Object.values(e.properties)[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var c=o.value;n.walkSchemaDefinition(c,t)}}catch(e){a=!0,l=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw l}}}if(e.allOf){var u=!0,d=!1,f=void 0;try{for(var h,p=e.allOf[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var m=h.value;n.walkSchemaDefinition(m,t)}}catch(e){d=!0,f=e}finally{try{u||null==p.return||p.return()}finally{if(d)throw f}}}if(e.anyOf){var g=!0,v=!1,y=void 0;try{for(var b,x=e.anyOf[Symbol.iterator]();!(g=(b=x.next()).done);g=!0){var j=b.value;n.walkSchemaDefinition(j,t)}}catch(e){v=!0,y=e}finally{try{g||null==x.return||x.return()}finally{if(v)throw y}}}if(e.oneOf){var S=!0,A=!1,w=void 0;try{for(var C,_=e.oneOf[Symbol.iterator]();!(S=(C=_.next()).done);S=!0){var T=C.value;n.walkSchemaDefinition(T,t)}}catch(e){A=!0,w=e}finally{try{S||null==_.return||_.return()}finally{if(A)throw w}}}e.not&&n.walkSchemaDefinition(e.not,t),"array"===r&&n.walkSchemaDefinition(e.items,t)}}),this.document=t.document};var tr=n(30513);let ti=function(e){var t=e.value,n=e.feedbackDuration,s=void 0===n?3e3:n,c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,y.useTranslation)().t;return(0,l.jsx)(e6.A,{title:f("CopyToClipboardButton.tooltip"),children:(0,l.jsx)(et.Ay,{className:"copy-to-clipboard-btn",onClick:function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,(0,r._)(function(){var e;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(!t)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(t)];case 2:return n.sent(),d(!0),setTimeout(function(){d(!1)},s),[3,4];case 3:return e=n.sent(),ev.A.error("Could not copy text to clipboard: ",e),[3,4];case 4:return[2]}})})()];case 1:return e.sent(),[2]}})})()},icon:(0,l.jsx)(tr.A,{}),children:(0,l.jsx)("div",{className:u?"feedback-icon":"feedback-icon hidden",children:(0,l.jsx)("div",{className:u?"checkmark":"checkmark-hidden"})})})})};var ta=n(28069),tl=n(96458);let to=function(e){var t=e.children,n=(0,i._)((0,o.useState)(!1),2),r=n[0],a=n[1],s=(0,o.useRef)(null),c=(0,y.useTranslation)().t,u=(0,o.useCallback)(function(){var e=document.querySelector(".content"),t=document.querySelector(".content .left-container"),n=s.current;if(n)if(e&&t&&r){var i=e.getBoundingClientRect(),a=t.getBoundingClientRect();n.style.left="".concat(i.left+2,"px"),n.style.top="".concat(a.top,"px"),n.style.width="".concat(i.width-6,"px"),n.style.height="".concat(a.height-4,"px")}else n.style.left="",n.style.top="",n.style.width="",n.style.height="20em"},[r]),d=(0,o.useCallback)(function(){u()},[u]);(0,o.useEffect)(function(){var e=document.querySelector(".content .left-container");if(e){var t=new ResizeObserver(d);return t.observe(e),function(){t.disconnect()}}},[d]),(0,o.useEffect)(function(){u()},[u]);var f=function(){a(!r)};(0,em.vC)("esc",function(){f()},{enabled:r,enableOnFormTags:["INPUT","TEXTAREA","SELECT"]},[r]);var h="fs-wrapper".concat(r?" fullscreen":"");return(0,l.jsxs)("div",{className:h,ref:s,children:[(0,l.jsx)(e6.A,{title:c(r?"FullscreenWrapper.leaveFullscreen":"FullscreenWrapper.fullscreen"),placement:"left",mouseEnterDelay:1,mouseLeaveDelay:0,children:(0,l.jsx)(et.Ay,{icon:r?(0,l.jsx)(ta.A,{}):(0,l.jsx)(tl.A,{}),size:"small",onClick:f})}),t]})};c.wG.config({monaco:e9});let ts=function(e){var t,n=e.initialValue,u=e.onChange,d=e.editorProps,f=e.entityType,h=e.dataField,p=e.indentSize,g=void 0===p?2:p,b=(0,i._)((0,o.useState)(JSON.stringify(n||void 0,null,g)),2),x=b[0],j=b[1],A=(0,i._)((0,o.useState)(!1),2),w=A[0],C=A[1],_=M(function(e){return e.openApiDocs}),T=M(function(e){return e.jsonEditor.originalEditorValues}),k=M(function(e){return e.jsonEditor.isEditedManuallyMap}),E=null==T?void 0:T["".concat(f,".").concat(h)],P=null==(t=S().entityHistory)?void 0:t.enabled,N=(0,y.useTranslation)().t,F=(0,c.dJ)(),L=D();void 0===E&&x&&L((0,te.$4)((0,W._)((0,e_._)({},"".concat(f,".").concat(h),x),T)));var I=(0,o.useRef)(null),R=(0,o.useRef)(null),G=(0,o.useMemo)(function(){return{lineHeight:20,scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,tabSize:g}},[g]),B=(0,o.useMemo)(function(){return new tn({document:_})},[_]),O=(0,o.useCallback)(function(){if(F){var e,t=B.getPropertyRefName(f,h);if(!v()(t)){var n=B.getJSONSchemaFromDocument(t,f,h);if(!v()(F.languages.json.jsonDefaults.diagnosticsOptions.schemas)){var r=(0,ek._)(eX()(F.languages.json.jsonDefaults.diagnosticsOptions.schemas)).concat([{uri:null!=(e=n.$id)?e:(0,e7.uniqueId)("json-schema-id"),fileMatch:["".concat(t,".json")],schema:n}]);F.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,validate:!0,trailingCommas:"error",schemaValidation:"error",comments:"error",schemas:r})}}}},[F,h,f,B]);(0,o.useEffect)(function(){O()},[O]);var U=s().useMemo(function(){return x===E},[x,E]),z=(0,o.useCallback)(function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:if(!R.current||!(e=R.current.getAction("editor.action.formatDocument")))return[2];return[4,e.run()];case 1:return t.sent(),[2]}})})()},[]),Y=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return I.current=e,[4,z()];case 1:return t.sent(),C(!0),[2]}})})()},[z]),V=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return R.current=e,[4,z()];case 1:return t.sent(),C(!0),[2]}})})()},[z]),H=null==k?void 0:k["".concat(f,".").concat(h)];return(0,l.jsx)(to,{children:(0,l.jsxs)("div",{className:"json-editor",children:[(0,l.jsxs)("div",{className:"json-editor-toolbar",children:[(0,l.jsx)(e6.A,{title:N("JSONEditor.formatDocumentTooltip"),children:(0,l.jsx)(et.Ay,{onClick:function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,z()];case 1:return e.sent(),[2]}})})()},icon:(0,l.jsx)(Q.A,{})})}),(0,l.jsx)(ti,{value:x})]}),U||!P||H?(0,l.jsx)(c.KE,(0,W._)({onMount:V,value:x,onChange:function(e){if(L((0,te.$Y)((0,W._)((0,e_._)({},"".concat(f,".").concat(h),!0),k))),j(e),w){if(v()(e)){null==u||u();return}try{var t=JSON.parse(e);null==u||u(t)}catch(t){0===e.length&&(null==u||u()),m().trace("JSON-Editor: ",t)}}},path:B.getPropertyRefName(f,h)?"".concat(B.getPropertyRefName(f,h),".json"):void 0,language:"json",options:G},d)):(0,l.jsx)(c.zC,{onMount:Y,original:E,modified:x,language:"json",keepCurrentOriginalModel:!0,keepCurrentModifiedModel:!0,options:{originalEditable:!1,readOnly:!0,renderSideBySide:!1}})]})})};var tc=n(54593),tu=function(e){return(null==e?void 0:e.name)!=="fullscreen"&&e};let td=function(e){var t=e.value,n=e.onChange,r=void 0===n?function(){}:n,a=(0,i._)(s().useState(),2),c=a[0],u=a[1];return(0,o.useEffect)(function(){u(t)},[t]),(0,l.jsx)(to,{children:(0,l.jsx)(tc.Ay,{value:c,commandsFilter:tu,onChange:function(e){u(e),r(e)},highlightEnable:!1})})};var tf=n(20736),th=n(59499),tp=n(73133),tm=n(45812),tg=n(68940),tv=n(71500),ty=n(38017),tb=n(24464),tx=n(62440);let tj=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,y.useTranslation)().t;return(0,l.jsx)(C.A,(0,W._)({placeholder:n("PermissionSelect.placeholder"),options:[{label:n("PermissionSelect.readLabel"),value:"READ"},{label:n("PermissionSelect.readUpdateLabel"),value:"READ_UPDATE"},{label:n("PermissionSelect.readUpdateDeleteLabel"),value:"READ_UPDATE_DELETE"},{label:n("PermissionSelect.adminLabel"),value:"ADMIN"}]},t))},tS=function(e){var t=e.entityId,n=e.setInstancePermission,s=e.getReferences,c=e.toTag,u=e.tagRenderer,d=e.onSave,f=void 0===d?function(){}:d,h=e.descriptionText,p=e.referenceLabelText,g=e.referenceExtraText,v=e.referenceSelectPlaceholderText,b=e.permissionSelectLabel,x=e.permissionSelectExtra,j=e.saveErrorMsg,S=void 0===j?function(){return""}:j,A=(0,e0._)(e,["entityId","setInstancePermission","getReferences","toTag","tagRenderer","onSave","descriptionText","referenceLabelText","referenceExtraText","referenceSelectPlaceholderText","permissionSelectLabel","permissionSelectExtra","saveErrorMsg"]),w=(0,i._)((0,o.useState)(!1),2),_=w[0],T=w[1],k=(0,i._)((0,o.useState)(!1),2),E=k[0],P=k[1],N=(0,i._)((0,o.useState)(!1),2),F=N[0],L=N[1],I=(0,i._)((0,o.useState)([]),2),D=I[0],M=I[1],R=(0,i._)((0,o.useState)(),2),G=R[0],B=R[1],O=(0,i._)((0,o.useState)(!1),2),U=O[0],z=O[1],Y=(0,i._)((0,o.useState)(1),2),V=Y[0],H=Y[1],K=(0,i._)((0,o.useState)(),2),q=K[0],Z=K[1],J=(0,y.useTranslation)().t,$=(0,i._)(es.A.useForm(),1)[0],Q=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(!s)return[2];T(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,s({page:V-1,size:20})];case 2:if(!(e=n.sent()))throw Error("Failed to load references");return Z(e.totalElements),M(e.content),[3,5];case 3:return t=n.sent(),ee.Ay.error(J("PermissionModal.loadErrorMsg")),m().error(t),[3,5];case 4:return T(!1),[7];case 5:return[2]}})})()},[s,J,V]);(0,o.useEffect)(function(){F&&Q()},[F,Q]),(0,o.useEffect)(function(){Array.isArray(D)&&B(D.map(c))},[D,c]);var X=(0,o.useCallback)(function(e){return(0,l.jsxs)("div",{className:"permission-modal-reference-dropdown",children:[e,(0,l.jsx)(tv.A,{}),(0,l.jsx)(ty.A,{total:q,showTotal:function(e){return"".concat(J("PermissionModal.paginationTotal"),": ").concat(e)},locale:{next_page:J("PermissionModal.paginationNextPage"),prev_page:J("PermissionModal.paginationPrevPage")},onChange:function(e){H(e)},current:V,pageSize:20,size:"small"})]})},[V,q,J]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e6.A,{title:J("PermissionModal.openModalButtonTooltipTitle"),children:(0,l.jsx)(et.Ay,{type:"primary",onClick:function(){z(!U)},icon:(0,l.jsx)(tg.A,{})})}),(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"permission-modal",title:J("PermissionModal.title"),open:U,onCancel:function(){$.resetFields(),z(!1)},onOk:function(){return(0,r._)(function(){var e,r,i,l,o,s,c,u,d,h,p,g,v;return(0,a.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,$.validateFields()];case 1:return a.sent(),[3,3];case 2:return e=a.sent(),ev.A.error("Could not validate fields to the following error: ".concat(e)),[2];case 3:i=(r=$.getFieldsValue()).referenceIds,l=r.permission,o=[],P(!0),s=!0,c=!1,u=void 0,a.label=4;case 4:a.trys.push([4,11,12,13]),d=i[Symbol.iterator](),a.label=5;case 5:if(s=(h=d.next()).done)return[3,10];p=h.value,a.label=6;case 6:return a.trys.push([6,8,,9]),[4,n(t,p,l)];case 7:return a.sent(),[3,9];case 8:return g=a.sent(),o.push(p),m().error(g),[3,9];case 9:return s=!0,[3,5];case 10:return[3,13];case 11:return v=a.sent(),c=!0,u=v,[3,13];case 12:try{s||null==d.return||d.return()}finally{if(c)throw u}return[7];case 13:return o.length>0&&ee.Ay.error(S(o.join(", "))),$.resetFields(),P(!1),z(!1),f(),[2]}})})()},okButtonProps:{loading:E},width:800},A),{children:[(0,l.jsx)("div",{className:"description",children:void 0===h?"":h}),(0,l.jsxs)(es.A,{form:$,layout:"vertical",requiredMark:!1,children:[(0,l.jsx)(es.A.Item,{name:"referenceIds",label:void 0===p?"":p,extra:void 0===g?"":g,rules:[{required:!0}],children:(0,l.jsx)(C.A,{autoFocus:!0,mode:"multiple",allowClear:!0,optionFilterProp:"filterValues",placeholder:void 0===v?"":v,open:F,loading:_,onDropdownVisibleChange:function(){L(!F)},options:G,tagRender:u,dropdownRender:X})}),(0,l.jsx)(es.A.Item,{name:"permission",label:void 0===b?"":b,extra:void 0===x?"":x,rules:[{required:!0}],children:(0,l.jsx)(tj,{})})]})]}))]})},tA=function(e){var t=e.entityId,n=e.getInstancePermissions,s=e.setInstancePermission,c=e.deleteInstancePermission,u=e.toDataType,d=e.modalProps,f=e.nameColumnDefinition,h=(0,e0._)(e,["entityId","getInstancePermissions","setInstancePermission","deleteInstancePermission","toDataType","modalProps","nameColumnDefinition"]),p=(0,i._)((0,o.useState)(!1),2),g=p[0],b=p[1],x=(0,i._)((0,o.useState)([]),2),j=x[0],S=x[1],A=(0,i._)((0,o.useState)([]),2),w=A[0],C=A[1],_=(0,o.useRef)(null),T=(0,y.useTranslation)().t,k=G(),E=(0,o.useCallback)(function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(b(!0),!Number.isFinite(t))return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,n(t)];case 2:return S.apply(void 0,[r.sent()]),[3,5];case 3:return e=r.sent(),ee.Ay.error(T("InstancePermissionGrid.loadErrorMsg")),m().error(e),[3,5];case 4:return b(!1),[7];case 5:return[2]}})})()},[t,n,T]);(0,o.useEffect)(function(){E()},[E]),(0,o.useEffect)(function(){k&&Array.isArray(j)&&C(j.map(u))},[k,j,u]);var P=[(0,W._)({},{title:T("InstancePermissionGrid.nameColumnTitle"),dataIndex:"name",key:"name",defaultSortOrder:"ascend"},{filterDropdown:function(e){var t=e.setSelectedKeys,n=e.selectedKeys,r=e.confirm,i=e.clearFilters;return(0,l.jsxs)("div",{className:"column-search",children:[(0,l.jsx)(eK.A,{ref:_,placeholder:T("InstancePermissionGrid.filterInputPlaceholder"),value:n[0],onChange:function(e){return t(e.target.value?[e.target.value]:[])},onPressEnter:function(){return r()}}),(0,l.jsxs)(tp.A,{children:[(0,l.jsx)(et.Ay,{type:"primary",onClick:function(){return r()},icon:(0,l.jsx)(tf.A,{}),size:"small",children:T("InstancePermissionGrid.filterSearchButtonText")}),(0,l.jsx)(et.Ay,{onClick:function(){e5()(i)&&i(),r()},size:"small",children:T("InstancePermissionGrid.filterResetButtonText")})]})]})},filterIcon:function(e){return(0,l.jsx)(tf.A,{style:{color:e?"#1890ff":void 0}})},onFilter:function(e,t){var n=eP()(t,"name");return!v()(n)&&n.toLowerCase().includes(e.toLowerCase())},filterDropdownProps:{onOpenChange:function(e){e&&setTimeout(function(){var e;return null==(e=_.current)?void 0:e.select()},100)}}},f),{title:T("InstancePermissionGrid.permissionColumnTitle"),dataIndex:"permission",key:"permission",sorter:function(e,t){var n=e.name,r=t.name;return n&&r?null==r?void 0:r.localeCompare(n):0},render:function(e,n){return(0,l.jsx)(tj,{value:n.permission,onSelect:function(e){(0,r._)(function(){var r,i,l;return(0,a.YH)(this,function(a){if(b(!0),!(null==(r=n.reference)?void 0:r.id))return[2];try{s(t,n.reference.id,e),(l=(i=eX()(w)).find(function(e){var t,r;return(null==(t=e.reference)?void 0:t.id)===(null==(r=n.reference)?void 0:r.id)}))&&(l.permission=e),C(i)}catch(e){ee.Ay.error(T("InstancePermissionGrid.updateErrorMsg")),m().error(e)}finally{b(!1)}return[2]})})()}})}},{title:(0,l.jsx)(tS,(0,W._)({entityId:t,onSave:E},d)),key:"operation",className:"operation-column",width:100,fixed:"right",render:function(e,n){return(0,l.jsx)(e6.A,{title:T("InstancePermissionGrid.deletePermissionButtonTooltip"),children:(0,l.jsx)(th.A,{onClick:function(){return(0,r._)(function(){var e,r;return(0,a.YH)(this,function(i){if(b(!0),!(null==(e=n.reference)?void 0:e.id))return[2];try{c(t,n.reference.id),r=w.filter(function(e){var t,r;return(null==(t=e.reference)?void 0:t.id)!==(null==(r=n.reference)?void 0:r.id)}),C(r)}catch(e){ee.Ay.error(T("InstancePermissionGrid.deleteErrorMsg")),m().error(e)}finally{b(!1)}return[2]})})()}})})}}];return(0,l.jsx)(tm.A,(0,W._)({className:"instance-permission-grid",loading:g,columns:P,dataSource:w,size:"small"},h))},tw=function(e){var t=e.entityType,n=(0,e0._)(e,["entityType"]),i=(0,y.useTranslation)().t,s=G(),c=(0,o.useCallback)(function(){return null==s?void 0:s[t].apply(s)},[s,t]),u=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=c())?void 0:t.getGroupInstancePermissions(e)];case 1:return[2,n.sent()]}})})()},[c]),d=(0,o.useCallback)(function(e,t,n){return(0,r._)(function(){var r;return(0,a.YH)(this,function(i){switch(i.label){case 0:return[4,null==(r=c())?void 0:r.setGroupInstancePermission(e,t,n)];case 1:return i.sent(),[2]}})})()},[c]),f=(0,o.useCallback)(function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return[4,null==(n=c())?void 0:n.deleteGroupInstancePermission(e,t)];case 1:return r.sent(),[2]}})})()},[c]),h=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return[4,null==s?void 0:s.group().findAll(e)];case 1:return[2,t.sent()]}})})()},[s]),p=(0,o.useMemo)(function(){return{toTag:function(e){var t,n;return{value:e.id,filterValues:[e.id,e.authProviderId,null==(t=e.providerDetails)?void 0:t.name],label:(0,l.jsx)("span",{children:(null==(n=e.providerDetails)?void 0:n.name)||"ID: ".concat(e.id)})}},getReferences:h,setInstancePermission:d,descriptionText:i("GroupPermissionGrid.modal.description"),referenceLabelText:i("GroupPermissionGrid.modal.referenceSelectLabel"),referenceExtraText:i("GroupPermissionGrid.modal.referenceSelectExtra"),referenceSelectPlaceholderText:i("GroupPermissionGrid.modal.referenceSelectPlaceholder"),permissionSelectLabel:i("GroupPermissionGrid.modal.permissionSelectLabel"),permissionSelectExtra:i("GroupPermissionGrid.modal.permissionSelectExtra"),saveErrorMsg:function(e){return i("GroupPermissionGrid.modal.saveErrorMsg",{referenceIds:e})}}},[h,d,i]);return(0,l.jsx)(tA,(0,W._)({entityType:t,getInstancePermissions:u,setInstancePermission:d,deleteInstancePermission:f,toDataType:function(e){var t,n,r,i;return{key:null==(t=e.group)?void 0:t.id,reference:e.group,name:null==(r=e.group)||null==(n=r.providerDetails)?void 0:n.name,permission:null==(i=e.permission)?void 0:i.name}},nameColumnDefinition:{sorter:function(e,t){var n,r,i,a,l=null==(r=e.reference)||null==(n=r.providerDetails)?void 0:n.name,o=null==(a=t.reference)||null==(i=a.providerDetails)?void 0:i.name;return l&&o?o.localeCompare(l):0}},modalProps:p},n))},tC=function(e){var t=e.entityType,n=(0,e0._)(e,["entityType"]),i=(0,y.useTranslation)().t,s=G(),c=(0,o.useCallback)(function(){return null==s?void 0:s[t].apply(s)},[s,t]),u=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=c())?void 0:t.getRoleInstancePermissions(e)];case 1:return[2,n.sent()]}})})()},[c]),d=(0,o.useCallback)(function(e,t,n){return(0,r._)(function(){var r;return(0,a.YH)(this,function(i){switch(i.label){case 0:return[4,null==(r=c())?void 0:r.setRoleInstancePermission(e,t,n)];case 1:return i.sent(),[2]}})})()},[c]),f=(0,o.useCallback)(function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return[4,null==(n=c())?void 0:n.deleteRoleInstancePermission(e,t)];case 1:return r.sent(),[2]}})})()},[c]),h=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return[4,null==s?void 0:s.role().findAll(e)];case 1:return[2,t.sent()]}})})()},[s]),p=(0,o.useMemo)(function(){return{toTag:function(e){var t,n;return{value:e.id,filterValues:[null==(t=e.providerDetails)?void 0:t.name],label:(0,l.jsx)("span",{children:(null==(n=e.providerDetails)?void 0:n.name)||"ID: ".concat(e.id)})}},getReferences:h,setInstancePermission:d,descriptionText:i("RolePermissionGrid.modal.description"),referenceLabelText:i("RolePermissionGrid.modal.referenceSelectLabel"),referenceExtraText:i("RolePermissionGrid.modal.referenceSelectExtra"),referenceSelectPlaceholderText:i("RolePermissionGrid.modal.referenceSelectPlaceholder"),permissionSelectLabel:i("RolePermissionGrid.modal.permissionSelectLabel"),permissionSelectExtra:i("RolePermissionGrid.modal.permissionSelectExtra"),saveErrorMsg:function(e){return i("RolePermissionGrid.modal.saveErrorMsg",{referenceIds:e})}}},[h,d,i]);return(0,l.jsx)(tA,(0,W._)({entityType:t,getInstancePermissions:u,setInstancePermission:d,deleteInstancePermission:f,toDataType:function(e){var t,n,r,i;return{key:null==(t=e.role)?void 0:t.id,reference:e.role,name:null==(r=e.role)||null==(n=r.providerDetails)?void 0:n.name,permission:null==(i=e.permission)?void 0:i.name}},nameColumnDefinition:{sorter:function(e,t){var n,r,i,a,l=null==(r=e.reference)||null==(n=r.providerDetails)?void 0:n.name,o=null==(a=t.reference)||null==(i=a.providerDetails)?void 0:i.name;return l&&o?l.localeCompare(o):0}},modalProps:p},n))};var t_=n(85196);let tT=function(e){var t,n,r,i,a=e.user,o=(0,e0._)(e,["user"]),s=Y.getGravatarUrl({email:(null==(t=a.providerDetails)?void 0:t.email)||"",size:30});return(0,l.jsxs)("div",{className:"user-avatar",children:[(0,l.jsx)(L.A,(0,W._)({src:s,size:"default",className:"user-avatar-image"},o)),(0,l.jsxs)("div",{className:"user-avatar-name",children:[(0,l.jsx)("span",{children:"".concat(null==(n=a.providerDetails)?void 0:n.firstName," ").concat(null==(r=a.providerDetails)?void 0:r.lastName)}),(0,l.jsx)("span",{children:null==(i=a.providerDetails)?void 0:i.username})]})]})},tk=function(e){var t=e.entityType,n=(0,e0._)(e,["entityType"]),i=(0,y.useTranslation)().t,s=G(),c=(0,o.useCallback)(function(){return null==s?void 0:s[t].apply(s)},[s,t]),u=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=c())?void 0:t.getUserInstancePermissions(e)];case 1:return[2,n.sent()]}})})()},[c]),d=(0,o.useCallback)(function(e,t,n){return(0,r._)(function(){var r;return(0,a.YH)(this,function(i){switch(i.label){case 0:return[4,null==(r=c())?void 0:r.setUserInstancePermission(e,t,n)];case 1:return i.sent(),[2]}})})()},[c]),f=(0,o.useCallback)(function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return[4,null==(n=c())?void 0:n.deleteUserInstancePermission(e,t)];case 1:return r.sent(),[2]}})})()},[c]),h=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){return[2,null==s?void 0:s.user().findAll(e)]})})()},[s]),p=(0,o.useMemo)(function(){return{toTag:function(e){var t,n,r,i;return{value:e.id,filterValues:[null==(t=e.providerDetails)?void 0:t.firstName,null==(n=e.providerDetails)?void 0:n.lastName,null==(r=e.providerDetails)?void 0:r.username,null==(i=e.providerDetails)?void 0:i.email],label:(0,l.jsx)(tT,{user:e})}},getReferences:h,tagRenderer:function(e){var t=e.label,n=(0,e0._)(e,["label"]);return(0,l.jsx)(t_.A,(0,eT._)((0,W._)({onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},className:"user-avatar-tag",bordered:!1},n),{children:t}))},setInstancePermission:d,descriptionText:i("UserPermissionGrid.modal.description"),referenceLabelText:i("UserPermissionGrid.modal.referenceSelectLabel"),referenceExtraText:i("UserPermissionGrid.modal.referenceSelectExtra"),referenceSelectPlaceholderText:i("UserPermissionGrid.modal.referenceSelectPlaceholder"),permissionSelectLabel:i("UserPermissionGrid.modal.permissionSelectLabel"),permissionSelectExtra:i("UserPermissionGrid.modal.permissionSelectExtra"),saveErrorMsg:function(e){return i("UserPermissionGrid.modal.saveErrorMsg",{referenceIds:e})}}},[h,d,i]);return(0,l.jsx)(tA,(0,W._)({entityType:t,getInstancePermissions:u,setInstancePermission:d,deleteInstancePermission:f,toDataType:function(e){var t,n,r,i;return{key:null==(t=e.user)?void 0:t.id,reference:e.user,name:null==(r=e.user)||null==(n=r.providerDetails)?void 0:n.username,permission:null==(i=e.permission)?void 0:i.name}},nameColumnDefinition:{sorter:function(e,t){var n,r,i,a,l=null==(r=e.reference)||null==(n=r.providerDetails)?void 0:n.username,o=null==(a=t.reference)||null==(i=a.providerDetails)?void 0:i.username;return l&&o?l.localeCompare(o):0},render:function(e,t){return(0,l.jsx)(tT,{user:t.reference})}},modalProps:p},n))};var tE=n(69739),tP=n(96791);let tN=function(e){var t=e.showIcons,n=void 0===t||t,r=e.value,i=(0,y.useTranslation)().t;return r?(0,l.jsxs)("div",{className:"yes-no-field",children:[(0,l.jsx)("span",{className:"yn-text",children:i("YesOrNoField.yes")}),n&&(0,l.jsx)(tE.default,{})]}):(0,l.jsxs)("div",{className:"yes-no-field",children:[(0,l.jsx)("span",{className:"yn-text",children:i("YesOrNoField.no")}),n&&(0,l.jsx)(tP.default,{})]})},tF=function(e){var t=e.supportedTypes,n=void 0===t?["TILEWMS","VECTORTILE","WFS","WMS","WMSTIME","WMTS","XYZ"]:t,r=e.value,a=e.onChange,s=void 0===a?function(){}:a,c=(0,e0._)(e,["supportedTypes","value","onChange"]),u=(0,i._)((0,o.useState)(r),2),d=u[0],f=u[1];return(0,o.useEffect)(function(){f(r)},[r]),(0,l.jsx)(C.A,(0,W._)({defaultValue:d,value:d,options:function(){var e=[],t=!0,r=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){var o=a.value;e.push({label:o,value:o})}}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}return e}(),onChange:function(e){f(e),s(e)}},c))};var tL=eK.A.TextArea;let tI=function(e){var t,n=e.loading,r=e.i18n,i=e.entityId,a=e.formProps,s=e.form,c=e.formConfig,u=(0,o.useContext)(ey),d=(0,y.useTranslation)().t,f=function(e){if(!e.component)return m().warn('FieldConfig for field "'.concat(e.dataField,'" is missing the "component" ')+"property, applying default DisplayField."),(0,l.jsx)(e8,(0,W._)({},e.fieldProps));switch(e.component){case"Switch":return(0,l.jsx)(tN,{});case"Statistic":return p(e);case"DateField":return(0,l.jsx)(e8,(0,W._)({format:"date"},e.fieldProps));default:return(0,l.jsx)(e8,(0,W._)({},e.fieldProps))}},p=function(e){var t,n,r;if(!(null==e?void 0:e.component))return m().error("FieldConfig is missing `component` property."),null;switch(null==e?void 0:e.component){case"TextArea":return(0,l.jsx)(tL,(0,W._)({},null==e?void 0:e.fieldProps));case"Input":return(0,l.jsx)(eK.A,(0,W._)({},null==e?void 0:e.fieldProps));case"Number":return(0,l.jsx)(eq.A,(0,W._)({},null==e?void 0:e.fieldProps));case"Switch":return(0,l.jsx)(eZ.A,(0,W._)({checkedChildren:"On",unCheckedChildren:"Off"},null==e?void 0:e.fieldProps));case"Select":return(0,l.jsx)(C.A,(0,W._)({},null==e?void 0:e.fieldProps));case"LayerTypeSelect":return(0,l.jsx)(tF,(0,W._)({},null==e?void 0:e.fieldProps));case"MarkdownEditor":return(0,l.jsx)(td,(0,W._)({},null==e?void 0:e.fieldProps));case"Statistic":return(0,l.jsx)(eJ.A,(0,W._)({},null==e?void 0:e.fieldProps));case"JSONEditor":return(0,l.jsx)(ts,(0,W._)({entityType:(null==u?void 0:u.entityType)||"",dataField:e.dataField},null==e?void 0:e.fieldProps));case"DisplayField":return(0,l.jsx)(e8,(0,W._)({},null==e?void 0:e.fieldProps));case"DateField":return(0,l.jsx)(e$.A,(0,W._)({format:"DD.MM.YYYY"},null==e?void 0:e.fieldProps));case"UserPermissionGrid":if(i!==s.getFieldValue("id"))return d("GeneralEntityForm.userPermissionGridNoIdWarning");return(0,l.jsx)(tk,(0,W._)({entityId:s.getFieldValue("id"),entityType:null==u||null==(t=u.entityType)?void 0:t.toLowerCase()},null==e?void 0:e.fieldProps));case"GroupPermissionGrid":if(i!==s.getFieldValue("id"))return d("GeneralEntityForm.groupPermissionGridNoIdWarning");return(0,l.jsx)(tw,(0,W._)({entityId:s.getFieldValue("id"),entityType:null==u||null==(n=u.entityType)?void 0:n.toLowerCase()},null==e?void 0:e.fieldProps));case"RolePermissionGrid":if(i!==s.getFieldValue("id"))return d("GeneralEntityForm.rolePermissionGridNoIdWarning");return(0,l.jsx)(tC,(0,W._)({entityId:s.getFieldValue("id"),entityType:null==u||null==(r=u.entityType)?void 0:r.toLowerCase()},null==e?void 0:e.fieldProps));default:return m().error('Cannot create component of type "'.concat(null==e?void 0:e.component,'" with name "').concat(null==e?void 0:e.dataField,'"')),null}},g=eW.getTranslationFromConfig(null==u?void 0:u.entityName,r);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.z,{title:g}),(0,l.jsx)(h.A,{spinning:void 0!==n&&n,children:(0,l.jsx)(es.A,(0,eT._)((0,W._)({className:"general-entity-form",form:s,initialValues:{},labelCol:{span:5},wrapperCol:{span:20},name:null==c?void 0:c.name},a),{children:null==(t=c.fields)?void 0:t.map(function(e){var t,n=eX()(e);(n.label=eW.getTranslationFromConfig(e.label,r),n.readOnly)?t=f(n):n.component?t=p(n):n.dataType?t=(0,l.jsx)(eK.A,(0,W._)({},null==n?void 0:n.fieldProps)):(m().warn("FieldConfig is missing `readOnly`, `component` or `dataType` property."),t=(0,l.jsx)(eK.A,{placeholder:""},null==n?void 0:n.dataField));var i={rules:[]};i.rules=[{required:n.required}],"Switch"===n.component&&(i.valuePropName="checked");var a=n.component,o=n.dataField,c="".concat(null==u?void 0:u.entityType,"-").concat(s.getFieldValue("id"),"-").concat(o||(null==a?void 0:a.toLocaleLowerCase()));return"JSONEditor"===n.component&&(i.valuePropName="initialValue"),(0,l.jsx)(es.A.Item,(0,eT._)((0,W._)({name:o,className:"cls-".concat(o),normalize:n.component?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(e)&&Array.isArray(t)&&e.indexOf("")>=0&&0>t.indexOf("")?[""]:e}:void 0,label:n.label||"Field: ".concat(n.dataField)},i,n.formItemProps),{children:t}),c)})}))})]})};var tD=n(84795),tM=function(){function e(){(0,O._)(this,e)}return(0,U._)(e,null,[{key:"getColumnSearchProps",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.handleSearch,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.handleReset;return{filterDropdown:function(e){var a=e.setSelectedKeys,o=e.selectedKeys,s=e.confirm,c=e.clearFilters;return(0,l.jsxs)("div",{style:{padding:"8px",display:"flex",flexDirection:"column",alignItems:"stretch"},children:[(0,l.jsx)(eK.A,{ref:function(e){n=e},placeholder:"".concat(_.A.t("GeneralEntityTable.popupSearch")," ").concat(t),value:0===o.length||v()(o[0])?"":"".concat(o[0]),onChange:function(e){return a(e.target.value?[e.target.value]:[])},onPressEnter:function(){return r(o,s)},style:{flex:1,marginBottom:8}}),(0,l.jsxs)("div",{style:{display:"flex"},children:[(0,l.jsx)(et.Ay,{type:"primary",onClick:function(){return r(o,s)},icon:(0,l.jsx)(tf.A,{}),size:"small",style:{flex:1,marginRight:8},children:"".concat(_.A.t("GeneralEntityTable.popupFilter"))}),(0,l.jsx)(et.Ay,{onClick:function(){i(c),r(o,s)},size:"small",style:{flex:1},children:"".concat(_.A.t("GeneralEntityTable.popupReset"))})]})]})},filterIcon:function(e){return(0,l.jsx)(tf.A,{style:{color:e?"#1890ff":void 0}})},onFilter:function(e,n){var r,i;return Array.isArray(t)?(t.forEach(function(e,t){return i=0===t?eP()(n,e):eP()(i,e)}),r=i):r=eP()(n,t.split(",")),"".concat(r).toLowerCase().includes("".concat(e).toLowerCase())},filterDropdownProps:{onOpenChange:function(e){e&&setTimeout(function(){return null==n?void 0:n.select()})}}}}},{key:"getSorter",value:function(e){return function(t,n){var r,i,a=null==(r=eP()(t,e))?void 0:r.toString(),l=null==(i=eP()(n,e))?void 0:i.toString();return null==a?void 0:a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"})}}}]),e}();(0,e_._)(tM,"handleSearch",function(e,t){e5()(t)&&t()}),(0,e_._)(tM,"handleReset",function(e){e5()(e)&&e()});var tR=n(4413);let tG=function(e){var t=e.i18n,n=e.value,r=e.template,i=void 0===r?"{}":r,a=e.title,o=void 0===a?"":a,s=(0,e0._)(e,["i18n","value","template","title"]),c=(0,y.useTranslation)().t;return(0,l.jsx)(e6.A,(0,eT._)((0,W._)({title:o?eW.getTranslationFromConfig(o,t):c("LinkField.title")},s),{children:(0,l.jsx)("div",{className:"link-wrapper",children:(0,l.jsx)(tR.A,{onClick:function(){var e=i.replace(/{}/g,n);window.open(e,"_blank")}})})}))};var tB=n(59452);let tO=function(e){var t=e.record,n=e.value,r=e.i18n,i=e.title,a=(0,e0._)(e,["record","value","i18n","title"]),o=(0,y.useTranslation)().t;return t.providerDetails?(0,l.jsx)(l.Fragment,{children:n}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(l.Fragment,{children:n}),(0,l.jsx)(e6.A,(0,eT._)((0,W._)({title:i?eW.getTranslationFromConfig(i,r):o("VerifyProviderDetailsField.title")},a),{children:(0,l.jsx)(tB.A,{className:"provider-details-warning"})}))]})};var tU=n(89035),tz=n(99142),tY=n(94718),tV=n(40883),tH=n.n(tV),tW=n(42863),tK=n.n(tW),tq=n(58269),tZ=n.n(tq),tJ=n(71347),t$=n(63731),tQ=n.n(t$),tX=n(88473),t0=n.n(tX),t1=n(52627),t2=n.n(t1),t3=n(66171),t4=n.n(t3),t5=n(58579),t8=n.n(t5),t6=n(14759),t7=n.n(t6),t9=n(67335),ne=n.n(t9),nt=n(68319),nn=n(72387);let nr=function(e){var t=e.map,n=e.mapDivId,r=e.onRender,i=void 0===r?function(){}:r,a=(0,e0._)(e,["map","mapDivId","onRender"]),s=(0,o.useCallback)(function(e){t&&(null===e?t.setTarget(void 0):t.setTarget(e),i())},[t,i]);return t?(0,l.jsx)("div",(0,W._)({id:void 0===n?"map":n,ref:s,className:"map",role:"presentation"},a)):(0,l.jsx)(l.Fragment,{})},ni=function(e){var t=e.layer,n=(0,e0._)(e,["layer"]),s=(0,i._)((0,o.useState)(!1),2),c=s[0],u=s[1],d=(0,i._)((0,o.useState)(),2),f=d[0],p=d[1],g=(0,i._)((0,o.useState)(),2),b=g[0],x=g[1],j=(0,i._)((0,o.useState)(),2),S=j[0],A=j[1],w=(0,i._)((0,o.useState)(!1),2),C=w[0],_=w[1],T=(0,y.useTranslation)().t,k=G(),E=(0,o.useMemo)(function(){return new nn.A({client:k})},[k]),P=(0,o.useMemo)(function(){return new(tZ())({layers:[new(tK())({source:new(t2())})],target:"",view:new(ne())({center:[0,0],zoom:0})})},[]),N=(0,o.useCallback)(function(){return(0,r._)(function(){var e,n,r,i,l,o;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(!t)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,E.parseLayer(t)];case 2:if(e=a.sent(),P.getAllLayers().filter(function(e){return e.get("shogunId")===t.id}).forEach(function(e){return P.removeLayer(e)}),v()(e)||!(0,tU._)(e,tH())||(n=e.getSource(),v()(n)))return[2];return(0,tU._)(n,tQ())&&((r=n).on("imageloaderror",function(){A(T("LayerPreview.loadLayerErrorMsg"))}),r.on("imageloadend",function(){return A(void 0)})),(0,tU._)(n,t4())&&((i=n).on("tileloaderror",function(){A(T("LayerPreview.loadLayerErrorMsg"))}),i.on("tileloadend",function(){return A(void 0)})),(0,tU._)(n,t7())&&((l=n).on("featuresloaderror",function(){A(T("LayerPreview.loadLayerErrorMsg"))}),l.on("featuresloadend",function(){return A(void 0)})),P.addLayer(e),[3,4];case 3:return o=a.sent(),m().error(o),p(T("LayerPreview.addLayerErrorMsg")),[3,4];case 4:return[2]}})})()},[P,t,E,T]),F=(0,o.useCallback)(function(){return(0,r._)(function(){var e,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,4,5,6]),u(!0),!function(e){if(v()(e))return!1;var t=e.getSource();return(0,tU._)(t,t0())||(0,tU._)(t,t8())}(e=P.getAllLayers().find(function(e){return e.get("shogunId")===t.id})))return[3,2];return[4,nt.A.getExtentForLayer(e,{headers:e.get("useBearerToken")?(0,W._)({},(0,J.M)(null==k?void 0:k.getKeycloak())):{}})];case 1:return n=a.sent(),n=(0,tJ.transformExtent)(n,"EPSG:4326",P.getView().getProjection()),P.getView().fit(n),[3,3];case 2:(0,tU._)(null==e?void 0:e.getSource(),t7())?(r=e.getSource()).on("addfeature",function(){P.getView().fit(r.getExtent())}):x(T("LayerPreview.extentNotSupportedErrorMsg")),a.label=3;case 3:return[3,6];case 4:return i=a.sent(),m().error(i),x(T("LayerPreview.extentErrorMsg")),[3,6];case 5:return u(!1),[7];case 6:return[2]}})})()},[P,t,k,T]);return(0,o.useEffect)(function(){p(void 0),x(void 0)},[t]),(0,o.useEffect)(function(){N()},[N]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e6.A,{title:T("LayerPreview.tooltipTitle"),children:(0,l.jsx)(tz.A,{className:"layer-preview-button",onClick:function(){_(!0)}})}),(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"layer-preview-modal",title:T("LayerPreview.title",{layerName:t.name}),open:C,onCancel:function(){_(!1)},footer:!1},n),{children:[(f||b||S)&&(0,l.jsx)(tY.A,{message:(0,l.jsx)("ul",{children:[f,b,S].filter(function(e){return!!e}).map(function(e){return(0,l.jsx)("li",{children:e},e)})}),type:"warning",showIcon:!0}),(0,l.jsx)(h.A,{spinning:c,children:(0,l.jsx)(nr,{id:"preview-map",map:P,onRender:F})})]}))]})},na=function(e){var t,n,i,s=e.actions,c=void 0===s?["delete"]:s,u=e.controller,d=e.i18n,f=e.tableConfig,h=(0,e0._)(e,["actions","controller","i18n","tableConfig"]),p=(0,x.Zp)(),g=(0,y.useTranslation)().t,b=(0,o.useContext)(ey),j=(0,o.useMemo)(function(){return"".concat(S().appPrefix,"/portal/").concat(null==b?void 0:b.entityType)},[null==b?void 0:b.entityType]);return(0,o.createElement)(tm.A,(0,eT._)((0,W._)({className:"general-entity-table",columns:(t=ef()(null==f?void 0:f.columnDefinition)?[{title:g("GeneralEntityTable.columnId"),key:"id",dataIndex:"id",sorter:tM.getSorter("id"),defaultSortOrder:"ascend"},(0,W._)({title:g("GeneralEntityTable.columnName"),dataIndex:"name",key:"name",sorter:tM.getSorter("name"),defaultSortOrder:"ascend"},tM.getColumnSearchProps("name"))]:null==f||null==(n=f.columnDefinition)?void 0:n.map(function(e){var t,n,r=eX()(e);r.title=eW.getTranslationFromConfig(e.title,d);var i=r.sortConfig,a=r.filterConfig,o=r.cellRenderComponentName,s=r.cellRenderComponentProps,c=r;!ef()(i)&&i.isSortable&&(c=(0,eT._)((0,W._)({},c),{sorter:"name"!==c.dataIndex||tM.getSorter("name"),defaultSortOrder:"name"===c.dataIndex?"ascend":i.sortOrder}));var u=null==r||null==(t=r.dataIndex)?void 0:t.toString();!ef()(a)&&a.isFilterable&&(c=(0,W._)({},c,tM.getColumnSearchProps(u)));var h=null==(n=f.dataMapping)?void 0:n[u];return ef()(o)||(c=(0,eT._)((0,W._)({},c),{render:function(e,t){var n,r=h?h[e]:e;if("JSONCell"===o)return(0,l.jsx)(e8,(0,W._)({value:r,format:"json"},s));if("DateCell"===o)return(0,l.jsx)(e8,(0,W._)({value:r,format:"date"},s));if("LinkCell"===o)return(0,l.jsx)(tG,(0,W._)({i18n:d,value:r},s));if("LayerPreviewCell"===o){if(!(Object.hasOwn(n=t,"type")&&Object.hasOwn(n,"sourceConfig")))return;return(0,l.jsx)(ni,(0,W._)({layer:t},s))}return"VerifyProviderDetailsCell"===o?(0,l.jsx)(tO,(0,W._)({i18n:d,value:r,record:t},s)):(0,l.jsx)(l.Fragment,{children:r})}})),c}),i=[],v()(t)||i.push.apply(i,(0,ek._)(t)),i.push({title:(0,l.jsx)(e6.A,{title:g("GeneralEntityTable.tooltipReload"),children:(0,l.jsx)(tD.A,{onClick:null==b?void 0:b.fetchEntities})}),className:"operation-column",width:100,dataIndex:"operation",key:"operation",render:function(e,t){return(0,l.jsx)("div",{className:"actions",children:c.includes("delete")&&(0,l.jsx)(e6.A,{title:g("GeneralEntityTable.tooltipDelete"),children:(0,l.jsx)(th.A,{onClick:function(){return(0,r._)(function(){var e,n,i,o;return(0,a.YH)(this,function(s){return(e=null==t?void 0:t.id)?((i=t.name||t.title)||(i=e),eo.A.confirm({cancelText:g("GeneralEntityTable.cancelText"),title:g("GeneralEntityTable.title"),content:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:g("GeneralEntityTable.contentInfo",{entityName:i})}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{children:g("GeneralEntityTable.contentConfirmInfo")}),(0,l.jsx)(eK.A,{onChange:function(e){o=e.target.value}})]}),onOk:function(){return(0,r._)(function(){var e,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(!("string"==typeof i?o===eW.getTranslationFromConfig(i,d):parseInt(o,10)===i))return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,null==u?void 0:u.delete(t)];case 2:return r.sent(),ec.Ay.info({message:g("GeneralEntityTable.deleteConfirm"),description:g("GeneralEntityTable.deleteConfirmDescript",{entityName:i})}),null==b||null==(e=b.fetchEntities)||e.call(b),[3,4];case 3:return n=r.sent(),ec.Ay.error({message:g("GeneralEntityTable.deleteFail"),description:g("GeneralEntityTable.deleteFailDescript",{entityName:i})}),m().error(n),[3,4];case 4:return[2]}})})()}})):null==b||null==(n=b.fetchEntities)||n.call(b),[2]})})()}})})})}}),i),locale:{filterTitle:g("Table.filterTitle"),filterConfirm:g("Table.filterConfirm"),filterReset:g("Table.filterReset"),filterEmptyText:g("Table.filterEmptyText"),filterCheckAll:g("Table.filterCheckall"),filterSearchPlaceholder:g("Table.filterSearchPlaceholder"),emptyText:g("Table.emptyText"),selectAll:g("Table.selectAll"),selectInvert:g("Table.selectInvert"),selectNone:g("Table.selectNone"),selectionAll:g("Table.selectionAll"),sortTitle:g("Table.sortTitle"),expand:g("Table.expand"),collapse:g("Table.collapse"),triggerDesc:g("Table.triggerDesc"),triggerAsc:g("Table.triggerAsc"),cancelSort:g("Table.cancelSort")},dataSource:null==b?void 0:b.entities,onRow:function(e){return{onClick:function(){return p("".concat(j,"/").concat(e.id))}}},rowKey:"id"},h),{key:null==b?void 0:b.entityType}))},nl=function(e){var t,n,s,c,u=e.i18n,d=e.endpoint,f=e.entityType,h=e.defaultSortField,p=e.entityName,m=void 0===p?"Entit\xe4t":p,g=e.navigationTitle,j=e.subTitle,w=e.formConfig,_=e.tableConfig,T=e.defaultEntity,k=e.onEntitiesLoaded,E=e.slots,P=(0,x.zy)(),N=(0,x.Zp)(),F=D(),L=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/").concat(f,"/:entityId")},P.pathname),I=null==L||null==(t=L.params)?void 0:t.entityId,M=(0,i._)((0,o.useState)(),2),R=M[0],B=M[1],O=(0,i._)((0,o.useState)(),2),U=O[0],z=O[1],Y=(0,i._)((0,o.useState)(),2),V=Y[0],H=Y[1],W=(0,i._)((0,o.useState)(),2),K=W[0],q=W[1],Z=(0,i._)((0,o.useState)(!1),2),J=Z[0],$=Z[1],Q=(0,i._)((0,o.useState)(!0),2),X=Q[0],ee=Q[1],en=(0,i._)((0,o.useState)(!1),2),er=en[0],ed=en[1],eh=(0,i._)((0,o.useState)(!1),2),ey=eh[0],ex=eh[1],ej=(0,i._)((0,o.useState)(!1),2),eS=ej[0],eA=ej[1],ew=(0,i._)((0,o.useState)(),2),eC=ew[0],e_=ew[1],eT=(0,i._)((0,o.useState)(S().defaultPageSize||10),2),ek=eT[0],eE=eT[1],eP=(0,i._)((0,o.useState)(1),2),eN=eP[0],eF=eP[1],eL=(0,i._)((0,o.useState)(h),2),eI=eL[0],eD=eL[1],eM=(0,i._)((0,o.useState)("ascend"),2),eR=eM[0],eG=eM[1],eB=(0,i._)((0,o.useState)(!1),2),eO=eB[0],eU=eB[1],ez=(0,i._)((0,o.useState)(!1),2),eY=ez[0],eK=ez[1],eq=(0,i._)(eo.A.useModal(),2),eZ=eq[0],eJ=eq[1],e$=(0,i._)(es.A.useForm(),1)[0],eQ=G(),eX=(0,y.useTranslation)().t;(0,o.useEffect)(function(){eD(h||void 0),eG("ascend"),eF(1),eU(!1)},[f,h]);var e0=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e$.validateFields(e||[])];case 1:return r.sent(),t=!0,[3,3];case 2:if("errorFields"in(n=r.sent()))t=!1;else throw n;return[3,3];case 3:return ee(t),[2]}})})()},[e$]),e1=(0,o.useCallback)(function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){return e0(null==w?void 0:w.fields.filter(function(e){return e.required}).map(function(e){return e.dataField})),[2]})})()},[null==w?void 0:w.fields,e0]),e2=(0,o.useMemo)(function(){return eV.createController({endpoint:d,keycloak:null==eQ?void 0:eQ.getKeycloak(),entityType:f,formConfig:w,formValidator:e1})},[d,eQ,f,w,e1]),e3=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),ex(!0),[4,null==e2?void 0:e2.load(e)];case 1:return n=(t=a.sent()).entity,r=t.revisions,z(n),e$.resetFields(),e$.setFieldsValue(n),r&&H(r),[3,4];case 2:return i=a.sent(),ev.A.error(i),[3,4];case 3:return ex(!1),[7];case 4:return[2]}})})()},[e$,e2]),e4=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(!f)return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),ed(!0),e=eO?void 0:{page:eN-1,size:ek,sort:{properties:v()(eI)?[]:[eI],order:"ascend"===eR?"asc":"descend"===eR?"desc":void 0}},[4,null==e2?void 0:e2.findAll(e)];case 2:return e_((t=r.sent()).totalElements),q(t.content||[]),null==k||k(t.content,f),[3,5];case 3:return n=r.sent(),ev.A.error(n),[3,5];case 4:return ed(!1),[7];case 5:return[2]}})})()},[e2,k,f,eN,ek,eI,eR,eO]),e5=(0,o.useMemo)(function(){return{entityType:f,entityName:m,fetchEntities:e4,entities:K}},[f,m,e4,K]),e8=function(){eo.A.destroyAll(),v()(R)||e3(parseInt(R.toString(),10)),ec.Ay.info({message:eX("GeneralEntityRoot.saveWarning",{entity:eW.getTranslationFromConfig(m,u)})})},e6=function(){e7(),v()(R)||e3(parseInt(R.toString(),10)),eo.A.destroyAll()};(0,o.useEffect)(function(){R&&"create"!==R.toString()&&R!==(null==U?void 0:U.id)&&(eY?eZ.confirm({title:eX("GeneralEntityRoot.reminderModal.title"),content:eX("GeneralEntityRoot.reminderModal.description"),okText:eX("GeneralEntityRoot.reminderModal.accept"),cancelText:eX("GeneralEntityRoot.reminderModal.decline"),closable:!0,footer:[(0,l.jsxs)("div",{className:"selectionButtons",children:[(0,l.jsx)(et.Ay,{className:"discardChangesButton",onClick:function(){return e8()},children:eX("GeneralEntityRoot.reminderModal.decline")}),(0,l.jsx)(et.Ay,{type:"primary",className:"acceptChangesButton",onClick:function(){return e6()},children:eX("GeneralEntityRoot.reminderModal.accept")})]},"modalButtons")]}):e3(parseInt(R.toString(),10)),eK(!1)),R&&"create"===R.toString()&&void 0===U&&(z(null==e2?void 0:e2.createEntity()),e$.setFieldsValue(null==e2?void 0:e2.getEntity()))},[R,e3,U,e2,e$,eZ]),(0,o.useEffect)(function(){J&&eK(!0)},[J]),(0,o.useEffect)(function(){if(!I){B(void 0),F((0,eH.L)(null)),z(void 0),$(!1);return}"create"===I?(B(I),F((0,eH.L)(null)),e$.resetFields(),e$.setFieldsValue(structuredClone(T)),e2.updateEntity(T,!0)):(B(parseInt(I,10)),F((0,eH.L)(parseInt(I,10))),$(!1))},[I,e$,T,e2,F]),(0,o.useEffect)(function(){e2&&e2.setFormValidator(e1)},[e1,e2]),(0,o.useEffect)(function(){e4()},[e4]);var e7=function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:eA(!0),n.label=1;case 1:return n.trys.push([1,5,6,7]),[4,null==e2?void 0:e2.saveOrUpdate()];case 2:return e=n.sent(),[4,e4()];case 3:return n.sent(),[4,e3(e.id)];case 4:return n.sent(),N("".concat(S().appPrefix,"/portal/").concat(f,"/").concat(e.id)),ec.Ay.success({message:eX("GeneralEntityRoot.saveSuccess",{entity:eW.getTranslationFromConfig(m,u)})}),[3,7];case 5:return t=n.sent(),ev.A.error("Error saving ".concat(m,":"),t),ec.Ay.error({message:eX("GeneralEntityRoot.saveFail",{entity:eW.getTranslationFromConfig(m,u)})}),[3,7];case 6:return eA(!1),eK(!1),$(!1),[7];case 7:return[2]}})})()};(0,em.vC)("ctrl+s",function(e){e.preventDefault(),e7()},{enableOnFormTags:["INPUT","TEXTAREA","SELECT"],enabled:function(){return!te&&X}});var e9=(0,o.useMemo)(function(){return null==e2?void 0:e2.getInitialFormValues()},[e2]),te=(0,o.useMemo)(function(){return ef()(U)||!J},[J,U]),tt={total:eC,current:eN,pageSize:ek,showTotal:function(e){return"".concat(eX("GeneralEntityTable.paging.total"),": ").concat(e)},showSizeChanger:!0,showQuickJumper:!0,locale:{next_page:eX("GeneralEntityTable.paging.nextPage"),prev_page:eX("GeneralEntityTable.paging.prevPage"),items_per_page:"/ ".concat(eX("GeneralEntityTable.paging.itemsPerPage")),jump_to:eX("GeneralEntityTable.paging.jumpTo"),page:eX("GeneralEntityTable.paging.page")}};return(0,l.jsx)(eb,{value:e5,children:(0,l.jsxs)("div",{className:"general-entity-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return N(-1)},title:eW.getTranslationFromConfig(void 0===g?"Entit\xe4ten":g,u),subTitle:void 0===j?"… mit denen man Dinge tun kann (aus Gr\xfcnden bspw.)":j,extra:[(null==(n=S().entityHistory)?void 0:n.enabled)&&(0,l.jsx)(C.A,{id:"revisionSelect",onChange:function(e){var t=null==V?void 0:V.find(function(t){return t.metadata.revisionNumber===e});t&&(z(t.entity),e$.resetFields(),e$.setFieldsValue(t.entity))},placeholder:eX("GeneralEntityRoot.selectRevision"),options:null==V||null==(c=V.slice())||null==(s=c.reverse())?void 0:s.map(function(e){return{value:e.metadata.revisionNumber,label:ep()(e.metadata.revisionInstant).format("DD.MM.YYYY hh:mm:ss")}})},"revisionSelect"),(0,l.jsx)(et.Ay,{disabled:te||!X,icon:(0,l.jsx)(ei.A,{}),onClick:e7,type:"primary",loading:eS,children:eX("GeneralEntityRoot.save",{context:eu.Ay.language,entity:eW.getTranslationFromConfig(m,u)})},"save"),(0,l.jsx)(et.Ay,{disabled:te,icon:(0,l.jsx)(ea.A,{}),onClick:function(){var e=null==K?void 0:K.find(function(e){return e.id===R});e&&(e$.resetFields(),e$.setFieldsValue(e),$(!1))},type:"primary",children:eX("GeneralEntityRoot.reset",{context:eu.Ay.language,entity:eW.getTranslationFromConfig(m,u)})},"reset")]}),(0,l.jsxs)("div",{className:"left-container",children:[(0,l.jsxs)("div",{className:"left-toolbar",children:[(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/").concat(f,"/create"),onClick:function(){z(void 0),B("create")},children:(0,l.jsx)(et.Ay,{type:"primary",icon:(0,l.jsx)(el.A,{}),children:eX("GeneralEntityRoot.create",{context:eu.Ay.language,entity:eW.getTranslationFromConfig(m,u)})},"create")},"create"),(null==E?void 0:E.leftToolbar)&&(0,l.jsx)("div",{className:"general-entity-slots-left-toolbar",children:E.leftToolbar})]}),(0,l.jsx)(na,{bordered:!0,controller:e2,i18n:u,loading:er,onChange:function(e,t,n){Array.isArray(n)||(eG(n.order),eD(n.field)),eU(Object.keys(t).some(function(e){return!v()(t[e])||!ef()(t[e])})),eF(e.current),eE(e.pageSize)},pagination:!eO&&tt,size:"small",tableConfig:_})]}),(0,l.jsx)("div",{className:"right-container",children:R&&!v()(I)&&(0,l.jsx)(tI,{loading:ey,i18n:u,entityId:parseInt(I,10),formConfig:w,form:e$,formProps:{initialValues:e9,onValuesChange:function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return $(!0),[4,e2.updateEntity(e)];case 1:return t.sent(),[2]}})})()}}})}),(0,l.jsx)("div",{children:eJ})]})})};var no=n(74444),ns=n(77906),nc=n(55886),nu=n(94092),nd=n(9971),nf=n.n(nd),nh=n(42293);let np=function(e){var t=e.onCancel,n=e.open,s=e.onSave,c=(0,e0._)(e,["onCancel","open","onSave"]),u=(0,i._)((0,o.useState)([]),2),d=u[0],f=u[1],h=(0,i._)((0,o.useState)([]),2),p=h[0],m=h[1],g=(0,i._)((0,o.useState)(""),2),v=g[0],b=g[1],x=(0,i._)((0,o.useState)("".concat(window.location.origin,"/geoserver/ows")),2),j=x[0],S=x[1],A=(0,i._)((0,o.useState)(),2),w=A[0],_=A[1],T=(0,i._)((0,o.useState)("1.3.0"),2),k=T[0],E=T[1],P=(0,i._)((0,o.useState)(!1),2),N=P[0],F=P[1],L=(0,i._)((0,o.useState)([]),2),I=L[0],D=L[1],M=(0,i._)((0,o.useState)(!1),2),R=M[0],B=M[1],O=(0,i._)((0,o.useState)(!1),2),U=O[0],z=O[1],Y=G(),V=(0,y.useTranslation)().t,H=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),F(!0),[4,null==Y?void 0:Y.graphql().sendQuery({query:"query { allLayers { id name sourceConfig }}"})];case 1:return D((null==(e=n.sent())?void 0:e.allLayers)||[]),[3,4];case 2:return t=n.sent(),ev.A.error("Error while loading the existing layers ",t),[3,4];case 3:return F(!1),[7];case 4:return[2]}})})()},[Y]),K=function(){f([]),m([]),b(""),S("".concat(window.location.origin,"/geoserver/ows")),E("1.3.0"),B(!1),z(!1)};(0,o.useEffect)(function(){n?H():K()},[n,H]),(0,o.useEffect)(function(){_(Z.Q.createValidGetCapabilitiesRequest(j,"WMS",k))},[k,j]);var q=function(e){return I.filter(function(t){var n,r;return(null==(n=t.sourceConfig)?void 0:n.layerNames)===(null==(r=e.getSource())?void 0:r.getParams().LAYERS)})},$=(0,o.useCallback)(function(e){var t,n,r,i,a=null==(t=e.getSource())?void 0:t.getParams().LAYERS,l=(0,tU._)(e,nf())?"WMS":"TILEWMS",o=(0,tU._)(e,nf())?null==(n=e.getSource())?void 0:n.getUrl():null==(i=e.getSource())||null==(r=i.getUrls())?void 0:r[0],s=nt.A.getLayerAttributionsText(e);return o?{name:e.get("name"),type:l,sourceConfig:{url:o,layerNames:a,useBearerToken:R,attribution:s&&"undefined"!==s?s:void 0,requestParams:{VERSION:k}},clientConfig:{hoverable:"1"===e.get("queryable")}}:void ev.A.error("Could not get URL for layer")},[R,k]),Q=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n,r,i,l,o,c,u,d,f,h,p,m,g;return(0,a.YH)(this,function(a){switch(a.label){case 0:F(!0),t={layers:[],errors:[]},n=!0,r=!1,i=void 0,a.label=1;case 1:a.trys.push([1,8,9,10]),l=e[Symbol.iterator](),a.label=2;case 2:if(n=(o=l.next()).done)return[3,7];if(d=null==(u=(c=o.value).getSource())?void 0:u.getParams().LAYERS,!(f=$(c)))return t.errors.push({layerName:d,msg:"Could not get URL for layer ".concat(d)}),[3,6];a.label=3;case 3:return a.trys.push([3,5,,6]),[4,null==Y?void 0:Y.layer().add(f)];case 4:if(!(h=a.sent()))return t.errors.push({layerName:d,msg:"Unknown error while adding the layer"}),[3,6];return t.layers.push(h),[3,6];case 5:return p=a.sent(),ev.A.error("Error while adding the layer ".concat(d,":"),p),t.errors.push({layerName:null==(m=c.getSource())?void 0:m.getParams().LAYERS,msg:"Error while adding the layer ".concat(d,": ").concat(p)}),[3,6];case 6:return n=!0,[3,2];case 7:return[3,10];case 8:return g=a.sent(),r=!0,i=g,[3,10];case 9:try{n||null==l.return||l.return()}finally{if(r)throw i}return[7];case 10:return null==s||s(t),F(!1),[2]}})})()},[s,$,Y]),X=[(0,l.jsx)(et.Ay,{"aria-label":"add-all",disabled:(null==d?void 0:d.length)<1,loading:N,onClick:function(){Q(d)},children:V("AddLayerModal.addAllLayers")},"add-all"),(0,l.jsx)(et.Ay,{"aria-label":"add-selected",disabled:(null==p?void 0:p.length)<1,loading:N,onClick:function(){Q(d.filter(function(e){return p.includes((0,nu.getUid)(e))}))},children:V("AddLayerModal.addSelectedLayers")},"add-selected")],ee=[{title:V("AddLayerModal.columnName"),render:function(e,t){var n,r;return null==(r=t.getSource())||null==(n=r.getParams())?void 0:n.LAYERS},sorter:function(e,t){var n,r,i,a;return null==(a=e.getSource())||null==(i=a.getParams())?void 0:i.LAYERS.localeCompare(null==(r=t.getSource())||null==(n=r.getParams())?void 0:n.LAYERS)},defaultSortOrder:"ascend"},{title:V("AddLayerModal.columnTitle"),render:function(e,t){return t.get("title")},sorter:function(e,t){return e.get("title").localeCompare(t.get("title"))},defaultSortOrder:"ascend"},{title:V("AddLayerModal.columnExisting"),width:125,render:function(e,t){return q(t).length>0?(0,l.jsx)(ns.A,{}):(0,l.jsx)(nc.A,{})},className:"operation-column",sorter:function(e,t){var n=q(e).length>0,r=q(t).length>0;return n&&!r?-1:!n&&r?1:0},defaultSortOrder:"descend"},{title:V("AddLayerModal.columnPreview"),width:125,render:function(e,t){var n=$(t);if(n)return n.id=1909,(0,l.jsx)(ni,{layer:n})},className:"operation-column"}];return(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"add-layer-modal",title:V("AddLayerModal.title"),onCancel:function(e){null==t||t(e)},width:600,open:n,footer:X},c),{children:[(0,l.jsx)("span",{children:V("AddLayerModal.requestWmsGetCapabilitiesInstruction")}),(0,l.jsxs)("div",{className:"input-wrapper",children:[(0,l.jsx)(eK.A.Search,{"aria-label":"input-search",className:"url-input",placeholder:V("AddLayerModal.inputPlaceholder"),value:j,onChange:function(e){var t=e.target.value;b(Z.Q.isValid(t.trim())?"":"error"),S(e.target.value)},onSearch:function(){return(0,r._)(function(){var e,t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(!w||""!==v)return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),f([]),m([]),F(!0),z(!1),[4,nh.A.getWmsCapabilities(w,{headers:R?(0,W._)({},(0,J.M)(null==Y?void 0:Y.getKeycloak())):{}})];case 2:return t=r.sent(),f(null==(e=nh.A.getLayersFromWmsCapabilities(t,"Title"))?void 0:e.filter(function(e){var t;return(null==(t=e.getSource())?void 0:t.getParams().LAYERS)!==void 0})),[3,5];case 3:return n=r.sent(),z(!0),ev.A.error(n),[3,5];case 4:return F(!1),[7];case 5:return[2]}})})()},loading:N,status:v,enterButton:!0,addonBefore:(0,l.jsx)(C.A,{"aria-label":"select-version",defaultValue:"1.3.0",onChange:E,value:k,options:[{key:"1.3.0",value:"1.3.0",label:"".concat(V("AddLayerModal.version",{version:"1.3.0"}))},{key:"1.1.1",value:"1.1.1",label:"".concat(V("AddLayerModal.version",{version:"1.1.1"}))},{key:"1.1.0",value:"1.1.0",label:"".concat(V("AddLayerModal.version",{version:"1.1.0"}))},{key:"1.0.0",value:"1.0.0",label:"".concat(V("AddLayerModal.version",{version:"1.0.0"}))}]})}),(0,l.jsx)(e6.A,{title:V("AddLayerModal.useBearerTokenTooltip"),children:(0,l.jsx)(eZ.A,{"aria-label":"use-bearer-token",checkedChildren:(0,l.jsx)(ns.A,{}),unCheckedChildren:(0,l.jsx)(nc.A,{}),onChange:function(e){B(e)},value:R})}),(0,l.jsx)("label",{children:V("AddLayerModal.useBearerTokenLabel")})]}),(""!==v||U)&&(0,l.jsx)(e1.A,{className:"error",children:v?V("AddLayerModal.invalidUrlErrorMsg"):V("AddLayerModal.errorDescription")}),!U&&(0,l.jsx)(tm.A,{"aria-label":"wms-table",loading:N,size:"small",columns:ee,scroll:{y:"calc(100vh - 400px)"},expandable:{expandedRowRender:function(e){var t,n=q(e);return(0,l.jsxs)("div",{className:"expanded-row",children:[V("AddLayerModal.existingLayerNote",{layerName:null==(t=e.getSource())?void 0:t.getParams().LAYERS}),(0,l.jsx)("ul",{children:n.sort(function(e,t){return e.name.localeCompare(t.name)}).map(function(e){return(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"portal/layer/".concat(e.id),target:"_blank",children:"".concat(e.name," (").concat(e.id,")")})},e.id)})})]})},rowExpandable:function(e){return q(e).length>0}},rowKey:nu.getUid,rowSelection:{selectedRowKeys:p,onChange:m},pagination:!1,dataSource:d})]}))},nm=function(){var e,t,n,r,a=(0,i._)((0,o.useState)(!1),2),s=a[0],c=a[1],d=(0,i._)((0,o.useState)(!1),2),f=d[0],h=d[1],p=(0,i._)((0,o.useState)(),2),m=p[0],g=p[1],v=(0,o.useContext)(ey),b=(0,y.useTranslation)().t,x=function(){var e=m&&m.errors.length>0,t=m&&m.layers.length>0;return!e&&t?"success":(!e||t)&&(e||t)?"warning":"error"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e6.A,{title:b("ToolbarAddLayerButton.tooltip"),children:(0,l.jsx)(et.Ay,{icon:(0,l.jsx)(no.A,{}),onClick:function(){c(!0)},children:b("ToolbarAddLayerButton.title")})}),(0,l.jsx)(np,{maskClosable:!1,open:s,onCancel:function(){c(!1)},onSave:function(e){g(e),h(!0)}}),(0,l.jsx)(eo.A,{open:f,onCancel:function(){var e;h(!1),c(!1),null==v||null==(e=v.fetchEntities)||e.call(v)},maskClosable:!1,footer:null,children:(0,l.jsx)(u.Ay,{status:x(),title:b("success"===(e=x())?"ToolbarAddLayerButton.successMsg":"error"===e?"ToolbarAddLayerButton.errorMsg":"ToolbarAddLayerButton.warningMsg"),subTitle:(t=x(),n=null==m?void 0:m.layers.map(function(e){return(0,l.jsxs)("span",{children:[(0,l.jsx)("a",{href:"portal/layer/".concat(e.id),target:"_blank",children:"".concat(e.name," (").concat(e.id,")")}),(0,l.jsx)("br",{})]},e.id)}),r=null==m?void 0:m.errors.map(function(e){return(0,l.jsxs)("span",{children:["".concat(e.layerName),(0,l.jsx)("br",{})]},e.layerName)}),"success"===t?(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.successSubTitle")}),n]}):"error"===t?(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.errorSubTitle")}),r]}):(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.successSubTitle")}),n,(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.errorSubTitle")}),r]}))})})]})};var ng=n(49340),nv=n(71853);let ny=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,i._)(ee.Ay.useMessage(),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;return(0,l.jsxs)(l.Fragment,{children:[p,(0,l.jsx)(e6.A,{title:g("CreateAllGroupsButton.tooltip"),children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:d(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,null==m?void 0:m.group().createAllFromProvider()];case 2:return r.sent(),h.success(g("CreateAllGroupsButton.success")),null==t||t(),[3,5];case 3:return e=r.sent(),h.error(g("CreateAllGroupsButton.error")),nv.A.error("Error while creating the groups: ",e),null==n||n(e),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()},loading:u,icon:(0,l.jsx)(ng.A,{})},s),{children:g("CreateAllGroupsButton.title")}))})]})},nb=function(){var e=(0,o.useContext)(ey);return(0,l.jsx)(ny,{onSuccess:function(){var t;null==e||null==(t=e.fetchEntities)||t.call(e)}})};var nx=n(81403);let nj=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,i._)(ee.Ay.useMessage(),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;return(0,l.jsxs)(l.Fragment,{children:[p,(0,l.jsx)(e6.A,{title:g("CreateAllRolesButton.tooltip"),children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:d(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,null==m?void 0:m.role().createAllFromProvider()];case 2:return r.sent(),h.success(g("CreateAllRolesButton.success")),null==t||t(),[3,5];case 3:return e=r.sent(),h.error(g("CreateAllRolesButton.error")),nv.A.error("Error while creating the roles: ",e),null==n||n(e),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()},loading:u,icon:(0,l.jsx)(nx.A,{})},s),{children:g("CreateAllRolesButton.title")}))})]})},nS=function(){var e=(0,o.useContext)(ey);return(0,l.jsx)(nj,{onSuccess:function(){var t;null==e||null==(t=e.fetchEntities)||t.call(e)}})};var nA=n(23197);let nw=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,i._)(ee.Ay.useMessage(),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;return(0,l.jsxs)(l.Fragment,{children:[p,(0,l.jsx)(e6.A,{title:g("CreateAllUsersButton.tooltip"),children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:d(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,null==m?void 0:m.user().createAllFromProvider()];case 2:return r.sent(),h.success(g("CreateAllUsersButton.success")),null==t||t(),[3,5];case 3:return e=r.sent(),h.error(g("CreateAllUsersButton.error")),nv.A.error("Error while creating the users: ",e),null==n||n(e),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()},loading:u,icon:(0,l.jsx)(nA.A,{})},s),{children:g("CreateAllUsersButton.title")}))})]})},nC=function(){var e=(0,o.useContext)(ey);return(0,l.jsx)(nw,{onSuccess:function(){var t;null==e||null==(t=e.fetchEntities)||t.call(e)}})};var n_=n(88237),nT=n(94918),nk=n(24522);let nE=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=G(),h=(0,y.useTranslation)().t,p=function(e){switch(e){case"C":return"java.lang.String";case"D":return"java.util.Date";case"N":return"java.lang.Long";case"F":return"java.lang.Double";case"L":return"java.lang.Boolean";default:return}};return(0,l.jsx)(nT.A,{customRequest:function(e){return(0,r._)(function(){var t,n,l,o,s,c,u,d,m,g,v,y,b;return(0,a.YH)(this,function(x){var j,A;switch(x.label){case 0:o=e.onError,s=e.onSuccess,u=(c=e.file).name.split("."),d=c.type,m=(null==(t=S().geoserver)?void 0:t.base)||"/geoserver",g=(null==(l=S().geoserver)||null==(n=l.upload)?void 0:n.workspace)||"SHOGUN",v="".concat(u[0],"_").concat(Date.now()).toUpperCase(),y={file:c,baseUrl:m,workspace:g,storeName:v,layerName:v},x.label=1;case 1:if(x.trys.push([1,6,,7]),"image/tiff"!==d)return[3,3];return[4,(j=y,(0,r._)(function(){var e,t,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:return e=j.baseUrl,t=j.workspace,n=j.storeName,r=j.layerName,i=j.file,[4,fetch("".concat(e,"/rest/workspaces/").concat(t,"/coveragestores/")+"".concat(n,"/file.geotiff?coverageName=").concat(r),{method:"PUT",headers:(0,eT._)((0,W._)({},(0,J.M)(null==f?void 0:f.getKeycloak())),{"Content-Type":"image/tiff"}),body:i})];case 1:if(!a.sent().ok)throw Error("No successful response while uploading the file");return[2]}})})())];case 2:x.sent(),x.label=3;case 3:if("application/zip"!==d&&"application/x-zip-compressed"!==d)return[3,5];return[4,(A=y,(0,r._)(function(){var e,t,n,r,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:return e=A.baseUrl,t=A.workspace,n=A.storeName,r=A.layerName,l=A.file,[4,nk.Shapefile.load(l)];case 1:if(o=a.sent(),s="",c={attribute:[]},1!==Object.entries(o).length)throw Error(h("UploadLayerButton.error.descriptionZipContent"));return Object.entries(o).forEach(function(e){var t=(0,i._)(e,2),n=t[0],r=t[1];s=n;var a=r.parse("dbf",{properties:!1});c.attribute=a.fields.map(function(e){return{name:e.name,minOccurs:0,maxOccurs:1,nillable:!0,binding:p(e.type),length:e.length}});var l=r.parse("shx");c.attribute.push({name:"the_geom",minOccurs:0,maxOccurs:1,nillable:!0,binding:{0:void 0,1:"org.locationtech.jts.geom.Point",3:"org.locationtech.jts.geom.LineString",5:"org.locationtech.jts.geom.Polygon",8:"org.locationtech.jts.geom.MultiPoint",11:"org.locationtech.jts.geom.Point",13:"org.locationtech.jts.geom.LineString",15:"org.locationtech.jts.geom.Polygon",18:"org.locationtech.jts.geom.MultiPoint",21:"org.locationtech.jts.geom.Point",23:"org.locationtech.jts.geom.LineString",25:"org.locationtech.jts.geom.Polygon",28:"org.locationtech.jts.geom.MultiPoint",31:void 0}[l.header.type]})}),[4,fetch("".concat(e,"/rest/workspaces/").concat(t,"/datastores/")+"".concat(n,"/file.shp?configure=none"),{method:"PUT",headers:(0,eT._)((0,W._)({},(0,J.M)(null==f?void 0:f.getKeycloak())),{"Content-Type":"application/zip"}),body:l})];case 2:if(!a.sent().ok)throw Error("No successful response while uploading the file");return[4,fetch("".concat(e,"/rest/workspaces/").concat(t,"/datastores/").concat(n,"/featuretypes"),{method:"POST",headers:(0,eT._)((0,W._)({},(0,J.M)(null==f?void 0:f.getKeycloak())),{"Content-Type":"application/json"}),body:JSON.stringify({featureType:{enabled:!0,name:r,nativeName:s,title:r,attributes:c}})})];case 3:if(!a.sent().ok)throw Error("No successful response while creating the featuretype");return[2]}})})())];case 4:x.sent(),x.label=5;case 5:return null==s||s({baseUrl:m,workspace:g,layerName:v}),[3,7];case 6:return b=x.sent(),null==o||o({name:"UploadError",message:null==b?void 0:b.message}),[3,7];case 7:return[2]}})})()},accept:"image/tiff,application/zip",maxCount:1,showUploadList:!1,beforeUpload:function(e){var t,n,r=(null==(n=S().geoserver)||null==(t=n.upload)?void 0:t.limit)||2e8,i=e.type;if(e.size>r)return ec.Ay.error({message:h("UploadLayerButton.error.message"),description:h("UploadLayerButton.error.descriptionSize",{maxSize:r/1e6})}),!1;var a=["application/zip","application/x-zip-compressed","image/tiff"];return!!a.includes(i)||(ec.Ay.error({message:h("UploadLayerButton.error.message"),description:h("UploadLayerButton.error.descriptionFormat",{supportedFormats:a.join(", ")})}),!1)},onChange:function(e){return(0,r._)(function(){var r,i,l,o,s,c,u;return(0,a.YH)(this,function(a){switch(a.label){case 0:if("uploading"===(r=e.file).status&&d(!0),"done"!==r.status)return[3,2];return[4,null==f?void 0:f.layer().add({name:null!=(u=null==(i=r.response)?void 0:i.layerName)?u:"LAYER-DEFAULT-NAME",type:"TILEWMS",clientConfig:{hoverable:!1},sourceConfig:{url:"".concat(null==(l=r.response)?void 0:l.baseUrl,"/ows?"),layerNames:"".concat(null==(o=r.response)?void 0:o.workspace,":").concat(null==(s=r.response)?void 0:s.layerName),useBearerToken:!0}})];case 1:return a.sent(),d(!1),ec.Ay.success({message:h("UploadLayerButton.success.message"),description:h("UploadLayerButton.success.description",{fileName:r.fileName,layerName:null==(c=r.response)?void 0:c.layerName})}),null==t||t(r.response),[3,3];case 2:"error"===r.status&&(d(!1),nv.A.error(r.error),ec.Ay.error({message:h("UploadLayerButton.error.message"),description:h("UploadLayerButton.error.description",{fileName:r.fileName})}),null==n||n(r.error)),a.label=3;case 3:return[2]}})})()},children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({icon:(0,l.jsx)(n_.A,{}),loading:u,disabled:u},s),{children:h("UploadLayerButton.title")}))})},nP=function(){var e,t,n=(0,o.useContext)(ey);return(null==(t=S().geoserver)||null==(e=t.upload)?void 0:e.buttonVisible)?(0,l.jsx)(nE,{onSuccess:function(){var e;null==n||null==(e=n.fetchEntities)||e.call(n)}}):(0,l.jsx)(l.Fragment,{})};var nN=n(19791);let nF=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,i._)((0,o.useState)(!1),2),s=n[0],c=n[1],u=(0,i._)(ee.Ay.useMessage(),2),d=u[0],f=u[1],h=G(),p=(0,y.useTranslation)().t;return v()(h)?null:(0,l.jsxs)(l.Fragment,{children:[f,(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:c(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,null==h?void 0:h.cache().evictCache()];case 2:return t.sent(),d.success(p("EvictCache.success")),[3,4];case 3:return e=t.sent(),d.error(p("EvictCache.error")),ev.A.error("Could not clear the cache due to the following error: ".concat(e)),[3,4];case 4:return c(!1),[2]}})})()},loading:s,icon:(0,l.jsx)(nN.A,{})},t),{children:p("EvictCache.clear")}))]})},nL=function(){var e=(0,y.useTranslation)().t,t=(0,x.Zp)();return(0,l.jsxs)("div",{className:"global-settings-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return t(-1)},title:e("GlobalSettings.global"),subTitle:e("GlobalSettings.globalInfo")}),(0,l.jsx)("div",{className:"global-settings-container",children:(0,l.jsx)(nF,{})})]})},nI=function(){var e,t=(0,i._)((0,o.useState)(),2),n=t[0],s=t[1],c=(0,i._)((0,o.useState)(),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)(!1),2),p=f[0],g=f[1],b=(0,x.zy)(),j=G(),w=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/imagefile/:id")},b.pathname),C=null==w||null==(e=w.params)?void 0:e.id,_=(0,y.useTranslation)().t,T=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(!j||v()(C))return s(void 0),[2];n.label=1;case 1:if(n.trys.push([1,6,,7]),!e)return[3,3];return[4,j.imagefile().setPublic(parseInt(C,10))];case 2:return n.sent(),[3,5];case 3:return[4,j.imagefile().revokePublic(parseInt(C,10))];case 4:n.sent(),n.label=5;case 5:return g(e),[3,7];case 6:return t=n.sent(),m().error("Error while changing public state of an image file",t),[3,7];case 7:return[2]}})})()},[C,j]);return(0,o.useEffect)(function(){u&&(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:if(!j||v()(u.fileUuid))return[2];return[4,j.imagefile().findOne(u.fileUuid)];case 1:return s(e.sent()),[2]}})})()},[u,j]),(0,o.useEffect)(function(){!j||v()(C)?s(void 0):((0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,j.graphql().sendQuery({query:"query($id: Int) {\n imageFileById(id: $id) {\n active\n fileType\n id\n created\n modified\n fileUuid\n fileName\n width\n height\n }\n }",variables:{id:parseInt(C,10)}})];case 1:return d(e.sent().imageFileById),[2]}})})(),(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,j.imagefile().isPublic(parseInt(C,10))];case 1:return g.apply(void 0,[e.sent()]),[2]}})})())},[C,j]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.z,{title:_("ImageFileForm.title")}),(0,l.jsx)(h.A,{spinning:!1,children:(0,l.jsxs)(es.A,{className:"image-file-form",labelCol:{span:5},wrapperCol:{span:20},children:[(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.name"),children:null==u?void 0:u.fileName}),(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.uuid"),children:p?(0,l.jsx)("a",{target:"_blank",href:"".concat(null==j?void 0:j.getBasePath(),"imagefiles/").concat(null==u?void 0:u.fileUuid),children:null==u?void 0:u.fileUuid}):null==u?void 0:u.fileUuid}),(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.public"),children:(0,l.jsx)(eZ.A,{checked:p,onChange:T},"public")}),(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.preview"),children:n&&(0,l.jsx)("div",{className:"image-preview",children:(0,l.jsx)("img",{src:URL.createObjectURL(n),alt:"preview"})})})]})})]})},nD=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,i._)((0,o.useState)(),2),s=n[0],c=n[1],u=(0,i._)((0,o.useState)(),2),d=u[0],f=u[1],h=(0,i._)((0,o.useState)(),2),p=h[0],m=h[1],g=(0,i._)((0,o.useState)(S().defaultPageSize||10),2),b=g[0],j=g[1],A=(0,i._)((0,o.useState)(1),2),w=A[0],C=A[1],_=(0,i._)((0,o.useState)(),2),T=_[0],k=_[1],E=(0,i._)((0,o.useState)(),2),P=E[0],N=E[1],F=(0,x.Zp)(),L=G(),I=null==L?void 0:L.imagefile(),D=(0,y.useTranslation)(),M=D.t,R=D.i18n,B=[(0,W._)({title:"UUID",key:"fileUuid",dataIndex:"fileUuid",sorter:tM.getSorter("fileUuid")},tM.getColumnSearchProps("fileUuid")),(0,W._)({title:"Name",key:"fileName",dataIndex:"fileName",sorter:tM.getSorter("fileName"),defaultSortOrder:"ascend"},tM.getColumnSearchProps("fileName")),(0,W._)({title:"Created",key:"created",dataIndex:"created",sorter:tM.getSorter("created"),defaultSortOrder:"descend",render:function(e){return new Date(e).toLocaleString(R.language)}},tM.getColumnSearchProps("created"))],O=function(e){F("".concat(S().appPrefix,"/portal/imagefile/").concat(e.id))},U={singular:M("ImageFileTable.imageSingular"),plural:M("ImageFileTable.imagePlural")},z=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:f("loading"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,null==I?void 0:I.findAll({page:w-1,size:b,sort:{properties:v()(T)?[]:[T],order:"ascend"===P?"asc":"descend"===P?"desc":void 0}})];case 2:return m(null==(e=n.sent())?void 0:e.totalElements),c(null==e?void 0:e.content),f("done"),[3,4];case 3:return t=n.sent(),f("failed"),ev.A.error("Could not fetch images due to the following error: ".concat(t)),[3,4];case 4:return[2]}})})()},[I,w,b,T,P]);(0,o.useEffect)(function(){z()},[z]);var Y=function(e){e.id?eo.A.confirm({cancelText:M("ImageFileTable.cancel"),title:M("ImageFileTable.delete",{entity:U.singular}),content:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:M("ImageFileTable.confirmInfo",{entity:U.singular})}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{children:M("ImageFileTable.conFirmTooltip",{entity:U.singular})})]}),onOk:function(){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(n.trys.push([0,4,,5]),v()(e.fileUuid))return[3,3];return[4,null==I?void 0:I.delete(e.fileUuid)];case 1:return n.sent(),ec.Ay.info({message:M("ImageFileTable.deletionInfo",{entity:U.singular}),description:M("ImageFileTable.deletionInfo",{entity:U.singular,record:e.fileName})}),[4,z()];case 2:n.sent(),F("".concat(S().appPrefix,"/portal/imagefile")),n.label=3;case 3:return[3,5];case 4:return t=n.sent(),ec.Ay.error({message:M("ImageFileTable.deleteFail"),description:M("ImageFileTable.deleteFailDescript",{record:e.fileName})}),ev.A.error("Could not delete image entities due to the following error: ".concat(t)),[3,5];case 5:return[2]}})})()}}):c(null==s?void 0:s.filter(function(t){return t!==e}))},V=(0,ek._)(B).concat([{title:(0,l.jsx)(e6.A,{title:M("ImageFileTable.reloadTooltip"),children:(0,l.jsx)(tD.A,{onClick:z})}),className:"operation-column",width:100,dataIndex:"operation",render:function(e,t){return(0,l.jsx)("div",{className:"actions",children:(0,l.jsx)(e6.A,{title:"L\xf6schen",children:(0,l.jsx)(th.A,{onClick:function(){return Y(t)}})})})}}]);return s?(0,l.jsx)(tm.A,(0,W._)({className:"imagefile-table",columns:V,rowKey:function(e){return"".concat(null==e?void 0:e.id)},rowClassName:function(){return"editable-row"},dataSource:s,onRow:function(e){return{onClick:function(){return O(e)}}},bordered:!0,size:"small",loading:"loading"===d,onChange:function(e,t,n){Array.isArray(n)||(N(n.order),k(n.field)),v()(e.current)||C(e.current),v()(e.pageSize)||j(e.pageSize)},pagination:{total:p,current:w,pageSize:b,showTotal:function(e){return"".concat(M("GeneralEntityTable.paging.total"),": ").concat(e)},showSizeChanger:!0,showQuickJumper:!0,locale:{next_page:M("GeneralEntityTable.paging.nextPage"),prev_page:M("GeneralEntityTable.paging.prevPage"),items_per_page:"/ ".concat(M("GeneralEntityTable.paging.itemsPerPage")),jump_to:M("GeneralEntityTable.paging.jumpTo"),page:M("GeneralEntityTable.paging.page")}}},t)):(0,l.jsx)(l.Fragment,{})},nM=function(){var e,t=(0,x.Zp)(),n=(0,x.zy)(),i=G(),o=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/imagefile/:id")},n.pathname),s=null==o||null==(e=o.params)?void 0:e.id,c=(0,y.useTranslation)().t;return(0,l.jsxs)("div",{className:"imagefile-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return t(-1)},title:c("ImageFileRoot.title"),subTitle:c("ImageFileRoot.subTitle")}),(0,l.jsxs)("div",{className:"left-container",children:[(0,l.jsx)("div",{className:"left-toolbar",children:(0,l.jsx)(nT.A,{showUploadList:!1,customRequest:function(e){return(0,r._)(function(){var n,r,l;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(n=e.file,!(0,tU._)(n,File))return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,null==i?void 0:i.imagefile().upload(n)];case 2:return r=a.sent(),v()(r)||(ec.Ay.info({message:c("ImageFileRoot.success"),description:c("ImageFileRoot.uploadSuccess",{entityName:n.name})}),t("".concat(S().appPrefix,"/portal/imagefile/").concat(r.id))),[3,4];case 3:return l=a.sent(),ec.Ay.error({message:c("ImageFileRoot.failure"),description:c("ImageFileRoot.uploadFailure",{entityName:n.name})}),ev.A.error("Could not upload image due to the following error: ".concat(l)),[3,4];case 4:return[2]}})})()},children:(0,l.jsx)(et.Ay,{type:"primary",children:c("ImageFileRoot.button")})},"upload")}),(0,l.jsx)(nD,{})]}),(0,l.jsx)("div",{className:"right-container",children:!v()(s)&&(0,l.jsx)(nI,{})})]})};var nR=n(5624),nG=function(){function e(t){(0,O._)(this,e),(0,e_._)(this,"keycloak",void 0),this.keycloak=null==t?void 0:t.keycloak}return(0,U._)(e,[{key:"getLoggers",value:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/loggers"),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:return[4,t.sent().json()];case 2:return[2,t.sent().loggers];case 3:return e=t.sent(),nv.A.error("Error while reading the loggers: ".concat(e)),[2,null];case 4:return[2]}})}).call(this)}},{key:"getLogger",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/loggers/").concat(e),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()];case 3:return t=n.sent(),nv.A.error("Error while reading the logger: ".concat(t)),[2,Promise.reject()];case 4:return[2]}})}).call(this)}},{key:"setLogger",value:function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,fetch("".concat(S().path.shogunBase,"actuator/loggers/").concat(e),{method:"POST",headers:(0,W._)({"Content-Type":"application/json"},(0,nR.T)(),(0,J.M)(this.keycloak)),body:JSON.stringify({configuredLevel:t})})];case 1:return[2,204===r.sent().status];case 2:return n=r.sent(),nv.A.error("Error while setting the logger: ".concat(n)),[2,!1];case 3:return[2]}})}).call(this)}},{key:"getLogs",value:function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/logfile"),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:if(!(e=n.sent()).ok)throw Error("No successful response while getting the logs");return[4,e.text()];case 2:return[2,n.sent()];case 3:return t=n.sent(),nv.A.error("Error while reading the logs: ".concat(t)),[3,4];case 4:return[2]}})}).call(this)}}]),e}();let nB=function(){var e=(0,i._)((0,o.useState)(),2),t=e[0],n=e[1],s=(0,i._)((0,o.useState)(!1),2),c=s[0],u=s[1],d=(0,i._)((0,o.useState)(!1),2),f=d[0],h=d[1],p=G(),m=(0,o.useRef)(void 0),g=(0,x.Zp)(),b=(0,y.useTranslation)().t,j=(0,o.useCallback)(function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),u(!0),h(!1),[4,new nG({keycloak:null==p?void 0:p.getKeycloak()}).getLogs()];case 1:return n(e=t.sent()),e||h(!0),[3,3];case 2:return u(!1),[7];case 3:return[2]}})})()},[p]);return((0,o.useEffect)(function(){j()},[j]),v()(p))?null:(0,l.jsxs)("div",{className:"log-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return g(-1)},title:b("Logs.logs"),subTitle:b("Logs.logsInfo"),extra:[(0,l.jsx)(es.A.Item,{label:b("Logs.autoReload"),className:"auto-reload-switch",children:(0,l.jsx)(eZ.A,{onChange:function(e){e?m.current||(m.current=setInterval(j,1e3)):(clearInterval(null==m?void 0:m.current),m.current=void 0)}})},"reload"),(0,l.jsx)(et.Ay,{type:"primary",loading:c,onClick:j,children:b("Logs.refresh")},"fetch-logs")]}),(0,l.jsx)("div",{className:"log-container",children:f?(0,l.jsx)(tY.A,{message:b("Logs.warningMessage"),description:b("Logs.warningDescribtion"),type:"warning",showIcon:!0}):(0,l.jsx)("pre",{children:(0,l.jsx)("code",{children:t})})})]})};var nO=C.A.Option,nU=["OFF","FATAL","ERROR","WARN","INFO","DEBUG","TRACE"];let nz=function(e){var t=nU.map(function(e,t){return(0,l.jsx)(nO,{value:"".concat(e),children:e},t)});return(0,l.jsx)(C.A,(0,eT._)((0,W._)({},e),{children:t}))},nY=function(e){var t=(0,i._)((0,o.useState)(!1),2),n=t[0],s=t[1],c=(0,i._)((0,o.useState)([]),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)([]),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;(0,o.useEffect)(function(){(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:return s(!0),[4,new nG({keycloak:null==m?void 0:m.getKeycloak()}).getLoggers()];case 1:return d(Object.keys(e=t.sent()).filter(function(e){return 2===e.split(".").length||"org.springframework.security"===e}).filter(function(e){return!e.startsWith("_")}).map(function(t,n){return{key:n,name:t,level:e[t].effectiveLevel}})),s(!1),[2]}})})()},[m]);var b=[{title:g("LogSettings.tableName"),dataIndex:"name",key:"name"},{title:g("LogSettings.tableLevel"),dataIndex:"level",key:"level",render:function(e,t){return(0,l.jsx)(nz,{style:{width:"100%"},defaultValue:e,onChange:function(e){x(e,t)}})}}],x=function(e,t){return(0,r._)(function(){return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,new nG({keycloak:null==m?void 0:m.getKeycloak()}).setLogger(t.name,e)];case 1:return n.sent()?ee.Ay.success("Successfully set log level"):ee.Ay.error("Could not set log level"),[2]}})})()};return v()(m)?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eK.A.Search,{style:{margin:"0 0 10px 0"},placeholder:g("LogSettings.searchPlaceholder"),enterButton:!0,onSearch:function(e){p(u.filter(function(t){return Object.keys(t).some(function(n){return String(eP()(t,n)).toLowerCase().includes(e.toLowerCase())})}))}}),(0,l.jsx)(tm.A,(0,W._)({loading:n,columns:b,dataSource:0===h.length?u:h},e))]})},nV=function(){var e=(0,y.useTranslation)().t,t=(0,x.Zp)();return(0,l.jsxs)("div",{className:"log-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return t(-1)},title:e("LogSettings.logs"),subTitle:e("LogSettings.logsInfo")}),(0,l.jsx)(nY,{})]})};var nH=n(6266),nW=n(49776),nK=n(76164),nq=n(39576),nZ=n(45279),nJ=n(7185),n$=n(69149),nQ=n(53078),nX=n(26051),n0=n(19416),n1=n(72640);let n2=function(e){var t,n,r,i,a,o,s,c,u,d,f,h,p,m,g,b=e.collapsed,j=e.entityConfigs,A=void 0===j?[]:j,w=(0,y.useTranslation)().t,C=(0,x.Zp)(),_=(0,x.zy)(),T=G(),k=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/:activeKey")},_.pathname),E=null==k||null==(t=k.params)?void 0:t.activeKey,P=S().navigation,N=[];if(A&&A.length>0){var F=A.find(function(e){return"application"===e.entityType}),L=A.find(function(e){return"layer"===e.entityType}),I=A.find(function(e){return"user"===e.entityType}),D=A.find(function(e){return"group"===e.entityType}),M=A.find(function(e){return"role"===e.entityType}),R=A.filter(function(e){return![F,L,I,D,M].includes(e)});F&&N.push({key:"application",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nH.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==F?void 0:F.navigationTitle,null==F?void 0:F.i18n)})]})}),L&&N.push({key:"layer",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nW.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==L?void 0:L.navigationTitle,null==L?void 0:L.i18n)})]})}),I&&N.push({key:"user",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nK.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==I?void 0:I.navigationTitle,null==I?void 0:I.i18n)})]})}),D&&N.push({key:"group",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nq.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==D?void 0:D.navigationTitle,null==D?void 0:D.i18n)})]})}),M&&N.push({key:"role",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nx.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==M?void 0:M.navigationTitle,null==M?void 0:M.i18n)})]})}),R.forEach(function(e){N.push({key:e.entityType,label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nZ.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==e?void 0:e.navigationTitle,null==e?void 0:e.i18n)})]})})})}(null==P||null==(r=P.general)||null==(n=r.imagefiles)?void 0:n.visible)&&N.push({key:"imagefile",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nJ.A,{}),(0,l.jsx)("span",{children:w("Navigation.image")})]})});var B=[];(null==P||null==(a=P.status)||null==(i=a.metrics)?void 0:i.visible)&&B.push({key:"status/metrics",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n$.A,{}),(0,l.jsx)("span",{children:w("Navigation.metrics")})]})}),(null==P||null==(s=P.status)||null==(o=s.logs)?void 0:o.visible)&&B.push({key:"status/logs",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nQ.A,{}),(0,l.jsx)("span",{children:w("Navigation.logs")})]})});var O=[];(null==P||null==(u=P.settings)||null==(c=u.global)?void 0:c.visible)&&O.push({key:"settings/global",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nX.A,{}),(0,l.jsx)("span",{children:w("Navigation.global")})]})}),(null==P||null==(f=P.settings)||null==(d=f.logs)?void 0:d.visible)&&O.push({key:"settings/logs",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nQ.A,{}),(0,l.jsx)("span",{children:w("Navigation.logLevels")})]})}),(null==P||null==(p=P.settings)||null==(h=p.graphiql)?void 0:h.visible)&&O.push({key:"graphiql",icon:(0,l.jsx)(n0.A,{}),label:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("a",{href:"".concat(null==T?void 0:T.getBasePath(),"graphiql?path=/graphql"),target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("span",{children:w("Navigation.graphiql")})})})}),(null==P||null==(g=P.settings)||null==(m=g.swagger)?void 0:m.visible)&&O.push({key:"swagger",icon:(0,l.jsx)(nZ.A,{}),label:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("a",{href:"".concat(null==T?void 0:T.getBasePath(),"swagger-ui/index.html"),target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("span",{children:w("Navigation.swagger")})})})});var U=[];return N.length>0&&U.push({key:"general",label:w("Navigation.content"),children:N}),B.length>0&&U.push({key:"status",label:w("Navigation.status"),children:B}),O.length>0&&U.push({key:"settings",label:w("Navigation.configuration"),children:O}),(0,l.jsx)(n1.A,{className:"navigation-menu",defaultSelectedKeys:["1"],mode:"inline",theme:"dark",inlineCollapsed:void 0!==b&&b,onSelect:function(e){var t=e.key;C("".concat(S().appPrefix,"/portal/").concat(t))},selectedKeys:v()(E)?[]:[E],defaultOpenKeys:["general"],items:U})};var n3=n(47152),n4=n(16370),n5=n(85402),n8=n(9213),n6=function(){function e(t){(0,O._)(this,e),(0,e_._)(this,"keycloak",void 0),this.keycloak=null==t?void 0:t.keycloak}return(0,U._)(e,[{key:"getMetric",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/metrics/").concat(e),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()];case 3:return t=n.sent(),nv.A.error("Error while reading the metric: ".concat(t)),[2,Promise.reject()];case 4:return[2]}})}).call(this)}}]),e}();let n7=function(e){var t,n=e.type,s=e.prefixRenderer,c=e.suffixRenderer,u=e.titleRenderer,d=e.valueRenderer,f=(0,e0._)(e,["type","prefixRenderer","suffixRenderer","titleRenderer","valueRenderer"]),h=(0,i._)((0,o.useState)(!1),2),p=h[0],m=h[1],g=(0,i._)((0,o.useState)(),2),v=g[0],y=g[1],b=G(),x=(0,o.useCallback)(function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return m(!0),[4,new n6({keycloak:null==b?void 0:b.getKeycloak()}).getMetric(n)];case 1:return y(e.sent()),m(!1),[2]}})})()},[b,n]);return(0,o.useEffect)(function(){x()},[x]),(0,l.jsx)(n8.A,{loading:p,actions:[(0,l.jsx)(e6.A,{title:"Reload",mouseEnterDelay:.5,children:(0,l.jsx)(et.Ay,{onClick:x,children:(0,l.jsx)(n5.A,{})})},"tooltip")],children:(0,l.jsx)(eJ.A,(0,W._)({value:null==v||null==(t=v.measurements[0])?void 0:t.value,prefix:e5()(s)?s(v):null,suffix:e5()(c)?c(v):null,title:e5()(u)?u(v):(0,l.jsx)(e6.A,{title:null==v?void 0:v.description,children:(0,l.jsx)("span",{children:null==v?void 0:v.description})}),formatter:function(e){return e5()(d)?d(e,v):e},valueStyle:{color:"#3f8600"}},f))})},n9=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"jdbc.connections.active"},t))},re=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"jvm.memory.used",valueRenderer:function(e){var t=9537e-10*Number(e);return(0,l.jsx)("span",{children:t.toFixed(2)})},suffixRenderer:function(){return(0,l.jsx)("span",{children:"MB"})}},t))},rt=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"jvm.threads.live"},t))},rn=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"process.cpu.usage"},t))},rr=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"process.start.time",valueRenderer:function(e){var t=ep()(1e3*Number(e)).format("llll");return(0,l.jsx)("span",{children:t})}},t))},ri=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"process.uptime",valueRenderer:function(e){var t=ep().utc(1e3*Number(e)).format("HH:mm:ss");return(0,l.jsx)("span",{children:t})},suffixRenderer:function(){return(0,l.jsx)("span",{children:"HH:mm:ss"})}},t))},ra=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"system.cpu.count"},t))},rl=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"system.cpu.usage"},t))},ro=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"system.load.average.1m"},t))},rs=function(){var e=(0,x.Zp)(),t=(0,y.useTranslation)().t;return(0,l.jsxs)("div",{className:"metrics-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return e(-1)},title:t("Metrics.title"),subTitle:t("Metrics.info")}),(0,l.jsxs)("div",{className:"metrics-card-container",children:[(0,l.jsxs)(n3.A,{gutter:[16,16],children:[(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(n9,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rt,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(re,{})})]}),(0,l.jsxs)(n3.A,{gutter:[16,16],children:[(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rn,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(ra,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rl,{})})]}),(0,l.jsxs)(n3.A,{gutter:[16,16],children:[(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rr,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(ri,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(ro,{})})]})]})]})},rc=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,y.useTranslation)().t,r=M(function(e){return e.infoModal}),i=M(function(e){return e.appInfo}),a=D(),o=function(){a((0,B.L)(!r))};return(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"application-info-modal",title:n("ApplicationInfoModal.clientAbout"),centered:!0,open:r,onOk:o,onCancel:o,footer:null},t),{children:[(0,l.jsx)("img",{className:"shogun-logo",src:w}),(0,l.jsx)(eJ.A,{title:n("ApplicationInfoModal.clientVersion"),value:"18.0.0"}),(0,l.jsx)(eJ.A,{title:n("ApplicationInfoModal.backendVersion"),value:"".concat(i.version," (").concat(i.buildTime,")")})]}))};var ru=n(55156),rd=n(63129),rf=function(e){var t=e.actions,n=e.icon,r=e.className,i=e.children,a=e.columns,o=(e.rows,e.title),s=(0,e0._)(e,["actions","icon","className","children","columns","rows","title"]);return(0,l.jsxs)("div",(0,eT._)((0,W._)({className:"dashboard ".concat(r||"")},s),{children:[(0,l.jsxs)("div",{className:"header",children:[n&&(0,l.jsx)("img",{className:"icon",src:n,alt:"".concat(o," icon")}),(0,l.jsx)("div",{className:"title",children:o}),(0,l.jsx)("div",{className:"actions",children:t})]}),(0,l.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(".concat(void 0===a?2:a,", 1fr)")},children:i})]}))},rh=function(e){var t=e.className,n=e.actions,r=e.avatar,i=e.children,a=e.description,o=e.hoverable,s=e.title,c=(0,e0._)(e,["className","actions","avatar","children","description","hoverable","title"]);return(0,l.jsxs)(n8.A,(0,eT._)((0,W._)({},c),{className:"dashboard-card ".concat(void 0!==o&&o?"hoverable":""," ").concat(t||""),actions:n,children:[(0,l.jsx)(n8.A.Meta,{avatar:r,title:s,description:a}),(0,l.jsx)("div",{className:"dashboard-card-body",children:i})]}))};let rp=function(e){var t=e.service,n=e.name,s=(0,y.useTranslation)().t,c=(0,i._)((0,o.useState)(-1),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)(),2),h=f[0],p=f[1];return!h&&u<0&&(0,r._)(function(){var e;return(0,a.YH)(this,function(n){switch(n.label){case 0:p("loading"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,null==t?void 0:t.findAll({page:0,size:1})];case 2:return d(n.sent().totalElements),p("done"),[3,4];case 3:return e=n.sent(),p("failed"),ev.A.error("Could not fetch entities due to the following error: ".concat(e)),[3,4];case 4:return[2]}})})(),(0,l.jsx)("div",{className:"statistics-card",children:(0,l.jsx)(eJ.A,{title:s("DashboardStatistics.statisticsTitle"),value:"".concat(u," ").concat(u>0?n.plural:n.singular)})})},rm=function(){var e,t,n,r,i=(0,y.useTranslation)().t,a=S().dashboard,o=G();return v()(o)?null:(0,l.jsxs)(rf,{className:"welcome-dashboard",title:"Dashboard",columns:3,children:[(null==a||null==(e=a.statistics)?void 0:e.visible)&&(0,l.jsx)(rh,{className:"statistics-dashboard-card",title:"Statistiken",description:"… wie siehts denn aus",avatar:(0,l.jsx)(ru.A,{}),children:(0,l.jsxs)(n3.A,{gutter:16,children:[(0,l.jsx)(n4.A,{span:12,children:(0,l.jsx)(eJ.A,{title:"Feedback",value:1128,prefix:(0,l.jsx)(rd.A,{})})}),(0,l.jsx)(n4.A,{span:12,children:(0,l.jsx)(eJ.A,{title:"Unmerged",value:93,suffix:"/ 100"})})]})}),(null==a||null==(t=a.applications)?void 0:t.visible)&&(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/application"),children:(0,l.jsx)(rh,{className:"layer-dashboard-card",title:i("WelcomeDashboard.applications"),description:i("WelcomeDashboard.applicationInfo"),avatar:(0,l.jsx)(nH.A,{}),children:(0,l.jsx)(rp,{service:o.application(),name:{singular:i("WelcomeDashboard.applicationSingular"),plural:i("WelcomeDashboard.applicationPlural")}})})}),(null==a||null==(n=a.layers)?void 0:n.visible)&&(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/layer"),children:(0,l.jsx)(rh,{className:"layer-dashboard-card",title:i("WelcomeDashboard.layer"),description:i("WelcomeDashboard.layerInfo"),avatar:(0,l.jsx)(nW.A,{}),children:(0,l.jsx)(rp,{service:o.layer(),name:{singular:i("WelcomeDashboard.layerSingluar"),plural:i("WelcomeDashboard.layerPlural")}})})}),(null==a||null==(r=a.users)?void 0:r.visible)&&(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/user"),children:(0,l.jsx)(rh,{className:"layer-dashboard-card",title:i("WelcomeDashboard.user"),description:i("WelcomeDashboard.userInfo"),avatar:(0,l.jsx)(nK.A,{}),children:(0,l.jsx)(rp,{service:o.user(),name:{singular:i("WelcomeDashboard.userSingular"),plural:i("WelcomeDashboard.userPlural")}})})})]})};var rg=n(70133);let rv=function(){var e,t=(0,i._)((0,o.useState)(!1),2),n=t[0],s=t[1],c=(0,i._)((0,o.useState)([]),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)(!1),2),h=f[0],p=f[1],m=D(),g=function(e){return(0,r._)(function(){var t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return t={method:"GET",headers:{"Content-Type":"application/json"}},[4,fetch("".concat(S().path.modelConfigs,"/").concat(e.toLowerCase(),".json"),t)];case 1:if(!(n=r.sent()).ok)return[3,3];if(204===n.status)return[2,Promise.reject()];return[4,n.json()];case 2:return[2,r.sent()];case 3:throw ee.Ay.error("Could not load config for model: ".concat(e)),Error(n.statusText);case 4:return[2]}})})()},v=(0,o.useCallback)(function(e,t){"layer"===t&&m((0,rg.M)(e))},[m]),y=function(e){switch(e){case"layer":return[(0,l.jsx)(nP,{},"uploadLayerButton"),(0,l.jsx)(nm,{},"addLayerButton")];case"user":return(0,l.jsx)(nC,{});case"group":return(0,l.jsx)(nb,{});case"role":return(0,l.jsx)(nS,{})}};return(null===S()||void 0===S()?void 0:S().models)&&(null===S()||void 0===S()||null==(e=S().models)?void 0:e.length)!==(null==u?void 0:u.length)&&!h&&(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return p(!0),[4,Promise.all(null===S()||void 0===S()||null==(e=S().models)?void 0:e.map(g))];case 1:return t=n.sent(),er()(t,u)||d(t),p(!1),[2]}})})(),(0,l.jsxs)("div",{className:"portal",children:[(0,l.jsxs)("div",{className:"menu",children:[(0,l.jsx)(et.Ay,{className:"menu-toggle-button",type:"primary",onClick:function(){return s(!n)},children:n?(0,l.jsx)(Q.A,{}):(0,l.jsx)(X.A,{})}),(0,l.jsx)(n2,{collapsed:n,entityConfigs:u})]}),(0,l.jsx)("div",{className:"content",children:(0,l.jsxs)(x.BV,{children:[(0,l.jsx)(x.qh,{path:"/",element:(0,l.jsx)(rm,{})}),!h&&(null==u?void 0:u.map(function(e){return(0,l.jsx)(x.qh,{path:"".concat(null==e?void 0:e.entityType,"/*"),element:(0,l.jsx)(nl,(0,W._)({onEntitiesLoaded:v,slots:{leftToolbar:y(e.entityType)}},e),e.entityType)},e.entityType)})),(0,l.jsx)(x.qh,{path:"imagefile/*",element:(0,l.jsx)(nM,{})}),(0,l.jsx)(x.qh,{path:"status/metrics/*",element:(0,l.jsx)(rs,{})}),(0,l.jsx)(x.qh,{path:"status/logs/*",element:(0,l.jsx)(nB,{})}),(0,l.jsx)(x.qh,{path:"settings/global/*",element:(0,l.jsx)(nL,{})}),(0,l.jsx)(x.qh,{path:"settings/logs/*",element:(0,l.jsx)(nV,{})})]})}),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rc,{})})]})};var ry=n(32511),rb=n(32559),rx=n(54299);let rj=function(){var e=(0,i._)((0,o.useState)(),2),t=e[0],n=e[1],p=(0,i._)((0,o.useState)([]),2),g=p[0],j=p[1],A=(0,o.useRef)(null),w=M(function(e){return e.layerSuggestionList}),C=M(function(e){return e.entityId}),_=D(),T=G(),k=(0,c.dJ)(),E=(0,y.useTranslation)().t;(0,o.useEffect)(function(){(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,null==T?void 0:T.layer().findAllNoPaging()];case 1:return e=n.sent(),v()(e)||_((0,rg.M)(e)),A.current&&A.current.dispose(),[3,3];case 2:return t=n.sent(),m().error(t),[3,3];case 3:return[2]}})})()},[_,T]);var P=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n("loading"),[4,null==T?void 0:T.openapi().getApiDocs("v3")];case 1:return e=a.sent(),_((0,rb.Y)(e)),[4,null==T?void 0:T.info().getAppInfo()];case 2:if(t=a.sent(),v()(t)||_((0,ry.a)(t)),!(null==t?void 0:t.userId))return[3,4];return[4,null==T?void 0:T.user().findOne(t.userId)];case 3:r=a.sent(),v()(r)||_((0,rx.i)(r)),a.label=4;case 4:return n("done"),[3,6];case 5:return i=a.sent(),n("failed"),m().error(i),[3,6];case 6:return[2]}})})()},[_,T]),N=$(),F=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(n=[],!(w&&e)||!(r=w.filter(function(t){return t.id===e})[0]))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,N(r)];case 2:return void 0!==(t=a.sent())&&t.featureTypes[0].properties.forEach(function(e){n.push(e.name)}),[3,4];case 3:return i=a.sent(),m().error(i),n[0]="",[3,4];case 4:return[2,n]}})})()},[N,w]),L=(0,o.useCallback)(function(){k&&(A.current=k.languages.registerCompletionItemProvider("json",{triggerCharacters:["."],provideCompletionItems:function(e,t){return(0,r._)(function(){var n,r,i;return(0,a.YH)(this,function(a){return(n=e.getLineContent(t.lineNumber).trim()).startsWith('"layerId"')?(r=e.getWordAtPosition(t),[2,{suggestions:w.map(function(e){var n,i;return{insertText:null!=(i=null==e||null==(n=e.id)?void 0:n.toString())?i:"",label:"".concat(e.name," (").concat(e.id,")"),kind:k.languages.CompletionItemKind.Value,documentation:"".concat(JSON.stringify(e,null," ")),range:{startColumn:r?r.startColumn:t.column,endColumn:r?r.endColumn:t.column,startLineNumber:t.lineNumber,endLineNumber:t.lineNumber}}})}]):n.startsWith('"propertyName"')?(i=e.getWordAtPosition(t),[2,{suggestions:g.map(function(e){return{insertText:'"'.concat(e,'"'),label:e,kind:k.languages.CompletionItemKind.Value,documentation:"".concat(JSON.stringify(e,null," ")),range:{startColumn:i?i.startColumn:t.column,endColumn:i?i.endColumn:t.column,startLineNumber:t.lineNumber,endLineNumber:t.lineNumber}}})}]):[2]})})()}}))},[k,w,g]);return((0,o.useEffect)(function(){P()},[P]),(0,o.useEffect)(function(){(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,F(C)];case 1:return j(e.sent()),[2]}})})()},[C,F]),(0,o.useEffect)(function(){return L(),function(){A.current&&A.current.dispose()}},[L]),"loading"===t)?(0,l.jsx)(u.Ay,{className:"result-spin",icon:(0,l.jsx)(q,{})}):"failed"===t?(0,l.jsx)(u.Ay,{status:"warning",title:E("App.loadFail")}):(0,l.jsx)(d.Ay,{theme:{cssVar:!0},children:(0,l.jsx)(f.A,{children:(0,l.jsx)("div",{className:"app",children:(0,l.jsxs)(b.Kd,{children:[(0,l.jsx)(H,{}),(0,l.jsx)(s().Suspense,{fallback:(0,l.jsx)(h.A,{className:"suspense-spin",indicator:(0,l.jsx)(q,{})}),children:(0,l.jsxs)(x.BV,{children:[(0,l.jsx)(x.qh,{path:"".concat(S().appPrefix,"/portal/*"),element:(0,l.jsx)(rv,{})}),(0,l.jsx)(x.qh,{path:"".concat(S().appPrefix,"/"),element:(0,l.jsx)(x.C5,{to:"".concat(S().appPrefix,"/portal")})})]})})]})})})})}},80630(e,t,n){"use strict";n.d(t,{Ay:()=>o,DU:()=>l});var r=n(74848),i=n(72660),a=n.n(i)().createContext(void 0),l=function(e){var t=e.client,n=e.children;return(0,r.jsx)(a.Provider,{value:t,children:n})};let o=a},57098(e,t,n){"use strict";var r=n(3371),i=n(8674),a=n(74848);n(75308),n(6);var l=n(72660),o=n.n(l),s=n(72854),c=n(82439),u=n(90697),d=n(69455),f=n(69843),h=n.n(f),p=n(5338),m=n(45135),g=n(25307),v=n.n(g),y=n(4724),b=o().createContext([]),x=function(e){var t=e.plugins,n=e.children;return(0,a.jsx)(b.Provider,{value:t,children:n})},j=n(80630),S=n(97060),A=n(71853),w=n(43710),C=n(81309),_=n(93079),T=n(32511),k=n(69182),E=n(10721),P=n(8267),N=n(70133),F=n(32559),L=n(54299),I=(0,C.iZ)(),D=(0,C.U1)({reducer:(0,_.HY)((0,w._)({appInfo:T.A,userInfo:L.A,infoModal:E.A,openApiDocs:F.A,layerSuggestionList:N.A,entityId:k.A,jsonEditor:P.Ay},void 0)),middleware:function(e){return e().prepend(I.middleware)}}),M=o().lazy(function(){return Promise.all([n.e("644"),n.e("5"),n.e("799")]).then(n.bind(n,35824))});(0,r._)(function(){var e,t,n,o,f,g,b,w,C;return(0,i.YH)(this,function(_){switch(_.label){case 0:if(e=document.getElementById("app"),h()(e))return A.A.error("element not found"),[2];t=(0,p.createRoot)(e),_.label=1;case 1:return _.trys.push([1,4,,5]),[4,(0,r._)(function(){var e,t,n,a,l;return(0,i.YH)(this,function(o){switch(o.label){case 0:if(e=v().security.keycloak.enabled,t=v().security.keycloak.host,n=v().security.keycloak.realm,a=v().security.keycloak.clientId,!e)return A.A.info("Not using the keycloak adapter"),[2,null];if(!t)throw Error("Config key security.keycloak.host is not set");if(!n)throw Error("Config key security.keycloak.realm is not set");if(!a)throw Error("Config key security.keycloak.clientId is not set");return(l=new d.A({url:t,realm:n,clientId:a})).onTokenExpired=function(){return(0,r._)(function(){var e;return(0,i.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,l.updateToken(0)];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),A.A.error("Error while refreshing the access token: ",e),[3,3];case 3:return[2]}})})()},[4,l.init({onLoad:"login-required",checkLoginIframe:!1})];case 1:return o.sent(),[2,l]}})})()];case 2:var T;if(n=null!=(o=_.sent())?o:void 0,!h()(n)&&(f=v().security.keycloak.authorizedRoles||[],g=v().security.keycloak.clientId,!f.some(function(e){return n.hasResourceRole(e,g)})))throw Error("UNAUTHORIZED");return T=n,b=new y.A({url:v().path.shogunBase||"/",keycloak:T}),[4,(0,r._)(function(){var e,t,n,l,o,c,u,d,f,h,p,m,g,y,b,x,j,w,C;return(0,i.YH)(this,function(_){switch(_.label){case 0:if(!v().plugins||0===v().plugins.length)return A.A.info("No plugins found"),[2,[]];A.A.info("Loading plugins"),e=[],t=!0,n=!1,l=void 0,_.label=1;case 1:_.trys.push([1,9,10,11]),o=v().plugins[Symbol.iterator](),_.label=2;case 2:if(t=(c=o.next()).done)return[3,8];if(d=(u=c.value).name,f=u.resourcePath,h=u.exposedPaths,!d)return A.A.error("Required plugin configuration 'name' is not set"),[2,e];if(!f)return A.A.error("Required plugin configuration 'resourcePath' is not set"),[2,e];if(!h)return A.A.error("Required plugin configuration 'exposedPaths' is not set"),[2,e];A.A.info("Loading plugin ".concat(d," (with exposed paths ").concat(h.join(" and "),") from ").concat(f)),p=void 0,_.label=3;case 3:var T,k,E;return _.trys.push([3,5,,6]),[4,(T=d,k=f,E=h,(0,r._)(function(){var e,t,n,r,a,l,o,c,u,d;return(0,i.YH)(this,function(i){switch(i.label){case 0:(0,s.init)({name:"SHOGunAdmin",remotes:[{entry:k,name:T}]}),e=[],t=!0,n=!1,r=void 0,i.label=1;case 1:i.trys.push([1,6,7,8]),a=E[Symbol.iterator](),i.label=2;case 2:if(t=(l=a.next()).done)return[3,5];return o=l.value,c="".concat(T,"/").concat(o.startsWith("./")?o.substring(2):o),[4,(0,s.loadRemote)(c)];case 3:(u=i.sent())&&u.default&&e.push(u.default),i.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return d=i.sent(),n=!0,r=d,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2,e]}})})())];case 4:return p=_.sent(),A.A.info("Successfully loaded plugin ".concat(d)),[3,6];case 5:return m=_.sent(),A.A.error("Could not load plugin ".concat(d,":"),m),[2,e];case 6:g=!0,y=!1,b=void 0;try{for(x=function(){var t=w.value,n=t.component;t.wrappedComponent=function(){return(0,a.jsx)(n,{})},t.i18n&&Object.entries(t.i18n).forEach(function(e){var t=e[0],n=e[1].translation;S.A.addResourceBundle(t,"translation",n,!0,!0)}),e.push(t)},j=p[Symbol.iterator]();!(g=(w=j.next()).done);g=!0)x()}catch(e){y=!0,b=e}finally{try{g||null==j.return||j.return()}finally{if(y)throw b}}_.label=7;case 7:return t=!0,[3,2];case 8:return[3,11];case 9:return C=_.sent(),n=!0,l=C,[3,11];case 10:try{t||null==o.return||o.return()}finally{if(n)throw l}return[7];case 11:return[2,e]}})})()];case 3:return w=_.sent(),t.render((0,a.jsx)(j.DU,{client:b,children:(0,a.jsx)(x,{plugins:w,children:(0,a.jsx)(m.Kq,{store:D,children:(0,a.jsx)(l.Suspense,{children:(0,a.jsx)(M,{})})})})})),[3,5];case 4:return C=_.sent(),A.A.error(C),"UNAUTHORIZED"===C.message?t.render((0,a.jsx)(c.Ay,{status:"403",title:S.A.t("Index.unauthorizedTitle"),extra:(0,a.jsx)(u.Ay,{onClick:function(){return(0,r._)(function(){return(0,i.YH)(this,function(e){switch(e.label){case 0:if(!n)return[3,3];return[4,n.logout()];case 1:return e.sent(),[4,n.login()];case 2:e.sent(),e.label=3;case 3:return[2]}})})()},children:S.A.t("Index.backToLoginButtonText")})})):t.render((0,a.jsx)(c.Ay,{status:"warning",title:S.A.t("Index.errorTitle")})),[3,5];case 5:return[2]}})})()},42492(e,t,n){Promise.all([n.e("644"),n.e("5"),n.e("789"),n.e("725")]).then(n.bind(n,57098))}}]);
|
|
2
|
-
//# sourceMappingURL=common.
|
|
1
|
+
(self.webpackChunk_terrestris_shogun_admin=self.webpackChunk_terrestris_shogun_admin||[]).push([["5"],{71853(e,t,n){"use strict";n.d(t,{A:()=>l});var r,i=n(61586),a=n.n(i);r=a().INFO,a().useDefaults({defaultLevel:r});let l=a()},97060(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(82526),i=n(17508),a=n(34748);(0,r.Yx)(i.A).use(a.initReactI18next).init({resources:{de:{translation:{Index:{unauthorizedTitle:"Sie sind nicht berechtigt, diese Seite zu \xf6ffnen.",errorTitle:"Die Anwendung konnte nicht geladen werden. Pr\xfcfen Sie Ihre Konsole.",backToLoginButtonText:"Zur\xfcck zum Login"},App:{loading:"laden",loadFail:"Die Daten konnten nicht geladen werden. \xdcberpr\xfcfen Sie Ihre Konsole."},FullscreenWrapper:{fullscreen:"Vergr\xf6\xdfern",leaveFullscreen:"Verkleinern"},WelcomeDashboard:{applications:"Applikationen",applicationInfo:"… die die Welt bewegen",applicationSingular:"Applikation",applicationPlural:"Applikationen",layer:"Layer",layerInfo:"… die die Welt bewegen",layerSingluar:"Layer",layerPlural:"Layer",user:"Benutzer",userInfo:"… die die Welt verbessern",userSingular:"Benutzer",userPlural:"Benutzer"},DashboardStatistics:{statisticsTitle:"Insgesamt verf\xfcgbar"},Navigation:{content:"Inhalte",application:"Applikationen",layer:"Layer",user:"Benutzer",group:"Gruppen",status:"Status",metrics:"Metriken",logs:"Logs",logLevels:"Logging-Level",configuration:"Einstellungen",global:"Global",image:"Bilddateien",graphiql:"GraphiQL",swagger:"Swagger"},GeneralEntityRoot:{save:"{{entity}} speichern",reset:"{{entity}} zur\xfccksetzen",create:"{{entity}} erstellen",reminderModal:{title:"\xc4nderungen speichern?",description:"Die \xc4nderungen wurden noch nicht gespeichert, m\xf6chten Sie speichern?",accept:"Speichern",review:"\xc4nderungen zeigen",decline:"Verwerfen"},saveSuccess:"{{entity}} erfolgreich gespeichert",saveWarning:"{{entity}} wurde nicht gespeichert",saveFail:"Konnte {{entity}} nicht speichern",selectRevision:"Revision ausw\xe4hlen"},GeneralEntityTable:{cancelText:"Abbrechen",title:"Entit\xe4t l\xf6schen",contentInfo:'Die Entit\xe4t "{{entityName}}" wird gel\xf6scht!',contentConfirmInfo:"Bitte geben sie zum Best\xe4tigen den Namen ein:",deleteConfirm:"L\xf6schen erfolgreich",deleteConfirmDescript:'Die Entit\xe4t "{{entityName}}" wurde gel\xf6scht!',deleteFail:"L\xf6schen fehlgeschlagen",deleteFailDescript:'Die Entit\xe4t "{{entityName}}" konnte nicht gel\xf6scht werden!',columnId:"ID",columnName:"Name",tooltipReload:"Neu laden",tooltipDelete:"L\xf6schen",popupSearch:"Suche",popupFilter:"Filtern",popupReset:"Zur\xfccksetzen",paging:{nextPage:"N\xe4chste Seite",prevPage:"Vorherige Seite",itemsPerPage:"Seite",jumpTo:"Springe zu",page:"Seite",total:"Total"}},GeneralEntityForm:{userPermissionGridNoIdWarning:"Die Konfiguration muss gespeichert werden, bevor die Benutzerberechtigungen festgelegt werden k\xf6nnen.",groupPermissionGridNoIdWarning:"Die Konfiguration muss gespeichert werden, bevor die Gruppenberechtigungen festgelegt werden k\xf6nnen.",rolePermissionGridNoIdWarning:"Die Konfiguration muss gespeichert werden, bevor die Rollenberechtigungen festgelegt werden k\xf6nnen."},ImageFileRoot:{title:"Bilddateien",subTitle:"… die die Welt zeigen",button:"Bilddatei hochladen",success:"Upload erfolgreich",failure:"Fehler beim Upload",uploadSuccess:"Die Datei {{entityName}} wurde erfolgreich hochgeladen",uploadFailure:"Die Datei {{entityName}} konnte nicht hochgeladen werden"},ImageFileForm:{title:"Bilddatei",name:"Dateiname",uuid:"UUID",public:"\xd6ffentlich",preview:"Vorschau"},Logs:{logs:"Logs",logsInfo:"… die die Welt erkl\xe4ren",refresh:"Aktualisieren",autoReload:"Automatisches Nachladen",warningMessage:"Logs k\xf6nnen nicht angezeigt werden",warningDescribtion:"Hinweis: Um die Logs anzeigen zu k\xf6nnen ist es notwendig, dass die Logs in eine Datei geschrieben werden. Bitte die SHOGun API Konfiguration entsprechend \xfcberpr\xfcfen."},LinkField:{title:"\xd6ffne Link"},Metrics:{title:"Metriken",info:"… die die Welt vermessen"},GlobalSettings:{global:"Einstellungen",globalInfo:"… die die Welt lenken"},LogSettings:{logs:"Einstellungen",logsInfo:"… die die Welt lenken",tableName:"Name",tableLevel:"Level",searchPlaceholder:"Suchen…"},EvictCache:{clear:"Cache leeren",success:"Cache erfolgreich geleert",error:"Fehler beim Leeren des Cache"},User:{settings:"Profileinstellungen",info:"Info",logout:"Ausloggen"},Table:{filterTitle:"Filtermen\xfc",filterConfirm:"OK",filterReset:"Zur\xfccksetzen",filterEmptyText:"Keine Filter",filterCheckall:"Alles ausw\xe4hlen",filterSearchPlaceholder:"In Filtern suchen",emptyText:"Keine Daten",selectAll:"Diese Seite ausw\xe4hlen",selectInvert:"Diese Seite invertieren",selectNone:"Nichts ausw\xe4hlen",selectionAll:"Alles ausw\xe4hlen",sortTitle:"Sortieren",expand:"Zeile ausklappen",collapse:"Zeile einklappen",triggerDesc:"Klicken, um absteigend zu sortieren",triggerAsc:"Klicken, um aufsteigend zu sortieren",cancelSort:"Klicken, um Sortierung zur\xfcckzusetzen"},YesOrNoField:{yes:"Ja",no:"Nein"},InstancePermissionGrid:{loadErrorMsg:"Fehler beim Laden der Berechtigungen",updateErrorMsg:"Fehler beim Aktualisieren der Berechtigung",deleteErrorMsg:"Fehler beim L\xf6schen der Berechtigung",filterInputPlaceholder:"Suche…",filterSearchButtonText:"Suche",filterResetButtonText:"Zur\xfccksetzen",nameColumnTitle:"Name",permissionColumnTitle:"Berechtigung",deletePermissionButtonTooltip:"Berechtigung l\xf6schen"},PermissionSelect:{placeholder:"Berechtigung ausw\xe4hlen…",readLabel:"Lesen",readUpdateLabel:"Aktualisieren",readUpdateDeleteLabel:"Aktualisieren & L\xf6schen",adminLabel:"Besitzer"},PermissionModal:{loadErrorMsg:"Fehler beim Laden der Berechtigungen",openModalButtonTooltipTitle:"Berechtigung hinzuf\xfcgen",title:"Berechtigung hinzuf\xfcgen",paginationTotal:"Total",paginationNextPage:"N\xe4chste Seite",paginationPrevPage:"Vorherige Seite"},GroupPermissionGrid:{modal:{description:"W\xe4hlen Sie eine oder mehrere Gruppen sowie die zugeh\xf6rige Berechtigung aus.",referenceSelectLabel:"Gruppenname",referenceSelectExtra:"W\xe4hlen Sie die Gruppe aus der Liste aus oder geben Sie einen Suchbegriff (Gruppenname) ein",referenceSelectPlaceholder:"Gruppe ausw\xe4hlen…",permissionSelectLabel:"Berechtigung",permissionSelectExtra:"W\xe4hlen Sie die Berechtigung aus, die die Gruppe erhalten sollen.",saveErrorMsg:"Fehler beim Speichern der Berechtigung f\xfcr die Gruppen mit den IDs: {{referenceIds}}"}},UserPermissionGrid:{modal:{description:"W\xe4hlen Sie einen oder mehrere Nutzer sowie die zugeh\xf6rige Berechtigung aus.",referenceSelectLabel:"Nutzername oder Email Adresse",referenceSelectExtra:"W\xe4hlen Sie die Nutzer aus der Liste aus oder geben Sie einen Suchbegriff (Gruppenname oder Email Adresse) ein",referenceSelectPlaceholder:"Nutzer ausw\xe4hlen…",permissionSelectLabel:"Berechtigung",permissionSelectExtra:"W\xe4hlen Sie die Berechtigung aus, die die Nutzer erhalten sollen.",saveErrorMsg:"Fehler beim Speichern der Berechtigung f\xfcr die Nutzer mit den IDs: {{referenceIds}}"}},RolePermissionGrid:{modal:{description:"W\xe4hlen Sie einen oder mehrere Rolle sowie die zugeh\xf6rige Berechtigung aus.",referenceSelectLabel:"Rollenname",referenceSelectExtra:"W\xe4hlen Sie die Rolle aus der Liste aus oder geben Sie einen Suchbegriff (Rollenname) ein",referenceSelectPlaceholder:"Rolle ausw\xe4hlen…",permissionSelectLabel:"Berechtigung",permissionSelectExtra:"W\xe4hlen Sie die Berechtigung aus, die die Rolle erhalten sollen.",saveErrorMsg:"Fehler beim Speichern der Berechtigung f\xfcr die Rollen mit den IDs: {{referenceIds}}"}},ApplicationInfoModal:{clientAbout:"\xdcber",clientVersion:"Admin Version",backendVersion:"Backend Version",buildTime:"Build Zeit",applicationInfo:"Die Standardanwendung",title:"SHOGun-Admin Information"},LayerPreview:{title:"Layervorschau ({{layerName}})",tooltipTitle:"Layervorschau \xf6ffnen",extentErrorMsg:"Fehler beim Zoomen auf die Gesamtansicht des Layers.",addLayerErrorMsg:"Fehler beim Hinzuf\xfcgen des Layers zur Karte.",loadLayerErrorMsg:"Fehler beim Laden des Layers.",extentNotSupportedErrorMsg:"Zoomen auf Gesamtansicht wird f\xfcr diesen Typ nicht unterst\xfctzt."},VerifyProviderDetailsField:{title:"Keine Informationen des Authentication-Providers verf\xfcgbar"},UploadLayerButton:{success:{message:"Layer erfolgreich erstellt",description:"Datei {{fileName}} wurde erfolgreich geladen und der Layer {{layerName}} erstellt"},error:{message:"Konnte Layer nicht erstellen",description:"Fehler beim Hochladen der Datei {{fileName}}",descriptionSize:"Der Upload \xfcberschreitet das Limit von {{maxSize}} MB",descriptionFormat:"Der Dateityp ist nicht unterst\xfctzt ({{supportedFormats}})",descriptionZipContent:"Mehrere Geodatens\xe4tze innerhalb eines Archivs sind nicht unterst\xfctzt"},title:"Layer erstellen"},CreateAllUsersButton:{title:"Nutzer synchronisieren",tooltip:"F\xfcge alle fehlenden Nutzer aus dem Nutzerprovider hinzu",success:"Nutzer erfolgreich erstellt",error:"Fehler beim Erstellen der Nutzer"},CreateAllGroupsButton:{title:"Gruppen synchronisieren",tooltip:"F\xfcge alle fehlenden Gruppen aus dem Gruppenprovider hinzu",success:"Gruppen erfolgreich erstellt",error:"Fehler beim Erstellen der Gruppen"},CreateAllRolesButton:{title:"Rollen synchronisieren",tooltip:"F\xfcge alle fehlenden Rollen aus dem Rollenprovider hinzu",success:"Rollen erfolgreich erstellt",error:"Fehler beim Erstellen der Rollen"},JSONEditor:{formatDocumentTooltip:"Inhalt formatieren (Strg + Umschalt + I)"},CopyToClipboardButton:{tooltip:"In die Zwischenablage kopieren"},AddLayerModal:{title:"WMS Layer hinzuf\xfcgen",requestWmsGetCapabilitiesInstruction:"Bitte geben Sie eine g\xfcltige WMS GetCapabilities Adresse ein und best\xe4tigen Sie die Eingabe mit 'Enter ↲' oder \xfcber den Button rechts vom Eingabefeld.",addAllLayers:"Alle hinzuf\xfcgen",addSelectedLayers:"Auswahl hinzuf\xfcgen",inputPlaceholder:"WMS GetCapabilities URL angeben…",invalidUrlErrorMsg:"Ung\xfcltige URL. Bitte geben Sie eine g\xfcltige URL wie z.B. https://ows.terrestris.de/osm/service ein.",useBearerTokenLabel:"Auth?",useBearerTokenTooltip:"Authentifizierte Anfrage verwenden (f\xfcr interne Dienste)",version:"Version {{version}}",columnTitle:"Titel",columnName:"Name",columnExisting:"Vorhanden",columnPreview:"Layervorschau",errorDescription:"Das Capabilities Dokument konnte nicht geladen werden, bitte \xfcberpr\xfcfen Sie die URL.",existingLayerNote:'Ein Layer mit dem Namen "{{layerName}}" ist bereits vorhanden und \xfcber die folgenden Konfigurationen verf\xfcgbar:'},ToolbarAddLayerButton:{title:"WMS Layer hinzuf\xfcgen",tooltip:"WMS Layer auf Basis eines GetCapabilities Dokuments hinzuf\xfcgen",successMsg:"Layer erfolgreich hinzugef\xfcgt!",errorMsg:"Die Layer konnten nicht hinzugef\xfcgt werden!",warningMsg:"Es konnten nicht alle Layer hinzugef\xfcgt werden!",successSubTitle:"Die folgenden Layer wurden erfolgreich hinzugef\xfcgt:",errorSubTitle:"Die folgenden Layer konnten nicht hinzugef\xfcgt werden:"}}},en:{translation:{Index:{unauthorizedTitle:"You're not authorized to access this page.",errorTitle:"Failed to load the application. Check your console.",backToLoginButtonText:"Back to login"},App:{loading:"loading",loadFail:"Failed to load the initial data. Check your console."},FullscreenWrapper:{fullscreen:"Maximize",leaveFullscreen:"Minimize"},WelcomeDashboard:{applications:"Applications",applicationInfo:"… that move the world",applicationSingular:"Application",applicationPlural:"Applications",layer:"Layers",layerInfo:"… that move the world",layerSingluar:"Layer",layerPlural:"Layers",user:"User",userInfo:"… that improve the world",userSingular:"User",userPlural:"Users"},DashboardStatistics:{statisticsTitle:"Total available"},Navigation:{content:"Content",application:"Application",layer:"Layer",user:"User",group:"Group",status:"Status",metrics:"Metrics",logs:"Logs",logLevels:"Logging levels",configuration:"Configuration",global:"Global",image:"Images",graphiql:"GraphiQL",swagger:"Swagger"},GeneralEntityRoot:{save:"Save {{entity}}",reset:"Reset {{entity}}",create:"Create {{entity}}",reminderModal:{title:"Save changes?",description:"The changes have not yet been saved, do you want to save?",accept:"Save",review:"review changes",decline:"Discard"},saveSuccess:"{{entity}} successfully saved",saveWarning:"{{entity}} has not been saved",saveFail:"Could not save {{entity}}",selectRevision:"Select revision"},GeneralEntityTable:{cancelText:"Cancel",title:"Delete entity",contentInfo:'The entity "{{entityName}}" will be deleted!',contentConfirmInfo:"Please enter the name to confirm:",deleteConfirm:"Delete successful",deleteConfirmDescript:'The entity "{{entityName}}" was deleted',deleteFail:"Deletion failed",deleteFailDescript:'The entity "{{entityName}}" could not be deleted!',columnId:"ID",columnName:"Name",tooltipReload:"Reload",tooltipDelete:"Delete",popupSearch:"Search",popupFilter:"Filter",popupReset:"Reset",paging:{nextPage:"Next page",prevPage:"Previous page",itemsPerPage:"page",jumpTo:"Go to",page:"Page",total:"Total"}},GeneralEntityForm:{userPermissionGridNoIdWarning:"Configuration must be saved before the user permissions can be set.",groupPermissionGridNoIdWarning:"Configuration must be saved before the group permissions can be set.",rolePermissionGridNoIdWarning:"Configuration must be saved before the role permissions can be set."},ImageFileRoot:{title:"Images",subTitle:"… that show the world",button:"Upload image",success:"Upload successful",failure:"Error during upload",uploadSuccess:"The {{entityName}} file was successfully uploaded",uploadFailure:"The file {{entityName}} could not be uploaded"},ImageFileForm:{title:"Image",name:"Filename",uuid:"UUID",public:"Public",preview:"Preview"},Logs:{metric:"Metrics",metricsInfo:"… that measure the world",logs:"Logs",logsInfo:"… that explain the world",refresh:"Refresh",autoReload:"Hot reload",warningMessage:"Error while displaying the logs",warningDescribtion:"Note: In order to be able to display the logs, it is necessary that the logs are written to a file. Please check the SHOGun API configuration accordingly."},LinkField:{title:"Open link"},Metrics:{title:"Metrics",info:"… that measure the world"},GlobalSettings:{global:"Configuration",globalInfo:"… that guide the world"},LogSettings:{logs:"Configuration",logsInfo:"… that guide the world",tableName:"Name",tableLevel:"Level",searchPlaceholder:"Search by…"},EvictCache:{clear:"Clear cache",success:"Successfully cleared the cache",error:"Could not clear the cache"},User:{settings:"Profile settings",info:"Info",logout:"Logout"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},YesOrNoField:{yes:"Yes",no:"No"},ImageFileTable:{imageSingular:"Image",imagePlural:"Images",delete:"Delete {{entity}}",cancel:"Cancel",confirmInfo:"The {{entity}} will be deleted!",conFirmTooltip:"Do you really want to delete the {{entity}} file?",deletionInfo:"{{entity}} has been deleted",deletionDescription:'{{entity}} "{{record}}" has been deleted',deleteFail:"Deletion failed",deleteFailDescript:'The file "{{record}}" could not be deleted!',reloadTooltip:"Reload"},InstancePermissionGrid:{loadErrorMsg:"Error while loading the permissions",updateErrorMsg:"Error while updating the permission",deleteErrorMsg:"Error while deleting the permission",filterInputPlaceholder:"Search…",filterSearchButtonText:"Search",filterResetButtonText:"Reset",nameColumnTitle:"Name",permissionColumnTitle:"Permission",deletePermissionButtonTooltip:"Delete permission"},PermissionSelect:{placeholder:"Select a permission…",readLabel:"Read",readUpdateLabel:"Update",readUpdateDeleteLabel:"Update & Delete",adminLabel:"Owner"},PermissionModal:{loadErrorMsg:"Error while loading the permissions",openModalButtonTooltipTitle:"Add permission",title:"Add permission",paginationTotal:"Total",paginationNextPage:"Next page",paginationPrevPage:"Previous page"},GroupPermissionGrid:{modal:{description:"Select one or more groups and the respective permission.",referenceSelectLabel:"Group name",referenceSelectExtra:"Select groups from the list or search via name.",referenceSelectPlaceholder:"Select groups(s)…",permissionSelectLabel:"Permission",permissionSelectExtra:"Select the permission the groups should be granted.",saveErrorMsg:"Error while setting the permission for groups with IDs: {{referenceIds}}"}},UserPermissionGrid:{modal:{description:"Select one or more users and the respective permission.",referenceSelectLabel:"Username or email address",referenceSelectExtra:"Select users from the list or search via username or email address.",referenceSelectPlaceholder:"Select user(s)…",permissionSelectLabel:"Permission",permissionSelectExtra:"Select the permission the users should be granted.",saveErrorMsg:"Error while setting the permission for users with IDs: {{referenceIds}}"}},RolePermissionGrid:{modal:{description:"Select one or more roles and the respective permission.",referenceSelectLabel:"Role name",referenceSelectExtra:"Select roles from the list or search via role name.",referenceSelectPlaceholder:"Select role(s)…",permissionSelectLabel:"Permission",permissionSelectExtra:"Select the permission the roles should be granted.",saveErrorMsg:"Error while setting the permission for roles with IDs: {{referenceIds}}"}},ApplicationInfoModal:{clientAbout:"About",clientVersion:"Admin version",backendVersion:"Backend version",buildTime:"Build time",applicationInfo:"The default application",title:"SHOGun Admin info"},LayerPreview:{title:"Layer preview ({{layerName}})",tooltipTitle:"Open layer preview",extentErrorMsg:"Could not zoom to the extent of the layer.",addLayerErrorMsg:"Could not add the layer to the map.",loadLayerErrorMsg:"Error while loading the layer.",extentNotSupportedErrorMsg:"Zoom to layer is not supported for this type."},VerifyProviderDetailsField:{title:"No authentication provider information available"},UploadLayerButton:{success:{message:"Layer successfully created",description:"Successfully uploaded file {{fileName}} and created layer {{layerName}}"},error:{message:"Could not create layer",description:"Error while uploading file {{fileName}}",descriptionSize:"The file exceeds the upload limit of {{maxSize}} MB",descriptionFormat:"The given file type does not match the supported ones ({{supportedFormats}})",descriptionZipContent:"Multiple geodatasets within one archive are not supported"},title:"Create layer"},CreateAllUsersButton:{title:"Synchronize users",tooltip:"Add all missing users from the user provider",success:"Successfully created all users",error:"Could not create the users"},CreateAllGroupsButton:{title:"Synchronize groups",tooltip:"Add all missing groups from the group provider",success:"Successfully created all groups",error:"Could not create the groups"},CreateAllRolesButton:{title:"Synchronize roles",tooltip:"Add all missing roles from the role provider",success:"Successfully created all roles",error:"Could not create the roles"},JSONEditor:{formatDocumentTooltip:"Format content (Ctrl + Shift + I)"},CopyToClipboardButton:{tooltip:"Copy to clipboard"},AddLayerModal:{title:"Add WMS layer",requestWmsGetCapabilitiesInstruction:"Please enter a valid WMS GetCapabilities address and load it by pressing 'Enter ↲' or via the button to the right of the input field.",addAllLayers:"Add all",addSelectedLayers:"Add selected",inputPlaceholder:"Enter WMS GetCapabilities URL…",invalidUrlErrorMsg:"Invalid URL. Please enter a valid URL such as https://ows.terrestris.de/osm/service.",useBearerTokenLabel:"Auth?",useBearerTokenTooltip:"Use authenticated request (for internal services)",version:"Version {{version}}",columnTitle:"Title",columnName:"Name",columnExisting:"Available",columnPreview:"Layer preview",errorDescription:"The capabilities document could not be loaded, please check the URL.",existingLayerNote:'A layer with the name "{{layerName}}" is already added and available in the following configurations:'},ToolbarAddLayerButton:{title:"Add WMS layer",tooltip:"Add WMS layer from GetCapabilities document",successMsg:"Layer successfully added",errorMsg:"The layers could not be added",warningMsg:"Not all layers could be added",successSubTitle:"The following layers have been successfully added:",errorSubTitle:"The following layers could not be added:"}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},supportedLngs:["de","en"]});let l=r.Ay},32511(e,t,n){"use strict";n.d(t,{A:()=>a,a:()=>i});var r=(0,n(81309).Z0)({name:"appInfo",initialState:{commitHash:"",version:"",buildTime:"",userId:-1,authorities:[]},reducers:{setAppInfo:function(e,t){return t.payload}}}),i=r.actions.setAppInfo;let a=r.reducer},69182(e,t,n){"use strict";n.d(t,{A:()=>a,L:()=>i});var r=(0,n(81309).Z0)({name:"entityId",initialState:null,reducers:{setEntityId:function(e,t){return t.payload}}}),i=r.actions.setEntityId;let a=r.reducer},10721(e,t,n){"use strict";n.d(t,{A:()=>a,L:()=>i});var r=(0,n(81309).Z0)({name:"shogunInfoVisible",initialState:!1,reducers:{setVisible:function(e,t){return t.payload}}}),i=r.actions.setVisible;let a=r.reducer},8267(e,t,n){"use strict";n.d(t,{$4:()=>a,$Y:()=>l,Ay:()=>o});var r=(0,n(81309).Z0)({name:"jsonEditor",initialState:{originalEditorValues:void 0,isEditedManuallyMap:void 0},reducers:{setOriginalEditorValues:function(e,t){e.originalEditorValues=t.payload},setIsEditedManuallyMap:function(e,t){e.isEditedManuallyMap=t.payload}}}),i=r.actions,a=i.setOriginalEditorValues,l=i.setIsEditedManuallyMap;let o=r.reducer},70133(e,t,n){"use strict";n.d(t,{A:()=>a,M:()=>i});var r=(0,n(81309).Z0)({name:"layerSuggestionList",initialState:[],reducers:{setLayerSuggestionList:function(e,t){return t.payload}}}),i=r.actions.setLayerSuggestionList;let a=r.reducer},32559(e,t,n){"use strict";n.d(t,{A:()=>a,Y:()=>i});var r=(0,n(81309).Z0)({name:"swaggerDocs",initialState:{},reducers:{setOpenApiDocs:function(e,t){return t.payload}}}),i=r.actions.setOpenApiDocs;let a=r.reducer},54299(e,t,n){"use strict";n.d(t,{A:()=>a,i:()=>i});var r=(0,n(81309).Z0)({name:"userInfo",initialState:{authProviderId:"peter@pan.de"},reducers:{setUserInfo:function(e,t){return t.payload}}}),i=r.actions.setUserInfo;let a=r.reducer},35824(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>rj});var r=n(3371),i=n(15082),a=n(8674),l=n(74848),o=n(72660),s=n.n(o),c=n(91893),u=n(82439),d=n(4888),f=n(88040),h=n(28032),p=n(61586),m=n.n(p),g=n(69843),v=n.n(g),y=n(34748),b=n(84976),x=n(47767),j=n(25307),S=n.n(j),A=n(82640),w=n(48388),C=n(41599),_=n(97060),T=C.A.Option;let k=function(){var e=Object.keys(_.A.services.resourceStore.data);return(0,l.jsx)("div",{className:"language-select",children:(0,l.jsx)(C.A,{defaultValue:_.A.language||"en",onChange:function(e){_.A.changeLanguage(e)},children:e.map(function(e){return(0,l.jsx)(T,{value:e,children:e.toUpperCase()},e)})})})};var E=n(70591),P=n(68866),N=n(20506),F=n(76511),L=n(78667),I=n(45135);let D=function(){return(0,I.wA)()};var M=I.d4,R=n(80630);let G=function(){return(0,o.useContext)(R.Ay)};var B=n(10721),O=n(25227),U=n(45098),z=n(83386),Y=function(){function e(){(0,O._)(this,e)}return(0,U._)(e,null,[{key:"getInitials",value:function(e){var t,n,r,i,a=null==e||null==(n=e.providerDetails)||null==(t=n.firstName)?void 0:t.charAt(0),l=null==e||null==(i=e.providerDetails)||null==(r=i.lastName)?void 0:r.charAt(0);return v()(a)||v()(l)?"\uD83D\uDD27":a.toUpperCase()+l.toUpperCase()}},{key:"getGravatarUrl",value:function(e){var t=e.email,n=e.size,r=e.rating,i=e.defaultImage,a=e.force,l=(void 0===t?"":t).toLowerCase(),o=(0,z.md5)(l),s="".concat("https://www.gravatar.com/avatar/").concat(o,"?s=").concat(void 0===n?80:n,"&r=").concat(void 0===r?"g":r,"&d=").concat(void 0===i?"identicon":i);return void 0!==a&&a&&(s="".concat(s,"&f=y")),s}}]),e}();let V=function(){var e,t,n=M(function(e){return e.userInfo}),r=D(),i=(0,y.useTranslation)().t,a=G();if(v()(a))return null;var o=Y.getGravatarUrl({email:(null==(e=n.providerDetails)?void 0:e.email)||"",size:38}),s=(null==n||null==(t=n.providerDetails)?void 0:t.username)||(null==n?void 0:n.authProviderId),c=[];return s&&c.push({label:(0,l.jsx)("div",{className:"user-name",children:(0,l.jsx)("span",{children:s})}),key:"username"},{type:"divider"}),a.getKeycloak()&&c.push({label:i("User.settings"),icon:(0,l.jsx)(E.A,{}),key:"settings"}),c.push({label:i("User.info"),icon:(0,l.jsx)(P.A,{}),key:"info"},{type:"divider"}),c.push({label:i("User.logout"),icon:(0,l.jsx)(N.A,{}),key:"logout"}),(0,l.jsx)(F.A,{className:"user-menu",menu:{style:{width:256},className:"user-chip-menu",items:c,onClick:function(e){switch(e.key){case"info":r((0,B.L)(!0));break;case"settings":var t;null==a||null==(t=a.getKeycloak())||t.accountManagement();break;case"logout":var n=a.getKeycloak();n?n.logout():fetch("/auth/logout",{method:"POST",credentials:"same-origin"}).then(function(e){var t,n;200!==e.status||v()(null===S()||void 0===S()||null==(t=S().security)?void 0:t.tokenName)||(localStorage.removeItem(null===S()||void 0===S()||null==(n=S().security)?void 0:n.tokenName),window.location.href="/")})}}},trigger:["click"],children:(0,l.jsxs)("div",{children:[(0,l.jsx)(L.A,{src:o,size:"large",className:"userimage",children:o?"":Y.getInitials(n)}),(0,l.jsx)("span",{className:"username",children:s})]})})},H=function(){var e,t=(null==(e=S().path)?void 0:e.logo)||w;return(0,l.jsx)("header",{children:(0,l.jsx)(A.z,{className:"page-header",title:(0,l.jsxs)(b.N_,{to:"".concat(S().appPrefix,"/portal"),className:"header-link",children:[(0,l.jsx)("img",{className:"header-logo",src:t}),"SHOGun Admin"]}),extra:[(0,l.jsx)(k,{},"languageselect"),(0,l.jsx)(V,{},"user")]})})};var W=n(43710);let K=n.p+"52d336a1a5815768.gif",q=function(e){return(0,l.jsx)("img",(0,W._)({src:K,alt:"shogun spinner"},e))};var Z=n(69941),J=n(2129);let $=function(){var e=G();return(0,o.useCallback)(function(t){return(0,r._)(function(){var n,r,i,l;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(!(n=t.sourceConfig.url))return[2];return n.endsWith("?")&&(n=n.slice(0,-1)),r={SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:"2.0.0",OUTPUTFORMAT:"application/json",TYPENAMES:t.sourceConfig.layerNames},i={"Content-Type":"application/json"},[4,fetch("".concat(n,"?").concat(Z.Q.objectToRequestString(r)),{method:"GET",headers:t.sourceConfig.useBearerToken?(0,W._)({},i,(0,J.M)(null==e?void 0:e.getKeycloak())):i})];case 1:if(!(l=a.sent()).ok)throw Error("No successful response while executing a WFS DescribeFeatureType");return[4,l.json()];case 2:return[2,a.sent()]}})})()},[e])};var Q=n(565),X=n(86404),ee=n(87959),et=n(90697),en=n(2404),er=n.n(en),ei=n(20156),ea=n(5745),el=n(74315),eo=n(18182),es=n(15001),ec=n(98892),eu=n(82526),ed=n(62193),ef=n.n(ed),eh=n(95093),ep=n.n(eh),em=n(60141),eg=n(45588),ev=n(59648),ey=s().createContext(void 0),eb=function(e){var t=e.value,n=e.children;return(0,l.jsx)(ey.Provider,{value:t,children:n})},ex=n(65321),ej=n.n(ex),eS=n(55367),eA=n(47088),ew=n(32766),eC=function(e){function t(e){return(0,O._)(this,t),(0,eA._)(this,t,[e])}return(0,ew._)(t,e),t}(n(59059).G),e_=n(67476),eT=n(34259),ek=n(5955),eE=n(58156),eP=n.n(eE),eN=n(5287),eF=n.n(eN),eL=n(98023),eI=n.n(eL),eD=n(85015),eM=n.n(eD),eR=n(90179),eG=n.n(eR),eB=n(63560),eO=n.n(eB),eU=n(58673),ez=n(96501),eY=function(){function e(t){var n=t.entity,r=t.revisions,i=t.initialValues,a=t.service,l=t.formConfig,o=t.formValidator;(0,O._)(this,e),(0,e_._)(this,"entity",void 0),(0,e_._)(this,"revisions",void 0),(0,e_._)(this,"initialValues",void 0),(0,e_._)(this,"service",void 0),(0,e_._)(this,"formConfig",void 0),(0,e_._)(this,"formValidator",void 0),(0,e_._)(this,"nextUpdate",void 0),this.formValidator=o,this.service=a,this.formConfig=l,v()(n)||(this.entity=n),v()(r)||(this.revisions=r),this.initialValues=i}return(0,U._)(e,[{key:"getEntity",value:function(){return this.entity}},{key:"setFormValidator",value:function(e){this.formValidator=e}},{key:"load",value:function(e){return(0,r._)(function(){var t,n,r,i,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:return i=this,[4,null==(t=this.service)?void 0:t.findOne(e)];case 1:if(i.entity=a.sent(),!(null==(n=S().entityHistory)?void 0:n.enabled))return[3,3];return o=this,[4,null==(l=this.service)?void 0:l.findAllRevisions(e)];case 2:o.revisions=a.sent(),a.label=3;case 3:if(!eM()(null==(r=this.formConfig)?void 0:r.publicKey))return[3,5];return[4,this.service.isPublic(this.entity.id)];case 4:s=a.sent(),c=this.formConfig.publicKey,this.entity[c]=s,a.label=5;case 5:return this.initializeFormValues(),[2,{entity:this.entity,revisions:this.revisions}]}})}).call(this)}},{key:"loadRevision",value:function(e,t){return(0,r._)(function(){var n,r,i,l,o;return(0,a.YH)(this,function(a){switch(a.label){case 0:return[4,null==(n=this.service)?void 0:n.findRevision(e,t)];case 1:if(!(i=a.sent()))return[2,void 0];if(this.entity=i,!eM()(null==(r=this.formConfig)?void 0:r.publicKey))return[3,3];return[4,this.service.isPublic(this.entity.id)];case 2:l=a.sent(),o=this.formConfig.publicKey,this.entity[o]=l,a.label=3;case 3:return this.initializeFormValues(),[2,this.entity]}})}).call(this)}},{key:"createEntity",value:function(){var e,t=this.create(ez.A);return(null==(e=this.formConfig)?void 0:e.name)==="application"&&(t=this.create(eU.A)),this.entity=t,this.initializeFormValues(),this.entity}},{key:"delete",value:function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:if(v()(null==e?void 0:e.id))return[3,2];return[4,this.service.delete(null==e?void 0:e.id)];case 1:return t.sent(),[2,Promise.resolve()];case 2:return[2,Promise.reject()]}})}).call(this)}},{key:"findAll",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=this.service)?void 0:t.findAll(e)];case 1:return[2,n.sent()]}})}).call(this)}},{key:"updateEntity",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,r._)(function(){var n,r,i,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:n=!0,r=!1,i=void 0,a.label=1;case 1:a.trys.push([1,6,7,8]),l=this.formConfig.fields[Symbol.iterator](),a.label=2;case 2:if(n=(o=l.next()).done)return[3,5];if(s=o.value,!Object.prototype.hasOwnProperty.call(e,s.dataField))return[3,4];return[4,this.setEntityValue(s,structuredClone(e[s.dataField]))];case 3:a.sent(),a.label=4;case 4:return n=!0,[3,2];case 5:return[3,8];case 6:return c=a.sent(),r=!0,i=c,[3,8];case 7:try{n||null==l.return||l.return()}finally{if(r)throw i}return[7];case 8:return this.nextUpdate&&(this.formValidator&&!t?this.formValidator(this.nextUpdate):ev.A.warn("No formValidator set for EntityController or requested to skip validation"),this.nextUpdate=void 0),[2]}})}).call(this)}},{key:"saveOrUpdate",value:function(){return(0,r._)(function(){var e,t,n,r,i,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(n=eI()(null==(e=this.entity)?void 0:e.id),i=(r=this.formConfig.publicKey)?null==(t=this.entity)?void 0:t[r]:void 0,l=eG()(this.entity,["created","modified"].concat((0,ek._)(this.formConfig.fields.filter(function(e){return e.dataField===r||e.readOnly}).map(function(e){return e.dataField})))),n&&(l=(0,eT._)((0,W._)({},l),{id:null==(o=this.entity)?void 0:o.id})),s=this,!n)return[3,2];return[4,this.service.update(l)];case 1:return c=a.sent(),[3,4];case 2:return[4,this.service.add(l)];case 3:c=a.sent(),a.label=4;case 4:if(s.entity=c,!r)return[3,8];if(!i)return[3,6];return[4,this.service.setPublic(this.entity.id)];case 5:return a.sent(),[3,8];case 6:return[4,this.service.revokePublic(this.entity.id)];case 7:a.sent(),a.label=8;case 8:return[2,this.entity]}})}).call(this)}},{key:"getFormConfig",value:function(){return this.formConfig}},{key:"getInitialFormValues",value:function(){return this.initialValues}},{key:"isFieldValid",value:function(e,t){return{validateStatus:"success"}}},{key:"update",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=this.service)?void 0:t.update(e)];case 1:return[2,n.sent()]}})}).call(this)}},{key:"add",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=this.service)?void 0:t.add(e)];case 1:return[2,n.sent()]}})}).call(this)}},{key:"updateFormForDataFields",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=this.formConfig.fields[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;if(Array.isArray(l.dataField)){if(eF()(l.dataField,e)){var o={},s=!0,c=!1,u=void 0;try{for(var d,f=l.dataField[Symbol.iterator]();!(s=(d=f.next()).done);s=!0){var h=d.value;e.includes(h)&&eO()(o,h,eP()(this.entity,h))}}catch(e){c=!0,u=e}finally{try{s||null==f.return||f.return()}finally{if(c)throw u}}this.addFormChange(l.dataField,o)}}else e.includes(l.dataField)&&this.addFormChange(l.dataField,eP()(this.entity,l.dataField))}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"updateFormForComponents",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var a,l=this.formConfig.fields[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var o=a.value;!v()(o.component)&&e.includes(o.component)&&this.addFormChange(o.dataField,t)}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}}},{key:"setEntityValueByFieldConfig",value:function(e,t){if(!v()(this.entity))if(Array.isArray(e.dataField)){var n=!0,r=!1,i=void 0;try{for(var a,l=e.dataField[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var o=a.value;eO()(this.entity,o,eP()(t,o))}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}}else eO()(this.entity,e.dataField,t)}},{key:"getFormValueByFieldConfig",value:function(e){if(!Array.isArray(e.dataField))return eP()(this.entity,e.dataField);var t={},n=!0,r=!1,i=void 0;try{for(var a,l=e.dataField[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var o=a.value;eO()(t,o,eP()(this.entity,o))}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return t}},{key:"initializeFormValues",value:function(){var e={},t=!0,n=!1,r=void 0;try{for(var i,a=this.formConfig.fields[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;e[l.dataField]=this.getFormValue(l)}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}this.initialValues=e}},{key:"getDataFieldValue",value:function(e,t,n){return Array.isArray(e.dataField)&&e.dataField.includes(n)?t[n]:e.dataField===n?t:void 0}},{key:"hasDataFieldValue",value:function(e,t){return Array.isArray(e.dataField)&&e.dataField.includes(t)||e.dataField===t}},{key:"updateDataFieldValue",value:function(e,t,n,r){return Array.isArray(e.dataField)&&e.dataField.includes(n)?Object.assign(t,(0,e_._)({},n,r)):r}},{key:"addFormChangeForDataFields",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=this.formConfig.fields[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var l=i.value;if(Array.isArray(l.dataField)){if(eF()(l.dataField,e)){var o={},s=!0,c=!1,u=void 0;try{for(var d,f=l.dataField[Symbol.iterator]();!(s=(d=f.next()).done);s=!0){var h=d.value;e.includes(h)&&eO()(o,h,eP()(this.entity,h))}}catch(e){c=!0,u=e}finally{try{s||null==f.return||f.return()}finally{if(c)throw u}}this.addFormChange(l.dataField,o)}}else e.includes(l.dataField)&&this.addFormChange(l.dataField,eP()(this.entity,l.dataField))}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"addFormChange",value:function(e,t){this.nextUpdate||(this.nextUpdate={}),this.nextUpdate[e]||(this.nextUpdate[e]={}),this.nextUpdate[e]?Object.assign(this.nextUpdate[e],t):this.nextUpdate[e]=t}},{key:"setEntityValue",value:function(e,t){return(0,r._)(function(){return(0,a.YH)(this,function(n){return this.setEntityValueByFieldConfig(e,t),this.addFormChangeForDataFields([e.dataField]),[2]})}).call(this)}},{key:"getFormValue",value:function(e){var t=this.getFormValueByFieldConfig(e);if(t)return t}},{key:"create",value:function(e){return new e({})}}]),e}(),eV=function(){function e(){(0,O._)(this,e)}return(0,U._)(e,null,[{key:"createController",value:function(t){var n=t.endpoint,r=t.keycloak,i=t.entityType,a=t.formConfig,l=t.formValidator;return"application"===ej()(i)?e.createApplicationController({endpoint:n,keycloak:r,entityType:"application",formConfig:a,formValidator:l}):e.createGenericController({endpoint:n,keycloak:r,entityType:i,formConfig:a,formValidator:l})}},{key:"createApplicationController",value:function(e){return new eY({service:new eS.m({basePath:null==e?void 0:e.endpoint,keycloak:e.keycloak}),formValidator:null==e?void 0:e.formValidator,formConfig:null==e?void 0:e.formConfig})}},{key:"createGenericController",value:function(e){return new eY({service:new eC({basePath:null==e?void 0:e.endpoint,keycloak:e.keycloak}),formValidator:null==e?void 0:e.formValidator,formConfig:null==e?void 0:e.formConfig})}}]),e}(),eH=n(69182),eW=function e(){(0,O._)(this,e)};(0,e_._)(eW,"getTranslationFromConfig",function(e,t){var n=_.A.language,r="#i18n.";return v()(t)||v()(e)?{}:e&&e.startsWith(r)&&t[n]?(e=e.split(r)[1],t[n][e]):e});var eK=n(31035),eq=n(59053),eZ=n(4787),eJ=n(57486),e$=n(68738),eQ=n(88055),eX=n.n(eQ),e0=n(64116),e1=n(88026),e2=n(14678),e3=n.n(e2),e4=n(1882),e5=n.n(e4);let e8=function(e){var t=e.dateFormat,n=e.format,r=void 0===n?"text":n,i=e.formatFunction,a=e.numberOfDigits,o=e.suffix,s=(e.translationPrefix,e.value),c=e.valueKey,u=(0,e0._)(e,["dateFormat","format","formatFunction","numberOfDigits","suffix","translationPrefix","value","valueKey"]);if(e5()(i))return(0,l.jsx)(e1.A.Text,(0,eT._)((0,W._)({className:"displayfield"},u),{children:i(s)}));void 0!==c&&(s=eP()(s,c));var d=s;"date"===r&&s&&(d=ep()(s).format(void 0===t?"DD.MM.YYYY":t)),"json"!==r||ef()(s)||(d=JSON.stringify(s)),Array.isArray(d)&&(d=d.join(", "));var f=!v()(d)&&o?" ".concat(o):"";return e3()(s)?(0,l.jsx)(e1.A.Text,(0,eT._)((0,W._)({className:"displayfield"},u),{children:"".concat(new Intl.NumberFormat("de-DE").format(Number(s.toFixed(void 0===a?2:a)))).concat(f)})):(0,l.jsxs)(e1.A.Text,(0,eT._)((0,W._)({className:"displayfield"},u),{children:[d,f]}))};var e6=n(24850),e7=n(2543),e9=n(82042),te=n(8267),tt=n(25543);let tn=function e(t){var n=this;(0,O._)(this,e),(0,e_._)(this,"document",void 0),(0,e_._)(this,"getEntityDefinition",function(e){if(!v()(null==(r=n.document)||null==(t=r.components)?void 0:t.schemas)){var t,r,a,l,o,s=Object.entries(null!=(o=null==(l=n.document)||null==(a=l.components)?void 0:a.schemas)?o:{}).find(function(t){return(0,i._)(t,1)[0].toLowerCase()===e.toLowerCase()});return s?s[1]:void m().warn("The entity definition for ".concat(e," does not exist ")+"in the OpenAPI specification")}}),(0,e_._)(this,"getPropertyDefinition",function(e,t){var r=n.getEntityDefinition(e);if(r)return r.properties&&r.properties[t]?r.properties[t]:void m().warn("The property definition ".concat(t," for ").concat(e," ")+"does not exist in the OpenAPI specification")}),(0,e_._)(this,"getPropertyRefName",function(e,t){var r=n.getPropertyDefinition(e,t);if(!v()(r))return Object.hasOwn(r,"$ref")?n.getRefName(r):Object.hasOwn(r,"items")&&Object.hasOwn(r.items,"$ref")?n.getRefName(r.items):t}),(0,e_._)(this,"getPropertyType",function(e,t){var r=n.getPropertyDefinition(e,t);if(!v()(r))return Object.hasOwn(r,"type")?r.type:"object"}),(0,e_._)(this,"getJSONSchemaFromDocument",function(e,t,r){var i="http://shogun/shogun-schema-".concat(e.toLocaleLowerCase(),".json"),a=n.createDefinitions(),l=n.getPropertyType(t,r),o={$id:i,$schema:"http://json-schema.org/2020-12/schema#",definitions:a},s=void 0;return"object"!==l||v()(a)||(o=(0,W._)({},o,a[e]),s=(0,tt.validate)({},o)),"array"!==l||v()(a)||(o.items=a[e],o.type="array",s=(0,tt.validate)([],o)),!v()(s)&&(null==s?void 0:s.valid)||m().error("Invalid JSON schema detected: ",null==s?void 0:s.errors),o}),(0,e_._)(this,"createDefinitions",function(){var e,t,r,i,a={};if(!v()(null==(t=n.document)||null==(e=t.components)?void 0:e.schemas)){for(var l in null==(i=n.document)||null==(r=i.components)?void 0:r.schemas)if(!l.match(/^(.+)«(.+)»$/)){var o=eX()(n.document.components.schemas[l]);n.replaceRefs(o),n.applyDiscriminator(o),a[l]=o}return a}}),(0,e_._)(this,"getRefName",function(e){var t,n=null==(t=e.$ref)?void 0:t.split("/");return n[n.length-1]}),(0,e_._)(this,"replaceRefs",function(e){n.walkSchemaDefinition(e,function(e){Object.hasOwn(e,"$ref")&&n.replaceRef(e)})}),(0,e_._)(this,"replaceRef",function(e){e.$ref=n.replaceRefString(e.$ref)}),(0,e_._)(this,"replaceRefString",function(e){var t=e.split("/");return"#/definitions/".concat(t[t.length-1])}),(0,e_._)(this,"applyDiscriminator",function(e){var t,r=function(e){if(Object.hasOwn(e,"$ref")){var i=n.getEntityDefinition(n.getRefName(e));v()(i)?m().warn("Schema definition of ".concat(e," is not defined.")):n.walkSchemaDefinition(i,r)}else e.discriminator&&(t=e.discriminator)};n.walkSchemaDefinition(e,function(e){if(!Object.hasOwn(e,"$ref")&&Object.hasOwn(e,"oneOf")&&!v()(null==e?void 0:e.oneOf)){var a=[],l=!0,o=!1,s=void 0;try{for(var c,u=e.oneOf[Symbol.iterator]();!(l=(c=u.next()).done);l=!0){var d=c.value;if(n.walkSchemaDefinition(d,r),t){var f=t.propertyName,h=t.mapping;if(h){var p=!0,m=!1,g=void 0;try{for(var y,b=Object.entries(h)[Symbol.iterator]();!(p=(y=b.next()).done);p=!0){var x,j=(0,i._)(y.value,2),S=j[0],A=j[1],w={if:{properties:{},required:[]},then:{$ref:void 0}};w.if.properties[f]={},w.if.properties[f].const=S,v()(null==w||null==(x=w.if)?void 0:x.required)||w.if.required.push(f),w.then.$ref=n.replaceRefString(A),a.push(w)}}catch(e){m=!0,g=e}finally{try{p||null==b.return||b.return()}finally{if(m)throw g}}}}}}catch(e){o=!0,s=e}finally{try{l||null==u.return||u.return()}finally{if(o)throw s}}a.length>0&&(delete e.oneOf,e.allOf=a)}})}),(0,e_._)(this,"walkSchemaDefinition",function(e,t){if(t&&t(e),!Object.hasOwn(e,"$ref")){var r=e.type;if(e.properties){var i=!0,a=!1,l=void 0;try{for(var o,s=Object.values(e.properties)[Symbol.iterator]();!(i=(o=s.next()).done);i=!0){var c=o.value;n.walkSchemaDefinition(c,t)}}catch(e){a=!0,l=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw l}}}if(e.allOf){var u=!0,d=!1,f=void 0;try{for(var h,p=e.allOf[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var m=h.value;n.walkSchemaDefinition(m,t)}}catch(e){d=!0,f=e}finally{try{u||null==p.return||p.return()}finally{if(d)throw f}}}if(e.anyOf){var g=!0,v=!1,y=void 0;try{for(var b,x=e.anyOf[Symbol.iterator]();!(g=(b=x.next()).done);g=!0){var j=b.value;n.walkSchemaDefinition(j,t)}}catch(e){v=!0,y=e}finally{try{g||null==x.return||x.return()}finally{if(v)throw y}}}if(e.oneOf){var S=!0,A=!1,w=void 0;try{for(var C,_=e.oneOf[Symbol.iterator]();!(S=(C=_.next()).done);S=!0){var T=C.value;n.walkSchemaDefinition(T,t)}}catch(e){A=!0,w=e}finally{try{S||null==_.return||_.return()}finally{if(A)throw w}}}e.not&&n.walkSchemaDefinition(e.not,t),"array"===r&&n.walkSchemaDefinition(e.items,t)}}),this.document=t.document};var tr=n(30513);let ti=function(e){var t=e.value,n=e.feedbackDuration,s=void 0===n?3e3:n,c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,y.useTranslation)().t;return(0,l.jsx)(e6.A,{title:f("CopyToClipboardButton.tooltip"),children:(0,l.jsx)(et.Ay,{className:"copy-to-clipboard-btn",onClick:function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,(0,r._)(function(){var e;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(!t)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,navigator.clipboard.writeText(t)];case 2:return n.sent(),d(!0),setTimeout(function(){d(!1)},s),[3,4];case 3:return e=n.sent(),ev.A.error("Could not copy text to clipboard: ",e),[3,4];case 4:return[2]}})})()];case 1:return e.sent(),[2]}})})()},icon:(0,l.jsx)(tr.A,{}),children:(0,l.jsx)("div",{className:u?"feedback-icon":"feedback-icon hidden",children:(0,l.jsx)("div",{className:u?"checkmark":"checkmark-hidden"})})})})};var ta=n(28069),tl=n(96458);let to=function(e){var t=e.children,n=(0,i._)((0,o.useState)(!1),2),r=n[0],a=n[1],s=(0,o.useRef)(null),c=(0,y.useTranslation)().t,u=(0,o.useCallback)(function(){var e=document.querySelector(".content"),t=document.querySelector(".content .left-container"),n=s.current;if(n)if(e&&t&&r){var i=e.getBoundingClientRect(),a=t.getBoundingClientRect();n.style.left="".concat(i.left+2,"px"),n.style.top="".concat(a.top,"px"),n.style.width="".concat(i.width-6,"px"),n.style.height="".concat(a.height-4,"px")}else n.style.left="",n.style.top="",n.style.width="",n.style.height="20em"},[r]),d=(0,o.useCallback)(function(){u()},[u]);(0,o.useEffect)(function(){var e=document.querySelector(".content .left-container");if(e){var t=new ResizeObserver(d);return t.observe(e),function(){t.disconnect()}}},[d]),(0,o.useEffect)(function(){u()},[u]);var f=function(){a(!r)};(0,em.vC)("esc",function(){f()},{enabled:r,enableOnFormTags:["INPUT","TEXTAREA","SELECT"]},[r]);var h="fs-wrapper".concat(r?" fullscreen":"");return(0,l.jsxs)("div",{className:h,ref:s,children:[(0,l.jsx)(e6.A,{title:c(r?"FullscreenWrapper.leaveFullscreen":"FullscreenWrapper.fullscreen"),placement:"left",mouseEnterDelay:1,mouseLeaveDelay:0,children:(0,l.jsx)(et.Ay,{icon:r?(0,l.jsx)(ta.A,{}):(0,l.jsx)(tl.A,{}),size:"small",onClick:f})}),t]})};c.wG.config({monaco:e9});let ts=function(e){var t,n=e.initialValue,u=e.onChange,d=e.editorProps,f=e.entityType,h=e.dataField,p=e.indentSize,g=void 0===p?2:p,b=(0,i._)((0,o.useState)(JSON.stringify(n||void 0,null,g)),2),x=b[0],j=b[1],A=(0,i._)((0,o.useState)(!1),2),w=A[0],C=A[1],_=M(function(e){return e.openApiDocs}),T=M(function(e){return e.jsonEditor.originalEditorValues}),k=M(function(e){return e.jsonEditor.isEditedManuallyMap}),E=null==T?void 0:T["".concat(f,".").concat(h)],P=null==(t=S().entityHistory)?void 0:t.enabled,N=(0,y.useTranslation)().t,F=(0,c.dJ)(),L=D();void 0===E&&x&&L((0,te.$4)((0,W._)((0,e_._)({},"".concat(f,".").concat(h),x),T)));var I=(0,o.useRef)(null),R=(0,o.useRef)(null),G=(0,o.useMemo)(function(){return{lineHeight:20,scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,tabSize:g}},[g]),B=(0,o.useMemo)(function(){return new tn({document:_})},[_]),O=(0,o.useCallback)(function(){if(F){var e,t=B.getPropertyRefName(f,h);if(!v()(t)){var n=B.getJSONSchemaFromDocument(t,f,h);if(!v()(F.languages.json.jsonDefaults.diagnosticsOptions.schemas)){var r=(0,ek._)(eX()(F.languages.json.jsonDefaults.diagnosticsOptions.schemas)).concat([{uri:null!=(e=n.$id)?e:(0,e7.uniqueId)("json-schema-id"),fileMatch:["".concat(t,".json")],schema:n}]);F.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,validate:!0,trailingCommas:"error",schemaValidation:"error",comments:"error",schemas:r})}}}},[F,h,f,B]);(0,o.useEffect)(function(){O()},[O]);var U=s().useMemo(function(){return x===E},[x,E]),z=(0,o.useCallback)(function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:if(!R.current||!(e=R.current.getAction("editor.action.formatDocument")))return[2];return[4,e.run()];case 1:return t.sent(),[2]}})})()},[]),Y=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return I.current=e,[4,z()];case 1:return t.sent(),C(!0),[2]}})})()},[z]),V=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return R.current=e,[4,z()];case 1:return t.sent(),C(!0),[2]}})})()},[z]),H=null==k?void 0:k["".concat(f,".").concat(h)];return(0,l.jsx)(to,{children:(0,l.jsxs)("div",{className:"json-editor",children:[(0,l.jsxs)("div",{className:"json-editor-toolbar",children:[(0,l.jsx)(e6.A,{title:N("JSONEditor.formatDocumentTooltip"),children:(0,l.jsx)(et.Ay,{onClick:function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,z()];case 1:return e.sent(),[2]}})})()},icon:(0,l.jsx)(Q.A,{})})}),(0,l.jsx)(ti,{value:x})]}),U||!P||H?(0,l.jsx)(c.KE,(0,W._)({onMount:V,value:x,onChange:function(e){if(L((0,te.$Y)((0,W._)((0,e_._)({},"".concat(f,".").concat(h),!0),k))),j(e),w){if(v()(e)){null==u||u();return}try{var t=JSON.parse(e);null==u||u(t)}catch(t){0===e.length&&(null==u||u()),m().trace("JSON-Editor: ",t)}}},path:B.getPropertyRefName(f,h)?"".concat(B.getPropertyRefName(f,h),".json"):void 0,language:"json",options:G},d)):(0,l.jsx)(c.zC,{onMount:Y,original:E,modified:x,language:"json",keepCurrentOriginalModel:!0,keepCurrentModifiedModel:!0,options:{originalEditable:!1,readOnly:!0,renderSideBySide:!1}})]})})};var tc=n(54593),tu=function(e){return(null==e?void 0:e.name)!=="fullscreen"&&e};let td=function(e){var t=e.value,n=e.onChange,r=void 0===n?function(){}:n,a=(0,i._)(s().useState(),2),c=a[0],u=a[1];return(0,o.useEffect)(function(){u(t)},[t]),(0,l.jsx)(to,{children:(0,l.jsx)(tc.Ay,{value:c,commandsFilter:tu,onChange:function(e){u(e),r(e)},highlightEnable:!1})})};var tf=n(20736),th=n(59499),tp=n(73133),tm=n(45812),tg=n(68940),tv=n(71500),ty=n(38017),tb=n(24464),tx=n(62440);let tj=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,y.useTranslation)().t;return(0,l.jsx)(C.A,(0,W._)({placeholder:n("PermissionSelect.placeholder"),options:[{label:n("PermissionSelect.readLabel"),value:"READ"},{label:n("PermissionSelect.readUpdateLabel"),value:"READ_UPDATE"},{label:n("PermissionSelect.readUpdateDeleteLabel"),value:"READ_UPDATE_DELETE"},{label:n("PermissionSelect.adminLabel"),value:"ADMIN"}]},t))},tS=function(e){var t=e.entityId,n=e.setInstancePermission,s=e.getReferences,c=e.toTag,u=e.tagRenderer,d=e.onSave,f=void 0===d?function(){}:d,h=e.descriptionText,p=e.referenceLabelText,g=e.referenceExtraText,v=e.referenceSelectPlaceholderText,b=e.permissionSelectLabel,x=e.permissionSelectExtra,j=e.saveErrorMsg,S=void 0===j?function(){return""}:j,A=(0,e0._)(e,["entityId","setInstancePermission","getReferences","toTag","tagRenderer","onSave","descriptionText","referenceLabelText","referenceExtraText","referenceSelectPlaceholderText","permissionSelectLabel","permissionSelectExtra","saveErrorMsg"]),w=(0,i._)((0,o.useState)(!1),2),_=w[0],T=w[1],k=(0,i._)((0,o.useState)(!1),2),E=k[0],P=k[1],N=(0,i._)((0,o.useState)(!1),2),F=N[0],L=N[1],I=(0,i._)((0,o.useState)([]),2),D=I[0],M=I[1],R=(0,i._)((0,o.useState)(),2),G=R[0],B=R[1],O=(0,i._)((0,o.useState)(!1),2),U=O[0],z=O[1],Y=(0,i._)((0,o.useState)(1),2),V=Y[0],H=Y[1],K=(0,i._)((0,o.useState)(),2),q=K[0],Z=K[1],J=(0,y.useTranslation)().t,$=(0,i._)(es.A.useForm(),1)[0],Q=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(!s)return[2];T(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,s({page:V-1,size:20})];case 2:if(!(e=n.sent()))throw Error("Failed to load references");return Z(e.totalElements),M(e.content),[3,5];case 3:return t=n.sent(),ee.Ay.error(J("PermissionModal.loadErrorMsg")),m().error(t),[3,5];case 4:return T(!1),[7];case 5:return[2]}})})()},[s,J,V]);(0,o.useEffect)(function(){F&&Q()},[F,Q]),(0,o.useEffect)(function(){Array.isArray(D)&&B(D.map(c))},[D,c]);var X=(0,o.useCallback)(function(e){return(0,l.jsxs)("div",{className:"permission-modal-reference-dropdown",children:[e,(0,l.jsx)(tv.A,{}),(0,l.jsx)(ty.A,{total:q,showTotal:function(e){return"".concat(J("PermissionModal.paginationTotal"),": ").concat(e)},locale:{next_page:J("PermissionModal.paginationNextPage"),prev_page:J("PermissionModal.paginationPrevPage")},onChange:function(e){H(e)},current:V,pageSize:20,size:"small"})]})},[V,q,J]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e6.A,{title:J("PermissionModal.openModalButtonTooltipTitle"),children:(0,l.jsx)(et.Ay,{type:"primary",onClick:function(){z(!U)},icon:(0,l.jsx)(tg.A,{})})}),(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"permission-modal",title:J("PermissionModal.title"),open:U,onCancel:function(){$.resetFields(),z(!1)},onOk:function(){return(0,r._)(function(){var e,r,i,l,o,s,c,u,d,h,p,g,v;return(0,a.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,$.validateFields()];case 1:return a.sent(),[3,3];case 2:return e=a.sent(),ev.A.error("Could not validate fields to the following error: ".concat(e)),[2];case 3:i=(r=$.getFieldsValue()).referenceIds,l=r.permission,o=[],P(!0),s=!0,c=!1,u=void 0,a.label=4;case 4:a.trys.push([4,11,12,13]),d=i[Symbol.iterator](),a.label=5;case 5:if(s=(h=d.next()).done)return[3,10];p=h.value,a.label=6;case 6:return a.trys.push([6,8,,9]),[4,n(t,p,l)];case 7:return a.sent(),[3,9];case 8:return g=a.sent(),o.push(p),m().error(g),[3,9];case 9:return s=!0,[3,5];case 10:return[3,13];case 11:return v=a.sent(),c=!0,u=v,[3,13];case 12:try{s||null==d.return||d.return()}finally{if(c)throw u}return[7];case 13:return o.length>0&&ee.Ay.error(S(o.join(", "))),$.resetFields(),P(!1),z(!1),f(),[2]}})})()},okButtonProps:{loading:E},width:800},A),{children:[(0,l.jsx)("div",{className:"description",children:void 0===h?"":h}),(0,l.jsxs)(es.A,{form:$,layout:"vertical",requiredMark:!1,children:[(0,l.jsx)(es.A.Item,{name:"referenceIds",label:void 0===p?"":p,extra:void 0===g?"":g,rules:[{required:!0}],children:(0,l.jsx)(C.A,{autoFocus:!0,mode:"multiple",allowClear:!0,optionFilterProp:"filterValues",placeholder:void 0===v?"":v,open:F,loading:_,onDropdownVisibleChange:function(){L(!F)},options:G,tagRender:u,dropdownRender:X})}),(0,l.jsx)(es.A.Item,{name:"permission",label:void 0===b?"":b,extra:void 0===x?"":x,rules:[{required:!0}],children:(0,l.jsx)(tj,{})})]})]}))]})},tA=function(e){var t=e.entityId,n=e.getInstancePermissions,s=e.setInstancePermission,c=e.deleteInstancePermission,u=e.toDataType,d=e.modalProps,f=e.nameColumnDefinition,h=(0,e0._)(e,["entityId","getInstancePermissions","setInstancePermission","deleteInstancePermission","toDataType","modalProps","nameColumnDefinition"]),p=(0,i._)((0,o.useState)(!1),2),g=p[0],b=p[1],x=(0,i._)((0,o.useState)([]),2),j=x[0],S=x[1],A=(0,i._)((0,o.useState)([]),2),w=A[0],C=A[1],_=(0,o.useRef)(null),T=(0,y.useTranslation)().t,k=G(),E=(0,o.useCallback)(function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(b(!0),!Number.isFinite(t))return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,n(t)];case 2:return S.apply(void 0,[r.sent()]),[3,5];case 3:return e=r.sent(),ee.Ay.error(T("InstancePermissionGrid.loadErrorMsg")),m().error(e),[3,5];case 4:return b(!1),[7];case 5:return[2]}})})()},[t,n,T]);(0,o.useEffect)(function(){E()},[E]),(0,o.useEffect)(function(){k&&Array.isArray(j)&&C(j.map(u))},[k,j,u]);var P=[(0,W._)({},{title:T("InstancePermissionGrid.nameColumnTitle"),dataIndex:"name",key:"name",defaultSortOrder:"ascend"},{filterDropdown:function(e){var t=e.setSelectedKeys,n=e.selectedKeys,r=e.confirm,i=e.clearFilters;return(0,l.jsxs)("div",{className:"column-search",children:[(0,l.jsx)(eK.A,{ref:_,placeholder:T("InstancePermissionGrid.filterInputPlaceholder"),value:n[0],onChange:function(e){return t(e.target.value?[e.target.value]:[])},onPressEnter:function(){return r()}}),(0,l.jsxs)(tp.A,{children:[(0,l.jsx)(et.Ay,{type:"primary",onClick:function(){return r()},icon:(0,l.jsx)(tf.A,{}),size:"small",children:T("InstancePermissionGrid.filterSearchButtonText")}),(0,l.jsx)(et.Ay,{onClick:function(){e5()(i)&&i(),r()},size:"small",children:T("InstancePermissionGrid.filterResetButtonText")})]})]})},filterIcon:function(e){return(0,l.jsx)(tf.A,{style:{color:e?"#1890ff":void 0}})},onFilter:function(e,t){var n=eP()(t,"name");return!v()(n)&&n.toLowerCase().includes(e.toLowerCase())},filterDropdownProps:{onOpenChange:function(e){e&&setTimeout(function(){var e;return null==(e=_.current)?void 0:e.select()},100)}}},f),{title:T("InstancePermissionGrid.permissionColumnTitle"),dataIndex:"permission",key:"permission",sorter:function(e,t){var n=e.name,r=t.name;return n&&r?null==r?void 0:r.localeCompare(n):0},render:function(e,n){return(0,l.jsx)(tj,{value:n.permission,onSelect:function(e){(0,r._)(function(){var r,i,l;return(0,a.YH)(this,function(a){if(b(!0),!(null==(r=n.reference)?void 0:r.id))return[2];try{s(t,n.reference.id,e),(l=(i=eX()(w)).find(function(e){var t,r;return(null==(t=e.reference)?void 0:t.id)===(null==(r=n.reference)?void 0:r.id)}))&&(l.permission=e),C(i)}catch(e){ee.Ay.error(T("InstancePermissionGrid.updateErrorMsg")),m().error(e)}finally{b(!1)}return[2]})})()}})}},{title:(0,l.jsx)(tS,(0,W._)({entityId:t,onSave:E},d)),key:"operation",className:"operation-column",width:100,fixed:"right",render:function(e,n){return(0,l.jsx)(e6.A,{title:T("InstancePermissionGrid.deletePermissionButtonTooltip"),children:(0,l.jsx)(th.A,{onClick:function(){return(0,r._)(function(){var e,r;return(0,a.YH)(this,function(i){if(b(!0),!(null==(e=n.reference)?void 0:e.id))return[2];try{c(t,n.reference.id),r=w.filter(function(e){var t,r;return(null==(t=e.reference)?void 0:t.id)!==(null==(r=n.reference)?void 0:r.id)}),C(r)}catch(e){ee.Ay.error(T("InstancePermissionGrid.deleteErrorMsg")),m().error(e)}finally{b(!1)}return[2]})})()}})})}}];return(0,l.jsx)(tm.A,(0,W._)({className:"instance-permission-grid",loading:g,columns:P,dataSource:w,size:"small"},h))},tw=function(e){var t=e.entityType,n=(0,e0._)(e,["entityType"]),i=(0,y.useTranslation)().t,s=G(),c=(0,o.useCallback)(function(){return null==s?void 0:s[t].apply(s)},[s,t]),u=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=c())?void 0:t.getGroupInstancePermissions(e)];case 1:return[2,n.sent()]}})})()},[c]),d=(0,o.useCallback)(function(e,t,n){return(0,r._)(function(){var r;return(0,a.YH)(this,function(i){switch(i.label){case 0:return[4,null==(r=c())?void 0:r.setGroupInstancePermission(e,t,n)];case 1:return i.sent(),[2]}})})()},[c]),f=(0,o.useCallback)(function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return[4,null==(n=c())?void 0:n.deleteGroupInstancePermission(e,t)];case 1:return r.sent(),[2]}})})()},[c]),h=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return[4,null==s?void 0:s.group().findAll(e)];case 1:return[2,t.sent()]}})})()},[s]),p=(0,o.useMemo)(function(){return{toTag:function(e){var t,n;return{value:e.id,filterValues:[e.id,e.authProviderId,null==(t=e.providerDetails)?void 0:t.name],label:(0,l.jsx)("span",{children:(null==(n=e.providerDetails)?void 0:n.name)||"ID: ".concat(e.id)})}},getReferences:h,setInstancePermission:d,descriptionText:i("GroupPermissionGrid.modal.description"),referenceLabelText:i("GroupPermissionGrid.modal.referenceSelectLabel"),referenceExtraText:i("GroupPermissionGrid.modal.referenceSelectExtra"),referenceSelectPlaceholderText:i("GroupPermissionGrid.modal.referenceSelectPlaceholder"),permissionSelectLabel:i("GroupPermissionGrid.modal.permissionSelectLabel"),permissionSelectExtra:i("GroupPermissionGrid.modal.permissionSelectExtra"),saveErrorMsg:function(e){return i("GroupPermissionGrid.modal.saveErrorMsg",{referenceIds:e})}}},[h,d,i]);return(0,l.jsx)(tA,(0,W._)({entityType:t,getInstancePermissions:u,setInstancePermission:d,deleteInstancePermission:f,toDataType:function(e){var t,n,r,i;return{key:null==(t=e.group)?void 0:t.id,reference:e.group,name:null==(r=e.group)||null==(n=r.providerDetails)?void 0:n.name,permission:null==(i=e.permission)?void 0:i.name}},nameColumnDefinition:{sorter:function(e,t){var n,r,i,a,l=null==(r=e.reference)||null==(n=r.providerDetails)?void 0:n.name,o=null==(a=t.reference)||null==(i=a.providerDetails)?void 0:i.name;return l&&o?o.localeCompare(l):0}},modalProps:p},n))},tC=function(e){var t=e.entityType,n=(0,e0._)(e,["entityType"]),i=(0,y.useTranslation)().t,s=G(),c=(0,o.useCallback)(function(){return null==s?void 0:s[t].apply(s)},[s,t]),u=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=c())?void 0:t.getRoleInstancePermissions(e)];case 1:return[2,n.sent()]}})})()},[c]),d=(0,o.useCallback)(function(e,t,n){return(0,r._)(function(){var r;return(0,a.YH)(this,function(i){switch(i.label){case 0:return[4,null==(r=c())?void 0:r.setRoleInstancePermission(e,t,n)];case 1:return i.sent(),[2]}})})()},[c]),f=(0,o.useCallback)(function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return[4,null==(n=c())?void 0:n.deleteRoleInstancePermission(e,t)];case 1:return r.sent(),[2]}})})()},[c]),h=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return[4,null==s?void 0:s.role().findAll(e)];case 1:return[2,t.sent()]}})})()},[s]),p=(0,o.useMemo)(function(){return{toTag:function(e){var t,n;return{value:e.id,filterValues:[null==(t=e.providerDetails)?void 0:t.name],label:(0,l.jsx)("span",{children:(null==(n=e.providerDetails)?void 0:n.name)||"ID: ".concat(e.id)})}},getReferences:h,setInstancePermission:d,descriptionText:i("RolePermissionGrid.modal.description"),referenceLabelText:i("RolePermissionGrid.modal.referenceSelectLabel"),referenceExtraText:i("RolePermissionGrid.modal.referenceSelectExtra"),referenceSelectPlaceholderText:i("RolePermissionGrid.modal.referenceSelectPlaceholder"),permissionSelectLabel:i("RolePermissionGrid.modal.permissionSelectLabel"),permissionSelectExtra:i("RolePermissionGrid.modal.permissionSelectExtra"),saveErrorMsg:function(e){return i("RolePermissionGrid.modal.saveErrorMsg",{referenceIds:e})}}},[h,d,i]);return(0,l.jsx)(tA,(0,W._)({entityType:t,getInstancePermissions:u,setInstancePermission:d,deleteInstancePermission:f,toDataType:function(e){var t,n,r,i;return{key:null==(t=e.role)?void 0:t.id,reference:e.role,name:null==(r=e.role)||null==(n=r.providerDetails)?void 0:n.name,permission:null==(i=e.permission)?void 0:i.name}},nameColumnDefinition:{sorter:function(e,t){var n,r,i,a,l=null==(r=e.reference)||null==(n=r.providerDetails)?void 0:n.name,o=null==(a=t.reference)||null==(i=a.providerDetails)?void 0:i.name;return l&&o?l.localeCompare(o):0}},modalProps:p},n))};var t_=n(85196);let tT=function(e){var t,n,r,i,a=e.user,o=(0,e0._)(e,["user"]),s=Y.getGravatarUrl({email:(null==(t=a.providerDetails)?void 0:t.email)||"",size:30});return(0,l.jsxs)("div",{className:"user-avatar",children:[(0,l.jsx)(L.A,(0,W._)({src:s,size:"default",className:"user-avatar-image"},o)),(0,l.jsxs)("div",{className:"user-avatar-name",children:[(0,l.jsx)("span",{children:"".concat(null==(n=a.providerDetails)?void 0:n.firstName," ").concat(null==(r=a.providerDetails)?void 0:r.lastName)}),(0,l.jsx)("span",{children:null==(i=a.providerDetails)?void 0:i.username})]})]})},tk=function(e){var t=e.entityType,n=(0,e0._)(e,["entityType"]),i=(0,y.useTranslation)().t,s=G(),c=(0,o.useCallback)(function(){return null==s?void 0:s[t].apply(s)},[s,t]),u=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,null==(t=c())?void 0:t.getUserInstancePermissions(e)];case 1:return[2,n.sent()]}})})()},[c]),d=(0,o.useCallback)(function(e,t,n){return(0,r._)(function(){var r;return(0,a.YH)(this,function(i){switch(i.label){case 0:return[4,null==(r=c())?void 0:r.setUserInstancePermission(e,t,n)];case 1:return i.sent(),[2]}})})()},[c]),f=(0,o.useCallback)(function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return[4,null==(n=c())?void 0:n.deleteUserInstancePermission(e,t)];case 1:return r.sent(),[2]}})})()},[c]),h=(0,o.useCallback)(function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){return[2,null==s?void 0:s.user().findAll(e)]})})()},[s]),p=(0,o.useMemo)(function(){return{toTag:function(e){var t,n,r,i;return{value:e.id,filterValues:[null==(t=e.providerDetails)?void 0:t.firstName,null==(n=e.providerDetails)?void 0:n.lastName,null==(r=e.providerDetails)?void 0:r.username,null==(i=e.providerDetails)?void 0:i.email],label:(0,l.jsx)(tT,{user:e})}},getReferences:h,tagRenderer:function(e){var t=e.label,n=(0,e0._)(e,["label"]);return(0,l.jsx)(t_.A,(0,eT._)((0,W._)({onMouseDown:function(e){e.preventDefault(),e.stopPropagation()},className:"user-avatar-tag",bordered:!1},n),{children:t}))},setInstancePermission:d,descriptionText:i("UserPermissionGrid.modal.description"),referenceLabelText:i("UserPermissionGrid.modal.referenceSelectLabel"),referenceExtraText:i("UserPermissionGrid.modal.referenceSelectExtra"),referenceSelectPlaceholderText:i("UserPermissionGrid.modal.referenceSelectPlaceholder"),permissionSelectLabel:i("UserPermissionGrid.modal.permissionSelectLabel"),permissionSelectExtra:i("UserPermissionGrid.modal.permissionSelectExtra"),saveErrorMsg:function(e){return i("UserPermissionGrid.modal.saveErrorMsg",{referenceIds:e})}}},[h,d,i]);return(0,l.jsx)(tA,(0,W._)({entityType:t,getInstancePermissions:u,setInstancePermission:d,deleteInstancePermission:f,toDataType:function(e){var t,n,r,i;return{key:null==(t=e.user)?void 0:t.id,reference:e.user,name:null==(r=e.user)||null==(n=r.providerDetails)?void 0:n.username,permission:null==(i=e.permission)?void 0:i.name}},nameColumnDefinition:{sorter:function(e,t){var n,r,i,a,l=null==(r=e.reference)||null==(n=r.providerDetails)?void 0:n.username,o=null==(a=t.reference)||null==(i=a.providerDetails)?void 0:i.username;return l&&o?l.localeCompare(o):0},render:function(e,t){return(0,l.jsx)(tT,{user:t.reference})}},modalProps:p},n))};var tE=n(69739),tP=n(96791);let tN=function(e){var t=e.showIcons,n=void 0===t||t,r=e.value,i=(0,y.useTranslation)().t;return r?(0,l.jsxs)("div",{className:"yes-no-field",children:[(0,l.jsx)("span",{className:"yn-text",children:i("YesOrNoField.yes")}),n&&(0,l.jsx)(tE.default,{})]}):(0,l.jsxs)("div",{className:"yes-no-field",children:[(0,l.jsx)("span",{className:"yn-text",children:i("YesOrNoField.no")}),n&&(0,l.jsx)(tP.default,{})]})},tF=function(e){var t=e.supportedTypes,n=void 0===t?["TILEWMS","VECTORTILE","WFS","WMS","WMSTIME","WMTS","XYZ"]:t,r=e.value,a=e.onChange,s=void 0===a?function(){}:a,c=(0,e0._)(e,["supportedTypes","value","onChange"]),u=(0,i._)((0,o.useState)(r),2),d=u[0],f=u[1];return(0,o.useEffect)(function(){f(r)},[r]),(0,l.jsx)(C.A,(0,W._)({defaultValue:d,value:d,options:function(){var e=[],t=!0,r=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(t=(a=l.next()).done);t=!0){var o=a.value;e.push({label:o,value:o})}}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}return e}(),onChange:function(e){f(e),s(e)}},c))};var tL=eK.A.TextArea;let tI=function(e){var t,n=e.loading,r=e.i18n,i=e.entityId,a=e.formProps,s=e.form,c=e.formConfig,u=(0,o.useContext)(ey),d=(0,y.useTranslation)().t,f=function(e){if(!e.component)return m().warn('FieldConfig for field "'.concat(e.dataField,'" is missing the "component" ')+"property, applying default DisplayField."),(0,l.jsx)(e8,(0,W._)({},e.fieldProps));switch(e.component){case"Switch":return(0,l.jsx)(tN,{});case"Statistic":return p(e);case"DateField":return(0,l.jsx)(e8,(0,W._)({format:"date"},e.fieldProps));default:return(0,l.jsx)(e8,(0,W._)({},e.fieldProps))}},p=function(e){var t,n,r;if(!(null==e?void 0:e.component))return m().error("FieldConfig is missing `component` property."),null;switch(null==e?void 0:e.component){case"TextArea":return(0,l.jsx)(tL,(0,W._)({},null==e?void 0:e.fieldProps));case"Input":return(0,l.jsx)(eK.A,(0,W._)({},null==e?void 0:e.fieldProps));case"Number":return(0,l.jsx)(eq.A,(0,W._)({},null==e?void 0:e.fieldProps));case"Switch":return(0,l.jsx)(eZ.A,(0,W._)({checkedChildren:"On",unCheckedChildren:"Off"},null==e?void 0:e.fieldProps));case"Select":return(0,l.jsx)(C.A,(0,W._)({},null==e?void 0:e.fieldProps));case"LayerTypeSelect":return(0,l.jsx)(tF,(0,W._)({},null==e?void 0:e.fieldProps));case"MarkdownEditor":return(0,l.jsx)(td,(0,W._)({},null==e?void 0:e.fieldProps));case"Statistic":return(0,l.jsx)(eJ.A,(0,W._)({},null==e?void 0:e.fieldProps));case"JSONEditor":return(0,l.jsx)(ts,(0,W._)({entityType:(null==u?void 0:u.entityType)||"",dataField:e.dataField},null==e?void 0:e.fieldProps));case"DisplayField":return(0,l.jsx)(e8,(0,W._)({},null==e?void 0:e.fieldProps));case"DateField":return(0,l.jsx)(e$.A,(0,W._)({format:"DD.MM.YYYY"},null==e?void 0:e.fieldProps));case"UserPermissionGrid":if(i!==s.getFieldValue("id"))return d("GeneralEntityForm.userPermissionGridNoIdWarning");return(0,l.jsx)(tk,(0,W._)({entityId:s.getFieldValue("id"),entityType:null==u||null==(t=u.entityType)?void 0:t.toLowerCase()},null==e?void 0:e.fieldProps));case"GroupPermissionGrid":if(i!==s.getFieldValue("id"))return d("GeneralEntityForm.groupPermissionGridNoIdWarning");return(0,l.jsx)(tw,(0,W._)({entityId:s.getFieldValue("id"),entityType:null==u||null==(n=u.entityType)?void 0:n.toLowerCase()},null==e?void 0:e.fieldProps));case"RolePermissionGrid":if(i!==s.getFieldValue("id"))return d("GeneralEntityForm.rolePermissionGridNoIdWarning");return(0,l.jsx)(tC,(0,W._)({entityId:s.getFieldValue("id"),entityType:null==u||null==(r=u.entityType)?void 0:r.toLowerCase()},null==e?void 0:e.fieldProps));default:return m().error('Cannot create component of type "'.concat(null==e?void 0:e.component,'" with name "').concat(null==e?void 0:e.dataField,'"')),null}},g=eW.getTranslationFromConfig(null==u?void 0:u.entityName,r);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.z,{title:g}),(0,l.jsx)(h.A,{spinning:void 0!==n&&n,children:(0,l.jsx)(es.A,(0,eT._)((0,W._)({className:"general-entity-form",form:s,initialValues:{},labelCol:{span:5},wrapperCol:{span:20},name:null==c?void 0:c.name},a),{children:null==(t=c.fields)?void 0:t.map(function(e){var t,n=eX()(e);(n.label=eW.getTranslationFromConfig(e.label,r),n.readOnly)?t=f(n):n.component?t=p(n):n.dataType?t=(0,l.jsx)(eK.A,(0,W._)({},null==n?void 0:n.fieldProps)):(m().warn("FieldConfig is missing `readOnly`, `component` or `dataType` property."),t=(0,l.jsx)(eK.A,{placeholder:""},null==n?void 0:n.dataField));var i={rules:[]};i.rules=[{required:n.required}],"Switch"===n.component&&(i.valuePropName="checked");var a=n.component,o=n.dataField,c="".concat(null==u?void 0:u.entityType,"-").concat(s.getFieldValue("id"),"-").concat(o||(null==a?void 0:a.toLocaleLowerCase()));return"JSONEditor"===n.component&&(i.valuePropName="initialValue"),(0,l.jsx)(es.A.Item,(0,eT._)((0,W._)({name:o,className:"cls-".concat(o),normalize:n.component?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(e)&&Array.isArray(t)&&e.indexOf("")>=0&&0>t.indexOf("")?[""]:e}:void 0,label:n.label||"Field: ".concat(n.dataField)},i,n.formItemProps),{children:t}),c)})}))})]})};var tD=n(84795),tM=function(){function e(){(0,O._)(this,e)}return(0,U._)(e,null,[{key:"getColumnSearchProps",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.handleSearch,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.handleReset;return{filterDropdown:function(e){var a=e.setSelectedKeys,o=e.selectedKeys,s=e.confirm,c=e.clearFilters;return(0,l.jsxs)("div",{style:{padding:"8px",display:"flex",flexDirection:"column",alignItems:"stretch"},children:[(0,l.jsx)(eK.A,{ref:function(e){n=e},placeholder:"".concat(_.A.t("GeneralEntityTable.popupSearch")," ").concat(t),value:0===o.length||v()(o[0])?"":"".concat(o[0]),onChange:function(e){return a(e.target.value?[e.target.value]:[])},onPressEnter:function(){return r(o,s)},style:{flex:1,marginBottom:8}}),(0,l.jsxs)("div",{style:{display:"flex"},children:[(0,l.jsx)(et.Ay,{type:"primary",onClick:function(){return r(o,s)},icon:(0,l.jsx)(tf.A,{}),size:"small",style:{flex:1,marginRight:8},children:"".concat(_.A.t("GeneralEntityTable.popupFilter"))}),(0,l.jsx)(et.Ay,{onClick:function(){i(c),r(o,s)},size:"small",style:{flex:1},children:"".concat(_.A.t("GeneralEntityTable.popupReset"))})]})]})},filterIcon:function(e){return(0,l.jsx)(tf.A,{style:{color:e?"#1890ff":void 0}})},onFilter:function(e,n){var r,i;return Array.isArray(t)?(t.forEach(function(e,t){return i=0===t?eP()(n,e):eP()(i,e)}),r=i):r=eP()(n,t.split(",")),"".concat(r).toLowerCase().includes("".concat(e).toLowerCase())},filterDropdownProps:{onOpenChange:function(e){e&&setTimeout(function(){return null==n?void 0:n.select()})}}}}},{key:"getSorter",value:function(e){return function(t,n){var r,i,a=null==(r=eP()(t,e))?void 0:r.toString(),l=null==(i=eP()(n,e))?void 0:i.toString();return null==a?void 0:a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"})}}}]),e}();(0,e_._)(tM,"handleSearch",function(e,t){e5()(t)&&t()}),(0,e_._)(tM,"handleReset",function(e){e5()(e)&&e()});var tR=n(4413);let tG=function(e){var t=e.i18n,n=e.value,r=e.template,i=void 0===r?"{}":r,a=e.title,o=void 0===a?"":a,s=(0,e0._)(e,["i18n","value","template","title"]),c=(0,y.useTranslation)().t;return(0,l.jsx)(e6.A,(0,eT._)((0,W._)({title:o?eW.getTranslationFromConfig(o,t):c("LinkField.title")},s),{children:(0,l.jsx)("div",{className:"link-wrapper",children:(0,l.jsx)(tR.A,{onClick:function(){var e=i.replace(/{}/g,n);window.open(e,"_blank")}})})}))};var tB=n(59452);let tO=function(e){var t=e.record,n=e.value,r=e.i18n,i=e.title,a=(0,e0._)(e,["record","value","i18n","title"]),o=(0,y.useTranslation)().t;return t.providerDetails?(0,l.jsx)(l.Fragment,{children:n}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(l.Fragment,{children:n}),(0,l.jsx)(e6.A,(0,eT._)((0,W._)({title:i?eW.getTranslationFromConfig(i,r):o("VerifyProviderDetailsField.title")},a),{children:(0,l.jsx)(tB.A,{className:"provider-details-warning"})}))]})};var tU=n(89035),tz=n(99142),tY=n(94718),tV=n(40883),tH=n.n(tV),tW=n(42863),tK=n.n(tW),tq=n(58269),tZ=n.n(tq),tJ=n(71347),t$=n(63731),tQ=n.n(t$),tX=n(88473),t0=n.n(tX),t1=n(52627),t2=n.n(t1),t3=n(66171),t4=n.n(t3),t5=n(58579),t8=n.n(t5),t6=n(14759),t7=n.n(t6),t9=n(67335),ne=n.n(t9),nt=n(68319),nn=n(72387);let nr=function(e){var t=e.map,n=e.mapDivId,r=e.onRender,i=void 0===r?function(){}:r,a=(0,e0._)(e,["map","mapDivId","onRender"]),s=(0,o.useCallback)(function(e){t&&(null===e?t.setTarget(void 0):t.setTarget(e),i())},[t,i]);return t?(0,l.jsx)("div",(0,W._)({id:void 0===n?"map":n,ref:s,className:"map",role:"presentation"},a)):(0,l.jsx)(l.Fragment,{})},ni=function(e){var t=e.layer,n=(0,e0._)(e,["layer"]),s=(0,i._)((0,o.useState)(!1),2),c=s[0],u=s[1],d=(0,i._)((0,o.useState)(),2),f=d[0],p=d[1],g=(0,i._)((0,o.useState)(),2),b=g[0],x=g[1],j=(0,i._)((0,o.useState)(),2),S=j[0],A=j[1],w=(0,i._)((0,o.useState)(!1),2),C=w[0],_=w[1],T=(0,y.useTranslation)().t,k=G(),E=(0,o.useMemo)(function(){return new nn.A({client:k})},[k]),P=(0,o.useMemo)(function(){return new(tZ())({layers:[new(tK())({source:new(t2())})],target:"",view:new(ne())({center:[0,0],zoom:0})})},[]),N=(0,o.useCallback)(function(){return(0,r._)(function(){var e,n,r,i,l,o;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(!t)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,E.parseLayer(t)];case 2:if(e=a.sent(),P.getAllLayers().filter(function(e){return e.get("shogunId")===t.id}).forEach(function(e){return P.removeLayer(e)}),v()(e)||!(0,tU._)(e,tH())||(n=e.getSource(),v()(n)))return[2];return(0,tU._)(n,tQ())&&((r=n).on("imageloaderror",function(){A(T("LayerPreview.loadLayerErrorMsg"))}),r.on("imageloadend",function(){return A(void 0)})),(0,tU._)(n,t4())&&((i=n).on("tileloaderror",function(){A(T("LayerPreview.loadLayerErrorMsg"))}),i.on("tileloadend",function(){return A(void 0)})),(0,tU._)(n,t7())&&((l=n).on("featuresloaderror",function(){A(T("LayerPreview.loadLayerErrorMsg"))}),l.on("featuresloadend",function(){return A(void 0)})),P.addLayer(e),[3,4];case 3:return o=a.sent(),m().error(o),p(T("LayerPreview.addLayerErrorMsg")),[3,4];case 4:return[2]}})})()},[P,t,E,T]),F=(0,o.useCallback)(function(){return(0,r._)(function(){var e,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,4,5,6]),u(!0),!function(e){if(v()(e))return!1;var t=e.getSource();return(0,tU._)(t,t0())||(0,tU._)(t,t8())}(e=P.getAllLayers().find(function(e){return e.get("shogunId")===t.id})))return[3,2];return[4,nt.A.getExtentForLayer(e,{headers:e.get("useBearerToken")?(0,W._)({},(0,J.M)(null==k?void 0:k.getKeycloak())):{}})];case 1:return n=a.sent(),n=(0,tJ.transformExtent)(n,"EPSG:4326",P.getView().getProjection()),P.getView().fit(n),[3,3];case 2:(0,tU._)(null==e?void 0:e.getSource(),t7())?(r=e.getSource()).on("addfeature",function(){P.getView().fit(r.getExtent())}):x(T("LayerPreview.extentNotSupportedErrorMsg")),a.label=3;case 3:return[3,6];case 4:return i=a.sent(),m().error(i),x(T("LayerPreview.extentErrorMsg")),[3,6];case 5:return u(!1),[7];case 6:return[2]}})})()},[P,t,k,T]);return(0,o.useEffect)(function(){p(void 0),x(void 0)},[t]),(0,o.useEffect)(function(){N()},[N]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e6.A,{title:T("LayerPreview.tooltipTitle"),children:(0,l.jsx)(tz.A,{className:"layer-preview-button",onClick:function(){_(!0)}})}),(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"layer-preview-modal",title:T("LayerPreview.title",{layerName:t.name}),open:C,onCancel:function(){_(!1)},footer:!1},n),{children:[(f||b||S)&&(0,l.jsx)(tY.A,{message:(0,l.jsx)("ul",{children:[f,b,S].filter(function(e){return!!e}).map(function(e){return(0,l.jsx)("li",{children:e},e)})}),type:"warning",showIcon:!0}),(0,l.jsx)(h.A,{spinning:c,children:(0,l.jsx)(nr,{id:"preview-map",map:P,onRender:F})})]}))]})},na=function(e){var t,n,i,s=e.actions,c=void 0===s?["delete"]:s,u=e.controller,d=e.i18n,f=e.tableConfig,h=(0,e0._)(e,["actions","controller","i18n","tableConfig"]),p=(0,x.Zp)(),g=(0,y.useTranslation)().t,b=(0,o.useContext)(ey),j=(0,o.useMemo)(function(){return"".concat(S().appPrefix,"/portal/").concat(null==b?void 0:b.entityType)},[null==b?void 0:b.entityType]);return(0,o.createElement)(tm.A,(0,eT._)((0,W._)({className:"general-entity-table",columns:(t=ef()(null==f?void 0:f.columnDefinition)?[{title:g("GeneralEntityTable.columnId"),key:"id",dataIndex:"id",sorter:tM.getSorter("id"),defaultSortOrder:"ascend"},(0,W._)({title:g("GeneralEntityTable.columnName"),dataIndex:"name",key:"name",sorter:tM.getSorter("name"),defaultSortOrder:"ascend"},tM.getColumnSearchProps("name"))]:null==f||null==(n=f.columnDefinition)?void 0:n.map(function(e){var t,n,r=eX()(e);r.title=eW.getTranslationFromConfig(e.title,d);var i=r.sortConfig,a=r.filterConfig,o=r.cellRenderComponentName,s=r.cellRenderComponentProps,c=r;!ef()(i)&&i.isSortable&&(c=(0,eT._)((0,W._)({},c),{sorter:"name"!==c.dataIndex||tM.getSorter("name"),defaultSortOrder:"name"===c.dataIndex?"ascend":i.sortOrder}));var u=null==r||null==(t=r.dataIndex)?void 0:t.toString();!ef()(a)&&a.isFilterable&&(c=(0,W._)({},c,tM.getColumnSearchProps(u)));var h=null==(n=f.dataMapping)?void 0:n[u];return ef()(o)||(c=(0,eT._)((0,W._)({},c),{render:function(e,t){var n,r=h?h[e]:e;if("JSONCell"===o)return(0,l.jsx)(e8,(0,W._)({value:r,format:"json"},s));if("DateCell"===o)return(0,l.jsx)(e8,(0,W._)({value:r,format:"date"},s));if("LinkCell"===o)return(0,l.jsx)(tG,(0,W._)({i18n:d,value:r},s));if("LayerPreviewCell"===o){if(!(Object.hasOwn(n=t,"type")&&Object.hasOwn(n,"sourceConfig")))return;return(0,l.jsx)(ni,(0,W._)({layer:t},s))}return"VerifyProviderDetailsCell"===o?(0,l.jsx)(tO,(0,W._)({i18n:d,value:r,record:t},s)):(0,l.jsx)(l.Fragment,{children:r})}})),c}),i=[],v()(t)||i.push.apply(i,(0,ek._)(t)),i.push({title:(0,l.jsx)(e6.A,{title:g("GeneralEntityTable.tooltipReload"),children:(0,l.jsx)(tD.A,{onClick:null==b?void 0:b.fetchEntities})}),className:"operation-column",width:100,dataIndex:"operation",key:"operation",render:function(e,t){return(0,l.jsx)("div",{className:"actions",children:c.includes("delete")&&(0,l.jsx)(e6.A,{title:g("GeneralEntityTable.tooltipDelete"),children:(0,l.jsx)(th.A,{onClick:function(){return(0,r._)(function(){var e,n,i,o;return(0,a.YH)(this,function(s){return(e=null==t?void 0:t.id)?((i=t.name||t.title)||(i=e),eo.A.confirm({cancelText:g("GeneralEntityTable.cancelText"),title:g("GeneralEntityTable.title"),content:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:g("GeneralEntityTable.contentInfo",{entityName:i})}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{children:g("GeneralEntityTable.contentConfirmInfo")}),(0,l.jsx)(eK.A,{onChange:function(e){o=e.target.value}})]}),onOk:function(){return(0,r._)(function(){var e,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(!("string"==typeof i?o===eW.getTranslationFromConfig(i,d):parseInt(o,10)===i))return[3,4];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,null==u?void 0:u.delete(t)];case 2:return r.sent(),ec.Ay.info({message:g("GeneralEntityTable.deleteConfirm"),description:g("GeneralEntityTable.deleteConfirmDescript",{entityName:i})}),null==b||null==(e=b.fetchEntities)||e.call(b),[3,4];case 3:return n=r.sent(),ec.Ay.error({message:g("GeneralEntityTable.deleteFail"),description:g("GeneralEntityTable.deleteFailDescript",{entityName:i})}),m().error(n),[3,4];case 4:return[2]}})})()}})):null==b||null==(n=b.fetchEntities)||n.call(b),[2]})})()}})})})}}),i),locale:{filterTitle:g("Table.filterTitle"),filterConfirm:g("Table.filterConfirm"),filterReset:g("Table.filterReset"),filterEmptyText:g("Table.filterEmptyText"),filterCheckAll:g("Table.filterCheckall"),filterSearchPlaceholder:g("Table.filterSearchPlaceholder"),emptyText:g("Table.emptyText"),selectAll:g("Table.selectAll"),selectInvert:g("Table.selectInvert"),selectNone:g("Table.selectNone"),selectionAll:g("Table.selectionAll"),sortTitle:g("Table.sortTitle"),expand:g("Table.expand"),collapse:g("Table.collapse"),triggerDesc:g("Table.triggerDesc"),triggerAsc:g("Table.triggerAsc"),cancelSort:g("Table.cancelSort")},dataSource:null==b?void 0:b.entities,onRow:function(e){return{onClick:function(){return p("".concat(j,"/").concat(e.id))}}},rowKey:"id"},h),{key:null==b?void 0:b.entityType}))},nl=function(e){var t,n,s,c,u=e.i18n,d=e.endpoint,f=e.entityType,h=e.defaultSortField,p=e.entityName,m=void 0===p?"Entit\xe4t":p,g=e.navigationTitle,j=e.subTitle,w=e.formConfig,_=e.tableConfig,T=e.defaultEntity,k=e.onEntitiesLoaded,E=e.slots,P=(0,x.zy)(),N=(0,x.Zp)(),F=D(),L=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/").concat(f,"/:entityId")},P.pathname),I=null==L||null==(t=L.params)?void 0:t.entityId,M=(0,i._)((0,o.useState)(),2),R=M[0],B=M[1],O=(0,i._)((0,o.useState)(),2),U=O[0],z=O[1],Y=(0,i._)((0,o.useState)(),2),V=Y[0],H=Y[1],W=(0,i._)((0,o.useState)(),2),K=W[0],q=W[1],Z=(0,i._)((0,o.useState)(!1),2),J=Z[0],$=Z[1],Q=(0,i._)((0,o.useState)(!0),2),X=Q[0],ee=Q[1],en=(0,i._)((0,o.useState)(!1),2),er=en[0],ed=en[1],eh=(0,i._)((0,o.useState)(!1),2),ey=eh[0],ex=eh[1],ej=(0,i._)((0,o.useState)(!1),2),eS=ej[0],eA=ej[1],ew=(0,i._)((0,o.useState)(),2),eC=ew[0],e_=ew[1],eT=(0,i._)((0,o.useState)(S().defaultPageSize||10),2),ek=eT[0],eE=eT[1],eP=(0,i._)((0,o.useState)(1),2),eN=eP[0],eF=eP[1],eL=(0,i._)((0,o.useState)(h),2),eI=eL[0],eD=eL[1],eM=(0,i._)((0,o.useState)("ascend"),2),eR=eM[0],eG=eM[1],eB=(0,i._)((0,o.useState)(!1),2),eO=eB[0],eU=eB[1],ez=(0,i._)((0,o.useState)(!1),2),eY=ez[0],eK=ez[1],eq=(0,i._)(eo.A.useModal(),2),eZ=eq[0],eJ=eq[1],e$=(0,i._)(es.A.useForm(),1)[0],eQ=G(),eX=(0,y.useTranslation)().t;(0,o.useEffect)(function(){eD(h||void 0),eG("ascend"),eF(1),eU(!1)},[f,h]);var e0=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e$.validateFields(e||[])];case 1:return r.sent(),t=!0,[3,3];case 2:if("errorFields"in(n=r.sent()))t=!1;else throw n;return[3,3];case 3:return ee(t),[2]}})})()},[e$]),e1=(0,o.useCallback)(function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){return e0(null==w?void 0:w.fields.filter(function(e){return e.required}).map(function(e){return e.dataField})),[2]})})()},[null==w?void 0:w.fields,e0]),e2=(0,o.useMemo)(function(){return eV.createController({endpoint:d,keycloak:null==eQ?void 0:eQ.getKeycloak(),entityType:f,formConfig:w,formValidator:e1})},[d,eQ,f,w,e1]),e3=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),ex(!0),[4,null==e2?void 0:e2.load(e)];case 1:return n=(t=a.sent()).entity,r=t.revisions,z(n),e$.resetFields(),e$.setFieldsValue(n),r&&H(r),[3,4];case 2:return i=a.sent(),ev.A.error(i),[3,4];case 3:return ex(!1),[7];case 4:return[2]}})})()},[e$,e2]),e4=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(!f)return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),ed(!0),e=eO?void 0:{page:eN-1,size:ek,sort:{properties:v()(eI)?[]:[eI],order:"ascend"===eR?"asc":"descend"===eR?"desc":void 0}},[4,null==e2?void 0:e2.findAll(e)];case 2:return e_((t=r.sent()).totalElements),q(t.content||[]),null==k||k(t.content,f),[3,5];case 3:return n=r.sent(),ev.A.error(n),[3,5];case 4:return ed(!1),[7];case 5:return[2]}})})()},[e2,k,f,eN,ek,eI,eR,eO]),e5=(0,o.useMemo)(function(){return{entityType:f,entityName:m,fetchEntities:e4,entities:K}},[f,m,e4,K]),e8=function(){eo.A.destroyAll(),v()(R)||e3(parseInt(R.toString(),10)),ec.Ay.info({message:eX("GeneralEntityRoot.saveWarning",{entity:eW.getTranslationFromConfig(m,u)})})},e6=function(){e7(),v()(R)||e3(parseInt(R.toString(),10)),eo.A.destroyAll()};(0,o.useEffect)(function(){R&&"create"!==R.toString()&&R!==(null==U?void 0:U.id)&&(eY?eZ.confirm({title:eX("GeneralEntityRoot.reminderModal.title"),content:eX("GeneralEntityRoot.reminderModal.description"),okText:eX("GeneralEntityRoot.reminderModal.accept"),cancelText:eX("GeneralEntityRoot.reminderModal.decline"),closable:!0,footer:[(0,l.jsxs)("div",{className:"selectionButtons",children:[(0,l.jsx)(et.Ay,{className:"discardChangesButton",onClick:function(){return e8()},children:eX("GeneralEntityRoot.reminderModal.decline")}),(0,l.jsx)(et.Ay,{type:"primary",className:"acceptChangesButton",onClick:function(){return e6()},children:eX("GeneralEntityRoot.reminderModal.accept")})]},"modalButtons")]}):e3(parseInt(R.toString(),10)),eK(!1)),R&&"create"===R.toString()&&void 0===U&&(z(null==e2?void 0:e2.createEntity()),e$.setFieldsValue(null==e2?void 0:e2.getEntity()))},[R,e3,U,e2,e$,eZ]),(0,o.useEffect)(function(){J&&eK(!0)},[J]),(0,o.useEffect)(function(){if(!I){B(void 0),F((0,eH.L)(null)),z(void 0),$(!1);return}"create"===I?(B(I),F((0,eH.L)(null)),e$.resetFields(),e$.setFieldsValue(structuredClone(T)),e2.updateEntity(T,!0)):(B(parseInt(I,10)),F((0,eH.L)(parseInt(I,10))),$(!1))},[I,e$,T,e2,F]),(0,o.useEffect)(function(){e2&&e2.setFormValidator(e1)},[e1,e2]),(0,o.useEffect)(function(){e4()},[e4]);var e7=function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:eA(!0),n.label=1;case 1:return n.trys.push([1,5,6,7]),[4,null==e2?void 0:e2.saveOrUpdate()];case 2:return e=n.sent(),[4,e4()];case 3:return n.sent(),[4,e3(e.id)];case 4:return n.sent(),N("".concat(S().appPrefix,"/portal/").concat(f,"/").concat(e.id)),ec.Ay.success({message:eX("GeneralEntityRoot.saveSuccess",{entity:eW.getTranslationFromConfig(m,u)})}),[3,7];case 5:return t=n.sent(),ev.A.error("Error saving ".concat(m,":"),t),ec.Ay.error({message:eX("GeneralEntityRoot.saveFail",{entity:eW.getTranslationFromConfig(m,u)})}),[3,7];case 6:return eA(!1),eK(!1),$(!1),[7];case 7:return[2]}})})()};(0,em.vC)("ctrl+s",function(e){e.preventDefault(),e7()},{enableOnFormTags:["INPUT","TEXTAREA","SELECT"],enabled:function(){return!te&&X}});var e9=(0,o.useMemo)(function(){return null==e2?void 0:e2.getInitialFormValues()},[e2]),te=(0,o.useMemo)(function(){return ef()(U)||!J},[J,U]),tt={total:eC,current:eN,pageSize:ek,showTotal:function(e){return"".concat(eX("GeneralEntityTable.paging.total"),": ").concat(e)},showSizeChanger:!0,showQuickJumper:!0,locale:{next_page:eX("GeneralEntityTable.paging.nextPage"),prev_page:eX("GeneralEntityTable.paging.prevPage"),items_per_page:"/ ".concat(eX("GeneralEntityTable.paging.itemsPerPage")),jump_to:eX("GeneralEntityTable.paging.jumpTo"),page:eX("GeneralEntityTable.paging.page")}};return(0,l.jsx)(eb,{value:e5,children:(0,l.jsxs)("div",{className:"general-entity-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return N(-1)},title:eW.getTranslationFromConfig(void 0===g?"Entit\xe4ten":g,u),subTitle:void 0===j?"… mit denen man Dinge tun kann (aus Gr\xfcnden bspw.)":j,extra:[(null==(n=S().entityHistory)?void 0:n.enabled)&&(0,l.jsx)(C.A,{id:"revisionSelect",onChange:function(e){var t=null==V?void 0:V.find(function(t){return t.metadata.revisionNumber===e});t&&(z(t.entity),e$.resetFields(),e$.setFieldsValue(t.entity))},placeholder:eX("GeneralEntityRoot.selectRevision"),options:null==V||null==(c=V.slice())||null==(s=c.reverse())?void 0:s.map(function(e){return{value:e.metadata.revisionNumber,label:ep()(e.metadata.revisionInstant).format("DD.MM.YYYY hh:mm:ss")}})},"revisionSelect"),(0,l.jsx)(et.Ay,{disabled:te||!X,icon:(0,l.jsx)(ei.A,{}),onClick:e7,type:"primary",loading:eS,children:eX("GeneralEntityRoot.save",{context:eu.Ay.language,entity:eW.getTranslationFromConfig(m,u)})},"save"),(0,l.jsx)(et.Ay,{disabled:te,icon:(0,l.jsx)(ea.A,{}),onClick:function(){var e=null==K?void 0:K.find(function(e){return e.id===R});e&&(e$.resetFields(),e$.setFieldsValue(e),$(!1))},type:"primary",children:eX("GeneralEntityRoot.reset",{context:eu.Ay.language,entity:eW.getTranslationFromConfig(m,u)})},"reset")]}),(0,l.jsxs)("div",{className:"left-container",children:[(0,l.jsxs)("div",{className:"left-toolbar",children:[(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/").concat(f,"/create"),onClick:function(){z(void 0),B("create")},children:(0,l.jsx)(et.Ay,{type:"primary",icon:(0,l.jsx)(el.A,{}),children:eX("GeneralEntityRoot.create",{context:eu.Ay.language,entity:eW.getTranslationFromConfig(m,u)})},"create")},"create"),(null==E?void 0:E.leftToolbar)&&(0,l.jsx)("div",{className:"general-entity-slots-left-toolbar",children:E.leftToolbar})]}),(0,l.jsx)(na,{bordered:!0,controller:e2,i18n:u,loading:er,onChange:function(e,t,n){Array.isArray(n)||(eG(n.order),eD(n.field)),eU(Object.keys(t).some(function(e){return!v()(t[e])||!ef()(t[e])})),eF(e.current),eE(e.pageSize)},pagination:!eO&&tt,size:"small",tableConfig:_})]}),(0,l.jsx)("div",{className:"right-container",children:R&&!v()(I)&&(0,l.jsx)(tI,{loading:ey,i18n:u,entityId:parseInt(I,10),formConfig:w,form:e$,formProps:{initialValues:e9,onValuesChange:function(e){return(0,r._)(function(){return(0,a.YH)(this,function(t){switch(t.label){case 0:return $(!0),[4,e2.updateEntity(e)];case 1:return t.sent(),[2]}})})()}}})}),(0,l.jsx)("div",{children:eJ})]})})};var no=n(74444),ns=n(77906),nc=n(55886),nu=n(94092),nd=n(9971),nf=n.n(nd),nh=n(42293);let np=function(e){var t=e.onCancel,n=e.open,s=e.onSave,c=(0,e0._)(e,["onCancel","open","onSave"]),u=(0,i._)((0,o.useState)([]),2),d=u[0],f=u[1],h=(0,i._)((0,o.useState)([]),2),p=h[0],m=h[1],g=(0,i._)((0,o.useState)(""),2),v=g[0],b=g[1],x=(0,i._)((0,o.useState)("".concat(window.location.origin,"/geoserver/ows")),2),j=x[0],S=x[1],A=(0,i._)((0,o.useState)(),2),w=A[0],_=A[1],T=(0,i._)((0,o.useState)("1.3.0"),2),k=T[0],E=T[1],P=(0,i._)((0,o.useState)(!1),2),N=P[0],F=P[1],L=(0,i._)((0,o.useState)([]),2),I=L[0],D=L[1],M=(0,i._)((0,o.useState)(!1),2),R=M[0],B=M[1],O=(0,i._)((0,o.useState)(!1),2),U=O[0],z=O[1],Y=G(),V=(0,y.useTranslation)().t,H=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),F(!0),[4,null==Y?void 0:Y.graphql().sendQuery({query:"query { allLayers { id name sourceConfig }}"})];case 1:return D((null==(e=n.sent())?void 0:e.allLayers)||[]),[3,4];case 2:return t=n.sent(),ev.A.error("Error while loading the existing layers ",t),[3,4];case 3:return F(!1),[7];case 4:return[2]}})})()},[Y]),K=function(){f([]),m([]),b(""),S("".concat(window.location.origin,"/geoserver/ows")),E("1.3.0"),B(!1),z(!1)};(0,o.useEffect)(function(){n?H():K()},[n,H]),(0,o.useEffect)(function(){_(Z.Q.createValidGetCapabilitiesRequest(j,"WMS",k))},[k,j]);var q=function(e){return I.filter(function(t){var n,r;return(null==(n=t.sourceConfig)?void 0:n.layerNames)===(null==(r=e.getSource())?void 0:r.getParams().LAYERS)})},$=(0,o.useCallback)(function(e){var t,n,r,i,a=null==(t=e.getSource())?void 0:t.getParams().LAYERS,l=(0,tU._)(e,nf())?"WMS":"TILEWMS",o=(0,tU._)(e,nf())?null==(n=e.getSource())?void 0:n.getUrl():null==(i=e.getSource())||null==(r=i.getUrls())?void 0:r[0],s=nt.A.getLayerAttributionsText(e);return o?{name:e.get("name"),type:l,sourceConfig:{url:o,layerNames:a,useBearerToken:R,attribution:s&&"undefined"!==s?s:void 0,requestParams:{VERSION:k}},clientConfig:{hoverable:"1"===e.get("queryable")}}:void ev.A.error("Could not get URL for layer")},[R,k]),Q=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n,r,i,l,o,c,u,d,f,h,p,m,g;return(0,a.YH)(this,function(a){switch(a.label){case 0:F(!0),t={layers:[],errors:[]},n=!0,r=!1,i=void 0,a.label=1;case 1:a.trys.push([1,8,9,10]),l=e[Symbol.iterator](),a.label=2;case 2:if(n=(o=l.next()).done)return[3,7];if(d=null==(u=(c=o.value).getSource())?void 0:u.getParams().LAYERS,!(f=$(c)))return t.errors.push({layerName:d,msg:"Could not get URL for layer ".concat(d)}),[3,6];a.label=3;case 3:return a.trys.push([3,5,,6]),[4,null==Y?void 0:Y.layer().add(f)];case 4:if(!(h=a.sent()))return t.errors.push({layerName:d,msg:"Unknown error while adding the layer"}),[3,6];return t.layers.push(h),[3,6];case 5:return p=a.sent(),ev.A.error("Error while adding the layer ".concat(d,":"),p),t.errors.push({layerName:null==(m=c.getSource())?void 0:m.getParams().LAYERS,msg:"Error while adding the layer ".concat(d,": ").concat(p)}),[3,6];case 6:return n=!0,[3,2];case 7:return[3,10];case 8:return g=a.sent(),r=!0,i=g,[3,10];case 9:try{n||null==l.return||l.return()}finally{if(r)throw i}return[7];case 10:return null==s||s(t),F(!1),[2]}})})()},[s,$,Y]),X=[(0,l.jsx)(et.Ay,{"aria-label":"add-all",disabled:(null==d?void 0:d.length)<1,loading:N,onClick:function(){Q(d)},children:V("AddLayerModal.addAllLayers")},"add-all"),(0,l.jsx)(et.Ay,{"aria-label":"add-selected",disabled:(null==p?void 0:p.length)<1,loading:N,onClick:function(){Q(d.filter(function(e){return p.includes((0,nu.getUid)(e))}))},children:V("AddLayerModal.addSelectedLayers")},"add-selected")],ee=[{title:V("AddLayerModal.columnName"),render:function(e,t){var n,r;return null==(r=t.getSource())||null==(n=r.getParams())?void 0:n.LAYERS},sorter:function(e,t){var n,r,i,a;return null==(a=e.getSource())||null==(i=a.getParams())?void 0:i.LAYERS.localeCompare(null==(r=t.getSource())||null==(n=r.getParams())?void 0:n.LAYERS)},defaultSortOrder:"ascend"},{title:V("AddLayerModal.columnTitle"),render:function(e,t){return t.get("title")},sorter:function(e,t){return e.get("title").localeCompare(t.get("title"))},defaultSortOrder:"ascend"},{title:V("AddLayerModal.columnExisting"),width:125,render:function(e,t){return q(t).length>0?(0,l.jsx)(ns.A,{}):(0,l.jsx)(nc.A,{})},className:"operation-column",sorter:function(e,t){var n=q(e).length>0,r=q(t).length>0;return n&&!r?-1:!n&&r?1:0},defaultSortOrder:"descend"},{title:V("AddLayerModal.columnPreview"),width:125,render:function(e,t){var n=$(t);if(n)return n.id=1909,(0,l.jsx)(ni,{layer:n})},className:"operation-column"}];return(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"add-layer-modal",title:V("AddLayerModal.title"),onCancel:function(e){null==t||t(e)},width:600,open:n,footer:X},c),{children:[(0,l.jsx)("span",{children:V("AddLayerModal.requestWmsGetCapabilitiesInstruction")}),(0,l.jsxs)("div",{className:"input-wrapper",children:[(0,l.jsx)(eK.A.Search,{"aria-label":"input-search",className:"url-input",placeholder:V("AddLayerModal.inputPlaceholder"),value:j,onChange:function(e){var t=e.target.value;b(Z.Q.isValid(t.trim())?"":"error"),S(e.target.value)},onSearch:function(){return(0,r._)(function(){var e,t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:if(!w||""!==v)return[2];r.label=1;case 1:return r.trys.push([1,3,4,5]),f([]),m([]),F(!0),z(!1),[4,nh.A.getWmsCapabilities(w,{headers:R?(0,W._)({},(0,J.M)(null==Y?void 0:Y.getKeycloak())):{}})];case 2:return t=r.sent(),f(null==(e=nh.A.getLayersFromWmsCapabilities(t,"Title"))?void 0:e.filter(function(e){var t;return(null==(t=e.getSource())?void 0:t.getParams().LAYERS)!==void 0})),[3,5];case 3:return n=r.sent(),z(!0),ev.A.error(n),[3,5];case 4:return F(!1),[7];case 5:return[2]}})})()},loading:N,status:v,enterButton:!0,addonBefore:(0,l.jsx)(C.A,{"aria-label":"select-version",defaultValue:"1.3.0",onChange:E,value:k,options:[{key:"1.3.0",value:"1.3.0",label:"".concat(V("AddLayerModal.version",{version:"1.3.0"}))},{key:"1.1.1",value:"1.1.1",label:"".concat(V("AddLayerModal.version",{version:"1.1.1"}))},{key:"1.1.0",value:"1.1.0",label:"".concat(V("AddLayerModal.version",{version:"1.1.0"}))},{key:"1.0.0",value:"1.0.0",label:"".concat(V("AddLayerModal.version",{version:"1.0.0"}))}]})}),(0,l.jsx)(e6.A,{title:V("AddLayerModal.useBearerTokenTooltip"),children:(0,l.jsx)(eZ.A,{"aria-label":"use-bearer-token",checkedChildren:(0,l.jsx)(ns.A,{}),unCheckedChildren:(0,l.jsx)(nc.A,{}),onChange:function(e){B(e)},value:R})}),(0,l.jsx)("label",{children:V("AddLayerModal.useBearerTokenLabel")})]}),(""!==v||U)&&(0,l.jsx)(e1.A,{className:"error",children:v?V("AddLayerModal.invalidUrlErrorMsg"):V("AddLayerModal.errorDescription")}),!U&&(0,l.jsx)(tm.A,{"aria-label":"wms-table",loading:N,size:"small",columns:ee,scroll:{y:"calc(100vh - 400px)"},expandable:{expandedRowRender:function(e){var t,n=q(e);return(0,l.jsxs)("div",{className:"expanded-row",children:[V("AddLayerModal.existingLayerNote",{layerName:null==(t=e.getSource())?void 0:t.getParams().LAYERS}),(0,l.jsx)("ul",{children:n.sort(function(e,t){return e.name.localeCompare(t.name)}).map(function(e){return(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"portal/layer/".concat(e.id),target:"_blank",children:"".concat(e.name," (").concat(e.id,")")})},e.id)})})]})},rowExpandable:function(e){return q(e).length>0}},rowKey:nu.getUid,rowSelection:{selectedRowKeys:p,onChange:m},pagination:!1,dataSource:d})]}))},nm=function(){var e,t,n,r,a=(0,i._)((0,o.useState)(!1),2),s=a[0],c=a[1],d=(0,i._)((0,o.useState)(!1),2),f=d[0],h=d[1],p=(0,i._)((0,o.useState)(),2),m=p[0],g=p[1],v=(0,o.useContext)(ey),b=(0,y.useTranslation)().t,x=function(){var e=m&&m.errors.length>0,t=m&&m.layers.length>0;return!e&&t?"success":(!e||t)&&(e||t)?"warning":"error"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(e6.A,{title:b("ToolbarAddLayerButton.tooltip"),children:(0,l.jsx)(et.Ay,{icon:(0,l.jsx)(no.A,{}),onClick:function(){c(!0)},children:b("ToolbarAddLayerButton.title")})}),(0,l.jsx)(np,{maskClosable:!1,open:s,onCancel:function(){c(!1)},onSave:function(e){g(e),h(!0)}}),(0,l.jsx)(eo.A,{open:f,onCancel:function(){var e;h(!1),c(!1),null==v||null==(e=v.fetchEntities)||e.call(v)},maskClosable:!1,footer:null,children:(0,l.jsx)(u.Ay,{status:x(),title:b("success"===(e=x())?"ToolbarAddLayerButton.successMsg":"error"===e?"ToolbarAddLayerButton.errorMsg":"ToolbarAddLayerButton.warningMsg"),subTitle:(t=x(),n=null==m?void 0:m.layers.map(function(e){return(0,l.jsxs)("span",{children:[(0,l.jsx)("a",{href:"portal/layer/".concat(e.id),target:"_blank",children:"".concat(e.name," (").concat(e.id,")")}),(0,l.jsx)("br",{})]},e.id)}),r=null==m?void 0:m.errors.map(function(e){return(0,l.jsxs)("span",{children:["".concat(e.layerName),(0,l.jsx)("br",{})]},e.layerName)}),"success"===t?(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.successSubTitle")}),n]}):"error"===t?(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.errorSubTitle")}),r]}):(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.successSubTitle")}),n,(0,l.jsx)("p",{children:b("ToolbarAddLayerButton.errorSubTitle")}),r]}))})})]})};var ng=n(49340),nv=n(71853);let ny=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,i._)(ee.Ay.useMessage(),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;return(0,l.jsxs)(l.Fragment,{children:[p,(0,l.jsx)(e6.A,{title:g("CreateAllGroupsButton.tooltip"),children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:d(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,null==m?void 0:m.group().createAllFromProvider()];case 2:return r.sent(),h.success(g("CreateAllGroupsButton.success")),null==t||t(),[3,5];case 3:return e=r.sent(),h.error(g("CreateAllGroupsButton.error")),nv.A.error("Error while creating the groups: ",e),null==n||n(e),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()},loading:u,icon:(0,l.jsx)(ng.A,{})},s),{children:g("CreateAllGroupsButton.title")}))})]})},nb=function(){var e=(0,o.useContext)(ey);return(0,l.jsx)(ny,{onSuccess:function(){var t;null==e||null==(t=e.fetchEntities)||t.call(e)}})};var nx=n(81403);let nj=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,i._)(ee.Ay.useMessage(),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;return(0,l.jsxs)(l.Fragment,{children:[p,(0,l.jsx)(e6.A,{title:g("CreateAllRolesButton.tooltip"),children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:d(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,null==m?void 0:m.role().createAllFromProvider()];case 2:return r.sent(),h.success(g("CreateAllRolesButton.success")),null==t||t(),[3,5];case 3:return e=r.sent(),h.error(g("CreateAllRolesButton.error")),nv.A.error("Error while creating the roles: ",e),null==n||n(e),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()},loading:u,icon:(0,l.jsx)(nx.A,{})},s),{children:g("CreateAllRolesButton.title")}))})]})},nS=function(){var e=(0,o.useContext)(ey);return(0,l.jsx)(nj,{onSuccess:function(){var t;null==e||null==(t=e.fetchEntities)||t.call(e)}})};var nA=n(23197);let nw=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=(0,i._)(ee.Ay.useMessage(),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;return(0,l.jsxs)(l.Fragment,{children:[p,(0,l.jsx)(e6.A,{title:g("CreateAllUsersButton.tooltip"),children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(r){switch(r.label){case 0:d(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,null==m?void 0:m.user().createAllFromProvider()];case 2:return r.sent(),h.success(g("CreateAllUsersButton.success")),null==t||t(),[3,5];case 3:return e=r.sent(),h.error(g("CreateAllUsersButton.error")),nv.A.error("Error while creating the users: ",e),null==n||n(e),[3,5];case 4:return d(!1),[7];case 5:return[2]}})})()},loading:u,icon:(0,l.jsx)(nA.A,{})},s),{children:g("CreateAllUsersButton.title")}))})]})},nC=function(){var e=(0,o.useContext)(ey);return(0,l.jsx)(nw,{onSuccess:function(){var t;null==e||null==(t=e.fetchEntities)||t.call(e)}})};var n_=n(88237),nT=n(94918),nk=n(24522);let nE=function(e){var t=e.onSuccess,n=e.onError,s=(0,e0._)(e,["onSuccess","onError"]),c=(0,i._)((0,o.useState)(!1),2),u=c[0],d=c[1],f=G(),h=(0,y.useTranslation)().t,p=function(e){switch(e){case"C":return"java.lang.String";case"D":return"java.util.Date";case"N":return"java.lang.Long";case"F":return"java.lang.Double";case"L":return"java.lang.Boolean";default:return}};return(0,l.jsx)(nT.A,{customRequest:function(e){return(0,r._)(function(){var t,n,l,o,s,c,u,d,m,g,v,y,b;return(0,a.YH)(this,function(x){var j,A;switch(x.label){case 0:o=e.onError,s=e.onSuccess,u=(c=e.file).name.split("."),d=c.type,m=(null==(t=S().geoserver)?void 0:t.base)||"/geoserver",g=(null==(l=S().geoserver)||null==(n=l.upload)?void 0:n.workspace)||"SHOGUN",v="".concat(u[0],"_").concat(Date.now()).toUpperCase(),y={file:c,baseUrl:m,workspace:g,storeName:v,layerName:v},x.label=1;case 1:if(x.trys.push([1,6,,7]),"image/tiff"!==d)return[3,3];return[4,(j=y,(0,r._)(function(){var e,t,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:return e=j.baseUrl,t=j.workspace,n=j.storeName,r=j.layerName,i=j.file,[4,fetch("".concat(e,"/rest/workspaces/").concat(t,"/coveragestores/")+"".concat(n,"/file.geotiff?coverageName=").concat(r),{method:"PUT",headers:(0,eT._)((0,W._)({},(0,J.M)(null==f?void 0:f.getKeycloak())),{"Content-Type":"image/tiff"}),body:i})];case 1:if(!a.sent().ok)throw Error("No successful response while uploading the file");return[2]}})})())];case 2:x.sent(),x.label=3;case 3:if("application/zip"!==d&&"application/x-zip-compressed"!==d)return[3,5];return[4,(A=y,(0,r._)(function(){var e,t,n,r,l,o,s,c;return(0,a.YH)(this,function(a){switch(a.label){case 0:return e=A.baseUrl,t=A.workspace,n=A.storeName,r=A.layerName,l=A.file,[4,nk.Shapefile.load(l)];case 1:if(o=a.sent(),s="",c={attribute:[]},1!==Object.entries(o).length)throw Error(h("UploadLayerButton.error.descriptionZipContent"));return Object.entries(o).forEach(function(e){var t=(0,i._)(e,2),n=t[0],r=t[1];s=n;var a=r.parse("dbf",{properties:!1});c.attribute=a.fields.map(function(e){return{name:e.name,minOccurs:0,maxOccurs:1,nillable:!0,binding:p(e.type),length:e.length}});var l=r.parse("shx");c.attribute.push({name:"the_geom",minOccurs:0,maxOccurs:1,nillable:!0,binding:{0:void 0,1:"org.locationtech.jts.geom.Point",3:"org.locationtech.jts.geom.LineString",5:"org.locationtech.jts.geom.Polygon",8:"org.locationtech.jts.geom.MultiPoint",11:"org.locationtech.jts.geom.Point",13:"org.locationtech.jts.geom.LineString",15:"org.locationtech.jts.geom.Polygon",18:"org.locationtech.jts.geom.MultiPoint",21:"org.locationtech.jts.geom.Point",23:"org.locationtech.jts.geom.LineString",25:"org.locationtech.jts.geom.Polygon",28:"org.locationtech.jts.geom.MultiPoint",31:void 0}[l.header.type]})}),[4,fetch("".concat(e,"/rest/workspaces/").concat(t,"/datastores/")+"".concat(n,"/file.shp?configure=none"),{method:"PUT",headers:(0,eT._)((0,W._)({},(0,J.M)(null==f?void 0:f.getKeycloak())),{"Content-Type":"application/zip"}),body:l})];case 2:if(!a.sent().ok)throw Error("No successful response while uploading the file");return[4,fetch("".concat(e,"/rest/workspaces/").concat(t,"/datastores/").concat(n,"/featuretypes"),{method:"POST",headers:(0,eT._)((0,W._)({},(0,J.M)(null==f?void 0:f.getKeycloak())),{"Content-Type":"application/json"}),body:JSON.stringify({featureType:{enabled:!0,name:r,nativeName:s,title:r,attributes:c}})})];case 3:if(!a.sent().ok)throw Error("No successful response while creating the featuretype");return[2]}})})())];case 4:x.sent(),x.label=5;case 5:return null==s||s({baseUrl:m,workspace:g,layerName:v}),[3,7];case 6:return b=x.sent(),null==o||o({name:"UploadError",message:null==b?void 0:b.message}),[3,7];case 7:return[2]}})})()},accept:"image/tiff,application/zip",maxCount:1,showUploadList:!1,beforeUpload:function(e){var t,n,r=(null==(n=S().geoserver)||null==(t=n.upload)?void 0:t.limit)||2e8,i=e.type;if(e.size>r)return ec.Ay.error({message:h("UploadLayerButton.error.message"),description:h("UploadLayerButton.error.descriptionSize",{maxSize:r/1e6})}),!1;var a=["application/zip","application/x-zip-compressed","image/tiff"];return!!a.includes(i)||(ec.Ay.error({message:h("UploadLayerButton.error.message"),description:h("UploadLayerButton.error.descriptionFormat",{supportedFormats:a.join(", ")})}),!1)},onChange:function(e){return(0,r._)(function(){var r,i,l,o,s,c,u;return(0,a.YH)(this,function(a){switch(a.label){case 0:if("uploading"===(r=e.file).status&&d(!0),"done"!==r.status)return[3,2];return[4,null==f?void 0:f.layer().add({name:null!=(u=null==(i=r.response)?void 0:i.layerName)?u:"LAYER-DEFAULT-NAME",type:"TILEWMS",clientConfig:{hoverable:!1},sourceConfig:{url:"".concat(null==(l=r.response)?void 0:l.baseUrl,"/ows?"),layerNames:"".concat(null==(o=r.response)?void 0:o.workspace,":").concat(null==(s=r.response)?void 0:s.layerName),useBearerToken:!0}})];case 1:return a.sent(),d(!1),ec.Ay.success({message:h("UploadLayerButton.success.message"),description:h("UploadLayerButton.success.description",{fileName:r.fileName,layerName:null==(c=r.response)?void 0:c.layerName})}),null==t||t(r.response),[3,3];case 2:"error"===r.status&&(d(!1),nv.A.error(r.error),ec.Ay.error({message:h("UploadLayerButton.error.message"),description:h("UploadLayerButton.error.description",{fileName:r.fileName})}),null==n||n(r.error)),a.label=3;case 3:return[2]}})})()},children:(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({icon:(0,l.jsx)(n_.A,{}),loading:u,disabled:u},s),{children:h("UploadLayerButton.title")}))})},nP=function(){var e,t,n=(0,o.useContext)(ey);return(null==(t=S().geoserver)||null==(e=t.upload)?void 0:e.buttonVisible)?(0,l.jsx)(nE,{onSuccess:function(){var e;null==n||null==(e=n.fetchEntities)||e.call(n)}}):(0,l.jsx)(l.Fragment,{})};var nN=n(19791);let nF=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,i._)((0,o.useState)(!1),2),s=n[0],c=n[1],u=(0,i._)(ee.Ay.useMessage(),2),d=u[0],f=u[1],h=G(),p=(0,y.useTranslation)().t;return v()(h)?null:(0,l.jsxs)(l.Fragment,{children:[f,(0,l.jsx)(et.Ay,(0,eT._)((0,W._)({onClick:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:c(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,null==h?void 0:h.cache().evictCache()];case 2:return t.sent(),d.success(p("EvictCache.success")),[3,4];case 3:return e=t.sent(),d.error(p("EvictCache.error")),ev.A.error("Could not clear the cache due to the following error: ".concat(e)),[3,4];case 4:return c(!1),[2]}})})()},loading:s,icon:(0,l.jsx)(nN.A,{})},t),{children:p("EvictCache.clear")}))]})},nL=function(){var e=(0,y.useTranslation)().t,t=(0,x.Zp)();return(0,l.jsxs)("div",{className:"global-settings-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return t(-1)},title:e("GlobalSettings.global"),subTitle:e("GlobalSettings.globalInfo")}),(0,l.jsx)("div",{className:"global-settings-container",children:(0,l.jsx)(nF,{})})]})},nI=function(){var e,t=(0,i._)((0,o.useState)(),2),n=t[0],s=t[1],c=(0,i._)((0,o.useState)(),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)(!1),2),p=f[0],g=f[1],b=(0,x.zy)(),j=G(),w=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/imagefile/:id")},b.pathname),C=null==w||null==(e=w.params)?void 0:e.id,_=(0,y.useTranslation)().t,T=(0,o.useCallback)(function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(!j||v()(C))return s(void 0),[2];n.label=1;case 1:if(n.trys.push([1,6,,7]),!e)return[3,3];return[4,j.imagefile().setPublic(parseInt(C,10))];case 2:return n.sent(),[3,5];case 3:return[4,j.imagefile().revokePublic(parseInt(C,10))];case 4:n.sent(),n.label=5;case 5:return g(e),[3,7];case 6:return t=n.sent(),m().error("Error while changing public state of an image file",t),[3,7];case 7:return[2]}})})()},[C,j]);return(0,o.useEffect)(function(){u&&(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:if(!j||v()(u.fileUuid))return[2];return[4,j.imagefile().findOne(u.fileUuid)];case 1:return s(e.sent()),[2]}})})()},[u,j]),(0,o.useEffect)(function(){!j||v()(C)?s(void 0):((0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,j.graphql().sendQuery({query:"query($id: Int) {\n imageFileById(id: $id) {\n active\n fileType\n id\n created\n modified\n fileUuid\n fileName\n width\n height\n }\n }",variables:{id:parseInt(C,10)}})];case 1:return d(e.sent().imageFileById),[2]}})})(),(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,j.imagefile().isPublic(parseInt(C,10))];case 1:return g.apply(void 0,[e.sent()]),[2]}})})())},[C,j]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.z,{title:_("ImageFileForm.title")}),(0,l.jsx)(h.A,{spinning:!1,children:(0,l.jsxs)(es.A,{className:"image-file-form",labelCol:{span:5},wrapperCol:{span:20},children:[(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.name"),children:null==u?void 0:u.fileName}),(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.uuid"),children:p?(0,l.jsx)("a",{target:"_blank",href:"".concat(null==j?void 0:j.getBasePath(),"imagefiles/").concat(null==u?void 0:u.fileUuid),children:null==u?void 0:u.fileUuid}):null==u?void 0:u.fileUuid}),(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.public"),children:(0,l.jsx)(eZ.A,{checked:p,onChange:T},"public")}),(0,l.jsx)(es.A.Item,{label:_("ImageFileForm.preview"),children:n&&(0,l.jsx)("div",{className:"image-preview",children:(0,l.jsx)("img",{src:URL.createObjectURL(n),alt:"preview"})})})]})})]})},nD=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,i._)((0,o.useState)(),2),s=n[0],c=n[1],u=(0,i._)((0,o.useState)(),2),d=u[0],f=u[1],h=(0,i._)((0,o.useState)(),2),p=h[0],m=h[1],g=(0,i._)((0,o.useState)(S().defaultPageSize||10),2),b=g[0],j=g[1],A=(0,i._)((0,o.useState)(1),2),w=A[0],C=A[1],_=(0,i._)((0,o.useState)(),2),T=_[0],k=_[1],E=(0,i._)((0,o.useState)(),2),P=E[0],N=E[1],F=(0,x.Zp)(),L=G(),I=null==L?void 0:L.imagefile(),D=(0,y.useTranslation)(),M=D.t,R=D.i18n,B=[(0,W._)({title:"UUID",key:"fileUuid",dataIndex:"fileUuid",sorter:tM.getSorter("fileUuid")},tM.getColumnSearchProps("fileUuid")),(0,W._)({title:"Name",key:"fileName",dataIndex:"fileName",sorter:tM.getSorter("fileName"),defaultSortOrder:"ascend"},tM.getColumnSearchProps("fileName")),(0,W._)({title:"Created",key:"created",dataIndex:"created",sorter:tM.getSorter("created"),defaultSortOrder:"descend",render:function(e){return new Date(e).toLocaleString(R.language)}},tM.getColumnSearchProps("created"))],O=function(e){F("".concat(S().appPrefix,"/portal/imagefile/").concat(e.id))},U={singular:M("ImageFileTable.imageSingular"),plural:M("ImageFileTable.imagePlural")},z=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:f("loading"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,null==I?void 0:I.findAll({page:w-1,size:b,sort:{properties:v()(T)?[]:[T],order:"ascend"===P?"asc":"descend"===P?"desc":void 0}})];case 2:return m(null==(e=n.sent())?void 0:e.totalElements),c(null==e?void 0:e.content),f("done"),[3,4];case 3:return t=n.sent(),f("failed"),ev.A.error("Could not fetch images due to the following error: ".concat(t)),[3,4];case 4:return[2]}})})()},[I,w,b,T,P]);(0,o.useEffect)(function(){z()},[z]);var Y=function(e){e.id?eo.A.confirm({cancelText:M("ImageFileTable.cancel"),title:M("ImageFileTable.delete",{entity:U.singular}),content:(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:M("ImageFileTable.confirmInfo",{entity:U.singular})}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{children:M("ImageFileTable.conFirmTooltip",{entity:U.singular})})]}),onOk:function(){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:if(n.trys.push([0,4,,5]),v()(e.fileUuid))return[3,3];return[4,null==I?void 0:I.delete(e.fileUuid)];case 1:return n.sent(),ec.Ay.info({message:M("ImageFileTable.deletionInfo",{entity:U.singular}),description:M("ImageFileTable.deletionInfo",{entity:U.singular,record:e.fileName})}),[4,z()];case 2:n.sent(),F("".concat(S().appPrefix,"/portal/imagefile")),n.label=3;case 3:return[3,5];case 4:return t=n.sent(),ec.Ay.error({message:M("ImageFileTable.deleteFail"),description:M("ImageFileTable.deleteFailDescript",{record:e.fileName})}),ev.A.error("Could not delete image entities due to the following error: ".concat(t)),[3,5];case 5:return[2]}})})()}}):c(null==s?void 0:s.filter(function(t){return t!==e}))},V=(0,ek._)(B).concat([{title:(0,l.jsx)(e6.A,{title:M("ImageFileTable.reloadTooltip"),children:(0,l.jsx)(tD.A,{onClick:z})}),className:"operation-column",width:100,dataIndex:"operation",render:function(e,t){return(0,l.jsx)("div",{className:"actions",children:(0,l.jsx)(e6.A,{title:"L\xf6schen",children:(0,l.jsx)(th.A,{onClick:function(){return Y(t)}})})})}}]);return s?(0,l.jsx)(tm.A,(0,W._)({className:"imagefile-table",columns:V,rowKey:function(e){return"".concat(null==e?void 0:e.id)},rowClassName:function(){return"editable-row"},dataSource:s,onRow:function(e){return{onClick:function(){return O(e)}}},bordered:!0,size:"small",loading:"loading"===d,onChange:function(e,t,n){Array.isArray(n)||(N(n.order),k(n.field)),v()(e.current)||C(e.current),v()(e.pageSize)||j(e.pageSize)},pagination:{total:p,current:w,pageSize:b,showTotal:function(e){return"".concat(M("GeneralEntityTable.paging.total"),": ").concat(e)},showSizeChanger:!0,showQuickJumper:!0,locale:{next_page:M("GeneralEntityTable.paging.nextPage"),prev_page:M("GeneralEntityTable.paging.prevPage"),items_per_page:"/ ".concat(M("GeneralEntityTable.paging.itemsPerPage")),jump_to:M("GeneralEntityTable.paging.jumpTo"),page:M("GeneralEntityTable.paging.page")}}},t)):(0,l.jsx)(l.Fragment,{})},nM=function(){var e,t=(0,x.Zp)(),n=(0,x.zy)(),i=G(),o=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/imagefile/:id")},n.pathname),s=null==o||null==(e=o.params)?void 0:e.id,c=(0,y.useTranslation)().t;return(0,l.jsxs)("div",{className:"imagefile-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return t(-1)},title:c("ImageFileRoot.title"),subTitle:c("ImageFileRoot.subTitle")}),(0,l.jsxs)("div",{className:"left-container",children:[(0,l.jsx)("div",{className:"left-toolbar",children:(0,l.jsx)(nT.A,{showUploadList:!1,customRequest:function(e){return(0,r._)(function(){var n,r,l;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(n=e.file,!(0,tU._)(n,File))return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,null==i?void 0:i.imagefile().upload(n)];case 2:return r=a.sent(),v()(r)||(ec.Ay.info({message:c("ImageFileRoot.success"),description:c("ImageFileRoot.uploadSuccess",{entityName:n.name})}),t("".concat(S().appPrefix,"/portal/imagefile/").concat(r.id))),[3,4];case 3:return l=a.sent(),ec.Ay.error({message:c("ImageFileRoot.failure"),description:c("ImageFileRoot.uploadFailure",{entityName:n.name})}),ev.A.error("Could not upload image due to the following error: ".concat(l)),[3,4];case 4:return[2]}})})()},children:(0,l.jsx)(et.Ay,{type:"primary",children:c("ImageFileRoot.button")})},"upload")}),(0,l.jsx)(nD,{})]}),(0,l.jsx)("div",{className:"right-container",children:!v()(s)&&(0,l.jsx)(nI,{})})]})};var nR=n(5624),nG=function(){function e(t){(0,O._)(this,e),(0,e_._)(this,"keycloak",void 0),this.keycloak=null==t?void 0:t.keycloak}return(0,U._)(e,[{key:"getLoggers",value:function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/loggers"),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:return[4,t.sent().json()];case 2:return[2,t.sent().loggers];case 3:return e=t.sent(),nv.A.error("Error while reading the loggers: ".concat(e)),[2,null];case 4:return[2]}})}).call(this)}},{key:"getLogger",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/loggers/").concat(e),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()];case 3:return t=n.sent(),nv.A.error("Error while reading the logger: ".concat(t)),[2,Promise.reject()];case 4:return[2]}})}).call(this)}},{key:"setLogger",value:function(e,t){return(0,r._)(function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,fetch("".concat(S().path.shogunBase,"actuator/loggers/").concat(e),{method:"POST",headers:(0,W._)({"Content-Type":"application/json"},(0,nR.T)(),(0,J.M)(this.keycloak)),body:JSON.stringify({configuredLevel:t})})];case 1:return[2,204===r.sent().status];case 2:return n=r.sent(),nv.A.error("Error while setting the logger: ".concat(n)),[2,!1];case 3:return[2]}})}).call(this)}},{key:"getLogs",value:function(){return(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/logfile"),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:if(!(e=n.sent()).ok)throw Error("No successful response while getting the logs");return[4,e.text()];case 2:return[2,n.sent()];case 3:return t=n.sent(),nv.A.error("Error while reading the logs: ".concat(t)),[3,4];case 4:return[2]}})}).call(this)}}]),e}();let nB=function(){var e=(0,i._)((0,o.useState)(),2),t=e[0],n=e[1],s=(0,i._)((0,o.useState)(!1),2),c=s[0],u=s[1],d=(0,i._)((0,o.useState)(!1),2),f=d[0],h=d[1],p=G(),m=(0,o.useRef)(void 0),g=(0,x.Zp)(),b=(0,y.useTranslation)().t,j=(0,o.useCallback)(function(){return(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,,2,3]),u(!0),h(!1),[4,new nG({keycloak:null==p?void 0:p.getKeycloak()}).getLogs()];case 1:return n(e=t.sent()),e||h(!0),[3,3];case 2:return u(!1),[7];case 3:return[2]}})})()},[p]);return((0,o.useEffect)(function(){j()},[j]),v()(p))?null:(0,l.jsxs)("div",{className:"log-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return g(-1)},title:b("Logs.logs"),subTitle:b("Logs.logsInfo"),extra:[(0,l.jsx)(es.A.Item,{label:b("Logs.autoReload"),className:"auto-reload-switch",children:(0,l.jsx)(eZ.A,{onChange:function(e){e?m.current||(m.current=setInterval(j,1e3)):(clearInterval(null==m?void 0:m.current),m.current=void 0)}})},"reload"),(0,l.jsx)(et.Ay,{type:"primary",loading:c,onClick:j,children:b("Logs.refresh")},"fetch-logs")]}),(0,l.jsx)("div",{className:"log-container",children:f?(0,l.jsx)(tY.A,{message:b("Logs.warningMessage"),description:b("Logs.warningDescribtion"),type:"warning",showIcon:!0}):(0,l.jsx)("pre",{children:(0,l.jsx)("code",{children:t})})})]})};var nO=C.A.Option,nU=["OFF","FATAL","ERROR","WARN","INFO","DEBUG","TRACE"];let nz=function(e){var t=nU.map(function(e,t){return(0,l.jsx)(nO,{value:"".concat(e),children:e},t)});return(0,l.jsx)(C.A,(0,eT._)((0,W._)({},e),{children:t}))},nY=function(e){var t=(0,i._)((0,o.useState)(!1),2),n=t[0],s=t[1],c=(0,i._)((0,o.useState)([]),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)([]),2),h=f[0],p=f[1],m=G(),g=(0,y.useTranslation)().t;(0,o.useEffect)(function(){(0,r._)(function(){var e;return(0,a.YH)(this,function(t){switch(t.label){case 0:return s(!0),[4,new nG({keycloak:null==m?void 0:m.getKeycloak()}).getLoggers()];case 1:return d(Object.keys(e=t.sent()).filter(function(e){return 2===e.split(".").length||"org.springframework.security"===e}).filter(function(e){return!e.startsWith("_")}).map(function(t,n){return{key:n,name:t,level:e[t].effectiveLevel}})),s(!1),[2]}})})()},[m]);var b=[{title:g("LogSettings.tableName"),dataIndex:"name",key:"name"},{title:g("LogSettings.tableLevel"),dataIndex:"level",key:"level",render:function(e,t){return(0,l.jsx)(nz,{style:{width:"100%"},defaultValue:e,onChange:function(e){x(e,t)}})}}],x=function(e,t){return(0,r._)(function(){return(0,a.YH)(this,function(n){switch(n.label){case 0:return[4,new nG({keycloak:null==m?void 0:m.getKeycloak()}).setLogger(t.name,e)];case 1:return n.sent()?ee.Ay.success("Successfully set log level"):ee.Ay.error("Could not set log level"),[2]}})})()};return v()(m)?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eK.A.Search,{style:{margin:"0 0 10px 0"},placeholder:g("LogSettings.searchPlaceholder"),enterButton:!0,onSearch:function(e){p(u.filter(function(t){return Object.keys(t).some(function(n){return String(eP()(t,n)).toLowerCase().includes(e.toLowerCase())})}))}}),(0,l.jsx)(tm.A,(0,W._)({loading:n,columns:b,dataSource:0===h.length?u:h},e))]})},nV=function(){var e=(0,y.useTranslation)().t,t=(0,x.Zp)();return(0,l.jsxs)("div",{className:"log-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return t(-1)},title:e("LogSettings.logs"),subTitle:e("LogSettings.logsInfo")}),(0,l.jsx)(nY,{})]})};var nH=n(6266),nW=n(49776),nK=n(76164),nq=n(39576),nZ=n(45279),nJ=n(7185),n$=n(69149),nQ=n(53078),nX=n(26051),n0=n(19416),n1=n(72640);let n2=function(e){var t,n,r,i,a,o,s,c,u,d,f,h,p,m,g,b=e.collapsed,j=e.entityConfigs,A=void 0===j?[]:j,w=(0,y.useTranslation)().t,C=(0,x.Zp)(),_=(0,x.zy)(),T=G(),k=(0,eg.B6)({path:"".concat(S().appPrefix,"/portal/:activeKey")},_.pathname),E=null==k||null==(t=k.params)?void 0:t.activeKey,P=S().navigation,N=[];if(A&&A.length>0){var F=A.find(function(e){return"application"===e.entityType}),L=A.find(function(e){return"layer"===e.entityType}),I=A.find(function(e){return"user"===e.entityType}),D=A.find(function(e){return"group"===e.entityType}),M=A.find(function(e){return"role"===e.entityType}),R=A.filter(function(e){return![F,L,I,D,M].includes(e)});F&&N.push({key:"application",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nH.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==F?void 0:F.navigationTitle,null==F?void 0:F.i18n)})]})}),L&&N.push({key:"layer",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nW.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==L?void 0:L.navigationTitle,null==L?void 0:L.i18n)})]})}),I&&N.push({key:"user",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nK.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==I?void 0:I.navigationTitle,null==I?void 0:I.i18n)})]})}),D&&N.push({key:"group",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nq.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==D?void 0:D.navigationTitle,null==D?void 0:D.i18n)})]})}),M&&N.push({key:"role",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nx.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==M?void 0:M.navigationTitle,null==M?void 0:M.i18n)})]})}),R.forEach(function(e){N.push({key:e.entityType,label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nZ.A,{}),(0,l.jsx)("span",{children:eW.getTranslationFromConfig(null==e?void 0:e.navigationTitle,null==e?void 0:e.i18n)})]})})})}(null==P||null==(r=P.general)||null==(n=r.imagefiles)?void 0:n.visible)&&N.push({key:"imagefile",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nJ.A,{}),(0,l.jsx)("span",{children:w("Navigation.image")})]})});var B=[];(null==P||null==(a=P.status)||null==(i=a.metrics)?void 0:i.visible)&&B.push({key:"status/metrics",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n$.A,{}),(0,l.jsx)("span",{children:w("Navigation.metrics")})]})}),(null==P||null==(s=P.status)||null==(o=s.logs)?void 0:o.visible)&&B.push({key:"status/logs",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nQ.A,{}),(0,l.jsx)("span",{children:w("Navigation.logs")})]})});var O=[];(null==P||null==(u=P.settings)||null==(c=u.global)?void 0:c.visible)&&O.push({key:"settings/global",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nX.A,{}),(0,l.jsx)("span",{children:w("Navigation.global")})]})}),(null==P||null==(f=P.settings)||null==(d=f.logs)?void 0:d.visible)&&O.push({key:"settings/logs",label:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(nQ.A,{}),(0,l.jsx)("span",{children:w("Navigation.logLevels")})]})}),(null==P||null==(p=P.settings)||null==(h=p.graphiql)?void 0:h.visible)&&O.push({key:"graphiql",icon:(0,l.jsx)(n0.A,{}),label:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("a",{href:"".concat(null==T?void 0:T.getBasePath(),"graphiql?path=/graphql"),target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("span",{children:w("Navigation.graphiql")})})})}),(null==P||null==(g=P.settings)||null==(m=g.swagger)?void 0:m.visible)&&O.push({key:"swagger",icon:(0,l.jsx)(nZ.A,{}),label:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("a",{href:"".concat(null==T?void 0:T.getBasePath(),"swagger-ui/index.html"),target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("span",{children:w("Navigation.swagger")})})})});var U=[];return N.length>0&&U.push({key:"general",label:w("Navigation.content"),children:N}),B.length>0&&U.push({key:"status",label:w("Navigation.status"),children:B}),O.length>0&&U.push({key:"settings",label:w("Navigation.configuration"),children:O}),(0,l.jsx)(n1.A,{className:"navigation-menu",defaultSelectedKeys:["1"],mode:"inline",theme:"dark",inlineCollapsed:void 0!==b&&b,onSelect:function(e){var t=e.key;C("".concat(S().appPrefix,"/portal/").concat(t))},selectedKeys:v()(E)?[]:[E],defaultOpenKeys:["general"],items:U})};var n3=n(47152),n4=n(16370),n5=n(85402),n8=n(9213),n6=function(){function e(t){(0,O._)(this,e),(0,e_._)(this,"keycloak",void 0),this.keycloak=null==t?void 0:t.keycloak}return(0,U._)(e,[{key:"getMetric",value:function(e){return(0,r._)(function(){var t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch("".concat(S().path.shogunBase,"actuator/metrics/").concat(e),{headers:(0,W._)({},(0,J.M)(this.keycloak))})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent()];case 3:return t=n.sent(),nv.A.error("Error while reading the metric: ".concat(t)),[2,Promise.reject()];case 4:return[2]}})}).call(this)}}]),e}();let n7=function(e){var t,n=e.type,s=e.prefixRenderer,c=e.suffixRenderer,u=e.titleRenderer,d=e.valueRenderer,f=(0,e0._)(e,["type","prefixRenderer","suffixRenderer","titleRenderer","valueRenderer"]),h=(0,i._)((0,o.useState)(!1),2),p=h[0],m=h[1],g=(0,i._)((0,o.useState)(),2),v=g[0],y=g[1],b=G(),x=(0,o.useCallback)(function(){return(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return m(!0),[4,new n6({keycloak:null==b?void 0:b.getKeycloak()}).getMetric(n)];case 1:return y(e.sent()),m(!1),[2]}})})()},[b,n]);return(0,o.useEffect)(function(){x()},[x]),(0,l.jsx)(n8.A,{loading:p,actions:[(0,l.jsx)(e6.A,{title:"Reload",mouseEnterDelay:.5,children:(0,l.jsx)(et.Ay,{onClick:x,children:(0,l.jsx)(n5.A,{})})},"tooltip")],children:(0,l.jsx)(eJ.A,(0,W._)({value:null==v||null==(t=v.measurements[0])?void 0:t.value,prefix:e5()(s)?s(v):null,suffix:e5()(c)?c(v):null,title:e5()(u)?u(v):(0,l.jsx)(e6.A,{title:null==v?void 0:v.description,children:(0,l.jsx)("span",{children:null==v?void 0:v.description})}),formatter:function(e){return e5()(d)?d(e,v):e},valueStyle:{color:"#3f8600"}},f))})},n9=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"jdbc.connections.active"},t))},re=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"jvm.memory.used",valueRenderer:function(e){var t=9537e-10*Number(e);return(0,l.jsx)("span",{children:t.toFixed(2)})},suffixRenderer:function(){return(0,l.jsx)("span",{children:"MB"})}},t))},rt=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"jvm.threads.live"},t))},rn=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"process.cpu.usage"},t))},rr=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"process.start.time",valueRenderer:function(e){var t=ep()(1e3*Number(e)).format("llll");return(0,l.jsx)("span",{children:t})}},t))},ri=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"process.uptime",valueRenderer:function(e){var t=ep().utc(1e3*Number(e)).format("HH:mm:ss");return(0,l.jsx)("span",{children:t})},suffixRenderer:function(){return(0,l.jsx)("span",{children:"HH:mm:ss"})}},t))},ra=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"system.cpu.count"},t))},rl=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"system.cpu.usage"},t))},ro=function(e){var t=(0,tb._)({},(0,tx._)(e));return(0,l.jsx)(n7,(0,W._)({type:"system.load.average.1m"},t))},rs=function(){var e=(0,x.Zp)(),t=(0,y.useTranslation)().t;return(0,l.jsxs)("div",{className:"metrics-root",children:[(0,l.jsx)(A.z,{className:"header",onBack:function(){return e(-1)},title:t("Metrics.title"),subTitle:t("Metrics.info")}),(0,l.jsxs)("div",{className:"metrics-card-container",children:[(0,l.jsxs)(n3.A,{gutter:[16,16],children:[(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(n9,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rt,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(re,{})})]}),(0,l.jsxs)(n3.A,{gutter:[16,16],children:[(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rn,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(ra,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rl,{})})]}),(0,l.jsxs)(n3.A,{gutter:[16,16],children:[(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(rr,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(ri,{})}),(0,l.jsx)(n4.A,{span:8,children:(0,l.jsx)(ro,{})})]})]})]})},rc=function(e){var t=(0,tb._)({},(0,tx._)(e)),n=(0,y.useTranslation)().t,r=M(function(e){return e.infoModal}),i=M(function(e){return e.appInfo}),a=D(),o=function(){a((0,B.L)(!r))};return(0,l.jsxs)(eo.A,(0,eT._)((0,W._)({className:"application-info-modal",title:n("ApplicationInfoModal.clientAbout"),centered:!0,open:r,onOk:o,onCancel:o,footer:null},t),{children:[(0,l.jsx)("img",{className:"shogun-logo",src:w}),(0,l.jsx)(eJ.A,{title:n("ApplicationInfoModal.clientVersion"),value:"18.0.1"}),(0,l.jsx)(eJ.A,{title:n("ApplicationInfoModal.backendVersion"),value:"".concat(i.version," (").concat(i.buildTime,")")})]}))};var ru=n(55156),rd=n(63129),rf=function(e){var t=e.actions,n=e.icon,r=e.className,i=e.children,a=e.columns,o=(e.rows,e.title),s=(0,e0._)(e,["actions","icon","className","children","columns","rows","title"]);return(0,l.jsxs)("div",(0,eT._)((0,W._)({className:"dashboard ".concat(r||"")},s),{children:[(0,l.jsxs)("div",{className:"header",children:[n&&(0,l.jsx)("img",{className:"icon",src:n,alt:"".concat(o," icon")}),(0,l.jsx)("div",{className:"title",children:o}),(0,l.jsx)("div",{className:"actions",children:t})]}),(0,l.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(".concat(void 0===a?2:a,", 1fr)")},children:i})]}))},rh=function(e){var t=e.className,n=e.actions,r=e.avatar,i=e.children,a=e.description,o=e.hoverable,s=e.title,c=(0,e0._)(e,["className","actions","avatar","children","description","hoverable","title"]);return(0,l.jsxs)(n8.A,(0,eT._)((0,W._)({},c),{className:"dashboard-card ".concat(void 0!==o&&o?"hoverable":""," ").concat(t||""),actions:n,children:[(0,l.jsx)(n8.A.Meta,{avatar:r,title:s,description:a}),(0,l.jsx)("div",{className:"dashboard-card-body",children:i})]}))};let rp=function(e){var t=e.service,n=e.name,s=(0,y.useTranslation)().t,c=(0,i._)((0,o.useState)(-1),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)(),2),h=f[0],p=f[1];return!h&&u<0&&(0,r._)(function(){var e;return(0,a.YH)(this,function(n){switch(n.label){case 0:p("loading"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,null==t?void 0:t.findAll({page:0,size:1})];case 2:return d(n.sent().totalElements),p("done"),[3,4];case 3:return e=n.sent(),p("failed"),ev.A.error("Could not fetch entities due to the following error: ".concat(e)),[3,4];case 4:return[2]}})})(),(0,l.jsx)("div",{className:"statistics-card",children:(0,l.jsx)(eJ.A,{title:s("DashboardStatistics.statisticsTitle"),value:"".concat(u," ").concat(u>0?n.plural:n.singular)})})},rm=function(){var e,t,n,r,i=(0,y.useTranslation)().t,a=S().dashboard,o=G();return v()(o)?null:(0,l.jsxs)(rf,{className:"welcome-dashboard",title:"Dashboard",columns:3,children:[(null==a||null==(e=a.statistics)?void 0:e.visible)&&(0,l.jsx)(rh,{className:"statistics-dashboard-card",title:"Statistiken",description:"… wie siehts denn aus",avatar:(0,l.jsx)(ru.A,{}),children:(0,l.jsxs)(n3.A,{gutter:16,children:[(0,l.jsx)(n4.A,{span:12,children:(0,l.jsx)(eJ.A,{title:"Feedback",value:1128,prefix:(0,l.jsx)(rd.A,{})})}),(0,l.jsx)(n4.A,{span:12,children:(0,l.jsx)(eJ.A,{title:"Unmerged",value:93,suffix:"/ 100"})})]})}),(null==a||null==(t=a.applications)?void 0:t.visible)&&(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/application"),children:(0,l.jsx)(rh,{className:"layer-dashboard-card",title:i("WelcomeDashboard.applications"),description:i("WelcomeDashboard.applicationInfo"),avatar:(0,l.jsx)(nH.A,{}),children:(0,l.jsx)(rp,{service:o.application(),name:{singular:i("WelcomeDashboard.applicationSingular"),plural:i("WelcomeDashboard.applicationPlural")}})})}),(null==a||null==(n=a.layers)?void 0:n.visible)&&(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/layer"),children:(0,l.jsx)(rh,{className:"layer-dashboard-card",title:i("WelcomeDashboard.layer"),description:i("WelcomeDashboard.layerInfo"),avatar:(0,l.jsx)(nW.A,{}),children:(0,l.jsx)(rp,{service:o.layer(),name:{singular:i("WelcomeDashboard.layerSingluar"),plural:i("WelcomeDashboard.layerPlural")}})})}),(null==a||null==(r=a.users)?void 0:r.visible)&&(0,l.jsx)(b.N_,{to:"".concat(S().appPrefix,"/portal/user"),children:(0,l.jsx)(rh,{className:"layer-dashboard-card",title:i("WelcomeDashboard.user"),description:i("WelcomeDashboard.userInfo"),avatar:(0,l.jsx)(nK.A,{}),children:(0,l.jsx)(rp,{service:o.user(),name:{singular:i("WelcomeDashboard.userSingular"),plural:i("WelcomeDashboard.userPlural")}})})})]})};var rg=n(70133);let rv=function(){var e,t=(0,i._)((0,o.useState)(!1),2),n=t[0],s=t[1],c=(0,i._)((0,o.useState)([]),2),u=c[0],d=c[1],f=(0,i._)((0,o.useState)(!1),2),h=f[0],p=f[1],m=D(),g=function(e){return(0,r._)(function(){var t,n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return t={method:"GET",headers:{"Content-Type":"application/json"}},[4,fetch("".concat(S().path.modelConfigs,"/").concat(e.toLowerCase(),".json"),t)];case 1:if(!(n=r.sent()).ok)return[3,3];if(204===n.status)return[2,Promise.reject()];return[4,n.json()];case 2:return[2,r.sent()];case 3:throw ee.Ay.error("Could not load config for model: ".concat(e)),Error(n.statusText);case 4:return[2]}})})()},v=(0,o.useCallback)(function(e,t){"layer"===t&&m((0,rg.M)(e))},[m]),y=function(e){switch(e){case"layer":return[(0,l.jsx)(nP,{},"uploadLayerButton"),(0,l.jsx)(nm,{},"addLayerButton")];case"user":return(0,l.jsx)(nC,{});case"group":return(0,l.jsx)(nb,{});case"role":return(0,l.jsx)(nS,{})}};return(null===S()||void 0===S()?void 0:S().models)&&(null===S()||void 0===S()||null==(e=S().models)?void 0:e.length)!==(null==u?void 0:u.length)&&!h&&(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return p(!0),[4,Promise.all(null===S()||void 0===S()||null==(e=S().models)?void 0:e.map(g))];case 1:return t=n.sent(),er()(t,u)||d(t),p(!1),[2]}})})(),(0,l.jsxs)("div",{className:"portal",children:[(0,l.jsxs)("div",{className:"menu",children:[(0,l.jsx)(et.Ay,{className:"menu-toggle-button",type:"primary",onClick:function(){return s(!n)},children:n?(0,l.jsx)(Q.A,{}):(0,l.jsx)(X.A,{})}),(0,l.jsx)(n2,{collapsed:n,entityConfigs:u})]}),(0,l.jsx)("div",{className:"content",children:(0,l.jsxs)(x.BV,{children:[(0,l.jsx)(x.qh,{path:"/",element:(0,l.jsx)(rm,{})}),!h&&(null==u?void 0:u.map(function(e){return(0,l.jsx)(x.qh,{path:"".concat(null==e?void 0:e.entityType,"/*"),element:(0,l.jsx)(nl,(0,W._)({onEntitiesLoaded:v,slots:{leftToolbar:y(e.entityType)}},e),e.entityType)},e.entityType)})),(0,l.jsx)(x.qh,{path:"imagefile/*",element:(0,l.jsx)(nM,{})}),(0,l.jsx)(x.qh,{path:"status/metrics/*",element:(0,l.jsx)(rs,{})}),(0,l.jsx)(x.qh,{path:"status/logs/*",element:(0,l.jsx)(nB,{})}),(0,l.jsx)(x.qh,{path:"settings/global/*",element:(0,l.jsx)(nL,{})}),(0,l.jsx)(x.qh,{path:"settings/logs/*",element:(0,l.jsx)(nV,{})})]})}),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(rc,{})})]})};var ry=n(32511),rb=n(32559),rx=n(54299);let rj=function(){var e=(0,i._)((0,o.useState)(),2),t=e[0],n=e[1],p=(0,i._)((0,o.useState)([]),2),g=p[0],j=p[1],A=(0,o.useRef)(null),w=M(function(e){return e.layerSuggestionList}),C=M(function(e){return e.entityId}),_=D(),T=G(),k=(0,c.dJ)(),E=(0,y.useTranslation)().t;(0,o.useEffect)(function(){(0,r._)(function(){var e,t;return(0,a.YH)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,null==T?void 0:T.layer().findAllNoPaging()];case 1:return e=n.sent(),v()(e)||_((0,rg.M)(e)),A.current&&A.current.dispose(),[3,3];case 2:return t=n.sent(),m().error(t),[3,3];case 3:return[2]}})})()},[_,T]);var P=(0,o.useCallback)(function(){return(0,r._)(function(){var e,t,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n("loading"),[4,null==T?void 0:T.openapi().getApiDocs("v3")];case 1:return e=a.sent(),_((0,rb.Y)(e)),[4,null==T?void 0:T.info().getAppInfo()];case 2:if(t=a.sent(),v()(t)||_((0,ry.a)(t)),!(null==t?void 0:t.userId))return[3,4];return[4,null==T?void 0:T.user().findOne(t.userId)];case 3:r=a.sent(),v()(r)||_((0,rx.i)(r)),a.label=4;case 4:return n("done"),[3,6];case 5:return i=a.sent(),n("failed"),m().error(i),[3,6];case 6:return[2]}})})()},[_,T]),N=$(),F=(0,o.useCallback)(function(e){return(0,r._)(function(){var t,n,r,i;return(0,a.YH)(this,function(a){switch(a.label){case 0:if(n=[],!(w&&e)||!(r=w.filter(function(t){return t.id===e})[0]))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,N(r)];case 2:return void 0!==(t=a.sent())&&t.featureTypes[0].properties.forEach(function(e){n.push(e.name)}),[3,4];case 3:return i=a.sent(),m().error(i),n[0]="",[3,4];case 4:return[2,n]}})})()},[N,w]),L=(0,o.useCallback)(function(){k&&(A.current=k.languages.registerCompletionItemProvider("json",{triggerCharacters:["."],provideCompletionItems:function(e,t){return(0,r._)(function(){var n,r,i;return(0,a.YH)(this,function(a){return(n=e.getLineContent(t.lineNumber).trim()).startsWith('"layerId"')?(r=e.getWordAtPosition(t),[2,{suggestions:w.map(function(e){var n,i;return{insertText:null!=(i=null==e||null==(n=e.id)?void 0:n.toString())?i:"",label:"".concat(e.name," (").concat(e.id,")"),kind:k.languages.CompletionItemKind.Value,documentation:"".concat(JSON.stringify(e,null," ")),range:{startColumn:r?r.startColumn:t.column,endColumn:r?r.endColumn:t.column,startLineNumber:t.lineNumber,endLineNumber:t.lineNumber}}})}]):n.startsWith('"propertyName"')?(i=e.getWordAtPosition(t),[2,{suggestions:g.map(function(e){return{insertText:'"'.concat(e,'"'),label:e,kind:k.languages.CompletionItemKind.Value,documentation:"".concat(JSON.stringify(e,null," ")),range:{startColumn:i?i.startColumn:t.column,endColumn:i?i.endColumn:t.column,startLineNumber:t.lineNumber,endLineNumber:t.lineNumber}}})}]):[2]})})()}}))},[k,w,g]);return((0,o.useEffect)(function(){P()},[P]),(0,o.useEffect)(function(){(0,r._)(function(){return(0,a.YH)(this,function(e){switch(e.label){case 0:return[4,F(C)];case 1:return j(e.sent()),[2]}})})()},[C,F]),(0,o.useEffect)(function(){return L(),function(){A.current&&A.current.dispose()}},[L]),"loading"===t)?(0,l.jsx)(u.Ay,{className:"result-spin",icon:(0,l.jsx)(q,{})}):"failed"===t?(0,l.jsx)(u.Ay,{status:"warning",title:E("App.loadFail")}):(0,l.jsx)(d.Ay,{theme:{cssVar:!0},children:(0,l.jsx)(f.A,{children:(0,l.jsx)("div",{className:"app",children:(0,l.jsxs)(b.Kd,{children:[(0,l.jsx)(H,{}),(0,l.jsx)(s().Suspense,{fallback:(0,l.jsx)(h.A,{className:"suspense-spin",indicator:(0,l.jsx)(q,{})}),children:(0,l.jsxs)(x.BV,{children:[(0,l.jsx)(x.qh,{path:"".concat(S().appPrefix,"/portal/*"),element:(0,l.jsx)(rv,{})}),(0,l.jsx)(x.qh,{path:"".concat(S().appPrefix,"/"),element:(0,l.jsx)(x.C5,{to:"".concat(S().appPrefix,"/portal")})})]})})]})})})})}},80630(e,t,n){"use strict";n.d(t,{Ay:()=>o,DU:()=>l});var r=n(74848),i=n(72660),a=n.n(i)().createContext(void 0),l=function(e){var t=e.client,n=e.children;return(0,r.jsx)(a.Provider,{value:t,children:n})};let o=a},57098(e,t,n){"use strict";var r=n(3371),i=n(8674),a=n(74848);n(75308),n(6);var l=n(72660),o=n.n(l),s=n(72854),c=n(82439),u=n(90697),d=n(69455),f=n(69843),h=n.n(f),p=n(5338),m=n(45135),g=n(25307),v=n.n(g),y=n(4724),b=o().createContext([]),x=function(e){var t=e.plugins,n=e.children;return(0,a.jsx)(b.Provider,{value:t,children:n})},j=n(80630),S=n(97060),A=n(71853),w=n(43710),C=n(81309),_=n(93079),T=n(32511),k=n(69182),E=n(10721),P=n(8267),N=n(70133),F=n(32559),L=n(54299),I=(0,C.iZ)(),D=(0,C.U1)({reducer:(0,_.HY)((0,w._)({appInfo:T.A,userInfo:L.A,infoModal:E.A,openApiDocs:F.A,layerSuggestionList:N.A,entityId:k.A,jsonEditor:P.Ay},void 0)),middleware:function(e){return e().prepend(I.middleware)}}),M=o().lazy(function(){return Promise.all([n.e("644"),n.e("5"),n.e("799")]).then(n.bind(n,35824))});(0,r._)(function(){var e,t,n,o,f,g,b,w,C;return(0,i.YH)(this,function(_){switch(_.label){case 0:if(e=document.getElementById("app"),h()(e))return A.A.error("element not found"),[2];t=(0,p.createRoot)(e),_.label=1;case 1:return _.trys.push([1,4,,5]),[4,(0,r._)(function(){var e,t,n,a,l;return(0,i.YH)(this,function(o){switch(o.label){case 0:if(e=v().security.keycloak.enabled,t=v().security.keycloak.host,n=v().security.keycloak.realm,a=v().security.keycloak.clientId,!e)return A.A.info("Not using the keycloak adapter"),[2,null];if(!t)throw Error("Config key security.keycloak.host is not set");if(!n)throw Error("Config key security.keycloak.realm is not set");if(!a)throw Error("Config key security.keycloak.clientId is not set");return(l=new d.A({url:t,realm:n,clientId:a})).onTokenExpired=function(){return(0,r._)(function(){var e;return(0,i.YH)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,l.updateToken(0)];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),A.A.error("Error while refreshing the access token: ",e),[3,3];case 3:return[2]}})})()},[4,l.init({onLoad:"login-required",checkLoginIframe:!1})];case 1:return o.sent(),[2,l]}})})()];case 2:var T;if(n=null!=(o=_.sent())?o:void 0,!h()(n)&&(f=v().security.keycloak.authorizedRoles||[],g=v().security.keycloak.clientId,!f.some(function(e){return n.hasResourceRole(e,g)})))throw Error("UNAUTHORIZED");return T=n,b=new y.A({url:v().path.shogunBase||"/",keycloak:T}),[4,(0,r._)(function(){var e,t,n,l,o,c,u,d,f,h,p,m,g,y,b,x,j,w,C;return(0,i.YH)(this,function(_){switch(_.label){case 0:if(!v().plugins||0===v().plugins.length)return A.A.info("No plugins found"),[2,[]];A.A.info("Loading plugins"),e=[],t=!0,n=!1,l=void 0,_.label=1;case 1:_.trys.push([1,9,10,11]),o=v().plugins[Symbol.iterator](),_.label=2;case 2:if(t=(c=o.next()).done)return[3,8];if(d=(u=c.value).name,f=u.resourcePath,h=u.exposedPaths,!d)return A.A.error("Required plugin configuration 'name' is not set"),[2,e];if(!f)return A.A.error("Required plugin configuration 'resourcePath' is not set"),[2,e];if(!h)return A.A.error("Required plugin configuration 'exposedPaths' is not set"),[2,e];A.A.info("Loading plugin ".concat(d," (with exposed paths ").concat(h.join(" and "),") from ").concat(f)),p=void 0,_.label=3;case 3:var T,k,E;return _.trys.push([3,5,,6]),[4,(T=d,k=f,E=h,(0,r._)(function(){var e,t,n,r,a,l,o,c,u,d;return(0,i.YH)(this,function(i){switch(i.label){case 0:(0,s.init)({name:"SHOGunAdmin",remotes:[{entry:k,name:T}]}),e=[],t=!0,n=!1,r=void 0,i.label=1;case 1:i.trys.push([1,6,7,8]),a=E[Symbol.iterator](),i.label=2;case 2:if(t=(l=a.next()).done)return[3,5];return o=l.value,c="".concat(T,"/").concat(o.startsWith("./")?o.substring(2):o),[4,(0,s.loadRemote)(c)];case 3:(u=i.sent())&&u.default&&e.push(u.default),i.label=4;case 4:return t=!0,[3,2];case 5:return[3,8];case 6:return d=i.sent(),n=!0,r=d,[3,8];case 7:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 8:return[2,e]}})})())];case 4:return p=_.sent(),A.A.info("Successfully loaded plugin ".concat(d)),[3,6];case 5:return m=_.sent(),A.A.error("Could not load plugin ".concat(d,":"),m),[2,e];case 6:g=!0,y=!1,b=void 0;try{for(x=function(){var t=w.value,n=t.component;t.wrappedComponent=function(){return(0,a.jsx)(n,{})},t.i18n&&Object.entries(t.i18n).forEach(function(e){var t=e[0],n=e[1].translation;S.A.addResourceBundle(t,"translation",n,!0,!0)}),e.push(t)},j=p[Symbol.iterator]();!(g=(w=j.next()).done);g=!0)x()}catch(e){y=!0,b=e}finally{try{g||null==j.return||j.return()}finally{if(y)throw b}}_.label=7;case 7:return t=!0,[3,2];case 8:return[3,11];case 9:return C=_.sent(),n=!0,l=C,[3,11];case 10:try{t||null==o.return||o.return()}finally{if(n)throw l}return[7];case 11:return[2,e]}})})()];case 3:return w=_.sent(),t.render((0,a.jsx)(j.DU,{client:b,children:(0,a.jsx)(x,{plugins:w,children:(0,a.jsx)(m.Kq,{store:D,children:(0,a.jsx)(l.Suspense,{children:(0,a.jsx)(M,{})})})})})),[3,5];case 4:return C=_.sent(),A.A.error(C),"UNAUTHORIZED"===C.message?t.render((0,a.jsx)(c.Ay,{status:"403",title:S.A.t("Index.unauthorizedTitle"),extra:(0,a.jsx)(u.Ay,{onClick:function(){return(0,r._)(function(){return(0,i.YH)(this,function(e){switch(e.label){case 0:if(!n)return[3,3];return[4,n.logout()];case 1:return e.sent(),[4,n.login()];case 2:e.sent(),e.label=3;case 3:return[2]}})})()},children:S.A.t("Index.backToLoginButtonText")})})):t.render((0,a.jsx)(c.Ay,{status:"warning",title:S.A.t("Index.errorTitle")})),[3,5];case 5:return[2]}})})()},42492(e,t,n){Promise.all([n.e("644"),n.e("5"),n.e("789"),n.e("725")]).then(n.bind(n,57098))}}]);
|
|
2
|
+
//# sourceMappingURL=common.6b72d413fe1981cf.js.map
|