tocco-legacy-bundle 3.8.2 → 3.8.4

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_=self.webpackChunktocco_||[]).push([[44],{13025:(e,t,n)=>{n.d(t,{Z:()=>o,l:()=>i});var r=n(45697),o={SINGLE:"single",MULTI:"multi",MULTI_EXPLICIT:"multi_explicit",NONE:"none"},i=n.n(r)().oneOf(Object.keys(o).map((function(e){return o[e]})))},10129:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4942),o=n(44925),i=n(65035),c=n(85893),a=["icon","label","onClick"];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 u=function(e){var t=e.icon,n=e.label,u=e.onClick,l=(0,o.Z)(e,a);return(0,c.jsx)(i.Z,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){(0,r.Z)(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}({icon:t||"arrow-left",label:n,onClick:u,"data-cy":"btn-back"},l))}},40493:(e,t,n)=>{n.d(t,{q:()=>i});var r,o=n(30168),i=n(67165).ZP.span.withConfig({displayName:"StyledFontAwesomeAdapterWrapper"})(r||(r=(0,o.Z)([""])))},46200:(e,t,n)=>{n.d(t,{a:()=>c});var r=n(45697),o=n.n(r),i=n(71392),c=o().oneOf(Object.keys(i.P).map((function(e){return i.P[e]})))},71392:(e,t,n)=>{n.d(t,{P:()=>r});var r={INLINE:"inline",NONE:"none"}},78125:(e,t,n)=>{n.d(t,{ZP:()=>xr});var r=n(4942),o=n(45697),i=n.n(o),c=n(54563),a=n(38378),s=n(9538),u=n(37695),l=n(97722),p=n(1825),d=n(44845),f=n(81749),y=n(13025),h=n(46200),m=n(44362),b=n(21276),v=n(1024),g=n.n(v),O=n(1317),j=n(74806),P=n(50558),w="docs/create/OPEN_DIALOG",x="docs/create/FILES_SELECTED",Z="docs/path/LOAD_BREADCRUMBS",S="docs/path/SET_BREADCRUMBS",E="docs/path/SET_SEARCH_MODE",D=function(e){return{type:S,payload:{breadcrumbs:e}}},k=n(20247),C=n(93324),F=n(31876),A=/^\/docs\/?$/;const N=function(e){return A.test(e)};var I,T,R=n(67165),L=n(89062),_=n(64593),B=n(84349),M=n(30168),z=n(96559),V=n(30759),W=n(88601),U=(0,R.iv)(I||(I=(0,M.Z)(["\n ","\n color: ",";\n\n * {\n color: ",";\n text-decoration: ",";\n }\n\n &:hover,\n &:hover *,\n &:focus,\n &:focus * {\n text-decoration: ",";\n }\n\n &:active,\n &:active * {\n text-decoration: ",";\n }\n"])),(0,V.Z)(),W.Z.color("text"),W.Z.color("text"),(function(e){return e.neutral?"none":"underline"}),(function(e){return e.neutral?"none":"underline"}),(function(e){return e.neutral?"none":"underline"}));const H=(0,R.ZP)(z.rU).withConfig({shouldForwardProp:function(e,t){return!["neutral"].includes(e)&&t(e)}})(T||(T=(0,M.Z)(["\n ","\n"])),U);var $=n(70310),q=n(88162),Y=n(85893),K={error:"exclamation-circle",home:"house-blank"},G=function(e){return K[e]||e};const X=function(e){var t=e.type;return t&&"record"!==t?(0,Y.jsx)(q.Z,{icon:G(t)}):null};var Q,J,ee,te,ne,re,oe=n(44925),ie=n(40493),ce=n(69829),ae=n(7281),se=["component"],ue=R.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(Q||(Q=(0,M.Z)(["\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||W.Z.color("backgroundBreadcrumbs")(e)}),ae.Z.space(-.7),ae.Z.space(.39)),le=(0,R.ZP)((function(e){var t=e.component,n=(0,oe.Z)(e,se);return g().cloneElement(t,n)})).withConfig({displayName:"StyledBreadcrumbsLink"})(J||(J=(0,M.Z)(["\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"])),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.color("secondaryLight"),W.Z.color("primary")),pe=R.ZP.span.withConfig({displayName:"StyledBreadcrumbsTitle"})(ee||(ee=(0,M.Z)(["\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"])),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.color("primary")),de=(0,R.ZP)(ce.Fe).withConfig({displayName:"StyledBreadcrumbSeparator"})(te||(te=(0,M.Z)(["\n margin-left: ",";\n margin-right: ",";\n"])),ae.Z.space(-2),ae.Z.space(-2)),fe=R.ZP.span.withConfig({displayName:"StyledBreadcrumbWrapper"})(ne||(ne=(0,M.Z)(["\n "," {\n margin-right: ",";\n }\n"])),ie.q,ae.Z.space(-1));const ye=function(){return re||(re=(0,Y.jsx)(de,{breakWords:!0,children:(0,Y.jsx)(q.Z,{icon:"chevron-right"})}))};var he;function me(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?me(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ve=function(e){return e.title||e.display},ge=function(e,t){if(!e||0===e.length)return"Tocco";var n=e.at(-1),r="";switch(n.type){case"create":r="".concat(ve(n)," - ").concat(t);break;case"detail":r=e.slice(e.length-2).map(ve).join(" - ");break;default:r=ve(n)}return r},Oe=function(e){var t,n=e.intl,r=e.pathPrefix,o=e.breadcrumbsInfo,i=void 0===o?[]:o,c=e.currentView,a=e.backgroundColor,s=e.onClick,u=e.linkComp,l=[].concat((0,L.Z)(i),(0,L.Z)(c?[c]:[]));if(0===l.length)return null;var p,d=l.map((function(e,n){var o,i=e.display||"",c=n===l.length-1?pe:le,a=n===l.length-1&&{active:"true"},p=void 0!==e.path?{to:"".concat(r,"/").concat(e.path)}:{},d=u?t||(t=(0,Y.jsx)(u,{})):he||(he=(0,Y.jsx)(H,{}));return(0,Y.jsx)($.ZP.Span,{children:(0,Y.jsx)(fe,{children:(0,Y.jsxs)(c,be(be(be({neutral:!0},a),p),{},{onClick:(o=e,function(){s&&!1!==o.clickable&&s(o)}),component:d,children:[(0,Y.jsx)(X,{type:e.type}),(0,Y.jsx)("span",{"data-cy":"breadcrumb-item",dangerouslySetInnerHTML:{__html:B.Z.sanitizeHtml(i)}})]}))})},"breadcrumbItem-".concat(n))})).reduce((function(e,t,n){return[e,(0,Y.jsx)(ye,{},"icon".concat(n)),t]}));return(0,Y.jsxs)(ue,{backgroundColor:a,children:[(0,Y.jsx)(_.q,{defer:!1,children:(0,Y.jsx)("title",{children:ge(l,(p="client.component.breadcrumbs.createTitle",n.formatMessage({id:p})))})}),(0,Y.jsx)(Y.Fragment,{children:d})]})};Oe.defaultProps={pathPrefix:""};const je=Oe,Pe=(0,j.ZP)(je);function we(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ze=(0,R.Zz)((function(e){var t=e.embedded,n=e.resetSearchMode,r=e.theme,o=e.pathPrefix,i=e.breadcrumbsInfo;return(0,Y.jsx)(Pe,xe(xe({},t?{backgroundColor:W.Z.color("paper")({theme:r})}:{}),{},{onClick:function(e){""===e.path&&n()},pathPrefix:o,breadcrumbsInfo:i}))}));function Se(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var De=function(e){return(0,Y.jsx)("span",Ee({},e))};const ke=(0,R.Zz)((function(e){var t=e.embedded,n=e.navigate,r=e.resetSearchMode,o=e.theme,i=e.pathPrefix,c=e.breadcrumbsInfo;return(0,Y.jsx)(Pe,Ee(Ee({},t?{backgroundColor:W.Z.color("paper")({theme:o})}:{}),{},{onClick:function(e){""===e.path&&r(),n("/docs/".concat(e.path))},linkComp:De,pathPrefix:i,breadcrumbsInfo:c}))}));var Ce={},Fe=function(e){return{pathPrefix:"/docs",breadcrumbsInfo:e.docs.path.breadcrumbs,embedded:e.input.embedded}},Ae=(0,P.connect)(Fe,Ce)((0,j.ZP)(Ze)),Ne=(0,P.connect)(Fe,Ce)((0,j.ZP)(ke));const Ie=(0,k.U)({routerless:Ne,router:Ae});var Te="docs/list/CHANGE_LIST_PARENT",Re="docs/list/CHANGE_SELECTION",Le="docs/list/CHANGE_SEARCH_FORM_COLLAPSED",_e=n(35728),Be={"dms-create-folder":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,36340))})),"dms-create-domain":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,67210))})),"dms-edit":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,37485))})),"dms-move":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,4505))})),delete:(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,96954))}))};const Me=s.Z.actionFactory(Be);var ze=n(6770);function Ve(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 We=function(e){var t=e.instanceCount,n=e.directory,o=e.onChange,i=e.path,c=(0,v.useRef)(),a=ze.Z.usePrevious(t);(0,v.useEffect)((function(){c.current&&t>a&&c.current.click()}));return(0,Y.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"file",ref:c,style:{display:"none"},onChange:function(e){var t=e.target.files;t&&t.length>0&&o&&o(i,t,n),e.target.value=null},multiple:!0},n?{webkitdirectory:"true",directory:"true"}:{}))};var Ue={onChange:function(e,t,n){return{type:x,payload:{location:e,files:t,isDirectory:n}}}};const He=(0,k.U)((0,P.connect)((function(e){return{instanceCount:e.docs.create.dialog.instanceCount,directory:e.docs.create.dialog.directory}}),Ue)(We));var $e,qe,Ye,Ke,Ge,Xe,Qe=R.ZP.div.withConfig({displayName:"StyledContentWrapper"})($e||($e=(0,M.Z)(["\n display: flex;\n align-items: center;\n"]))),Je=R.ZP.span.withConfig({displayName:"StyledIconWrapper"})(qe||(qe=(0,M.Z)(["\n font-size: ",";\n display: inline-block;\n margin-right: ",";\n"])),ae.Z.font(1),ae.Z.space(-2)),et=R.ZP.span.withConfig({displayName:"StyledLabelWrapper"})(Ye||(Ye=(0,M.Z)(["\n overflow: hidden;\n\n && span {\n display: flex;\n ","\n ","\n }\n"])),(function(e){var t=e.publishStatus,n=e.theme;return"offline"===t&&(0,R.iv)(Ke||(Ke=(0,M.Z)(["\n color: ",";\n font-style: italic;\n padding-right: ",";\n "])),n.colors.textLighter,ae.Z.space(-2))}),(function(e){var t=e.publishStatus,n=e.theme;return"changed"===t&&"\n color: ".concat(n.colors.secondaryLighter,";\n font-weight: ").concat(n.fontWeights.bold,";\n ")})),tt=g().lazy((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(226)]).then(n.bind(n,77840))}));const nt=function(e){var t=e.domainTypes,n=e.rootNodes,r=e.navigationStrategy,o=e.changeListParent,i=e.onSearchChange,c=e.emitAction,a=e.openFileDialog,s=e.limit,u=e.searchFormType,l=e.selectionStyle,p=e.selection,d=e.selectionFilterFn,f=e.getCustomLocation,y=e.disableViewPersistor,h=e.getListFormName,m=e.domainDetailFormName,b=e.folderDetailFormName,g=e.showActions,O=e.scrollBehaviour,j=e.sortable,P=e.searchMode,w=e.openResource,x=e.searchFormCollapsed,Z=e.locale,S=e.changeSelection,E=e.changeSearchFormCollapsed,D=e.params,k=e.navigate,A=e.path,I=(0,v.useReducer)((function(e){return e+1}),0),T=(0,C.Z)(I,2),R=T[0],L=T[1],_="entity-list-".concat(R),B=(0,v.useState)([]),M=(0,C.Z)(B,2),z=M[0],V=M[1],W=p||z,U=(0,v.useMemo)((function(){return function(e){if(e&&e.model){var t=e.model.charAt(0).toUpperCase()+e.model.slice(1),n=e.key;return{model:"Docs_list_item",key:"".concat(t,"/").concat(n)}}return null}(D)}),[D]),H=!U&&n?n.map((function(e){return"".concat(e.entityName,"/").concat(e.key)})):null,$=(0,v.useMemo)((function(){return h?h(U,H):function(e,t){return e?"Docs_list_item":t?"Root_docs_list_item_specific":"Root_docs_list_item"}(U,H)}),[U,H,h]),K=(0,v.useRef)(!1),G=(0,v.useRef)(P),X=(0,v.useRef)(A);G.current=P,X.current=A,(0,v.useEffect)((function(){return K.current=!0,function(){return K.current=!1}})),(0,v.useEffect)((function(){o(U),V([])}),[U,o]);var Q=function(e){V(e),S(e)},J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!F.Z.viewInfoSelector("search").store){var t=F.Z.viewInfoSelector(_).store;F.Z.persistViewInfo("search",{store:t})}e?setTimeout((function(){L()}),0):L()},ee=U||H?null:function(e){if(Array.isArray(e)&&e.length>0){var t=e.map((function(e){return'"'.concat(e,'"')})).join(",");return"exists(relDomain_type where IN(unique_id, ".concat(t,"))")}return null}(t),te=function(){if(!y)return N(A)?F.Z.viewInfoSelector("search").store:null}();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(v.Suspense,{fallback:Ge||(Ge=(0,Y.jsx)(_e.Z,{})),children:(0,Y.jsx)(tt,{id:"documents",entityName:"Docs_list_item",formName:$,searchListFormName:"Search_docs_list_item",limit:s||25,onRowClick:function(e){var t=e.id;P&&N(A)&&J();var n=t.split("/"),r=(0,C.Z)(n,2),o=r[0],i=r[1],c=f?f(o,i):function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return"/docs/doc/".concat(t,"/detail");default:throw new Error("Unexpected model: ".concat(e))}}(o,i);c?w&&"Resource"===o?w(c):k(c):Q([t])},searchFormPosition:"left",searchFormType:u||"admin",parent:U,onSearchChange:function(e){K.current&&(e.query&&e.query.hasUserChanges&&J(!0),i(e))},store:te,onStoreCreate:function(e){y||F.Z.persistViewInfo(_,{store:e})},cellRenderers:{"dms-label-with-icon":function(e,t,n){return(0,Y.jsxs)(Qe,{children:[(0,Y.jsx)(Je,{children:(0,Y.jsx)(q.Z,{icon:e.icon})}),(0,Y.jsx)(et,{publishStatus:e.publish_status,children:n(t.children[0])})]})},"dms-actions":function(e,t,n){return(0,Y.jsx)(Qe,{children:t.children.filter((function(t){return!t.dmsEntityModel||t.dmsEntityModel===e.type})).map((function(e){return n(e)}))})}},emitAction:c,actionAppComponent:Me,contextParams:{detailFormNames:{Domain:m,Folder:b}},customActions:{"upload-document":function(e,t,n,r,o,i,c){a(!1,i,c)},"upload-directory":function(e,t,n,r,o,i,c){a(!0,i,c)}},navigationStrategy:r,tql:ee,keys:H,selectionStyle:l||"multi_explicit",onSelectChange:Q,selection:W,selectionFilterFn:d,showActions:g,sortable:j,searchFormCollapsed:x,scrollBehaviour:O,onSearchFormCollapsedChange:E,locale:Z},_)}),Xe||(Xe=(0,Y.jsx)(He,{}))]})};var rt={changeListParent:function(e){return{type:Te,payload:{parent:e}}},changeSelection:function(e){return{type:Re,payload:{selection:e}}},changeSearchFormCollapsed:function(e){return{type:Le,payload:{collapsed:e}}}};const ot=(0,k.U)((0,P.connect)((function(e){return{domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,limit:e.input.listLimit,searchFormType:e.input.searchFormType,selectionStyle:e.input.selectionStyle,selectionFilterFn:e.input.selectionFilterFn,getCustomLocation:e.input.getCustomLocation,disableViewPersistor:e.input.disableViewPersistor,getListFormName:e.input.getListFormName,domainDetailFormName:e.input.domainDetailFormName,folderDetailFormName:e.input.folderDetailFormName,showActions:e.input.showActions,sortable:e.input.sortable,openResource:e.input.openResource,searchFormCollapsed:e.input.searchFormCollapsed,scrollBehaviour:e.input.scrollBehaviour,selection:e.input.selection,locale:e.intl.locale}}),rt)((0,j.ZP)(nt)));var it,ct,at=R.ZP.div.withConfig({displayName:"StyledDocumentViewWrapper"})(it||(it=(0,M.Z)(["\n height: 100%;\n background-color: ",";\n padding-left: ",";\n overflow-y: hidden;\n"])),W.Z.color("paper"),ae.Z.space(.5)),st=g().lazy((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(349)]).then(n.bind(n,82445))}));const ut=function(e){var t=e.breadcrumbs,n=e.formName,r=e.navigationStrategy,o=e.locale,i=e.emitAction,c=e.navigate,a=e.params;return(0,Y.jsx)(at,{children:(0,Y.jsx)(v.Suspense,{fallback:ct||(ct=(0,Y.jsx)(_e.Z,{})),children:(0,Y.jsx)(st,{entityName:"Resource",entityId:a.key,formName:n||"DmsResource",mode:"update",actionAppComponent:Me,navigationStrategy:r,emitAction:i,onEntityDeleted:function(){var e=t.slice().reverse().find((function(e){return"list"===e.type})),n="/docs/".concat(e.path);c(n)},locale:o})})})};var lt={emitAction:function(e){return c.Z.dispatchEmittedAction(e)}};const pt=(0,k.U)((0,P.connect)((function(e){return{breadcrumbs:e.docs.path.breadcrumbs,formName:e.input.documentDetailFormName,locale:e.intl.locale}}),lt)((0,j.ZP)(ut)));const dt=function(e){var t=e.params,n=e.navigationStrategy,r=e.handleSearchChange,o=e.emitAction,i=e.openFileDialog,c=e.searchMode,a=e.docsKey,s=t.model,u=t.view;return"doc"===s&&"detail"===u?(0,Y.jsx)(pt,{navigationStrategy:n}):(0,Y.jsx)(ot,{navigationStrategy:n,onSearchChange:r,emitAction:o,openFileDialog:i,searchMode:c},a)};var ft=n(56746);const yt=function(e){var t,n,r=e.navigationStrategy,o=e.handleSearchChange,i=e.emitAction,c=e.openFileDialog,a=e.searchMode,s=e.docsKey;return(0,Y.jsxs)(ft.rs,{children:[(0,Y.jsx)(ft.AW,{exact:!0,path:"/docs/doc/:key/detail",render:function(){return t||(t=(0,Y.jsx)(pt,{navigationStrategy:r}))}}),(0,Y.jsx)(ft.AW,{exact:!0,path:["/docs/:model/:key/list","/docs"],render:function(){return n||(n=(0,Y.jsx)(ot,{navigationStrategy:r,onSearchChange:o,emitAction:i,openFileDialog:c,searchMode:a},s))}})]})},ht=(0,k.U)({routerless:dt,router:yt});var mt,bt,vt,gt=R.ZP.div.withConfig({displayName:"StyledWrapper"})(mt||(mt=(0,M.Z)(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n ","\n width: 100%;\n"])),(function(e){return"inline"===e.scrollBehaviour&&"height: 100%;"})),Ot=R.ZP.div.withConfig({displayName:"StyledContent"})(bt||(bt=(0,M.Z)(["\n grid-area: content;\n ","\n"])),(function(e){return"inline"===e.scrollBehaviour&&"overflow-x: hidden;"})),jt=R.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(vt||(vt=(0,M.Z)(["\n grid-area: breadcrumbs;\n ","\n"])),(function(e){return e.noLeftPadding&&"\n > div {\n padding-left: 0;\n }\n "}));const Pt=function(e){var t=e.navigate,n=e.path,r=e.searchMode,o=e.navigationStrategy,i=e.setSearchMode,c=e.loadBreadcrumbs,a=e.emitAction,s=e.openFileDialog,l=e.noLeftPadding,p=e.scrollBehaviour,d=e.listenHistory,f=(0,v.useReducer)((function(e){return e+1}),0),y=(0,C.Z)(f,2),h=y[0],m=y[1],b=(0,v.useRef)(r);b.current=r,(0,v.useEffect)((function(){c(n)})),(0,v.useEffect)((function(){return d((function(e,t){N(n)&&r&&"POP"===t&&g()}))}));var g=function(){b.current&&(F.Z.clearPersistedViews(),i(!1),c(n),m())},O="docs-view-".concat(h);return(0,Y.jsxs)(gt,{scrollBehaviour:p,children:[(0,Y.jsx)(u.Z.ErrorBoundary,{children:(0,Y.jsx)(jt,{noLeftPadding:l,children:(0,Y.jsx)(Ie,{resetSearchMode:g})})}),(0,Y.jsx)(Ot,{scrollBehaviour:p,children:(0,Y.jsx)(ht,{navigationStrategy:o,handleSearchChange:function(e){e.query&&e.query.hasUserChanges?(i(!0),t("/docs/")):N(n)&&g()},emitAction:a,openFileDialog:s,searchMode:r,docsKey:O})})]})};var wt={loadBreadcrumbs:function(e){return{type:Z,payload:{location:e}}},setSearchMode:function(e){return{type:E,payload:{searchMode:e}}},emitAction:function(e){return c.Z.dispatchEmittedAction(e)},openFileDialog:function(e,t,n){return{type:w,payload:{directory:e,onSuccess:t,onError:n}}}};const xt=(0,k.U)((0,P.connect)((function(e){return{searchMode:e.docs.path.searchMode,navigationStrategy:e.input.navigationStrategy,noLeftPadding:e.input.noLeftPadding,scrollBehaviour:e.input.scrollBehaviour}}),wt)((0,j.ZP)(Pt)));var Zt,St;const Et=(0,O.w)((function(e){var t=e.handleNotifications,n=e.rootPath,r=e.navigate,o=e.path;return(0,v.useEffect)((function(){(!o||"/"===o||"/docs"===o)&&n!==o&&r(n)}),[n,o,r]),(0,Y.jsxs)(Y.Fragment,{children:[t&&(Zt||(Zt=(0,Y.jsx)(d.Z.Notifications,{}))),St||(St=(0,Y.jsx)(xt,{}))]})}));var Dt,kt;const Ct=function(e){var t=e.rootPath,n=e.handleNotifications;return(0,Y.jsxs)(Y.Fragment,{children:[n&&(Dt||(Dt=(0,Y.jsx)(d.Z.Notifications,{}))),kt||(kt=(0,Y.jsx)(xt,{})),(0,Y.jsx)(ft.AW,{exact:!0,path:"/",children:(0,Y.jsx)(ft.l_,{to:t})}),"/docs"!==t&&(0,Y.jsx)(ft.AW,{exact:!0,path:"/docs",children:(0,Y.jsx)(ft.l_,{to:t})})]})};var Ft,At;const Nt=function(e){var t=e.rootPath,n=e.handleNotifications,r=e.history;return(0,Y.jsxs)(ft.F0,{history:r,children:[n&&(Ft||(Ft=(0,Y.jsx)(d.Z.Notifications,{}))),At||(At=(0,Y.jsx)(xt,{})),(0,Y.jsx)(ft.AW,{exact:!0,path:"/",children:(0,Y.jsx)(ft.l_,{to:t})}),"/docs"!==t&&(0,Y.jsx)(ft.AW,{exact:!0,path:"/docs",children:(0,Y.jsx)(ft.l_,{to:t})})]})};var It=n(14890),Tt=n(64687),Rt=n.n(Tt),Lt=n(24970);function _t(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 Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mt=(0,r.Z)({},w,(function(e,t){var n=t.payload,r=n.directory,o=n.onSuccess,i=n.onError;return Bt(Bt({},e),{},{dialog:{instanceCount:e.dialog.instanceCount+1,directory:r,onSuccess:o,onError:i}})})),zt={dialog:{instanceCount:0,directory:!1,onSuccess:null,onError:null}};var Vt=n(72007),Wt=n(18704),Ut=n(72045),Ht=n(80722),$t=Rt().mark(en),qt=Rt().mark(tn);function Yt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gt=function(e){return e.docs.create.dialog},Xt=function(e,t){return e.intl.messages[t]},Qt=201;function Jt(e){var t=e.payload,n=t.location,r=t.files,o=t.isDirectory;return Rt().mark((function e(){var t,i,c,a,s,u,l,p;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.RE)(Ut.Z);case 2:return t=e.sent,i="client.docs-browser.uploadInProgress",o?i="client.docs-browser.uploadInProgressDirectory":r.length>1&&(i="client.docs-browser.uploadInProgressMultiple"),e.next=7,(0,Lt.gz)(d.Z.blockingInfo(t,i,null));case 7:return e.next=9,(0,Lt.Ys)(Gt);case 9:return c=e.sent,a=c.onSuccess,s=c.onError,e.prev=12,e.next=15,(0,Lt.RE)(en,n,r);case 15:if(403!==(u=e.sent).status){e.next=30;break}return e.next=19,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 19:return e.t0=s,e.next=22,(0,Lt.Ys)(Xt,"client.entity-detail.saveAbortedTitle");case 22:return e.t1=e.sent,e.next=25,(0,Lt.Ys)(Xt,"client.docs-browser.failedNoPermission");case 25:e.t2=e.sent,e.t3={title:e.t1,message:e.t2},(0,e.t0)(e.t3),e.next=55;break;case 30:if(413!==u.status){e.next=44;break}return e.next=33,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 33:return e.t4=s,e.next=36,(0,Lt.Ys)(Xt,"client.entity-detail.saveAbortedTitle");case 36:return e.t5=e.sent,e.next=39,(0,Lt.Ys)(Xt,"client.docs-browser.failedTooLarge");case 39:e.t6=e.sent,e.t7={title:e.t5,message:e.t6},(0,e.t4)(e.t7),e.next=55;break;case 44:return l=[{type:"entity-create-event",payload:{entities:u.body.items.filter((function(e){return e.status===Qt})).map((function(e){return{entityName:e.bean.model,key:e.bean.key}}))}}],e.next=47,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 47:return p=o?"client.docs-browser.uploadSuccessfulDirectory":"client.docs-browser.uploadSuccessful",e.t8=a,e.next=51,(0,Lt.Ys)(Xt,p);case 51:e.t9=e.sent,e.t10=l,e.t11={title:e.t9,remoteEvents:e.t10},(0,e.t8)(e.t11);case 55:e.next=68;break;case 57:return e.prev=57,e.t12=e.catch(12),Wt.Z.logError("Failed to upload files",e.t12),e.next=62,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 62:return e.t13=s,e.next=65,(0,Lt.Ys)(Xt,"client.docs-browser.uploadFailed");case 65:e.t14=e.sent,e.t15={title:e.t14},(0,e.t13)(e.t15);case 68:case"end":return e.stop()}}),e,null,[[12,57]])}))()}function en(e,t){var n,r,o,i,c,a,s;return Rt().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(n=(0,Ht.Z)(e)){u.next=3;break}return u.abrupt("return");case 3:r=new FormData,o=Yt(t);try{for(o.s();!(i=o.n()).done;)c=i.value,r.append("files[]",c)}catch(e){o.e(e)}finally{o.f()}return a="documents/".concat(n.model,"/").concat(n.key),s={method:"POST",body:r,acceptedStatusCodes:[403,413]},u.next=10,(0,Lt.RE)(Vt.Z.requestSaga,a,s);case 10:return u.abrupt("return",u.sent);case 11:case"end":return u.stop()}}),$t)}function tn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.ib)(x,Jt)]);case 2:case"end":return e.stop()}}),qt)}var nn=Rt().mark(rn);function rn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(tn)]);case 2:case"end":return e.stop()}}),nn)}const on=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zt,t=arguments.length>1?arguments[1]:void 0,n=Mt[t.type];return n?n(e,t):e};var cn=Rt().mark(ln);function an(e){var t=e.payload;return Rt().mark((function e(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.gz)(l.Z.fireExternalEvent("onListParentChange",t.parent));case 2:case"end":return e.stop()}}),e)}))()}function sn(e){var t=e.payload;return Rt().mark((function e(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.gz)(l.Z.fireExternalEvent("onSelectChange",t.selection));case 2:case"end":return e.stop()}}),e)}))()}function un(e){var t=e.payload;return Rt().mark((function e(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.gz)(l.Z.fireExternalEvent("onSearchFormCollapsedChange",t.collapsed));case 2:case"end":return e.stop()}}),e)}))()}function ln(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)(Te,an),(0,Lt.Fm)(Re,sn),(0,Lt.Fm)(Le,un)]);case 2:case"end":return e.stop()}}),cn)}var pn,dn=n(78907),fn=n(30081);function yn(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 hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mn=(pn={},(0,r.Z)(pn,fn.qh,(function(e,t){var n=t.payload,r=n.selection,o=n.onSuccess,i=n.onError;return hn(hn({},e),{},{input:{selection:r,onSuccess:o,onError:i}})})),(0,r.Z)(pn,fn.FV,dn.Z.singleTransferReducer("isWaiting")),(0,r.Z)(pn,fn.F$,(function(){return hn({},bn)})),pn),bn={isWaiting:!1,input:{selection:null,onSuccess:null,onError:null}};var vn=n(71120),gn=Rt().mark(xn),On=Rt().mark(Zn),jn=function(e){return e.docs.move.input},Pn=function(e,t){return e.intl.messages[t]};function wn(e){var t=e.payload;return Rt().mark((function e(){var n,r,o,i,c;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="documents/move",r={method:"POST",acceptedStatusCodes:[400,403],body:{targetEntityKey:t.target,selectedEntityKeys:t.selected}},e.next=4,(0,Lt.gz)(fn.p0(!0));case 4:return e.next=6,(0,Lt.RE)(Vt.Z.requestSaga,n,r);case 6:if(204!==(o=e.sent).status){e.next=12;break}return e.next=10,(0,Lt.RE)(xn);case 10:e.next=19;break;case 12:return e.next=14,(0,Lt.gz)(fn.p0(!1));case 14:return c="client.actions.dms-move.failed.message","VALIDATION_FAILED"===(null===(i=o.body)||void 0===i?void 0:i.errorCode)&&(c=vn.Z.getErrorCompact(o.body.errors)),403===o.status&&(c="client.docs-browser.failedNoPermission"),e.next=19,(0,Lt.gz)(d.Z.toaster({type:"error",title:"client.actions.dms-move.failed.title",body:c}));case 19:case"end":return e.stop()}}),e)}))()}function xn(){var e,t,n,r;return Rt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Lt.Ys)(jn);case 2:return e=o.sent,t=e.selection,n=e.onSuccess,r=[{type:"entity-update-event",payload:{entities:t.ids.map((function(e){return{entityName:"Docs_list_item",key:e}}))}}],o.t0=n,o.next=9,(0,Lt.Ys)(Pn,"client.docs-browser.moveSuccessful");case 9:return o.t1=o.sent,o.t2=r,o.t3={title:o.t1,remoteEvents:o.t2},(0,o.t0)(o.t3),o.next=15,(0,Lt.gz)(fn.xv());case 15:case"end":return o.stop()}}),gn)}function Zn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)(fn.uI,wn)]);case 2:case"end":return e.stop()}}),On)}var Sn=Rt().mark(En);function En(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(Zn)]);case 2:case"end":return e.stop()}}),Sn)}const Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bn,t=arguments.length>1?arguments[1]:void 0,n=mn[t.type];return n?n(e,t):e};var kn,Cn=(kn={},(0,r.Z)(kn,S,dn.Z.singleTransferReducer("breadcrumbs")),(0,r.Z)(kn,E,dn.Z.singleTransferReducer("searchMode")),kn),Fn={breadcrumbs:[],searchMode:!1};var An=Rt().mark(_n),Nn=Rt().mark(Mn),In=Rt().mark(zn),Tn=function(e,t){return e.intl.messages[t]||t},Rn=function(e){return e.docs.path},Ln=function(e){return e.input.rootNodes};function _n(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.Ys)(Tn,"client.docs-browser.breadcrumbs.start");case 2:return e.t0=e.sent,e.t1={display:e.t0,path:"",type:"list"},e.next=6,(0,Lt.Ys)(Tn,"client.docs-browser.breadcrumbs.searchResults");case 6:return e.t2=e.sent,e.t3={display:e.t2,path:"",type:"search",clickable:!1},e.abrupt("return",[e.t1,e.t3]);case 9:case"end":return e.stop()}}),An)}function Bn(e){var t=e.payload.location;return Rt().mark((function e(){var n,r,o,i,c;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,Ht.Z)(t),e.next=3,(0,Lt.Ys)(Rn);case 3:if(!e.sent.searchMode||n){e.next=10;break}return e.next=7,(0,Lt.RE)(_n);case 7:r=e.sent,e.next=20;break;case 10:return o=n?"documents/".concat(n.model,"/").concat(n.key,"/breadcrumbs"):"documents/breadcrumbs",e.next=13,(0,Lt.RE)(Mn);case 13:return e.t0=e.sent,e.t1={rootnodes:e.t0},i={queryParams:e.t1},e.next=18,(0,Lt.RE)(Vt.Z.requestSaga,o,i);case 18:c=e.sent,r=c.body.breadcrumbs;case 20:return e.next=22,(0,Lt.gz)(D(r));case 22:case"end":return e.stop()}}),e)}))()}function Mn(){var e;return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Lt.Ys)(Ln);case 2:return e=t.sent,t.abrupt("return",Array.isArray(e)&&e.length>0?e.map((function(e){return"".concat(e.entityName,"/").concat(e.key)})).join(","):null);case 4:case"end":return t.stop()}}),Nn)}function zn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)(Z,Bn)]);case 2:case"end":return e.stop()}}),In)}var Vn=Rt().mark(Wn);function Wn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(zn)]);case 2:case"end":return e.stop()}}),Vn)}const Un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fn,t=arguments.length>1?arguments[1]:void 0,n=Cn[t.type];return n?n(e,t):e};var Hn,$n=n(40602),qn=(Hn={},(0,r.Z)(Hn,$n.RK,dn.Z.singleTransferReducer("path")),(0,r.Z)(Hn,$n.Sb,dn.Z.singleTransferReducer("params")),Hn),Yn={path:"",params:{}};var Kn=n(90655);function Gn(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?Gn(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qn=n(84086);function Jn(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 er(e){return function(t){var n=(0,v.useState)(null),o=(0,C.Z)(n,2),i=o[0],c=o[1],a=(0,v.useRef)(!0);return(0,v.useEffect)((function(){return e().then((function(e){return a.current?c((function(){return e})):null})),function(){a.current=!1}}),[]),null!==i?(0,Y.jsx)(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t)):null}}function tr(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 nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rr={},or=function(e){return function(t){if(e.component)return(0,Y.jsx)(e.component,{router:t,routes:e.routes});if(e.render){var n={router:t,routes:e.routes};return e.render(n)}}};const ir=function(e){return(0,Y.jsx)(ft.AW,{path:e.path,exact:e.exact,render:or(e)})};function cr(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 ar=function(e){var t=e.history,n=e.routes;return(0,Y.jsx)(ft.F0,{history:t,children:(0,Y.jsx)(g().Fragment,{children:n.map((function(e,t){return(0,Y.jsx)(ir,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),t)}))})})},sr={loadRoute:function(e,t,n,r){return function(o){if(r&&rr[r]){var i=rr[r];return(0,Y.jsx)(i,nr({},o))}var c=er((function(){return new Promise((function(r){n().then((function(n){var o=n.default;o.reducers&&dn.Z.injectReducers(e,o.reducers),o.sagas&&o.sagas.forEach((function(t){Qn.Z.injectSaga(e,t)})),o.inputDispatches&&o.inputDispatches.forEach((function(n){!function(e,t,n){var r=n.key,o=n.actionCreator,i=n.mandatory,c=void 0!==i&&i,a=n.defaultValue,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Wt.Z.logError;if(Object.prototype.hasOwnProperty.call(t,r)||a){var u=o(t[r]||a);e.dispatch(u)}else!0===c&&s("EntityBrowser: Mandatory field '".concat(r,"' not set in input"))}(e,t,n)})),r(o.container)}))}))}));return r&&(rr[r]=c),(0,Y.jsx)(c,nr({},o))}},Router:ar,RouteWithSubRoutes:ir,extractParamsFromPath:function(e,t){var n=[],o=(0,Kn.Bo)(e,n).exec(t);return null!==o?n.reduce((function(e,t,n){return Xn(Xn({},e),{},(0,r.Z)({},t.name,o[n+1]))}),{}):null}};var ur=Rt().mark(dr),lr="/docs/:model/:key/:view(list|detail)";function pr(e){var t=e.payload.path;return Rt().mark((function e(){var n;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=sr.extractParamsFromPath(lr,t)||{},e.next=3,(0,Lt.gz)($n.PX(n));case 3:case"end":return e.stop()}}),e)}))()}function dr(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)($n.RK,pr)]);case 2:case"end":return e.stop()}}),ur)}var fr=Rt().mark(yr);function yr(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(dr)]);case 2:case"end":return e.stop()}}),fr)}const hr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yn,t=arguments.length>1?arguments[1]:void 0,n=qn[t.type];return n?n(e,t):e},mr={docs:(0,It.UY)({path:Un,create:on,move:Dn,routing:hr})};var br=[Wn,rn,ln,En,yr];function vr(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 gr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Or="docs-browser",jr=["onListParentChange","openResource","onSelectChange","onSearchFormCollapsedChange"],Pr=function(e,t,n,r){var o=a.Z.createStore(mr,br,gr(gr({},{scrollBehaviour:"inline"}),t),Or);b.Z.setInputEnvs(t),l.Z.addToStore(o,(function(e){return a.Z.getEvents(jr,e.input)})),c.Z.addToStore(o),s.Z.dynamicActionsAddToStore(o),u.Z.addToStore(o,!0,["console","remote","notification"]);var i=!n.emitAction;d.Z.addToStore(o,i);var f=Array.isArray(t.rootNodes)&&1===t.rootNodes.length&&"Resource"!==t.rootNodes[0].entityName?t.rootNodes[0]:null,y=f?"/docs/".concat(f.entityName.toLowerCase(),"/").concat(f.key,"/list"):"/docs",h=function(e){var t=e.routerType,n=e.store,r=e.rootPath,o=e.handleNotifications;if("routerless"===t)return(0,Y.jsx)(Et,{rootPath:r,handleNotifications:o});if("inherit"===t)return(0,Y.jsx)(Ct,{rootPath:r,handleNotifications:o});var i=p.Z.createHistory(n);return(0,Y.jsx)(Nt,{history:i,rootPath:r,handleNotifications:o})}({routerType:t.routerType,store:o,rootPath:y,handleNotifications:i});return a.Z.createApp(Or,h,o,{input:t,events:n,actions:[(0,$n.c4)(t.initialLocation)],publicPath:r,textResourceModules:["component","common","actions","entity-list","entity-detail",Or]})},wr=function(e){var t=a.Z.useApp({initApp:Pr,props:e,packageName:Or,externalEvents:jr}).component;return(0,Y.jsx)(Y.Fragment,{children:t})};wr.propTypes=gr({routerType:i().oneOf(["standalone","inherit","routerless"]),navigationStrategy:i().object,domainTypes:i().arrayOf(i().string),rootNodes:i().arrayOf(i().shape({entityName:i().string,key:i().string})),initialLocation:i().string,listLimit:i().oneOfType([i().number,i().string]),documentDetailFormName:i().string,searchFormType:f.b,selectionStyle:y.l,selectionFilterFn:i().func,selection:i().arrayOf(i().string),scrollBehaviour:h.a,getListFormName:i().func,disableViewPersistor:i().bool,getCustomLocation:i().func,businessUnit:i().string,searchFormCollapsed:i().bool,backendUrl:i().string,appContext:m.Z.propTypes},jr.reduce((function(e,t){return e[t]=i().func,e}),{}));const xr=wr;a.Z.createBundleableApp(Or,Pr,wr)},30081:(e,t,n)=>{n.d(t,{F$:()=>c,FV:()=>i,j2:()=>a,p0:()=>u,qh:()=>r,uI:()=>o,w6:()=>s,xv:()=>l});var r="docs/move/INITIALIZE",o="docs/move/MOVE_ELEMENTS",i="docs/move/SET_WAITING",c="docs/move/CLOSE",a=function(e,t,n){return{type:r,payload:{selection:e,onSuccess:t,onError:n}}},s=function(e,t){return{type:o,payload:{target:e,selected:t}}},u=function(){return{type:i,payload:{isWaiting:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}},l=function(){return{type:c}}},40602:(e,t,n)=>{n.d(t,{PX:()=>c,RK:()=>r,Sb:()=>o,c4:()=>i});var r="docs/routing/NAVIGATE",o="docs/routing/SET_PARAMS",i=function(e){return{type:r,payload:{path:e||""}}},c=function(e){return{type:o,payload:{params:e}}}},80722:(e,t,n)=>{n.d(t,{Z:()=>i});var r=/^\/docs\/doc\/(\d+)\/detail$/,o=/^\/docs\/(domain|folder)\/(\d+)\/list$/;const i=function(e){return function(e){var t=r.exec(e);return t&&t.length>=2?{model:"Resource",key:t[1]}:null}(e)||function(e){var t=o.exec(e);return t&&t.length>=3?{model:t[1].charAt(0).toUpperCase()+t[1].slice(1),key:t[2]}:null}(e)}},1317:(e,t,n)=>{n.d(t,{C:()=>f,w:()=>d});var r=n(4942),o=n(50558),i=n(56746),c=n(40602),a=n(85893);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}function u(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){(0,r.Z)(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}var l=function(){return function(){}},p={navigate:c.c4},d=(0,o.connect)((function(e){return{path:e.docs.routing.path,params:e.docs.routing.params,listenHistory:l}}),p),f=function(e){return function(t){var n=(0,i.TH)(),r=(0,i.k6)(),o=(0,i.UO)();return(0,a.jsx)(e,u(u({},t),{},{path:n.pathname,navigate:r.push,params:o,listenHistory:r.listen}))}}},20247:(e,t,n)=>{n.d(t,{U:()=>d});var r=n(4942),o=n(44925),i=n(50558),c=n(1317),a=n(85893),s=["compProviderRouterType"];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 l(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){(0,r.Z)(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 p=function(e){return{compProviderRouterType:e.input.routerType}},d=function(e){var t=e.routerless,n=e.router,r=t?(0,c.w)(t):(0,c.w)(e),u=n?(0,c.C)(n):(0,c.C)(e);return(0,i.connect)(p)((function(e){var t=e.compProviderRouterType,n=(0,o.Z)(e,s);return"routerless"===t?(0,a.jsx)(r,l({},n)):(0,a.jsx)(u,l({},n))}))}},3044:(e,t,n)=>{n.r(t),n.d(t,{default:()=>he});var r,o=n(56746),i=n(44845),c=n(74806),a=n(50558),s=n(97722),u=n(4942),l=n(44925),p=n(27361),d=n.n(p),f=n(1024),y=n(97890),h=n(30168),m=n(96559),b=n(67165),v=n(30759),g=n(24875);const O=(0,b.ZP)(m.rU)(r||(r=(0,h.Z)(["\n ","\n text-decoration: none;\n color: ",";\n\n * {\n color: ",";\n text-decoration: none;\n }\n\n &:hover,\n &:hover *,\n &:focus,\n &:focus * {\n color: ",";\n text-decoration: ",";\n }\n\n &:active,\n &:active * {\n color: ",";\n text-decoration: ",";\n }\n"])),(0,v.Z)(),g.FS.color("secondary"),g.FS.color("text"),g.FS.color("secondaryLight"),(function(e){return e.neutral?"none":"underline"}),(function(e){return e.neutral?g.FS.color("text"):g.FS.color("secondaryLight")}),(function(e){return e.neutral?"none":"underline"}));var j=n(85893),P=function(e){var t=e.currentKey,n=e.entityKey,r=e.children,o=e.relation;return(0,j.jsx)(O,{to:"".concat(t,"/").concat(o,"/").concat(n),children:r})};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){(0,u.Z)(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}const Z=function(e,t,n){return{DetailLinkRelative:function(e){return(0,j.jsx)(P,x(x({},e),{},{currentKey:n}))},navigateToCreateRelative:function(n){var r;if(null!==(r=t.params)&&void 0!==r&&r.entityId){var o=t.url;if(n)e.push("".concat(o,"/").concat(n,"/"));else{var i=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace(/\/$/,""),r=0;r<t;r++)n=n.substring(0,n.lastIndexOf("/")+1);return n}(o,1);e.push(i)}}else e.push("/detail")},navigateToActionRelative:function(t,n){var r=y.Z.toQueryString({selection:n,actionProperties:t.properties});e.push({pathname:"/action/"+t.appId,state:{definition:t,selection:n,originUrl:e.location.pathname},search:r})}}};var S="list",E="detail",D="fullscreen-action",k=n(9538),C={copy:(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,12751))})),delete:(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,32454))})),export:(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,23458))})),"input-edit":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,93137))})),"subscribe-calendar":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,80634))})),"mailing-list-mail-action":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,67565))})),"evaluation-execution-participation-action":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,62632))})),"event-registration-action":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,96699))})),"job-offer-apply":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(981),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,49819))}))};const F=function(){return k.Z.actionFactory(C)};var A=["fireVisibilityStatusChangeEvent"];function N(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const T=function(e){var t=e.fireVisibilityStatusChangeEvent,n=(0,l.Z)(e,A),r=n.router,o=r.history,i=r.location,c=r.match,a=y.Z.fromQueryString(i.search),s=d()(i,"state.selection",a.selection),u=d()(i,"state.definition.properties",a.actionProperties);(0,f.useEffect)((function(){t([D])}),[t]);var p=function(){var e,t=(null===(e=i.state)||void 0===e?void 0:e.originUrl)||"/";o.replace(t)},h=F();return(0,j.jsx)(h,I(I(I({appId:c.params.appId,onSuccess:p,onError:p,onCancel:p,navigationStrategy:Z(o,c)},n),a),{},{selection:s,actionProperties:u}))};var R={fireVisibilityStatusChangeEvent:s.Z.fireVisibilityStatusChangeEvent};const L=(0,a.connect)((function(e){return{locale:e.intl.locale,customActionEventHandlers:e.input.customActionEventHandlers}}),R)((0,c.ZP)(T));var _=n(54563),B=n(6766),M=n(30314),z=n(78125),V=n(42845),W=n(34240),U=n(10129),H=n(84086);const $=function(e){var t=e.when,n=e.message;return(0,f.useEffect)((function(){return t&&H.Z.activatePreventFromLeaving(),function(){H.Z.deactivatePreventFromLeaving()}}),[t]),(0,j.jsx)(o.NL,{when:t,message:n})};var q=n(64687),Y=n.n(q),K=n(24970),G=n(48901),X=Y().mark(Q);function Q(e,t,n){var r,o,i,c,a,s,u,l,p,d,f,y;return Y().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:if(r=n.detailParams,o=void 0===r?{}:r,i=n.intl,!(c=n.modifyFormDefinition)){h.next=7;break}return h.next=4,(0,K.RE)(c,e,t);case 4:h.t0=h.sent,h.next=8;break;case 7:h.t0=e;case 8:return a=h.t0,u=(s=t||{}).entityName,l=s.entityId,p=o.entityName,d=o.entityId,f=o.showBackButton,y=f&&u===p&&l===d,h.abrupt("return",y?G.Z.addBack(a,i):a);case 13:case"end":return h.stop()}}),X)}const J=function(e){var t,n=e.loadDetailParams,r=e.router,o=e.setFormTouched,i=e.clearDetailParams,c=e.detailParams,a=e.appId,s=e.modifyEntityPaths,u=e.intl,l=e.dispatchEmittedAction,p=e.formTouched,d=e.locale,y=e.reportIds,h=e.fireVisibilityStatusChangeEvent,m=e.scrollBehaviour,b=e.customActionEventHandlers;(0,f.useEffect)((function(){return n(r.match.url),o(!1),function(){i()}}),[i,n,r.match.url,o]),(0,f.useEffect)((function(){h([E])}),[h]);var v,g,O,P,w,x=function(e){return u.formatMessage({id:e})},S=function(e){var t=e.id,n=e.relationName;r.history.push("".concat(r.match.url,"/").concat(n,"/").concat(t))},D=function(e){var t=e.id,n=e.followUp;(0,M.flushSync)((function(){o(!1)}));var i=r.match.url,c="/"!==i.substr(-1)?i+"/":i;r.history.push({pathname:c+t,state:null!=n&&n.action?{action:n.action}:{}})},k=function(e){var t=e.touched;o(t)},C=function(){r.history.push(c.parentUrl)},A={back:function(){return(0,j.jsx)(U.Z,{onClick:C,label:x("client.entity-browser.back")})}},N=null===(t=r.history.location)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.action;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)($,{when:p,message:x("client.entity-browser.detail.confirmTouchedFormLeave")}),c&&(0,j.jsx)(j.Fragment,{children:(v=c,g=v.entityName,O=v.entityId,P=v.formName,w=v.mode,(0,j.jsx)(V.ZP,{id:"".concat(a,"_detail_").concat(P,"_").concat(O),entityName:g,entityId:O,formName:P,mode:w,navigationStrategy:Z(r.history,r.match,O),onSubGridRowClick:S,onEntityCreated:D,onEntityDeleted:C,onTouchedChange:k,emitAction:function(e){l(e)},theme:{},locale:d,modifyFormDefinition:function(t,n){return Q(t,n,e)},modifyEntityPaths:s,actionAppComponent:F(),reportIds:y,customRenderedActions:A,listApp:W.ZP,docsApp:z.ZP,scrollBehaviour:m,customActionEventHandlers:b,initialAction:N}))})]})};var ee={loadDetailParams:B.E,clearDetailParams:B.W8,setFormTouched:B.A9,dispatchEmittedAction:_.Z.dispatchEmittedAction,fireVisibilityStatusChangeEvent:s.Z.fireVisibilityStatusChangeEvent};const te=(0,a.connect)((function(e,t){return{appId:e.entityBrowser.appId,detailParams:e.detail.detailParams,formTouched:e.detail.formTouched,scrollBehaviour:e.entityBrowser.scrollBehaviour,locale:e.intl.locale,modifyFormDefinition:e.input.modifyFormDefinition,modifyEntityPaths:e.input.modifyEntityPaths,reportIds:e.input.reportIds,customActionEventHandlers:e.input.customActionEventHandlers}}),ee)((0,c.ZP)(J));var ne=n(31876),re=["storeId","router","modifyFormDefinition","disableDetailView","fireVisibilityStatusChangeEvent","customActionEventHandlers"];function oe(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?oe(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=function(e){var t=e.entityKey,n=e.children;return(0,j.jsx)(O,{to:"detail/".concat(t),children:n})};const ae=function(e){var t=e.storeId,n=e.router,r=e.modifyFormDefinition,o=e.disableDetailView,i=e.fireVisibilityStatusChangeEvent,c=e.customActionEventHandlers,a=(0,l.Z)(e,re);(0,f.useEffect)((function(){i([S])}),[i]);return(0,j.jsx)(W.ZP,ie(ie({},a),{},{onRowClick:function(e){o||n.history.push("/detail/".concat(e.id))},showLink:!o,navigationStrategy:ie(ie({},Z(n.history,n.match)),{},{DetailLinkRelative:ce}),searchFormPosition:"top",actionAppComponent:F(),store:ne.Z.viewInfoSelector(t).store,onStoreCreate:function(e){ne.Z.persistViewInfo(t,{store:e},0)},modifyFormDefinition:r,customActionEventHandlers:c,detailApp:V.ZP}))};var se={emitAction:function(e){return _.Z.dispatchEmittedAction(e)},fireVisibilityStatusChangeEvent:s.Z.fireVisibilityStatusChangeEvent};const ue=(0,a.connect)((function(e,t){var n="".concat(e.entityBrowser.appId,"_entity-browser-list");return{id:n,storeId:"".concat(n,"_").concat(t.router.history.location.pathname),locale:e.intl.locale,entityName:e.entityBrowser.entityName,formName:e.entityBrowser.formBase,scrollBehaviour:e.entityBrowser.scrollBehaviour,searchFormType:e.input.searchFormType||"simple_advanced",limit:e.input.limit,searchFilters:e.input.searchFilters,preselectedSearchFields:e.input.preselectedSearchFields,simpleSearchFields:e.input.simpleSearchFields,modifyFormDefinition:e.input.modifyFormDefinition,disableDetailView:e.input.disableDetailView,reportIds:e.input.reportIds,customActionEventHandlers:e.input.customActionEventHandlers}}),se)(ae);var le,pe=n(88601),de=n(7281);const fe=b.ZP.div.withConfig({displayName:"StyledEntityBrowser"})(le||(le=(0,h.Z)(["\n && {\n background-color: ",";\n padding: ",";\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n }\n"])),pe.Z.color("paper"),de.Z.space(0));var ye;const he=function(){return(0,j.jsxs)(fe,{children:[ye||(ye=(0,j.jsx)(i.Z.Notifications,{})),(0,j.jsxs)(o.rs,{children:[(0,j.jsx)(o.AW,{path:"/",exact:!0,render:function(e){return(0,j.jsx)(ue,{router:e})}}),(0,j.jsx)(o.AW,{path:"/detail/:entityId*",render:function(e){return(0,j.jsx)(te,{router:e})}}),(0,j.jsx)(o.AW,{path:"/action/:appId*",render:function(e){return(0,j.jsx)(L,{router:e})}})]})]})}}}]);
1
+ "use strict";(self.webpackChunktocco_=self.webpackChunktocco_||[]).push([[44],{13025:(e,t,n)=>{n.d(t,{Z:()=>o,l:()=>i});var r=n(45697),o={SINGLE:"single",MULTI:"multi",MULTI_EXPLICIT:"multi_explicit",NONE:"none"},i=n.n(r)().oneOf(Object.keys(o).map((function(e){return o[e]})))},10129:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4942),o=n(44925),i=n(65035),c=n(85893),a=["icon","label","onClick"];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 u=function(e){var t=e.icon,n=e.label,u=e.onClick,l=(0,o.Z)(e,a);return(0,c.jsx)(i.Z,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){(0,r.Z)(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}({icon:t||"arrow-left",label:n,onClick:u,"data-cy":"btn-back"},l))}},40493:(e,t,n)=>{n.d(t,{q:()=>i});var r,o=n(30168),i=n(67165).ZP.span.withConfig({displayName:"StyledFontAwesomeAdapterWrapper"})(r||(r=(0,o.Z)([""])))},46200:(e,t,n)=>{n.d(t,{a:()=>c});var r=n(45697),o=n.n(r),i=n(71392),c=o().oneOf(Object.keys(i.P).map((function(e){return i.P[e]})))},71392:(e,t,n)=>{n.d(t,{P:()=>r});var r={INLINE:"inline",NONE:"none"}},78125:(e,t,n)=>{n.d(t,{ZP:()=>xr});var r=n(4942),o=n(45697),i=n.n(o),c=n(54563),a=n(38378),s=n(9538),u=n(37695),l=n(97722),p=n(1825),d=n(44845),f=n(81749),y=n(13025),h=n(46200),m=n(44362),b=n(21276),v=n(1024),g=n.n(v),O=n(1317),j=n(74806),P=n(50558),w="docs/create/OPEN_DIALOG",x="docs/create/FILES_SELECTED",Z="docs/path/LOAD_BREADCRUMBS",S="docs/path/SET_BREADCRUMBS",E="docs/path/SET_SEARCH_MODE",D=function(e){return{type:S,payload:{breadcrumbs:e}}},k=n(20247),C=n(93324),F=n(31876),A=/^\/docs\/?$/;const N=function(e){return A.test(e)};var I,T,R=n(67165),L=n(89062),_=n(64593),B=n(84349),M=n(30168),z=n(96559),V=n(30759),W=n(88601),U=(0,R.iv)(I||(I=(0,M.Z)(["\n ","\n color: ",";\n\n * {\n color: ",";\n text-decoration: ",";\n }\n\n &:hover,\n &:hover *,\n &:focus,\n &:focus * {\n text-decoration: ",";\n }\n\n &:active,\n &:active * {\n text-decoration: ",";\n }\n"])),(0,V.Z)(),W.Z.color("text"),W.Z.color("text"),(function(e){return e.neutral?"none":"underline"}),(function(e){return e.neutral?"none":"underline"}),(function(e){return e.neutral?"none":"underline"}));const H=(0,R.ZP)(z.rU).withConfig({shouldForwardProp:function(e,t){return!["neutral"].includes(e)&&t(e)}})(T||(T=(0,M.Z)(["\n ","\n"])),U);var $=n(70310),q=n(88162),Y=n(85893),K={error:"exclamation-circle",home:"house-blank"},G=function(e){return K[e]||e};const X=function(e){var t=e.type;return t&&"record"!==t?(0,Y.jsx)(q.Z,{icon:G(t)}):null};var Q,J,ee,te,ne,re,oe=n(44925),ie=n(40493),ce=n(69829),ae=n(7281),se=["component"],ue=R.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(Q||(Q=(0,M.Z)(["\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||W.Z.color("backgroundBreadcrumbs")(e)}),ae.Z.space(-.7),ae.Z.space(.39)),le=(0,R.ZP)((function(e){var t=e.component,n=(0,oe.Z)(e,se);return g().cloneElement(t,n)})).withConfig({displayName:"StyledBreadcrumbsLink"})(J||(J=(0,M.Z)(["\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"])),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.color("secondaryLight"),W.Z.color("primary")),pe=R.ZP.span.withConfig({displayName:"StyledBreadcrumbsTitle"})(ee||(ee=(0,M.Z)(["\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"])),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.fontWeight("bold"),(function(e){return e.active&&W.Z.color("primary")}),W.Z.color("primary")),de=(0,R.ZP)(ce.Fe).withConfig({displayName:"StyledBreadcrumbSeparator"})(te||(te=(0,M.Z)(["\n margin-left: ",";\n margin-right: ",";\n"])),ae.Z.space(-2),ae.Z.space(-2)),fe=R.ZP.span.withConfig({displayName:"StyledBreadcrumbWrapper"})(ne||(ne=(0,M.Z)(["\n "," {\n margin-right: ",";\n }\n"])),ie.q,ae.Z.space(-1));const ye=function(){return re||(re=(0,Y.jsx)(de,{breakWords:!0,children:(0,Y.jsx)(q.Z,{icon:"chevron-right"})}))};var he;function me(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?me(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ve=function(e){return e.title||e.display},ge=function(e,t){if(!e||0===e.length)return"Tocco";var n=e.at(-1),r="";switch(n.type){case"create":r="".concat(ve(n)," - ").concat(t);break;case"detail":r=e.slice(e.length-2).map(ve).join(" - ");break;default:r=ve(n)}return r},Oe=function(e){var t,n=e.intl,r=e.pathPrefix,o=e.breadcrumbsInfo,i=void 0===o?[]:o,c=e.currentView,a=e.backgroundColor,s=e.onClick,u=e.linkComp,l=[].concat((0,L.Z)(i),(0,L.Z)(c?[c]:[]));if(0===l.length)return null;var p,d=l.map((function(e,n){var o,i=e.display||"",c=n===l.length-1?pe:le,a=n===l.length-1&&{active:"true"},p=void 0!==e.path?{to:"".concat(r,"/").concat(e.path)}:{},d=u?t||(t=(0,Y.jsx)(u,{})):he||(he=(0,Y.jsx)(H,{}));return(0,Y.jsx)($.ZP.Span,{children:(0,Y.jsx)(fe,{children:(0,Y.jsxs)(c,be(be(be({neutral:!0},a),p),{},{onClick:(o=e,function(){s&&!1!==o.clickable&&s(o)}),component:d,children:[(0,Y.jsx)(X,{type:e.type}),(0,Y.jsx)("span",{"data-cy":"breadcrumb-item",dangerouslySetInnerHTML:{__html:B.Z.sanitizeHtml(i)}})]}))})},"breadcrumbItem-".concat(n))})).reduce((function(e,t,n){return[e,(0,Y.jsx)(ye,{},"icon".concat(n)),t]}));return(0,Y.jsxs)(ue,{backgroundColor:a,children:[(0,Y.jsx)(_.q,{defer:!1,children:(0,Y.jsx)("title",{children:ge(l,(p="client.component.breadcrumbs.createTitle",n.formatMessage({id:p})))})}),(0,Y.jsx)(Y.Fragment,{children:d})]})};Oe.defaultProps={pathPrefix:""};const je=Oe,Pe=(0,j.ZP)(je);function we(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ze=(0,R.Zz)((function(e){var t=e.embedded,n=e.resetSearchMode,r=e.theme,o=e.pathPrefix,i=e.breadcrumbsInfo;return(0,Y.jsx)(Pe,xe(xe({},t?{backgroundColor:W.Z.color("paper")({theme:r})}:{}),{},{onClick:function(e){""===e.path&&n()},pathPrefix:o,breadcrumbsInfo:i}))}));function Se(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var De=function(e){return(0,Y.jsx)("span",Ee({},e))};const ke=(0,R.Zz)((function(e){var t=e.embedded,n=e.navigate,r=e.resetSearchMode,o=e.theme,i=e.pathPrefix,c=e.breadcrumbsInfo;return(0,Y.jsx)(Pe,Ee(Ee({},t?{backgroundColor:W.Z.color("paper")({theme:o})}:{}),{},{onClick:function(e){""===e.path&&r(),n("/docs/".concat(e.path))},linkComp:De,pathPrefix:i,breadcrumbsInfo:c}))}));var Ce={},Fe=function(e){return{pathPrefix:"/docs",breadcrumbsInfo:e.docs.path.breadcrumbs,embedded:e.input.embedded}},Ae=(0,P.connect)(Fe,Ce)((0,j.ZP)(Ze)),Ne=(0,P.connect)(Fe,Ce)((0,j.ZP)(ke));const Ie=(0,k.U)({routerless:Ne,router:Ae});var Te="docs/list/CHANGE_LIST_PARENT",Re="docs/list/CHANGE_SELECTION",Le="docs/list/CHANGE_SEARCH_FORM_COLLAPSED",_e=n(35728),Be={"dms-create-folder":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,36340))})),"dms-create-domain":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,67210))})),"dms-edit":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,37485))})),"dms-move":(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,4505))})),delete:(0,v.lazy)((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(213),n.e(141)]).then(n.bind(n,96954))}))};const Me=s.Z.actionFactory(Be);var ze=n(6770);function Ve(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 We=function(e){var t=e.instanceCount,n=e.directory,o=e.onChange,i=e.path,c=(0,v.useRef)(),a=ze.Z.usePrevious(t);(0,v.useEffect)((function(){c.current&&t>a&&c.current.click()}));return(0,Y.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"file",ref:c,style:{display:"none"},onChange:function(e){var t=e.target.files;t&&t.length>0&&o&&o(i,t,n),e.target.value=null},multiple:!0},n?{webkitdirectory:"true",directory:"true"}:{}))};var Ue={onChange:function(e,t,n){return{type:x,payload:{location:e,files:t,isDirectory:n}}}};const He=(0,k.U)((0,P.connect)((function(e){return{instanceCount:e.docs.create.dialog.instanceCount,directory:e.docs.create.dialog.directory}}),Ue)(We));var $e,qe,Ye,Ke,Ge,Xe,Qe=R.ZP.div.withConfig({displayName:"StyledContentWrapper"})($e||($e=(0,M.Z)(["\n display: flex;\n align-items: center;\n"]))),Je=R.ZP.span.withConfig({displayName:"StyledIconWrapper"})(qe||(qe=(0,M.Z)(["\n font-size: ",";\n display: inline-block;\n margin-right: ",";\n"])),ae.Z.font(1),ae.Z.space(-2)),et=R.ZP.span.withConfig({displayName:"StyledLabelWrapper"})(Ye||(Ye=(0,M.Z)(["\n overflow: hidden;\n\n && span {\n display: flex;\n ","\n ","\n }\n"])),(function(e){var t=e.publishStatus,n=e.theme;return"offline"===t&&(0,R.iv)(Ke||(Ke=(0,M.Z)(["\n color: ",";\n font-style: italic;\n padding-right: ",";\n "])),n.colors.textLighter,ae.Z.space(-2))}),(function(e){var t=e.publishStatus,n=e.theme;return"changed"===t&&"\n color: ".concat(n.colors.secondaryLighter,";\n font-weight: ").concat(n.fontWeights.bold,";\n ")})),tt=g().lazy((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(226)]).then(n.bind(n,77840))}));const nt=function(e){var t=e.domainTypes,n=e.rootNodes,r=e.navigationStrategy,o=e.changeListParent,i=e.onSearchChange,c=e.emitAction,a=e.openFileDialog,s=e.limit,u=e.searchFormType,l=e.selectionStyle,p=e.selection,d=e.selectionFilterFn,f=e.getCustomLocation,y=e.disableViewPersistor,h=e.getListFormName,m=e.domainDetailFormName,b=e.folderDetailFormName,g=e.showActions,O=e.scrollBehaviour,j=e.sortable,P=e.searchMode,w=e.openResource,x=e.searchFormCollapsed,Z=e.locale,S=e.changeSelection,E=e.changeSearchFormCollapsed,D=e.params,k=e.navigate,A=e.path,I=(0,v.useReducer)((function(e){return e+1}),0),T=(0,C.Z)(I,2),R=T[0],L=T[1],_="entity-list-".concat(R),B=(0,v.useState)([]),M=(0,C.Z)(B,2),z=M[0],V=M[1],W=p||z,U=(0,v.useMemo)((function(){return function(e){if(e&&e.model){var t=e.model.charAt(0).toUpperCase()+e.model.slice(1),n=e.key;return{model:"Docs_list_item",key:"".concat(t,"/").concat(n)}}return null}(D)}),[D]),H=!U&&n?n.map((function(e){return"".concat(e.entityName,"/").concat(e.key)})):null,$=(0,v.useMemo)((function(){return h?h(U,H):function(e,t){return e?"Docs_list_item":t?"Root_docs_list_item_specific":"Root_docs_list_item"}(U,H)}),[U,H,h]),K=(0,v.useRef)(!1),G=(0,v.useRef)(P),X=(0,v.useRef)(A);G.current=P,X.current=A,(0,v.useEffect)((function(){return K.current=!0,function(){return K.current=!1}})),(0,v.useEffect)((function(){o(U),V([])}),[U,o]);var Q=function(e){V(e),S(e)},J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!F.Z.viewInfoSelector("search").store){var t=F.Z.viewInfoSelector(_).store;F.Z.persistViewInfo("search",{store:t})}e?setTimeout((function(){L()}),0):L()},ee=U||H?null:function(e){if(Array.isArray(e)&&e.length>0){var t=e.map((function(e){return'"'.concat(e,'"')})).join(",");return"exists(relDomain_type where IN(unique_id, ".concat(t,"))")}return null}(t),te=function(){if(!y)return N(A)?F.Z.viewInfoSelector("search").store:null}();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(v.Suspense,{fallback:Ge||(Ge=(0,Y.jsx)(_e.Z,{})),children:(0,Y.jsx)(tt,{id:"documents",entityName:"Docs_list_item",formName:$,searchListFormName:"Search_docs_list_item",limit:s||25,onRowClick:function(e){var t=e.id;P&&N(A)&&J();var n=t.split("/"),r=(0,C.Z)(n,2),o=r[0],i=r[1],c=f?f(o,i):function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return"/docs/doc/".concat(t,"/detail");default:throw new Error("Unexpected model: ".concat(e))}}(o,i);c?w&&"Resource"===o?w(c):k(c):Q([t])},searchFormPosition:"left",searchFormType:u||"admin",parent:U,onSearchChange:function(e){K.current&&(e.query&&e.query.hasUserChanges&&J(!0),i(e))},store:te,onStoreCreate:function(e){y||F.Z.persistViewInfo(_,{store:e})},cellRenderers:{"dms-label-with-icon":function(e,t,n){return(0,Y.jsxs)(Qe,{children:[(0,Y.jsx)(Je,{children:(0,Y.jsx)(q.Z,{icon:e.icon})}),(0,Y.jsx)(et,{publishStatus:e.publish_status,children:n(t.children[0])})]})},"dms-actions":function(e,t,n){return(0,Y.jsx)(Qe,{children:t.children.filter((function(t){return!t.dmsEntityModel||t.dmsEntityModel===e.type})).map((function(e){return n(e)}))})}},emitAction:c,actionAppComponent:Me,contextParams:{detailFormNames:{Domain:m,Folder:b}},customActions:{"upload-document":function(e,t,n,r,o,i,c){a(!1,i,c)},"upload-directory":function(e,t,n,r,o,i,c){a(!0,i,c)}},navigationStrategy:r,tql:ee,keys:H,selectionStyle:l||"multi_explicit",onSelectChange:Q,selection:W,selectionFilterFn:d,showActions:g,sortable:j,searchFormCollapsed:x,scrollBehaviour:O,onSearchFormCollapsedChange:E,locale:Z},_)}),Xe||(Xe=(0,Y.jsx)(He,{}))]})};var rt={changeListParent:function(e){return{type:Te,payload:{parent:e}}},changeSelection:function(e){return{type:Re,payload:{selection:e}}},changeSearchFormCollapsed:function(e){return{type:Le,payload:{collapsed:e}}}};const ot=(0,k.U)((0,P.connect)((function(e){return{domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,limit:e.input.listLimit,searchFormType:e.input.searchFormType,selectionStyle:e.input.selectionStyle,selectionFilterFn:e.input.selectionFilterFn,getCustomLocation:e.input.getCustomLocation,disableViewPersistor:e.input.disableViewPersistor,getListFormName:e.input.getListFormName,domainDetailFormName:e.input.domainDetailFormName,folderDetailFormName:e.input.folderDetailFormName,showActions:e.input.showActions,sortable:e.input.sortable,openResource:e.input.openResource,searchFormCollapsed:e.input.searchFormCollapsed,scrollBehaviour:e.input.scrollBehaviour,selection:e.input.selection,locale:e.intl.locale}}),rt)((0,j.ZP)(nt)));var it,ct,at=R.ZP.div.withConfig({displayName:"StyledDocumentViewWrapper"})(it||(it=(0,M.Z)(["\n height: 100%;\n background-color: ",";\n padding-left: ",";\n overflow-y: hidden;\n"])),W.Z.color("paper"),ae.Z.space(.5)),st=g().lazy((function(){return Promise.all([n.e(809),n.e(468),n.e(654),n.e(240),n.e(293),n.e(861),n.e(470)]).then(n.bind(n,82445))}));const ut=function(e){var t=e.breadcrumbs,n=e.formName,r=e.navigationStrategy,o=e.locale,i=e.emitAction,c=e.navigate,a=e.params;return(0,Y.jsx)(at,{children:(0,Y.jsx)(v.Suspense,{fallback:ct||(ct=(0,Y.jsx)(_e.Z,{})),children:(0,Y.jsx)(st,{entityName:"Resource",entityId:a.key,formName:n||"DmsResource",mode:"update",actionAppComponent:Me,navigationStrategy:r,emitAction:i,onEntityDeleted:function(){var e=t.slice().reverse().find((function(e){return"list"===e.type})),n="/docs/".concat(e.path);c(n)},locale:o})})})};var lt={emitAction:function(e){return c.Z.dispatchEmittedAction(e)}};const pt=(0,k.U)((0,P.connect)((function(e){return{breadcrumbs:e.docs.path.breadcrumbs,formName:e.input.documentDetailFormName,locale:e.intl.locale}}),lt)((0,j.ZP)(ut)));const dt=function(e){var t=e.params,n=e.navigationStrategy,r=e.handleSearchChange,o=e.emitAction,i=e.openFileDialog,c=e.searchMode,a=e.docsKey,s=t.model,u=t.view;return"doc"===s&&"detail"===u?(0,Y.jsx)(pt,{navigationStrategy:n}):(0,Y.jsx)(ot,{navigationStrategy:n,onSearchChange:r,emitAction:o,openFileDialog:i,searchMode:c},a)};var ft=n(56746);const yt=function(e){var t,n,r=e.navigationStrategy,o=e.handleSearchChange,i=e.emitAction,c=e.openFileDialog,a=e.searchMode,s=e.docsKey;return(0,Y.jsxs)(ft.rs,{children:[(0,Y.jsx)(ft.AW,{exact:!0,path:"/docs/doc/:key/detail",render:function(){return t||(t=(0,Y.jsx)(pt,{navigationStrategy:r}))}}),(0,Y.jsx)(ft.AW,{exact:!0,path:["/docs/:model/:key/list","/docs"],render:function(){return n||(n=(0,Y.jsx)(ot,{navigationStrategy:r,onSearchChange:o,emitAction:i,openFileDialog:c,searchMode:a},s))}})]})},ht=(0,k.U)({routerless:dt,router:yt});var mt,bt,vt,gt=R.ZP.div.withConfig({displayName:"StyledWrapper"})(mt||(mt=(0,M.Z)(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n ","\n width: 100%;\n"])),(function(e){return"inline"===e.scrollBehaviour&&"height: 100%;"})),Ot=R.ZP.div.withConfig({displayName:"StyledContent"})(bt||(bt=(0,M.Z)(["\n grid-area: content;\n ","\n"])),(function(e){return"inline"===e.scrollBehaviour&&"overflow-x: hidden;"})),jt=R.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(vt||(vt=(0,M.Z)(["\n grid-area: breadcrumbs;\n ","\n"])),(function(e){return e.noLeftPadding&&"\n > div {\n padding-left: 0;\n }\n "}));const Pt=function(e){var t=e.navigate,n=e.path,r=e.searchMode,o=e.navigationStrategy,i=e.setSearchMode,c=e.loadBreadcrumbs,a=e.emitAction,s=e.openFileDialog,l=e.noLeftPadding,p=e.scrollBehaviour,d=e.listenHistory,f=(0,v.useReducer)((function(e){return e+1}),0),y=(0,C.Z)(f,2),h=y[0],m=y[1],b=(0,v.useRef)(r);b.current=r,(0,v.useEffect)((function(){c(n)})),(0,v.useEffect)((function(){return d((function(e,t){N(n)&&r&&"POP"===t&&g()}))}));var g=function(){b.current&&(F.Z.clearPersistedViews(),i(!1),c(n),m())},O="docs-view-".concat(h);return(0,Y.jsxs)(gt,{scrollBehaviour:p,children:[(0,Y.jsx)(u.Z.ErrorBoundary,{children:(0,Y.jsx)(jt,{noLeftPadding:l,children:(0,Y.jsx)(Ie,{resetSearchMode:g})})}),(0,Y.jsx)(Ot,{scrollBehaviour:p,children:(0,Y.jsx)(ht,{navigationStrategy:o,handleSearchChange:function(e){e.query&&e.query.hasUserChanges?(i(!0),t("/docs/")):N(n)&&g()},emitAction:a,openFileDialog:s,searchMode:r,docsKey:O})})]})};var wt={loadBreadcrumbs:function(e){return{type:Z,payload:{location:e}}},setSearchMode:function(e){return{type:E,payload:{searchMode:e}}},emitAction:function(e){return c.Z.dispatchEmittedAction(e)},openFileDialog:function(e,t,n){return{type:w,payload:{directory:e,onSuccess:t,onError:n}}}};const xt=(0,k.U)((0,P.connect)((function(e){return{searchMode:e.docs.path.searchMode,navigationStrategy:e.input.navigationStrategy,noLeftPadding:e.input.noLeftPadding,scrollBehaviour:e.input.scrollBehaviour}}),wt)((0,j.ZP)(Pt)));var Zt,St;const Et=(0,O.w)((function(e){var t=e.handleNotifications,n=e.rootPath,r=e.navigate,o=e.path;return(0,v.useEffect)((function(){(!o||"/"===o||"/docs"===o)&&n!==o&&r(n)}),[n,o,r]),(0,Y.jsxs)(Y.Fragment,{children:[t&&(Zt||(Zt=(0,Y.jsx)(d.Z.Notifications,{}))),St||(St=(0,Y.jsx)(xt,{}))]})}));var Dt,kt;const Ct=function(e){var t=e.rootPath,n=e.handleNotifications;return(0,Y.jsxs)(Y.Fragment,{children:[n&&(Dt||(Dt=(0,Y.jsx)(d.Z.Notifications,{}))),kt||(kt=(0,Y.jsx)(xt,{})),(0,Y.jsx)(ft.AW,{exact:!0,path:"/",children:(0,Y.jsx)(ft.l_,{to:t})}),"/docs"!==t&&(0,Y.jsx)(ft.AW,{exact:!0,path:"/docs",children:(0,Y.jsx)(ft.l_,{to:t})})]})};var Ft,At;const Nt=function(e){var t=e.rootPath,n=e.handleNotifications,r=e.history;return(0,Y.jsxs)(ft.F0,{history:r,children:[n&&(Ft||(Ft=(0,Y.jsx)(d.Z.Notifications,{}))),At||(At=(0,Y.jsx)(xt,{})),(0,Y.jsx)(ft.AW,{exact:!0,path:"/",children:(0,Y.jsx)(ft.l_,{to:t})}),"/docs"!==t&&(0,Y.jsx)(ft.AW,{exact:!0,path:"/docs",children:(0,Y.jsx)(ft.l_,{to:t})})]})};var It=n(14890),Tt=n(64687),Rt=n.n(Tt),Lt=n(24970);function _t(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 Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Mt=(0,r.Z)({},w,(function(e,t){var n=t.payload,r=n.directory,o=n.onSuccess,i=n.onError;return Bt(Bt({},e),{},{dialog:{instanceCount:e.dialog.instanceCount+1,directory:r,onSuccess:o,onError:i}})})),zt={dialog:{instanceCount:0,directory:!1,onSuccess:null,onError:null}};var Vt=n(72007),Wt=n(18704),Ut=n(72045),Ht=n(80722),$t=Rt().mark(en),qt=Rt().mark(tn);function Yt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gt=function(e){return e.docs.create.dialog},Xt=function(e,t){return e.intl.messages[t]},Qt=201;function Jt(e){var t=e.payload,n=t.location,r=t.files,o=t.isDirectory;return Rt().mark((function e(){var t,i,c,a,s,u,l,p;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.RE)(Ut.Z);case 2:return t=e.sent,i="client.docs-browser.uploadInProgress",o?i="client.docs-browser.uploadInProgressDirectory":r.length>1&&(i="client.docs-browser.uploadInProgressMultiple"),e.next=7,(0,Lt.gz)(d.Z.blockingInfo(t,i,null));case 7:return e.next=9,(0,Lt.Ys)(Gt);case 9:return c=e.sent,a=c.onSuccess,s=c.onError,e.prev=12,e.next=15,(0,Lt.RE)(en,n,r);case 15:if(403!==(u=e.sent).status){e.next=30;break}return e.next=19,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 19:return e.t0=s,e.next=22,(0,Lt.Ys)(Xt,"client.entity-detail.saveAbortedTitle");case 22:return e.t1=e.sent,e.next=25,(0,Lt.Ys)(Xt,"client.docs-browser.failedNoPermission");case 25:e.t2=e.sent,e.t3={title:e.t1,message:e.t2},(0,e.t0)(e.t3),e.next=55;break;case 30:if(413!==u.status){e.next=44;break}return e.next=33,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 33:return e.t4=s,e.next=36,(0,Lt.Ys)(Xt,"client.entity-detail.saveAbortedTitle");case 36:return e.t5=e.sent,e.next=39,(0,Lt.Ys)(Xt,"client.docs-browser.failedTooLarge");case 39:e.t6=e.sent,e.t7={title:e.t5,message:e.t6},(0,e.t4)(e.t7),e.next=55;break;case 44:return l=[{type:"entity-create-event",payload:{entities:u.body.items.filter((function(e){return e.status===Qt})).map((function(e){return{entityName:e.bean.model,key:e.bean.key}}))}}],e.next=47,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 47:return p=o?"client.docs-browser.uploadSuccessfulDirectory":"client.docs-browser.uploadSuccessful",e.t8=a,e.next=51,(0,Lt.Ys)(Xt,p);case 51:e.t9=e.sent,e.t10=l,e.t11={title:e.t9,remoteEvents:e.t10},(0,e.t8)(e.t11);case 55:e.next=68;break;case 57:return e.prev=57,e.t12=e.catch(12),Wt.Z.logError("Failed to upload files",e.t12),e.next=62,(0,Lt.gz)(d.Z.removeBlockingInfo(t));case 62:return e.t13=s,e.next=65,(0,Lt.Ys)(Xt,"client.docs-browser.uploadFailed");case 65:e.t14=e.sent,e.t15={title:e.t14},(0,e.t13)(e.t15);case 68:case"end":return e.stop()}}),e,null,[[12,57]])}))()}function en(e,t){var n,r,o,i,c,a,s;return Rt().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(n=(0,Ht.Z)(e)){u.next=3;break}return u.abrupt("return");case 3:r=new FormData,o=Yt(t);try{for(o.s();!(i=o.n()).done;)c=i.value,r.append("files[]",c)}catch(e){o.e(e)}finally{o.f()}return a="documents/".concat(n.model,"/").concat(n.key),s={method:"POST",body:r,acceptedStatusCodes:[403,413]},u.next=10,(0,Lt.RE)(Vt.Z.requestSaga,a,s);case 10:return u.abrupt("return",u.sent);case 11:case"end":return u.stop()}}),$t)}function tn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.ib)(x,Jt)]);case 2:case"end":return e.stop()}}),qt)}var nn=Rt().mark(rn);function rn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(tn)]);case 2:case"end":return e.stop()}}),nn)}const on=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zt,t=arguments.length>1?arguments[1]:void 0,n=Mt[t.type];return n?n(e,t):e};var cn=Rt().mark(ln);function an(e){var t=e.payload;return Rt().mark((function e(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.gz)(l.Z.fireExternalEvent("onListParentChange",t.parent));case 2:case"end":return e.stop()}}),e)}))()}function sn(e){var t=e.payload;return Rt().mark((function e(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.gz)(l.Z.fireExternalEvent("onSelectChange",t.selection));case 2:case"end":return e.stop()}}),e)}))()}function un(e){var t=e.payload;return Rt().mark((function e(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.gz)(l.Z.fireExternalEvent("onSearchFormCollapsedChange",t.collapsed));case 2:case"end":return e.stop()}}),e)}))()}function ln(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)(Te,an),(0,Lt.Fm)(Re,sn),(0,Lt.Fm)(Le,un)]);case 2:case"end":return e.stop()}}),cn)}var pn,dn=n(78907),fn=n(30081);function yn(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 hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mn=(pn={},(0,r.Z)(pn,fn.qh,(function(e,t){var n=t.payload,r=n.selection,o=n.onSuccess,i=n.onError;return hn(hn({},e),{},{input:{selection:r,onSuccess:o,onError:i}})})),(0,r.Z)(pn,fn.FV,dn.Z.singleTransferReducer("isWaiting")),(0,r.Z)(pn,fn.F$,(function(){return hn({},bn)})),pn),bn={isWaiting:!1,input:{selection:null,onSuccess:null,onError:null}};var vn=n(71120),gn=Rt().mark(xn),On=Rt().mark(Zn),jn=function(e){return e.docs.move.input},Pn=function(e,t){return e.intl.messages[t]};function wn(e){var t=e.payload;return Rt().mark((function e(){var n,r,o,i,c;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="documents/move",r={method:"POST",acceptedStatusCodes:[400,403],body:{targetEntityKey:t.target,selectedEntityKeys:t.selected}},e.next=4,(0,Lt.gz)(fn.p0(!0));case 4:return e.next=6,(0,Lt.RE)(Vt.Z.requestSaga,n,r);case 6:if(204!==(o=e.sent).status){e.next=12;break}return e.next=10,(0,Lt.RE)(xn);case 10:e.next=19;break;case 12:return e.next=14,(0,Lt.gz)(fn.p0(!1));case 14:return c="client.actions.dms-move.failed.message","VALIDATION_FAILED"===(null===(i=o.body)||void 0===i?void 0:i.errorCode)&&(c=vn.Z.getErrorCompact(o.body.errors)),403===o.status&&(c="client.docs-browser.failedNoPermission"),e.next=19,(0,Lt.gz)(d.Z.toaster({type:"error",title:"client.actions.dms-move.failed.title",body:c}));case 19:case"end":return e.stop()}}),e)}))()}function xn(){var e,t,n,r;return Rt().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Lt.Ys)(jn);case 2:return e=o.sent,t=e.selection,n=e.onSuccess,r=[{type:"entity-update-event",payload:{entities:t.ids.map((function(e){return{entityName:"Docs_list_item",key:e}}))}}],o.t0=n,o.next=9,(0,Lt.Ys)(Pn,"client.docs-browser.moveSuccessful");case 9:return o.t1=o.sent,o.t2=r,o.t3={title:o.t1,remoteEvents:o.t2},(0,o.t0)(o.t3),o.next=15,(0,Lt.gz)(fn.xv());case 15:case"end":return o.stop()}}),gn)}function Zn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)(fn.uI,wn)]);case 2:case"end":return e.stop()}}),On)}var Sn=Rt().mark(En);function En(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(Zn)]);case 2:case"end":return e.stop()}}),Sn)}const Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bn,t=arguments.length>1?arguments[1]:void 0,n=mn[t.type];return n?n(e,t):e};var kn,Cn=(kn={},(0,r.Z)(kn,S,dn.Z.singleTransferReducer("breadcrumbs")),(0,r.Z)(kn,E,dn.Z.singleTransferReducer("searchMode")),kn),Fn={breadcrumbs:[],searchMode:!1};var An=Rt().mark(_n),Nn=Rt().mark(Mn),In=Rt().mark(zn),Tn=function(e,t){return e.intl.messages[t]||t},Rn=function(e){return e.docs.path},Ln=function(e){return e.input.rootNodes};function _n(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.Ys)(Tn,"client.docs-browser.breadcrumbs.start");case 2:return e.t0=e.sent,e.t1={display:e.t0,path:"",type:"list"},e.next=6,(0,Lt.Ys)(Tn,"client.docs-browser.breadcrumbs.searchResults");case 6:return e.t2=e.sent,e.t3={display:e.t2,path:"",type:"search",clickable:!1},e.abrupt("return",[e.t1,e.t3]);case 9:case"end":return e.stop()}}),An)}function Bn(e){var t=e.payload.location;return Rt().mark((function e(){var n,r,o,i,c;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,Ht.Z)(t),e.next=3,(0,Lt.Ys)(Rn);case 3:if(!e.sent.searchMode||n){e.next=10;break}return e.next=7,(0,Lt.RE)(_n);case 7:r=e.sent,e.next=20;break;case 10:return o=n?"documents/".concat(n.model,"/").concat(n.key,"/breadcrumbs"):"documents/breadcrumbs",e.next=13,(0,Lt.RE)(Mn);case 13:return e.t0=e.sent,e.t1={rootnodes:e.t0},i={queryParams:e.t1},e.next=18,(0,Lt.RE)(Vt.Z.requestSaga,o,i);case 18:c=e.sent,r=c.body.breadcrumbs;case 20:return e.next=22,(0,Lt.gz)(D(r));case 22:case"end":return e.stop()}}),e)}))()}function Mn(){var e;return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Lt.Ys)(Ln);case 2:return e=t.sent,t.abrupt("return",Array.isArray(e)&&e.length>0?e.map((function(e){return"".concat(e.entityName,"/").concat(e.key)})).join(","):null);case 4:case"end":return t.stop()}}),Nn)}function zn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)(Z,Bn)]);case 2:case"end":return e.stop()}}),In)}var Vn=Rt().mark(Wn);function Wn(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(zn)]);case 2:case"end":return e.stop()}}),Vn)}const Un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fn,t=arguments.length>1?arguments[1]:void 0,n=Cn[t.type];return n?n(e,t):e};var Hn,$n=n(40602),qn=(Hn={},(0,r.Z)(Hn,$n.RK,dn.Z.singleTransferReducer("path")),(0,r.Z)(Hn,$n.Sb,dn.Z.singleTransferReducer("params")),Hn),Yn={path:"",params:{}};var Kn=n(90655);function Gn(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?Gn(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qn=n(84086);function Jn(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 er(e){return function(t){var n=(0,v.useState)(null),o=(0,C.Z)(n,2),i=o[0],c=o[1],a=(0,v.useRef)(!0);return(0,v.useEffect)((function(){return e().then((function(e){return a.current?c((function(){return e})):null})),function(){a.current=!1}}),[]),null!==i?(0,Y.jsx)(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t)):null}}function tr(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 nr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rr={},or=function(e){return function(t){if(e.component)return(0,Y.jsx)(e.component,{router:t,routes:e.routes});if(e.render){var n={router:t,routes:e.routes};return e.render(n)}}};const ir=function(e){return(0,Y.jsx)(ft.AW,{path:e.path,exact:e.exact,render:or(e)})};function cr(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 ar=function(e){var t=e.history,n=e.routes;return(0,Y.jsx)(ft.F0,{history:t,children:(0,Y.jsx)(g().Fragment,{children:n.map((function(e,t){return(0,Y.jsx)(ir,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),t)}))})})},sr={loadRoute:function(e,t,n,r){return function(o){if(r&&rr[r]){var i=rr[r];return(0,Y.jsx)(i,nr({},o))}var c=er((function(){return new Promise((function(r){n().then((function(n){var o=n.default;o.reducers&&dn.Z.injectReducers(e,o.reducers),o.sagas&&o.sagas.forEach((function(t){Qn.Z.injectSaga(e,t)})),o.inputDispatches&&o.inputDispatches.forEach((function(n){!function(e,t,n){var r=n.key,o=n.actionCreator,i=n.mandatory,c=void 0!==i&&i,a=n.defaultValue,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Wt.Z.logError;if(Object.prototype.hasOwnProperty.call(t,r)||a){var u=o(t[r]||a);e.dispatch(u)}else!0===c&&s("EntityBrowser: Mandatory field '".concat(r,"' not set in input"))}(e,t,n)})),r(o.container)}))}))}));return r&&(rr[r]=c),(0,Y.jsx)(c,nr({},o))}},Router:ar,RouteWithSubRoutes:ir,extractParamsFromPath:function(e,t){var n=[],o=(0,Kn.Bo)(e,n).exec(t);return null!==o?n.reduce((function(e,t,n){return Xn(Xn({},e),{},(0,r.Z)({},t.name,o[n+1]))}),{}):null}};var ur=Rt().mark(dr),lr="/docs/:model/:key/:view(list|detail)";function pr(e){var t=e.payload.path;return Rt().mark((function e(){var n;return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=sr.extractParamsFromPath(lr,t)||{},e.next=3,(0,Lt.gz)($n.PX(n));case 3:case"end":return e.stop()}}),e)}))()}function dr(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.Fm)($n.RK,pr)]);case 2:case"end":return e.stop()}}),ur)}var fr=Rt().mark(yr);function yr(){return Rt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Lt.$6)([(0,Lt.rM)(dr)]);case 2:case"end":return e.stop()}}),fr)}const hr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yn,t=arguments.length>1?arguments[1]:void 0,n=qn[t.type];return n?n(e,t):e},mr={docs:(0,It.UY)({path:Un,create:on,move:Dn,routing:hr})};var br=[Wn,rn,ln,En,yr];function vr(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 gr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Or="docs-browser",jr=["onListParentChange","openResource","onSelectChange","onSearchFormCollapsedChange"],Pr=function(e,t,n,r){var o=a.Z.createStore(mr,br,gr(gr({},{scrollBehaviour:"inline"}),t),Or);b.Z.setInputEnvs(t),l.Z.addToStore(o,(function(e){return a.Z.getEvents(jr,e.input)})),c.Z.addToStore(o),s.Z.dynamicActionsAddToStore(o),u.Z.addToStore(o,!0,["console","remote","notification"]);var i=!n.emitAction;d.Z.addToStore(o,i);var f=Array.isArray(t.rootNodes)&&1===t.rootNodes.length&&"Resource"!==t.rootNodes[0].entityName?t.rootNodes[0]:null,y=f?"/docs/".concat(f.entityName.toLowerCase(),"/").concat(f.key,"/list"):"/docs",h=function(e){var t=e.routerType,n=e.store,r=e.rootPath,o=e.handleNotifications;if("routerless"===t)return(0,Y.jsx)(Et,{rootPath:r,handleNotifications:o});if("inherit"===t)return(0,Y.jsx)(Ct,{rootPath:r,handleNotifications:o});var i=p.Z.createHistory(n);return(0,Y.jsx)(Nt,{history:i,rootPath:r,handleNotifications:o})}({routerType:t.routerType,store:o,rootPath:y,handleNotifications:i});return a.Z.createApp(Or,h,o,{input:t,events:n,actions:[(0,$n.c4)(t.initialLocation)],publicPath:r,textResourceModules:["component","common","actions","entity-list","entity-detail",Or]})},wr=function(e){var t=a.Z.useApp({initApp:Pr,props:e,packageName:Or,externalEvents:jr}).component;return(0,Y.jsx)(Y.Fragment,{children:t})};wr.propTypes=gr({routerType:i().oneOf(["standalone","inherit","routerless"]),navigationStrategy:i().object,domainTypes:i().arrayOf(i().string),rootNodes:i().arrayOf(i().shape({entityName:i().string,key:i().string})),initialLocation:i().string,listLimit:i().oneOfType([i().number,i().string]),documentDetailFormName:i().string,searchFormType:f.b,selectionStyle:y.l,selectionFilterFn:i().func,selection:i().arrayOf(i().string),scrollBehaviour:h.a,getListFormName:i().func,disableViewPersistor:i().bool,getCustomLocation:i().func,businessUnit:i().string,searchFormCollapsed:i().bool,backendUrl:i().string,appContext:m.Z.propTypes},jr.reduce((function(e,t){return e[t]=i().func,e}),{}));const xr=wr;a.Z.createBundleableApp(Or,Pr,wr)},30081:(e,t,n)=>{n.d(t,{F$:()=>c,FV:()=>i,j2:()=>a,p0:()=>u,qh:()=>r,uI:()=>o,w6:()=>s,xv:()=>l});var r="docs/move/INITIALIZE",o="docs/move/MOVE_ELEMENTS",i="docs/move/SET_WAITING",c="docs/move/CLOSE",a=function(e,t,n){return{type:r,payload:{selection:e,onSuccess:t,onError:n}}},s=function(e,t){return{type:o,payload:{target:e,selected:t}}},u=function(){return{type:i,payload:{isWaiting:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}},l=function(){return{type:c}}},40602:(e,t,n)=>{n.d(t,{PX:()=>c,RK:()=>r,Sb:()=>o,c4:()=>i});var r="docs/routing/NAVIGATE",o="docs/routing/SET_PARAMS",i=function(e){return{type:r,payload:{path:e||""}}},c=function(e){return{type:o,payload:{params:e}}}},80722:(e,t,n)=>{n.d(t,{Z:()=>i});var r=/^\/docs\/doc\/(\d+)\/detail$/,o=/^\/docs\/(domain|folder)\/(\d+)\/list$/;const i=function(e){return function(e){var t=r.exec(e);return t&&t.length>=2?{model:"Resource",key:t[1]}:null}(e)||function(e){var t=o.exec(e);return t&&t.length>=3?{model:t[1].charAt(0).toUpperCase()+t[1].slice(1),key:t[2]}:null}(e)}},1317:(e,t,n)=>{n.d(t,{C:()=>f,w:()=>d});var r=n(4942),o=n(50558),i=n(56746),c=n(40602),a=n(85893);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}function u(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){(0,r.Z)(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}var l=function(){return function(){}},p={navigate:c.c4},d=(0,o.connect)((function(e){return{path:e.docs.routing.path,params:e.docs.routing.params,listenHistory:l}}),p),f=function(e){return function(t){var n=(0,i.TH)(),r=(0,i.k6)(),o=(0,i.UO)();return(0,a.jsx)(e,u(u({},t),{},{path:n.pathname,navigate:r.push,params:o,listenHistory:r.listen}))}}},20247:(e,t,n)=>{n.d(t,{U:()=>d});var r=n(4942),o=n(44925),i=n(50558),c=n(1317),a=n(85893),s=["compProviderRouterType"];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 l(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){(0,r.Z)(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 p=function(e){return{compProviderRouterType:e.input.routerType}},d=function(e){var t=e.routerless,n=e.router,r=t?(0,c.w)(t):(0,c.w)(e),u=n?(0,c.C)(n):(0,c.C)(e);return(0,i.connect)(p)((function(e){var t=e.compProviderRouterType,n=(0,o.Z)(e,s);return"routerless"===t?(0,a.jsx)(r,l({},n)):(0,a.jsx)(u,l({},n))}))}},3044:(e,t,n)=>{n.r(t),n.d(t,{default:()=>he});var r,o=n(56746),i=n(44845),c=n(74806),a=n(50558),s=n(97722),u=n(4942),l=n(44925),p=n(27361),d=n.n(p),f=n(1024),y=n(97890),h=n(30168),m=n(96559),b=n(67165),v=n(30759),g=n(24875);const O=(0,b.ZP)(m.rU)(r||(r=(0,h.Z)(["\n ","\n text-decoration: none;\n color: ",";\n\n * {\n color: ",";\n text-decoration: none;\n }\n\n &:hover,\n &:hover *,\n &:focus,\n &:focus * {\n color: ",";\n text-decoration: ",";\n }\n\n &:active,\n &:active * {\n color: ",";\n text-decoration: ",";\n }\n"])),(0,v.Z)(),g.FS.color("secondary"),g.FS.color("text"),g.FS.color("secondaryLight"),(function(e){return e.neutral?"none":"underline"}),(function(e){return e.neutral?g.FS.color("text"):g.FS.color("secondaryLight")}),(function(e){return e.neutral?"none":"underline"}));var j=n(85893),P=function(e){var t=e.currentKey,n=e.entityKey,r=e.children,o=e.relation;return(0,j.jsx)(O,{to:"".concat(t,"/").concat(o,"/").concat(n),children:r})};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){(0,u.Z)(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}const Z=function(e,t,n){return{DetailLinkRelative:function(e){return(0,j.jsx)(P,x(x({},e),{},{currentKey:n}))},navigateToCreateRelative:function(n){var r;if(null!==(r=t.params)&&void 0!==r&&r.entityId){var o=t.url;if(n)e.push("".concat(o,"/").concat(n,"/"));else{var i=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.replace(/\/$/,""),r=0;r<t;r++)n=n.substring(0,n.lastIndexOf("/")+1);return n}(o,1);e.push(i)}}else e.push("/detail")},navigateToActionRelative:function(t,n){var r=y.Z.toQueryString({selection:n,actionProperties:t.properties});e.push({pathname:"/action/"+t.appId,state:{definition:t,selection:n,originUrl:e.location.pathname},search:r})}}};var S="list",E="detail",D="fullscreen-action",k=n(9538),C={copy:(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,12751))})),delete:(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,32454))})),export:(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,23458))})),"input-edit":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,93137))})),"subscribe-calendar":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,80634))})),"mailing-list-mail-action":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,67565))})),"evaluation-execution-participation-action":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,62632))})),"event-registration-action":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,96699))})),"job-offer-apply":(0,f.lazy)((function(){return Promise.all([n.e(809),n.e(741),n.e(240),n.e(861),n.e(213),n.e(107)]).then(n.bind(n,49819))}))};const F=function(){return k.Z.actionFactory(C)};var A=["fireVisibilityStatusChangeEvent"];function N(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const T=function(e){var t=e.fireVisibilityStatusChangeEvent,n=(0,l.Z)(e,A),r=n.router,o=r.history,i=r.location,c=r.match,a=y.Z.fromQueryString(i.search),s=d()(i,"state.selection",a.selection),u=d()(i,"state.definition.properties",a.actionProperties);(0,f.useEffect)((function(){t([D])}),[t]);var p=function(){var e,t=(null===(e=i.state)||void 0===e?void 0:e.originUrl)||"/";o.replace(t)},h=F();return(0,j.jsx)(h,I(I(I({appId:c.params.appId,onSuccess:p,onError:p,onCancel:p,navigationStrategy:Z(o,c)},n),a),{},{selection:s,actionProperties:u}))};var R={fireVisibilityStatusChangeEvent:s.Z.fireVisibilityStatusChangeEvent};const L=(0,a.connect)((function(e){return{locale:e.intl.locale,customActionEventHandlers:e.input.customActionEventHandlers}}),R)((0,c.ZP)(T));var _=n(54563),B=n(6766),M=n(30314),z=n(78125),V=n(42845),W=n(34240),U=n(10129),H=n(84086);const $=function(e){var t=e.when,n=e.message;return(0,f.useEffect)((function(){return t&&H.Z.activatePreventFromLeaving(),function(){H.Z.deactivatePreventFromLeaving()}}),[t]),(0,j.jsx)(o.NL,{when:t,message:n})};var q=n(64687),Y=n.n(q),K=n(24970),G=n(48901),X=Y().mark(Q);function Q(e,t,n){var r,o,i,c,a,s,u,l,p,d,f,y;return Y().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:if(r=n.detailParams,o=void 0===r?{}:r,i=n.intl,!(c=n.modifyFormDefinition)){h.next=7;break}return h.next=4,(0,K.RE)(c,e,t);case 4:h.t0=h.sent,h.next=8;break;case 7:h.t0=e;case 8:return a=h.t0,u=(s=t||{}).entityName,l=s.entityId,p=o.entityName,d=o.entityId,f=o.showBackButton,y=f&&u===p&&l===d,h.abrupt("return",y?G.Z.addBack(a,i):a);case 13:case"end":return h.stop()}}),X)}const J=function(e){var t,n=e.loadDetailParams,r=e.router,o=e.setFormTouched,i=e.clearDetailParams,c=e.detailParams,a=e.appId,s=e.modifyEntityPaths,u=e.intl,l=e.dispatchEmittedAction,p=e.formTouched,d=e.locale,y=e.reportIds,h=e.fireVisibilityStatusChangeEvent,m=e.scrollBehaviour,b=e.customActionEventHandlers;(0,f.useEffect)((function(){return n(r.match.url),o(!1),function(){i()}}),[i,n,r.match.url,o]),(0,f.useEffect)((function(){h([E])}),[h]);var v,g,O,P,w,x=function(e){return u.formatMessage({id:e})},S=function(e){var t=e.id,n=e.relationName;r.history.push("".concat(r.match.url,"/").concat(n,"/").concat(t))},D=function(e){var t=e.id,n=e.followUp;(0,M.flushSync)((function(){o(!1)}));var i=r.match.url,c="/"!==i.substr(-1)?i+"/":i;r.history.push({pathname:c+t,state:null!=n&&n.action?{action:n.action}:{}})},k=function(e){var t=e.touched;o(t)},C=function(){r.history.push(c.parentUrl)},A={back:function(){return(0,j.jsx)(U.Z,{onClick:C,label:x("client.entity-browser.back")})}},N=null===(t=r.history.location)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.action;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)($,{when:p,message:x("client.entity-browser.detail.confirmTouchedFormLeave")}),c&&(0,j.jsx)(j.Fragment,{children:(v=c,g=v.entityName,O=v.entityId,P=v.formName,w=v.mode,(0,j.jsx)(V.ZP,{id:"".concat(a,"_detail_").concat(P,"_").concat(O),entityName:g,entityId:O,formName:P,mode:w,navigationStrategy:Z(r.history,r.match,O),onSubGridRowClick:S,onEntityCreated:D,onEntityDeleted:C,onTouchedChange:k,emitAction:function(e){l(e)},theme:{},locale:d,modifyFormDefinition:function(t,n){return Q(t,n,e)},modifyEntityPaths:s,actionAppComponent:F(),reportIds:y,customRenderedActions:A,listApp:W.ZP,docsApp:z.ZP,scrollBehaviour:m,customActionEventHandlers:b,initialAction:N}))})]})};var ee={loadDetailParams:B.E,clearDetailParams:B.W8,setFormTouched:B.A9,dispatchEmittedAction:_.Z.dispatchEmittedAction,fireVisibilityStatusChangeEvent:s.Z.fireVisibilityStatusChangeEvent};const te=(0,a.connect)((function(e,t){return{appId:e.entityBrowser.appId,detailParams:e.detail.detailParams,formTouched:e.detail.formTouched,scrollBehaviour:e.entityBrowser.scrollBehaviour,locale:e.intl.locale,modifyFormDefinition:e.input.modifyFormDefinition,modifyEntityPaths:e.input.modifyEntityPaths,reportIds:e.input.reportIds,customActionEventHandlers:e.input.customActionEventHandlers}}),ee)((0,c.ZP)(J));var ne=n(31876),re=["storeId","router","modifyFormDefinition","disableDetailView","fireVisibilityStatusChangeEvent","customActionEventHandlers"];function oe(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?oe(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=function(e){var t=e.entityKey,n=e.children;return(0,j.jsx)(O,{to:"detail/".concat(t),children:n})};const ae=function(e){var t=e.storeId,n=e.router,r=e.modifyFormDefinition,o=e.disableDetailView,i=e.fireVisibilityStatusChangeEvent,c=e.customActionEventHandlers,a=(0,l.Z)(e,re);(0,f.useEffect)((function(){i([S])}),[i]);return(0,j.jsx)(W.ZP,ie(ie({},a),{},{onRowClick:function(e){o||n.history.push("/detail/".concat(e.id))},showLink:!o,navigationStrategy:ie(ie({},Z(n.history,n.match)),{},{DetailLinkRelative:ce}),searchFormPosition:"top",actionAppComponent:F(),store:ne.Z.viewInfoSelector(t).store,onStoreCreate:function(e){ne.Z.persistViewInfo(t,{store:e},0)},modifyFormDefinition:r,customActionEventHandlers:c,detailApp:V.ZP}))};var se={emitAction:function(e){return _.Z.dispatchEmittedAction(e)},fireVisibilityStatusChangeEvent:s.Z.fireVisibilityStatusChangeEvent};const ue=(0,a.connect)((function(e,t){var n="".concat(e.entityBrowser.appId,"_entity-browser-list");return{id:n,storeId:"".concat(n,"_").concat(t.router.history.location.pathname),locale:e.intl.locale,entityName:e.entityBrowser.entityName,formName:e.entityBrowser.formBase,scrollBehaviour:e.entityBrowser.scrollBehaviour,searchFormType:e.input.searchFormType||"simple_advanced",limit:e.input.limit,searchFilters:e.input.searchFilters,preselectedSearchFields:e.input.preselectedSearchFields,simpleSearchFields:e.input.simpleSearchFields,modifyFormDefinition:e.input.modifyFormDefinition,disableDetailView:e.input.disableDetailView,reportIds:e.input.reportIds,customActionEventHandlers:e.input.customActionEventHandlers}}),se)(ae);var le,pe=n(88601),de=n(7281);const fe=b.ZP.div.withConfig({displayName:"StyledEntityBrowser"})(le||(le=(0,h.Z)(["\n && {\n background-color: ",";\n padding: ",";\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n }\n"])),pe.Z.color("paper"),de.Z.space(0));var ye;const he=function(){return(0,j.jsxs)(fe,{children:[ye||(ye=(0,j.jsx)(i.Z.Notifications,{})),(0,j.jsxs)(o.rs,{children:[(0,j.jsx)(o.AW,{path:"/",exact:!0,render:function(e){return(0,j.jsx)(ue,{router:e})}}),(0,j.jsx)(o.AW,{path:"/detail/:entityId*",render:function(e){return(0,j.jsx)(te,{router:e})}}),(0,j.jsx)(o.AW,{path:"/action/:appId*",render:function(e){return(0,j.jsx)(L,{router:e})}})]})]})}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunktocco_=self.webpackChunktocco_||[]).push([[470],{14505:(t,r,e)=>{"use strict";e.d(r,{i:()=>c});var n=e(89062),o=e(18704),c=function(t,r){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.reduce((function(r,c){return void 0!==t[c.name]&&"function"==typeof c.action?r.push(c.action.apply(c,(0,n.Z)(c.argsFactory(t)))):c.mandatory&&e&&o.Z.logError("Mandatory field '".concat(c.name,"' not set in input")),r}),[])}},47369:(t,r,e)=>{"use strict";e.d(r,{Z:()=>n});const n={getDispatchActions:e(14505).i}},82445:(t,r,e)=>{"use strict";e.r(r),e.d(r,{default:()=>f});var n=e(4942),o=e(42845),c=e(34240),i=e(78125),u=e(85893);function a(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function s(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?a(Object(e),!0).forEach((function(r){(0,n.Z)(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}const f=function(t){return(0,u.jsx)(o.ZP,s(s({},t),{},{listApp:c.ZP,docsApp:i.ZP}))}},47556:(t,r,e)=>{var n=e(88668),o=e(47443),c=e(1196),i=e(29932),u=e(7518),a=e(74757),s=Math.min;t.exports=function(t,r,e){for(var f=e?c:o,p=t[0].length,l=t.length,v=l,h=Array(l),g=1/0,y=[];v--;){var O=t[v];v&&r&&(O=i(O,u(r))),g=s(O.length,g),h[v]=!e&&(r||p>=120&&O.length>=120)?new n(v&&O):void 0}O=t[0];var b=-1,d=h[0];t:for(;++b<p&&y.length<g;){var j=O[b],P=r?r(j):j;if(j=e||0!==j?j:0,!(d?a(d,P):f(y,P,e))){for(v=l;--v;){var w=h[v];if(!(w?a(w,P):f(t[v],P,e)))continue t}d&&d.push(P),y.push(j)}}return y}},24387:(t,r,e)=>{var n=e(29246);t.exports=function(t){return n(t)?t:[]}},25325:(t,r,e)=>{var n=e(29932),o=e(47556),c=e(5976),i=e(24387),u=c((function(t){var r=n(t,i);return r.length&&r[0]===t[0]?o(r):[]}));t.exports=u},44049:(t,r,e)=>{"use strict";e.d(r,{Z:()=>o});var n=e(68507);const o=(c=n.Z,i=c.getIn,function(t,r){return function(e){var n=r||function(t){return i(t,"form")};return i(n(e),t+".initial")}});var c,i}}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunktocco_=self.webpackChunktocco_||[]).push([[981],{44020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var o=i(r[0]);o!==r[0]&&(t[r[0]]=o)}r=n.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),a=0;a<s.length;a++){var c=s[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},92806:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;i<n.length;i++){var s=n[i],a=e[s];(o?-1!==t.indexOf(s):t(s,a,e))&&(r[s]=a)}return r}},47556:(e,t,r)=>{var n=r(88668),o=r(47443),i=r(1196),s=r(29932),a=r(7518),c=r(74757),l=Math.min;e.exports=function(e,t,r){for(var u=r?i:o,d=e[0].length,h=e.length,p=h,f=Array(h),g=1/0,m=[];p--;){var y=e[p];p&&t&&(y=s(y,a(t))),g=l(y.length,g),f[p]=!r&&(t||d>=120&&y.length>=120)?new n(p&&y):void 0}y=e[0];var v=-1,E=f[0];e:for(;++v<d&&m.length<g;){var w=y[v],b=t?t(w):w;if(w=r||0!==w?w:0,!(E?c(E,b):u(m,b,r))){for(p=h;--p;){var C=f[p];if(!(C?c(C,b):u(e[p],b,r)))continue e}E&&E.push(b),m.push(w)}}return m}},24387:(e,t,r)=>{var n=r(29246);e.exports=function(e){return n(e)?e:[]}},71843:(e,t,r)=>{var n=r(29932),o=r(47556),i=r(67206),s=r(5976),a=r(24387),c=r(10928),l=s((function(e){var t=c(e),r=n(e,a);return t===c(r)?t=void 0:r.pop(),r.length&&r[0]===e[0]?o(r,i(t,2)):[]}));e.exports=l},77043:(e,t,r)=>{var n=r(21078),o=r(67206),i=r(5976),s=r(45652),a=r(29246),c=r(10928),l=i((function(e){var t=c(e);return a(t)&&(t=void 0),s(n(e,1,a,!0),o(t,2))}));e.exports=l},84059:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>I});var n,o=r(1024),i=r.n(o),s=Object.defineProperty,a=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&u(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&u(e,r,t[r]);return e},h=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))t.indexOf(n)<0&&l.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(o=t,e=r),this.applyMask(t)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,r,o=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=o&&o<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=o;;u++){const n=8*t.getNumDataCodewords(u,r),o=a.getTotalBits(e,u);if(o<=n){d=o;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(r=e);let h=[];for(const t of e){n(t.mode.modeBits,4,h),n(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}i(h.length==d);const p=8*t.getNumDataCodewords(u,r);i(h.length<=p),n(0,Math.min(4,p-h.length),h),n(0,(8-h.length%8)%8,h),i(h.length%8==0);for(let e=236;h.length<p;e^=253)n(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,r,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);i(n>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(n,e));this.setFunctionModule(8,7,o(n,6)),this.setFunctionModule(8,8,o(n,7)),this.setFunctionModule(7,8,o(n,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(n,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(n,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(n,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){const r=o(t,e),n=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(n,i,r),this.setFunctionModule(i,n,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,s=t+r;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],a=Math.floor(t.getNumRawDataModules(r)/8),c=o-a%o,l=Math.floor(a/o);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let r=0,n=0;r<o;r++){let o=e.slice(n,n+l-s+(r<c?0:1));n+=o.length;const i=t.reedSolomonComputeRemainder(o,d);r<c&&o.push(0),u.push(o.concat(i))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=l-s||r>=c)&&h.push(t[e])}));return i(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let i=0;i<2;i++){const s=t-i,a=0==(t+1&2)?this.size-1-n:n;!this.isFunction[a][s]&&r<8*e.length&&(this.modules[a][s]=o(e[r>>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[r][s],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[s][r],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const o=this.modules[r][n];o==this.modules[r][n+1]&&o==this.modules[r+1][n]&&o==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),e+=o*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function o(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const s=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const o=Math.min(e.length-r,3);n(parseInt(e.substr(r,o),10),3*o+1,t),r+=o}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let o=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(o,11,r)}return t<e.length&&n(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new s(s.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var p=n,f={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},g=128,m="L",y="#FFFFFF",v="#000000",E=!1,w=4,b=.1;
1
+ (self.webpackChunktocco_=self.webpackChunktocco_||[]).push([[741],{44020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var o=i(r[0]);o!==r[0]&&(t[r[0]]=o)}r=n.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),a=0;a<s.length;a++){var c=s[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},92806:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;i<n.length;i++){var s=n[i],a=e[s];(o?-1!==t.indexOf(s):t(s,a,e))&&(r[s]=a)}return r}},47556:(e,t,r)=>{var n=r(88668),o=r(47443),i=r(1196),s=r(29932),a=r(7518),c=r(74757),l=Math.min;e.exports=function(e,t,r){for(var u=r?i:o,d=e[0].length,h=e.length,p=h,f=Array(h),g=1/0,m=[];p--;){var y=e[p];p&&t&&(y=s(y,a(t))),g=l(y.length,g),f[p]=!r&&(t||d>=120&&y.length>=120)?new n(p&&y):void 0}y=e[0];var v=-1,E=f[0];e:for(;++v<d&&m.length<g;){var w=y[v],b=t?t(w):w;if(w=r||0!==w?w:0,!(E?c(E,b):u(m,b,r))){for(p=h;--p;){var C=f[p];if(!(C?c(C,b):u(e[p],b,r)))continue e}E&&E.push(b),m.push(w)}}return m}},24387:(e,t,r)=>{var n=r(29246);e.exports=function(e){return n(e)?e:[]}},25325:(e,t,r)=>{var n=r(29932),o=r(47556),i=r(5976),s=r(24387),a=i((function(e){var t=n(e,s);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},71843:(e,t,r)=>{var n=r(29932),o=r(47556),i=r(67206),s=r(5976),a=r(24387),c=r(10928),l=s((function(e){var t=c(e),r=n(e,a);return t===c(r)?t=void 0:r.pop(),r.length&&r[0]===e[0]?o(r,i(t,2)):[]}));e.exports=l},77043:(e,t,r)=>{var n=r(21078),o=r(67206),i=r(5976),s=r(45652),a=r(29246),c=r(10928),l=i((function(e){var t=c(e);return a(t)&&(t=void 0),s(n(e,1,a,!0),o(t,2))}));e.exports=l},84059:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>I});var n,o=r(1024),i=r.n(o),s=Object.defineProperty,a=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&u(e,r,t[r]);if(a)for(var r of a(t))l.call(t,r)&&u(e,r,t[r]);return e},h=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))t.indexOf(n)<0&&l.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(o=t,e=r),this.applyMask(t)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,r,o=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=o&&o<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=o;;u++){const n=8*t.getNumDataCodewords(u,r),o=a.getTotalBits(e,u);if(o<=n){d=o;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(r=e);let h=[];for(const t of e){n(t.mode.modeBits,4,h),n(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}i(h.length==d);const p=8*t.getNumDataCodewords(u,r);i(h.length<=p),n(0,Math.min(4,p-h.length),h),n(0,(8-h.length%8)%8,h),i(h.length%8==0);for(let e=236;h.length<p;e^=253)n(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,r,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);i(n>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(n,e));this.setFunctionModule(8,7,o(n,6)),this.setFunctionModule(8,8,o(n,7)),this.setFunctionModule(7,8,o(n,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(n,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(n,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(n,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){const r=o(t,e),n=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(n,i,r),this.setFunctionModule(i,n,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,s=t+r;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],a=Math.floor(t.getNumRawDataModules(r)/8),c=o-a%o,l=Math.floor(a/o);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let r=0,n=0;r<o;r++){let o=e.slice(n,n+l-s+(r<c?0:1));n+=o.length;const i=t.reedSolomonComputeRemainder(o,d);r<c&&o.push(0),u.push(o.concat(i))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=l-s||r>=c)&&h.push(t[e])}));return i(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let i=0;i<2;i++){const s=t-i,a=0==(t+1&2)?this.size-1-n:n;!this.isFunction[a][s]&&r<8*e.length&&(this.modules[a][s]=o(e[r>>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[r][s],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[s][r],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const o=this.modules[r][n];o==this.modules[r][n+1]&&o==this.modules[r+1][n]&&o==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),e+=o*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function o(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const s=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const o=Math.min(e.length-r,3);n(parseInt(e.substr(r,o),10),3*o+1,t),r+=o}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let o=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(o,11,r)}return t<e.length&&n(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new s(s.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var p=n,f={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},g=128,m="L",y="#FFFFFF",v="#000000",E=!1,w=4,b=.1;
2
2
  /**
3
3
  * @license qrcode.react
4
4
  * Copyright (c) Paul O'Shannessy
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunktocco_=self.webpackChunktocco_||[]).push([[861],{1084:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(4942),i=n(64687),a=n.n(i),o=n(24970),s=n(83665),c=n(72007);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 l(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){(0,r.Z)(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 f=a().mark(m),d=a().mark(v),p=a().mark(x),y=a().mark(h);function m(e,t,n,r){var i,s;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=n.filter((function(e){return"display"===e.componentType})).map((function(e){return e.id})),a.next=3,(0,o.RE)(v,t,r,i,[e]);case 3:(s=a.sent)&&Object.keys(s[e.__key]).forEach((function(t){e[t]=s[e.__key][t]}));case 5:case"end":return a.stop()}}),f)}function v(e,t,n,r){var i,s;return a().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(n&&n.length>0)){a.next=6;break}return i=r.map((function(e){return e.__key})),s=r[0].__model,a.next=5,(0,o.RE)(c.Z.fetchDisplayExpressions,e,t,i,n,s);case 5:return a.abrupt("return",a.sent);case 6:case"end":return a.stop()}}),d)}function x(e,t){var n,r;return a().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return n=t.filter((function(e){return s.Z.relationFieldTypes.includes(e.dataType)})).map((function(e){return e.path})),i.next=3,(0,o.RE)(h,n,[e]);case 3:r=i.sent,n.forEach((function(t){var n=e[t];n&&(e[t]=Array.isArray(n)?n.filter((function(e){return null!==e})).map((function(e){return l(l({},e),{},{display:r[e.model][e.key]})})):l(l({},n),{},{display:r[n.model][n.key]}))}));case 5:case"end":return i.stop()}}),p)}function h(e,t){var n;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(e&&e.length>0)){r.next=7;break}return r.next=3,(0,o.RE)(s.Z.getPathDisplayRequest,t,e,{});case 3:return n=r.sent,r.next=6,(0,o.RE)(c.Z.fetchDisplays,n);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),y)}const E={enhanceEntityWithDisplayExpressions:m,enhanceEntityWithDisplays:x}},40853:(e,t,n)=>{n.d(t,{N:()=>u,W:()=>l});var r,i,a=n(30168),o=n(67165),s=n(65035),c=n(24875),u=(0,o.ZP)(s.Z).withConfig({displayName:"StyledSaveButton"})(r||(r=(0,a.Z)(["\n border: 1px solid transparent;\n ","\n display: block;\n"])),(function(e){var t=e.hasErrors,n=e.theme;return t&&"\n border-color: ".concat(n.colors.signal.danger,";\n background-color: ").concat(n.colors.paper,";\n &:hover {\n background-color: ").concat(n.colors.signal.danger,";\n color: ").concat(n.colors.paper,";\n }\n ")})),l=o.ZP.span.withConfig({displayName:"StyledActionSpan"})(i||(i=(0,a.Z)(["\n cursor: pointer;\n display: flex;\n height: 100%;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n &:hover {\n color: ",";\n }\n ","\n"])),c.FS.color("secondaryLight"),(function(e){var t=e.marked,n=e.theme;return t&&"color: ".concat(n.colors.secondary,";")}))},19816:(e,t,n)=>{if(n.d(t,{h:()=>c}),99!=n.j)var r=n(89062);if(99!=n.j)var i=n(93324);var a=n(25325),o=n.n(a),s=function e(t){var n=Object.entries(t).filter((function(e){var t=(0,i.Z)(e,2),n=(t[0],t[1]);return n.writable&&"entity"!==n.type})).map((function(e){var t=(0,i.Z)(e,2),n=t[0];t[1];return n})),a=Object.entries(t).filter((function(e){var t=(0,i.Z)(e,2),n=(t[0],t[1]);return"entity"===n.type&&null!==n.value})).flatMap((function(t){var n=(0,i.Z)(t,2),r=n[0],a=n[1];return e(a.value.paths).map((function(e){return"".concat(r,".").concat(e)}))}));return[].concat((0,r.Z)(n),(0,r.Z)(a))},c=function(e,t){var n=s(e),r=t.filter((function(e){return!e.readonly})).map((function(e){return e.path}));return o()(n,r).length>0}},74827:(e,t,n)=>{if(n.d(t,{Z:()=>c}),99!=n.j)var r=n(21261);if(99!=n.j)var i=n(94251);if(99!=n.j)var a=n(32422);if(99!=n.j)var o=n(52923);var s=n(85893);const c=99!=n.j?function(e){var t=e.entity,n=e.keyField;return(0,s.jsxs)(i.Y5,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{labelId:"client.entity-detail.footer.created",valueComponent:function(){return(0,s.jsx)(o.Z,{value:t.paths.create_timestamp.value})}}),(0,s.jsx)(r.Z,{labelId:"client.entity-detail.footer.by",valueComponent:function(){return(0,s.jsx)(a.Z,{value:t.paths.create_user.value})}})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{labelId:"client.entity-detail.footer.updated",valueComponent:function(){return(0,s.jsx)(o.Z,{value:t.paths.update_timestamp.value})}}),(0,s.jsx)(r.Z,{labelId:"client.entity-detail.footer.by",valueComponent:function(){return(0,s.jsx)(a.Z,{value:t.paths.update_user.value})}})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{labelId:"client.entity-detail.footer.version",valueComponent:function(){return(0,s.jsx)(a.Z,{value:t.paths.version.value})}}),(0,s.jsx)(r.Z,{labelId:"client.entity-detail.footer.key",valueComponent:function(){return(0,s.jsx)(a.Z,{value:t.paths[n].value})}})]})]})}:null},54044:(e,t,n)=>{if(n.d(t,{Z:()=>s}),99!=n.j)var r=n(21261);if(99!=n.j)var i=n(94251);if(99!=n.j)var a=n(32422);var o=n(85893);const s=99!=n.j?function(e){var t=e.entity,n=e.keyField;return(0,o.jsx)(i.Y5,{children:(0,o.jsx)("div",{children:(0,o.jsx)(r.Z,{labelId:"client.entity-detail.footer.key",valueComponent:function(){return(0,o.jsx)(a.Z,{value:t.paths[n].value})}})})})}:null},21261:(e,t,n)=>{if(n.d(t,{Z:()=>o}),99!=n.j)var r=n(44012);if(99!=n.j)var i=n(94251);var a=n(85893);const o=99!=n.j?function(e){var t=e.labelId,n=e.valueComponent;return(0,a.jsxs)(i.nJ,{children:[(0,a.jsxs)(i.L5,{children:[(0,a.jsx)(r.Z,{id:t}),":"]}),(0,a.jsx)(i.fk,{children:(0,a.jsx)(n,{})})]})}:null},94251:(e,t,n)=>{n.d(t,{GW:()=>Z,L5:()=>h,Y5:()=>v,fk:()=>E,mk:()=>g,nJ:()=>x});var r,i,a,o,s,c,u=n(30168),l=n(67165),f=n(7281),d=n(40953),p=n(69829),y=n(88601),m=n(19704),v=l.ZP.div.withConfig({displayName:"StyledFooterWrapper"})(r||(r=(0,u.Z)(["\n max-width: 650px;\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: ",";\n margin-right: ",";\n\n && {\n * {\n color: ",";\n font-size: ",";\n }\n }\n"])),f.Z.font(0),f.Z.font(0),d.v.shade2,f.Z.font(-.8)),x=l.ZP.div.withConfig({displayName:"StyledFooterItemWrapper"})(i||(i=(0,u.Z)(["\n display: flex;\n"]))),h=(0,l.ZP)(p.Fe).withConfig({displayName:"StyledFooterItemLabel"})(a||(a=(0,u.Z)(["\n && {\n margin-right: ",";\n font-weight: ",";\n ","\n }\n"])),f.Z.space(-1.37),y.Z.fontWeight("bold"),m.l),E=l.ZP.span.withConfig({displayName:"StyledFooterItemValue"})(o||(o=(0,u.Z)(["\n flex: 1;\n overflow: hidden;\n"]))),Z=l.ZP.span.withConfig({displayName:"StyledTimestampValueWrapper"})(s||(s=(0,u.Z)(["\n display: flex;\n"]))),g=(0,l.ZP)(p.Fe).withConfig({displayName:"StyledTimestampRelativeValue"})(c||(c=(0,u.Z)(["\n && {\n margin-left: ",";\n }\n"])),f.Z.space(-1.37))},32422:(e,t,n)=>{if(n.d(t,{Z:()=>a}),99!=n.j)var r=n(70310);var i=n(85893);const a=99!=n.j?function(e){var t=e.value;return(0,i.jsx)(r.ZP.Span,{children:t})}:null},52923:(e,t,n)=>{if(n.d(t,{Z:()=>c}),99!=n.j)var r=n(48272);if(99!=n.j)var i=n(56882);if(99!=n.j)var a=n(25638);if(99!=n.j)var o=n(94251);var s=n(85893);const c=99!=n.j?function(e){var t=e.value,n=a.Z.selectUnit(new Date(t));return(0,s.jsxs)(o.GW,{children:[(0,s.jsx)(i.Z,{value:t,type:"datetime"}),(0,s.jsxs)(o.mk,{children:["(",(0,s.jsx)(r.Z,{value:n.diffValue,unit:n.unit}),")"]})]})}:null},9840:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(30168);if(99!=n.j)var i=n(44012);if(99!=n.j)var a=n(48272);var o=n(67165);if(99!=n.j)var s=n(48901);var c=n(7281);if(99!=n.j)var u=n(70310);if(99!=n.j)var l=n(25638);var f,d,p,y,m,v=n(85893),x=o.ZP.div.withConfig({displayName:"StyledErrorItemWrapper"})(f||(f=(0,r.Z)(["\n &:not(:last-child) {\n margin-bottom: ",";\n }\n"])),c.Z.space(.4));const h=99!=n.j?function(e){var t=e.formErrors,n=null,r=[],o=s.Z.formErrorsUtil.hasFieldErrors(t),c=s.Z.formErrorsUtil.hasValidatorErrors(t),f=s.Z.formErrorsUtil.hasRelatedEntityErrors(t),h=s.Z.formErrorsUtil.getValidatorErrors(t),E=s.Z.formErrorsUtil.getRelatedEntityErrorsCompact(t);if(s.Z.formErrorsUtil.hasOutdatedError(t)){var Z=s.Z.formErrorsUtil.getOutdatedError(t),g=l.Z.selectUnit(new Date(Z.updateTimestamp)),b="client.entity-detail.".concat(Z.sameEntity?"outdated":"relatedOutdated","ErrorTitle");r.push((0,v.jsxs)(x,{children:[(0,v.jsx)(u.ZP.H5,{children:(0,v.jsx)(i.Z,{id:b,values:{model:Z.model,key:Z.key}})}),(0,v.jsx)(i.Z,{id:"client.entity-detail.outdatedErrorDescription",values:{ago:(0,v.jsx)(a.Z,{value:g.diffValue,unit:g.unit}),user:Z.updateUser}})]},"outDatedError"))}return o&&r.push(c||f?p||(p=(0,v.jsx)(x,{children:(0,v.jsx)(u.ZP.H5,{children:(0,v.jsx)(i.Z,{id:"client.entity-detail.invalidFieldsError"})})},"hasFieldErrors")):d||(d=(0,v.jsx)(x,{children:(0,v.jsx)(i.Z,{id:"client.entity-detail.invalidFieldsError"})},"hasFieldErrors"))),c&&r.push((0,v.jsxs)(x,{children:[y||(y=(0,v.jsx)(u.ZP.H5,{children:(0,v.jsx)(i.Z,{id:"client.entity-detail.validatorErrors"})})),h.map((function(e,t){return(0,v.jsx)(s.Z.ErrorItem,{message:e},t)}))]},"hasValidatorErrors")),f&&r.push((0,v.jsxs)(x,{children:[m||(m=(0,v.jsx)(u.ZP.H5,{children:(0,v.jsx)(i.Z,{id:"client.entity-detail.invalidRelationErrors"})})),E.map((function(e,t){return(0,v.jsx)(s.Z.ErrorItem,{message:e},t)}))]},"hasRelatedEntityErrors")),r.length>0&&(n=(0,v.jsx)(v.Fragment,{children:r.map((function(e){return e}))})),n}:null},49983:(e,t,n)=>{if(n.d(t,{Z:()=>i}),99!=n.j)var r=n(9840);const i=99!=n.j?r.Z:null},20428:(e,t,n)=>{n.d(t,{Z:()=>d});var r,i=n(30168),a=n(67165),o=n(34240),s=n(31876),c=n(42845),u=n(85893),l=a.ZP.div.withConfig({displayName:"StyledListApp"})(r||(r=(0,i.Z)(["\n width: 100%;\n"]))),f=function(e){var t="".concat(e.detailFormName,"_").concat(e.formField.formSuffix),n="".concat(e.appId,"-subgrid-").concat(e.entityName,"-").concat(e.entityKey,"-").concat(e.formField.targetEntity,"-").concat(e.formField.reverseRelation);return(0,u.jsx)(l,{children:(0,u.jsx)(o.ZP,{id:n,entityName:e.formField.targetEntity,formName:t,limit:e.limit,searchFormType:e.showSearchForm?"simple_advanced":"none",navigationStrategy:e.navigationStrategy,showLink:!0,onRowClick:function(t){e.onRowClick&&e.onRowClick({id:t.id,gridName:e.formField.path,relationName:e.formField.path})},onNavigateToCreate:function(){e.navigateToCreate(e.formField.path)},parent:{key:e.entityKey,reverseRelationName:e.formField.reverseRelation,model:e.entityName,relationName:e.formField.path},emitAction:e.emitAction,store:s.Z.viewInfoSelector(n).store,onStoreCreate:function(e){s.Z.persistViewInfo(n,{store:e})},scrollBehaviour:"none",locale:e.locale,modifyFormDefinition:e.modifyFormDefinition,actionAppComponent:e.actionAppComponent,reportIds:e.reportIds,detailApp:c.ZP})})};f.defaultProps={limit:25};const d=99!=n.j?f:null},96845:(e,t,n)=>{n.d(t,{Z:()=>X});var r=n(74806),i=n(50558),a=n(88837),o=n(44049),s=n(37695),c=n(48901),u=n(4942),l=n(1024),f=n(68247),d=n(6770),p=n(21276),y=n(49684),m=n(36725),v=n(74827),x=n(54044),h=n(85893);const E=function(e){var t=e.mode,n=e.entity,r=e.entityModel;switch((0,y.i)(t,r)){case m.Z.FULL:return(0,h.jsx)(v.Z,{entity:n,keyField:r.keyField});case m.Z.REDUCED:return(0,h.jsx)(x.Z,{entity:n,keyField:r.keyField});case m.Z.NONE:default:return null}};const Z=(0,i.connect)((function(e){return{mode:e.input.mode,entity:e.entityDetail.entity,entityModel:e.entityDetail.entityModel}}))((0,r.ZP)(E));var g=n(6832);const b=function(e,t){return(0,h.jsx)(g.Z,{formField:e,showSearchForm:e.showSearchForm,limit:e.limit||void 0},t)};var j=n(1900),w=n(11088),D=n(49983),k=n(40853),O=n(19816);const R=function(e){var t,n=e.submitting,r=e.mode,i=e.intl,a=e.hasErrors,o=e.formErrors,s=e.icon,c=e.entity,u=e.fieldDefinitions;return r===w.Z.CREATE||(0,O.h)(c.paths,u)?(0,h.jsx)(j.Z,{content:a?(0,h.jsx)(D.Z,{formErrors:o}):null,placement:"bottom",children:(0,h.jsx)(k.N,{"data-cy":"btn-detail-form_submit",id:"detail-save_button",disabled:n,ink:"primary",label:(t="client.entity-detail.".concat(r===w.Z.CREATE?"create":"save"),i.formatMessage({id:t})),look:a?"flat":"raised",pending:n,type:"submit",hasErrors:a,icon:a?"floppy-disk-circle-xmark":s})}):null};var T=n(55461),S={submitForm:T.R2};const F=(0,i.connect)(null,S)((function(e){var t=e.submitting,n=e.mode,r=e.hasErrors,i=e.icon,a=e.label,o=e.formErrors,s=e.submitForm,c=e.entity,u=e.fieldDefinitions,l=e.properties;return n===w.Z.CREATE||(0,O.h)(c.paths,u)?(0,h.jsx)(j.Z,{content:r?(0,h.jsx)(D.Z,{formErrors:o}):null,placement:"bottom",children:(0,h.jsx)(k.N,{"data-cy":"btn-detail-form_advanced-submit",id:"detail-advanced_save_button",disabled:t||r,look:"raised",label:a,icon:i,onClick:function(){return s({action:null==l?void 0:l.action})}})}):null}));var I=n(93324),A=n(70310),N=n(88162),P={updateMarked:T.UC};const C=(0,i.connect)((function(e){return{entityName:e.input.entityName,entityId:e.input.entityId,marked:e.entityDetail.marked}}),P)((function(e){var t=e.entityName,n=e.entityId,r=e.marked,i=e.updateMarked,a=(0,l.useState)(!1),o=(0,I.Z)(a,2),s=o[0],c=o[1];(0,l.useEffect)((function(){r||c(!1)}),[r]);return(0,h.jsx)(A.ZP.Span,{children:(0,h.jsx)(k.W,{marked:r,onClick:function(e){e.stopPropagation(),i(t,n,!r)},onMouseEnter:function(){return c(!0)},onMouseLeave:function(){return c(!1)},children:(0,h.jsx)(N.Z,{icon:r||s?"star-full":"star"})})})}));var _,L,V,U,M,z=n(30168),Y=n(67165),B=n(7281),H=n(65035),W=n(24875),G=Y.ZP.form.withConfig({displayName:"StyledForm"})(_||(_=(0,z.Z)(["\n display: flex;\n flex-direction: column;\n padding-bottom: ",";\n height: 100%;\n ","\n"])),B.Z.space(-.5),(function(e){return"inline"===e.scrollBehaviour&&"overflow-y: auto;"})),q=(0,Y.ZP)(H.Z).withConfig({displayName:"StyledSaveButton"})(L||(L=(0,z.Z)(["\n ","\n display: block;\n"])),(function(e){return e.hasErrors&&"\n background-color: ".concat(W.FS.color("paper"),";\n ")}));Y.ZP.div.withConfig({displayName:"StyledActionWrapper"})(V||(V=(0,z.Z)(["\n "," {\n width: 100%;\n max-width: fit-content;\n justify-content: center;\n box-sizing: border-box;\n\n > * {\n overflow: hidden;\n }\n }\n"])),q),Y.ZP.span.withConfig({displayName:"StyledActionSpan"})(U||(U=(0,z.Z)(["\n cursor: pointer;\n display: flex;\n height: 100%;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n\n &:hover {\n color: ",";\n }\n ","\n"])),W.FS.color("secondaryLight"),(function(e){var t=e.marked,n=e.theme;return t&&"color: ".concat(n.colors.secondary,";")}));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 J(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){(0,u.Z)(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}const $=(0,f.Z)({form:"detailForm",destroyOnUnmount:!1})((function(e){var t=e.fireTouched,n=e.dirty,r=e.intl,i=e.submitting,a=e.mode,o=e.formErrors,s=e.valid,f=e.submitForm,y=e.entity,m=e.formDefinition,v=e.fieldDefinitions,x=e.formValues,E=e.anyTouched,g=e.form,j=e.customRenderedActions,w=e.scrollBehaviour,D=e.entityModel,k=e.labelPosition,O=(0,l.useRef)(null);d.Z.useAutofocus(O);var T=c.Z.hooks.useFormEvents({submitForm:f});(0,l.useEffect)((function(){t(n)}),[n,t]);var S=(0,l.useMemo)((function(){return J({save:function(e){return(0,h.jsx)(R,J({intl:r,submitting:i,mode:a,hasErrors:!s&&E,formErrors:o,entity:y,fieldDefinitions:v},e))},save_with_follow_up:function(e){return(0,h.jsx)(F,J({submitting:i,mode:a,hasErrors:!s&&E,formErrors:o,entity:y,fieldDefinitions:v},e))},mark:function(e){return(0,h.jsx)(C,J({},e))}},j)}),[i,a,s,E,o,r,j,y,v]),I=p.Z.isInAdminEmbedded();return(0,h.jsxs)(G,J(J({},T),{},{ref:O,scrollBehaviour:w,children:[(0,h.jsx)(c.Z.FormBuilder,{entity:y,formName:g,formDefinition:m,formValues:x,fieldMappingType:m.readOnly?"readonly":"editable",mode:a,componentMapping:(0,u.Z)({},c.Z.componentTypes.SUB_TABLE,b),customRenderedActions:S,entityModel:D,labelPosition:k}),I&&(M||(M=(0,h.jsx)(Z,{})))]}))}));var Q={submitForm:T.R2,fireTouched:T.Hb,logError:s.Z.logError};const X=(0,i.connect)((function(e){return{customRenderedActions:e.input.customRenderedActions,labelPosition:e.input.labelPosition,formDefinition:e.entityDetail.formDefinition,fieldDefinitions:e.entityDetail.fieldDefinitions,entity:e.entityDetail.entity,formValues:(0,a.Z)("detailForm")(e),formErrors:c.Z.selectors.getFormErrors("detailForm")(e),formInitialValues:(0,o.Z)("detailForm")(e),lastSave:e.entityDetail.lastSave,scrollBehaviour:e.input.scrollBehaviour,entityModel:e.entityDetail.entityModel}}),Q)((0,r.ZP)($))},6832:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(50558),i=n(97722),a=n(54563);const o=n(20428).Z;var s={onRowClick:function(e){return i.Z.fireExternalEvent("onSubGridRowClick",{id:e.id,gridName:e.gridName,relationName:e.relationName})},navigateToCreate:n(55461).E9,emitAction:function(e){return a.Z.dispatchEmittedAction(e)}};const c=(0,r.connect)((function(e,t){return{appId:e.input.appId,entityKey:e.entityDetail.entity.key,entityName:e.entityDetail.entity.model,detailFormName:e.entityDetail.formDefinition.id,navigationStrategy:e.input.navigationStrategy,locale:e.intl.locale,modifyFormDefinition:e.input.modifyFormDefinition,actionAppComponent:e.input.actionAppComponent,reportIds:e.input.reportIds}}),s)(o)},42845:(e,t,n)=>{n.d(t,{ZP:()=>te});var r=n(4942),i=n(45697),a=n.n(i),o=n(54563),s=n(9538),c=n(38378),u=n(37695),l=n(97722),f=n(92020),d=n(48886),p=n(44845),y=n(48901),m=n(16873),v=n(47180),x=n(46200),h=n(10683),E=n(74806),Z=n(50558),g=n(44049),b=n(1024),j=n(35728),w=n(96845),D=n(85893);const k=function(e){var t=e.unloadDetailView,n=e.mode,r=e.formInitialValues,i=e.fieldDefinitions,a=e.formDefinition,o=e.intl;(0,b.useEffect)((function(){return function(){t()}}),[t]);var s,c=y.Z.hooks.useAsyncValidation({formInitialValues:r,fieldDefinitions:i,formDefinition:a,mode:n}),u=y.Z.hooks.useSyncValidation({fieldDefinitions:i,formDefinition:a}),l=i.map((function(e){return e.path}));return(0,D.jsx)(j.Z,{required:[r],loadingText:(s="client.entity-detail.loadingText",o.formatMessage({id:s})),children:(0,D.jsx)(w.Z,{mode:n,validate:u,asyncValidate:c,asyncBlurFields:l.map(y.Z.transformFieldName)})})};var O=n(55461),R={unloadDetailView:O.Tl,logError:u.Z.logError};const T=(0,Z.connect)((function(e,t){return{entityName:e.input.entityName,entityId:e.input.entityId,mode:e.input.mode,entityModel:e.entityDetail.entityModel,formDefinition:e.entityDetail.formDefinition,fieldDefinitions:e.entityDetail.fieldDefinitions,formInitialValues:(0,g.Z)("detailForm")(e)}}),R)((0,E.ZP)(k));var S=n(64687),F=n.n(S),I=n(24970);const A={new:F().mark((function e(){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.gz)((0,O.E9)());case 2:case"end":return e.stop()}}),e)})),fullscreen:F().mark((function e(t,n){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.gz)((0,O.c8)(t,n));case 2:case"end":return e.stop()}}),e)}))};var N=n(94858),P=n(17172),C=n(552),_=n(85576),L=F().mark(Y),V=["new","copy"],U=["save_with_follow_up"],M=function(e){return e.canExecuteOnPendingChanges};function z(e){var t=e.definition;return F().mark((function e(){var n,r,i,a;return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.RE)(N.Z,_.er);case 2:return n=e.sent,e.next=5,(0,I.Ys)(n);case 5:if(!e.sent||(s=void 0,c=void 0,s=(o=t).id,c=o.fullscreen,V.includes(s)||U.includes(s)||c)||M(t)){e.next=22;break}return e.next=9,(0,I.RE)(Y,t.id);case 9:if("continue"!==(r=e.sent)){e.next=12;break}return e.abrupt("return",{abort:!1});case 12:if("abort"!==r){e.next=14;break}return e.abrupt("return",{abort:!0});case 14:if("save"!==r){e.next=22;break}return e.next=17,(0,I.gz)((0,O.R2)());case 17:return e.next=19,(0,I.S3)({submitted:(0,I.qn)(O.Zo),failed:(0,I.qn)(O.XG)});case 19:return i=e.sent,a=!i.submitted,e.abrupt("return",{abort:a});case 22:return e.abrupt("return",{abort:!1});case 23:case"end":return e.stop()}var o,s,c}),e)}))()}function Y(e){var t;return F().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,I.RE)(P.CE);case 2:return t=n.sent,n.next=5,(0,I.gz)(p.Z.modal("action-pending-changes-".concat(e),null,"client.entity-detail.confirmDirtyBeforeAction",(function(e){var n=e.close;return(0,D.jsx)(C.Z,{onYes:function(){n(),t.put("save")},onNo:function(){n(),t.put("continue")}})}),!0,(function(){return t.put("abort")})));case 5:return n.next=7,(0,I.qn)(t);case 7:return n.abrupt("return",n.sent);case 8:case"end":return n.stop()}}),L)}var B=n(58267);const H={entityDetail:n(9819).Z,form:B.Z};var W=[_.ZP];const G=[{ctrl:!0,alt:!0,code:"KeyS",actions:[(0,O.R2)()]}];var q;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 J(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){(0,r.Z)(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 $="entity-detail",Q=["onSubGridRowClick","onEntityCreated","onEntityUpdated","onEntityDeleted","onFormValuesChange","onTouchedChange","onRefresh","emitAction"],X=function(e,t,n,r){var i=q||(q=(0,D.jsx)(T,{})),a=c.Z.createStore(H,W,J(J({},{scrollBehaviour:"inline"}),t),$);return l.Z.addToStore(a,(function(e){return c.Z.getEvents(Q,e.input)})),o.Z.addToStore(a,(function(e){return e.input.emitAction})),u.Z.addToStore(a,!1),p.Z.addToStore(a,!1),y.Z.addToStore(a,_.Iy),m.Z.addToStore(a),s.Z.addToStore(a,(function(e){return{formApp:v.Z,listApp:e.input.listApp,detailApp:ee,customActions:J(J({},A),e.input.customActions||{}),appComponent:e.input.actionAppComponent,navigationStrategy:e.input.navigationStrategy,context:{viewName:"detail",formName:e.input.formName},customPreparationHandlers:[z],customActionEventHandlers:e.input.customActionEventHandlers}})),f.Z.addToStore(a,(function(e){return{listApp:e.input.listApp,detailApp:ee,docsApp:e.input.docsApp,navigationStrategy:e.input.navigationStrategy,chooseDocument:e.input.chooseDocument}})),d.Z.addToStore(a,G),c.Z.createApp($,i,a,{input:t,events:n,actions:[(0,O.FL)()],publicPath:r,textResourceModules:["actiongroup","component","common","entity-list","entity-detail"]})};c.Z.registerAppInRegistry($,X);var ee=function(e){var t=c.Z.useApp({initApp:X,props:e,packageName:e.id,externalEvents:Q}).component;return(0,D.jsx)(D.Fragment,{children:t})};ee.propTypes=J(J({entityName:a().string.isRequired,entityId:a().string,formName:a().string.isRequired,mode:a().oneOf(["update","create"]),ignoreFormDefaultValues:a().bool,defaultValues:a().array},Q.reduce((function(e,t){return e[t]=a().func,e}),{})),{},{navigationStrategy:h.Z.propTypes,chooseDocument:a().func,actionAppComponent:a().elementType,customActions:a().object,customRenderedActions:a().objectOf(a().func),modifyFormDefinition:a().func,modifyEntityPaths:a().func,reportIds:a().arrayOf(a().string),listApp:a().func,docsApp:a().func,scrollBehaviour:x.a,labelPosition:a().oneOf(["inside","outside-responsive","outside"]),initialAction:a().string});const te=ee},55461:(e,t,n)=>{n.d(t,{CT:()=>A,E9:()=>T,FL:()=>Z,GM:()=>u,Gy:()=>R,Hb:()=>O,Hj:()=>l,I7:()=>s,Ic:()=>f,Jd:()=>r,K3:()=>d,LG:()=>g,Lu:()=>b,NP:()=>m,NR:()=>p,OU:()=>a,QZ:()=>N,R2:()=>j,Tl:()=>k,UC:()=>I,U_:()=>w,XG:()=>h,Z$:()=>x,Zg:()=>v,Zo:()=>E,_O:()=>D,c8:()=>F,fv:()=>y,jR:()=>i,jf:()=>c,pB:()=>S,ri:()=>P,wI:()=>o});var r="entityDetail/LOAD_DETAIL_VIEW",i="entityDetail/SET_FORM_DEFINITION",a="entityDetail/SET_ENTITY",o="entityDetail/SUBMIT_FORM",s="entityDetail/SET_LAST_SAVE",c="entityDetail/SET_ENTITY_MODEL",u="entityDetail/UNLOAD_DETAIL_VIEW",l="entityDetail/FIRE_TOUCHED",f="entityDetail/SET_TOUCHED",d="entityDetail/TOCH_ALL_FIELDS",p="entityDetail/NAVIGATE_TO_CREATE",y="entityDetail/SET_FIELD_DEFINITIONS",m="entityDetail/NAVIGATE_TO_ACTION",v="entityDetail/UPDATE_MARKED",x="entityDetail/SET_MARKED",h="entityDetail/FORM_SUBMISSION_FAILED",E="entityDetail/FORM_SUBMITTED",Z=function(){return{type:r}},g=function(e){return{type:i,payload:{formDefinition:e}}},b=function(e){return{type:a,payload:{entity:e}}},j=function(e){return{type:o,payload:{followUp:e}}},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();return{type:s,payload:{lastSave:e}}},D=function(e){return{type:c,payload:{entityModel:e}}},k=function(){return{type:u}},O=function(e){return{type:l,payload:{touched:e}}},R=function(e){return{type:f,payload:{touched:e}}},T=function(e){return{type:p,payload:{relationName:e}}},S=function(e){return{type:y,payload:{fieldDefinitions:e}}},F=function(e,t){return{type:m,payload:{definition:e,selection:t}}},I=function(e,t,n){return{type:v,payload:{entityName:e,entityId:t,marked:n}}},A=function(e){return{type:x,payload:{marked:e}}},N=function(){return{type:h}},P=function(){return{type:E}}},9819:(e,t,n)=>{n.d(t,{Z:()=>u});var r,i=n(4942),a=n(78907),o=n(55461),s=(r={},(0,i.Z)(r,o.jR,a.Z.singleTransferReducer("formDefinition")),(0,i.Z)(r,o.OU,a.Z.singleTransferReducer("entity")),(0,i.Z)(r,o.I7,a.Z.singleTransferReducer("lastSave")),(0,i.Z)(r,o.jf,a.Z.singleTransferReducer("entityModel")),(0,i.Z)(r,o.Ic,a.Z.singleTransferReducer("touched")),(0,i.Z)(r,o.fv,a.Z.singleTransferReducer("fieldDefinitions")),(0,i.Z)(r,o.Z$,a.Z.singleTransferReducer("marked")),r),c={formDefinition:{},entity:{},entityModel:{},touched:!1,fieldDefinitions:[],marked:!1};function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=arguments.length>1?arguments[1]:void 0,n=s[t.type];return n?n(e,t):e}},85576:(e,t,n)=>{if(n.d(t,{Iy:()=>X,ZP:()=>ee,er:()=>Q}),99!=n.j)var r=n(89062);var i=n(4942),a=n(64687),o=n.n(a),s=n(78718),c=n.n(s);if(99!=n.j)var u=n(64738);if(99!=n.j)var l=n(66448);if(99!=n.j)var f=n(92708);var d=n(24970);if(99!=n.j)var p=n(9538);if(99!=n.j)var y=n(38378);if(99!=n.j)var m=n(97722);if(99!=n.j)var v=n(48901);if(99!=n.j)var x=n(44845);if(99!=n.j)var h=n(41128);if(99!=n.j)var E=n(72007);if(99!=n.j)var Z=n(1084);if(99!=n.j)var g=n(16873);if(99!=n.j)var b=n(83665);if(99!=n.j)var j=n(49169);if(99!=n.j)var w=n(49684);if(99!=n.j)var D=n(11088);if(99!=n.j)var k=n(55461);function O(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=99!=n.j?o().mark(ee):null,S=99!=n.j?o().mark(ne):null,F=99!=n.j?o().mark(re):null,I=99!=n.j?o().mark(ie):null,A=99!=n.j?o().mark(ae):null,N=99!=n.j?o().mark(oe):null,P=99!=n.j?o().mark(se):null,C=99!=n.j?o().mark(ce):null,_=99!=n.j?o().mark(ue):null,L=99!=n.j?o().mark(le):null,V=99!=n.j?o().mark(fe):null,U=99!=n.j?o().mark(pe):null,M=99!=n.j?o().mark(ye):null,z=99!=n.j?o().mark(ve):null,Y=99!=n.j?o().mark(he):null,B=99!=n.j?o().mark(je):null,H=99!=n.j?o().mark(we):null;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 G(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){(0,i.Z)(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 q=function(e,t){var n;return null===(n=e.form[t])||void 0===n?void 0:n.initial},K=function(e){return e.entityDetail},J=function(e){return e.input},$=function(e){return e.intl.messages},Q="detailForm",X={formId:Q,stateSelector:function(e){return G(G({},J(e)),K(e))}};function ee(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.$6)([(0,d.Fm)(y.Z.INPUT_CHANGED,te),(0,d.Fm)(k.Jd,se),(0,d.Fm)(k.GM,ae),(0,d.Fm)(k.K3,v.Z.sagasUtils.touchAllFields,X),(0,d.ib)(k.wI,fe),(0,d.ib)(k.Hj,de),(0,d.ib)(k.NR,Ze),(0,d.ib)(h.Z.REMOTE_EVENT,je),(0,d.Fm)(k.NP,ge),(0,d.Fm)(k.Zg,xe),(0,d.Fm)(p.Z.actions.ACTION_INVOKED,Ee),(0,d.ib)(l.ZP.CHANGE,pe),(0,d.ib)(l.ZP.INITIALIZE,pe)]);case 2:case"end":return e.stop()}}),T)}function te(e){var t=e.payload;return o().mark((function e(){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.input,r=Object.keys(n),i=["entityName","entityId","formName","mode","defaultValues"],!r.some((function(e){return i.includes(e)}))){e.next=9;break}return e.next=7,(0,d.gz)(k.Tl());case 7:return e.next=9,(0,d.gz)(k.FL());case 9:case"end":return e.stop()}}),e)}))()}function ne(e,t,n,r){var i,a,s,c,u,l,f;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.Ys)(J);case 2:return i=o.sent,a=i.modifyFormDefinition,s=i.reportIds,o.next=7,(0,d.RE)(E.Z.fetchForm,e,t);case 7:if(c=o.sent,!a){o.next=14;break}return o.next=11,(0,d.RE)(a,c,{entityName:n,entityId:r});case 11:o.t0=o.sent,o.next=15;break;case 14:o.t0=c;case 15:return u=o.t0,o.next=18,(0,d.RE)(re,s,n,u);case 18:return l=o.sent,o.next=21,(0,d.gz)(k.LG(l));case 21:return o.next=23,(0,d.RE)(v.Z.getFieldDefinitions,l);case 23:return f=o.sent,o.next=26,(0,d.gz)(k.pB(f));case 26:return o.abrupt("return",{formDefinition:l,fieldDefinitions:f});case 27:case"end":return o.stop()}}),S)}function re(e,t,n){var r,i,a,s;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!((null==e?void 0:e.length)>0)){o.next=16;break}return o.next=3,(0,d.gz)(g.Z.loadReports(e,t,"detail"));case 3:return o.next=5,(0,d.qn)(g.Z.SET_REPORTS);case 5:return r=o.sent,i=r.payload,o.next=9,(0,d.Ys)($);case 9:return a=o.sent,s=a["client.actiongroup.output"],o.next=13,(0,d.RE)(v.Z.addReports,n,i.reports,s);case 13:return o.abrupt("return",o.sent);case 16:return o.abrupt("return",n);case 17:case"end":return o.stop()}}),F)}function ie(e,t,n){var i,a,s,c,u,l,f,p;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.RE)(v.Z.getUsedPaths,n,(function(e){return!0!==e.pseudoField}));case 2:return i=o.sent,o.next=5,(0,d.Ys)(J);case 5:return a=o.sent,s=a.mode,o.next=9,(0,d.Ys)(K);case 9:return c=o.sent,u=c.entityModel,o.next=13,(0,d.RE)(w.R,s,u);case 13:return l=o.sent,f=[].concat((0,r.Z)(i),(0,r.Z)(l)),o.next=17,(0,d.RE)(E.Z.fetchEntity,e,t,{paths:f});case 17:return p=o.sent,o.next=20,(0,d.gz)(k.Lu(p));case 20:return o.abrupt("return",p);case 21:case"end":return o.stop()}}),I)}function ae(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.gz)(u.Z.destroy(Q));case 2:return e.next=4,(0,d.gz)(k.Lu({}));case 4:case"end":return e.stop()}}),A)}function oe(e){var t;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,d.RE)(E.Z.fetchModel,e);case 2:return t=n.sent,n.next=5,(0,d.gz)(k._O(t));case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),N)}function se(){var e,t,n,r,i,a,s,c,l,f,p,y,m,x,h,E,Z,g,j;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.Ys)(J);case 2:return e=o.sent,t=e.entityName,n=e.entityId,r=e.formName,i=e.mode,a=e.defaultValues,s=e.ignoreFormDefaultValues,c=e.modifyEntityPaths,l=e.initialAction,o.next=13,(0,d.RE)(oe,t);case 13:return f=o.sent,o.next=16,(0,d.RE)(ne,r,i,t,n);case 16:if(p=o.sent,y=p.fieldDefinitions,m=p.formDefinition,i!==D.Z.CREATE){o.next=45;break}return o.next=22,(0,d.gz)(k.Lu({paths:{},model:t}));case 22:return o.next=24,(0,d.RE)(v.Z.getDefaultValues,y);case 24:if(x=o.sent,!a){o.next=31;break}return o.next=28,(0,d.RE)(v.Z.transformInputValues,a,f);case 28:o.t0=o.sent,o.next=32;break;case 31:o.t0={};case 32:return h=o.t0,E=s?h:G(G({},x),h),Z=c?G({},c({})):{},o.next=37,(0,d.RE)(b.Z.getFlattenEntity,{model:t,paths:Z});case 37:return g=o.sent,o.next=40,(0,d.RE)(v.Z.entityToFormValues,G(G({},g),E),y);case 40:return j=o.sent,o.next=43,(0,d.gz)(u.Z.initialize(Q,j));case 43:o.next=47;break;case 45:return o.next=47,(0,d.RE)(me);case 47:if(!l){o.next=50;break}return o.next=50,(0,d.RE)(we,m,l);case 50:case"end":return o.stop()}}),P)}function ce(e,t){return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,d.RE)(j.i,e,t);case 2:if(404!==n.sent.status){n.next=8;break}return n.next=6,(0,d.gz)(m.Z.fireExternalEvent("onEntityDeleted"));case 6:n.next=18;break;case 8:return n.next=10,(0,d.RE)(me);case 10:return n.next=12,(0,d.gz)(m.Z.fireExternalEvent("onEntityUpdated"));case 12:return n.next=14,(0,d.RE)(ye,"success","saveSuccessfulTitle","saveSuccessfulMessage");case 14:return n.next=16,(0,d.gz)(k.U_());case 16:return n.next=18,(0,d.gz)(u.Z.stopSubmit(Q));case 18:case"end":return n.stop()}}),C)}function ue(e,t,n){var r,i,a;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.RE)(v.Z.sagasUtils.getCurrentEntityState,X);case 2:return r=o.sent,i=r.formDefinition,o.next=6,(0,d.RE)(j.J,e,t,i);case 6:return a=o.sent,o.next=9,(0,d.gz)(m.Z.fireExternalEvent("onEntityCreated",{id:a,followUp:n}));case 9:return o.next=11,(0,d.RE)(ye,"success","createSuccessfulTitle","createSuccessfulMessage");case 11:case"end":return o.stop()}}),_)}function le(){var e,t,n,r,i,a;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.RE)(v.Z.sagasUtils.getCurrentEntityState,X);case 2:return e=o.sent,t=e.formValues,n=e.initialValues,r=e.mode,i=e.fieldDefinitions,a=e.formDefinition,o.next=10,(0,d.RE)(v.Z.submitValidation,t,n,i,a,r);case 10:case"end":return o.stop()}}),L)}function fe(e){var t,n,r,i,a,s,c,l,p,y;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,(0,d.Ys)((0,f.Z)(Q));case 3:if(o.sent){o.next=11;break}return o.next=7,(0,d.RE)(v.Z.sagasUtils.handleInvalidForm,X);case 7:return o.next=9,(0,d.gz)(k.QZ());case 9:o.next=44;break;case 11:return o.next=13,(0,d.gz)(u.Z.startSubmit(Q));case 13:return o.next=15,(0,d.Ys)(J);case 15:return t=o.sent,n=t.mode,o.next=19,(0,d.Ys)(K);case 19:return r=o.sent,i=r.fieldDefinitions,o.next=23,(0,d.RE)(le);case 23:return o.next=25,(0,d.RE)(v.Z.sagasUtils.getCurrentEntityState,X);case 25:return a=o.sent,s=a.dirtyFormValues,o.next=29,(0,d.RE)(v.Z.formValuesToFlattenEntity,s,i);case 29:return c=o.sent,l=v.Z.splitFlattenEntity(c,i),o.next=33,(0,d.RE)(b.Z.toEntity,l.entity);case 33:if(p=o.sent,n!==D.Z.UPDATE){o.next=39;break}return o.next=37,(0,d.RE)(ce,p,i);case 37:o.next=42;break;case 39:if(n!==D.Z.CREATE){o.next=42;break}return o.next=42,(0,d.RE)(ue,p,i,null==e||null===(y=e.payload)||void 0===y?void 0:y.followUp);case 42:return o.next=44,(0,d.gz)(k.ri());case 44:o.next=52;break;case 46:return o.prev=46,o.t0=o.catch(0),o.next=50,(0,d.RE)(v.Z.sagasUtils.handleSubmitError,X,o.t0);case 50:return o.next=52,(0,d.gz)(k.QZ());case 52:case"end":return o.stop()}}),V,null,[[0,46]])}function de(e){var t=e.payload;return o().mark((function e(){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.touched,e.next=3,(0,d.Ys)(K);case 3:if(r=e.sent,i=r.touched,n===i){e.next=10;break}return e.next=8,(0,d.gz)(m.Z.fireExternalEvent("onTouchedChange",{touched:n}));case 8:return e.next=10,(0,d.gz)(k.Gy(n));case 10:case"end":return e.stop()}}),e)}))()}function pe(){var e,t,n,r,i,a,s;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,d.Ys)(K);case 2:return e=o.sent,t=e.fieldDefinitions,o.next=6,(0,d.RE)(v.Z.sagasUtils.getCurrentEntityState,X);case 6:return n=o.sent,r=n.formValues,o.next=10,(0,d.RE)(v.Z.formValuesToFlattenEntity,r,t);case 10:return i=o.sent,a=v.Z.splitFlattenEntity(i,t),o.next=14,(0,d.RE)(b.Z.toEntity,a.entity);case 14:return s=o.sent,o.next=17,(0,d.gz)(m.Z.fireExternalEvent("onFormValuesChange",{formValues:r,entity:s}));case 17:case"end":return o.stop()}}),U)}function ye(e,t,n){return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,d.gz)(x.Z.toaster({type:e,title:"client.entity-detail.".concat(t),body:"client.entity-detail.".concat(n)}));case 2:case"end":return r.stop()}}),M)}function me(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return o().mark((function t(){var n,r,i,a,s,c,l,f,p,y,m,v,x;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,d.Ys)(J);case 2:return n=t.sent,r=n.entityName,i=n.entityId,a=n.formName,s=n.mode,c=n.modifyEntityPaths,t.next=10,(0,d.Ys)(K);case 10:if(l=t.sent,f=l.fieldDefinitions,p=l.formDefinition,!l.entityModel.markable||!p.markable){t.next=17;break}return t.next=17,(0,d.rM)(ve,r,i);case 17:return t.next=19,(0,d.RE)(ie,r,i,f);case 19:return y=t.sent,c&&(y.paths=c(y.paths)),t.next=23,(0,d.RE)(b.Z.getFlattenEntity,y);case 23:return m=t.sent,t.next=26,(0,d.RE)(Z.Z.enhanceEntityWithDisplayExpressions,m,a,f,s);case 26:return t.next=28,(0,d.RE)(Z.Z.enhanceEntityWithDisplays,m,f);case 28:return t.next=30,(0,d.RE)(he,m,f,e);case 30:return v=t.sent,x=e?{}:{keepDirty:!0,keepValues:!1},t.next=34,(0,d.gz)(u.Z.initialize(Q,v,x));case 34:case"end":return t.stop()}}),t)}))()}function ve(e,t){var n;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,d.RE)(E.Z.fetchMarked,e,t);case 2:return n=r.sent,r.next=5,(0,d.gz)(k.CT(n));case 5:case"end":return r.stop()}}),z)}function xe(e){var t=e.payload,n=t.entityName,r=t.entityId,i=t.marked;return o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.gz)(k.CT(i));case 2:return e.next=4,(0,d.RE)(E.Z.setMarked,n,r,i);case 4:case"end":return e.stop()}}),e)}))()}function he(e,t,n){var r,i;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,d.RE)(v.Z.entityToFormValues,e,t);case 2:if(r=a.sent,!n){a.next=7;break}return a.abrupt("return",r);case 7:return a.next=9,(0,d.Ys)(q,Q);case 9:return i=a.sent,a.abrupt("return",G(G({},r),c()(i,["version",b.Z.metaFields.VERSION,"update_timestamp","update_user"])));case 11:case"end":return a.stop()}}),Y)}function Ee(e){var t=e.payload;return o().mark((function e(n){var r,i,a,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.definition,i=t.response,e.next=3,(0,d.Ys)(J);case 3:if(a=e.sent,s=a.mode,null===(n=i.flags)||void 0===n||!n.selectionDeleted){e.next=10;break}return e.next=8,(0,d.gz)(m.Z.fireExternalEvent("onEntityDeleted"));case 8:e.next=15;break;case 10:if("delete"===r.id||"create"===s){e.next=15;break}return e.next=13,(0,d.RE)(me,!0);case 13:return e.next=15,(0,d.gz)(m.Z.fireExternalEvent("onRefresh"));case 15:case"end":return e.stop()}}),e)}))()}function Ze(e){var t=e.payload;return o().mark((function e(){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.Ys)(J);case 2:return n=e.sent,r=n.navigationStrategy,e.next=6,(0,d.RE)(r.navigateToCreateRelative,t.relationName);case 6:case"end":return e.stop()}}),e)}))()}function ge(e){var t=e.payload;return o().mark((function e(){var n,r,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.definition,r=t.selection,e.next=3,(0,d.Ys)(J);case 3:return i=e.sent,a=i.navigationStrategy,e.next=7,(0,d.RE)(a.navigateToActionRelative,n,r);case 7:case"end":return e.stop()}}),e)}))()}var be=function(e,t,n){return!!e.payload.entities.find((function(e){return e.entityName===t&&e.key===n}))||e.payload.parent&&e.payload.parent.model===t&&e.payload.parent.key===n};function je(e){var t,n,i,a,s;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload.event,o.next=3,(0,d.Ys)(J);case 3:if(n=o.sent,i=n.entityName,a=n.entityId,"action-trigger-event"!==t.type){o.next=11;break}return o.next=9,(0,d.gz)((s=t.payload).func.apply(s,(0,r.Z)(t.payload.args)));case 9:o.next=21;break;case 11:if(!be(t,i,a)){o.next=21;break}o.t0=t.type,o.next="entity-delete-event"===o.t0?15:"entity-update-event"===o.t0?18:21;break;case 15:return o.next=17,(0,d.gz)(m.Z.fireExternalEvent("onEntityDeleted"));case 17:case 20:return o.abrupt("break",21);case 18:return o.next=20,(0,d.RE)(me,t.payload.reload||!1);case 21:case"end":return o.stop()}}),B)}function we(e,t){var n,r,i,a,s;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!(n=De(e.children.find((function(e){return"action-bar"===e.componentType})),t))){o.next=10;break}return o.next=4,(0,d.Ys)(J);case 4:return r=o.sent,i=r.entityName,a=r.entityId,s=p.Z.getSingleEntitySelection(i,a),o.next=10,(0,d.gz)(p.Z.actions.actionInvoke(n,s));case 10:ke();case 11:case"end":return o.stop()}}),H)}var De=function e(t,n){var r,i=O(t.children||[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;if("action-group"===a.componentType){var o=e(a,n);if(o)return o}else if("action"===a.componentType&&a.id===n)return a}}catch(e){i.e(e)}finally{i.f()}},ke=function(){var e=new URL(location.href);e.searchParams.delete("action"),window.history.replaceState(null,"",e)}},49169:(e,t,n)=>{if(n.d(t,{J:()=>m,i:()=>p}),99!=n.j)var r=n(4942);var i=n(64687),a=n.n(i);if(99!=n.j)var o=n(75607);var s=n(24970);if(99!=n.j)var c=n(48901);if(99!=n.j)var u=n(72007);if(99!=n.j)var l=n(21276);function f(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return a().mark((function r(){var i,l,f;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i={method:"PATCH",queryParams:{_paths:n.join(",")},body:e,acceptedErrorCodes:["VALIDATION_FAILED"],acceptedStatusCodes:[404,409]},l="entities/2.0/".concat(e.model,"/").concat(e.key),r.next=4,(0,s.RE)(u.Z.requestSaga,l,i);case 4:if("VALIDATION_FAILED"!==(f=r.sent).body.errorCode){r.next=7;break}throw new o.t(c.Z.validationErrorToFormError(e,t,f.body.errors));case 7:if(409!==f.status||!f.body.information){r.next=9;break}throw new u.Z.InformationError(f.body.information);case 9:return r.abrupt("return",f.body);case 10:case"end":return r.stop()}}),r)}))()}var y=201;function m(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return a().mark((function i(){var f,p,m,v,x,h;return a().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return f=l.Z.getWidgetConfigKey(),p={method:"POST",queryParams:d({_paths:r.join(",")},f?{_widget_key:f}:{}),body:e,acceptedErrorCodes:["VALIDATION_FAILED"],acceptedStatusCodes:[403,409]},m=(null==n?void 0:n.createEndpoint)||"entities/2.0/".concat(e.model),i.next=5,(0,s.RE)(u.Z.requestSaga,m,p);case 5:if((v=i.sent).status!==y){i.next=12;break}return x=v.headers.get("Location"),h=x.split("/").pop(),i.abrupt("return",h);case 12:if(!v.body||"VALIDATION_FAILED"!==v.body.errorCode){i.next=14;break}throw new o.t(c.Z.validationErrorToFormError(e,t,v.body.errors));case 14:if(403!==v.status){i.next=16;break}throw new u.Z.ForbiddenException;case 16:if(409!==v.status||!v.body.information){i.next=18;break}throw new u.Z.InformationError(v.body.information);case 18:throw new Error("unexpected error during save",v);case 19:case"end":return i.stop()}}),i)}))()}},49684:(e,t,n)=>{if(n.d(t,{R:()=>s,i:()=>a}),99!=n.j)var r=n(11088);if(99!=n.j)var i=n(36725);var a=function(e,t){var n=t.useNiceFields;return e===r.Z.CREATE?i.Z.NONE:n?i.Z.FULL:i.Z.REDUCED},o=99!=n.j?["create_timestamp","update_timestamp","create_user","update_user","version"]:null,s=function(e,t){var n=a(e,t),r=t.keyField;switch(n){case i.Z.FULL:return[r].concat(o);case i.Z.REDUCED:return[r];case i.Z.NONE:default:return[]}}},36725:(e,t,n)=>{n.d(t,{Z:()=>r});const r=99!=n.j?{NONE:"none",REDUCED:"reduced",FULL:"full"}:null},11088:(e,t,n)=>{n.d(t,{Z:()=>r});const r={CREATE:"create",UPDATE:"update"}},10683:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(45697),i=n.n(r);const a={propTypes:i().shape({RelationLink:i().elementType,DetailLink:i().elementType,ListLink:i().elementType,ListOrDetailLink:i().elementType,DetailLinkRelative:i().elementType,navigateToCreateRelative:i().func,navigateToActionRelative:i().func,openDetail:i().func})}}}]);