tocco-admin 1.0.166 → 1.0.167

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.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[141],{57387:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var r=n(27361),a=n.n(r),o=n(74806),i=n(50558),c=n(29785),s=n(59713),l=n.n(s),u=n(17563),d=n(73183),p=n(6699),f=n(90169),h=n(85893);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.entityName,n=e.entityKeys,r=e.children,a=n.map((function(e){return{entityName:t,key:e}}));return(0,h.jsx)(p.Z,{to:"/docs?rootNodes=".concat(JSON.stringify(a)),target:"_blank",children:r})};const g=function(e){var t=u.parse(e.history.location.search);return(0,h.jsx)(d.default,y(y(y({},e),{},{routerType:"inherit",navigationStrategy:{ListLink:v,DetailLink:f.z2}},t.rootNodes&&{rootNodes:JSON.parse(t.rootNodes)}),{},{searchFormCollapsed:e.searchFormCollapsed,onSearchFormCollapsedChange:function(t){var n=t.collapsed;e.saveUserPreferences({"admin.list.searchFormCollapsed":n})},scrollBehaviour:"inline"}))};var b={saveUserPreferences:c.RK};const w={container:(0,i.connect)((function(e,t){return{searchFormCollapsed:a()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",null)}}),b)((0,o.ZP)(g))}},18632:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kn});var r=n(15857),a=n(74806),o=n(50558),i="path/SET_CURRENT_VIEW_INFO",c="path/LOAD_CURRENT_ROUTE",s="path/SET_BREADCRUMBS_INFO",l="path/UPDATE_BREADCRUMBS_INFO",u="path/SET_RELATIONS",d="path/SET_CURRENT_VIEW_TITLE",p="path/SET_RELATIONS_INFO",f="path/PROPAGATE_REFRESH",h="path/INVALIDATE_LAST_BREADCRUMB",m="path/SELECT_RELATION",y=function(e,t){return{type:i,payload:{location:e,currentViewInfo:t}}},v=function(e,t){return{type:l,payload:{path:e,breadcrumbsInfo:t}}},g=function(e){return{type:u,payload:{relations:e}}},b=function(e){return{type:p,payload:{relationsInfo:e}}},w=function(e){return{type:m,payload:{selectedRelation:e}}},x=n(1024),P=n.n(x),O=n(56746),j=n(19743),Z=n(5303),E=n(59713),k=n.n(E),R=n(27361),N=n.n(R),C=n(70696),S=n(75354),A=n(87467),D=n(90169),I=n(13442),L=function(e){var t=I.Z.extractParamsFromPath("/e/:entity/:key?/:relation*/:view(list|detail|edit|create|relations|action)/:actionId?",e),n=I.Z.extractParamsFromPath("/e/action/:actionId",e);return t||n},V=n(46054),T=n(85893);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=function(e){var t=e.history,n=e.match,r=e.setCurrentViewTitle,a=e.currentViewInfo,o=e.intl,i=t.location;if((0,x.useEffect)((function(){return a&&r(o.formatMessage({id:"client.actions.".concat(a.actionId,".title")})),function(){r(null)}}),[a,r,o]),!a)return null;var c=S.Z.fromQueryString(i.search),s=N()(i,"state.selection",c.selection),l=N()(i,"state.definition.properties",c.actionProperties),u=function(){var e=L(n.url).key?(0,A.H)(n.url):(0,A.H)(n.url,2);t.replace(e)};return(0,T.jsx)(V.Z,F(F({history:t,match:n,appId:a.actionId},c),{},{selection:s,actionProperties:l,navigationStrategy:(0,D.ZP)(t,n),onSuccess:u,onError:u,onCancel:u}))},M=function(e,t){return 0===Object.keys(C.Z.difference(e,t)).length};const W=P().memo(U,M);var B={setCurrentViewTitle:function(e){return{type:d,payload:{currentViewTitle:e}}}};const H=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),B)((0,a.ZP)(W));var z=n(50600),K=n(91073),$=n(88757),q=n(319),G=n.n(q),Y=n(63038),J=n.n(Y),Q=n(28655),X=n.n(Q),ee=n(38205),te=n(73183),ne=n(35923),re=n(12568),ae=n(88601),oe=n(7281),ie=n(24688);const ce=function(e){var t=e.when,n=e.message;return(0,x.useEffect)((function(){return t&&ie.Z.activatePreventFromLeaving(),function(){ie.Z.deactivatePreventFromLeaving()}}),[t]),(0,T.jsx)(O.NL,{when:t,message:n})},se=ce;var le,ue=ee.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(le||(le=X()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),ae.Z.color("paper"),oe.Z.space(0));const de=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.dispatchEmittedAction,c=e.setPendingChanges,s=n.location,l=N()(s,"state.defaultValues",[]),u=(0,x.useState)(!1),d=J()(u,2),p=d[0],f=d[1];if((0,x.useEffect)((function(){return function(){return c(!1)}}),[c]),!t)return null;var h,m=t.model,y=t.reverseRelation,v=t.parentKey,g=m.name,b=N()(m,"paths.".concat(y,".multi"),!1),w=[].concat(G()(y&&v?[{id:y,value:b?[v]:v}]:[]),G()(l));return(0,T.jsxs)(ue,{children:[(0,T.jsx)(se,{when:p,message:(h="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:h}))}),(0,T.jsx)(ne.ZP,{entityName:g,formName:g,mode:"create",defaultValues:w,emitAction:function(e){i(e)},navigationStrategy:(0,D.ZP)(n,r),chooseDocument:o,onEntityCreated:function(e){var t=e.id;f(!1),n.push(r.url.replace(/create$/,t))},onTouchedChange:function(e){var t=e.touched;f(t),c(t)},listApp:re.ZP,docsApp:te.default})]})};var pe={chooseDocument:K.Z.actions.chooseDocument,dispatchEmittedAction:z.Z.dispatchEmittedAction,setPendingChanges:$.c0};const fe=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),pe)((0,a.ZP)(de));var he=n(29785),me=n(17563),ye=n(29441),ve=n(48926),ge=n.n(ve),be=n(87757),we=n.n(be),xe=n(81719);function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const je=function(e){var t=e.entityName,n=e.entityKey,r=e.showActions,a=e.noLeftPadding,o=e.openResource,i=e.initialLocation,c=e.sortable,s=(0,x.useState)(null),l=J()(s,2),u=l[0],d=l[1],p=(0,x.useCallback)(ge()(we().mark((function e(){return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:xe.Z.simpleRequest("entities/2.0/"+t+"/"+n+"/entitydocs/folder").then((function(e){d(e.body.key)}));case 1:case"end":return e.stop()}}),e)}))),[t,n]);return(0,x.useEffect)((function(){p()}),[p]),u&&(0,T.jsx)(te.default,Oe(Oe(Oe({routerType:"routerless",initialLocation:i,noLeftPadding:a,sortable:c,searchFormType:"none",rootNodes:[{key:u,entityName:"Folder"}],embedded:!0,showActions:r},!1===r?{selectionStyle:"none"}:{}),{},{disableViewPersistor:!0},o?{openResource:o}:{}),{},{scrollBehaviour:"inline"}))};const Ze=function(e){var t=e.currentViewInfo,n=e.initialLocation;return(0,T.jsx)(je,{noLeftPadding:!1,entityName:t.parentModel.name,entityKey:t.parentKey,showActions:!0,initialLocation:n})};function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Re=function(e){var t=e.match,n=e.history,r=e.currentViewInfo,a=e.emitAction,o=e.searchFormCollapsed,i=e.saveUserPreferences;if(!r)return null;var c=me.parse(n.location.search),s=n.location.hash?n.location.hash.substring(1):null;return"Resource"===r.model.name?(0,T.jsx)(Ze,{currentViewInfo:r,initialLocation:s}):(0,T.jsx)(re.ZP,ke(ke({emitAction:a,limit:25,id:"".concat(r.model.name,"_list"),entityName:r.model.name,formName:c.formName||r.model.name,onRowClick:function(e){var r=e.id;n.push(t.url.replace(/list$/,"")+r)}},r.reverseRelation&&{parent:{key:r.parentKey,reverseRelationName:r.reverseRelation,model:r.parentModel.name}}),{},{showLink:!0,navigationStrategy:(0,D.ZP)(n,t),searchFormPosition:"left",searchFormType:"admin",scrollBehaviour:"inline",store:ye.Z.viewInfoSelector(n.location.pathname).store,onStoreCreate:function(e){ye.Z.persistViewInfo(n.location.pathname,{store:e},r.level)},actionAppComponent:V.Z,tql:c.tql,searchFormCollapsed:o,onSearchFormCollapsedChange:function(e){var t=e.collapsed;i({"admin.list.searchFormCollapsed":t})}}))};var Ne={emitAction:function(e){return z.Z.dispatchEmittedAction(e)},saveUserPreferences:he.RK};const Ce=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],searchFormCollapsed:N()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",!1)}}),Ne)((0,a.ZP)(Re));var Se,Ae=n(4975);function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Le=ee.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(Se||(Se=X()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),ae.Z.color("paper"),oe.Z.space(0));const Ve=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.emitAction,c=e.propagateRefresh,s=e.invalidateLastBreadcrumb,l=e.setPendingChanges,u=(0,x.useState)(!1),d=J()(u,2),p=d[0],f=d[1];if((0,x.useEffect)((function(){return function(){return l(!1)}}),[l]),!t||t.pathname!==n.location.pathname)return null;var h=me.parse(location.search).formName,m=t.model.name;return(0,T.jsxs)(Le,{children:[(0,T.jsx)(se,{when:p,message:function(e){return n.location.pathname!==e.pathname&&(t="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:t}));var t}}),(0,T.jsx)(ne.ZP,{entityName:m,entityId:t.key,formName:h||m,mode:"update",emitAction:i,onTouchedChange:function(e){var t=e.touched;f(t),l(t)},navigationStrategy:Ie(Ie({},(0,D.ZP)(n,r)),{},{navigateToCreateRelative:function(e,t){if(e){var a=(0,A.H)(r.url,1);n.push({pathname:"".concat(a,"/").concat(e,"/create"),state:t})}else{var o=(0,A.H)(r.url,2);n.push({pathname:o+"/create",state:t})}}}),chooseDocument:o,onEntityDeleted:function(){var e=(0,A.H)(r.url,2);n.push(e)},onEntityUpdated:function(){var e=n.location;s(e)},onRefresh:function(){var e=n.location;c(e)},actionAppComponent:V.Z,onSubGridRowClick:function(e){var t=e.id,a=e.relationName,o=(0,A.H)(r.url);n.push("".concat(o,"/").concat(a,"/").concat(t))},listApp:re.ZP,docsApp:te.default})]})};var Te={chooseDocument:K.Z.actions.chooseDocument,emitAction:function(e){return z.Z.dispatchEmittedAction(e)},propagateRefresh:function(e){return{type:f,payload:{location:e}}},invalidateLastBreadcrumb:function(e){return{type:h,payload:{location:e}}},setPendingChanges:$.c0};const _e=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),Te)((0,a.ZP)(Ve));var Fe=n(34206),Ue=n(88162),Me={};const We=function(e){var t=e.currentViewInfo,n=e.history,r=e.selectedRelation,a=e.sortable;return(0,T.jsx)(je,{entityName:t.model.name,entityKey:t.key,showActions:!1,noLeftPadding:!0,history:n,openResource:function(e){n.push("".concat(r.relationName,"/list#").concat(e))},sortable:a})};var Be=function(e){var t=e.selectedRelation,n=e.currentViewInfo,r=e.match,a=e.history,o=e.emitAction,i="".concat(t.reverseRelationName).concat(t.relationName);return(0,T.jsx)(re.ZP,{id:"preview"+t.reverseRelationName+t.targetEntity,entityName:t.targetEntity,formName:t.targetEntity,parent:{key:n.key,reverseRelationName:t.reverseRelationName,model:n.model.name,relationName:t.relationName},showLink:!0,navigationStrategy:(0,D.ZP)(a,r),onRowClick:function(e){var n=e.id,o=r.url.replace(/detail$/,"");a.push("".concat(o).concat(t.relationName,"/").concat(n))},onNavigateToCreate:function(){var e=(0,A.H)(r.url);a.push(e+"/"+t.relationName+"/create")},searchFormType:"fulltext",selectionStyle:"none",store:ye.Z.viewInfoSelector(a.location.pathname)["store-".concat(i)],onStoreCreate:function(e){ye.Z.persistViewInfo(n.pathname,k()({},"store-".concat(i),e),n.level)},showActions:!1,limit:15,emitAction:o,scrollBehaviour:"inline"},t.reverseRelationName+t.targetEntity)};const He=P().memo(Be);var ze,Ke,$e,qe,Ge,Ye,Je,Qe,Xe,et,tt,nt,rt,at,ot=n(6699),it=n(65035),ct=n(11347),st=n(84647),lt=n(69829),ut=n(30759),dt=ee.ZP.div.withConfig({displayName:"StyledRelationsViewWrapper"})(ze||(ze=X()(["\n display: ",";\n height: 100%;\n flex-direction: column;\n"])),(function(e){return e.isRightPaneCollapsed?"none":"flex"})),pt=ee.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(Ke||(Ke=X()(["\n display: ",";\n flex: 1;\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isRightPaneCollapsed?"flex":"none"}),ae.Z.color("paper"),oe.Z.space(-1.5),oe.Z.space(-2.5)),ft=ee.ZP.div.withConfig({displayName:"StyledToggleCollapse"})($e||($e=X()(["\n display: flex;\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n"])),ae.Z.color("paper"),oe.Z.space(-1.5),oe.Z.space(-1.5)),ht=(0,ee.ZP)(it.Z).withConfig({displayName:"StyledToggleCollapseButton"})(qe||(qe=X()(["\n font-size: ",";\n padding: 0;\n margin-left: auto;\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),oe.Z.font(0),pt,ae.Z.color("secondaryLight")),mt=ee.ZP.div.withConfig({displayName:"StyledPreviewBox"})(Ge||(Ge=X()(["\n background-color: ",";\n padding: ",";\n margin-top: 3px;\n display: flex;\n flex-direction: column;\n flex: 1;\n"])),ae.Z.color("paper"),oe.Z.space(-1)),yt=ee.ZP.div.withConfig({displayName:"StyledRelationBoxes"})(Ye||(Ye=X()(["\n background-color: ",";\n padding: ",";\n display: grid;\n grid-template-columns: repeat(auto-fit, 170px);\n grid-gap: ",";\n justify-content: space-between;\n overflow-y: auto;\n align-content: flex-start;\n height: fit-content;\n min-height: 150px;\n max-height: 20%;\n ","\n"])),ae.Z.color("paper"),oe.Z.space(-1),oe.Z.space(-2),ct.C),vt=(0,ee.ZP)(ot.Z).withConfig({displayName:"StyledPreviewLink"})(Je||(Je=X()(["\n padding-left: ",";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n"])),oe.Z.space(-.5)),gt=ee.ZP.div.withConfig({displayName:"StyledRelationLinks"})(Qe||(Qe=X()(["\n display: none;\n margin-left: auto;\n\n * {\n color: ",";\n padding-left: ",";\n }\n"])),ae.Z.color("text"),oe.Z.space(-4.5)),bt=ee.ZP.div.withConfig({displayName:"StyledRelationBox"})(Xe||(Xe=X()(["\n border-radius: ",";\n padding: "," ",";\n display: flex;\n background-color: ",";\n height: fit-content;\n\n &&& {\n * {\n color: ",";\n box-sizing: initial;\n }\n }\n ",";\n\n /* allow hover styles only on non-touch devices */\n ","\n"])),ae.Z.radii("large"),oe.Z.space(-2.7),oe.Z.space(-1),(function(e){return e.selected&&ae.Z.color("secondary")}),(function(e){return e.selected&&ae.Z.color("paper")}),(function(e){return e.selected&&"\n ".concat(gt," {\n display: flex;\n }\n ")}),!st.b&&(0,ee.iv)(et||(et=X()(["\n &:hover "," {\n display: flex;\n }\n\n && {\n :hover {\n background-color: ",";\n\n * {\n color: ",";\n }\n cursor: pointer;\n }\n }\n\n ",":hover * {\n color: ",";\n }\n "])),gt,ae.Z.color("secondaryLight"),ae.Z.color("paper"),ot.Z,ae.Z.color("secondary"))),wt=(0,ee.ZP)(lt.Fe).withConfig({displayName:"StyledRelationLabel"})(tt||(tt=X()(["\n && {\n max-width: 110px;\n }\n"]))),xt=ee.ZP.span.withConfig({displayName:"StyledCountLabel"})(nt||(nt=X()(["\n ","\n"])),(0,ut.Z)());const Pt=function(e){var t,n,r=e.relation,a=e.history,o=e.match,i=e.relationsInfo,c=e.selectRelation,s=e.selectedRelation,l=e.intl,u=e.entityName,d=r.relationName,p=r.targetEntity,f=r.relationDisplay,h=function(e){return l.formatMessage({id:e})},m=o.url.replace(/(relations|detail)$/,d),y=o.url.replace(/(relations|detail)$/,d)+"/create";return(0,T.jsxs)(bt,{selected:(null==s?void 0:s.relationName)===d,onClick:function(){c(r),a.replace({search:"?relation=".concat(d)}),function(e,t){Me[e]=t}(u,d)},children:[(0,T.jsx)(wt,{title:f.label,children:f.label}),(null===(n=i[d])||void 0===n?void 0:n.count)>0?(0,T.jsxs)(xt,{children:[" (",i[d].count,")"]}):null,(0,T.jsxs)(gt,{children:[(0,T.jsx)(ot.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkView"),to:m,children:rt||(rt=(0,T.jsx)(Ue.Z,{icon:"arrow-right"}))}),(null===(t=i[d])||void 0===t?void 0:t.createPermission)&&"Resource"!==p&&(0,T.jsx)(ot.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkCreate"),to:y,children:at||(at=(0,T.jsx)(Ue.Z,{icon:"plus"}))})]})]})};var Ot,jt,Zt;function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var kt=function(e){var t=e.history,n=e.match,r=e.currentViewInfo,a=e.relations,o=e.relationsInfo,i=e.emitAction,c=e.intl,s=e.isRightPaneCollapsed,l=e.toggleCollapse,u=e.selectedRelation,d=e.selectRelation,p=N()(r,"model.name"),f=(0,x.useCallback)((function(){if((null==a?void 0:a.length)>0){var e=me.parse(t.location.search).relation;if(e)d(a.find((function(t){return t.relationName===e})));else{var n=Me[p];d(n?a.find((function(e){return e.relationName===n})):a[0])}}}),[a,p,t.location.search,d]);if((0,x.useEffect)(f,[f]),(0,x.useEffect)((function(){return u?null:f()}),[u,f]),!a||0===a.length||!r)return null;var h,m,y=function(e){return c.formatMessage({id:e})},v=u?"Resource"===u.targetEntity?We:He:function(){return Ot||(Ot=(0,T.jsx)(P().Fragment,{}))},g=a.map((function(t){return(0,T.jsx)(Pt,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({relation:t,entityName:p},e),"relation-".concat(t.relationName))}));return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(dt,{isRightPaneCollapsed:s,children:[(0,T.jsx)(ft,{children:(0,T.jsx)(ht,{icon:"chevron-right",onClick:l})}),(0,T.jsx)(yt,{children:g}),u&&(0,T.jsxs)(mt,{children:[(0,T.jsxs)(Fe.ZP.H4,{children:[u.relationDisplay.label,(0,T.jsx)(vt,{"aria-label":y("client.admin.entities.relationsView.relationLinkView"),to:n.url.replace(/(relations|detail)$/,u.relationName),children:jt||(jt=(0,T.jsx)(Ue.Z,{icon:"arrow-right"}))}),(h=u.relationName,(null===(m=o[h])||void 0===m?void 0:m.createPermission)&&"Resource"!==u.targetEntity&&(0,T.jsx)(vt,{"aria-label":y("client.admin.entities.relationsView.relationLinkCreate"),to:n.url.replace(/(relations|detail)$/,u.relationName)+"/create",children:Zt||(Zt=(0,T.jsx)(Ue.Z,{icon:"plus"}))}))]}),(0,T.jsx)(v,{selectedRelation:u,match:n,history:t,currentViewInfo:r,emitAction:i,sortable:!0})]})]}),(0,T.jsx)(pt,{onClick:l,isRightPaneCollapsed:s,children:(0,T.jsx)(ht,{icon:"chevron-left",isRightPaneCollapsed:s})})]})},Rt=function(e,t){return 0===Object.keys(C.Z.difference(e,t)).length};const Nt=P().memo(kt,Rt);var Ct={emitAction:function(e){return z.Z.dispatchEmittedAction(e)},selectRelation:w};const St=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relations:e.entities.path.relations,relationsInfo:e.entities.path.relationsInfo,selectedRelation:e.entities.path.selectedRelation}}),Ct)((0,a.ZP)(Nt));var At,Dt,It,Lt=ee.ZP.div.withConfig({displayName:"StyledDetailViewContainer"})(At||(At=X()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n\n .react-bs-container-body {\n height: auto !important;\n }\n"]))),Vt=ee.ZP.div.withConfig({displayName:"StyledDetailViewLeft"})(Dt||(Dt=X()(["\n flex: 1;\n margin-right: 1rem;\n /* Only show one panel at a time on screens <= 500px */\n display: ",";\n"])),(function(e){var t=e.windowWidth,n=e.isRightPaneCollapsed;return t<=500&&!n&&"none"})),Tt=ee.ZP.div.withConfig({displayName:"StyledDetailViewRight"})(It||(It=X()(["\n flex: ",";\n"])),(function(e){return e.isRightPaneCollapsed?"0":"1"}));const _t=function(e){var t=e.match,n=e.history,r=(e.currentViewInfo,e.relationViewCollapsed),a=e.saveUserPreferences,o=(0,Ae.K)(r,(function(e){a({"admin.detail.relationViewCollapsed":e})})),i=o.isCollapsed,c=o.toggleCollapse;return(0,T.jsxs)(Lt,{children:[(0,T.jsx)(Vt,{isRightPaneCollapsed:i,windowWidth:window.innerWidth,children:(0,T.jsx)(j.Z.ErrorBoundary,{children:(0,T.jsx)(_e,{match:t,history:n})})}),(0,T.jsx)(Tt,{isRightPaneCollapsed:i,children:(0,T.jsx)(j.Z.ErrorBoundary,{children:(0,T.jsx)(St,{match:t,history:n,isRightPaneCollapsed:i,toggleCollapse:c})})})]})};var Ft={saveUserPreferences:he.RK};const Ut=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relationViewCollapsed:N()(e.preferences.userPreferences,"admin.detail.relationViewCollapsed",!1)}}),Ft)((0,a.ZP)(_t));const Mt=function(e){var t,n,r=e.match,a=(t=r.path,n=":relation",t.split(n).length-1);return(0,T.jsxs)(O.rs,{children:[(0,T.jsx)(O.AW,{exact:!0,path:"".concat(r.url),render:function(e){return(0,T.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/detail")})}}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/detail"),component:Ut}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/edit"),component:_e}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/relations"),component:St}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/action"),component:H}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/:relation_").concat(a),component:Wt})]})};const Wt=function(e){var t=e.match;return(0,T.jsxs)(O.rs,{children:[(0,T.jsx)(O.AW,{exact:!0,path:t.url,render:function(e){return(0,T.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/list")})}}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/action/:id"),component:H}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/list"),component:Ce}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/create"),component:fe}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/:key"),component:Mt})]})};var Bt=n(54680);const Ht=(0,o.connect)((function(e,t){return{pathPrefix:"/e",breadcrumbsInfo:e.entities.path.breadcrumbsInfo,currentView:e.entities.path.currentViewTitle?{display:e.entities.path.currentViewTitle,title:e.entities.path.currentViewTitle}:null}}),{})((0,a.ZP)(Bt.Z));var zt=n(44012),Kt=n(39233);const $t=function(e){var t=e.currentViewInfo,n="client.admin.entity.errorView.",r="detail"===t.type?"detailTitle":"defaultTitle",a="listDescription";return"detail"===t.type?a="detailDescription":"list"===t.type&&t.error.relationName&&(a="relationDescription"),(0,T.jsx)(Kt.Z,{title:(0,T.jsx)(zt.Z,{id:n+r}),message:(0,T.jsx)(zt.Z,{id:n+a,values:t.error})})};const qt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}))((0,a.ZP)($t));var Gt,Yt,Jt,Qt,Xt=ee.ZP.div.withConfig({displayName:"StyledWrapper"})(Gt||(Gt=X()(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n height: 100%;\n width: 100%;\n"]))),en=ee.ZP.div.withConfig({displayName:"StyledContent"})(Yt||(Yt=X()(["\n grid-area: content;\n overflow: hidden;\n"]))),tn=ee.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(Jt||(Jt=X()(["\n grid-area: breadcrumbs;\n"])));const nn=function(e){var t=e.match,n=e.history,r=e.loadCurrentRoute,a=e.currentViewInfo,o=n.location;(0,x.useEffect)((function(){r(o)}),[o,r]);var i=null!=a&&a.error?(0,T.jsx)(qt,{history:n}):(0,T.jsxs)(O.rs,{children:[(0,T.jsx)(O.AW,{path:"".concat(t.url,"/action/:actionId"),component:H}),(0,T.jsx)(O.AW,{path:"".concat(t.url,"/:entity"),component:Wt}),(0,T.jsx)(O.AW,{exact:!0,path:t.url,component:Z.Z})]});return(0,T.jsxs)(Xt,{children:[Qt||(Qt=(0,T.jsx)(j.Z.ErrorBoundary,{children:(0,T.jsx)(tn,{children:(0,T.jsx)(Ht,{})})})),(0,T.jsx)(en,{children:i})]})};var rn={loadCurrentRoute:function(e){return{type:c,payload:{location:e}}}};const an=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),rn)((0,a.ZP)(nn));var on,cn=n(34857),sn=n(81770);function ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dn=(on={},k()(on,i,(function(e,t){var n=t.payload,r=n.location,a=n.currentViewInfo;return un(un({},e),{},{currentViewInfos:un(un({},e.currentViewInfos),{},k()({},r,un(un({},e.currentViewInfos[r]),a)))})})),k()(on,s,sn.Z.singleTransferReducer("breadcrumbsInfo")),k()(on,l,(function(e,t){var n=t.payload,r=n.path,a=n.breadcrumbsInfo;return un(un({},e),{},{breadcrumbsInfo:e.breadcrumbsInfo.map((function(e){return e.path===r?un(un({},e),a):e}))})})),k()(on,u,sn.Z.singleTransferReducer("relations")),k()(on,p,sn.Z.singleTransferReducer("relationsInfo")),k()(on,d,sn.Z.singleTransferReducer("currentViewTitle")),k()(on,m,sn.Z.singleTransferReducer("selectedRelation")),on),pn={currentViewInfos:{},breadcrumbsInfo:[],relations:null,relationsInfo:{},selectedRelation:null};var fn=n(57557),hn=n.n(fn),mn=n(78718),yn=n.n(mn),vn=n(35937),gn=n.n(vn),bn=n(44759);function wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pn=we().mark(An),On=we().mark(In),jn=we().mark(Ln),Zn=we().mark(Vn),En=we().mark(Fn),kn=we().mark(Wn),Rn=we().mark(Bn),Nn=we().mark(Hn),Cn=function(e){return e.entities.path},Sn=/[^/]+\/?[^/]+/g;function An(){return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,cn.$6)([(0,cn.Fm)(c,Dn),(0,cn.Fm)(f,Un),(0,cn.Fm)(h,Mn)]);case 2:case"end":return e.stop()}}),Pn)}function Dn(e){var t=e.payload.location;return we().mark((function e(){var n,r,a;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pathname,e.next=3,(0,cn.RE)(Vn,n);case 3:if(!((r=e.sent).length>0)){e.next=15;break}return e.next=7,(0,cn.RE)(In,n,r);case 7:if("detail"!==(a=e.sent).type||a.error){e.next=11;break}return e.next=11,(0,cn.RE)(Fn,a.model,a.key);case 11:return e.next=13,(0,cn.RE)(Ln,r);case 13:return e.next=15,(0,cn.RE)(ye.Z.clearPersistedViews,a.level+1);case 15:case"end":return e.stop()}}),e)}))()}function In(e,t){var n;return we().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,cn.RE)(Tn,e,t);case 2:return n=r.sent,r.next=5,(0,cn.gz)(y(e,n));case 5:return r.abrupt("return",n);case 6:case"end":return r.stop()}}),On)}function Ln(e){var t;return we().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,cn.RE)(_n,e);case 2:return t=n.sent,n.next=5,(0,cn.gz)({type:s,payload:{breadcrumbsInfo:t}});case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),jn)}function Vn(e){var t,n,r,a,o,i,c,s,l,u,d,p,f,h,m,y,v;return we().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,cn.RE)(L,e);case 2:if(t=g.sent,n=[],null!==t){g.next=6;break}return g.abrupt("return",n);case 6:if(!t.entity){g.next=70;break}return g.prev=7,g.next=10,(0,cn.RE)(xe.Z.fetchModel,t.entity);case 10:r=g.sent,n.push({type:"list",model:r}),g.next=18;break;case 14:return g.prev=14,g.t0=g.catch(7),n.push({type:"list",error:{entityName:t.entity}}),g.abrupt("return",n);case 18:if(!t.key){g.next=67;break}return g.next=21,(0,cn.RE)(xe.Z.entityExists,r.name,t.key);case 21:if(!g.sent){g.next=29;break}return g.next=25,(0,cn.RE)(xe.Z.fetchDisplay,r.name,t.key);case 25:a=g.sent,n.push({type:"detail",key:t.key,model:r,display:a}),g.next=31;break;case 29:return n.push({type:"detail",error:{entityName:r.label,key:t.key}}),g.abrupt("return",n);case 31:if(!t.relation){g.next=67;break}o=t.relation.split("/"),i=0;case 34:if(!(i<o.length)){g.next=67;break}if(c=o[i],s=n[n.length-1],i%2!=0){g.next=50;break}if(l=c,u=s.model.paths[l]){g.next=43;break}return n.push({type:"list",error:{relationName:l,entityName:s.model.name}}),g.abrupt("return",n);case 43:return d=u.targetEntity,g.next=46,(0,cn.RE)(xe.Z.fetchModel,d);case 46:p=g.sent,n.push({type:"list",model:p,relationName:l,parent:s}),g.next=64;break;case 50:return f=c,h=s.model,g.next=54,(0,cn.RE)(xe.Z.entityExists,h.name,f);case 54:if(!g.sent){g.next=62;break}return g.next=58,(0,cn.RE)(xe.Z.fetchDisplay,h.name,f);case 58:m=g.sent,n.push({type:"detail",model:h,key:f,display:m,relationName:s.relationName,parent:s.parent}),g.next=64;break;case 62:return n.push({type:"detail",error:{entityName:h.name,key:f}}),g.abrupt("return",n);case 64:i++,g.next=34;break;case 67:"create"===t.view?(y=n[n.length-1],v=n[n.length-2],n.push({type:"create",model:y.model,parent:v,relationName:y.relationName})):t.actionId&&n.push({type:"action",actionId:t.actionId}),g.next=71;break;case 70:t.actionId&&n.push({type:"action",actionId:t.actionId});case 71:return g.abrupt("return",n);case 72:case"end":return g.stop()}}),Zn,null,[[7,14]])}var Tn=function(e,t){var n=t[t.length-1],r=n.parent;return xn(xn({},hn()(n,["parent"])),{},{pathname:e,level:t.length-1},r&&n.relationName&&{parentKey:r.key,reverseRelation:r.model.paths[n.relationName].reverseRelationName,parentModel:r.model})},_n=function(e){var t="";return e.map((function(e){return e.error?{type:"error"}:"action"===e.type?null:(t=(t?t+"/":"")+(e.key?e.key:e.relationName||e.model.name),{type:e.type,display:e.display||e.model.label,path:t+"/"+e.type})})).filter((function(e){return e}))};function Fn(e,t){var n,r;return we().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n=gn()(e.paths,(function(e){return e.relationDisplay&&e.relationDisplay.show})),r=Object.keys(n).map((function(e){return yn()(n[e],["relationName","reverseRelationName","targetEntity","relationDisplay.label","relationDisplay.order"])})).sort((function(e,t){return e.relationDisplay.order>t.relationDisplay.order?1:-1})),a.next=4,(0,cn.gz)(w(null));case 4:return a.next=6,(0,cn.gz)(g(r));case 6:return a.next=8,(0,cn.RE)(Hn,e.name,t);case 8:case"end":return a.stop()}}),En)}function Un(e){var t=e.payload.location;return we().mark((function e(){var n,r,a,o;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pathname,e.next=3,(0,cn.Ys)(Cn);case 3:if(r=e.sent,a=r.currentViewInfos,"detail"!==(o=a[n]).type||o.error){e.next=11;break}return e.next=9,(0,cn.Cs)(Hn,o.model.name,o.key);case 9:return e.next=11,(0,cn.gz)(w(null));case 11:case"end":return e.stop()}}),e)}))()}function Mn(e){var t=e.payload.location;return we().mark((function e(){var n,r,a,o,i,c,s;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pathname,e.next=3,(0,cn.RE)(L,n);case 3:if(null==(r=e.sent)||!r.entity||null==r||!r.key){e.next=28;break}return e.prev=5,e.next=8,(0,cn.RE)(Bn,r);case 8:if(!(a=e.sent)){e.next=23;break}return o=a.entityName,i=a.key,e.next=13,(0,cn.RE)(xe.Z.invalidateDisplay,o,i);case 13:return e.next=15,(0,cn.RE)(xe.Z.fetchDisplay,o,i);case 15:return c=e.sent,e.next=18,(0,cn.gz)(y(n,{display:c}));case 18:return e.next=20,(0,cn.RE)(Wn,n);case 20:return s=e.sent,e.next=23,(0,cn.gz)(v(s,{display:c}));case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(5),bn.Z.logError("breadcrumbs invalidation failed",e.t0);case 28:case"end":return e.stop()}}),e,null,[[5,25]])}))()}function Wn(e){var t;return we().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,cn.RE)(L,e);case 2:if(null!==(t=n.sent)&&t.entity){n.next=5;break}return n.abrupt("return","");case 5:return n.abrupt("return",[t.entity,t.key,t.relation,t.view].filter(Boolean).join("/"));case 6:case"end":return n.stop()}}),kn)}function Bn(e){var t,n,r,a,o,i,c,s,l,u;return we().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(e&&e.entity&&e.key&&"action"!==e.view){d.next=2;break}return d.abrupt("return",null);case 2:return d.next=4,(0,cn.RE)(xe.Z.fetchModel,e.entity);case 4:if(t=d.sent,e.relation){d.next=7;break}return d.abrupt("return",{entityName:t.name,key:e.key});case 7:if(!((n=e.relation.match(Sn)).length<1)){d.next=10;break}return d.abrupt("return",null);case 10:r=t,a=null,o=0;case 13:if(!(o<n.length)){d.next=25;break}if(i=n[o].split("/"),c=J()(i,2),s=c[0],l=c[1],(u=r.paths[s])&&l){d.next=18;break}return d.abrupt("return",null);case 18:return d.next=20,(0,cn.RE)(xe.Z.fetchModel,u.targetEntity);case 20:r=d.sent,a={entityName:r.name,key:l};case 22:o++,d.next=13;break;case 25:return d.abrupt("return",a);case 26:case"end":return d.stop()}}),Rn)}function Hn(e,t){var n,r,a;return we().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n="client/entities/".concat(e,"/").concat(t,"/relations"),o.next=3,(0,cn.RE)(xe.Z.requestSaga,n);case 3:return r=o.sent,a=r.body.relations,o.next=7,(0,cn.gz)(b(a));case 7:case"end":return o.stop()}}),Nn)}const zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pn,t=arguments.length>1?arguments[1]:void 0,n=dn[t.type];return n?n(e,t):e},Kn={container:an,reducers:{entities:(0,r.UY)({path:zn})},sagas:[An]}},67210:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(35923),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.path,n=e.context,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(t),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(n,"Domain");return(0,u.jsx)(a.ZP,{entityName:"Domain",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},36340:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(35923),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.context,n=e.path,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(n),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(t,"Folder");return(0,u.jsx)(a.ZP,{entityName:"Folder",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},96954:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(59713),a=n.n(r),o=n(8156),i=n(85893);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(e){return(0,i.jsx)(o.Z,s(s({},e),{},{customDeleteEndpoint:"documents/delete"}))}},90100:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(63038),a=n.n(r),o=n(35923),i=n(12568),c=n(73183),s=n(25660),l=n(20247),u=n(85893);const d=(0,l.U)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,l=e.locale,d=e.context,p=e.emitAction,f=e.navigate,h=t.ids[0].split("/"),m=a()(h,2),y=m[0],v=m[1];"Resource"===y&&(f("/docs/doc/".concat(v,"/detail")),r());var g=(0,s.Z)(d,y);return(0,u.jsx)(o.ZP,{entityName:y,formName:g,entityId:v,mode:"update",locale:l,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:i.ZP,docsApp:c.default})}))},4505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r,a,o,i=n(74806),c=n(50558),s=n(30081),l=n(20247),u=n(63038),d=n.n(u),p=n(28655),f=n.n(p),h=n(18446),m=n.n(h),y=n(1024),v=n(44012),g=n(38205),b=n(36589),w=n(50258),x=n(65035),P=n(73183),O=n(80722),j=n(85893),Z=g.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=f()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),b.Z),E=(0,g.ZP)(w.Z).withConfig({displayName:"StyledLoadMask"})(a||(a=f()(["\n height: auto;\n"]))),k=function(e){return null===e?"Move_root_docs_list_item":"Move_docs_list_item"},R={initialize:s.j2,moveElements:s.w6};const N=(0,l.U)((0,c.connect)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),R)((0,i.ZP)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,a=e.path,i=e.initialize,c=e.moveElements,s=e.isWaiting,l=e.domainTypes,u=e.rootNodes,p=e.businessUnit,f=e.locale,h=e.emitAction,g=(0,O.Z)(a),b={model:"Docs_list_item",key:"".concat(g.model,"/").concat(g.key)},w=(0,y.useState)(b),R=d()(w,2),N=R[0],C=R[1];(0,y.useEffect)((function(){i(t,n,r)}),[]);var S=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,j.jsxs)(E,{required:[!s],children:[(0,j.jsx)(P.default,{routerType:"routerless",initialLocation:function(){if(null===N)return null;var e=N.key.split("/"),t=d()(e,2),n=t[0],r=t[1];return S(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",disableViewPersistor:!0,getListFormName:k,onListParentChange:C,getCustomLocation:S,navigationStrategy:{},embedded:!0,emitAction:h,noLeftPadding:!0,domainTypes:l,rootNodes:u,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:f}),(0,j.jsx)(Z,{children:(0,j.jsx)(x.Z,{onClick:function(){return c(N.key,t.ids)},look:"raised",ink:"primary",disabled:null===N||m()(N,b),children:o||(o=(0,j.jsx)(v.Z,{id:"client.actions.dms-move.button"}))})})]})}))))},82445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(59713),a=n.n(r),o=n(35923),i=n(12568),c=n(73183),s=n(85893);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d=function(e){return(0,s.jsx)(o.ZP,u(u({},e),{},{listApp:i.ZP,docsApp:c.default}))}},25660:(e,t,n)=>{n.d(t,{Z:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},67092:(e,t)=>{t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},88536:(e,t,n)=>{t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=c(n(14149)),o=c(n(54545)),i=n(3074);function c(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,n,o){var c=void 0;"string"==typeof e?(c=(0,i.parsePath)(e)).state=t:(void 0===(c=r({},e)).pathname&&(c.pathname=""),c.search?"?"!==c.search.charAt(0)&&(c.search="?"+c.search):c.search="",c.hash?"#"!==c.hash.charAt(0)&&(c.hash="#"+c.hash):c.hash="",void 0!==t&&void 0===c.state&&(c.state=t));try{c.pathname=decodeURI(c.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+c.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(c.key=n),o?c.pathname?"/"!==c.pathname.charAt(0)&&(c.pathname=(0,a.default)(c.pathname,o.pathname)):c.pathname=o.pathname:c.pathname||(c.pathname="/"),c},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,o.default)(e.state,t.state)}},3074:(e,t)=>{t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}},52540:(e,t,n)=>{var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=u(n(30670)),o=u(n(41143)),i=n(88536),c=n(3074),s=u(n(3405)),l=n(67092);function u(e){return e&&e.__esModule?e:{default:e}}var d="hashchange",p={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,c.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c.stripLeadingSlash,decodePath:c.addLeadingSlash},slash:{encodePath:c.addLeadingSlash,decodePath:c.addLeadingSlash}},f=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},h=function(e){return window.location.hash=e},m=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(l.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,l.supportsGoWithoutReloadUsingHash)(),u=e.getUserConfirmation,y=void 0===u?l.getConfirmation:u,v=e.hashType,g=void 0===v?"slash":v,b=e.basename?(0,c.stripTrailingSlash)((0,c.addLeadingSlash)(e.basename)):"",w=p[g],x=w.encodePath,P=w.decodePath,O=function(){var e=P(f());return(0,a.default)(!b||(0,c.hasBasename)(e,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+b+'".'),b&&(e=(0,c.stripBasename)(e,b)),(0,i.createLocation)(e)},j=(0,s.default)(),Z=function(e){r(K,e),K.length=t.length,j.notifyListeners(K.location,K.action)},E=!1,k=null,R=function(){var e=f(),t=x(e);if(e!==t)m(t);else{var n=O(),r=K.location;if(!E&&(0,i.locationsAreEqual)(r,n))return;if(k===(0,c.createPath)(n))return;k=null,N(n)}},N=function(e){if(E)E=!1,Z();else{j.confirmTransitionTo(e,"POP",y,(function(t){t?Z({action:"POP",location:e}):C(e)}))}},C=function(e){var t=K.location,n=I.lastIndexOf((0,c.createPath)(t));-1===n&&(n=0);var r=I.lastIndexOf((0,c.createPath)(e));-1===r&&(r=0);var a=n-r;a&&(E=!0,_(a))},S=f(),A=x(S);S!==A&&m(A);var D=O(),I=[(0,c.createPath)(D)],L=function(e){return"#"+x(b+(0,c.createPath)(e))},V=function(e,t){(0,a.default)(void 0===t,"Hash history cannot push state; it is ignored");var n="PUSH",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),o=x(b+t);if(f()!==o){k=t,h(o);var i=I.lastIndexOf((0,c.createPath)(K.location)),s=I.slice(0,-1===i?0:i+1);s.push(t),I=s,Z({action:n,location:r})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),Z()}}))},T=function(e,t){(0,a.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n="REPLACE",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),a=x(b+t);f()!==a&&(k=t,m(a));var o=I.indexOf((0,c.createPath)(K.location));-1!==o&&(I[o]=t),Z({action:n,location:r})}}))},_=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return _(-1)},U=function(){return _(1)},M=0,W=function(e){1===(M+=e)?(0,l.addEventListener)(window,d,R):0===M&&(0,l.removeEventListener)(window,d,R)},B=!1,H=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=j.setPrompt(e);return B||(W(1),B=!0),function(){return B&&(B=!1,W(-1)),t()}},z=function(e){var t=j.appendListener(e);return W(1),function(){W(-1),t()}},K={length:t.length,action:"POP",location:D,createHref:L,push:V,replace:T,go:_,goBack:F,goForward:U,block:H,listen:z};return K}},3405:(e,t,n)=>{t.__esModule=!0;var r,a=n(30670),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,o.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),a(!0)):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}},44049:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(14892);const a=(o=r.Z,i=o.getIn,function(e,t){return function(n){var r=t||function(e){return i(e,"form")};return i(r(n),e+".initial")}});var o,i}}]);
1
+ "use strict";(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[141],{57387:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var r=n(27361),a=n.n(r),o=n(74806),i=n(50558),c=n(29785),s=n(59713),l=n.n(s),u=n(17563),d=n(73183),p=n(6699),f=n(90169),h=n(85893);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.entityName,n=e.entityKeys,r=e.children,a=n.map((function(e){return{entityName:t,key:e}}));return(0,h.jsx)(p.Z,{to:"/docs?rootNodes=".concat(JSON.stringify(a)),target:"_blank",children:r})};const g=function(e){var t=u.parse(e.history.location.search);return(0,h.jsx)(d.default,y(y(y({},e),{},{routerType:"inherit",navigationStrategy:{ListLink:v,DetailLink:f.z2}},t.rootNodes&&{rootNodes:JSON.parse(t.rootNodes)}),{},{searchFormCollapsed:e.searchFormCollapsed,onSearchFormCollapsedChange:function(t){var n=t.collapsed;e.saveUserPreferences({"admin.list.searchFormCollapsed":n})},scrollBehaviour:"inline"}))};var b={saveUserPreferences:c.RK};const w={container:(0,i.connect)((function(e,t){return{searchFormCollapsed:a()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",null)}}),b)((0,o.ZP)(g))}},18632:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kn});var r=n(15857),a=n(74806),o=n(50558),i="path/SET_CURRENT_VIEW_INFO",c="path/LOAD_CURRENT_ROUTE",s="path/SET_BREADCRUMBS_INFO",l="path/UPDATE_BREADCRUMBS_INFO",u="path/SET_RELATIONS",d="path/SET_CURRENT_VIEW_TITLE",p="path/SET_RELATIONS_INFO",f="path/PROPAGATE_REFRESH",h="path/INVALIDATE_LAST_BREADCRUMB",m="path/SELECT_RELATION",y=function(e,t){return{type:i,payload:{location:e,currentViewInfo:t}}},v=function(e,t){return{type:l,payload:{path:e,breadcrumbsInfo:t}}},g=function(e){return{type:u,payload:{relations:e}}},b=function(e){return{type:p,payload:{relationsInfo:e}}},w=function(e){return{type:m,payload:{selectedRelation:e}}},x=n(1024),P=n.n(x),O=n(56746),j=n(19743),Z=n(5303),E=n(59713),k=n.n(E),R=n(27361),N=n.n(R),C=n(70696),S=n(75354),A=n(87467),D=n(90169),I=n(13442),L=function(e){var t=I.Z.extractParamsFromPath("/e/:entity/:key?/:relation*/:view(list|detail|edit|create|relations|action)/:actionId?",e),n=I.Z.extractParamsFromPath("/e/action/:actionId",e);return t||n},V=n(46054),T=n(85893);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=function(e){var t=e.history,n=e.match,r=e.setCurrentViewTitle,a=e.currentViewInfo,o=e.intl,i=t.location;if((0,x.useEffect)((function(){return a&&r(o.formatMessage({id:"client.actions.".concat(a.actionId,".title")})),function(){r(null)}}),[a,r,o]),!a)return null;var c=S.Z.fromQueryString(i.search),s=N()(i,"state.selection",c.selection),l=N()(i,"state.definition.properties",c.actionProperties),u=function(){var e=L(n.url).key?(0,A.H)(n.url):(0,A.H)(n.url,2);t.replace(e)};return(0,T.jsx)(V.Z,F(F({history:t,match:n,appId:a.actionId},c),{},{selection:s,actionProperties:l,navigationStrategy:(0,D.ZP)(t,n),onSuccess:u,onError:u,onCancel:u}))},M=function(e,t){return 0===Object.keys(C.Z.difference(e,t)).length};const W=P().memo(U,M);var B={setCurrentViewTitle:function(e){return{type:d,payload:{currentViewTitle:e}}}};const H=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),B)((0,a.ZP)(W));var z=n(50600),K=n(91073),$=n(88757),q=n(319),G=n.n(q),Y=n(63038),J=n.n(Y),Q=n(28655),X=n.n(Q),ee=n(38205),te=n(73183),ne=n(35923),re=n(12568),ae=n(88601),oe=n(7281),ie=n(24688);const ce=function(e){var t=e.when,n=e.message;return(0,x.useEffect)((function(){return t&&ie.Z.activatePreventFromLeaving(),function(){ie.Z.deactivatePreventFromLeaving()}}),[t]),(0,T.jsx)(O.NL,{when:t,message:n})},se=ce;var le,ue=ee.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(le||(le=X()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),ae.Z.color("paper"),oe.Z.space(0));const de=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.dispatchEmittedAction,c=e.setPendingChanges,s=n.location,l=N()(s,"state.defaultValues",[]),u=(0,x.useState)(!1),d=J()(u,2),p=d[0],f=d[1];if((0,x.useEffect)((function(){return function(){return c(!1)}}),[c]),!t)return null;var h,m=t.model,y=t.reverseRelation,v=t.parentKey,g=m.name,b=N()(m,"paths.".concat(y,".multi"),!1),w=[].concat(G()(y&&v?[{id:y,value:b?[v]:v}]:[]),G()(l));return(0,T.jsxs)(ue,{children:[(0,T.jsx)(se,{when:p,message:(h="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:h}))}),(0,T.jsx)(ne.ZP,{entityName:g,formName:g,mode:"create",defaultValues:w,emitAction:function(e){i(e)},navigationStrategy:(0,D.ZP)(n,r),chooseDocument:o,onEntityCreated:function(e){var t=e.id;f(!1),n.push(r.url.replace(/create$/,t))},onTouchedChange:function(e){var t=e.touched;f(t),c(t)},listApp:re.ZP,docsApp:te.default})]})};var pe={chooseDocument:K.Z.actions.chooseDocument,dispatchEmittedAction:z.Z.dispatchEmittedAction,setPendingChanges:$.c0};const fe=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),pe)((0,a.ZP)(de));var he=n(29785),me=n(17563),ye=n(29441),ve=n(48926),ge=n.n(ve),be=n(87757),we=n.n(be),xe=n(81719);function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const je=function(e){var t=e.entityName,n=e.entityKey,r=e.showActions,a=e.noLeftPadding,o=e.openResource,i=e.initialLocation,c=e.sortable,s=(0,x.useState)(null),l=J()(s,2),u=l[0],d=l[1],p=(0,x.useCallback)(ge()(we().mark((function e(){return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:xe.Z.simpleRequest("entities/2.0/"+t+"/"+n+"/entitydocs/folder").then((function(e){d(e.body.key)}));case 1:case"end":return e.stop()}}),e)}))),[t,n]);return(0,x.useEffect)((function(){p()}),[p]),u&&(0,T.jsx)(te.default,Oe(Oe(Oe({routerType:"routerless",initialLocation:i,noLeftPadding:a,sortable:c,searchFormType:"none",rootNodes:[{key:u,entityName:"Folder"}],embedded:!0,showActions:r},!1===r?{selectionStyle:"none"}:{}),{},{disableViewPersistor:!0},o?{openResource:o}:{}),{},{scrollBehaviour:"inline"}))};const Ze=function(e){var t=e.currentViewInfo,n=e.initialLocation;return(0,T.jsx)(je,{noLeftPadding:!1,entityName:t.parentModel.name,entityKey:t.parentKey,showActions:!0,initialLocation:n})};function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Re=function(e){var t=e.match,n=e.history,r=e.currentViewInfo,a=e.emitAction,o=e.searchFormCollapsed,i=e.saveUserPreferences;if(!r)return null;var c=me.parse(n.location.search),s=n.location.hash?n.location.hash.substring(1):null;return"Resource"===r.model.name?(0,T.jsx)(Ze,{currentViewInfo:r,initialLocation:s}):(0,T.jsx)(re.ZP,ke(ke({emitAction:a,limit:25,id:"".concat(r.model.name,"_list"),entityName:r.model.name,formName:c.formName||r.model.name,onRowClick:function(e){var r=e.id;n.push(t.url.replace(/list$/,"")+r)}},r.reverseRelation&&{parent:{key:r.parentKey,reverseRelationName:r.reverseRelation,model:r.parentModel.name}}),{},{showLink:!0,navigationStrategy:(0,D.ZP)(n,t),searchFormPosition:"left",searchFormType:"admin",scrollBehaviour:"inline",store:ye.Z.viewInfoSelector(n.location.pathname).store,onStoreCreate:function(e){ye.Z.persistViewInfo(n.location.pathname,{store:e},r.level)},actionAppComponent:V.Z,tql:c.tql,searchFormCollapsed:o,onSearchFormCollapsedChange:function(e){var t=e.collapsed;i({"admin.list.searchFormCollapsed":t})}}))};var Ne={emitAction:function(e){return z.Z.dispatchEmittedAction(e)},saveUserPreferences:he.RK};const Ce=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],searchFormCollapsed:N()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",!1)}}),Ne)((0,a.ZP)(Re));var Se,Ae=n(4975);function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Le=ee.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(Se||(Se=X()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),ae.Z.color("paper"),oe.Z.space(0));const Ve=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.emitAction,c=e.propagateRefresh,s=e.invalidateLastBreadcrumb,l=e.setPendingChanges,u=(0,x.useState)(!1),d=J()(u,2),p=d[0],f=d[1];if((0,x.useEffect)((function(){return function(){return l(!1)}}),[l]),!t||t.pathname!==n.location.pathname)return null;var h=me.parse(location.search).formName,m=t.model.name;return(0,T.jsxs)(Le,{children:[(0,T.jsx)(se,{when:p,message:function(e){return n.location.pathname!==e.pathname&&(t="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:t}));var t}}),(0,T.jsx)(ne.ZP,{entityName:m,entityId:t.key,formName:h||m,mode:"update",emitAction:i,onTouchedChange:function(e){var t=e.touched;f(t),l(t)},navigationStrategy:Ie(Ie({},(0,D.ZP)(n,r)),{},{navigateToCreateRelative:function(e,t){if(e){var a=(0,A.H)(r.url,1);n.push({pathname:"".concat(a,"/").concat(e,"/create"),state:t})}else{var o=(0,A.H)(r.url,2);n.push({pathname:o+"/create",state:t})}}}),chooseDocument:o,onEntityDeleted:function(){var e=(0,A.H)(r.url,2);n.push(e)},onEntityUpdated:function(){var e=n.location;s(e)},onRefresh:function(){var e=n.location;c(e)},actionAppComponent:V.Z,onSubGridRowClick:function(e){var t=e.id,a=e.relationName,o=(0,A.H)(r.url);n.push("".concat(o,"/").concat(a,"/").concat(t))},listApp:re.ZP,docsApp:te.default})]})};var Te={chooseDocument:K.Z.actions.chooseDocument,emitAction:function(e){return z.Z.dispatchEmittedAction(e)},propagateRefresh:function(e){return{type:f,payload:{location:e}}},invalidateLastBreadcrumb:function(e){return{type:h,payload:{location:e}}},setPendingChanges:$.c0};const _e=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),Te)((0,a.ZP)(Ve));var Fe=n(34206),Ue=n(88162),Me={};const We=function(e){var t=e.currentViewInfo,n=e.history,r=e.selectedRelation,a=e.sortable;return(0,T.jsx)(je,{entityName:t.model.name,entityKey:t.key,showActions:!1,noLeftPadding:!0,history:n,openResource:function(e){n.push("".concat(r.relationName,"/list#").concat(e))},sortable:a})};var Be=function(e){var t=e.selectedRelation,n=e.currentViewInfo,r=e.match,a=e.history,o=e.emitAction,i="".concat(t.reverseRelationName).concat(t.relationName);return(0,T.jsx)(re.ZP,{id:"preview"+t.reverseRelationName+t.targetEntity,entityName:t.targetEntity,formName:t.targetEntity,parent:{key:n.key,reverseRelationName:t.reverseRelationName,model:n.model.name,relationName:t.relationName},showLink:!0,navigationStrategy:(0,D.ZP)(a,r),onRowClick:function(e){var n=e.id,o=r.url.replace(/detail$/,"");a.push("".concat(o).concat(t.relationName,"/").concat(n))},onNavigateToCreate:function(){var e=(0,A.H)(r.url);a.push(e+"/"+t.relationName+"/create")},searchFormType:"fulltext",selectionStyle:"none",store:ye.Z.viewInfoSelector(a.location.pathname)["store-".concat(i)],onStoreCreate:function(e){ye.Z.persistViewInfo(n.pathname,k()({},"store-".concat(i),e),n.level)},showActions:!1,limit:15,emitAction:o,scrollBehaviour:"inline"},t.reverseRelationName+t.targetEntity)};const He=P().memo(Be);var ze,Ke,$e,qe,Ge,Ye,Je,Qe,Xe,et,tt,nt,rt,at,ot=n(6699),it=n(65035),ct=n(11347),st=n(84647),lt=n(69829),ut=n(30759),dt=ee.ZP.div.withConfig({displayName:"StyledRelationsViewWrapper"})(ze||(ze=X()(["\n display: ",";\n height: 100%;\n flex-direction: column;\n"])),(function(e){return e.isRightPaneCollapsed?"none":"flex"})),pt=ee.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(Ke||(Ke=X()(["\n display: ",";\n flex: 1;\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isRightPaneCollapsed?"flex":"none"}),ae.Z.color("paper"),oe.Z.space(-1.5),oe.Z.space(-2.5)),ft=ee.ZP.div.withConfig({displayName:"StyledToggleCollapse"})($e||($e=X()(["\n display: flex;\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n"])),ae.Z.color("paper"),oe.Z.space(-1.5),oe.Z.space(-1.5)),ht=(0,ee.ZP)(it.Z).withConfig({displayName:"StyledToggleCollapseButton"})(qe||(qe=X()(["\n font-size: ",";\n padding: 0;\n margin-left: auto;\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),oe.Z.font(0),pt,ae.Z.color("secondaryLight")),mt=ee.ZP.div.withConfig({displayName:"StyledPreviewBox"})(Ge||(Ge=X()(["\n background-color: ",";\n padding: ",";\n margin-top: 3px;\n display: flex;\n flex-direction: column;\n flex: 1;\n"])),ae.Z.color("paper"),oe.Z.space(-1)),yt=ee.ZP.div.withConfig({displayName:"StyledRelationBoxes"})(Ye||(Ye=X()(["\n background-color: ",";\n padding: ",";\n display: grid;\n grid-template-columns: repeat(auto-fit, 170px);\n grid-gap: ",";\n justify-content: space-between;\n overflow-y: auto;\n align-content: flex-start;\n height: fit-content;\n min-height: 150px;\n max-height: 20%;\n ","\n"])),ae.Z.color("paper"),oe.Z.space(-1),oe.Z.space(-2),ct.C),vt=(0,ee.ZP)(ot.Z).withConfig({displayName:"StyledPreviewLink"})(Je||(Je=X()(["\n padding-left: ",";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n"])),oe.Z.space(-.5)),gt=ee.ZP.div.withConfig({displayName:"StyledRelationLinks"})(Qe||(Qe=X()(["\n display: none;\n margin-left: auto;\n\n * {\n color: ",";\n padding-left: ",";\n }\n"])),ae.Z.color("text"),oe.Z.space(-4.5)),bt=ee.ZP.div.withConfig({displayName:"StyledRelationBox"})(Xe||(Xe=X()(["\n border-radius: ",";\n padding: "," ",";\n display: flex;\n background-color: ",";\n height: fit-content;\n\n &&& {\n * {\n color: ",";\n box-sizing: initial;\n }\n }\n ",";\n\n /* allow hover styles only on non-touch devices */\n ","\n"])),ae.Z.radii("large"),oe.Z.space(-2.7),oe.Z.space(-1),(function(e){return e.selected&&ae.Z.color("secondary")}),(function(e){return e.selected&&ae.Z.color("paper")}),(function(e){return e.selected&&"\n ".concat(gt," {\n display: flex;\n }\n ")}),!st.b&&(0,ee.iv)(et||(et=X()(["\n &:hover "," {\n display: flex;\n }\n\n && {\n :hover {\n background-color: ",";\n\n * {\n color: ",";\n }\n cursor: pointer;\n }\n }\n\n ",":hover * {\n color: ",";\n }\n "])),gt,ae.Z.color("secondaryLight"),ae.Z.color("paper"),ot.Z,ae.Z.color("secondary"))),wt=(0,ee.ZP)(lt.Fe).withConfig({displayName:"StyledRelationLabel"})(tt||(tt=X()(["\n && {\n max-width: 110px;\n }\n"]))),xt=ee.ZP.span.withConfig({displayName:"StyledCountLabel"})(nt||(nt=X()(["\n ","\n"])),(0,ut.Z)());const Pt=function(e){var t,n,r=e.relation,a=e.history,o=e.match,i=e.relationsInfo,c=e.selectRelation,s=e.selectedRelation,l=e.intl,u=e.entityName,d=r.relationName,p=r.targetEntity,f=r.relationDisplay,h=function(e){return l.formatMessage({id:e})},m=o.url.replace(/(relations|detail)$/,d),y=o.url.replace(/(relations|detail)$/,d)+"/create";return(0,T.jsxs)(bt,{selected:(null==s?void 0:s.relationName)===d,onClick:function(){c(r),a.replace({search:"?relation=".concat(d)}),function(e,t){Me[e]=t}(u,d)},children:[(0,T.jsx)(wt,{title:f.label,children:f.label}),(null===(n=i[d])||void 0===n?void 0:n.count)>0?(0,T.jsxs)(xt,{children:[" (",i[d].count,")"]}):null,(0,T.jsxs)(gt,{children:[(0,T.jsx)(ot.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkView"),to:m,children:rt||(rt=(0,T.jsx)(Ue.Z,{icon:"arrow-right"}))}),(null===(t=i[d])||void 0===t?void 0:t.createPermission)&&"Resource"!==p&&(0,T.jsx)(ot.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkCreate"),to:y,children:at||(at=(0,T.jsx)(Ue.Z,{icon:"plus"}))})]})]})};var Ot,jt,Zt;function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var kt=function(e){var t=e.history,n=e.match,r=e.currentViewInfo,a=e.relations,o=e.relationsInfo,i=e.emitAction,c=e.intl,s=e.isRightPaneCollapsed,l=e.toggleCollapse,u=e.selectedRelation,d=e.selectRelation,p=N()(r,"model.name"),f=(0,x.useCallback)((function(){if((null==a?void 0:a.length)>0){var e=me.parse(t.location.search).relation;if(e)d(a.find((function(t){return t.relationName===e})));else{var n=Me[p];d(n?a.find((function(e){return e.relationName===n})):a[0])}}}),[a,p,t.location.search,d]);if((0,x.useEffect)(f,[f]),(0,x.useEffect)((function(){return u?null:f()}),[u,f]),!a||0===a.length||!r)return null;var h,m,y=function(e){return c.formatMessage({id:e})},v=u?"Resource"===u.targetEntity?We:He:function(){return Ot||(Ot=(0,T.jsx)(P().Fragment,{}))},g=a.map((function(t){return(0,T.jsx)(Pt,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({relation:t,entityName:p},e),"relation-".concat(t.relationName))}));return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(dt,{isRightPaneCollapsed:s,children:[(0,T.jsx)(ft,{children:(0,T.jsx)(ht,{icon:"chevron-right",onClick:l})}),(0,T.jsx)(yt,{children:g}),u&&(0,T.jsxs)(mt,{children:[(0,T.jsxs)(Fe.ZP.H4,{children:[u.relationDisplay.label,(0,T.jsx)(vt,{"aria-label":y("client.admin.entities.relationsView.relationLinkView"),to:n.url.replace(/(relations|detail)$/,u.relationName),children:jt||(jt=(0,T.jsx)(Ue.Z,{icon:"arrow-right"}))}),(h=u.relationName,(null===(m=o[h])||void 0===m?void 0:m.createPermission)&&"Resource"!==u.targetEntity&&(0,T.jsx)(vt,{"aria-label":y("client.admin.entities.relationsView.relationLinkCreate"),to:n.url.replace(/(relations|detail)$/,u.relationName)+"/create",children:Zt||(Zt=(0,T.jsx)(Ue.Z,{icon:"plus"}))}))]}),(0,T.jsx)(v,{selectedRelation:u,match:n,history:t,currentViewInfo:r,emitAction:i,sortable:!0})]})]}),(0,T.jsx)(pt,{onClick:l,isRightPaneCollapsed:s,children:(0,T.jsx)(ht,{icon:"chevron-left",isRightPaneCollapsed:s})})]})},Rt=function(e,t){return 0===Object.keys(C.Z.difference(e,t)).length};const Nt=P().memo(kt,Rt);var Ct={emitAction:function(e){return z.Z.dispatchEmittedAction(e)},selectRelation:w};const St=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relations:e.entities.path.relations,relationsInfo:e.entities.path.relationsInfo,selectedRelation:e.entities.path.selectedRelation}}),Ct)((0,a.ZP)(Nt));var At,Dt,It,Lt=ee.ZP.div.withConfig({displayName:"StyledDetailViewContainer"})(At||(At=X()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n\n .react-bs-container-body {\n height: auto !important;\n }\n"]))),Vt=ee.ZP.div.withConfig({displayName:"StyledDetailViewLeft"})(Dt||(Dt=X()(["\n flex: 1;\n margin-right: 1rem;\n /* Only show one panel at a time on screens <= 500px */\n display: ",";\n"])),(function(e){var t=e.windowWidth,n=e.isRightPaneCollapsed;return t<=500&&!n&&"none"})),Tt=ee.ZP.div.withConfig({displayName:"StyledDetailViewRight"})(It||(It=X()(["\n flex: ",";\n"])),(function(e){return e.isRightPaneCollapsed?"0":"1"}));const _t=function(e){var t=e.match,n=e.history,r=(e.currentViewInfo,e.relationViewCollapsed),a=e.saveUserPreferences,o=(0,Ae.K)(r,(function(e){a({"admin.detail.relationViewCollapsed":e})})),i=o.isCollapsed,c=o.toggleCollapse;return(0,T.jsxs)(Lt,{children:[(0,T.jsx)(Vt,{isRightPaneCollapsed:i,windowWidth:window.innerWidth,children:(0,T.jsx)(j.Z.ErrorBoundary,{children:(0,T.jsx)(_e,{match:t,history:n})})}),(0,T.jsx)(Tt,{isRightPaneCollapsed:i,children:(0,T.jsx)(j.Z.ErrorBoundary,{children:(0,T.jsx)(St,{match:t,history:n,isRightPaneCollapsed:i,toggleCollapse:c})})})]})};var Ft={saveUserPreferences:he.RK};const Ut=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relationViewCollapsed:N()(e.preferences.userPreferences,"admin.detail.relationViewCollapsed",!1)}}),Ft)((0,a.ZP)(_t));const Mt=function(e){var t,n,r=e.match,a=(t=r.path,n=":relation",t.split(n).length-1);return(0,T.jsxs)(O.rs,{children:[(0,T.jsx)(O.AW,{exact:!0,path:"".concat(r.url),render:function(e){return(0,T.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/detail")})}}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/detail"),component:Ut}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/edit"),component:_e}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/relations"),component:St}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/action"),component:H}),(0,T.jsx)(O.AW,{path:"".concat(r.path,"/:relation_").concat(a),component:Wt})]})};const Wt=function(e){var t=e.match;return(0,T.jsxs)(O.rs,{children:[(0,T.jsx)(O.AW,{exact:!0,path:t.url,render:function(e){return(0,T.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/list")})}}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/action/:id"),component:H}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/list"),component:Ce}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/create"),component:fe}),(0,T.jsx)(O.AW,{path:"".concat(t.path,"/:key"),component:Mt})]})};var Bt=n(54680);const Ht=(0,o.connect)((function(e,t){return{pathPrefix:"/e",breadcrumbsInfo:e.entities.path.breadcrumbsInfo,currentView:e.entities.path.currentViewTitle?{display:e.entities.path.currentViewTitle,title:e.entities.path.currentViewTitle}:null}}),{})((0,a.ZP)(Bt.Z));var zt=n(44012),Kt=n(39233);const $t=function(e){var t=e.currentViewInfo,n="client.admin.entity.errorView.",r="detail"===t.type?"detailTitle":"defaultTitle",a="listDescription";return"detail"===t.type?a="detailDescription":"list"===t.type&&t.error.relationName&&(a="relationDescription"),(0,T.jsx)(Kt.Z,{title:(0,T.jsx)(zt.Z,{id:n+r}),message:(0,T.jsx)(zt.Z,{id:n+a,values:t.error})})};const qt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}))((0,a.ZP)($t));var Gt,Yt,Jt,Qt,Xt=ee.ZP.div.withConfig({displayName:"StyledWrapper"})(Gt||(Gt=X()(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n height: 100%;\n width: 100%;\n"]))),en=ee.ZP.div.withConfig({displayName:"StyledContent"})(Yt||(Yt=X()(["\n grid-area: content;\n overflow: hidden;\n"]))),tn=ee.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(Jt||(Jt=X()(["\n grid-area: breadcrumbs;\n"])));const nn=function(e){var t=e.match,n=e.history,r=e.loadCurrentRoute,a=e.currentViewInfo,o=n.location;(0,x.useEffect)((function(){r(o)}),[o,r]);var i=null!=a&&a.error?(0,T.jsx)(qt,{history:n}):(0,T.jsxs)(O.rs,{children:[(0,T.jsx)(O.AW,{path:"".concat(t.url,"/action/:actionId"),component:H}),(0,T.jsx)(O.AW,{path:"".concat(t.url,"/:entity"),component:Wt}),(0,T.jsx)(O.AW,{exact:!0,path:t.url,component:Z.Z})]});return(0,T.jsxs)(Xt,{children:[Qt||(Qt=(0,T.jsx)(j.Z.ErrorBoundary,{children:(0,T.jsx)(tn,{children:(0,T.jsx)(Ht,{})})})),(0,T.jsx)(en,{children:i})]})};var rn={loadCurrentRoute:function(e){return{type:c,payload:{location:e}}}};const an=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),rn)((0,a.ZP)(nn));var on,cn=n(34857),sn=n(81770);function ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dn=(on={},k()(on,i,(function(e,t){var n=t.payload,r=n.location,a=n.currentViewInfo;return un(un({},e),{},{currentViewInfos:un(un({},e.currentViewInfos),{},k()({},r,un(un({},e.currentViewInfos[r]),a)))})})),k()(on,s,sn.Z.singleTransferReducer("breadcrumbsInfo")),k()(on,l,(function(e,t){var n=t.payload,r=n.path,a=n.breadcrumbsInfo;return un(un({},e),{},{breadcrumbsInfo:e.breadcrumbsInfo.map((function(e){return e.path===r?un(un({},e),a):e}))})})),k()(on,u,sn.Z.singleTransferReducer("relations")),k()(on,p,sn.Z.singleTransferReducer("relationsInfo")),k()(on,d,sn.Z.singleTransferReducer("currentViewTitle")),k()(on,m,sn.Z.singleTransferReducer("selectedRelation")),on),pn={currentViewInfos:{},breadcrumbsInfo:[],relations:null,relationsInfo:{},selectedRelation:null};var fn=n(57557),hn=n.n(fn),mn=n(78718),yn=n.n(mn),vn=n(35937),gn=n.n(vn),bn=n(44759);function wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pn=we().mark(An),On=we().mark(In),jn=we().mark(Ln),Zn=we().mark(Vn),En=we().mark(Fn),kn=we().mark(Wn),Rn=we().mark(Bn),Nn=we().mark(Hn),Cn=function(e){return e.entities.path},Sn=/[^/]+\/?[^/]+/g;function An(){return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,cn.$6)([(0,cn.Fm)(c,Dn),(0,cn.Fm)(f,Un),(0,cn.Fm)(h,Mn)]);case 2:case"end":return e.stop()}}),Pn)}function Dn(e){var t=e.payload.location;return we().mark((function e(){var n,r,a;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pathname,e.next=3,(0,cn.RE)(Vn,n);case 3:if(!((r=e.sent).length>0)){e.next=15;break}return e.next=7,(0,cn.RE)(In,n,r);case 7:if("detail"!==(a=e.sent).type||a.error){e.next=11;break}return e.next=11,(0,cn.RE)(Fn,a.model,a.key);case 11:return e.next=13,(0,cn.RE)(Ln,r);case 13:return e.next=15,(0,cn.RE)(ye.Z.clearPersistedViews,a.level+1);case 15:case"end":return e.stop()}}),e)}))()}function In(e,t){var n;return we().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,cn.RE)(Tn,e,t);case 2:return n=r.sent,r.next=5,(0,cn.gz)(y(e,n));case 5:return r.abrupt("return",n);case 6:case"end":return r.stop()}}),On)}function Ln(e){var t;return we().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,cn.RE)(_n,e);case 2:return t=n.sent,n.next=5,(0,cn.gz)({type:s,payload:{breadcrumbsInfo:t}});case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),jn)}function Vn(e){var t,n,r,a,o,i,c,s,l,u,d,p,f,h,m,y,v;return we().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,cn.RE)(L,e);case 2:if(t=g.sent,n=[],null!==t){g.next=6;break}return g.abrupt("return",n);case 6:if(!t.entity){g.next=70;break}return g.prev=7,g.next=10,(0,cn.RE)(xe.Z.fetchModel,t.entity);case 10:r=g.sent,n.push({type:"list",model:r}),g.next=18;break;case 14:return g.prev=14,g.t0=g.catch(7),n.push({type:"list",error:{entityName:t.entity}}),g.abrupt("return",n);case 18:if(!t.key){g.next=67;break}return g.next=21,(0,cn.RE)(xe.Z.entityExists,r.name,t.key);case 21:if(!g.sent){g.next=29;break}return g.next=25,(0,cn.RE)(xe.Z.fetchDisplay,r.name,t.key);case 25:a=g.sent,n.push({type:"detail",key:t.key,model:r,display:a}),g.next=31;break;case 29:return n.push({type:"detail",error:{entityName:r.label,key:t.key}}),g.abrupt("return",n);case 31:if(!t.relation){g.next=67;break}o=t.relation.split("/"),i=0;case 34:if(!(i<o.length)){g.next=67;break}if(c=o[i],s=n[n.length-1],i%2!=0){g.next=50;break}if(l=c,u=s.model.paths[l]){g.next=43;break}return n.push({type:"list",error:{relationName:l,entityName:s.model.name}}),g.abrupt("return",n);case 43:return d=u.targetEntity,g.next=46,(0,cn.RE)(xe.Z.fetchModel,d);case 46:p=g.sent,n.push({type:"list",model:p,relationName:l,parent:s}),g.next=64;break;case 50:return f=c,h=s.model,g.next=54,(0,cn.RE)(xe.Z.entityExists,h.name,f);case 54:if(!g.sent){g.next=62;break}return g.next=58,(0,cn.RE)(xe.Z.fetchDisplay,h.name,f);case 58:m=g.sent,n.push({type:"detail",model:h,key:f,display:m,relationName:s.relationName,parent:s.parent}),g.next=64;break;case 62:return n.push({type:"detail",error:{entityName:h.name,key:f}}),g.abrupt("return",n);case 64:i++,g.next=34;break;case 67:"create"===t.view?(y=n[n.length-1],v=n[n.length-2],n.push({type:"create",model:y.model,parent:v,relationName:y.relationName})):t.actionId&&n.push({type:"action",actionId:t.actionId}),g.next=71;break;case 70:t.actionId&&n.push({type:"action",actionId:t.actionId});case 71:return g.abrupt("return",n);case 72:case"end":return g.stop()}}),Zn,null,[[7,14]])}var Tn=function(e,t){var n=t[t.length-1],r=n.parent;return xn(xn({},hn()(n,["parent"])),{},{pathname:e,level:t.length-1},r&&n.relationName&&{parentKey:r.key,reverseRelation:r.model.paths[n.relationName].reverseRelationName,parentModel:r.model})},_n=function(e){var t="";return e.map((function(e){return e.error?{type:"error"}:"action"===e.type?null:(t=(t?t+"/":"")+(e.key?e.key:e.relationName||e.model.name),{type:e.type,display:e.display||e.model.label,path:t+"/"+e.type})})).filter((function(e){return e}))};function Fn(e,t){var n,r;return we().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n=gn()(e.paths,(function(e){return e.relationDisplay&&e.relationDisplay.show})),r=Object.keys(n).map((function(e){return yn()(n[e],["relationName","reverseRelationName","targetEntity","relationDisplay.label","relationDisplay.order"])})).sort((function(e,t){return e.relationDisplay.order>t.relationDisplay.order?1:-1})),a.next=4,(0,cn.gz)(w(null));case 4:return a.next=6,(0,cn.gz)(g(r));case 6:return a.next=8,(0,cn.RE)(Hn,e.name,t);case 8:case"end":return a.stop()}}),En)}function Un(e){var t=e.payload.location;return we().mark((function e(){var n,r,a,o;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pathname,e.next=3,(0,cn.Ys)(Cn);case 3:if(r=e.sent,a=r.currentViewInfos,"detail"!==(o=a[n]).type||o.error){e.next=11;break}return e.next=9,(0,cn.Cs)(Hn,o.model.name,o.key);case 9:return e.next=11,(0,cn.gz)(w(null));case 11:case"end":return e.stop()}}),e)}))()}function Mn(e){var t=e.payload.location;return we().mark((function e(){var n,r,a,o,i,c,s;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.pathname,e.next=3,(0,cn.RE)(L,n);case 3:if(null==(r=e.sent)||!r.entity||null==r||!r.key){e.next=28;break}return e.prev=5,e.next=8,(0,cn.RE)(Bn,r);case 8:if(!(a=e.sent)){e.next=23;break}return o=a.entityName,i=a.key,e.next=13,(0,cn.RE)(xe.Z.invalidateDisplay,o,i);case 13:return e.next=15,(0,cn.RE)(xe.Z.fetchDisplay,o,i);case 15:return c=e.sent,e.next=18,(0,cn.gz)(y(n,{display:c}));case 18:return e.next=20,(0,cn.RE)(Wn,n);case 20:return s=e.sent,e.next=23,(0,cn.gz)(v(s,{display:c}));case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(5),bn.Z.logError("breadcrumbs invalidation failed",e.t0);case 28:case"end":return e.stop()}}),e,null,[[5,25]])}))()}function Wn(e){var t;return we().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,cn.RE)(L,e);case 2:if(null!==(t=n.sent)&&t.entity){n.next=5;break}return n.abrupt("return","");case 5:return n.abrupt("return",[t.entity,t.key,t.relation,t.view].filter(Boolean).join("/"));case 6:case"end":return n.stop()}}),kn)}function Bn(e){var t,n,r,a,o,i,c,s,l,u;return we().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(e&&e.entity&&e.key&&"action"!==e.view){d.next=2;break}return d.abrupt("return",null);case 2:return d.next=4,(0,cn.RE)(xe.Z.fetchModel,e.entity);case 4:if(t=d.sent,e.relation){d.next=7;break}return d.abrupt("return",{entityName:t.name,key:e.key});case 7:if(!((n=e.relation.match(Sn)).length<1)){d.next=10;break}return d.abrupt("return",null);case 10:r=t,a=null,o=0;case 13:if(!(o<n.length)){d.next=25;break}if(i=n[o].split("/"),c=J()(i,2),s=c[0],l=c[1],(u=r.paths[s])&&l){d.next=18;break}return d.abrupt("return",null);case 18:return d.next=20,(0,cn.RE)(xe.Z.fetchModel,u.targetEntity);case 20:r=d.sent,a={entityName:r.name,key:l};case 22:o++,d.next=13;break;case 25:return d.abrupt("return",a);case 26:case"end":return d.stop()}}),Rn)}function Hn(e,t){var n,r,a;return we().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n="client/entities/".concat(e,"/").concat(t,"/relations"),o.next=3,(0,cn.RE)(xe.Z.requestSaga,n);case 3:return r=o.sent,a=r.body.relations,o.next=7,(0,cn.gz)(b(a));case 7:case"end":return o.stop()}}),Nn)}const zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pn,t=arguments.length>1?arguments[1]:void 0,n=dn[t.type];return n?n(e,t):e},Kn={container:an,reducers:{entities:(0,r.UY)({path:zn})},sagas:[An]}},67210:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(35923),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.path,n=e.context,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(t),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(n,"Domain");return(0,u.jsx)(a.ZP,{entityName:"Domain",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},36340:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(35923),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.context,n=e.path,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(n),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(t,"Folder");return(0,u.jsx)(a.ZP,{entityName:"Folder",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},96954:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(59713),a=n.n(r),o=n(78788),i=n(85893);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(e){return(0,i.jsx)(o.Z,s(s({},e),{},{customDeleteEndpoint:"documents/delete"}))}},90100:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(63038),a=n.n(r),o=n(35923),i=n(12568),c=n(73183),s=n(25660),l=n(20247),u=n(85893);const d=(0,l.U)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,l=e.locale,d=e.context,p=e.emitAction,f=e.navigate,h=t.ids[0].split("/"),m=a()(h,2),y=m[0],v=m[1];"Resource"===y&&(f("/docs/doc/".concat(v,"/detail")),r());var g=(0,s.Z)(d,y);return(0,u.jsx)(o.ZP,{entityName:y,formName:g,entityId:v,mode:"update",locale:l,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:i.ZP,docsApp:c.default})}))},4505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r,a,o,i=n(74806),c=n(50558),s=n(30081),l=n(20247),u=n(63038),d=n.n(u),p=n(28655),f=n.n(p),h=n(18446),m=n.n(h),y=n(1024),v=n(44012),g=n(38205),b=n(36589),w=n(50258),x=n(65035),P=n(73183),O=n(80722),j=n(85893),Z=g.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=f()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),b.Z),E=(0,g.ZP)(w.Z).withConfig({displayName:"StyledLoadMask"})(a||(a=f()(["\n height: auto;\n"]))),k=function(e){return null===e?"Move_root_docs_list_item":"Move_docs_list_item"},R={initialize:s.j2,moveElements:s.w6};const N=(0,l.U)((0,c.connect)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),R)((0,i.ZP)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,a=e.path,i=e.initialize,c=e.moveElements,s=e.isWaiting,l=e.domainTypes,u=e.rootNodes,p=e.businessUnit,f=e.locale,h=e.emitAction,g=(0,O.Z)(a),b={model:"Docs_list_item",key:"".concat(g.model,"/").concat(g.key)},w=(0,y.useState)(b),R=d()(w,2),N=R[0],C=R[1];(0,y.useEffect)((function(){i(t,n,r)}),[]);var S=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,j.jsxs)(E,{required:[!s],children:[(0,j.jsx)(P.default,{routerType:"routerless",initialLocation:function(){if(null===N)return null;var e=N.key.split("/"),t=d()(e,2),n=t[0],r=t[1];return S(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",disableViewPersistor:!0,getListFormName:k,onListParentChange:C,getCustomLocation:S,navigationStrategy:{},embedded:!0,emitAction:h,noLeftPadding:!0,domainTypes:l,rootNodes:u,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:f}),(0,j.jsx)(Z,{children:(0,j.jsx)(x.Z,{onClick:function(){return c(N.key,t.ids)},look:"raised",ink:"primary",disabled:null===N||m()(N,b),children:o||(o=(0,j.jsx)(v.Z,{id:"client.actions.dms-move.button"}))})})]})}))))},82445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(59713),a=n.n(r),o=n(35923),i=n(12568),c=n(73183),s=n(85893);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d=function(e){return(0,s.jsx)(o.ZP,u(u({},e),{},{listApp:i.ZP,docsApp:c.default}))}},25660:(e,t,n)=>{n.d(t,{Z:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},67092:(e,t)=>{t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},88536:(e,t,n)=>{t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=c(n(14149)),o=c(n(54545)),i=n(3074);function c(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,n,o){var c=void 0;"string"==typeof e?(c=(0,i.parsePath)(e)).state=t:(void 0===(c=r({},e)).pathname&&(c.pathname=""),c.search?"?"!==c.search.charAt(0)&&(c.search="?"+c.search):c.search="",c.hash?"#"!==c.hash.charAt(0)&&(c.hash="#"+c.hash):c.hash="",void 0!==t&&void 0===c.state&&(c.state=t));try{c.pathname=decodeURI(c.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+c.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(c.key=n),o?c.pathname?"/"!==c.pathname.charAt(0)&&(c.pathname=(0,a.default)(c.pathname,o.pathname)):c.pathname=o.pathname:c.pathname||(c.pathname="/"),c},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,o.default)(e.state,t.state)}},3074:(e,t)=>{t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}},52540:(e,t,n)=>{var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=u(n(30670)),o=u(n(41143)),i=n(88536),c=n(3074),s=u(n(3405)),l=n(67092);function u(e){return e&&e.__esModule?e:{default:e}}var d="hashchange",p={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,c.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c.stripLeadingSlash,decodePath:c.addLeadingSlash},slash:{encodePath:c.addLeadingSlash,decodePath:c.addLeadingSlash}},f=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},h=function(e){return window.location.hash=e},m=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(l.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,l.supportsGoWithoutReloadUsingHash)(),u=e.getUserConfirmation,y=void 0===u?l.getConfirmation:u,v=e.hashType,g=void 0===v?"slash":v,b=e.basename?(0,c.stripTrailingSlash)((0,c.addLeadingSlash)(e.basename)):"",w=p[g],x=w.encodePath,P=w.decodePath,O=function(){var e=P(f());return(0,a.default)(!b||(0,c.hasBasename)(e,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+b+'".'),b&&(e=(0,c.stripBasename)(e,b)),(0,i.createLocation)(e)},j=(0,s.default)(),Z=function(e){r(K,e),K.length=t.length,j.notifyListeners(K.location,K.action)},E=!1,k=null,R=function(){var e=f(),t=x(e);if(e!==t)m(t);else{var n=O(),r=K.location;if(!E&&(0,i.locationsAreEqual)(r,n))return;if(k===(0,c.createPath)(n))return;k=null,N(n)}},N=function(e){if(E)E=!1,Z();else{j.confirmTransitionTo(e,"POP",y,(function(t){t?Z({action:"POP",location:e}):C(e)}))}},C=function(e){var t=K.location,n=I.lastIndexOf((0,c.createPath)(t));-1===n&&(n=0);var r=I.lastIndexOf((0,c.createPath)(e));-1===r&&(r=0);var a=n-r;a&&(E=!0,_(a))},S=f(),A=x(S);S!==A&&m(A);var D=O(),I=[(0,c.createPath)(D)],L=function(e){return"#"+x(b+(0,c.createPath)(e))},V=function(e,t){(0,a.default)(void 0===t,"Hash history cannot push state; it is ignored");var n="PUSH",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),o=x(b+t);if(f()!==o){k=t,h(o);var i=I.lastIndexOf((0,c.createPath)(K.location)),s=I.slice(0,-1===i?0:i+1);s.push(t),I=s,Z({action:n,location:r})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),Z()}}))},T=function(e,t){(0,a.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n="REPLACE",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),a=x(b+t);f()!==a&&(k=t,m(a));var o=I.indexOf((0,c.createPath)(K.location));-1!==o&&(I[o]=t),Z({action:n,location:r})}}))},_=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return _(-1)},U=function(){return _(1)},M=0,W=function(e){1===(M+=e)?(0,l.addEventListener)(window,d,R):0===M&&(0,l.removeEventListener)(window,d,R)},B=!1,H=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=j.setPrompt(e);return B||(W(1),B=!0),function(){return B&&(B=!1,W(-1)),t()}},z=function(e){var t=j.appendListener(e);return W(1),function(){W(-1),t()}},K={length:t.length,action:"POP",location:D,createHref:L,push:V,replace:T,go:_,goBack:F,goForward:U,block:H,listen:z};return K}},3405:(e,t,n)=>{t.__esModule=!0;var r,a=n(30670),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,o.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),a(!0)):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}},44049:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(14892);const a=(o=r.Z,i=o.getIn,function(e,t){return function(n){var r=t||function(e){return i(e,"form")};return i(r(n),e+".initial")}});var o,i}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[614],{78788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ht});var r,i=n(45697),o=n.n(i),a=n(50600),c=n(68803),l=n(19241),s=n(30604),u=n(73665),f=n(74806),d=n(50558),p="root/LOAD_DIALOG_INFO",b="delete/SET_DELETE_DIALOG_INFO",y="delete/DO_DELETE",h="delete/SET_DELETING_IN_PROGRESS",g="delete/ON_CANCEL",m="delete/SET_ENTITIES_TO_DELETE",v=function(e){return{type:b,payload:{dialogInfo:e}}},O=function(){return{type:y}},j=function(e){return{type:m,payload:{entitiesToDelete:e}}},w=n(1024),x=n.n(w),E=n(50258),P=n(44012),k=n(93235),T=n(34206),S=n(319),C=n.n(S),A=n(63038),D=n.n(A),Z=n(28655),I=n.n(Z),N=n(38205),L=n(76791),R=n(85893);const M=function(e){var t=e.relatedEntity,n=e.children,i=e.maxCountLink;if(t.keys.length<i&&0===t.keysOtherBu.length)return n;var o=(0,R.jsxs)(R.Fragment,{children:[t.keys.length>i&&(r||(r=(0,R.jsx)(T.ZP.P,{children:(0,R.jsx)(P.Z,{id:"client.delete.tooManyRecords"})}))),t.keysOtherBu.length>0&&(0,R.jsx)(T.ZP.P,{children:(0,R.jsx)(P.Z,{id:"client.delete.recordInOtherBU",values:{count:t.keysOtherBu.length}})})]});return(0,R.jsx)(L.Z,{content:o,placement:"top",children:n})};var F,_,q=N.ZP.span.withConfig({displayName:"NonBreakingText"})(F||(F=I()(["\n white-space: nowrap;\n"])));const B=function(e){var t=e.rootEntities,n=e.relatedEntities,r=e.maxCountLink,i=e.navigationStrategy;return(0,R.jsxs)(T.ZP.Span,{children:[(0,R.jsx)(T.ZP.B,{children:Object.entries(t).map((function(e){var t=D()(e,2),n=t[0],r=t[1];return(0,R.jsxs)("span",{children:[r.entityLabel," (",r.keys.length>0&&i.ListLink?(0,R.jsx)(i.ListLink,{entityName:n,entityKeys:r.keys,children:r.keys.length}):(0,R.jsx)(T.ZP.Span,{children:r.keys.length}),")"]},"root-entity-".concat(n))})).reduce((function(e,t){return[e,", ",t]}))}),Object.keys(n).length>0&&(0,R.jsxs)(R.Fragment,{children:[_||(_=(0,R.jsx)("span",{children:" / "})),Object.keys(n).map((function(e){var t=n[e],o=[].concat(C()(t.keys),C()(t.keysOtherBu)).length,a=t.keys.length>0&&i.ListLink?(0,R.jsx)(i.ListLink,{entityName:e,entityKeys:t.keys.slice(0,r),children:o}):(0,R.jsx)(T.ZP.Span,{children:o}),c=(0,R.jsx)(M,{relatedEntity:t,maxCountLink:r,children:a});return(0,R.jsx)(x().Fragment,{children:(0,R.jsxs)(q,{children:[t.entityLabel," (",c,")"]})},"entity-info-"+e)})).reduce((function(e,t){return[e,", ",t]}))]})]})};var U,W,H,Y=n(7281),z=N.ZP.div.withConfig({displayName:"StyledIconWrapper"})(U||(U=I()(["\n margin-bottom: ",";\n"])),Y.Z.space(.2));const V=function(e){var t=e.dialogInfo,n=e.navigationStrategy;return(0,R.jsxs)(R.Fragment,{children:[W||(W=(0,R.jsx)(z,{children:(0,R.jsx)(k.Z,{size:"30px"})})),H||(H=(0,R.jsx)(T.ZP.P,{children:(0,R.jsx)(P.Z,{id:"client.delete.deleteInProgress"})})),(0,R.jsx)(B,{rootEntities:t.rootEntitiesDeletable,relatedEntities:t.relatedDeletable,maxCountLink:100,navigationStrategy:n},"infopart-deletable")]})};var G={doDelete:O};const K=(0,d.connect)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),G)((0,f.ZP)(V));var $,J,Q=n(83324),X=n(78958),ee=n(59713),te=n.n(ee),ne=n(27361),re=n.n(ne),ie=n(24875),oe=n(58664),ae=[X.Z.condition.BASE,X.Z.condition.DANGER,X.Z.condition.SUCCESS,X.Z.condition.WARNING],ce=($={},te()($,X.Z.condition.DANGER,ie.FS.color("signal.danger")),te()($,X.Z.condition.SUCCESS,ie.FS.color("signal.success")),te()($,X.Z.condition.WARNING,ie.FS.color("signal.warning")),te()($,X.Z.condition.BASE,(function(e){return(0,oe.HO)(re()(e.theme,"colors.paper"),1)})),$),le=N.ZP.div.withConfig({displayName:"StyledSignalBox"})(J||(J=I()(["\n && {\n background-color: ",";\n padding: ",";\n margin-bottom: ",";\n border-radius: ",";\n ","\n &:last-child {\n margin-bottom: 0;\n }\n }\n"])),(function(e){return function(e){return ce[e.condition]||(0,oe.HO)(re()(e.theme,"colors.paper"),1)}(e)}),Y.Z.space(-1),Y.Z.space(-1),ie.FS.radii("radii.regular"),(function(e){var t=e.condition,n=e.theme;return"base"!==t&&"\n * {\n color: ".concat(n.colors.paper,";\n }\n ")}));le.propTypes={condition:X.Z.oneOfPropTypeAndCompletelyMapped(ae,ce)};var se=function(e){var t=e.condition,n=e.title,r=e.children,i=e.meta;return(0,R.jsxs)(le,{condition:t,children:[n&&(0,R.jsx)(T.ZP.H5,{children:n}),x().Children.map(r,(function(e){return x().cloneElement(e)})),i&&(0,R.jsx)(T.ZP.Small,{children:i})]})};se.defaultProps={condition:X.Z.condition.BASE};const ue=se;var fe,de,pe,be,ye,he,ge,me=n(65035),ve=n(36589),Oe=N.ZP.div.withConfig({displayName:"StyledSectionWrapper"})(fe||(fe=I()(["\n padding-top: ",";\n"])),Y.Z.space(.6)),je=N.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(de||(de=I()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),ve.Z);const we=function(e){var t=e.dialogInfo,n=t.rootEntitiesDeletable,r=t.rootEntitiesNotDeletable,i=t.relatedDeletable,o=t.relatedNotDeletable,a=t.hasUnreadableEntities,c=e.doDelete,l=e.onCancel,s=e.navigationStrategy;return(0,Q.z)(l),(0,R.jsxs)(R.Fragment,{children:[pe||(pe=(0,R.jsx)(T.ZP.P,{children:(0,R.jsx)(P.Z,{id:"client.delete.confirmText"})})),(0,R.jsx)(B,{rootEntities:n,relatedEntities:i,maxCountLink:100,navigationStrategy:s},"infopart-deletable"),Object.keys(r).length>0&&(0,R.jsxs)(Oe,{children:[be||(be=(0,R.jsx)(T.ZP.P,{children:(0,R.jsx)(P.Z,{id:"client.delete.textNotDeletable"})})),(0,R.jsx)(B,{rootEntities:r,relatedEntities:o,maxCountLink:100,navigationStrategy:s},"infopart-notdeletable")]}),a&&(ye||(ye=(0,R.jsx)(Oe,{children:(0,R.jsx)(ue,{condition:"warning",children:(0,R.jsx)(T.ZP.Span,{children:(0,R.jsx)(P.Z,{id:"client.delete.unreadableEntities"})})})}))),(0,R.jsx)(Oe,{children:(0,R.jsxs)(je,{children:[(0,R.jsx)(me.Z,{onClick:c,disabled:Object.keys(n).every((function(e){return 0===n[e].keys.length})),children:he||(he=(0,R.jsx)(P.Z,{id:"client.delete.deleteButton"}))}),(0,R.jsx)(me.Z,{ink:"primary",look:"raised",onClick:l,children:ge||(ge=(0,R.jsx)(P.Z,{id:"client.delete.cancelButton"}))})]})})]})};var xe={doDelete:O,onCancel:function(){return{type:g}}};const Ee=(0,d.connect)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),xe)((0,f.ZP)(we));var Pe,ke;const Te=function(e){var t=e.loadDialogInfo,n=e.dialogInfo,r=e.deletingInProgress,i=e.intl;(0,w.useEffect)((function(){t()}),[t]);var o;return r?Pe||(Pe=(0,R.jsx)(K,{})):(0,R.jsx)(E.Z,{required:[n],loadingText:(o="client.delete.loadingText",i.formatMessage({id:o})),children:n&&(ke||(ke=(0,R.jsx)(Ee,{})))})};var Se={loadDialogInfo:function(){return{type:p}}};const Ce=(0,d.connect)((function(e,t){return{dialogInfo:e.del.dialogInfo,deletingInProgress:e.del.deletingInProgress}}),Se)((0,f.ZP)(Te));var Ae,De=n(81770),Ze=(Ae={},te()(Ae,b,De.Z.singleTransferReducer("dialogInfo")),te()(Ae,m,De.Z.singleTransferReducer("entitiesToDelete")),te()(Ae,h,De.Z.singleTransferReducer("deletingInProgress")),Ae),Ie={dialogInfo:null,entitiesToDelete:null,deletingInProgress:!1};var Ne=n(87757),Le=n.n(Ne),Re=n(34857),Me=n(81719),Fe=n(5422);const _e=function(e){var t=e.errors.map((function(e){var t=e.entityValidatorErrors;return Object.keys(t).map((function(e){return(0,R.jsx)(Fe.Z.List,{children:t[e].map((function(t,n){return(0,R.jsx)(Fe.Z.Item,{label:t},"entity-".concat(e,"-").concat(n))}))},e)}))}));return(0,R.jsx)(R.Fragment,{children:t})};function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){te()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue="DELETABLE",We=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.rootEntity,i=r.entityName,o=r.entityLabel,a=r.key;if(a.includes("/")){var c=a.split("/"),l=D()(c,2),s=l[0],u=l[1];return Be(Be({},e),{},te()({},s,{entityLabel:o,keys:[].concat(C()(re()(e,[s,"keys"],[])),C()(n?[u]:[]))}))}return Be(Be({},e),{},te()({},i,{entityLabel:o,keys:[].concat(C()(re()(e,[i,"keys"],[])),C()(n?[a]:[]))}))},He=function(e){return e.rootEntity.deleteStatus===Ue&&!e.affectedEntities.find((function(e){return e.deleteStatus!==Ue}))},Ye=function(e,t){var n=e.entitiesToDelete;return n.reduce((function(e,n){var r=He(n),i=r?"relatedDeletable":"relatedNotDeletable";return Be(Be(Be({},e),{},{rootEntitiesDeletable:We(e.rootEntitiesDeletable,n,r)},!r&&{rootEntitiesNotDeletable:We(e.rootEntitiesNotDeletable,n)}),{},te()({},i,function(e,t,n,r){return Be({},t.affectedEntities.reduce((function(e,t){return Be(Be({},e),n||t.deleteStatus!==Ue?te()({},t.entityName,Be(Be({},re()(e,t.entityName,{keys:[],keysOtherBu:[],entityLabel:t.entityLabel})),null===t.businessUnitId||t.businessUnitId===r?{keys:Array.from(new Set([].concat(C()(re()(e,[t.entityName,"keys"],[])),[t.key])))}:{keysOtherBu:Array.from(new Set([].concat(C()(re()(e,[t.entityName,"keysOtherBu"],[])),[t.key])))})):{})}),Be({},e)))}(e[i],n,r,t)))}),{rootEntitiesDeletable:{},rootEntitiesNotDeletable:{},relatedDeletable:{},relatedNotDeletable:{},hasUnreadableEntities:!!n.find((function(e){return e.unreadableEntities}))})},ze=function(e){var t=e.entitiesToDelete;return{entityName:re()(t,"[0].rootEntity.entityName"),keys:t.reduce((function(e,t){return[].concat(C()(e),C()(He(t)?[t.rootEntity.key]:[]))}),[])}},Ve=o().shape({entityLabel:o().string,keys:o().arrayOf(o().string),keysOtherBu:o().arrayOf(o().string)}),Ge=(o().shape({rootEntitiesDeletable:o().objectOf(Ve).isRequired,rootEntitiesNotDeletable:o().objectOf(Ve).isRequired,relatedDeletable:o().objectOf(Ve).isRequired,relatedNotDeletable:o().objectOf(Ve).isRequired,hasUnreadableEntities:o().bool}),Le().mark(rt)),Ke=Le().mark(it),$e=Le().mark(ot),Je=Le().mark(at),Qe=Le().mark(ct),Xe=Le().mark(lt),et=function(e){return e.input},tt=function(e){return e.intl.messages},nt=function(e){return e.del.entitiesToDelete};function rt(){var e,t,n;return Le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Re.Ys)(et);case 2:return e=r.sent,t=e.selection,r.next=6,(0,Re.RE)(u.Z.getEntities,t,Me.Z.fetchEntities);case 6:return n=r.sent,r.abrupt("return",{entityModel:n.entityName,keys:n.keys});case 8:case"end":return r.stop()}}),Ge)}function it(){var e,t;return Le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Re.Ys)(et);case 2:return e=n.sent,t=e.customDeleteEndpoint,n.abrupt("return",t||"client/delete");case 5:case"end":return n.stop()}}),Ke)}function ot(){var e,t,n,r,i,o,a,c;return Le().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,Re.RE)(rt);case 2:return e=l.sent,l.next=5,(0,Re.RE)(it);case 5:return t=l.sent,l.next=8,(0,Re.$6)([(0,Re.RE)(Me.Z.requestSaga,"".concat(t,"/dialog"),{method:"POST",body:e}),(0,Re.RE)(Me.Z.fetchPrincipal)]);case 8:return n=l.sent,r=D()(n,2),i=r[0],o=r[1],l.next=14,(0,Re.RE)(Ye,i.body,o.currentBusinessUnit.id);case 14:return a=l.sent,l.next=17,(0,Re.gz)(v(a));case 17:return l.next=19,(0,Re.RE)(ze,i.body);case 19:return c=l.sent,l.next=22,(0,Re.gz)(j(c));case 22:case"end":return l.stop()}}),$e)}function at(){var e,t,n,r,i,o,a,c;return Le().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,Re.Ys)(nt);case 2:return e=s.sent,s.next=5,(0,Re.gz)({type:h,payload:{deletingInProgress:!0}});case 5:return s.next=7,(0,Re.RE)(it);case 7:return t=s.sent,s.next=10,(0,Re.RE)(Me.Z.requestSaga,t,{method:"POST",body:{entityModel:e.entityName,keys:e.keys},acceptedErrorCodes:["VALIDATION_FAILED"],acceptedStatusCodes:[409]});case 10:return n=s.sent,s.next=13,(0,Re.Ys)(tt);case 13:if(r=s.sent,!n.ok){s.next=22;break}return i=n.body,o=Object.keys(i.deletedEntities).reduce((function(e,t){return[].concat(C()(e),C()(i.deletedEntities[t].map((function(e){return{entityName:t,key:e}}))))}),[]),a=[{type:"entity-delete-event",payload:{entities:o}}],s.next=20,(0,Re.gz)(l.Z.fireExternalEvent("onSuccess",{message:r["client.delete.successfullyMessage"],remoteEvents:a}));case 20:case 25:case 31:s.next=35;break;case 22:if(409!==n.status||!n.body.information){s.next=27;break}return s.next=25,(0,Re.gz)(l.Z.fireExternalEvent("onError",{message:n.body.information}));case 27:if(400!==n.status||"VALIDATION_FAILED"!==n.body.errorCode){s.next=33;break}return c=function(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{children:r["client.delete.validationErrorMessage"]}),(0,R.jsx)(_e,{errors:n.body.errors})]})},s.next=31,(0,Re.gz)(l.Z.fireExternalEvent("onError",{message:c}));case 33:return s.next=35,(0,Re.gz)(l.Z.fireExternalEvent("onError",{message:r["client.delete.errorMessage"]}));case 35:case"end":return s.stop()}}),Je)}function ct(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Re.gz)(l.Z.fireExternalEvent("onCancel"));case 2:case"end":return e.stop()}}),Qe)}function lt(){return Le().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Re.$6)([(0,Re.Fm)(p,ot),(0,Re.Fm)(y,at),(0,Re.Fm)(g,ct)]);case 2:case"end":return e.stop()}}),Xe)}const st={del:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ie,t=arguments.length>1?arguments[1]:void 0,n=Ze[t.type];return n?n(e,t):e}};var ut,ft=[lt],dt="delete",pt=["onSuccess","onCancel","onError","emitAction"],bt=function(e,t,n,r){var i=ut||(ut=(0,R.jsx)(Ce,{})),o=c.Z.createStore(st,ft,t,dt);a.Z.addToStore(o,(function(e){return e.input.emitAction}));var u=!n.emitAction;return s.Z.addToStore(o,u),l.Z.addToStore(o,(function(e){return c.Z.getEvents(pt,e.input)})),c.Z.createApp(dt,i,o,{input:t,events:n,actions:[],publicPath:r,textResourceModules:["component","common",dt]})};c.Z.registerAppInRegistry(dt,bt);var yt=function(e){return c.Z.useApp({initApp:bt,props:e,packageName:dt,externalEvents:pt}).component};yt.propTypes={selection:u.Z.propType.isRequired,customDeleteEndpoint:o().string};const ht=yt;c.Z.createBundleableApp(dt,bt,yt)},73665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(45697),i=n.n(r);const o={ID:"ID",QUERY:"QUERY"},a=i().shape({entityName:i().string.isRequired,ids:function(e,t,n){if(e.selection&&e.selection.type===o.ID&&!e.selection[t])return new Error("Selection.ids prop not defined. Component: ".concat(n,"'."))},query:function(e,t,n){if(e.selection&&e.selection.type===o.QUERY&&!e.selection[t])return new Error("Selection.query prop not defined. Component: ".concat(n,"'."))},type:i().oneOf(Object.keys(o)).isRequired,count:i().number});var c=n(59713),l=n.n(c),s=n(87757),u=n.n(s),f=n(34857),d=n(44759),p=u().mark(g);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=1e5;function g(e,t){var n,r;return u().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(n=e.entityName,e.type!==o.QUERY){i.next=9;break}return i.next=4,(0,f.RE)(t,e.entityName,y(y({},e.query),{},{limit:h}));case 4:if(!((r=i.sent).length>h)){i.next=8;break}return i.next=8,(0,f.RE)(d.Z.logError,"Selected records exceed limit of ".concat(h));case 8:return i.abrupt("return",{entityName:n,keys:r.map((function(e){return e.key}))});case 9:return i.abrupt("return",{entityName:n,keys:e.ids});case 10:case"end":return i.stop()}}),p)}const m={getEntities:g,getSingleKey:function(e,t){if(e.entityName!==t)throw new Error("Only selection of ".concat(t," supported"));if("ID"!==e.type)throw new Error("Only ID selection type supported");if(!e.ids||1!==e.ids.length)throw new Error("Exactly one ".concat(t," must be selected"));return e.ids[0]},propType:a,selectionTypes:o}},81749:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,b:()=>o});var r=n(45697),i={NONE:"none",FULLTEXT:"fulltext",SIMPLE:"simple",SIMPLE_ADVANCED:"simple_advanced",ADVANCED:"advanced",ADMIN:"admin"},o=n.n(r)().oneOf(Object.values(i));const a=i},13025:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i,l:()=>o});var r=n(45697),i={SINGLE:"single",MULTI:"multi",MULTI_EXPLICIT:"multi_explicit",NONE:"none"},o=n.n(r)().oneOf(Object.keys(i).map((function(e){return i[e]})))},54680:(e,t,n)=>{"use strict";n.d(t,{Z:()=>G});var r=n(74806),i=n(59713),o=n.n(i),a=n(319),c=n.n(a),l=n(64593),s=n(10535),u=n(6699),f=n(34206),d=n(88162),p=n(85893),b={error:"exclamation-circle",home:"house-blank"},y=function(e){return b[e]||e};const h=function(e){var t=e.type;return t&&"record"!==t?(0,p.jsx)(d.Z,{icon:y(t)}):null};var g,m,v,O,j,w,x=n(6479),E=n.n(x),P=n(28655),k=n.n(P),T=n(1024),S=n.n(T),C=n(38205),A=n(40493),D=n(69829),Z=n(88601),I=n(7281),N=["component"],L=C.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(g||(g=k()(["\n background-color: ",";\n padding: "," ",";\n position: relative;\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n"])),(function(e){return e.backgroundColor||Z.Z.color("backgroundBreadcrumbs")(e)}),I.Z.space(-.7),I.Z.space(.39)),R=(0,C.ZP)((function(e){var t=e.component,n=E()(e,N);return S().cloneElement(t,n)})).withConfig({displayName:"StyledBreadcrumbsLink"})(m||(m=k()(["\n font-weight: ",";\n text-decoration: none;\n color: ",";\n cursor: pointer;\n\n & * {\n font-weight: ",";\n text-decoration: none;\n color: ",";\n }\n\n &:hover,\n &:hover * {\n color: ",";\n }\n\n &:focus,\n &:active,\n &:focus *,\n &:active * {\n color: ",";\n }\n"])),Z.Z.fontWeight("bold"),(function(e){return e.active&&Z.Z.color("primary")}),Z.Z.fontWeight("bold"),(function(e){return e.active&&Z.Z.color("primary")}),Z.Z.color("secondaryLight"),Z.Z.color("primary")),M=C.ZP.span.withConfig({displayName:"StyledBreadcrumbsTitle"})(v||(v=k()(["\n font-weight: ",";\n text-decoration: none;\n color: ",";\n\n & * {\n font-weight: ",";\n text-decoration: none;\n color: ",";\n }\n\n &:active * {\n color: ",";\n }\n"])),Z.Z.fontWeight("bold"),(function(e){return e.active&&Z.Z.color("primary")}),Z.Z.fontWeight("bold"),(function(e){return e.active&&Z.Z.color("primary")}),Z.Z.color("primary")),F=(0,C.ZP)(D.Fe).withConfig({displayName:"StyledBreadcrumbSeparator"})(O||(O=k()(["\n margin-left: ",";\n margin-right: ",";\n"])),I.Z.space(-2),I.Z.space(-2)),_=C.ZP.span.withConfig({displayName:"StyledBreadcrumbWrapper"})(j||(j=k()(["\n "," {\n margin-right: ",";\n }\n"])),A.q,I.Z.space(-1));const q=function(){return w||(w=(0,p.jsx)(F,{breakWords:!0,children:(0,p.jsx)(d.Z,{icon:"chevron-right"})}))};var B;function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var H=function(e){return e.title||e.display},Y=function(e,t){if(!e||0===e.length)return"Tocco";var n=e.at(-1),r="";switch(n.type){case"create":r="".concat(H(n)," - ").concat(t);break;case"detail":r=e.slice(e.length-2).map(H).join(" - ");break;default:r=H(n)}return r},z=function(e){var t,n=e.intl,r=e.pathPrefix,i=e.breadcrumbsInfo,o=void 0===i?[]:i,a=e.currentView,d=e.backgroundColor,b=e.onClick,y=e.linkComp,g=[].concat(c()(o),c()(a?[a]:[]));if(0===g.length)return null;var m,v=g.map((function(e,n){var i,o=e.display||"",a=n===g.length-1?M:R,c=n===g.length-1&&{active:"true"},l=void 0!==e.path?{to:"".concat(r,"/").concat(e.path)}:{},d=y?t||(t=(0,p.jsx)(y,{})):B||(B=(0,p.jsx)(u.Z,{}));return(0,p.jsx)(f.ZP.Span,{children:(0,p.jsx)(_,{children:(0,p.jsxs)(a,W(W(W({neutral:!0},c),l),{},{onClick:(i=e,function(){b&&b(i)}),component:d,children:[(0,p.jsx)(h,{type:e.type}),(0,p.jsx)("span",{dangerouslySetInnerHTML:{__html:s.Z.sanitizeHtml(o)}})]}))})},"breadcrumbItem-".concat(n))})).reduce((function(e,t,n){return[e,(0,p.jsx)(q,{},"icon".concat(n)),t]}));return(0,p.jsxs)(L,{backgroundColor:d,children:[(0,p.jsx)(l.q,{defer:!1,children:(0,p.jsx)("title",{children:Y(g,(m="client.component.breadcrumbs.createTitle",n.formatMessage({id:m})))})}),(0,p.jsx)(p.Fragment,{children:v})]})};z.defaultProps={pathPrefix:""};const V=z,G=(0,r.ZP)(V)},99579:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Icon:()=>N,default:()=>L});var r=n(59713),i=n.n(r),o=n(45697),a=n.n(o),c=n(6479),l=n.n(c),s=n(23636),u=n(93024),f=n(65735),d=n(73582),p=n(67814),b=n(27361),y=n.n(b),h=n(40493),g=n(85893),m=["icon","style","hasFixedWidth"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}s.library.add(d.IJ7,f.IJ7,f.C65,f.kJo,f._tD,f.A35,f.mTx,f.ptq,f.g4A,f.r8p,f.Pk,f.g9M,f.Tab,d.Tab,f.NBC,f.eFW,f.acZ,f.u2A,f.gMD,f.cwv,f.w49,f.fUD,f.icc,f.ca9,f.Vmj,f.gSj,f.WFE,f.hQn,f.LEp,f.WV2,f.FU$,f.diR,d.diR,f.f8k,d.f8k,u.xYR,u.neY,u.AYu,u.kBj,u.hVS,u.dc_,u.Av$,f.xiG,f.gJF,f.j1w,f.WKO,f.wn1,f.b7W,f.YHc,f.ZC5,f.UO1,d.Fyj,f.Qj4,f.FL8,f.foy,f.u9C,f.Fuz,f.iV1,f.Kl4,f.nYk,f.sqG,f.RLE,f.XAH,f.Zrf,f.jMV,f.pL1,f.g6h,f.SJY,f.qmU,f.nek,f.Qy6,f.lH_,d.pL1,f.hVM,f.yOf,f.Xgz,f.Mzg,f.r6l,f.IwR,f.aJJ,d.Alc,f.dLO,f.ntl,f.Hw7,f.FYs,f.$36,f.fT7,f.ioP,f.Cw9,f.Ry6,f.C3l,f.a1i,f.jGC,f.IeV,f.A8,f.hG5,f.FVb,f.AxY,f.mAj,f.hGM,f.UkD,f.BDt,f.QzV,f.py1,f.cf$,f.byT,f.dT$,f.G_j,f.A4,f.ar8,f.nNP,f.yGT,f.ILF,f.rux,f.qbi);var j=function(e){var t=e.icon,n=e.style,r=e.hasFixedWidth,i=l()(e,m),o=t.includes(",")?t.replace(/\s+/,"").split(","):t,a=O({},y()(n,"color")&&{color:n.color}),c=Array.isArray(o)?o[1]:o;return(0,g.jsx)(h.q,{children:(0,g.jsx)(p.G,O(O(O({icon:o,style:n},a),{},{fixedWidth:r},i),{},{"data-testid":"icon-".concat(c)}))})};j.defaultProps={hasFixedWidth:!0};const w=j,x=JSON.parse('{"abacus":{"id":"fal, abacus","lib":"fa"},"address-card":{"id":"fal, address-card","lib":"fa"},"apple":{"id":"fab, apple","lib":"fa","tags":["sso"]},"arrow-left":{"id":"fal, arrow-left","lib":"fa","tags":["navigate"]},"arrow-right":{"id":"fal, arrow-right","lib":"fa","tags":["navigate"]},"arrow-to-bottom":{"id":"fal, arrow-to-bottom","lib":"fa","tags":["download"]},"arrow-to-top":{"id":"fal, arrow-to-top","lib":"fa","tags":["upload"]},"arrow-up-long":{"id":"fal, arrow-up-long","lib":"fa","tags":["arrow-up-long"]},"ballot-check":{"id":"fal, ballot-check","lib":"fa"},"barcode-alt":{"id":"fal, barcode-alt","lib":"fa"},"bars":{"id":"fal, bars","lib":"fa","tags":["burger"]},"bell":{"id":"fal, bell","lib":"fa","tags":["notification"]},"bolt":{"id":"fal, bolt-lightning","lib":"fa"},"bolt-lightning":{"id":"fal, bolt-lightning","lib":"fa"},"book":{"id":"fal, book","lib":"fa"},"box":{"id":"fal, box","lib":"fa"},"box-open":{"id":"fal, box-open","lib":"fa"},"calendar":{"id":"fal, calendar","lib":"fa"},"calendar-arrow-down":{"id":"fal, calendar-arrow-down","lib":"fa"},"calendar-circle-user":{"id":"fal, calendar-circle-user","lib":"fa"},"calendar-check":{"id":"fal, calendar-check","lib":"fa"},"calendar-minus":{"id":"fal, calendar-minus","lib":"fa"},"calendar-plus":{"id":"fal, calendar-plus","lib":"fa"},"chalkboard-teacher":{"id":"fal, chalkboard-teacher","lib":"fa"},"chart-network":{"id":"fal, chart-network","lib":"fa"},"check":{"id":"fal, check","lib":"fa","tags":["ok"]},"check-circle":{"id":"fal, check-circle","lib":"fa","tags":["check"]},"check-circle-full":{"id":"fas, check-circle","lib":"fa"},"chevron-double-down":{"id":"fal, chevron-double-down","lib":"fa"},"chevron-double-left":{"id":"fal, chevron-double-left","lib":"fa"},"chevron-double-right":{"id":"fal, chevron-double-right","lib":"fa"},"chevron-double-up":{"id":"fal, chevron-double-up","lib":"fa"},"chevron-down":{"id":"fal, chevron-down","lib":"fa"},"chevron-left":{"id":"fal, chevron-left","lib":"fa"},"chevron-right":{"id":"fal, chevron-right","lib":"fa"},"chevron-up":{"id":"fal, chevron-up","lib":"fa"},"circle":{"id":"fal, circle","lib":"fa","tags":["selection"]},"circle-full":{"id":"fas, circle","lib":"fa"},"circle-notch":{"id":"fa, circle-notch","lib":"fa"},"circle-notch-light":{"id":"fal, circle-notch","lib":"fa"},"code":{"id":"fal, code","lib":"fa"},"cog":{"id":"fal, cog","lib":"fa"},"compress":{"id":"fal, compress","lib":"fa"},"comment":{"id":"fal, comment","lib":"fa"},"cube":{"id":"fal, cube","lib":"fa"},"dropbox":{"id":"fab, dropbox","lib":"fa","tags":["sso"]},"ellipsis-v":{"id":"fal, ellipsis-v","lib":"fa","tags":["dots","pünktli"]},"envelope":{"id":"fal, envelope","lib":"fa"},"exclamation":{"id":"fal, exclamation","lib":"fa","tags":["warning"]},"exclamation-circle":{"id":"fal, exclamation-circle","lib":"fa","tags":["warning"]},"external-link":{"id":"fal, external-link","lib":"fa","tags":["external-link"]},"facebook":{"id":"fab, facebook","lib":"fa","tags":["sso"]},"facebook-f":{"id":"fab, facebook-f","lib":"fa","tags":["sso"]},"file":{"id":"fal, file","lib":"fa"},"file-alt":{"id":"fal, file-alt","lib":"fa"},"file-code":{"id":"fal, file-code","lib":"fa"},"file-csv":{"id":"fal, file-csv","lib":"fa"},"file-excel":{"id":"fal, file-excel","lib":"fa"},"file-export":{"id":"fal, file-export","lib":"fa"},"file-import":{"id":"fal, file-import","lib":"fa"},"file-pdf":{"id":"fal, file-pdf","lib":"fa"},"file-spreadsheet":{"id":"fal, file-spreadsheet","lib":"fa"},"filter":{"id":"fal, filter","lib":"fa"},"folder":{"id":"fal, folder","lib":"fa"},"folders":{"id":"fal, folders","lib":"fa","tags":["copy"]},"globe":{"id":"fal, globe","lib":"fa"},"google":{"id":"fab, google","lib":"fa","tags":["sso"]},"horizontal-rule":{"id":"fal, horizontal-rule","lib":"fa"},"id-badge":{"id":"fal, id-badge","lib":"fa"},"info":{"id":"fal, info","lib":"fa"},"laptop-code":{"id":"fal, laptop-code","lib":"fa"},"link":{"id":"fal, link","lib":"fa"},"list":{"id":"fal, list","lib":"fa"},"list-check":{"id":"fal, list-check","lib":"fa"},"lock":{"id":"fal, lock","lib":"fa"},"info-circle":{"id":"fal, info-circle","lib":"fa","tags":["info"]},"mail-bulk":{"id":"fal, mail-bulk","lib":"fa"},"map-marked":{"id":"fal, map-marked","lib":"fa"},"merge":{"id":"fal, merge","lib":"fa"},"microsoft":{"id":"fab, microsoft","lib":"fa","tags":["sso"]},"minus":{"id":"fal, minus","lib":"fa"},"newspaper":{"id":"fal, newspaper","lib":"fa"},"office":{"id":"office","lib":"toc"},"paper-clip":{"id":"fa, paper-clip","lib":"fa"},"pen":{"id":"fal, pen","lib":"fa"},"pen-field":{"id":"fal, pen-field","lib":"fa"},"percent":{"id":"fal, percent","lib":"fa"},"phone":{"id":"fal, phone","lib":"fa"},"phone-laptop":{"id":"fal, phone-laptop","lib":"fa"},"plus":{"id":"fal, plus","lib":"fa","tags":["new"]},"question-circle":{"id":"fal, question-circle","lib":"fa","tags":["help"]},"save":{"id":"fal, save","lib":"fa"},"search":{"id":"fal, search","lib":"fa"},"sitemap":{"id":"fal, sitemap","lib":"fa"},"sort-down":{"id":"fal, sort-down","lib":"fa"},"sort-up":{"id":"fal, sort-up","lib":"fa"},"square":{"id":"fal, square","lib":"fa"},"square-full":{"id":"fas, square-full","lib":"fa"},"square-minus":{"id":"fal, square-minus","lib":"fa"},"square-plus":{"id":"fal, square-plus","lib":"fa"},"star":{"id":"fal, star","lib":"fa","tags":["favorite"]},"star-full":{"id":"fas, star","lib":"fa","tags":["favorite"]},"sync":{"id":"fal, sync","lib":"fa","tags":["refresh"]},"tasks":{"id":"fal, tasks","lib":"fa"},"times":{"id":"fal, times","lib":"fa","tags":["delete","close"]},"times-circle":{"id":"fal, times-circle","lib":"fa","tags":["error"]},"tocco":{"id":"logo","lib":"toc"},"trash":{"id":"fal, trash","lib":"fa","tags":["trash"]},"upload":{"id":"fal, upload","lib":"fa"},"users":{"id":"fal, users","lib":"fa"},"lightbulb-exclamation":{"id":"fal, lightbulb-exclamation","lib":"fa"},"house-blank":{"id":"fal, house-blank","lib":"fa"},"floppy-disk-circle-xmark":{"id":"fal, floppy-disk-circle-xmark","lib":"fa"},"user":{"id":"fal, user","lib":"fa"},"suitcase":{"id":"fal, suitcase","lib":"fa"}}');var E,P;function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S={logo:function(e){return(0,g.jsx)("svg",T(T({height:y()(e,"fontSize",20)},e),{},{"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:E||(E=(0,g.jsx)("path",{fill:"currentColor",d:"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 \n 8zm80 248c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80z"}))}))},office:function(e){return(0,g.jsx)("svg",T(T({height:y()(e,"fontSize",20)},e),{},{"aria-hidden":"true",role:"img",enableBackground:"new 0 0 2075 2499.8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2075 2499.8",children:P||(P=(0,g.jsx)("path",{fill:"currentColor",d:"m0 2016.6v-1519.8l1344.4-496.8 730.6 233.7v2045.9l-730.6 220.3-1344.4-483.3 1344.4 \n 161.8v-1769.2l-876.8 204.6v1198.3z"}))}))}},C=function(e){var t=e.icon,n=e.style;return S[t](n)};C.propTypes={icon:a().string.isRequired,style:a().object};const A=C;function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I={fa:function(e,t){return(0,g.jsx)(w,Z(Z({},t),{},{icon:e.id}))},toc:function(e,t){return(0,g.jsx)(A,Z(Z({},t),{},{icon:e.id}))}},N=function(e){var t=x[e.icon];if(!t)return null;var n=I[t.lib];return n?n(t,e):null};N.propTypes={icon:a().string.isRequired,style:a().objectOf(a().string)};const L=N},40493:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var r,i=n(28655),o=n.n(i),a=n(38205).ZP.span.withConfig({displayName:"StyledFontAwesomeAdapterWrapper"})(r||(r=o()([""])))},71392:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});var r={INLINE:"inline",NONE:"none"}},65378:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(45697),i=n.n(r),o=n(98773);const a={propTypes:i().shape({embedType:i().oneOf(o.Nc),widgetConfigKey:function(e,t,n){if("widget"===e.embedType&&!e[t])return new Error("Prop `"+t+"` is missing for `"+n+"`. Validation failed.")}})}},13442:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var r=n(59713),i=n.n(r);function o(e,t){void 0===t&&(t={});for(var n=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var i=1,o="";if("?"===e[c=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(c));for(;c<e.length;)if("\\"!==e[c]){if(")"===e[c]){if(0==--i){c++;break}}else if("("===e[c]&&(i++,"?"!==e[c+1]))throw new TypeError("Capturing groups are not allowed at ".concat(c));o+=e[c++]}else o+=e[c++]+e[c++];if(i)throw new TypeError("Unbalanced pattern at ".concat(n));if(!o)throw new TypeError("Missing pattern at ".concat(n));t.push({type:"PATTERN",index:n,value:o}),n=c}else{for(var a="",c=n+1;c<e.length;){var l=e.charCodeAt(c);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;a+=e[c++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));t.push({type:"NAME",index:n,value:a}),n=c}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),r=t.prefixes,i=void 0===r?"./":r,o="[^".concat(a(t.delimiter||"/#?"),"]+?"),c=[],l=0,s=0,u="",f=function(e){if(s<n.length&&n[s].type===e)return n[s++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var r=n[s],i=r.type,o=r.index;throw new TypeError("Unexpected ".concat(i," at ").concat(o,", expected ").concat(e))},p=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<n.length;){var b=f("CHAR"),y=f("NAME"),h=f("PATTERN");if(y||h){var g=b||"";-1===i.indexOf(g)&&(u+=g,g=""),u&&(c.push(u),u=""),c.push({name:y||l++,prefix:g,suffix:"",pattern:h||o,modifier:f("MODIFIER")||""})}else{var m=b||f("ESCAPED_CHAR");if(m)u+=m;else if(u&&(c.push(u),u=""),f("OPEN")){g=p();var v=f("NAME")||"",O=f("PATTERN")||"",j=p();d("CLOSE"),c.push({name:v||(O?l++:""),pattern:v&&!O?o:O,prefix:g,suffix:j,modifier:f("MODIFIER")||""})}else d("END")}}return c}function a(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function c(e){return e&&e.sensitive?"":"i"}function l(e,t,n){return function(e,t,n){void 0===n&&(n={});for(var r=n.strict,i=void 0!==r&&r,o=n.start,l=void 0===o||o,s=n.end,u=void 0===s||s,f=n.encode,d=void 0===f?function(e){return e}:f,p=n.delimiter,b=void 0===p?"/#?":p,y=n.endsWith,h="[".concat(a(void 0===y?"":y),"]|$"),g="[".concat(a(b),"]"),m=l?"^":"",v=0,O=e;v<O.length;v++){var j=O[v];if("string"==typeof j)m+=a(d(j));else{var w=a(d(j.prefix)),x=a(d(j.suffix));if(j.pattern)if(t&&t.push(j),w||x)if("+"===j.modifier||"*"===j.modifier){var E="*"===j.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(j.pattern,")(?:").concat(x).concat(w,"(?:").concat(j.pattern,"))*)").concat(x,")").concat(E)}else m+="(?:".concat(w,"(").concat(j.pattern,")").concat(x,")").concat(j.modifier);else"+"===j.modifier||"*"===j.modifier?m+="((?:".concat(j.pattern,")").concat(j.modifier,")"):m+="(".concat(j.pattern,")").concat(j.modifier);else m+="(?:".concat(w).concat(x,")").concat(j.modifier)}}if(u)i||(m+="".concat(g,"?")),m+=n.endsWith?"(?=".concat(h,")"):"$";else{var P=e[e.length-1],k="string"==typeof P?g.indexOf(P[P.length-1])>-1:void 0===P;i||(m+="(?:".concat(g,"(?=").concat(h,"))?")),k||(m+="(?=".concat(g,"|").concat(h,")"))}return new RegExp(m,c(n))}(o(e,n),t,n)}function s(e,t,n){return e instanceof RegExp?function(e,t){if(!t)return e;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,i=n.exec(e.source);i;)t.push({name:i[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),i=n.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,n){var r=e.map((function(e){return s(e,t,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),c(n))}(e,t,n):l(e,t,n)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=n(81770),p=n(24688),b=n(63038),y=n.n(b),h=n(1024),g=n.n(h),m=n(85893);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){return function(t){var n=(0,h.useState)(null),r=y()(n,2),o=r[0],a=r[1],c=(0,h.useRef)(!0);return(0,h.useEffect)((function(){return e().then((function(e){return c.current?a((function(){return e})):null})),function(){c.current=!1}}),[]),null!==o?(0,m.jsx)(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t)):null}}var j=n(44759);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E={},P=n(56746),k=function(e){return function(t){if(e.component)return(0,m.jsx)(e.component,{router:t,routes:e.routes});if(e.render){var n={router:t,routes:e.routes};return e.render(n)}}};const T=function(e){return(0,m.jsx)(P.AW,{path:e.path,exact:e.exact,render:k(e)})};function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const C=function(e){var t=e.history,n=e.routes;return(0,m.jsx)(P.F0,{history:t,children:(0,m.jsx)(g().Fragment,{children:n.map((function(e,t){return(0,m.jsx)(T,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),t)}))})})},A={loadRoute:function(e,t,n,r){return function(i){if(r&&E[r]){var o=E[r];return(0,m.jsx)(o,x({},i))}var a=O((function(){return new Promise((function(r){n().then((function(n){var i=n.default;i.reducers&&d.Z.injectReducers(e,i.reducers),i.sagas&&i.sagas.forEach((function(t){p.Z.injectSaga(e,t)})),i.inputDispatches&&i.inputDispatches.forEach((function(n){!function(e,t,n){var r=n.key,i=n.actionCreator,o=n.mandatory,a=void 0!==o&&o,c=n.defaultValue,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j.Z.logError;if(Object.prototype.hasOwnProperty.call(t,r)||c){var s=i(t[r]||c);e.dispatch(s)}else!0===a&&l("EntityBrowser: Mandatory field '".concat(r,"' not set in input"))}(e,t,n)})),r(i.container)}))}))}));return r&&(E[r]=a),(0,m.jsx)(a,x({},i))}},Router:C,RouteWithSubRoutes:T,extractParamsFromPath:function(e,t){var n=[],r=s(e,n).exec(t);return null!==r?n.reduce((function(e,t,n){return f(f({},e),{},i()({},t.name,r[n+1]))}),{}):null}}},29441:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(59713),i=n.n(r),o=n(27361),a=n.n(o);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={};const u={persistViewInfo:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s=l(l({},s),{},i()({},e,{level:n,info:l(l({},a()(s,[e,"info"],{})),t)}))},viewInfoSelector:function(e){return a()(s,[e,"info"],{})},clearPersistedViews:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;s=l({},Object.keys(s).reduce((function(t,n){var r=s[n];return l(l({},t),r.level<e&&i()({},n,r))}),{}))}}},41143:e=>{"use strict";e.exports=function(e,t,n,r,i,o,a,c){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,i,o,a,c],u=0;(l=new Error(t.replace(/%s/g,(function(){return s[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},64593:(e,t,n)=>{"use strict";n.d(t,{q:()=>he});var r,i,o,a,c=n(89324),l=n.n(c),s=n(83524),u=n.n(s),f=n(69590),d=n.n(f),p=n(1024),b=n.n(p),y=n(27418),h=n.n(y),g="bodyAttributes",m="htmlAttributes",v="titleAttributes",O={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},j=(Object.keys(O).map((function(e){return O[e]})),"charset"),w="cssText",x="href",E="http-equiv",P="innerHTML",k="itemprop",T="name",S="property",C="rel",A="src",D="target",Z={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},I="defaultTitle",N="defer",L="encodeSpecialCharacters",R="onChangeClientState",M="titleTemplate",F=Object.keys(Z).reduce((function(e,t){return e[Z[t]]=t,e}),{}),_=[O.NOSCRIPT,O.SCRIPT,O.STYLE],q="data-react-helmet",B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},W=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},z=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},V=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},G=function(e){var t=X(e,O.TITLE),n=X(e,M);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=X(e,I);return t||r||void 0},K=function(e){return X(e,R)||function(){}},$=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return H({},e,t)}),{})},J=function(e,t){return t.filter((function(e){return void 0!==e[O.BASE]})).map((function(e){return e[O.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var o=r[i].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}return t}),[])},Q=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&ie("Helmet: "+e+' should be of type "Array". Instead found type "'+B(t[e])+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var i={};n.filter((function(e){for(var n=void 0,o=Object.keys(e),a=0;a<o.length;a++){var c=o[a],l=c.toLowerCase();-1===t.indexOf(l)||n===C&&"canonical"===e[n].toLowerCase()||l===C&&"stylesheet"===e[l].toLowerCase()||(n=l),-1===t.indexOf(c)||c!==P&&c!==w&&c!==k||(n=c)}if(!n||!e[n])return!1;var s=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][s]&&(i[n][s]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var o=Object.keys(i),a=0;a<o.length;a++){var c=o[a],l=h()({},r[c],i[c]);r[c]=l}return e}),[]).reverse()},X=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},ee=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){ee(e)}),0)}),te=function(e){return clearTimeout(e)},ne="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||ee:n.g.requestAnimationFrame||ee,re="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||te:n.g.cancelAnimationFrame||te,ie=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},oe=null,ae=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,c=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,f=e.title,d=e.titleAttributes;se(O.BODY,r),se(O.HTML,i),le(f,d);var p={baseTag:ue(O.BASE,n),linkTags:ue(O.LINK,o),metaTags:ue(O.META,a),noscriptTags:ue(O.NOSCRIPT,c),scriptTags:ue(O.SCRIPT,s),styleTags:ue(O.STYLE,u)},b={},y={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(b[e]=n),r.length&&(y[e]=p[e].oldTags)})),t&&t(),l(e,b,y)},ce=function(e){return Array.isArray(e)?e.join(""):e},le=function(e,t){void 0!==e&&document.title!==e&&(document.title=ce(e)),se(O.TITLE,t)},se=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(q),i=r?r.split(","):[],o=[].concat(i),a=Object.keys(t),c=0;c<a.length;c++){var l=a[c],s=t[l]||"";n.getAttribute(l)!==s&&n.setAttribute(l,s),-1===i.indexOf(l)&&i.push(l);var u=o.indexOf(l);-1!==u&&o.splice(u,1)}for(var f=o.length-1;f>=0;f--)n.removeAttribute(o[f]);i.length===o.length?n.removeAttribute(q):n.getAttribute(q)!==a.join(",")&&n.setAttribute(q,a.join(","))}},ue=function(e,t){var n=document.head||document.querySelector(O.HEAD),r=n.querySelectorAll(e+"["+"data-react-helmet]"),i=Array.prototype.slice.call(r),o=[],a=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===P)n.innerHTML=t.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute(q,"true"),i.some((function(e,t){return a=t,n.isEqualNode(e)}))?i.splice(a,1):o.push(n)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),o.forEach((function(e){return n.appendChild(e)})),{oldTags:i,newTags:o}},fe=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[Z[n]||n]=e[n],t}),t)},pe=function(e,t,n){switch(e){case O.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[q]=!0,i=de(n,r),[b().createElement(O.TITLE,i,e)];var e,n,r,i},toString:function(){return function(e,t,n,r){var i=fe(n),o=ce(t);return i?"<"+e+' data-react-helmet="true" '+i+">"+V(o,r)+"</"+e+">":"<"+e+' data-react-helmet="true">'+V(o,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case g:case m:return{toComponent:function(){return de(t)},toString:function(){return fe(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,i=((r={key:n})[q]=!0,r);return Object.keys(t).forEach((function(e){var n=Z[e]||e;if(n===P||n===w){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]})),b().createElement(e,i)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!(e===P||e===w)})).reduce((function(e,t){var i=void 0===r[t]?t:t+'="'+V(r[t],n)+'"';return e?e+" "+i:i}),""),o=r.innerHTML||r.cssText||"",a=-1===_.indexOf(e);return t+"<"+e+' data-react-helmet="true" '+i+(a?"/>":">"+o+"</"+e+">")}),"")}(e,t,n)}}}},be=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,o=e.linkTags,a=e.metaTags,c=e.noscriptTags,l=e.scriptTags,s=e.styleTags,u=e.title,f=void 0===u?"":u,d=e.titleAttributes;return{base:pe(O.BASE,t,r),bodyAttributes:pe(g,n,r),htmlAttributes:pe(m,i,r),link:pe(O.LINK,o,r),meta:pe(O.META,a,r),noscript:pe(O.NOSCRIPT,c,r),script:pe(O.SCRIPT,l,r),style:pe(O.STYLE,s,r),title:pe(O.TITLE,{title:f,titleAttributes:d},r)}},ye=u()((function(e){return{baseTag:J([x,D],e),bodyAttributes:$(g,e),defer:X(e,N),encode:X(e,L),htmlAttributes:$(m,e),linkTags:Q(O.LINK,[C,x],e),metaTags:Q(O.META,[T,j,E,S,k],e),noscriptTags:Q(O.NOSCRIPT,[P],e),onChangeClientState:K(e),scriptTags:Q(O.SCRIPT,[A,P],e),styleTags:Q(O.STYLE,[w],e),title:G(e),titleAttributes:$(v,e)}}),(function(e){oe&&re(oe),e.defer?oe=ne((function(){ae(e,(function(){oe=null}))})):(ae(e),oe=null)}),be)((function(){return null})),he=(i=ye,a=o=function(e){function t(){return U(this,t),z(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case O.SCRIPT:case O.NOSCRIPT:return{innerHTML:t};case O.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,i=e.newChildProps,o=e.nestedChildren;return H({},r,((t={})[n.type]=[].concat(r[n.type]||[],[H({},i,this.mapNestedChildrenToProps(n,o))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,o=e.newChildProps,a=e.nestedChildren;switch(r.type){case O.TITLE:return H({},i,((t={})[r.type]=a,t.titleAttributes=H({},o),t));case O.BODY:return H({},i,{bodyAttributes:H({},o)});case O.HTML:return H({},i,{htmlAttributes:H({},o)})}return H({},i,((n={})[r.type]=H({},o),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=H({},t);return Object.keys(e).forEach((function(t){var r;n=H({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return b().Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,o=i.children,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[F[n]||n]=e[n],t}),t)}(Y(i,["children"]));switch(n.warnOnInvalidChildren(e,o),e.type){case O.LINK:case O.META:case O.NOSCRIPT:case O.SCRIPT:case O.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:o})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=Y(e,["children"]),r=H({},n);return t&&(r=this.mapChildrenToProps(t,r)),b().createElement(i,r)},W(t,null,[{key:"canUseDOM",set:function(e){i.canUseDOM=e}}]),t}(b().Component),o.propTypes={base:l().object,bodyAttributes:l().object,children:l().oneOfType([l().arrayOf(l().node),l().node]),defaultTitle:l().string,defer:l().bool,encodeSpecialCharacters:l().bool,htmlAttributes:l().object,link:l().arrayOf(l().object),meta:l().arrayOf(l().object),noscript:l().arrayOf(l().object),onChangeClientState:l().func,script:l().arrayOf(l().object),style:l().arrayOf(l().object),title:l().string,titleAttributes:l().object,titleTemplate:l().string},o.defaultProps={defer:!0,encodeSpecialCharacters:!0},o.peek=i.peek,o.rewind=function(){var e=i.rewind();return e||(e=be({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);he.renderStatic=he.rewind},17579:(e,t,n)=>{"use strict";var r=n(80070);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},89324:(e,t,n)=>{e.exports=n(17579)()},80070:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},83524:(e,t,n)=>{"use strict";var r,i=n(1024),o=(r=i)&&"object"==typeof r&&"default"in r?r.default:r;function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var l,s=[];function u(){l=e(s.map((function(e){return e.props}))),f.canUseDOM?t(l):n&&(l=n(l))}var f=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return l},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=l;return l=void 0,s=[],e};var a=i.prototype;return a.UNSAFE_componentWillMount=function(){s.push(this),u()},a.componentDidUpdate=function(){u()},a.componentWillUnmount=function(){var e=s.indexOf(this);s.splice(e,1),u()},a.render=function(){return o.createElement(r,this.props)},i}(i.PureComponent);return a(f,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),a(f,"canUseDOM",c),f}}},14149:(e,t,n)=>{"use strict";function r(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}n.r(t),n.d(t,{default:()=>o});const o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],o=t&&t.split("/")||[],a=e&&r(e),c=t&&r(t),l=a||c;if(e&&r(e)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var s=void 0;if(o.length){var u=o[o.length-1];s="."===u||".."===u||""===u}else s=!1;for(var f=0,d=o.length;d>=0;d--){var p=o[d];"."===p?i(o,d):".."===p?(i(o,d),f++):f&&(i(o,d),f--)}if(!l)for(;f--;f)o.unshift("..");!l||""===o[0]||o[0]&&r(o[0])||o.unshift("");var b=o.join("/");return s&&"/"!==b.substr(-1)&&(b+="/"),b}},54545:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const i=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));var i=void 0===t?"undefined":r(t);if(i!==(void 0===n?"undefined":r(n)))return!1;if("object"===i){var o=t.valueOf(),a=n.valueOf();if(o!==t||a!==n)return e(o,a);var c=Object.keys(t),l=Object.keys(n);return c.length===l.length&&c.every((function(r){return e(t[r],n[r])}))}return!1}},30670:e=>{"use strict";e.exports=function(){}}}]);