@reltio/remotes 1.4.1084 → 1.4.1087
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/1396.js +1 -0
- package/1635.js +1 -0
- package/183.js +1 -0
- package/1867.js +1 -1
- package/1920.js +1 -0
- package/2605.js +1 -0
- package/2890.js +1 -0
- package/3100.js +2 -0
- package/{2521.js.LICENSE.txt → 3100.js.LICENSE.txt} +0 -0
- package/3405.js +1 -0
- package/350.js +1 -0
- package/3980.js +1 -0
- package/4132.js +1 -0
- package/4190.js +1 -0
- package/4277.js +1 -0
- package/4279.js +1 -0
- package/4361.js +1 -0
- package/4689.js +1 -0
- package/{727.css → 4765.css} +0 -0
- package/4765.js +1 -0
- package/4803.js +1 -1
- package/4843.js +1 -0
- package/4944.js +1 -0
- package/5400.js +1 -0
- package/5686.js +1 -0
- package/5701.js +1 -0
- package/5709.js +1 -0
- package/5714.js +1 -0
- package/5884.js +1 -0
- package/5888.js +1 -0
- package/597.js +1 -0
- package/6248.js +1 -0
- package/6250.js +1 -0
- package/6425.js +1 -0
- package/{590.css → 6596.css} +0 -0
- package/6596.js +1 -0
- package/663.js +1 -0
- package/6685.js +1 -0
- package/6897.js +2 -0
- package/{4589.js.LICENSE.txt → 6897.js.LICENSE.txt} +0 -0
- package/6947.js +2 -0
- package/{7478.js.LICENSE.txt → 6947.js.LICENSE.txt} +0 -0
- package/7215.js +1 -0
- package/{3247.css → 7560.css} +0 -0
- package/7560.js +1 -0
- package/7638.js +1 -0
- package/{5411.css → 77.css} +0 -0
- package/77.js +1 -0
- package/7737.js +1 -1
- package/781.js +2 -0
- package/{888.js.LICENSE.txt → 781.js.LICENSE.txt} +0 -0
- package/8047.js +1 -0
- package/8122.js +1 -0
- package/8238.js +1 -0
- package/8419.js +1 -0
- package/8421.js +1 -0
- package/845.js +1 -0
- package/8716.js +2 -0
- package/{6952.js.LICENSE.txt → 8716.js.LICENSE.txt} +0 -0
- package/{2400.js → 8753.js} +1 -1
- package/8789.js +1 -0
- package/8794.js +1 -1
- package/8969.js +1 -0
- package/9290.js +1 -0
- package/9446.js +1 -0
- package/9551.js +1 -0
- package/9678.js +1 -0
- package/9774.js +1 -0
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1050.js +0 -1
- package/1071.js +0 -1
- package/1157.js +0 -1
- package/1466.js +0 -1
- package/1707.js +0 -1
- package/174.js +0 -1
- package/1962.js +0 -1
- package/229.js +0 -1
- package/2521.js +0 -2
- package/2547.js +0 -1
- package/2994.js +0 -1
- package/3027.js +0 -1
- package/3247.js +0 -1
- package/3319.js +0 -1
- package/3431.js +0 -1
- package/3628.js +0 -1
- package/3716.js +0 -1
- package/3845.js +0 -1
- package/4397.js +0 -1
- package/4478.js +0 -1
- package/4589.js +0 -2
- package/4614.js +0 -1
- package/5092.js +0 -1
- package/5108.js +0 -1
- package/5242.js +0 -1
- package/5406.js +0 -1
- package/5411.js +0 -1
- package/545.js +0 -1
- package/546.js +0 -1
- package/5674.js +0 -1
- package/5773.js +0 -1
- package/590.js +0 -1
- package/6115.js +0 -1
- package/614.js +0 -1
- package/6156.js +0 -1
- package/64.js +0 -1
- package/6517.js +0 -1
- package/6538.js +0 -1
- package/6817.js +0 -1
- package/6952.js +0 -2
- package/696.js +0 -1
- package/727.js +0 -1
- package/7478.js +0 -2
- package/7830.js +0 -1
- package/7890.js +0 -1
- package/8040.js +0 -1
- package/86.js +0 -1
- package/8732.js +0 -1
- package/8741.js +0 -1
- package/8862.js +0 -1
- package/888.js +0 -2
- package/8899.js +0 -1
- package/9002.js +0 -1
- package/9109.js +0 -1
- package/9147.js +0 -1
package/7560.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[7560],{48852:(e,t,n)=>{n.d(t,{l:()=>i});var r=n(24328),o=n.n(r);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const i=(e,t,n)=>{if(e&&t){const i=(0,r.memo)(n);return n=>o().createElement(e.Consumer,null,(e=>o().createElement(i,a({},n,t(e,n)))))}return n}},98808:(e,t,n)=>{n.d(t,{K:()=>h,N:()=>m});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(94079);const s=(0,n(79692).Z)((e=>({button:{padding:"9px 16px 9px 12px","& svg g path":{fill:e.palette.primary.main,fillOpacity:1}},iconButton:{"& svg g path":{fill:e.palette.primary.main,fillOpacity:1}},startIcon:{marginLeft:0,marginRight:"8px",width:"18px",height:"18px",alignItems:"center"},label:{whiteSpace:"nowrap",fontSize:"14px",lineHeight:"16px",letterSpacing:0},overflowStyle:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},menuIcon:{marginRight:"12px"},menuItem:{minHeight:"28px",padding:"2px 16px 2px 12px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}})));var c=n(31276),u=n(88611),p=n(8818);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}let m;!function(e){e.iconButton="iconButton",e.button="button",e.menuItem="menuItem"}(m||(m={}));const h=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=m.iconButton,label:a,disabled:h,icon:g,onClick:b=c.ZT,onMenuClose:f=c.ZT}=e,y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","mode","label","disabled","icon","onClick","onMenuClose"]);const v=s();return(()=>{switch(r){case"iconButton":return o().createElement(p.k,d({disabled:h,className:i()(v.iconButton,n),size:"S",tooltipTitle:a,onClick:b,icon:g},y));case"button":return o().createElement(l.Button,d({className:i()(v.button,n),disabled:h,startIcon:o().createElement(g,null),onClick:b,color:"primary",classes:{startIcon:v.startIcon,label:v.label}},y),o().createElement(u.C,{value:a},o().createElement("div",{className:v.overflowStyle},a)));case"menuItem":{const e=()=>{f(),b()};return o().createElement(l.MenuItem,d({classes:{root:v.menuItem},onClick:e,disabled:h,ref:t},y),o().createElement(o().Fragment,null,o().createElement(g,{className:v.menuIcon}),o().createElement(l.Typography,{classes:{root:v.menuText}},a)))}}})()}));h.displayName="ActionButton"},30739:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(50166),i=n(44443),l=n(30830);const s=(0,n(79692).Z)({item:{overflow:"hidden"}});function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:u,data:p,children:d,itemKey:m,showNotMeasuredItems:h,listRef:g}=e;const b=s(),f=(0,r.useRef)({}),[y,v]=(0,r.useState)({}),x=(0,r.useCallback)((0,l.DsO)((()=>{v(c({},f.current))})),[]),E=(0,r.useCallback)(((e,t)=>m?m(t,e):t),[m]),C=(0,r.useRef)(),w=g||C;w.current&&w.current.resetAfterIndex(0,!1);const O=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const a=E(t,n);return o().createElement("div",{style:r,className:b.item},o().createElement("div",{style:h?void 0:{visibility:a in y?void 0:"hidden"}},o().createElement(i.Z,{handleHeight:!0,onResize:(e,t)=>{f.current[a]!==t&&(((e,t)=>{f.current=c({},f.current,{[e]:t})})(a,t),x())}}),d({data:t,index:n})))}),[d,h,E,x,!h&&y]);return o().createElement(a.VariableSizeList,{ref:w,width:t,height:n,itemCount:p.length,itemData:p,itemSize:e=>y[(e=>E(p,e))(e)]||u,itemKey:m},O)}))},58662:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(13980),o=n.n(r),a=n(24328),i=n.n(a),l=n(71153),s=n.n(l),c=n(94079),u=n(87918),p=n.n(u),d=n(31276),m=n(17440);const h=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const f=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:o,onChangePage:l,rowsPerPage:u,onChangeRowsPerPage:b,basicTableRef:f,labelRowsPerPage:y}=e;const v=h(),x=(0,a.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],f)()}),[f]),E=(0,a.useCallback)((e=>{l(e),x()}),[l,x]),C=(0,a.useCallback)((e=>{l(0),b(e),x()}),[l,b,x]);return i().createElement(c.TablePagination,{classes:g({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:y||p().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return p().text("${fromRow}-${toRow} of ${countRows}",{fromRow:p().number(t,"0,0"),toRow:p().number(n,"0,0"),countRows:p().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:o,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:u,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};f.propTypes={classes:o().object,rowsPerPageOptions:o().arrayOf(o().number),count:o().number,page:o().number,onChangePage:o().func,rowsPerPage:o().number,onChangeRowsPerPage:o().func,basicTableRef:o().shape({current:o().object}),labelRowsPerPage:o().string};const y=i().memo(f)},10237:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(27556),o=n(13980),a=n.n(o),i=n(24328),l=n.n(i);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const d=(0,i.forwardRef)(((e,t)=>{let{children:n,className:o}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","className"]);const i=u();return l().createElement(r.Z,p({ref:t,className:o,classes:{root:i["basic-view__paper"]}},a),n)}));d.displayName="BasicView",d.propTypes={children:a().node,className:a().string};const m=d},81137:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),o=n.n(r),a=n(87918),i=n.n(a),l=n(94079);const s=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),c=e=>{let{open:t,title:n,content:r,onCancel:a,cancelCaption:c=i().text("Cancel"),onDiscard:u,discardCaption:p="",onSave:d,saveCaption:m=i().text("Save"),disabledSave:h=!1}=e;const g=s();return o().createElement(l.Dialog,{open:t,onClose:a,classes:{paperScrollPaper:g.paper}},o().createElement(l.DialogTitle,{classes:{root:g.title}},n),o().createElement(l.DialogContent,{classes:{root:g.content}},o().createElement(l.DialogContentText,{classes:{root:g.contentText}},r)),o().createElement(l.DialogActions,{className:g.actionButtons,disableSpacing:!0},a&&o().createElement(l.Button,{onClick:a},c),o().createElement("div",null,u&&o().createElement(l.Button,{onClick:u,classes:{root:g.discardButton}},p),o().createElement(l.Button,{onClick:d,color:"primary",disabled:h,autoFocus:!0},m))))}},14363:(e,t,n)=>{n.d(t,{n:()=>y});const r=(0,n(79692).Z)({item:{marginBottom:"16px"},dense:{marginBottom:0}});var o=n(20562),a=n(24328),i=n.n(a),l=n(52730),s=n(87638),c=n(30830),u=n(91262),p=n(71153),d=n.n(p),m=n(17440),h=n(7154),g=n(26579),b=n(81077);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=e=>{let{connection:t,relatedEntity:n,inRelationTypes:p=[],outRelationTypes:y=[],showEmptyEditors:v,entityErrorMessage:x,onChangeAttribute:E,onRemoveAttribute:C,onAddAttributes:w,onChangeRelationType:O,onChangeEntity:T}=e;const R=r(),{relation:S,entity:P}=t,{attributes:N,uri:j,type:I="",direction:k}=S||{},_=Boolean(I),L=(0,l.useSelector)(s.ZP.selectors.getMetadata),A=(0,a.useMemo)((()=>S&&function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}({attributes:N},(0,c.p2l)(S))),[S,N]),D=(0,a.useMemo)((()=>(0,c.xF8)(L,I)),[I,L]),U=(0,a.useMemo)((()=>_?(0,c.jWj)(k===c.Nsj.OUT,L,[(0,c.V3K)(L,I)]):(0,m.uniq)((0,c.jWj)(!0,L,y).concat((0,c.jWj)(!1,L,p)))),[_,I,L,p,y]),z=(0,l.useSelector)((e=>s.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),Z=(0,a.useMemo)((()=>S&&{relationType:S.type,direction:S.direction}),[S]),B=(0,a.useMemo)((()=>P&&{entityUri:P.uri,entityType:P.type,entityLabel:(0,c.idV)(P.label)}),[P]),M=(0,a.useMemo)((()=>P&&P.uri?p.filter((0,c.eHk)(!1,P,n,L)):p),[P,p,n,L]),F=(0,a.useMemo)((()=>P&&P.uri?y.filter((0,c.eHk)(!0,P,n,L)):y),[P,y,n,L]);(0,a.useEffect)((()=>{const{type:e,direction:t}=(0,c.z7d)(p,y)||{};!I&&e&&O&&O({type:e.uri,direction:t})}),[I,p,y,O]),(0,o.D)((()=>{const{type:e,direction:t}=(0,c.z7d)(M,F)||{};!I&&e&&O({type:e.uri,direction:t})}),[I,P,M,F,T]);const H=(0,a.useCallback)((e=>{let{type:t,direction:n}=e;O({type:t.uri,direction:n})}),[O]);return i().createElement(i().Fragment,null,O&&i().createElement(h.Z,{className:R.item,relation:Z,metadata:L,inRelationTypes:p,outRelationTypes:y,onChange:H}),T&&i().createElement(g.Z,{errorMessage:x,className:R.item},i().createElement(b.Z,{key:I,className:d()({[R.dense]:x}),entity:B||{},entityTypesUris:U,max:20,globalSearchRequestOptions:z,mode:c.fO_.EDITING,onChange:T,onCreate:void 0,metadata:L,attributeTypesSelectionStrategy:void 0})),I&&i().createElement(u.Z,{attrTypes:D,entity:A,showEmptyEditors:v,mode:c.fO_.EDITING,parentUri:j,onAddAttributes:w,onChangeAttribute:E,onDeleteAttribute:C}))}},7154:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),a=n(13980),i=n.n(a),l=n(30830),s=n(17440),c=n(89846),u=n(27185);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const d=e=>{let{relation:t={},inRelationTypes:n=[],outRelationTypes:a=[],onChange:i=s.identity,applyFirstByDefault:l=!1,reversedContextLabels:d=!1}=e,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:h,fromEditorValue:g,toEditorValue:b}=(0,c.n)({reversedContextLabels:d}),f=(0,r.useMemo)((()=>h(n,a)),[h,n,a]),y=(0,r.useCallback)((0,s.pipe)(g(n,a),i),[g,n,a,i]),v=!!t.relationType;return(0,r.useEffect)((()=>{l&&f.length&&!v&&y(f[0])}),[f,l,y,v]),o().createElement(u.Z,p({value:b(t,f),options:f,onChange:y},m))};d.propTypes={className:i().string,relation:l.bNA,inRelationTypes:i().arrayOf(l.IYE),outRelationTypes:i().arrayOf(l.IYE),applyFirstByDefault:i().bool,reversedContextLabels:i().bool,onChange:i().func};const m=d},68439:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),a=n(52730),i=n(71153),l=n.n(i),s=n(94079),c=n(30830),u=n(87638);const p=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:r="small"}=e;const i=p(),d=(0,a.useSelector)(u.ZP.selectors.getMetadata),m=t.type,h=(0,c.nt9)(d,m)||{},g=(0,c.VD3)(d,h,"typeColor")||c.rSc.palette.primary.main;return o().createElement(s.Typography,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:l()(i[`entityType-${r}`],n),component:"div"},(0,c.jFi)(d,t))}},59725:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),o=n.n(r),a=n(87918),i=n.n(a),l=n(30830),s=n(42520);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:a,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d={},ListLabelProps:m={},disabled:h=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.oDv)),[t]);return o().createElement(s.S,{items:g,selectedItemsUris:n,single:a,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d,ListLabelProps:m,disabled:h,label:i().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:i().text("Select entity types")})}));c.displayName="EntityTypesSelector"},93416:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(92778);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const a=s();return o().createElement(l.Z,{title:n,classes:{root:i()(a.container,t),title:a.title}},r)}},42520:(e,t,n)=>{n.d(t,{S:()=>j});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(17440),s=n(30830),c=n(94079),u=n(83543),p=n(79692);const d=(0,p.Z)({listLabelContainer:{display:"flex",alignItems:"center",position:"relative",overflow:"hidden",whiteSpace:"nowrap",justifyContent:"space-between",height:"100%",width:"100%"},listLabel:{visibility:"hidden",position:"absolute",overflow:"hidden"},visibleItemsLabel:{textOverflow:"ellipsis",marginRight:"5px",overflow:"hidden",flex:1,flexBasis:"auto"},hiddenCount:{color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px",padding:"5px 8px",borderRadius:"16px",backgroundColor:"rgba(0,0,0,.12)"}}),m=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:o}=t;if(n.length>0){const[t]=Array.from(n),a=document.createRange();a.setStart(t,0);for(let n=0;n<e.length;n++){a.setEnd(t,a.endOffset+e[n].length);const{width:i}=a.getBoundingClientRect();if(r+i>o)return n;n!==e.length-1&&a.setEnd(t,a.endOffset+", ".length)}}return-1},h=e=>e.join(", "),g=e=>`calc(${(0,l.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const a=d(),i=(0,r.useRef)(),[l,s]=(0,r.useState)(0);(0,r.useEffect)((()=>{s(((e,t)=>{const n=e.length,r=((e,t)=>{if(t){const n=m(e,t);return-1===n?0:e.length-n}return 0})(e,t);return n-Math.max(1,n-r)})(t,i.current))}),[t]);const u=h(t),p=l>0,b=p?h(t.slice(0,-l)):u;return o().createElement(c.Tooltip,{title:p?u:""},o().createElement("div",{className:a.listLabelContainer},o().createElement("div",{style:{width:g(n)},className:a.listLabel,ref:i},u),o().createElement("div",{className:a.visibleItemsLabel},b),p&&o().createElement("div",{className:a.hiddenCount},`+${l}`)))};var f=n(22385),y=n(97820),v=n(54763),x=n(7785),E=n(27239),C=n(44890);function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}const O=(0,l.always)(32),T=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:a,height:i}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return o().createElement(C.Z,w({getItemSize:O,renderItem:(e,a,i)=>{let{item:l}=a;const s=!!t.find((e=>l.uri===e)),c=i===r;return o().createElement(x.Z,{key:l.uri,onClick:n,checked:s,data:l,label:o().createElement(E.Z,{text:l.label,highlight:l.filterText}),labelInText:l.label,style:e,isFocused:c,hideIcon:!0,LogoIcon:l.LogoIcon})},focusIndex:r,fixedTitle:!1,disableHorizontalScrollbar:!0,width:a,height:i},l))}));T.displayName="SelectMetadataTypesList";const R=(0,p.Z)({root:{borderRadius:"4px 4px 0 0",margin:0,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},inputLabel:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%",top:"calc(50% - 23px)"},inputText:{display:"flex",flexGrow:1,alignItems:"center",height:"25px",width:"calc(100% - 53px)",paddingTop:"18px",paddingBottom:"4px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},input:{width:0,cursor:"pointer","&[disabled]":{backgroundColor:"transparent",cursor:"default"},"&$emptyInput":{width:"100%"}},emptyInput:{},disabledInput:{},disabledPointer:{},disabledUnderline:{},inputRoot:{flex:1,paddingRight:"4px",fontSize:"14px",letterSpacing:0,lineHeight:"16px","&$disabledInput":{backgroundColor:"rgba(0, 0, 0, 0.03)",cursor:"pointer","&$disabledPointer":{cursor:"default"},"&$disabledUnderline::before":{borderBottomStyle:"solid"}}},icon:{transform:"rotate(0deg)",transition:"transform 0.35s ease"},"popup-opened-icon":{transform:"rotate(-180deg)"}});function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){N(e,t,n[t])}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const j=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:a,selectedItemsUris:p,onChange:d,ListLabelProps:m={},disabled:h,enableEmptyValueUnderline:g,single:x,label:E,dataReltioId:C,selectionPopupTitle:w}=e;const O=R(),[N,j]=(0,r.useState)(!1),I=(0,r.useCallback)((()=>j(!0)),[]),k=(0,r.useCallback)((()=>j(!1)),[]),[_,L]=(0,r.useState)(""),A=(0,r.useCallback)((()=>L("")),[]),D=(0,r.useCallback)((0,l.pipe)(A,k),[k,A]),U=a.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,_)})).map(((e,t)=>({item:{item:P({},e,{filterText:_})},index:t}))),z=(0,r.useMemo)((()=>p.map((e=>a.find((0,l.propEq)("uri",e)))).map((0,l.prop)("label"))),[p,a]),Z=(0,r.useCallback)(((e,t)=>{x?(d(t?[e.uri]:[]),D()):d(t?p.concat(e.uri):p.filter((t=>t!==e.uri)))}),[p,d,x,D]),B=(0,r.useCallback)((e=>{let{item:t}=e;const n=!p.includes(t.uri);Z(t,n)}),[p,Z]),{focusIndex:M,handleKeyDown:F}=(0,v.t)({items:U,open:N,onSelectFocusedItem:B,selectedItems:p,onClose:D}),H=(0,r.useRef)(),G=H.current?H.current.getBoundingClientRect().width:0,V=Math.max(G,255),W=0===p.length;return o().createElement(o().Fragment,null,o().createElement(c.TextField,{label:E,ref:H,InputProps:{startAdornment:W&&!t?null:o().createElement("div",{className:i()(O.inputText,n.inputText)},W?o().createElement("div",null,t):o().createElement(b,S({},m,{list:z}))),classes:{root:O.inputRoot,input:i()(O.input,n.input,{[O.emptyInput]:W&&!t}),disabled:i()(O.disabledInput,{[O.disabledPointer]:h}),underline:O.disabledUnderline},endAdornment:o().createElement(f.Z,{size:"L",icon:u.Z,iconClassName:i()(O.icon,{[O["popup-opened-icon"]]:N}),disabled:h}),readOnly:!0,disabled:!0,disableUnderline:W&&!g},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:i()(O.inputLabel,n.label)}},value:"",onClick:h?void 0:I,classes:{root:i()(O.root,n.root)},margin:"dense",variant:"filled",disabled:h,"data-reltio-id":C}),o().createElement(y.Z,{open:N,anchorEl:H.current,onClose:D,onSearch:L,title:w,containerWidth:V,containerHeight:355,searchInputOnKeyDown:F,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${C}-popup`}},o().createElement(T,{items:U,onItemClick:Z,selectedItems:p,width:V,height:245,focusIndex:M})))}));j.displayName="MetadataTypesSelector"},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),a=n(13980),i=n.n(a),l=n(71153),s=n.n(l),c=n(52730),u=n(17440),p=n(94079),d=n(87918),m=n.n(d),h=n(30830),g=n(87638),b=n(53180),f=n(68439);const y=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:a,classes:i}=e;const l=y({classes:i}),d=(0,c.useSelector)(g.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,h.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const x=(0,h.idV)(n.label),E=n.secondaryLabel,C=(0,h.ptG)(d,n),w=(0,h.Fn9)(n),O=n.uri,T=(0,h.BTI)(n);return o().createElement("div",{className:s()(l.profileBandWrapper,t)},o().createElement("div",{className:s()(l.profileBand,{[l.inactive]:!w}),"data-entity-uri":O},o().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:l.profileIcon,imageClassName:l.imageProfileIcon}),o().createElement("div",{className:l.profileInfo},o().createElement("div",null,o().createElement(p.Typography,{variant:"h6",className:l.label},x),E&&o().createElement(p.Typography,{variant:"subtitle2",className:l.secondaryLabel},E),C&&o().createElement(p.Typography,{variant:"subtitle1",className:l.businessCard},C)),o().createElement("div",{className:l.specialInfo},o().createElement("div",{className:l.entityType},o().createElement(f.Z,{entity:n,size:"medium",className:l.badge}),!(0,h.ZiX)(O)&&o().createElement(p.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(p.Typography,{display:"inline",variant:"body2",className:l.entityId,onClick:v},m().text("Entity ID"),": ",T))))),a&&o().createElement("div",null,a)))};v.propTypes={className:i().string,entity:i().object,children:i().node,classes:i().object};const x=v},32371:(e,t,n)=>{n.d(t,{U:()=>c});var r=n(24328),o=n.n(r),a=n(87918),i=n.n(a),l=n(30830),s=n(42520);const c=(0,r.memo)((e=>{let{relationTypes:t,selectedRelationTypes:n,single:a,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d={},ListLabelProps:m={},disabled:h=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.Tt2)),[t]);return o().createElement(s.S,{items:g,selectedItemsUris:n,single:a,placeholder:c,enableEmptyValueUnderline:u,onChange:p,classes:d,ListLabelProps:m,disabled:h,label:i().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:i().text("Select relation types")})}));c.displayName="RelationTypesSelector"},39827:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),o=n.n(r),a=n(71153),i=n.n(a),l=n(8818),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:a,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:h}=s,g=d(s,["active","buttonWrapper"]);return o().createElement("div",{className:i()(c.container,r)},t.map((e=>{let{id:t}=e,r=d(e,["id"]);return o().createElement(l.k,p({},r,{classes:g,size:"S",key:t,className:i()({[i()(c.active,m)]:n===t},c.buttonWrapper,h),onClick:()=>a(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},52043:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(24328),o=n.n(r);const a=(0,n(79692).Z)((e=>({contentWrapper:{display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)",marginLeft:"3px",transition:e.transitions.create(["width"],{duration:e.transitions.duration.enteringScreen})}}))),i=e=>{let{width:t,open:n,children:r}=e;const i=a();return o().createElement("div",{className:i.contentWrapper,style:{width:`${n?t:0}px`}},n&&o().createElement(o().Fragment,null,r))}},8962:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(52730),o=n(87638),a=n(24328),i=n.n(a),l=n(30830),s=n(71153),c=n.n(s),u=n(87918),p=n.n(u),d=n(94079),m=n(60995),h=n(10237),g=n(93416),b=n(80931),f=n(8261),y=n(79692);const v=(0,y.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),x=(0,r.connect)((e=>({metadata:o.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:u="",excludeUris:y=[],includeUris:x=[],attributesCount:E=16}=e;const C=v(),w=(0,r.useSelector)(o.ZP.selectors.getPivotingAttributes),O=(0,a.useMemo)((()=>(0,f.U)(s,n.type,x,y)),[y,x,s,n.type]),T=(0,l.fyF)(O,n).filter((e=>{let{values:t}=e;return!(0,l.O27)(t)})).length>0;return T||!(0,l.O27)(u)?i().createElement(m.J.Provider,{value:w},i().createElement(h.Z,{className:t},u&&i().createElement(g.Z,{className:C.header,title:u}),i().createElement(d.Box,{className:c()(C.attributesContainer,{[C.noCaption]:!u})},T?i().createElement(b.Z,{entity:n,attrTypes:O,parentUri:n.uri,drawLines:!1,max:E}):i().createElement(d.Typography,{className:C.noData},p().text("No data found"))))):null}));var E=n(17440),C=n(91262),w=n(39450),O=n(66784);const T=(0,y.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=(0,r.connect)((e=>({metadata:o.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:u,caption:p="",excludeUris:m=[],includeUris:b=[],pinnedAttributes:y}=e;const v=T(),x=(0,r.useDispatch)(),S=(0,a.useContext)(w.m),P=(0,r.useSelector)(o.ZP.selectors.getUserRoles),N=(0,a.useMemo)((()=>(0,l.mC3)(y,P)),[y,P]),j=(0,r.useSelector)((e=>o.ZP.selectors.getModifiedEntity(e,n.uri)||{})),I=(0,a.useMemo)((()=>(0,f.U)(u,j.type,b,m)),[m,b,u,j.type]),k=(0,a.useCallback)((e=>(0,E.pipe)(o.N5.actions.addAttributes,x)(e.map((e=>R({},e,{viewId:S}))))),[S,x]),_=(0,a.useCallback)((e=>(0,E.pipe)(o.N5.actions.modifyAttribute,x)(R({},e,{viewId:S}))),[S,x]),L=(0,a.useCallback)((e=>(0,E.pipe)(o.N5.actions.removeAttribute,x)(R({},e,{viewId:S}))),[S,x]);return i().createElement(h.Z,{className:t},p&&i().createElement(g.Z,{className:v.header,title:p}),i().createElement(d.Box,{className:c()(v.attributesContainer,{[v.noCaption]:!p})},i().createElement(O.c.Provider,{value:N},i().createElement(C.Z,{entity:j,attrTypes:I,parentUri:j.uri,drawLines:!1,mode:s,showEmptyEditors:(0,l.ZiX)(j.uri),crosswalks:j.crosswalks,onAddAttributes:k,onChangeAttribute:_,onDeleteAttribute:L}))))}));var N=n(3185);function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}const I=(0,r.connect)(((e,t)=>({entity:t.entity||o.ZP.selectors.getEntityWithDiff(e),mode:t.mode||o.ZP.selectors.getMode(e)})))((e=>{let{mode:t=l.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:o}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["mode","attributesCount","pinnedAttributes","entity"]);return i().createElement(N.u.Provider,{value:o},(0,l.uzs)(t)?i().createElement(x,j({attributesCount:n,entity:o},a)):i().createElement(P,j({mode:t,pinnedAttributes:r,entity:o},a)))}))},27185:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),o=n.n(r),a=n(13980),i=n.n(a),l=n(87918),s=n.n(l),c=n(17440),u=n(71153),p=n.n(u),d=n(94079);const m=(0,n(79692).Z)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var h=n(31254),g=n(88611);function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const f=e=>{let{innerRef:t,innerProps:n,selectOption:r,data:a}=e;const i=m(),{value:l,label:s,startObject:c,endObject:u}=a,f=c.objectType.label+" ↔ "+u.objectType.label;return o().createElement(d.MenuItem,b({className:i.container,ref:t,key:l,onClick:()=>r({label:s,value:l,startObject:c,endObject:u})},n),o().createElement("div",{className:i.icons},o().createElement(h.Z,{className:i.iconTop,entityType:c.objectType}),o().createElement(h.Z,{className:i.iconBottom,entityType:u.objectType})),o().createElement("div",{className:i.text},o().createElement(g.C,{value:s},o().createElement(d.Typography,{className:p()(i.textItem,i.primaryTextItem)},s)),o().createElement(g.C,{value:f},o().createElement(d.Typography,{color:"textSecondary",className:p()(i.textItem,i.secondaryTextItem)},f))))};f.propTypes={innerRef:i().oneOfType([i().oneOf([null]),i().func,i().shape({current:i().any.isRequired})]),innerProps:i().object.isRequired,selectOption:i().func.isRequired,data:i().shape({value:i().string.isRequired,label:i().string.isRequired,startObject:i().object,endObject:i().object})};const y=f;var v=n(24737);function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=e=>{let{value:t={},options:n=[],onChange:a=c.identity,TextFieldProps:i}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["value","options","onChange","TextFieldProps"]);const u=(0,r.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}({},(0,c.defaultTo)({},i),{"data-reltio-id":"relation-type-selector"})),[i]);return o().createElement(v.Z,x({value:t,options:n,onChange:a,label:s().text("Select relationship type "),components:{Option:y},TextFieldProps:u},l))},w=i().shape({label:i().string.isRequired,value:i().string.isRequired,startObject:i().object,endObject:i().object});C.propTypes={value:w,options:i().arrayOf(w),onChange:i().func};const O=C},78620:(e,t,n)=>{n.d(t,{R:()=>u});var r=n(24328),o=n(30830),a=n(17440),i=n(52730),l=n(87638);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=e=>{let{connection:t,onConnectionChange:n,relatedEntity:c}=e;const u=(0,i.useSelector)(l.ZP.selectors.getMetadata),p=(0,r.useCallback)((e=>n(s({},t,{relation:e}))),[t,n]),d=(0,r.useCallback)((0,a.pipe)((0,o.zE1)(t.relation),p),[t.relation,p]),m=(0,r.useCallback)((0,a.pipe)((0,o.lIv)(t.relation),p),[t.relation,p]),h=(0,r.useCallback)((0,a.pipe)((0,o.Ilm)(t.relation),p),[t.relation,p]),g=(0,r.useCallback)((e=>{let{type:r,direction:a}=e;const i={entity:t.entity&&(0,o.eHk)(a===o.Nsj.OUT,t.entity,c,u,(0,o.V3K)(u,r))?t.entity:null,relation:s({},t.relation,{attributes:{},type:r,direction:a})};n(i)}),[t,n,c,u]);return{onAddAttributes:d,onChangeAttribute:m,onRemoveAttribute:h,onChangeEntity:(0,r.useCallback)((e=>n(s({},t,{entity:e}))),[t,n]),onChangeRelationType:g}}},89846:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(24328),o=n(30830),a=n(17440);const i=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,r.useCallback)(((e,n)=>{const r={},i=(0,a.pipe)(o.PjQ,(0,a.tap)((e=>r[e]=(0,a.propOr)(0,e,r)+1))),l=(0,a.ascend)((0,a.prop)("label")),s=(0,a.curry)(((e,n)=>{let{uri:r,label:a,startObject:l,endObject:s}=n;const c=e===(t?o.Nsj.OUT:o.Nsj.IN)?l:s;return{label:{directionalLabel:i(c),typeLabel:a},value:`${r},${e}`,startObject:l,endObject:s}}));return e.map(s(o.Nsj.IN)).concat(n.map(s(o.Nsj.OUT))).map((0,a.evolve)({label:e=>{let{directionalLabel:t,typeLabel:n}=e;return t?r[t]>1?`${t} (${n})`:t:n}})).sort(l)}),[t]),fromEditorValue:(0,r.useCallback)(((e,t)=>n=>{const[r,i]=n.value.split(",");return{type:(i===o.Nsj.IN?e:t).find((0,a.propEq)("uri",r)),direction:i}}),[]),toEditorValue:(0,r.useCallback)(((e,t)=>t.find((0,a.propEq)("value",`${e.relationType},${e.direction}`))),[])}}},67560:(e,t,n)=>{n.r(t),n.d(t,{default:()=>on});var r=n(24328),o=n.n(r),a=n(52730),i=n(36138),l=n(585),s=n(22664),c=n(52844),u=n(87638),p=n(99136),d=n(98996),m=n(17440),h=n(30830),g=n(87918),b=n.n(g),f=n(60715),y=n(35174);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const E=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=t.relations.filter((e=>!n.includes(e))).filter((0,m.either)((0,m.pipe)(h.nqN,(0,m.equals)(e)),(0,m.pipe)(h.j5q,(0,m.equals)(e))));n.push(...r);const o=(0,m.pipe)(C,(0,m.without)([e]))(r);return o.forEach((e=>E(e,t,n))),n},C=e=>(0,m.pipe)((0,m.chain)((e=>[(0,h.nqN)(e),(0,h.j5q)(e)])),m.uniq)(e),w=(e,t)=>{const n=(e=>{var t;const n=new Set,r=new Set;e.entities.forEach((e=>n.add(e.uri))),((null===(t=e.relations)||void 0===t?void 0:t.filter((e=>n.has(e.startObject.objectURI)&&n.has(e.endObject.objectURI))))||[]).forEach((e=>{r.add(`${e.startObject.objectURI}--${e.endObject.objectURI}--${e.uri}--${e.type}`)}));const o=e.entities.map((e=>({id:e.uri,name:e.label,entityTypeUri:e.type,traversedRelationsCount:e.traversedRelations,untraversedRelationsCount:e.untraversedRelations}))),a=[];return r.forEach((e=>{const[t,n,r,o]=e.split("--");a.push({from:t,to:n,key:r,relationTypeUri:o})})),{nodes:o,edges:a}})(t);n.nodes.forEach((t=>{e.hasNode(t.id)||e.addNode(t.id,{label:(0,h.idV)(t.name),entityTypeUri:t.entityTypeUri,traversedRelationsCount:t.traversedRelationsCount,untraversedRelationsCount:t.untraversedRelationsCount,x:1,y:1})})),n.edges.forEach((t=>{const n=t.from===t.to;e.hasEdge(t.key)||e.addEdgeWithKey(t.key,t.from,t.to,{size:1,color:"rgba(0, 0, 0, 0.2)",forceLabel:n,loop:n,relationTypeUri:t.relationTypeUri})}))},O=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=t.neighbors(e).filter((e=>!n.includes(e)));return n.push(...r),r.forEach((e=>O(e,t,n))),n};var T=n(67218);const R=e=>{const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(null),l=(0,a.useDispatch)(),[s,c]=(0,r.useState)(null),[p,g]=(0,r.useState)(!1),x=null==e?void 0:e.uri,R=(0,h.biM)(e),S=(0,T._)(),P=(0,r.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return S((0,h.ZYI)({uri:e,deep:n,limitCreditsConsumption:!0,graphTypes:t?[(0,h.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}))}),[t,S]);(0,r.useEffect)((()=>(!x||(0,h.ZiX)(x)||R||(g(!0),(0,h.ZYI)({uri:x,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,h.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then((e=>{const t=new d.MultiGraph;w(t,e),i(t),c(e)})).catch((e=>{console.error(e),c(null),l(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Something went wrong"))))})).finally((()=>{g(!1)}))),()=>{i(null),c(null),g(!1)})),[x,R,l,t]);const N=(0,r.useCallback)((e=>{let{startEntityUri:t,endEntityUri:n,relationType:r,attributes:a,startDate:i,endDate:p}=e;return g(!0),(0,h.DsR)({startEntityUri:t,endEntityUri:n,relationType:r,attributes:a,startDate:i,endDate:p}).then((e=>{var t;if(null==e||null===(t=e[0])||void 0===t||!t.successful)throw null==e?void 0:e[0];const n=e[0].object,r=((e,t)=>{const n=t.startObject.objectURI,r=t.endObject.objectURI,o=[n,r],a=e.entities.map((0,m.prop)("uri")),i=o.find((e=>!(0,m.includes)(e,a))),l=i&&(t.startObject.objectURI===i?t.startObject:t.endObject),s=l&&{type:l.type,label:l.label,uri:l.objectURI,traversedRelations:0,untraversedRelations:1},c=v({},(0,m.pick)(["uri","type","attributes","startDate","endDate","crosswalks","direction"],t),{startObject:(0,m.pick)(["objectURI","directionalLabel"],t.startObject),endObject:(0,m.pick)(["objectURI","directionalLabel"],t.endObject)});return{entities:(s?e.entities.concat([s]):e.entities).map((e=>e.uri===n||e.uri===r?v({},e,{traversedRelations:e.traversedRelations+1}):e)),relations:e.relations.concat([c])}})(s,n);w(o,r);const a=[n.startObject.objectURI,n.endObject.objectURI],i=s.entities.map((0,m.prop)("uri"));a.map((e=>{if(i.includes(e)){const t=o.getNodeAttribute(e,"traversedRelationsCount");o.setNodeAttribute(e,"traversedRelationsCount",t+1)}})),c(r)})).catch((e=>{throw l(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Something went wrong")))),e})).finally((()=>{g(!1)}))}),[l,s,o]),j=(0,r.useCallback)((e=>{g(!0),(0,h.VGk)(e).then((()=>{o.extremities(e).map((e=>{const t=o.getNodeAttribute(e,"traversedRelationsCount");o.setNodeAttribute(e,"traversedRelationsCount",t-1)})),o.dropEdge(e);const{updatedData:t,removedEntitiesUris:n}=((e,t,n,r)=>{const o=r.relations.find((0,m.propEq)("uri",t)),a=(0,h.nqN)(o),i=(0,h.j5q)(o),l=(0,y.toUndirected)(n),s=(0,m.cond)([[()=>!(0,f.Ar)(l,e,a),(0,m.always)(a)],[()=>!(0,f.Ar)(l,e,i),(0,m.always)(i)],[m.T,(0,m.always)(null)]])(),c=(0,m.evolve)({entities:(0,m.map)((e=>e.uri===a||e.uri===i?v({},e,{traversedRelations:e.traversedRelations-1}):e)),relations:(0,m.reject)((0,m.propEq)("uri",t))})(r),{updatedData:u,removedEntitiesUris:p}=s?((e,t)=>{const n=E(e,t),r=(0,m.pipe)(C,(0,m.append)(e),m.uniq)(n);return{updatedData:(0,m.evolve)({relations:(0,m.reject)((e=>n.includes(e))),entities:(0,m.reject)((e=>r.includes(e.uri)))})(t),removedEntitiesUris:r}})(s,c):{updatedData:c,removedEntitiesUris:[]};return{updatedData:u,removedEntitiesUris:p}})(x,e,o,s);((e,t)=>{(t||[]).forEach((t=>{e.dropNode(t)}))})(o,n),c(t)})).catch((e=>{l(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Something went wrong"))))})).finally((()=>{g(!1)}))}),[l,o,x,s]),I=(0,r.useCallback)(((e,t)=>{const{nodes:n=[]}=t,r=(0,m.difference)(o.neighbors(e),n);((e,t,n,r)=>{const o=(0,y.toUndirected)(r),a=(e,t)=>{o.filterEdges(e,t,(e=>!!e)).forEach((e=>o.dropEdge(e)))};n.forEach((e=>{a(t,e),o.forEachNeighbor(e,(t=>{a(e,t)}))}));const i=[];return o.nodes().forEach((t=>{((e,t,n)=>(0,f.Ar)(e,t,n)?null:n)(o,e,t)&&i.push(t)})),(0,m.uniq)(i.reduce(((e,t)=>O(t,o,e)),[...i]))})(x,e,r,o).forEach((t=>{t!==x&&t!==e&&o.setNodeAttribute(t,"hidden",!0)}))}),[x,o]),k=(0,r.useCallback)((e=>{if(e&&!(0,h.ZiX)(e)&&!R){const t=o.getNodeAttribute(e,"untraversedRelationsCount");o.neighbors(e).forEach((e=>{o.setNodeAttribute(e,"hidden",!1)})),t>0&&(g(!0),P(e).then((t=>{const n=((e,t,n)=>{const{entities:r=[],relations:o=[]}=t;return{entities:r.reduce(((e,t)=>{if(e.some((e=>{let{uri:n}=e;return n===t.uri}))){if(t.uri===n){const r=e.findIndex((e=>{let{uri:t}=e;return t===n}));e[r]=v({},e[r],{traversedRelations:t.traversedRelations,untraversedRelations:t.untraversedRelations})}}else e.push(t);return e}),[...e.entities||[]]),relations:o.reduce(((e,t)=>(e.some((e=>{let{uri:n}=e;return n===t.uri}))||e.push(t),e)),[...e.relations||[]])}})(s,t,e);w(o,t);const r=t.entities.find((t=>t.uri===e));o.setNodeAttribute(e,"untraversedRelationsCount",r.untraversedRelations),o.setNodeAttribute(e,"traversedRelationsCount",r.traversedRelations),c(n)})).catch((e=>{console.error(e),l(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Something went wrong"))))})).finally((()=>{g(!1)})))}}),[s,l,o,R,P]);return{graphLoading:p,data:s,graphologyGraph:o,graphTypeUri:t,setGraphTypeUri:n,onAddRelation:N,onDeleteRelation:j,onCollapseEntity:I,onExpandEntity:k}};function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=(e,t)=>{const n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}({},e,{[null==t?void 0:t.uri]:t}),r=Object.keys(n);return r.length>50&&delete n[r[0]],n},N=[25,50,100];function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I=(e,t,n)=>{const{startObject:r,endObject:o,type:a}=t,{directionalLabel:i}=(0,h.nqN)(t)===n?r:o;return i||(0,h.Lmx)(e,a)},k=e=>{let{data:t,selectedEntityUri:n,mainEntityUri:o,graphTypeUri:i}=e;const[l,s]=(0,r.useState)({field:"",order:"asc"}),[c,p]=(0,r.useState)(0),[d,g]=(0,r.useState)(N[0]),[f,y]=(0,r.useState)([]),[v,x]=(0,r.useState)(!1),E=(0,a.useDispatch)(),C=(0,a.useSelector)(u.ZP.selectors.getMetadata),w=(0,r.useMemo)((()=>{const e=(null==t?void 0:t.entities)||[];return(0,m.zipObj)(e.map((0,m.prop)("uri")),e)}),[null==t?void 0:t.entities]),O=(0,r.useMemo)((()=>(0,m.pipe)((0,m.filter)((0,m.either)((0,m.pipe)(h.nqN,(0,m.equals)(n)),(0,m.pipe)(h.j5q,(0,m.equals)(n)))),(0,m.uniqBy)((0,m.prop)("uri")),(0,m.map)((e=>{const t=w[((e,t)=>{const n=(0,h.nqN)(t),r=(0,h.j5q)(t);return n===e?r:n})(n,e)];return{relation:e,entity:t,entityLabel:(0,h.idV)(t.label),entityTypeLabel:(0,h.jFi)(C,t),relationTypeLabel:I(C,e,t.uri)}})))((null==t?void 0:t.relations)||[])),[t,n,w,C]),{searchText:T,onChangeSearchText:R,filters:S,onFilter:P,relationTypesOptions:k,entityTypesOptions:_}=(e=>{const[t,n]=(0,r.useState)(""),[o,i]=(0,r.useState)({entityTypesUris:[],relationTypesUris:[]}),l=(0,a.useSelector)(u.ZP.selectors.getMetadata),s=(0,r.useMemo)((()=>(0,m.pipe)((0,m.map)((e=>{let{entity:t}=e;return t.type})),(0,m.concat)(m.__,o.entityTypesUris),m.uniq,(0,m.map)((0,h.nt9)(l)))(e)),[e,l,o.entityTypesUris]),c=(0,r.useMemo)((()=>(0,m.pipe)((0,m.map)((e=>{let{relation:t}=e;return t.type})),(0,m.concat)(m.__,o.relationTypesUris),m.uniq,(0,m.map)((0,h.V3K)(l)))(e)),[e,l,o.relationTypesUris]);return{searchText:t,onChangeSearchText:n,filters:o,onFilter:i,entityTypesOptions:s,relationTypesOptions:c}})(O),L=(0,r.useMemo)((()=>(0,m.pipe)((0,m.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:o,relationTypesUris:a}=S;return t.toLowerCase().includes(T)&&(0,m.ifElse)((0,m.prop)("length"),(0,m.includes)(r.type),m.T)(a)&&(0,m.ifElse)((0,m.prop)("length"),(0,m.includes)(n.type),m.T)(o)})),l.field?(0,m.sort)(((e,t)=>h.P6Y.strings.sort(l.order,e[l.field],t[l.field]))):m.identity)(O)),[O,l,T,S]),A=(0,r.useMemo)((()=>L.slice(c*d,c*d+d)),[L,c,d]),D=(0,r.useCallback)((e=>{x(!0),(0,h._vs)(e).then((e=>{y((t=>[...t,{initialRelation:e,relation:e}]))})).catch((e=>{E(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Can't load relationship's attributes"))))})).finally((()=>x(!1)))}),[E]),U=(0,r.useCallback)((e=>{y((t=>t.map((t=>t.relation.uri===e.uri?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){j(e,t,n[t])}))}return e}({},t,{relation:e}):t))))}),[]);(0,r.useEffect)((()=>{p(0),R("")}),[n,i,R,P]),(0,r.useEffect)((()=>{P({entityTypesUris:[],relationTypesUris:[]})}),[i,o,P]),(0,r.useEffect)((()=>{p(0)}),[l,T,S]);const z=(0,r.useCallback)((e=>{y((t=>t.filter((t=>t.relation.uri!==e))))}),[]),Z=(0,r.useCallback)(((e,t)=>{x(!0),(0,h.HH7)({oldRelation:e,newRelation:t}).then((()=>{z(t.uri)})).catch((e=>{E(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Can't edit relationship"))))})).finally((()=>x(!1)))}),[z,E]);return{rowsData:A,onSort:s,sorting:l,searchText:T,onChangeSearchText:R,filters:S,onFilter:P,entityTypesOptions:_,relationTypesOptions:k,editingRelations:f,onStartRelationEditing:D,onCancelRelationEditing:z,onUpdateEditingRelation:U,total:L.length,page:c,rowsPerPage:d,onPageChange:p,onRowsPerPageChange:g,onSaveEditingRelation:Z,loading:v}},_=o().createContext({graphLoading:!1,data:null,graphologyGraph:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{},onCollapseEntity:()=>{},onExpandEntity:()=>{}});_.displayName="GraphStateContext";var L=n(71153),A=n.n(L),D=n(57304),U=n(19603),z=n(94646),Z=n(94079),B=n(79692);const M=(0,B.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),F=(0,r.memo)((e=>{let{className:t}=e;const n=M(),r=(0,a.useSelector)(u.ZP.selectors.getEntity);return o().createElement(D.Z,{className:A()(t,U.U),entity:r},o().createElement(Z.Box,{className:n.comments},o().createElement(z.Z,{uri:r.uri,relatedObjectUris:(0,h.wp9)(h.q7e.ENTITY,{entityUri:r.uri}),objectType:h.q7e.ENTITY})))}));F.displayName="GraphProfileBand";const H=F;var G=n(52043),V=n(39827),W=n(82726);const q=(0,B.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function $(){return $=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}const Y=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",$({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7v2h2V7H6zm0 4v2h2v-2H6zm0 4v2h2v-2H6zm4-8v2h8V7h-8zm10-2v5.02a6.52 6.52 0 012 2.01V3H2v18h11.028a6.52 6.52 0 01-2.009-2H4V5h16zm-9.503 8a6.497 6.497 0 011.31-2H10v2h.497zM10 15.5c0-.168.006-.335.019-.5H10v.5zm0 0c0 .516.06 1.018.173 1.5H10v-1.5zm10.3 2.39L23.42 21 22 22.42l-3.12-3.12c-.69.44-1.51.7-2.39.7-2.48 0-4.49-2.01-4.49-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5 4.5c0 .88-.26 1.69-.7 2.39zm-3.8.11a2.5 2.5 0 000-5 2.5 2.5 0 000 5z",fill:"currentColor"}))};var X=n(48852);const K=(0,X.l)(_,(0,m.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return o().createElement(D.Z,{entity:t})}));var Q=n(8962);const J=(0,B.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),ee=(0,X.l)(_,(0,m.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=J();return o().createElement("div",{className:r.wrapper},n&&o().createElement(p.Z,null),o().createElement(Q.Z,{entity:t,caption:b().text("Entity details"),className:r.noShadowBlock}))}));var te=n(58662),ne=n(44443),re=n(30739),oe=n(31276);const ae="1px solid rgba(0, 0, 0, 0.05)",ie=(0,B.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:ae},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},editingRow:{paddingTop:"8px"},headRow:{borderBottom:ae}});function le(){return le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}const se=(0,r.memo)((e=>{let{columnsData:t,sorting:n,onSort:r}=e;const a=ie();return o().createElement("div",{className:A()(a.tableRow,a.headRow)},t.map((e=>{const{id:t,sortable:a,headCellRenderer:i,columnClassName:l}=e,s=i,c=a?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{r({field:t,order:n.field===t?(0,oe.Dh)(n.order):"asc"})}}:{};return o().createElement("div",{key:t,className:l},o().createElement(s,le({headCellData:e},c)))})))})),ce=(0,r.forwardRef)(((e,t)=>{let{classes:n,columnsData:a,rowsData:i,sorting:l,onSort:s,getRowKey:c,ExpandedRowRenderer:u,defaultRowHeight:p}=e;const d=ie(),[m,h]=(0,r.useState)({width:0,height:0}),g=(0,r.useCallback)((e=>{let{data:t,index:r}=e;const i=t[r];return o().createElement("div",{className:A()(d.tableRowWrapper,null==n?void 0:n.tableRowWrapper)},o().createElement("div",{className:A()(d.tableRow,null==n?void 0:n.tableRow,{[d.editingRow]:i.expanded})},a.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:r}=e;const a=n;return o().createElement("div",{key:t,className:r},o().createElement(a,{value:i[t],rowValue:i}))}))),i.expanded&&u&&o().createElement(u,{open:i.expanded,rowValue:i}))}),[a,u]),b=(0,r.useCallback)(((e,t)=>{h({width:e,height:t})}),[]),f=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=f.current)||void 0===e||e.scrollTo(0)}}))),o().createElement("div",{className:d.table},o().createElement(se,{columnsData:a,sorting:l,onSort:s}),o().createElement("div",{className:d.tableBodyWrapper},o().createElement(ne.Z,{handleHeight:!0,handleWidth:!0,onResize:b}),o().createElement("div",{className:d.tableBody},o().createElement(re.Z,{listRef:f,width:m.width,height:m.height,data:i,defaultItemSize:p,itemKey:c,showNotMeasuredItems:!0},g))))})),ue=(0,r.memo)(ce);var pe=n(92332),de=n(88611);const me="rgba(238, 238, 238, 1)",he=(0,B.Z)({tableWithPagination:{flex:1,overflow:"hidden",paddingRight:"1px",display:"flex",flexDirection:"column"},tableContainer:{flex:1,overflow:"hidden"},profileColumn:{width:"200px"},relationshipTypeColumn:{width:"130px"},entityTypeColumn:{width:"140px"},row:{position:"relative","&:hover":{background:me}}});function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const be={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},fe=".collapsibleTableRow:hover &",ye=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ge(e,t,n[t])}))}return e}({},be,{[fe]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${me} 100%)`}}),ve=(0,B.Z)((e=>({headCell:{position:"relative",display:"flex",alignItems:"center",height:"33px",padding:"6px 0 6px 16px","&>div":{flexDirection:"row"},"&>div>span[role=button]":{width:"calc(100% + 49px)"}},headLabel:{color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"16px",whiteSpace:"nowrap",overflow:"hidden","&:after":be},defaultCell:{position:"relative",color:e.palette.text.primary,fontSize:"13px",fontWeight:"normal",lineHeight:"15px",whiteSpace:"nowrap",overflow:"hidden",display:"flex",alignItems:"center",height:"100%",padding:"6px 16px","&:after":ye},clickable:{cursor:"pointer"},profileCell:{paddingTop:"3px",paddingBottom:"4px"},controlsCell:{position:"absolute",display:"flex",alignItems:"center",height:"100%",flexShrink:0,top:0,right:"9px",visibility:"hidden",[fe]:{visibility:"visible",background:me}},editingMode:{visibility:"visible"},hidden:{visibility:"hidden"},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}},expandedRow:{padding:"6px 16px",fontSize:"13px"}})));function xe(){return xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(this,arguments)}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ce(e,t,n[t])}))}return e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const we=e=>{let{className:t,headCellData:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","headCellData"]);const a=ve();return o().createElement("div",{className:A()(a.headCell,t)},o().createElement(pe.default,xe({},r,{headCellData:Ee({},n,{label:o().createElement(de.C,{value:n.label},o().createElement("div",{className:a.headLabel},n.label))})})))},Oe=(0,r.memo)((e=>{let{value:t="",tooltip:n,onClick:r,className:a}=e;const i=ve();return n=n||t,o().createElement(de.C,{value:n},o().createElement("div",{className:A()(i.defaultCell,a,{[i.clickable]:!!r}),onClick:r},t))}));var Te=n(53180);const Re=(0,X.l)(_,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:r,onClick:a}=e;const i=ve(),l=o().createElement(o().Fragment,null,o().createElement(Te.Z,{entity:n,avatarClassName:i.entityAvatar}),t);return o().createElement(Oe,{value:l,tooltip:t,className:A()(i.profileCell,r),onClick:()=>a(n.uri)})}));var Se=n(78620),Pe=n(14363);const Ne=(0,X.l)(_,((e,t)=>{let{relationshipTable:n}=e;return{editingRelationObject:n.editingRelations.find((e=>{var n;return e.initialRelation.uri===(null==t||null===(n=t.rowValue.relation)||void 0===n?void 0:n.uri)})),onUpdateEditingRelation:n.onUpdateEditingRelation,onCancelRelationEditing:n.onCancelRelationEditing,onSaveEditingRelation:n.onSaveEditingRelation}}),(e=>{let{open:t,editingRelationObject:n,onUpdateEditingRelation:i,onCancelRelationEditing:l,onSaveEditingRelation:s}=e;const c=(0,a.useDispatch)(),p=(0,a.useSelector)(u.ZP.selectors.getMetadata),{relation:d,initialRelation:g}=n,f=(0,r.useMemo)((()=>!(0,m.equals)(g,d)),[d,g]),y=ve(),v=(0,r.useCallback)((e=>{let{relation:t}=e;return i(t)}),[i]),x=(0,r.useCallback)((()=>l(d.uri)),[l,d.uri]),E=(0,r.useMemo)((()=>({relation:d})),[d]),{onAddAttributes:C,onChangeAttribute:w,onRemoveAttribute:O}=(0,Se.R)({connection:E,onConnectionChange:v});return t?o().createElement("div",{className:y.expandedRow},o().createElement(Pe.n,{connection:E,onAddAttributes:C,onChangeAttribute:w,onRemoveAttribute:O}),o().createElement("div",{className:y.actionButtons},o().createElement(Z.Button,{onClick:x},b().text("Cancel")),o().createElement(Z.Button,{color:"primary",disabled:!f,onClick:()=>{(e=>{const t=(0,h.xkB)(p,{relation:{object:e}});return c(u.N5.errors.actions.errorsSet(t)),0===t.length})(d)&&s(g,d)}},b().text("Save")))):null}));var je=n(8818),Ie=n(27604),ke=n(22983),_e=n(81137);const Le=(0,X.l)(_,(0,m.pick)(["onDeleteRelation"]),(e=>{let{uri:t,open:n,onClose:r,onDeleteRelation:a}=e;return o().createElement(_e.Z,{open:n,title:b().text("Do you want to make a clean break?"),content:b().text("To end this relationship, click Delete Relationship. To keep the connection, click Cancel."),saveCaption:b().text("Delete relationship"),discardCaption:b().text("Cancel"),onDiscard:r,onSave:()=>{a(t),r()}})})),Ae=(0,r.memo)((e=>{let{uri:t}=e;const[n,a]=(0,r.useState)(!1),i=(0,r.useCallback)((()=>a(!0)),[]),l=(0,r.useCallback)((()=>a(!1)),[]);return o().createElement(o().Fragment,null,o().createElement(je.k,{icon:ke.Z,size:"XXS",tooltipTitle:b().text("Delete"),onClick:i}),o().createElement(Le,{open:n,onClose:l,uri:t}))}));Ae.displayName="DeleteRelationButton";const De=Ae,Ue=(0,X.l)(_,((e,t)=>{let{relationshipTable:{onStartRelationEditing:n,editingRelations:r}}=e;return{onEdit:n,isEditing:r.some((e=>{var n;return e.initialRelation.uri===(null==t||null===(n=t.rowValue.relation)||void 0===n?void 0:n.uri)}))}}),(e=>{let{rowValue:{relation:{uri:t}},className:n,onEdit:r,isEditing:a}=e;const i=ve();return o().createElement("div",{className:A()(i.controlsCell,n,{[i.editingMode]:a})},o().createElement(je.k,{className:A()(i.editButton,{[i.hidden]:a}),icon:Ie.Z,size:"XXS",tooltipTitle:b().text("Edit"),onClick:()=>r(t)}),o().createElement(De,{uri:t}))}));function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ze(e,t,n[t])}))}return e}function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Be=(e,t)=>t[e].relation.uri||`${e}`,Me=(0,X.l)(_,(e=>{let{relationshipTable:t}=e;return ze({},t)}),(e=>{let{rowsData:t,sorting:n,onSort:a,total:i,page:l,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:u,editingRelations:d,loading:m}=e;const h=he(),g=(0,r.useMemo)((()=>[{id:"entityLabel",label:b().text("Profile"),headCellRenderer:we,rowCellValueRenderer:Re,sortable:!0,columnClassName:h.profileColumn},{id:"relationTypeLabel",label:b().text("Relationship type"),headCellRenderer:we,rowCellValueRenderer:Oe,sortable:!0,columnClassName:h.relationshipTypeColumn},{id:"entityTypeLabel",label:b().text("Entity Type"),headCellRenderer:we,rowCellValueRenderer:Oe,sortable:!0,columnClassName:h.entityTypeColumn},{id:"controls",label:"",headCellRenderer:we,rowCellValueRenderer:Ue}]),[h]),f=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;null===(e=f.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const y=(0,r.useMemo)((()=>t.map((e=>null!=d&&d.some((t=>{var n;return t.initialRelation.uri===(null==e||null===(n=e.relation)||void 0===n?void 0:n.uri)}))?ze({},e,{expanded:!0}):e))),[t,d]),v=(0,r.useMemo)((()=>({tableRow:A()(h.row,"collapsibleTableRow")})),[h]);return o().createElement("div",{className:h.tableWithPagination},o().createElement("div",{className:h.tableContainer},o().createElement(ue,{ref:f,columnsData:g,rowsData:y,sorting:n,onSort:a,getRowKey:Be,ExpandedRowRenderer:Ne,defaultRowHeight:28,classes:v})),i>N[0]&&o().createElement(te.Z,{count:i,rowsPerPageOptions:N,rowsPerPage:s,onChangeRowsPerPage:u,page:l,onChangePage:c,basicTableRef:f}),m&&o().createElement(p.Z,null))}));var Fe=n(36444),He=n(94574);const Ge=(0,B.Z)((e=>({inactiveSearchIcon:{color:e.palette.text.secondary},activeSearchIcon:{color:e.palette.text.primary},input:{fontSize:"14px","&::placeholder":{color:`${e.palette.text.secondary} !important`,opacity:1}}}))),Ve=(0,X.l)(_,(0,m.pipe)((0,m.prop)("relationshipTable"),(0,m.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const r=Ge();return o().createElement(He.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:b().text("Search profiles"),classes:{input:r.input}})}));var We=n(59725),qe=n(32371);const $e=(0,B.Z)((e=>({dialogPaper:{display:"flex",flexDirection:"column",padding:"12px 16px 8px"},title:{marginBottom:"21px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary},entityTypesSelector:{width:"468px",marginBottom:"20px"},relationTypesSelector:{width:"468px",marginBottom:"32px"},footer:{display:"flex"},clearAllButton:{marginRight:"auto"},cancelButton:{marginRight:"8px"}}))),Ye=(0,X.l)(_,(0,m.pipe)((0,m.prop)("relationshipTable"),(0,m.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:n,filters:a,onFilter:i,entityTypesOptions:l,relationTypesOptions:s}=e;const c=$e(),[u,p]=(0,r.useState)([]),[d,m]=(0,r.useState)([]),h=()=>{p(a.entityTypesUris),m(a.relationTypesUris),n()};return(0,r.useEffect)((()=>{p(a.entityTypesUris),m(a.relationTypesUris)}),[a.entityTypesUris,a.relationTypesUris]),o().createElement(Z.Dialog,{classes:{paper:c.dialogPaper},onClose:h,open:t},o().createElement(Z.Typography,{className:c.title},b().text("Filter")),o().createElement(We.Q,{classes:{root:c.entityTypesSelector},entityTypes:l,selectedEntityTypes:u,enableEmptyValueUnderline:!0,onChange:p}),o().createElement(qe.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:d,enableEmptyValueUnderline:!0,onChange:m}),o().createElement("div",{className:c.footer},o().createElement(Z.Button,{className:c.clearAllButton,onClick:()=>{p([]),m([])}},b().text("Clear All")),o().createElement(Z.Button,{className:c.cancelButton,onClick:h},b().text("Cancel")),o().createElement(Z.Button,{onClick:()=>{i({entityTypesUris:u,relationTypesUris:d}),n()},color:"primary"},b().text("Apply"))))})),Xe=(0,B.Z)((e=>({wrapper:{display:"flex",alignItems:"center",paddingLeft:"16px",paddingRight:"2px"},iconButton:{marginLeft:"4px"},activeFiltersIcon:{color:e.palette.primary.main},inactiveFiltersIcon:{color:e.palette.text.secondary}}))),Ke=(0,X.l)(_,(0,m.pipe)((0,m.prop)("relationshipTable"),(0,m.pick)(["filters"])),(e=>{let{filters:t}=e;const n=Xe(),[a,i]=(0,r.useState)(!1),{entityTypesUris:l,relationTypesUris:s}=t,c=l.length||s.length;return o().createElement("div",{className:n.wrapper},o().createElement(Ve,null),o().createElement(Z.IconButton,{className:n.iconButton,onClick:()=>i(!0)},o().createElement(Fe.Z,{className:c?n.activeFiltersIcon:n.inactiveFiltersIcon})),o().createElement(Ye,{open:a,onClose:()=>i(!1)}))})),Qe=(0,B.Z)({caption:{marginLeft:"16px",marginTop:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}});var Je=n(98808),et=n(65549);const tt=(0,B.Z)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"12px 16px"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px",fontWeight:"bold"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}}))),nt=(0,X.l)(_,(e=>{let{selectedEntity:t,onAddRelation:n}=e;return{selectedEntity:t,onAddRelation:n}}),(e=>{let{selectedEntity:t,open:n,onClose:i,onAddRelation:l}=e;const s=tt(),c=(0,a.useSelector)(u.ZP.selectors.getMetadata),p=t.type,[d,m]=(0,r.useState)({}),{relation:g,entity:f}=d,{type:y,direction:v}=g||{},[x,E]=(0,r.useState)(!1),C=(0,a.useDispatch)();(0,r.useEffect)((()=>{n&&m({relation:{uri:(0,h.ncP)(),type:null,attributes:{}}})}),[n]);const{inRelations:w=[],outRelations:O=[]}=(0,r.useMemo)((()=>(0,h.UWq)(c,p)),[c,p]),T=(0,r.useCallback)((()=>{const e=(0,h.xkB)(c,{relation:{object:{relation:g}}});return C(u.N5.errors.actions.errorsSet(e)),0===e.length}),[g,c,C]),{onAddAttributes:R,onChangeAttribute:S,onRemoveAttribute:P,onChangeEntity:N,onChangeRelationType:j}=(0,Se.R)({connection:d,onConnectionChange:m,relatedEntity:t});return o().createElement(Z.Dialog,{open:n,fullWidth:!0,maxWidth:"sm",onClose:i,classes:{paper:s.dialogPaper}},o().createElement(Z.DialogTitle,{disableTypography:!0,classes:{root:s.dialogTitle}},o().createElement(Z.Typography,{variant:"subtitle1",classes:{root:s.titleText}},b().text("Add relationship"))),o().createElement(Z.DialogContent,{classes:{root:s.content}},o().createElement(Pe.n,{connection:d,onAddAttributes:R,onChangeAttribute:S,onRemoveAttribute:P,relatedEntity:t,inRelationTypes:w,outRelationTypes:O,onChangeRelationType:j,onChangeEntity:N})),o().createElement(Z.DialogActions,null,o().createElement(Z.Button,{onClick:i},b().text("Cancel")),o().createElement(Z.Button,{disabled:!(null!=d&&d.entity)||!y||x,color:"primary",onClick:()=>{const{type:e,attributes:n={},startDate:r,endDate:o}=g,a=v===h.Nsj.OUT?t.uri:f.uri,s=v===h.Nsj.OUT?f.uri:t.uri;T()&&(E(!0),l({startEntityUri:a,endEntityUri:s,relationType:e,attributes:n,startDate:r,endDate:o}).then((()=>{i()})).catch((e=>{console.error(e)})).finally((()=>{E(!1)})))}},b().text("Add"))))})),rt=()=>{const e=Qe(),[t,n]=(0,r.useState)(!1);return o().createElement("div",{className:e.wrapper},o().createElement("div",{className:e.caption},o().createElement(Z.Typography,{variant:"subtitle1"},b().text("Relationships")),o().createElement(Je.K,{mode:Je.N.button,label:b().text("Add relationship"),icon:et.Z,onClick:()=>{n(!0)}}),o().createElement(nt,{open:t,onClose:()=>{n(!1)}})),o().createElement(Ke,null),o().createElement(Me,null))};let ot;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(ot||(ot={}));const at=(0,r.memo)((()=>{var e;const t=q(),[n,a]=(0,r.useState)(null),i=(0,r.useCallback)((e=>{a((t=>t===e?null:e))}),[]),l=null!==n,s=(0,r.useMemo)((()=>[{buttonProps:{id:ot.Relationship,icon:Y,tooltipTitle:b().text("Relationship")},content:o().createElement(rt,null)},{buttonProps:{id:ot.EntityDetails,icon:W.Z,tooltipTitle:b().text("Entity Details")},content:o().createElement(ee,null)}]),[]);return o().createElement("div",{className:t.wrapper},o().createElement(G.h,{open:l,width:480},o().createElement(K,null),null===(e=s[n])||void 0===e?void 0:e.content),o().createElement(V.G,{buttonsProps:(0,m.pluck)("buttonProps",s),onButtonClick:i,activeIndexId:n}))}));at.displayName="GraphRightSidePanel";const it=at;var lt=n(46339),st=n(23304);const ct=(e,t,n)=>{var r;if(!t.label)return;const o=n.labelSize,a=n.labelFont,i=n.labelWeight;e.fillStyle=null!==(r=n.labelColor)&&void 0!==r&&r.attribute?t[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color,e.font=`${i} ${o}px ${a}`,e.fillText(t.label,t.x+t.size+11,t.y+o/3)},ut=(e,t,n)=>{const r=n.labelSize,o=n.labelFont,a=n.labelWeight;if(e.font=`${a} ${r}px ${o}`,e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=2,e.shadowBlur=3,e.shadowColor="rgba(0,0,0,0.2)","string"==typeof t.label){const n=e.measureText(t.label).width,o=Math.round(n+16),a=Math.round(r+2+4),i=Math.max(t.size,r/2)+2,l=Math.asin(a/2/i),s=Math.sqrt(Math.abs(Math.pow(i,2)-Math.pow(a/2,2)));e.beginPath(),e.moveTo(t.x+s,t.y+a/2),e.lineTo(t.x+i+o,t.y+a/2),e.lineTo(t.x+i+o,t.y-a/2),e.lineTo(t.x+s,t.y-a/2),e.arc(t.x,t.y,i,l,-l),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+2,0,2*Math.PI),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,ct(e,t,n)};var pt=n(88586);class dt extends st.AbstractNodeProgram{constructor(e){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute float a_borderSize;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying vec4 v_color;\nvarying float v_border;\nvarying float v_borderRadius;\n\nconst float bias = 255.0 / 254.0;\nconst float radius = 0.5;\n\nvoid main() {\n gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n \n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n v_borderRadius = radius - (radius * a_borderSize / a_size); // border radius in node's size (full size is 1)\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n}","\nprecision mediump float;\n\nvarying vec4 v_color; // base color of node\nvarying float v_border;\nvarying float v_borderRadius; // inner border radius\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0); // transparent color\nconst float radius = 0.5;\n\nvoid main(void) {\n float distToCenter = length(gl_PointCoord - vec2(0.5, 0.5)); // distance from current point to center of node\n\n if (distToCenter < v_borderRadius - v_border) // distance to inner border radius\n gl_FragColor = transparent;\n else if (distToCenter < v_borderRadius)\n gl_FragColor = mix(v_color, transparent, (v_borderRadius - distToCenter) / v_border);\n else if (distToCenter < radius - v_border) // distance to outer border radius\n gl_FragColor = v_color;\n else if (distToCenter < radius)\n gl_FragColor = mix(transparent, v_color, (radius - distToCenter) / v_border);\n else // points outside the button\n gl_FragColor = transparent;\n}\n",1,5),this.borderSize=void 0,this.borderSize=e.getAttribLocation(this.program,"a_borderSize"),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.borderSize),e.vertexAttribPointer(this.borderSize,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16)}process(e,t,n){const r=this.array;let o=1*n*5;if(t||!e.inPath)return r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,pt.floatColor)(e.color),r[o]=e.highlighted?4:2}render(e){const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.drawArrays(t.POINTS,0,this.array.length/5)}}class mt{constructor(){this.rebindTextureFns=[],this.images={},this.textureImage=void 0,this.hasReceivedImages=!1,this.pendingImagesFrameID=void 0,this.loadImage=(e,t)=>{if(this.images[e])return;const n=new Image;var r;n.addEventListener("load",(()=>{this.images[e]={status:"pending",image:n},"number"!=typeof this.pendingImagesFrameID&&(this.pendingImagesFrameID=requestAnimationFrame((()=>this.finalizePendingImages())))})),n.addEventListener("error",(()=>{this.images[e]={status:"error"}})),this.images[e]={status:"loading"},r=n,new URL(t,window.location.href).origin!==window.location.origin&&(r.crossOrigin=""),n.src=t},this.finalizePendingImages=()=>{this.pendingImagesFrameID=void 0;const e=[];for(const t in this.images){const n=this.images[t];"pending"===n.status&&e.push({id:t,image:n.image,size:Math.min(n.image.width,n.image.height)||1})}const t=document.createElement("canvas"),n=t.getContext("2d");t.width=e.reduce(((e,t)=>{let{size:n}=t;return e+n}),this.hasReceivedImages?this.textureImage.width:0),t.height=Math.max(this.hasReceivedImages?this.textureImage.height:0,...e.map((e=>{let{size:t}=e;return t})));let r=0;this.hasReceivedImages&&(n.putImageData(this.textureImage,0,0),r=this.textureImage.width),e.forEach((e=>{let{id:t,image:o,size:a}=e;const i=Math.min(128,a);let l=0,s=0;(o.width||0)>(o.height||0)?l=(o.width-o.height)/2:s=(o.height-o.width)/2,n.drawImage(o,l,s,a,a,r,0,i,i),this.images[t]={status:"ready",x:r,y:0,width:i,height:i},r+=i})),this.textureImage=n.getImageData(0,0,t.width,t.height),this.hasReceivedImages=!0,this.rebindTextureFns.forEach((e=>e()))}}}const ht={id:"defaultImage",path:(0,h.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};class gt extends st.AbstractNodeProgram{constructor(e,t){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute vec4 a_texture;\nattribute float a_inactive;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_size * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n\n // Pass inactive property\n v_inactive = a_inactive;\n}","\nprecision mediump float;\n\nvarying float v_border;\nvarying float v_inactive;\nvarying vec4 v_color;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst float radius = 0.5;\n\n// convert color to gray\nvec4 toGrayscale(in vec4 color)\n{\n float average = (color.r + color.g + color.b) / 3.0;\n return vec4(average, average, average, 1.0);\n}\n\nvoid main(void) {\n vec4 color;\n\n // set texel as color of point\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(v_color, texel, texel.a).rgb, max(texel.a, v_color.a));\n } else {\n color = v_color;\n }\n\n // convert color to gray\n if (v_inactive > 0.0) {\n color = toGrayscale(color);\n }\n\n // distance from point to center of node\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n\n if (dist < radius - v_border) // points inside node\n gl_FragColor = color;\n else if (dist < radius) // border of node\n gl_FragColor = mix(transparent, color, (radius - dist) / v_border);\n else // points outside node\n gl_FragColor = transparent;\n}",1,9),this.imageLoader=void 0,this.texture=void 0,this.textureLocation=void 0,this.atlasLocation=void 0,this.latestRenderParams=void 0,this.inactive=void 0,this.imageLoader=new mt,this.imageLoader.rebindTextureFns.push((()=>{this&&this.rebindTexture&&this.rebindTexture(),t&&t.refresh&&t.refresh()})),this.imageLoader.textureImage=new ImageData(1,1),this.textureLocation=e.getAttribLocation(this.program,"a_texture"),this.inactive=e.getAttribLocation(this.program,"a_inactive");const n=e.getUniformLocation(this.program,"u_atlas");if(null===n)throw new Error("NodeProgramImage: error while getting atlasLocation");this.atlasLocation=n,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),this.imageLoader.loadImage(ht.id,ht.path),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.textureLocation),e.enableVertexAttribArray(this.inactive),e.vertexAttribPointer(this.inactive,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.textureLocation,4,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,20)}process(e,t,n){const r=this.array;let o=1*n*9;const a=e.image;let i=a&&this.imageLoader.images[a];if("string"!=typeof a||i||this.imageLoader.loadImage(a,a),t)return r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,void(r[o++]=0);if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,pt.floatColor)(e.color),r[o++]=e.inactive?1:0,i&&"ready"===i.status||(i=this.imageLoader.images[ht.id]),i&&"ready"===i.status){const{width:e,height:t}=this.imageLoader.textureImage;r[o++]=i.x/e,r[o++]=i.y/t,r[o++]=i.width/e,r[o++]=i.height/t}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}render(e){if(this.hasNothingToRender())return;this.latestRenderParams=e;const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1i(this.atlasLocation,0),t.drawArrays(t.POINTS,0,this.array.length/9)}rebindTexture(){const e=this.gl;e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.imageLoader.textureImage),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))}}const bt=[{id:"expandIcon",path:(0,h.m5F)('<svg width="32" height="32" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="8" cy="8" r="8" fill="white"/>\n<circle cx="8" cy="8" r="7.5" stroke="black" stroke-opacity="0.541176"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.80013 7.20003V4H7.20013L7.20013 7.20003H4V8.80003H7.20013L7.20013 12H8.80013V8.80003H12V7.20003H8.80013Z" fill="black" fill-opacity="0.541176"/>\n</svg>')},{id:"collapseIcon",path:(0,h.m5F)('<svg width="32" height="32" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="8" cy="8" r="8" fill="white"/>\n<circle cx="8" cy="8" r="7.5" stroke="black" stroke-opacity="0.541176"/>\n<path d="M4 7.20004H12V8.80004H4V7.20004Z" fill="black" fill-opacity="0.541176"/>\n</svg>\n')}];class ft extends st.AbstractNodeProgram{constructor(e,t){super(e,"\nattribute vec2 a_position;\nattribute float a_size;\nattribute vec4 a_color;\nattribute float a_buttonSize;\nattribute vec2 a_normals;\nattribute vec4 a_texture;\n\nuniform float u_ratio;\nuniform float u_scale;\nuniform mat3 u_matrix;\nuniform float u_sqrtZoomRatio;\nuniform float u_correctionRatio;\n\nvarying float v_border;\nvarying vec4 v_texture;\nvarying vec4 v_color;\n\nconst float bias = 255.0 / 254.0;\n\nvoid main() {\n float normalLength = length(a_normals);\n vec2 unitNormal = (a_normals) / normalLength;\n\n float pixelsThickness = max(normalLength, 1.0 * u_sqrtZoomRatio);\n float webGLThickness = pixelsThickness * u_correctionRatio;\n float adaptedWebGLThickness = webGLThickness * u_sqrtZoomRatio;\n\n // Move the point\n float adaptedWebGLNodeRadius = a_size * 2.0 * u_correctionRatio * u_sqrtZoomRatio;\n vec2 compensationVector = vec2(-unitNormal.y, unitNormal.x) * (adaptedWebGLNodeRadius);\n\n // Set position\n gl_Position = vec4((u_matrix * vec3(a_position + compensationVector, 1)).xy, 0, 1);\n\n // Multiply the point size twice:\n // - x SCALING_RATIO to correct the canvas scaling\n // - x 2 to correct the formulae\n gl_PointSize = a_buttonSize * u_ratio * u_scale * 2.0;\n\n v_border = (1.0 / u_ratio) * (0.5 / a_size);\n\n // Extract the color:\n v_color = a_color;\n v_color.a *= bias;\n\n // Pass the texture coordinates:\n v_texture = a_texture;\n}","\nprecision mediump float;\n\nvarying float v_border;\nvarying vec4 v_texture;\n\nuniform sampler2D u_atlas;\n\nconst vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 black = vec4(0.0, 0.0, 0.0, 1.0);\nconst float bias = 255.0 / 254.0;\nconst float radius = 0.5;\n\nvoid main(void) {\n vec4 color;\n float distToCenter = length(gl_PointCoord - vec2(0.5, 0.5));\n\n // set texel as color of point\n if (v_texture.w > 0.0) {\n vec4 texel = texture2D(u_atlas, v_texture.xy + gl_PointCoord * v_texture.zw, -1.0);\n color = vec4(mix(black, texel, texel.a).rgb, max(texel.a, bias));\n } else {\n color = black;\n }\n\n if (distToCenter < radius - v_border) // points inside button\n gl_FragColor = color;\n else if (distToCenter < radius) // border of button\n gl_FragColor = mix(transparent, color, (0.5 - distToCenter) / v_border);\n else // points outside button\n gl_FragColor = transparent;\n}",2,11),this.imageLoader=void 0,this.texture=void 0,this.textureLocation=void 0,this.buttonSize=void 0,this.normals=void 0,this.correctionRatioLocation=void 0,this.sqrtZoomRatioLocation=void 0,this.atlasLocation=void 0,this.latestRenderParams=void 0,this.imageLoader=new mt,this.imageLoader.rebindTextureFns.push((()=>{this&&this.rebindTexture&&this.rebindTexture(),t&&t.refresh&&t.refresh()})),this.imageLoader.textureImage=new ImageData(1,1),this.textureLocation=e.getAttribLocation(this.program,"a_texture"),this.buttonSize=e.getAttribLocation(this.program,"a_buttonSize"),this.normals=e.getAttribLocation(this.program,"a_normals");const n=e.getUniformLocation(this.program,"u_correctionRatio");if(null===n)throw new Error("NodeButtonsProgram: error while getting correctionRatioLocation");this.correctionRatioLocation=n;const r=e.getUniformLocation(this.program,"u_sqrtZoomRatio");if(null===r)throw new Error("NodeButtonsProgram: error while getting sqrtZoomRatioLocation");this.sqrtZoomRatioLocation=r;const o=e.getUniformLocation(this.program,"u_atlas");if(null===o)throw new Error("NodeButtonsProgram: error while getting atlasLocation");this.atlasLocation=o,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),bt.map((e=>this.imageLoader.loadImage(e.id,e.path))),this.bind()}bind(){super.bind();const e=this.gl;e.enableVertexAttribArray(this.buttonSize),e.enableVertexAttribArray(this.normals),e.enableVertexAttribArray(this.textureLocation),e.vertexAttribPointer(this.buttonSize,1,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,16),e.vertexAttribPointer(this.normals,2,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,20),e.vertexAttribPointer(this.textureLocation,4,e.FLOAT,!1,this.attributes*Float32Array.BYTES_PER_ELEMENT,28)}process(e,t,n){const r=this.array;let o=2*n*11;const a=t||e.inactive&&!e.highlighted,[i,l]=e.buttonOffset||[0,0];let s=i*i+l*l,c=0,u=0;if(s&&(s=1/Math.sqrt(s),c=l*s,u=i*s),a||!e.showExpand)r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0;else{const t=this.imageLoader.images.expandIcon;if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,pt.floatColor)(e.color),r[o++]=e.buttonSize||0,r[o++]=c,r[o++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[o++]=t.x/e,r[o++]=t.y/n,r[o++]=t.width/e,r[o++]=t.height/n}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}if(a||!e.showCollapse)r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0;else{const t=this.imageLoader.images.collapseIcon;if(r[o++]=e.x,r[o++]=e.y,r[o++]=e.size,r[o++]=(0,pt.floatColor)(e.color),r[o++]=e.buttonSize||0,r[o++]=-c,r[o++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[o++]=t.x/e,r[o++]=t.y/n,r[o++]=t.width/e,r[o++]=t.height/n}else r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0}}render(e){if(this.hasNothingToRender())return;this.latestRenderParams=e;const t=this.gl,n=this.program;t.useProgram(n),t.uniform1f(this.ratioLocation,1/Math.sqrt(e.ratio)),t.uniform1f(this.scaleLocation,e.scalingRatio),t.uniformMatrix3fv(this.matrixLocation,!1,e.matrix),t.uniform1f(this.sqrtZoomRatioLocation,Math.sqrt(e.ratio)),t.uniform1f(this.correctionRatioLocation,e.correctionRatio),t.uniform1i(this.atlasLocation,1),t.drawArrays(t.POINTS,0,this.array.length/11)}rebindTexture(){const e=this.gl;e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,this.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this.imageLoader.textureImage),e.generateMipmap(e.TEXTURE_2D),this.latestRenderParams&&(this.bind(),this.bufferData(),this.render(this.latestRenderParams))}}const yt=e=>{let{children:t}=e;const n=(0,r.useMemo)((()=>({allowInvalidContainer:!0,defaultNodeType:"image",hoverRenderer:ut,labelRenderer:ct,nodeProgramClasses:{image:(0,st.createNodeCompoundProgram)([gt,dt,ft])},labelFont:"Roboto",labelSize:13,labelColor:{color:"rgba(0, 0, 0, 0.87)"}})),[]);return o().createElement(lt.C6,{graph:d.MultiGraph,style:{background:"transparent"},initialSettings:n},t)};var vt=n(28833),xt=n.n(vt),Et=n(3660),Ct=n.n(Et),wt=n(28301),Ot=n.n(wt),Tt=n(30634),Rt=n(20562),St=n(31181),Pt=n(30284);const Nt=.6,jt=(e,t,n,r,o)=>{if(t.loop){const{size:r,color:o}=t,a=n.x,i=n.y,l=n.size,s=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{x1:e-7*(n+r),y1:t,x2:e,y2:t+7*(n+r)}}(a,i,.6*l);if(e.strokeStyle=o,e.lineWidth=r,"arrow"===t.type){const{aX:t,aY:n,vX:c,vY:u}=((e,t,n,r,o)=>{const a=o+2,i=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return{aX:e.x1+(t-e.x1)*(i-a-r)/i,aY:e.y1+(n-e.y1)*(i-a-r)/i,vX:(t-e.x1)*a/i,vY:(n-e.y1)*a/i}})(s,a,i,l,r);e.beginPath(),e.moveTo(a,i),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,n),e.stroke(),e.fillStyle=o,e.beginPath(),e.moveTo(t+c,n+u),e.lineTo(t+u*Nt,n-c*Nt),e.lineTo(t-u*Nt,n+c*Nt),e.lineTo(t+c,n+u),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(a,i),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,a,i),e.stroke()}(0,Pt.default)(e,t,n,r,o)};function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kt(e,t,n[t])}))}return e}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _t=(e,t,n,r,o)=>e>n-o&&e<n+o&&t>r-o&&t<r+o&&Math.sqrt(Math.pow(e-n,2)+Math.pow(t-r,2))<o,Lt=(0,m.memoizeWith)(((e,t,n)=>n.type),h.uie),At={size:24,buttonSize:8,buttonOffset:[19,19]},Dt={size:12,buttonSize:6,buttonOffset:[8,13]},Ut=e=>{let{data:t,graph:n,syncLayout:o,workerLayout:i,layoutSettings:l,selectedNode:s,isDirected:c=!1,onNodeClick:p,onNodeCollapse:d,onNodeExpand:m,filters:h}=e;const g=(0,lt.Ys)(),b=(0,lt.sG)(),v=(0,lt.$j)(),x=(0,lt.eP)(),E=(0,a.useSelector)(u.ZP.selectors.getEntity),C=(0,a.useSelector)(u.ZP.selectors.getMetadata),w=(0,a.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",[O,T]=(0,r.useState)(void 0),[R,S]=(0,r.useState)(null),[P,N]=(0,r.useState)({});(0,r.useEffect)((()=>{g.getCamera().setState({ratio:1.2})}),[n,g]),(0,r.useEffect)((()=>{if(S((0,y.toUndirected)(n)),b(n),o){const e=o(g.getGraph(),l);(0,St.animateNodes)(g.getGraph(),e,{duration:1e3})}if(i){const e=new i(g.getGraph(),l);e.start();const t=setTimeout((()=>{e.stop()}),5e3);return()=>{clearTimeout(t),e.kill()}}}),[t,n,o,i,g,l,b,c]);const j=(0,r.useCallback)((e=>{const t=g.getGraph(),n=null==E?void 0:E.uri;if(t&&R&&n&&e&&n!==e){const r=(0,f.Ar)(c?t:R,n,e),o=((e,t,n)=>{const r=[],o=n?"findOutEdge":"findEdge";return t&&t.reduce(((t,n)=>(r.push(e[o](t,n,(e=>!!e))),n))),r})(t,r,c);return r?{edges:o,nodes:r}:{}}return{}}),[g,null==E?void 0:E.uri,R,c]);(0,r.useEffect)((()=>{N(j(s))}),[s,j]),(0,r.useEffect)((()=>{v({enterNode:e=>{let{node:t}=e;T(t)},leaveNode:()=>{T(void 0)},clickNode:e=>{let{node:t}=e;p(t)},click:e=>{const t=(e=>{let{x:t,y:n}=e;const r=g.viewportToGraph({x:t,y:n}),o=g.getGraph(),a=o.nodes().map((e=>{const t=o.getNodeAttributes(e);return{nodeId:e,distance:Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2),hidden:t.hidden}})).sort(((e,t)=>e.distance-t.distance)).filter((e=>{let{hidden:t}=e;return!t}));return a.length>0?a[0].nodeId:null})(e);if(t){const n=g.getNodeDisplayData(t),r=g.framedGraphToViewport({x:n.x,y:n.y}),o=g.scaleSize(n.buttonOffset[0]),a=g.scaleSize(n.buttonOffset[1]),i=g.scaleSize(n.buttonSize),l=_t(e.x,e.y,r.x+o,r.y-a,i),s=_t(e.x,e.y,r.x+o,r.y+a,i);n.showExpand&&l&&(m(t),p(t)),n.showCollapse&&s&&(d(t,j(t)),p(t))}}})}),[g,v,p,d,m,j]),(0,r.useEffect)((()=>{const e=g.getGraph(),t=e.neighbors(s);x({nodeReducer:(n,r)=>{const{entityTypesUris:o=[]}=h||{},a=Lt(C,w,{type:r.entityTypeUri}),i=n===s?At:Dt,l=e.neighbors(n),c=l.map((t=>e.getNodeAttribute(t,"hidden"))).filter((e=>!!e)).length,u=It({},r,i,{color:"#0072CE",image:a,showExpand:r.untraversedRelationsCount>0||c>0,showCollapse:r.traversedRelationsCount>1&&l.length-c>1}),p=(P.nodes||[]).includes(n),d=O===n;return p||n===s||n===(null==E?void 0:E.uri)?(u.inPath=!0,n===(null==E?void 0:E.uri)&&(u.color="#00FFFF")):!t||t.includes(n)||s===n||s===(null==E?void 0:E.uri)||p||(d||(u.label=""),u.inactive=!0),d&&(u.highlighted=!0),![s,null==E?void 0:E.uri].includes(n)&&o.length>0&&!o.includes(r.entityTypeUri)&&(u.hidden=!0),u},edgeReducer:(t,n)=>{const{relationTypesUris:r=[]}=h||{},o=It({},n,{hidden:!1}),a=(P.edges||[]).includes(t);return(s&&s!==(null==E?void 0:E.uri)&&!e.hasExtremity(t,s)&&!a||r.length>0&&!r.includes(n.relationTypeUri))&&(o.hidden=!0),c&&(o.size=3),a&&(o.color="#0072CE",o.size=4),o},renderEdgeLabels:!0,edgeLabelRenderer:jt,defaultEdgeType:c?"arrow":"line"})}),[g,x,O,s,P,null==E?void 0:E.uri,C,w,c,h])};let zt;function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Bt(e,t,n[t])}))}return e}function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy",e.DIRECTED_NETWORK="Directed Network"}(zt||(zt={}));const Mt=e=>{let{data:t,graph:n,selectedNode:o,layout:a,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const u=(0,Tt.D)(t);(0,Rt.D)((()=>{if(u){const e=(0,m.difference)(t.entities.map((0,m.prop)("uri")),u.entities.map((0,m.prop)("uri")));if(e.length){const t=n.copy();xt().assign(t),e.forEach((e=>{n.setNodeAttribute(e,"x",t.getNodeAttribute(e,"x")),n.setNodeAttribute(e,"y",t.getNodeAttribute(e,"y"))}))}}}),[t]);const p=(0,r.useMemo)((()=>(xt().assign(n),{settings:Zt({},Ct().inferSettings(n),{gravity:1})})),[n]);return Ut({workerLayout:Ot(),layoutSettings:p,data:t,graph:n,selectedNode:o,onNodeClick:i,isDirected:a===zt.DIRECTED_NETWORK,onNodeCollapse:l,onNodeExpand:s,filters:c}),null};var Ft=n(36039);const Ht=(e,t,n,r)=>{const o=new Set;return t.length||t.push(Array.from(e)),e.forEach((t=>{n.add(t),r.forEach((r=>{r.from!==t||e.has(r.to)||n.has(r.to)||o.add(r.to)}))})),o.size&&t.push(Array.from(o)),((e,t,n)=>{const r=new Set;return e.forEach((e=>{t.forEach((t=>{t.from!==e||n.has(t.to)||r.add(t.to)}))})),!!r.size})(o,r,n)?Ht(o,t,n,r):t},Gt=(e,t,n,r)=>{if(e.length<10&&(t[r]=[...e]),e.length>10){const o=e.slice(10),a=e.slice(0,10);t[r]=a,t[r+1]=n[r+1]?[...n[r+1],...o]:o}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return Gt(e,t,n,r)}return t};function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Wt=e=>{let{data:t,graph:n,selectedNode:o,layout:a,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const u=(0,r.useCallback)((e=>{const t=e.copy(),n=(e=>{switch(e){case zt.VERTICAL_TB:return 180;case zt.HORIZONTAL_LR:return 270}})(a),r=((e,t)=>{const n=e.nodes,r=e.edges.filter((e=>e.from!==e.to)),o=((e,t,n)=>{const r=new Set;return t.forEach((t=>{e.some((e=>e.to===t.id))||r.add(t.id)})),r.size||r.add(n),r})(r,n,t),a=Ht(o,[],new Set,r);return Gt(a[0],[],a,0)})((e=>({nodes:e.nodes().map((e=>({id:e,name:""}))),edges:e.mapEdges(((e,t,n,r)=>({from:n,to:r,key:e,relationTypeUri:""})))}))(t),o),i=(e=>{const t=e.map((e=>e.length));return Math.max(...t)})(r);for(let e=0;e<r.length;++e)for(let n=0;n<r[e].length;++n)t.setNodeAttribute(r[e][n],"x",(s=n,(l=r[e].length)===(c=i)?5*s:1===l?5*(c-1)/2:5*(c-1)/(l+1)*(s+1))),t.setNodeAttribute(r[e][n],"y",10*e);var l,s,c;return Ft.rotation.assign(t,n,{degrees:!0}),t.reduceNodes(((e,t,n)=>{let{x:r,y:o}=n;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vt(e,t,n[t])}))}return e}({},e,{[t]:{x:r,y:o}})}),{})}),[a,o]);return Ut({syncLayout:u,data:t,graph:n,selectedNode:o,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c}),null};var qt=n(24737);const $t=(0,B.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),Yt=(0,X.l)(_,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;const i=$t(),l=(0,a.useSelector)(u.ZP.selectors.getMetadata),s=(0,a.useSelector)(u.ZP.selectors.getEntity),c=(0,r.useMemo)((()=>[{label:b().text("All"),value:null},...(0,h.mmY)(l,s.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[s,l]),p=(0,r.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return o().createElement(qt.Z,{classes:{valueContainer:i.valueContainer},className:i.graphTypeSelector,height:42,label:b().text("Graph type"),value:p,options:c,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:i.filledInputRoot}}}})})),Xt=(0,B.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),Kt=(0,r.memo)((e=>{let{value:t,onChangeHandler:n}=e;const r=Xt(),a=[{label:b().text("Simple network"),value:zt.SIMPLE_NETWORK},{label:b().text("Vertical hierarchy"),value:zt.VERTICAL_TB},{label:b().text("Horizontal hierarchy"),value:zt.HORIZONTAL_LR},{label:b().text("Directed network"),value:zt.DIRECTED_NETWORK}];return o().createElement(qt.Z,{className:r.graphLayoutSelector,label:b().text("Graph layout"),value:a.find((0,m.propEq)("value",t)),options:a,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:r.filledInputRoot}}}})})),Qt=(0,B.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}}),Jt=(0,X.l)(_,(e=>{let{data:t,graphologyGraph:n,selectedEntity:r,onEntitySelect:o,onCollapseEntity:a,onExpandEntity:i,relationshipTable:{filters:l}}=e;return{data:t,graph:n,selectedNode:null==r?void 0:r.uri,onNodeSelect:o,onNodeCollapse:a,onNodeExpand:i,filters:l}}),(e=>{let{data:t,graph:n,selectedNode:a,onNodeSelect:i,onNodeCollapse:l,onNodeExpand:s,filters:c}=e;const[u,p]=(0,r.useState)(zt.SIMPLE_NETWORK),d=Qt(),m={data:t,graph:n,selectedNode:a,layout:u,onNodeClick:i,onNodeCollapse:l,onNodeExpand:s,filters:c};return o().createElement("div",{className:d.wrapper},o().createElement("div",{className:d.selectors},o().createElement(Yt,null),o().createElement(Kt,{value:u,onChangeHandler:p})),o().createElement("div",{className:d.graph},n&&o().createElement(yt,null,u===zt.SIMPLE_NETWORK||u===zt.DIRECTED_NETWORK?o().createElement(Mt,m):o().createElement(Wt,m))))})),en=(0,B.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},graphWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},graphContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),tn=(0,r.memo)((()=>{const e=en(),t=(0,a.useSelector)(u.ZP.selectors.getEntity),n=(e=>{const{graphLoading:t,data:n,graphologyGraph:o,graphTypeUri:i,setGraphTypeUri:l,onAddRelation:s,onDeleteRelation:c,onCollapseEntity:p,onExpandEntity:d}=R(e),{selectedEntity:g,onEntitySelect:f,selectedEntityLoading:y}=((e,t)=>{const n=(0,T._)(),o=(0,a.useDispatch)(),[i,l]=(0,r.useState)(null),s=(0,r.useRef)({}),[c,p]=(0,r.useState)(!1),d=(0,r.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,h.HvW)(e).then((e=>(s.current=P(s.current,e),e)))}),[]),g=(0,r.useCallback)((e=>{var r;const a=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,m.propEq)("uri",e));a&&l(a),p(!0),n(d(e)).then(l).catch((e=>{o(u.ui.actions.errorSet((0,h.xU7)(e,b().text("Something went wrong"))))})).finally((()=>{p(!1)}))}),[o,t,n,d]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(s.current=P({},e),g(e.uri))}),[null==e?void 0:e.uri]),(0,r.useEffect)((()=>{const n=null==t?void 0:t.entities.find((e=>(null==i?void 0:i.uri)===e.uri));n||(null!=e&&e.uri?(s.current=P({},e),g(e.uri)):(s.current={},l(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:i,onEntitySelect:g}})(e,n);return{graphLoading:t,data:n,graphologyGraph:o,selectedEntity:g,selectedEntityLoading:y,graphTypeUri:i,relationshipTable:k({data:n,selectedEntityUri:null==g?void 0:g.uri,mainEntityUri:null==e?void 0:e.uri,graphTypeUri:i}),onAddRelation:s,onDeleteRelation:c,onCollapseEntity:p,onExpandEntity:d,onEntitySelect:f,setGraphTypeUri:l}})(t),{graphLoading:i}=n;return o().createElement(_.Provider,{value:n},o().createElement("div",{className:e.perspectiveView},i&&o().createElement(p.Z,null),(null==t?void 0:t.uri)&&o().createElement("div",{className:e.graphContainer},o().createElement("div",{className:e.graphWrapper},o().createElement(H,null),o().createElement(Jt,null)),o().createElement(it,null))))}));tn.displayName="GraphPerspectiveView";const nn=tn,rn=(0,i.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),on=e=>{let{store:t}=e;return o().createElement(a.Provider,{store:t},o().createElement(i.StylesProvider,{generateClassName:rn},o().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},o().createElement(nn,null),o().createElement(l.Z,{showErrorFromStore:!0}))))}}}]);
|
package/7638.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[7638],{87638:(e,t,r)=>{r.d(t,{Z9:()=>wE,Yj:()=>o,ZP:()=>Hc,NZ:()=>w,Pu:()=>l,N5:()=>fe,yC:()=>O,cm:()=>L,ui:()=>A,EA:()=>v});var n={};r.r(n),r.d(n,{DATA_TENANTS_UPDATED:()=>Ne});var i={};r.r(i),r.d(i,{dataTenantsUpdated:()=>Pe});var o={};r.r(o),r.d(o,{actions:()=>i,constants:()=>n,reducer:()=>be});var a={};r.r(a),r.d(a,{METADATA_LOADED:()=>he});var E={};r.r(E),r.d(E,{updateMetadata:()=>Le});var s={};r.r(s),r.d(s,{ATTRIBUTE_PRESENTATIONS_LOADED:()=>Fe,AUTOCLOSE_INTERVAL_LOADED:()=>je,DATE_MASK_UPDATED:()=>xe,DATE_TIME_MASK_UPDATED:()=>ze,ENTITY_DELETION_FINISHED:()=>me,ERROR_SET:()=>Je,KEYS_SET:()=>Ze,LOCALIZATION_LOADED:()=>ke,NEW_ENTITY_SHOWN:()=>Ce,NEW_UI_CONFIG_LOADED:()=>Ve,NUMBER_FORMAT_UPDATED:()=>Be,OPEN_APP_FROM_CHOCOLATE_BAR:()=>We,OPEN_CONSOLE_APP:()=>Ge,OPEN_ENTITY:()=>Ue,OPEN_GRAPH:()=>Ke,OPEN_HISTORY_EVENT:()=>Xe,OPEN_PERSPECTIVE:()=>we,OPEN_PIVOTING_PERSPECTIVE:()=>Qe,OPEN_SEARCH:()=>qe,PATHS_SET:()=>Me,SET_PREFER_REACT:()=>He,UI_CONFIG_LOADED:()=>Ye});var l={};r.r(l),r.d(l,{actions:()=>E,constants:()=>a,reducer:()=>ot});var d={};r.r(d),r.d(d,{ProfileActions:()=>at});var c={};r.r(c),r.d(c,{addAttributes:()=>Et,addDefaultValuesAction:()=>st,addNextPageOfAttributeValues:()=>ct,modifyAttribute:()=>lt,processNextPageOfAttributeValues:()=>Tt,removeAttribute:()=>dt,requestNextPageOfAttributeValues:()=>ut,saveProfile:()=>_t,validateProfile:()=>pt});var T={};r.r(T),r.d(T,{DependentLookupsActions:()=>yt});var u={};r.r(u),r.d(u,{dependentLookupsEditorsBlocked:()=>Ot,dependentLookupsInitedTypeUrisAdded:()=>Rt,dependentLookupsStructureSet:()=>Dt});var _={};r.r(_),r.d(_,{getDependentLookupEditorState:()=>ft,getDependentLookupsInitedTypeUris:()=>gt,getDependentLookupsStructure:()=>It,getDependentLookupsStructureNode:()=>At});var p={};r.r(p),r.d(p,{ModeActions:()=>Nt});var y={};r.r(y),r.d(y,{ACTIVITY_FILTER_UPDATED:()=>wt,GLOBAL_FILTER_UPDATED:()=>Yt,KEYWORD_UPDATED:()=>Ut,SAVE_STATE:()=>mt,SEARCH_OPTIONS_UPDATED:()=>Vt,SEARCH_RESULTS_SET:()=>Lt,SET_SEARCH_NAVIGATION_DATA:()=>Ft,SET_SEARCH_OPTIONS_CONFIG:()=>Mt,SET_SEARCH_PROVIDER_DATA:()=>kt,UPDATE_SEARCH_NAVIGATION_DATA_FIELDS:()=>jt,UPDATE_STATE:()=>Ct});var D={};r.r(D),r.d(D,{activityFilterUpdated:()=>Kt,globalFilterUpdated:()=>xt,keywordUpdated:()=>Gt,saveState:()=>Bt,searchResultsSet:()=>Ht,setSearchNavigationData:()=>Zt,setSearchOptionsConfig:()=>qt,setSearchProviderData:()=>Xt,updateSearchNavigationDataFields:()=>Qt,updateSearchOptions:()=>zt,updateState:()=>Wt});var R={};r.r(R),r.d(R,{getActivityFilter:()=>tr,getGlobalFilter:()=>rr,getGlobalFilterQuery:()=>nr,getGlobalFilterSavedSearchesUris:()=>ir,getGlobalSearchRequestOptions:()=>lr,getKeyword:()=>er,getSearchNavigationData:()=>Er,getSearchOptions:()=>or,getSearchProviderData:()=>ar,getSearchResults:()=>$t,getStringifiedSearchOptions:()=>sr});var O={};r.r(O),r.d(O,{actions:()=>D,constants:()=>y,reducer:()=>Dr,sagas:()=>ur,selectors:()=>R});var I={};r.r(I),r.d(I,{attributePresentationsLoaded:()=>Sr,autocloseIntervalLoaded:()=>vr,dateMaskUpdated:()=>mr,dateTimeMaskUpdated:()=>wr,entityDeletionFinished:()=>Ir,errorSet:()=>Fr,keysSet:()=>Mr,localizationLoaded:()=>Cr,newEntityShown:()=>Or,newUiConfigLoaded:()=>Nr,numberFormatUpdated:()=>br,openAppFromChocolateBar:()=>Lr,openConsoleApp:()=>hr,openEntity:()=>Rr,openGraph:()=>Ur,openHistoryEvent:()=>Vr,openPerspective:()=>gr,openPivotingPerspective:()=>kr,openSearch:()=>Yr,pathsSet:()=>Ar,setPreferReact:()=>Pr,uiConfigLoaded:()=>fr});var g={};r.r(g),r.d(g,{getAdminToolsPath:()=>Qr,getApiPath:()=>Gr,getAttributePresentations:()=>Jr,getAutoCloseInterval:()=>$r,getCollaborationPath:()=>zr,getDVFPath:()=>Xr,getDateMask:()=>rn,getDateTimeMask:()=>nn,getDefaultMaxValues:()=>en,getDtssPath:()=>Br,getExportPath:()=>Hr,getGoogleMapKey:()=>dn,getImageAttributesFieldsOrder:()=>sn,getImagePath:()=>jr,getImageServicePath:()=>qr,getLookupAutocomplete:()=>ln,getPivotingAttributes:()=>En,getServicesPath:()=>pn,getUIConfig:()=>yn,getUIPath:()=>Wr,getUiError:()=>_n,getUiNumberFormat:()=>tn,getValidateReadMode:()=>Tn,getValidationServicePath:()=>Zr,getValidationServiceSeverityLevels:()=>cn,getWorkflowConfigurationEnabled:()=>un,getWorkflowEnvironmentURL:()=>xr,getWorkflowPath:()=>Kr});var A={};r.r(A),r.d(A,{actions:()=>I,constants:()=>s,reducer:()=>In,selectors:()=>g});var f={};r.r(f),r.d(f,{USER_UPDATED:()=>gn});var N={};r.r(N),r.d(N,{userUpdated:()=>An});var S={};r.r(S),r.d(S,{getUserName:()=>fn,getUserRoles:()=>Nn});var v={};r.r(v),r.d(v,{actions:()=>N,constants:()=>f,reducer:()=>Sn,selectors:()=>S});var P={};r.r(P),r.d(P,{TENANT_NAME_UPDATED:()=>Pn,TENANT_UPDATED:()=>vn});var b={};r.r(b),r.d(b,{tenantNameUpdated:()=>hn,tenantUpdated:()=>bn});var h={};r.r(h),r.d(h,{getTenantId:()=>Ln,getTenantName:()=>Un});var L={};r.r(L),r.d(L,{actions:()=>b,constants:()=>P,reducer:()=>wn,selectors:()=>h});var U={};r.r(U),r.d(U,{ENVIRONMENT_UPDATED:()=>Yn});var C={};r.r(C),r.d(C,{environmentUpdated:()=>Vn});var m={};r.r(m),r.d(m,{getEnvironmentId:()=>Mn});var w={};r.r(w),r.d(w,{actions:()=>C,constants:()=>U,reducer:()=>jn,selectors:()=>m});var Y={};r.r(Y),r.d(Y,{getAbsoluteImagePath:()=>eo,getActiveErrorsForAttributesPager:()=>Di,getActivityFilter:()=>ki,getAdminToolsPath:()=>fi,getAllRelationsToAddAndEdit:()=>Ji,getAllTreesEditingConnections:()=>lo,getApiPath:()=>Oi,getAttributePresentations:()=>Ni,getAttributeTypeErrors:()=>pi,getAttributesErrors:()=>yi,getAutoCloseInterval:()=>Pi,getCanUserCreateWorkflowConfigJar:()=>So,getCanUserCreateWorkflowEnvironmentConfigJar:()=>vo,getCanUserDeleteProfiles:()=>qo,getCanUserExecuteWorkflowJobs:()=>Po,getCanUserExecuteWorkflowJobsSyncBusinessProcessData:()=>bo,getCanUserExecuteWorkflowJobsTerminateProcessInstance:()=>ho,getCanUserExecuteWorkflowJobsUpdateTasks:()=>Lo,getCanUserExecuteWorkflowJobsValidateTasks:()=>Uo,getCanUserGetDQStatistic:()=>Zo,getCanUserImportEntitiesFromDT:()=>Bo,getCanUserMakeActivitiesExport:()=>Wo,getCanUserMakeBulkUpdate:()=>zo,getCanUserMakeExport:()=>Go,getCanUserManageWorkflowDefinition:()=>Co,getCanUserManageWorkflowEnvironmentDefinition:()=>mo,getCanUserOpenDataLoader:()=>Xo,getCanUserReadDVF:()=>Qo,getCanUserReadEntitiesFromDT:()=>Ko,getCanUserReadWorkflowDataTask:()=>wo,getCanUserRegisterConfigEnvironments:()=>No,getCanUserStartProcessFromQuery:()=>xo,getCanUserUpdateProcessInstance:()=>Yo,getCanUserUpdateWorkflowDataTask:()=>Vo,getCanUserViewProcessInstanceSearchQuery:()=>Mo,getCanUserViewWorkflowConfigJar:()=>ko,getCanUserViewWorkflowDefinition:()=>Fo,getCanUserViewWorkflowEnvironmentConfigJar:()=>jo,getCanUserViewWorkflowJobs:()=>Ho,getCheckIfCanAddRelations:()=>Ea,getCollaborationPath:()=>go,getConnectionsByViewId:()=>Qn,getConnectionsTemporaryUrisForCreation:()=>ri,getConnectionsWithDraftsByViewId:()=>ei,getDVFPath:()=>Ao,getDataTenants:()=>Hn,getDateMask:()=>bi,getDateTimeMask:()=>hi,getDefaultMaxValues:()=>vi,getDependentLookupEditorState:()=>oa,getDependentLookupsInitedTypeUris:()=>ia,getDependentLookupsStructure:()=>ra,getDependentLookupsStructureNode:()=>na,getDraftsForSaveByViewId:()=>ti,getDtssPath:()=>Do,getEditingOrAddingConnectionByViewIdAndRelationUri:()=>Jn,getEditingOrAddingConnectionRelationObjectByViewIdAndRelationUri:()=>$n,getEntity:()=>Xn,getEntityUri:()=>Zn,getEntityWithDiff:()=>sa,getEntityWithoutDiff:()=>la,getEnvironment:()=>yo,getEnvironmentObject:()=>Bn,getExportPath:()=>Ii,getGlobalFilter:()=>Bi,getGlobalFilterSavedSearchesUris:()=>Ki,getGlobalSearchRequestOptions:()=>Gi,getGoogleMapKey:()=>mi,getHistoryDiff:()=>Ei,getHistoryEvent:()=>si,getHistoryMode:()=>ci,getHistorySlice:()=>li,getImageAttributesFieldsOrder:()=>Ui,getImagePath:()=>Ri,getImageServicePath:()=>Ai,getIsEditableMode:()=>zi,getIsHistoryModeEnabled:()=>di,getIsSuggestMode:()=>Xi,getIsViewMode:()=>qi,getLookupAutocomplete:()=>Ci,getLookups:()=>ii,getMetadata:()=>Gn,getMode:()=>xi,getModifiedEntities:()=>_i,getModifiedEntity:()=>Ti,getModifiedEntityDefaultProfilePic:()=>ui,getPivotingAttributes:()=>Li,getProfile:()=>zn,getProfileCancelNeedConfirm:()=>uo,getProfileErrors:()=>oi,getProfileOperation:()=>co,getProfileViews:()=>To,getRelationToAddByViewId:()=>Zi,getRelationsToEditByViewId:()=>Qi,getRelationsViewIds:()=>ai,getSearch:()=>qn,getSearchKeyword:()=>Mi,getSearchNavigationData:()=>Hi,getSearchOptions:()=>Fi,getSearchProviderData:()=>ji,getSearchResults:()=>Vi,getServicesPath:()=>da,getStringifiedSearchOptions:()=>Wi,getTenant:()=>_o,getTenantName:()=>po,getTenantObject:()=>Wn,getTotalByViewId:()=>ni,getTree:()=>io,getTreeCommands:()=>Eo,getTreeEditingConnection:()=>so,getTreeRoot:()=>oo,getTreeTotal:()=>ao,getTrees:()=>no,getUIConfig:()=>ca,getUIPath:()=>gi,getUi:()=>xn,getUiError:()=>aa,getUiNumberFormat:()=>Si,getUser:()=>Kn,getUserName:()=>to,getUserRoles:()=>ro,getValidateReadMode:()=>Yi,getValidationServicePath:()=>fo,getValidationServiceSeverityLevels:()=>wi,getViewIdsForOpenRelation:()=>$i,getWorkflowConfigurationEnabled:()=>Io,getWorkflowEnvironmentUrl:()=>Oo,getWorkflowPath:()=>Ro,isCollaborationEnabled:()=>Jo,isCollaborationSideViewEnabled:()=>ta,isWorkflowEnabled:()=>$o,isWorkflowSideViewEnabled:()=>ea});var V={};r.r(V),r.d(V,{ModifiedEntitiesActions:()=>Ta});var M={};r.r(M),r.d(M,{RelationsActions:()=>ua});var k={};r.r(k),r.d(k,{findConnectionByRelationUri:()=>Ra,getAllRelationsToAddAndEdit:()=>La,getConnectionsByViewId:()=>Na,getConnectionsWithDrafts:()=>ma,getDraftsByViewId:()=>va,getDraftsForSaveByViewId:()=>Va,getEditingOrAddingConnectionByViewIdAndRelationUri:()=>wa,getEditingOrAddingConnectionRelationObjectByViewIdAndRelationUri:()=>Ya,getEntityUriFromConnection:()=>Aa,getRelationAttributesFromConnection:()=>ga,getRelationDirectionFromConnection:()=>fa,getRelationObjectFromConnection:()=>Ia,getRelationToAddByViewId:()=>Pa,getRelationToAddPath:()=>ya,getRelationUriFromConnection:()=>Oa,getRelationsToEditByViewId:()=>ba,getRelationsToEditPath:()=>Da,getTempRelations:()=>ha,getTemporaryUrisForCreation:()=>Ma,getTotalByViewId:()=>Sa,getTotalWithDrafts:()=>Ca,getViewIdsForOpenRelation:()=>Ua});var F={};r.r(F),r.d(F,{actions:()=>u,constants:()=>T,reducer:()=>bt,sagas:()=>Qa,selectors:()=>_});var j={};r.r(j),r.d(j,{EntityActions:()=>Ja});var H={};r.r(H),r.d(H,{clearEntity:()=>iE,entityCreationRequested:()=>rE,entityLoaded:()=>$a,entityRemoveRequested:()=>nE,loadEntity:()=>tE,setDefaultProfilePic:()=>eE});var G={};r.r(G),r.d(G,{getUri:()=>oE});var W={};r.r(W),r.d(W,{actions:()=>H,constants:()=>j,reducer:()=>lE,selectors:()=>G});var B={};r.r(B),r.d(B,{ErrorsActions:()=>dE});var K={};r.r(K),r.d(K,{getActiveErrorsForAttributesPager:()=>pE,getAttributeTypeErrors:()=>cE,getAttributesErrors:()=>TE});var x={};r.r(x),r.d(x,{errorDeactivated:()=>yE,errorsSet:()=>DE});var z={};r.r(z),r.d(z,{actions:()=>x,constants:()=>B,reducer:()=>gE,selectors:()=>K});var q={};r.r(q),r.d(q,{HistoryActions:()=>AE});var X={};r.r(X),r.d(X,{clearHistoryDiff:()=>NE,clearHistoryEvent:()=>vE,setHistoryDiff:()=>fE,setHistoryEvent:()=>SE,setHistoryMode:()=>bE,setHistorySlice:()=>PE});var Z={};r.r(Z),r.d(Z,{getHistoryDiff:()=>hE,getHistoryEvent:()=>LE,getHistoryMode:()=>mE,getHistorySlice:()=>UE,getIsHistoryModeEnabled:()=>CE});var Q={};r.r(Q),r.d(Q,{actions:()=>X,constants:()=>q,reducer:()=>kE,selectors:()=>Z});var J={};r.r(J),r.d(J,{LOOKUPS_FOR_TYPE_RESOLVED:()=>jE,LOOKUPS_LIST_RESOLVED:()=>HE,LOOKUPS_LOADED:()=>FE});var $={};r.r($),r.d($,{lookupsForTypeResolved:()=>WE,lookupsListResolved:()=>BE,lookupsLoaded:()=>GE});var ee={};r.r(ee),r.d(ee,{actions:()=>$,constants:()=>J,reducer:()=>qE});var te={};r.r(te),r.d(te,{modeCancelEditing:()=>ZE,modeEditingCanceled:()=>QE,modeUpdated:()=>XE});var re={};r.r(re),r.d(re,{getIsEditMode:()=>$E,getIsEditableMode:()=>ts,getIsSuggestMode:()=>JE,getIsViewMode:()=>es});var ne={};r.r(ne),r.d(ne,{actions:()=>te,constants:()=>p,reducer:()=>ns,selectors:()=>re});var ie={};r.r(ie),r.d(ie,{entityCreated:()=>is,entityDeleted:()=>os,modifiedEntitiesReset:()=>Es,setDefaultProfilePic:()=>as});var oe={};r.r(oe),r.d(oe,{getModifiedEntity:()=>ss,getModifiedEntityDefaultProfilePic:()=>ls});var ae={};r.r(ae),r.d(ae,{actions:()=>ie,constants:()=>V,reducer:()=>ps,sagas:()=>gs,selectors:()=>oe});var Ee={};r.r(Ee),r.d(Ee,{addRelation:()=>vs,closeRelationEditor:()=>hs,editRelation:()=>Ps,ignoreRelation:()=>Ss,openRelationEditor:()=>bs,relationsLoaded:()=>As,removeRelation:()=>Ns,secondLevelRelationsLoaded:()=>fs,setRelationEntity:()=>Us,setRelationType:()=>Ls});var se={};r.r(se),r.d(se,{actions:()=>Ee,constants:()=>M,reducer:()=>Fs,selectors:()=>k});var le={};r.r(le),r.d(le,{TreesActions:()=>js});var de={};r.r(de),r.d(de,{activenessDateChanged:()=>rl,childrenLoaded:()=>Al,childrenLoading:()=>xs,currentEntityShownInTree:()=>zs,entitiesMappingLoaded:()=>$s,nodeExpanded:()=>Xs,resetScrollToNode:()=>Bs,toggleRelationDetails:()=>tl,treeChanged:()=>el,treeCommandsCleared:()=>Ks,treeLoaded:()=>Hs,treeLoadedWithError:()=>Gs,treeLoading:()=>Ws,treeNodeChanged:()=>El,treeNodeCreated:()=>ol,treeNodeEditingApplied:()=>ll,treeNodeEditingCanceled:()=>dl,treeNodeEditingStarted:()=>sl,treeNodeEntityChanged:()=>Rl,treeNodeNewChildEditingApplied:()=>pl,treeNodeNewChildEditingCanceled:()=>yl,treeNodeNewChildEditingStarted:()=>_l,treeNodeNewParentEditingApplied:()=>Tl,treeNodeNewParentEditingCanceled:()=>ul,treeNodeNewParentEditingStarted:()=>cl,treeNodeRelationTypeChanged:()=>Dl,treeNodeRemoved:()=>Qs,treeRefreshed:()=>qs,treeRelationChanged:()=>al,treeRelationCreated:()=>il,treeRelationRemoved:()=>Zs,treeRelationRepointed:()=>nl,treeSecondaryLabelShown:()=>Js,treeSorted:()=>Ol,treesResetInitialTrees:()=>Nl,treesRestoreFromInitialTrees:()=>fl,treesStateRestored:()=>gl,treesStateSaved:()=>Il});var ce={};r.r(ce),r.d(ce,{getAllTreesEditingConnections:()=>Ll,getCommands:()=>bl,getTree:()=>Sl,getTreeEditingConnection:()=>hl,getTreeRoot:()=>vl,getTreeTotal:()=>Pl});var Te={};r.r(Te),r.d(Te,{actions:()=>de,constants:()=>le,reducer:()=>rd,selectors:()=>ce});var ue={};r.r(ue),r.d(ue,{getActiveErrorsForAttributesPager:()=>Yd,getAllRelationsToAddAndEdit:()=>Ud,getAllTreesEditingConnections:()=>Hd,getAttributeTypeErrors:()=>md,getAttributesErrors:()=>wd,getConnectionsByViewId:()=>fd,getConnectionsTemporaryUrisForCreation:()=>Sd,getConnectionsWithDraftsByViewId:()=>Od,getDependentLookupEditorState:()=>Kd,getDependentLookups:()=>ld,getDependentLookupsInitedTypeUris:()=>Bd,getDependentLookupsStructure:()=>Gd,getDependentLookupsStructureNode:()=>Wd,getDraftsForSaveByViewId:()=>Nd,getEditingOrAddingConnectionByViewIdAndRelationUri:()=>Id,getEditingOrAddingConnectionRelationObjectByViewIdAndRelationUri:()=>gd,getEntity:()=>nd,getEntityHasChanges:()=>Qd,getErrors:()=>od,getHistory:()=>cd,getHistoryDiff:()=>xd,getHistoryEvent:()=>zd,getHistoryMode:()=>Zd,getHistorySlice:()=>qd,getIsEditableMode:()=>vd,getIsHistoryModeEnabled:()=>Xd,getIsSuggestMode:()=>bd,getIsViewMode:()=>Pd,getLookups:()=>sd,getMode:()=>dd,getModifiedEntities:()=>id,getModifiedEntity:()=>yd,getModifiedEntityDefaultProfilePic:()=>Dd,getOperation:()=>Td,getProfileCancelNeedConfirm:()=>tc,getProfileHasChanges:()=>ec,getRelationToAddByViewId:()=>hd,getRelations:()=>ad,getRelationsHasChanges:()=>$d,getRelationsToEditByViewId:()=>Ld,getRelationsViewIds:()=>Rd,getSidePanelViews:()=>_d,getTotalByViewId:()=>Ad,getTree:()=>Vd,getTreeCommands:()=>Fd,getTreeEditingConnection:()=>jd,getTreeHasChanges:()=>Jd,getTreeRoot:()=>Md,getTreeTotal:()=>kd,getTrees:()=>Ed,getUri:()=>pd,getViewIdsForOpenRelation:()=>Cd,getViews:()=>ud});var _e={};r.r(_e),r.d(_e,{ProfileOperationActions:()=>ic});var pe={};r.r(pe),r.d(pe,{profileUpdateOperation:()=>oc});var ye={};r.r(ye),r.d(ye,{actions:()=>pe,constants:()=>_e,reducer:()=>Cc});var De={};r.r(De),r.d(De,{ProfileViewsActions:()=>mc});var Re={};r.r(Re),r.d(Re,{profileViewsSet:()=>wc});var Oe={};r.r(Oe),r.d(Oe,{actions:()=>Re,constants:()=>De,reducer:()=>Yc});var Ie={};r.r(Ie),r.d(Ie,{SidePanelViewsActions:()=>Vc});var ge={};r.r(ge),r.d(ge,{sidePanelViewsLoaded:()=>Mc});var Ae={};r.r(Ae),r.d(Ae,{actions:()=>ge,constants:()=>Ie,reducer:()=>Fc});var fe={};r.r(fe),r.d(fe,{actions:()=>c,constants:()=>d,dependentLookups:()=>F,entity:()=>W,errors:()=>z,history:()=>Q,lookups:()=>ee,mode:()=>ne,modifiedEntities:()=>ae,operation:()=>ye,reducer:()=>jc,relations:()=>se,sagas:()=>Uc,selectors:()=>ue,sidePanelViews:()=>Ae,trees:()=>Te,views:()=>Oe});const Ne="DATA_TENANTS_UPDATED";var Se=r(17440);const ve=e=>t=>({type:e,payload:t}),Pe=ve(Ne),be=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===Ne?t.payload:e},he="METADATA_LOADED",Le=e=>{let{tenant:t,metadata:r}=e;return{type:he,payload:{tenant:t,metadata:r}}},Ue="OPEN_ENTITY",Ce="NEW_ENTITY_SHOWN",me="ENTITY_DELETION_FINISHED",we="OPEN_PERSPECTIVE",Ye="UI_CONFIG_LOADED",Ve="NEW_UI_CONFIG_LOADED",Me="PATHS_SET",ke="LOCALIZATION_LOADED",Fe="ATTRIBUTE_PRESENTATIONS_LOADED",je="AUTOCLOSE_INTERVAL_LOADED",He="SET_PREFER_REACT",Ge="OPEN_CONSOLE_APP",We="OPEN_APP_FROM_CHOCOLATE_BAR",Be="NUMBER_FORMAT_UPDATED",Ke="OPEN_GRAPH",xe="DATE_MASK_UPDATED",ze="DATE_TIME_MASK_UPDATED",qe="OPEN_SEARCH",Xe="OPEN_HISTORY_EVENT",Ze="KEYS_SET",Qe="OPEN_PIVOTING_PERSPECTIVE",Je="ERROR_SET";var $e=r(30830);function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){tt(e,t,r[t])}))}return e}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rt={},nt=(0,Se.pipe)($e.BBN,$e.j0k),it=(0,Se.map)($e.j0k),ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case he:{const{tenant:r,metadata:n}=t.payload;return et({},e,{[r]:nt(n)})}case ke:return it(e);default:return e}};let at;!function(e){e.ADD_ATTRIBUTES="ADD_ATTRIBUTES",e.MODIFY_ATTRIBUTE="MODIFY_ATTRIBUTE",e.REMOVE_ATTRIBUTE="REMOVE_ATTRIBUTE",e.REQUEST_NEXT_PAGE_ATTRIBUTE_VALUES="REQUEST_NEXT_PAGE_ATTRIBUTE_VALUES",e.ADD_NEXT_PAGE_ATTRIBUTE_VALUES="ADD_NEXT_PAGE_ATTRIBUTE_VALUES",e.PROCESS_NEXT_PAGE_ATTRIBUTE_VALUES="PROCESS_NEXT_PAGE_ATTRIBUTE_VALUES",e.ADD_DEFAULT_VALUES="ADD_DEFAULT_VALUES",e.SAVE_PROFILE="SAVE_PROFILE",e.VALIDATE_PROFILE="VALIDATE_PROFILE"}(at||(at={}));const Et=ve(at.ADD_ATTRIBUTES),st=ve(at.ADD_DEFAULT_VALUES),lt=ve(at.MODIFY_ATTRIBUTE),dt=ve(at.REMOVE_ATTRIBUTE),ct=ve(at.ADD_NEXT_PAGE_ATTRIBUTE_VALUES),Tt=ve(at.PROCESS_NEXT_PAGE_ATTRIBUTE_VALUES),ut=ve(at.REQUEST_NEXT_PAGE_ATTRIBUTE_VALUES),_t=ve(at.SAVE_PROFILE),pt=ve(at.VALIDATE_PROFILE);let yt;!function(e){e.DEPENDENT_LOOKUPS_STRUCTURE_SET="DEPENDENT_LOOKUPS_STRUCTURE_SET",e.DEPENDENT_LOOKUPS_INITED_TYPE_URIS_ADDED="DEPENDENT_LOOKUPS_INITED_TYPE_URIS_ADDED",e.DEPENDENT_LOOKUPS_EDITORS_BLOCKED="DEPENDENT_LOOKUPS_EDITORS_BLOCKED"}(yt||(yt={}));const Dt=ve(yt.DEPENDENT_LOOKUPS_STRUCTURE_SET),Rt=ve(yt.DEPENDENT_LOOKUPS_INITED_TYPE_URIS_ADDED),Ot=ve(yt.DEPENDENT_LOOKUPS_EDITORS_BLOCKED),It=e=>e.structure,gt=e=>e.initedTypeUris,At=(e,t)=>e.structure[t],ft=(e,t)=>e.editors[t];let Nt;function St(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vt(e,t,r[t])}))}return e}function vt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.MODE_UPDATED="MODE_UPDATED",e.MODE_CANCEL_EDITING="MODE_CANCEL_EDITING",e.MODE_EDITING_CANCELED="MODE_EDITING_CANCELED"}(Nt||(Nt={}));const Pt={structure:{},editors:{},initedTypeUris:[]},bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pt,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Nt.MODE_UPDATED:{const r=t.payload;return(0,$e.uzs)(r)?Pt:e}case yt.DEPENDENT_LOOKUPS_STRUCTURE_SET:return St({},e,{structure:t.payload});case yt.DEPENDENT_LOOKUPS_INITED_TYPE_URIS_ADDED:{const r=t.payload;return St({},e,{initedTypeUris:(0,Se.uniq)(e.initedTypeUris.concat(r))})}case yt.DEPENDENT_LOOKUPS_EDITORS_BLOCKED:{const{uris:r,isBlocked:n}=t.payload,i=e.editors,o=r.reduce(((e,t)=>St({},e,{[t]:{isBlocked:n}})),i);return St({},e,{editors:o})}default:return e}};var ht=r(90371);const Lt="SEARCH_RESULTS_SET",Ut="KEYWORD_UPDATED",Ct="UPDATE_STATE",mt="SAVE_STATE",wt="ACTIVITY_FILTER_UPDATED",Yt="GLOBAL_FILTER_UPDATED",Vt="SEARCH_OPTIONS_UPDATED",Mt="SET_SEARCH_OPTIONS_CONFIG",kt="SET_SEARCH_PROVIDER_DATA",Ft="SET_SEARCH_NAVIGATION_DATA",jt="UPDATE_SEARCH_NAVIGATION_DATA_FIELDS",Ht=ve(Lt),Gt=ve(Ut),Wt=ve(Ct),Bt=ve(mt),Kt=ve(wt),xt=e=>{let{query:t,savedSearches:r,savedSearchesUris:n,isMuted:i}=e;return{type:Yt,payload:{query:t,savedSearches:r,savedSearchesUris:n,isMuted:i}}},zt=ve(Vt),qt=ve(Mt),Xt=ve(kt),Zt=ve(Ft),Qt=ve(jt);var Jt=r(97698);const $t=e=>e.searchResults,er=e=>e.keyword,tr=e=>e.activityFilter,rr=e=>e.globalFilter,nr=(0,Se.pathOr)("",["globalFilter","query"]),ir=(0,Se.path)(["globalFilter","savedSearchesUris"]),or=e=>e.searchOptions,ar=e=>e.searchProviderData,Er=e=>e.searchNavigationData,sr=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,Se.pipe)(or,(0,Se.omit)(t),(0,Se.filter)(Se.identity),Se.keys,(0,Se.join)(","))(e)},lr=(0,Jt.createSelector)(sr,tr,nr,((e,t,r)=>({searchOptions:e,activityFilter:t,globalFilter:r}))),dr="searchNavigation";function*cr(){const e=yield(0,ht.Ys)(Hc.selectors.getSearchNavigationData),t=yield(0,ht.Ys)(Hc.selectors.getSearchProviderData);sessionStorage.setItem(dr,JSON.stringify({searchNavigationData:e,searchProviderData:t}))}function*Tr(){let e;try{e=JSON.parse(sessionStorage.getItem(dr))||{}}catch(t){e={}}const{searchNavigationData:t,searchProviderData:r}=e;t&&r&&(yield(0,ht.gz)(Xt(r)),yield(0,ht.gz)(Zt(t)))}const ur=[function*(){yield(0,ht.Fm)([Ft,jt,Ue],cr)},function*(){yield(0,ht.RE)(Tr)}];function _r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){pr(e,t,r[t])}))}return e}function pr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const yr={searchResults:[],keyword:null,searchOptions:{searchByOv:!1,ovOnly:!1},activityFilter:"active",globalFilter:{query:null,savedSearchesUris:[],isMuted:!0},searchProviderData:null,searchNavigationData:null},Dr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yr,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Lt:return _r({},e,{searchResults:t.payload});case Ut:{const r=(0,Se.pick)(["value","isRawFilter"],t.payload||{});return _r({},e,{keyword:(0,Se.isEmpty)(r)?null:r})}case Ct:return _r({},yr,{keyword:(0,Se.isNil)(t.payload.keyword)||(0,Se.isEmpty)(t.payload.keyword)?null:t.payload.keyword,searchOptions:t.payload.searchOptions||e.searchOptions,activityFilter:e.activityFilter,globalFilter:e.globalFilter,searchNavigationData:e.searchNavigationData,searchProviderData:e.searchProviderData});case wt:return _r({},e,{activityFilter:t.payload});case Yt:return _r({},e,{globalFilter:t.payload});case Vt:return _r({},e,{searchOptions:_r({},e.searchOptions,t.payload)});case Mt:{const r=!!t.payload.showSearchByOv;return _r({},e,{searchOptions:{searchByOv:r,ovOnly:r}})}case kt:return _r({},e,{searchProviderData:t.payload});case Ft:return _r({},e,{searchNavigationData:t.payload});case jt:return _r({},e,{searchNavigationData:_r({},e.searchNavigationData,t.payload)});case Ue:var r;return"navigation"===t.payload.source||t.payload.uri===(null===(r=e.searchNavigationData)||void 0===r?void 0:r.uri)?e:_r({},e,{searchNavigationData:null});default:return e}},Rr=e=>{let{uri:t,viewId:r,source:n=null}=e;return{type:Ue,payload:{uri:t,viewId:r,source:n}}},Or=e=>{let{entity:t}=e;return{type:Ce,payload:{entity:t}}},Ir=ve(me),gr=e=>{let{perspectiveId:t,viewId:r}=e;return{type:we,payload:{perspectiveId:t,viewId:r}}},Ar=ve(Me),fr=ve(Ye),Nr=ve(Ve),Sr=ve(Fe),vr=ve(je),Pr=ve(He),br=ve(Be),hr=(e,t,r)=>({type:Ge,payload:{name:e,path:t,query:r}}),Lr=e=>({type:We,payload:e}),Ur=ve(Ke),Cr=ve(ke),mr=ve(xe),wr=ve(ze),Yr=e=>({type:qe,payload:"searchState"in e?e:{searchState:e}}),Vr=e=>{let{entityUri:t,historyEvent:r}=e;return{type:Xe,payload:{entityUri:t,historyEvent:r}}},Mr=ve(Ze),kr=ve(Qe),Fr=e=>({type:Je,payload:e}),jr=(0,Se.path)(["paths","imagePath"]),Hr=(0,Se.path)(["paths","exportPath"]),Gr=(0,Se.path)(["paths","apiPath"]),Wr=(0,Se.path)(["paths","uiPath"]),Br=(0,Se.path)(["paths","dtssPath"]),Kr=(0,Se.path)(["paths","workflowPath"]),xr=(0,Se.path)(["paths","workflowEnvironmentURL"]),zr=(0,Se.path)(["paths","collaborationPath"]),qr=(0,Se.path)(["paths","imageServicePath"]),Xr=(0,Se.path)(["paths","dvfPath"]),Zr=(0,Se.path)(["paths","validationServicePath"]),Qr=(0,Se.path)(["paths","adminToolsPath"]),Jr=(0,Se.either)((0,Se.path)(["newConfig","properties","attributePresentations"]),(0,Se.path)(["attributePresentations"])),$r=e=>e.autoCloseInterval,en=(0,Se.path)(["config","com.reltio.plugins.entity.EntityRequestSettings","defaultMaxValues"]),tn=(0,Se.path)(["numberFormat"]),rn=(0,Se.path)(["dateMask"]),nn=(0,Se.path)(["dateTimeMask"]),on=["config","com.reltio.plugins.pivoting.PivotingSettings","pivotingAttributes"],an=(0,Se.chain)((0,Se.prop)("attribute-types")),En=(0,Se.ifElse)((0,Se.hasPath)(on),(0,Se.path)(on),(0,Se.pipe)((0,Se.pathOr)([],["newConfig","pivoting"]),an)),sn=(0,Se.path)(["config","com.reltio.plugins.imageattribute.fieldsorder"]),ln=(0,Se.path)(["config","com.reltio.plugins.ui.LookupAutocomplete"]),dn=(0,Se.path)(["keys","googleMapKey"]),cn=(0,Se.path)(["config","com.reltio.plugins.entity.ValidationServiceLevels","levels"]),Tn=(0,Se.ifElse)((0,Se.hasPath)(["config","com.reltio.plugins.entity.Validation","validateReadMode"]),(0,Se.path)(["config","com.reltio.plugins.entity.Validation","validateReadMode"]),(0,Se.pathOr)(!0,["newConfig","properties","validate","validateReadMode"])),un=(0,Se.either)((0,Se.path)(["config","com.reltio.plugins.workflow.configuration","enabled"]),(0,Se.path)(["newConfig","properties","workflow","enabled"])),_n=(0,Se.path)(["error"]),pn=(0,Se.path)(["paths","servicesPath"]),yn=(0,Se.path)(["newConfig"]);function Dn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Rn(e,t,r[t])}))}return e}function Rn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const On={},In=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:On,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Me:return Dn({},e,{paths:t.payload});case Ye:return Dn({},e,{config:t.payload});case Ve:return Dn({},e,{newConfig:t.payload});case Fe:return Dn({},e,{attributePresentations:t.payload});case je:return Dn({},e,{autoCloseInterval:t.payload});case Be:return Dn({},e,{numberFormat:t.payload});case xe:return Dn({},e,{dateMask:t.payload});case ze:return Dn({},e,{dateTimeMask:t.payload});case Ze:return Dn({},e,{keys:t.payload});case Je:return Dn({},e,{error:t.payload});default:return e}},gn="USER_UPDATED",An=ve(gn),fn=e=>null==e?void 0:e.username,Nn=e=>null==e?void 0:e.roles,Sn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===gn?t.payload:e},vn="TENANT_UPDATED",Pn="TENANT_NAME_UPDATED",bn=ve(vn),hn=ve(Pn),Ln=(0,Se.prop)("id"),Un=(0,Se.prop)("name");function Cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){mn(e,t,r[t])}))}return e}function mn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case vn:return Cn({},e,{id:t.payload});case Pn:return Cn({},e,{name:t.payload});default:return e}},Yn="ENVIRONMENT_UPDATED",Vn=ve(Yn),Mn=(0,Se.prop)("id");function kn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fn(e,t,r[t])}))}return e}function Fn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===Yn?kn({},e,{id:t.payload}):e},Hn=e=>e.dataTenants,Gn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_o(e);return e.metadata&&e.metadata[t]},Wn=e=>e.tenant,Bn=e=>e.environment,Kn=e=>e.user,xn=e=>e.ui,zn=e=>e.profile,qn=e=>e.search,Xn=e=>nd(zn(e)),Zn=e=>pd(zn(e)),Qn=(e,t)=>fd(zn(e),t),Jn=(e,t,r)=>Id(zn(e),t,r),$n=(e,t,r)=>gd(zn(e),t,r),ei=(e,t,r)=>Od(zn(e),t,r),ti=(e,t)=>Nd(zn(e),t),ri=e=>Sd(zn(e)),ni=(e,t)=>Ad(zn(e),t),ii=e=>sd(zn(e)),oi=e=>od(zn(e)),ai=e=>Rd(zn(e)),Ei=e=>xd(zn(e)),si=e=>zd(zn(e)),li=e=>qd(zn(e)),di=e=>Xd(zn(e)),ci=e=>Zd(zn(e)),Ti=(e,t)=>yd(zn(e),t),ui=(e,t)=>Dd(zn(e),t),_i=e=>id(zn(e)),pi=(e,t,r)=>{let{uri:n}=r;return md(zn(e),t,n)},yi=(e,t,r)=>{let{uri:n}=r;return wd(zn(e),t,n)},Di=(e,t,r)=>Yd(zn(e),t,r),Ri=e=>jr(xn(e)),Oi=e=>Gr(xn(e)),Ii=e=>Hr(xn(e)),gi=e=>Wr(xn(e)),Ai=e=>qr(xn(e)),fi=e=>Qr(xn(e)),Ni=e=>Jr(xn(e)),Si=e=>tn(xn(e)),vi=e=>en(xn(e)),Pi=e=>$r(xn(e)),bi=e=>rn(xn(e)),hi=e=>nn(xn(e)),Li=e=>En(xn(e)),Ui=e=>sn(xn(e)),Ci=e=>ln(xn(e)),mi=e=>dn(xn(e)),wi=e=>cn(xn(e)),Yi=e=>Tn(xn(e)),Vi=e=>$t(qn(e)),Mi=e=>er(qn(e)),ki=e=>tr(qn(e)),Fi=e=>or(qn(e)),ji=e=>ar(qn(e)),Hi=e=>Er(qn(e)),Gi=(e,t)=>lr(qn(e),t),Wi=e=>sr(qn(e)),Bi=e=>rr(qn(e)),Ki=e=>ir(qn(e)),xi=e=>dd(zn(e)),zi=e=>vd(zn(e)),qi=e=>Pd(zn(e)),Xi=e=>bd(zn(e)),Zi=(e,t)=>hd(zn(e),t),Qi=(e,t)=>Ld(zn(e),t),Ji=(e,t)=>Ud(zn(e),t),$i=(e,t)=>Cd(zn(e),t),eo=e=>jr(xn(e))||Gr(xn(e)),to=e=>fn(Kn(e)),ro=e=>Nn(Kn(e)),no=e=>Ed(zn(e)),io=(e,t)=>Vd(zn(e),t),oo=(e,t)=>Md(zn(e),t),ao=(e,t)=>kd(zn(e),t),Eo=e=>Fd(zn(e)),so=(e,t,r)=>jd(zn(e),t,r),lo=(e,t)=>Hd(zn(e),t),co=e=>Td(zn(e)),To=e=>ud(zn(e)),uo=e=>tc(zn(e)),_o=e=>Ln(Wn(e)),po=e=>Un(Wn(e)),yo=e=>Mn(Bn(e)),Do=e=>Br(xn(e)),Ro=e=>Kr(xn(e)),Oo=e=>xr(xn(e)),Io=e=>un(xn(e)),go=e=>zr(xn(e)),Ao=e=>Xr(xn(e)),fo=e=>Zr(xn(e)),No=(0,Jt.createSelector)(Kn,_o,$e.Qp_),So=(0,Jt.createSelector)(Kn,_o,$e.UEY),vo=(0,Jt.createSelector)(Kn,_o,$e.Q0T),Po=(0,Jt.createSelector)(Kn,_o,$e.sBn),bo=(0,Jt.createSelector)(Kn,_o,$e.itK),ho=(0,Jt.createSelector)(Kn,_o,$e.H9$),Lo=(0,Jt.createSelector)(Kn,_o,$e.KPc),Uo=(0,Jt.createSelector)(Kn,_o,$e.zos),Co=(0,Jt.createSelector)(Kn,_o,$e.iuF),mo=(0,Jt.createSelector)(Kn,_o,$e.Wib),wo=(0,Jt.createSelector)(Kn,_o,$e.XUh),Yo=(0,Jt.createSelector)(Kn,_o,$e.sKE),Vo=(0,Jt.createSelector)(Kn,_o,$e.WmG),Mo=(0,Jt.createSelector)(Kn,_o,$e.QKx),ko=(0,Jt.createSelector)(Kn,_o,$e.Oik),Fo=(0,Jt.createSelector)(Kn,_o,$e.s0A),jo=(0,Jt.createSelector)(Kn,_o,$e.o9m),Ho=(0,Jt.createSelector)(Kn,_o,$e.MCd),Go=(0,Jt.createSelector)(Kn,_o,$e.fGe),Wo=(0,Jt.createSelector)(Kn,_o,$e.Cz4),Bo=(0,Jt.createSelector)(Kn,_o,$e.dZs),Ko=(0,Jt.createSelector)(Kn,_o,$e.E$L),xo=(0,Jt.createSelector)(Kn,_o,$e._jk),zo=(0,Jt.createSelector)(Kn,_o,$e.z_L),qo=(0,Jt.createSelector)(Kn,_o,$e.Lyr),Xo=(0,Jt.createSelector)(Kn,_o,$e.Hn0),Zo=(0,Jt.createSelector)(Kn,_o,$e.ELQ),Qo=(0,Jt.createSelector)(Kn,_o,$e.obS),Jo=(0,Jt.createSelector)(go,di,((e,t)=>!!e&&!t)),$o=(0,Jt.createSelector)(Ro,Io,((e,t)=>!!e&&!!t)),ea=e=>{var t,r;return null!==(t=null===(r=_d(zn(e)))||void 0===r?void 0:r.includes("com.reltio.plugins.entity.side.WorkflowsView"))&&void 0!==t&&t},ta=e=>{var t,r;return null!==(t=null===(r=_d(zn(e)))||void 0===r?void 0:r.includes("com.reltio.plugins.entity.collaboration.DiscussionsView"))&&void 0!==t&&t},ra=e=>Gd(zn(e)),na=(e,t)=>Wd(zn(e),t),ia=e=>Bd(zn(e)),oa=(e,t)=>Kd(zn(e),t),aa=e=>_n(xn(e)),Ea=(e,t)=>{const r=Gn(e),n=xi(e),i=Xn(e),{nextEntry:o,inRelations:a=[],outRelations:E=[]}=t;if(n!==$e.ARY.Editing&&n!==$e.ARY.Suggesting||o)return!1;{const e=(0,$e.Z5t)(n,(0,$e.nt9)(r,i.type)),t=a.concat(E).map((e=>(0,$e.V3K)(r,e.uri||e))).some((0,$e.d89)(n));return e&&t}},sa=(0,Jt.createSelector)(Xn,qi,li,Ei,$e.Ob5),la=(0,Jt.createSelector)(Xn,qi,li,$e.KUV),da=e=>pn(xn(e)),ca=e=>yn(xn(e));let Ta,ua;!function(e){e.MODIFIED_ENTITY_CREATED="MODIFIED_ENTITY_CREATED",e.MODIFIED_ENTITY_DELETED="MODIFIED_ENTITY_DELETED",e.MODIFIED_ENTITY_DEFAULT_PROFILE_PIC_SET="MODIFIED_ENTITY_DEFAULT_PROFILE_PIC_SET",e.MODIFIED_ENTITIES_RESET="MODIFIED_ENTITIES_RESET"}(Ta||(Ta={})),function(e){e.RELATIONS_LOADED="RELATIONS_LOADED",e.REMOVE_RELATION="REMOVE_RELATION",e.EDIT_RELATION="EDIT_RELATION",e.ADD_RELATION="ADD_RELATION",e.OPEN_RELATION_EDITOR="OPEN_RELATION_EDITOR",e.CLOSE_RELATION_EDITOR="CLOSE_RELATION_EDITOR",e.SET_RELATION_TYPE="SET_RELATION_TYPE",e.SET_RELATION_ENTITY="SET_RELATION_ENTITY",e.IGNORE_RELATION="IGNORE_RELATION",e.SECOND_LEVEL_RELATIONS_LOADED="SECOND_LEVEL_RELATIONS_LOADED"}(ua||(ua={}));var _a=r(51095),pa=r.n(_a);const ya=e=>[e,"relationToAdd"],Da=e=>[e,"relationsToEdit"],Ra=(e,t)=>e.find((0,Se.pipe)(Oa,(0,Se.equals)(t))),Oa=(0,Se.path)((0,$e.y6v)()),Ia=(0,Se.path)((0,$e.Qrb)()),ga=(0,Se.path)((0,$e.DiQ)()),Aa=(0,Se.path)((0,$e.avf)()),fa=(0,Se.path)((0,$e.cfX)()),Na=(e,t)=>(0,Se.path)([t,"connections"],e),Sa=(e,t)=>(0,Se.pathOr)(0,[t,"total"],e),va=(e,t)=>(0,Se.path)([t,"drafts"],e),Pa=(e,t)=>(0,Se.path)(ya(t),e),ba=(e,t)=>(0,Se.pathOr)([],Da(t),e),ha=(e,t)=>(0,Se.concat)(ba(e,t),[Pa(e,t)]),La=(e,t)=>(0,Se.pipe)((0,Se.when)((0,Se.always)(t),(0,Se.pick)(t)),Se.values,(0,Se.map)((0,Se.props)(["relationToAdd","relationsToEdit"])),Se.flatten,(0,Se.reject)(Se.isNil))(e),Ua=(e,t)=>Object.keys(e).filter((r=>{const n=ha(e,r);return!!Ra(n,t)})),Ca=(e,t)=>{const r=(0,Se.pipe)((0,Se.pathOr)([],[t,"drafts","addedConnections"]),(0,Se.filter)((0,Se.pipe)(Oa,$e.ZiX)),Se.length)(e);return Sa(e,t)+r},ma=pa()(Na,va,((e,t,r)=>r),(function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const{addedConnections:i=[],editedConnections:o=[],removedUris:a=[],ignoredRelationData:E=[]}=r,s=(0,Se.pipe)(Oa,Se.equals,(0,Se.find)(Se.__,a)),l=E.map((e=>e.relationUri)),d=(0,Se.pipe)(Oa,Se.equals,(0,Se.find)(Se.__,l)),c=e=>(0,Se.pipe)((0,Se.eqBy)(Oa),(0,Se.find)(Se.__,o),(0,Se.unless)(Se.isNil,$e.EyD))(e),T=n?(null===(e=t.find((e=>e.entity.entityUri===n)))||void 0===e?void 0:e.connections)||[]:t,u=i.filter((0,Se.propEq)("parentEntityUri",n));return u.map($e.xsF).concat(T.filter((e=>!u.some((0,Se.pipe)(Oa,(0,Se.equals)(Oa(e)))))).map((0,Se.pipe)((0,Se.either)(c,Se.identity),(0,Se.when)(s,$e.Lxg),(0,Se.when)(d,$e.FQA))))}))(((e,t,r)=>t+r)),wa=(e,t,r)=>{const n=ha(e,t);return Ra(n,r)},Ya=(e,t,r)=>{const n=wa(e,t,r);return Ia(n)},Va=(e,t)=>{const r=(0,Se.pipe)(Pa,(0,Se.ifElse)($e.u1G,(0,Se.omit)(["isNew"]),(0,Se.always)(null)))(e,t),{removedUris:n=[],addedConnections:i=[],editedConnections:o=[],ignoredRelationData:a=[]}=va(e,t)||{},E=ba(e,t),s=(0,Se.anyPass)([$e.xr3,(0,Se.complement)($e.NWi)]),l=(0,Se.pipe)((0,Se.filter)(s),(0,Se.map)($e.zhn))(E),d=l.map(Oa),c=(0,Se.pipe)((0,Se.reject)((0,Se.pipe)(Oa,(0,Se.includes)(Se.__,d))),(0,Se.concat)(l))(o),T=(0,Se.pipe)((0,Se.filter)($e.xvW),(0,Se.map)($e.zhn),(0,Se.when)((0,Se.always)((0,Se.complement)($e.O27)(r)),(0,Se.append)(r)))(E),u=T.map(Oa);return{removedUris:n,addedConnections:(0,Se.pipe)((0,Se.reject)((0,Se.pipe)(Oa,(0,Se.includes)(Se.__,u))),(0,Se.concat)(T))(i),editedConnections:c,ignoredRelationData:a}},Ma=e=>(0,Se.keys)(e).reduce(((t,r)=>{const{addedConnections:n,editedConnections:i}=Va(e,r);return(0,Se.pipe)(Se.concat,(0,Se.map)(Aa),(0,Se.filter)($e.ZiX),(0,Se.concat)(t))(n,i)}),[]);function*ka(e){const t=e.payload,r=yield(0,ht.Ys)(Gn),n=yield(0,ht.Ys)(ra),i=[t.type],o=yield(0,ht.Ys)(ia),a=(0,$e.idW)({structure:n,metadata:r,typeUris:i,alreadyAddedTypeUris:o}),E=(0,$e.z$M)({structure:a,metadata:r,entityOrRelation:t});yield(0,ht.gz)(Dt(E)),yield(0,ht.gz)(Rt(i))}function*Fa(e,t){const r=(0,$e.u5q)(e);return(0,$e.bC9)(r)?yield(0,ht.Ys)($n,t,r):yield(0,ht.Ys)(Ti,r)}function*ja(e){const{attributeType:t,metadata:r,parentUri:n,viewId:i}=e.payload,o=yield(0,ht.RE)(Fa,n,i),a=yield(0,ht.Ys)(ra);if(o)if(t){const e=(0,$e.XtP)(r,o,t.uri).filter((e=>{let{uri:t}=e;return t.startsWith(n)}))[0],i=(0,$e.asT)({structure:a,attributeValue:e});yield(0,ht.gz)(Dt(i))}else{const e=[o.type],t=yield(0,ht.Ys)(ia),n=(0,$e.idW)({structure:a,metadata:r,typeUris:e,alreadyAddedTypeUris:t}),i=(0,$e.z$M)({structure:n,metadata:r,entityOrRelation:o});yield(0,ht.gz)(Dt(i)),yield(0,ht.gz)(Rt(e))}}function*Ha(e){const t=e.payload,r=yield(0,ht.Ys)(Gn),n=yield(0,ht.Ys)(ra);let i=n;for(const e of t){const{attributeType:t,parentUri:o,viewId:a}=e;if((0,$e.E8K)(n,t.uri)){const e=yield(0,ht.RE)(Fa,o,a);e&&(i=(0,$e.sx)({structure:i,entityOrRelation:e,attrTypeUri:t.uri,metadata:r}))}}i!==n&&(yield(0,ht.gz)(Dt(i)))}function*Ga(e){const{attributeType:t,uri:r,viewId:n,silent:i}=e.payload,{value:o,lookupCode:a}=e.payload.value,E=a||o,s=yield(0,ht.Ys)(ra);if((yield(0,ht.RE)(Fa,r,n))&&(0,$e.E8K)(s,t.uri)){i||(yield(0,ht.rM)(za,s,{type:t.uri,uri:r,lookupValue:E}));const e=(0,$e.asT)({structure:s,attributeValue:{type:t.uri,value:E,uri:r}});yield(0,ht.gz)(Dt(e))}}function*Wa(e,t){const r=yield(0,ht.Ys)(Gn),n=yield(0,ht.Ys)(Ti,t),i=yield(0,ht.Ys)(_i),o=(0,$e.SAs)(i,n);let a=e;for(const e of[n,...o])a=(0,$e.z$M)({structure:a,metadata:r,entityOrRelation:e});return a}function*Ba(e,t){const r=yield(0,ht.Ys)(Ti,t),n=yield(0,ht.Ys)(_i),i=(0,$e.SAs)(n,r).map((0,Se.prop)("uri"));let o=e;for(const e of[t,...i])o=(0,$e.eWN)({structure:o,uri:e});return o}function*Ka(e){const{attributeType:t,uri:r,attributeValue:n,viewId:i}=e.payload,o=yield(0,ht.Ys)(ra),a=(0,$e.E8K)(o,t.uri);if(yield(0,ht.RE)(Fa,r,i)){a&&(yield(0,ht.rM)(za,o,{type:t.uri,uri:r,lookupValue:""}));let e=a||(0,$e.YkM)(t)?(0,$e.eWN)({structure:o,uri:r}):o;if((0,$e.YkG)(t)&&n){const t=(0,$e.bwT)(n);(0,$e.ZiX)(t)&&(e=yield(0,ht.RE)(Ba,e,t))}e!==o&&(yield(0,ht.gz)(Dt(e)))}}function*xa(e){const t=yield(0,ht.Ys)(ra),r=yield(0,ht.RE)(Ba,t,e.payload);yield(0,ht.gz)(Dt(r))}function*za(e,t){const r=yield(0,ht.Ys)(Gn),n=yield(0,ht.Ys)(_i),i=yield(0,ht.Ys)(Ji),o=yield(0,ht.Ys)(Zn),a=yield(0,ht.Ys)(Ci),E=(0,$e.Sj8)({structure:e,typeUri:t.type,valueUri:t.uri,modifiedEntities:n,connections:i,entityUri:o,config:a});if(E.length>0){const e=E.map((e=>e.uri));yield(0,ht.gz)(Ot({uris:e,isBlocked:!0}));try{const e=yield(0,ht.RE)($e.tGK,E,t);for(const n of e){const{type:e,uri:i,lookupValue:o,displayName:a}=n,E=(yield(0,ht.Ys)($i,(0,$e.u5q)(i)))[0],s=yield(0,ht.RE)(Fa,i,E);s&&(0,$e.dLR)(s,i)&&i!==t.uri&&(yield(0,ht.gz)(lt({attributeType:(0,$e.zeJ)(r,e),uri:i,value:{value:a||"",lookupCode:o||""},silent:!0,viewId:E})))}}catch(e){console.error(e)}yield(0,ht.gz)(Ot({uris:e,isBlocked:!1}))}}function*qa(e){const t=e.payload.connection,r=Aa(t);if((0,$e.ZiX)(r)&&(yield(0,ht.Ys)(Ti,r))){yield(0,ht.qn)(yt.DEPENDENT_LOOKUPS_STRUCTURE_SET);const e=yield(0,ht.Ys)(ra),t=yield(0,ht.RE)(Wa,e,r);yield(0,ht.gz)(Dt(t))}}function*Xa(e){const t=e.payload.relationUri,r=yield(0,ht.Ys)(ra),n=(0,$e.eWN)({structure:r,uri:t});yield(0,ht.gz)(Dt(n))}function*Za(e){const t=e.payload.id,r=e.payload.relationUri;if(0===(yield(0,ht.Ys)($i,r)).length){const e=yield(0,ht.Ys)(ra);let n=(0,$e.eWN)({structure:e,uri:r});const i=yield(0,ht.Ys)(ei,t),o=Ra(i,r),a=Aa(o);(0,$e.ZiX)(a)&&(n=yield(0,ht.RE)(Ba,n,a)),yield(0,ht.gz)(Dt(n))}}const Qa=[function*(){yield(0,ht.ib)(Ta.MODIFIED_ENTITY_CREATED,ka)},function*(){yield(0,ht.ib)(Ta.MODIFIED_ENTITY_DELETED,xa)},function*(){yield(0,ht.ib)(at.ADD_DEFAULT_VALUES,ja)},function*(){yield(0,ht.ib)(at.ADD_ATTRIBUTES,Ha)},function*(){yield(0,ht.ib)(at.MODIFY_ATTRIBUTE,Ga)},function*(){yield(0,ht.ib)(at.REMOVE_ATTRIBUTE,Ka)},function*(){yield(0,ht.ib)(ua.OPEN_RELATION_EDITOR,qa)},function*(){yield(0,ht.ib)(ua.SET_RELATION_TYPE,Xa)},function*(){yield(0,ht.ib)(ua.CLOSE_RELATION_EDITOR,Za)}];let Ja;!function(e){e.ENTITY_LOADED="ENTITY_LOADED",e.DEFAULT_PROFILE_PIC_SET="DEFAULT_PROFILE_PIC_SET",e.LOAD_ENTITY="LOAD_ENTITY",e.ENTITY_CREATION_REQUESTED="ENTITY_CREATION_REQUESTED",e.ENTITY_REMOVE_REQUESTED="ENTITY_REMOVE_REQUESTED",e.CLEAR_ENTITY="CLEAR_ENTITY"}(Ja||(Ja={}));const $a=ve(Ja.ENTITY_LOADED),eE=ve(Ja.DEFAULT_PROFILE_PIC_SET),tE=ve(Ja.LOAD_ENTITY),rE=ve(Ja.ENTITY_CREATION_REQUESTED),nE=ve(Ja.ENTITY_REMOVE_REQUESTED),iE=ve(Ja.CLEAR_ENTITY),oE=e=>null==e?void 0:e.uri;function aE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){EE(e,t,r[t])}))}return e}function EE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sE={},lE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sE,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ja.ENTITY_LOADED:return t.payload;case Ja.DEFAULT_PROFILE_PIC_SET:return"object"==typeof t.payload&&null!==t.payload?aE({},e,{defaultProfilePic:t.payload.uri,defaultProfilePicValue:t.payload}):e;case at.ADD_NEXT_PAGE_ATTRIBUTE_VALUES:{const{parentUri:r,attributeTypeName:n,attributeTypeUri:i,values:o}=t.payload,a=(0,$e.xy8)(i);if(r===e.uri){const t=(0,Se.lensPath)([a,n]);return(0,Se.over)(t,(0,Se.pipe)((0,Se.defaultTo)([]),(0,Se.concat)(Se.__,o)),e)}return e}case Ja.CLEAR_ENTITY:return sE;default:return e}};let dE;!function(e){e.ERRORS_SET="ERRORS_SET",e.REMOVE_ERROR="REMOVE_ERROR",e.ERROR_DEACTIVATED="ERROR_DEACTIVATED"}(dE||(dE={}));const cE=(e,t,r)=>(0,Se.pipe)((0,Se.filter)((0,Se.allPass)([(0,Se.propEq)("parentUri",t),(0,Se.propEq)("attributeTypeUri",r),(0,Se.pipe)((0,Se.prop)("uri"),Se.isEmpty)])),(0,Se.map)((0,Se.prop)("message")),(0,Se.join)(". "))(e),TE=(e,t,r)=>(0,Se.filter)((0,Se.allPass)([(0,Se.propEq)("parentUri",t),(0,Se.propEq)("attributeTypeUri",r),(0,Se.pipe)((0,Se.prop)("uri"),Se.isEmpty,Se.not)]))(e),uE=[],_E=pa()(Se.identity,((e,t)=>{let{parentUri:r}=t;return r}),((e,t)=>{let{attributeType:r}=t;return r}),((e,t,r)=>{const n=(0,$e.UUb)(t,r,e);return 0===n.length?uE:n}))(((e,t)=>{let{parentUri:r,attributeType:n}=t;return`${r}-${n.uri}`})),pE=(e,t,r)=>_E(e,{parentUri:t,attributeType:r}),yE=ve(dE.ERROR_DEACTIVATED),DE=ve(dE.ERRORS_SET);function RE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){OE(e,t,r[t])}))}return e}function OE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const IE=[],gE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:IE,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case dE.ERRORS_SET:return t.payload;case dE.ERROR_DEACTIVATED:{const r=t.payload,n=e.findIndex((e=>(0,$e.iFp)(e)===r)),i=(0,Se.lensPath)([n]);return(0,Se.over)(i,(0,Se.assoc)("deactivated",!0),e)}case at.REMOVE_ATTRIBUTE:{const{uri:r}=t.payload;return e.map((e=>e.uri===r||(0,$e.sOy)(e.parentUri,r)?RE({},e,{deactivated:!0}):e))}case Nt.MODE_UPDATED:return t.payload===$e.ARY.Viewing?IE:e;case Ja.ENTITY_LOADED:return IE;default:return e}};let AE;!function(e){e.HISTORY_DIFF_SET="HISTORY_DIFF_SET",e.HISTORY_DIFF_CLEARED="HISTORY_DIFF_CLEARED",e.HISTORY_EVENT_SET="HISTORY_EVENT_SET",e.HISTORY_EVENT_CLEARED="HISTORY_EVENT_CLEARED",e.HISTORY_SLICE_SET="HISTORY_SLICE_SET",e.HISTORY_MODE_SET="HISTORY_MODE_SET"}(AE||(AE={}));const fE=ve(AE.HISTORY_DIFF_SET),NE=ve(AE.HISTORY_DIFF_CLEARED),SE=ve(AE.HISTORY_EVENT_SET),vE=ve(AE.HISTORY_EVENT_CLEARED),PE=ve(AE.HISTORY_SLICE_SET),bE=ve(AE.HISTORY_MODE_SET),hE=e=>e.diff,LE=e=>e.event,UE=e=>e.slice,CE=e=>!(0,$e.O27)(e.slice),mE=e=>e.mode;let wE;function YE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){VE(e,t,r[t])}))}return e}function VE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.Current="Current",e.Previous="Previous"}(wE||(wE={}));const ME={mode:wE.Previous},kE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ME,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case AE.HISTORY_DIFF_SET:return YE({},e,{diff:t.payload});case AE.HISTORY_DIFF_CLEARED:return YE({},e,{diff:ME.diff});case AE.HISTORY_EVENT_SET:return YE({},e,{event:t.payload});case Ja.ENTITY_LOADED:case Ue:case AE.HISTORY_EVENT_CLEARED:return YE({},ME,{mode:e.mode});case AE.HISTORY_SLICE_SET:return YE({},e,{slice:t.payload});case AE.HISTORY_MODE_SET:return YE({},e,{mode:t.payload});default:return e}},FE="LOOKUPS_LOADED",jE="LOOKUPS_FOR_TYPE_RESOLVED",HE="LOOKUPS_LIST_RESOLVED",GE=ve(FE),WE=ve(jE),BE=ve(HE);function KE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){xE(e,t,r[t])}))}return e}function xE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zE={},qE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zE,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case FE:return t.payload;case jE:{const{type:r,values:n}=t.payload;return KE({},e,{[r]:KE({},e[r],n)})}case HE:return t.payload.reduce(((e,t)=>Object.keys(t).reduce(((e,r)=>KE({},e,{[r]:KE({},e[r],t[r])})),e)),e);case"UI_RESET":return KE({},zE);default:return e}},XE=ve(Nt.MODE_UPDATED),ZE=ve(Nt.MODE_CANCEL_EDITING),QE=ve(Nt.MODE_EDITING_CANCELED),JE=$e.fnZ,$E=$e.whI,es=$e.uzs,ts=$e.KIu,rs=$e.ARY.Viewing,ns=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rs,t=arguments.length>1?arguments[1]:void 0;return t.type===Nt.MODE_UPDATED?t.payload:e},is=ve(Ta.MODIFIED_ENTITY_CREATED),os=ve(Ta.MODIFIED_ENTITY_DELETED),as=ve(Ta.MODIFIED_ENTITY_DEFAULT_PROFILE_PIC_SET),Es=ve(Ta.MODIFIED_ENTITIES_RESET),ss=(e,t)=>t&&e[t],ls=(e,t)=>t&&e[t]&&e[t].defaultProfilePic;function ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cs=(0,Se.curry)(((e,t)=>{let{attributeType:r,subAttributes:n,metadata:i,mode:o}=e;const a=(0,$e.XtP)(i,t,r.uri)[0],E=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ds(e,t,r[t])}))}return e}({},a,{value:(0,$e.GPx)({attributeTypes:n,parentUri:a.uri,mode:o})});return(0,$e.ww$)({entity:t,attributeType:r,uri:a.uri,value:E})}));function Ts(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){us(e,t,r[t])}))}return e}function us(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _s={},ps=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ta.MODIFIED_ENTITY_CREATED:{const r=t.payload;return Ts({},e,{[r.uri]:r})}case Ta.MODIFIED_ENTITY_DELETED:{const r=t.payload;return(0,Se.omit)([r],e)}case Ta.MODIFIED_ENTITIES_RESET:return _s;case Nt.MODE_UPDATED:return t.payload===$e.ARY.Viewing?_s:e;case Ta.MODIFIED_ENTITY_DEFAULT_PROFILE_PIC_SET:{const{entityUri:r,value:n}=t.payload;return r?Ts({},e,{[r]:Ts({},e[r],{defaultProfilePic:n.uri,defaultProfilePicValue:n})}):e}case at.ADD_ATTRIBUTES:return t.payload.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t,o=(0,$e.u5q)(n);if((0,$e.WgC)(o)){const t=e[o];return(0,$e.xOX)(r)?Ts({},e,{[o]:(0,$e.Wm5)({entity:t,attributeType:r})}):Ts({},e,{[o]:(0,$e.tPT)({entity:t,attributeType:r,parentUri:n,index:i})})}return e}),e);case at.ADD_NEXT_PAGE_ATTRIBUTE_VALUES:{const{parentUri:r,attributeTypeName:n,attributeTypeUri:i,values:o}=t.payload,a=(0,$e.xy8)(i);if((0,$e.WgC)(r)&&r in e){const t=(0,Se.lensPath)([r,a,n]);return(0,Se.over)(t,(0,Se.pipe)((0,Se.defaultTo)([]),(0,Se.concat)(Se.__,o)),e)}return e}case at.MODIFY_ATTRIBUTE:{const{attributeType:r,uri:n,value:i}=t.payload,o=(0,$e.u5q)(n);if((0,$e.WgC)(o)){const t=e[o];return(0,$e.xOX)(r)?Ts({},e,{[o]:(0,$e.hxF)({entity:t,attributeType:r,value:i})}):Ts({},e,{[o]:(0,$e.ww$)({entity:t,attributeType:r,uri:n,value:i})})}return e}case at.REMOVE_ATTRIBUTE:{const{attributeType:r,uri:n}=t.payload,i=(0,$e.u5q)(n);if((0,$e.WgC)(n)){const t=e[i];return(0,$e.xOX)(r)?Ts({},e,{[i]:(0,$e.Ki6)({entity:t,attributeType:r})}):Ts({},e,{[i]:(0,$e.d$I)({entity:t,attributeType:r,uri:n})})}return e}case at.ADD_DEFAULT_VALUES:{const{attributeType:r,parentUri:n,metadata:i,mode:o}=t.payload,a=(0,$e.u5q)(n);if((0,$e.WgC)(a)){const t=(0,Se.ifElse)((0,Se.always)((0,$e.QZu)(r)),Se.identity,$e.tzW)((0,$e.EUG)(i,r));return(0,Se.over)((0,Se.lensProp)(a),cs({attributeType:r,subAttributes:t,metadata:i,mode:o}),e)}return e}default:return e}};function ys(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ds(e,t,r[t])}))}return e}function Ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function*Rs(e){const{values:t,parentUri:r,attributeTypeUri:n,attributeTypeName:i}=e.payload;let o=t;const a=yield(0,ht.Ys)(Xn);if(r===a.uri){const e=(0,$e.xy8)(n),r=(0,Se.pipe)((0,Se.pathOr)([],[e,i]),(0,Se.map)((0,Se.prop)("uri")))(a),E=(0,Se.intersection)(r,t.map((0,Se.prop)("uri")));o=t.filter((e=>!E.includes(e.uri)))}o.length&&(yield(0,ht.gz)(ct(ys({},e.payload,{values:o}))))}function*Os(){return{apiPath:yield(0,ht.Ys)(Oi),tenant:yield(0,ht.Ys)(_o)}}function*Is(e){const{attributeTypeName:t,attributeTypeUri:r}=e.payload,n=yield(0,ht.RE)(Os);try{const i=yield(0,ht.RE)($e.KbL,ys({},e.payload,n)),o=(0,$e.xy8)(r),a=(0,Se.pathOr)([],[o,t],i);yield(0,ht.gz)(Tt(ys({},e.payload,{values:a})))}catch(e){}}const gs=[function*(){yield(0,ht.ib)(at.REQUEST_NEXT_PAGE_ATTRIBUTE_VALUES,Is)},function*(){yield(0,ht.ib)(at.PROCESS_NEXT_PAGE_ATTRIBUTE_VALUES,Rs)}],As=ve(ua.RELATIONS_LOADED),fs=ve(ua.SECOND_LEVEL_RELATIONS_LOADED),Ns=(0,Se.curry)(((e,t)=>({type:ua.REMOVE_RELATION,payload:{id:e,relationUri:t}}))),Ss=(0,Se.curry)(((e,t)=>({type:ua.IGNORE_RELATION,payload:{id:e,ignoredRelationData:t}}))),vs=(0,Se.curry)(((e,t)=>({type:ua.ADD_RELATION,payload:{id:e,connection:t}}))),Ps=(0,Se.curry)(((e,t)=>({type:ua.EDIT_RELATION,payload:{id:e,connection:t}}))),bs=(0,Se.curry)(((e,t)=>({type:ua.OPEN_RELATION_EDITOR,payload:{id:e,connection:t}}))),hs=(0,Se.curry)(((e,t)=>({type:ua.CLOSE_RELATION_EDITOR,payload:{id:e,relationUri:t}}))),Ls=(0,Se.curry)(((e,t,r)=>({type:ua.SET_RELATION_TYPE,payload:{id:e,relationUri:t,relationType:r}}))),Us=(0,Se.curry)(((e,t,r)=>({type:ua.SET_RELATION_ENTITY,payload:{id:e,relationUri:t,entityInfo:r}})));function Cs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ms(e,t,r[t])}))}return e}function ms(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ws={},Ys={removedUris:[],addedConnections:[],editedConnections:[],ignoredRelationData:[]},Vs=(e,t,r)=>{if((0,Se.pathEq)([...ya(e),"relation","relationUri"],t,r))return ya(e);{const n=((0,Se.path)(Da(e),r)||[]).findIndex((0,Se.pathEq)(["relation","relationUri"],t));return n>=0?[...Da(e),n]:null}},Ms=(e,t,r)=>{const n=Vs(e,t,r);return n?(0,Se.lensPath)([...n,"relation"]):null},ks=(0,Se.pipe)(Ms,(e=>(0,Se.compose)(e,(0,Se.lensProp)("object")))),Fs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ws,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ua.RELATIONS_LOADED:{const{id:r,connections:n=[],total:i}=t.payload;return(0,Se.pipe)((0,Se.assocPath)([r,"connections"],n),(0,Se.assocPath)([r,"total"],i))(e)}case ua.SECOND_LEVEL_RELATIONS_LOADED:{const{id:r,connections:n,parentEntityUri:i}=t.payload,o=(0,Se.path)([r,"connections"],e).map((e=>{const{entityUri:t}=e.entity;return t===i?Cs({},e,{connections:n.map((e=>Cs({},e,{parentEntityUri:i})))}):e}));return(0,Se.assocPath)([r,"connections"],o,e)}case Nt.MODE_UPDATED:{const r=t.payload;return(0,Se.map)(es(r)?(0,Se.omit)(["drafts","relationsToEdit","relationToAdd"]):(0,Se.assoc)("drafts",Ys),e)}case ua.REMOVE_RELATION:{const{id:r,relationUri:n}=t.payload,i=(0,Se.pipe)(Oa,(0,Se.equals)(n)),o=(0,Se.path)([r,"connections"],e),a=!((0,$e.ZiX)(n)||null!=o&&o.some((e=>e.suggested&&e.relation.relationUri===n)));return(0,Se.evolve)({[r]:{drafts:(0,Se.evolve)({removedUris:a?(0,Se.append)(n):Se.identity,addedConnections:(0,Se.reject)(i)})}},e)}case ua.IGNORE_RELATION:{const{id:r,ignoredRelationData:n}=t.payload;return(0,Se.evolve)({[r]:{drafts:(0,Se.evolve)({ignoredRelationData:(0,Se.append)(n)})}},e)}case ua.ADD_RELATION:{const{id:r,connection:n}=t.payload,i=(0,Se.omit)(["isNew"],n);return(0,Se.evolve)({[r]:(0,Se.pipe)((0,Se.when)((0,Se.propSatisfies)(Se.isNil,"drafts"),(0,Se.assocPath)(["drafts"],Ys)),(0,Se.evolve)({drafts:{addedConnections:(0,Se.prepend)(i)}}))},e)}case ua.EDIT_RELATION:{const{id:r,connection:n}=t.payload,i=(0,Se.eqBy)(Oa,n);if((0,$e.ZiX)(Oa(n))){const t=e=>{const t=e.findIndex(i);return t>=0?(0,Se.update)(t,n,e):e};return(0,Se.evolve)({[r]:{drafts:(0,Se.evolve)({addedConnections:t})}},e)}{const t=e=>{const t=e.findIndex(i);return t>=0?(0,Se.update)(t,n,e):[...e,n]};return(0,Se.evolve)({[r]:{drafts:(0,Se.evolve)({editedConnections:t})}},e)}}case ua.OPEN_RELATION_EDITOR:{const{id:r,connection:n}=t.payload;if(n.isNew){const t=ya(r);return(0,Se.path)(t,e)?e:(0,Se.assocPath)(t,n,e)}{const t=(0,Se.lensPath)(Da(r)),i=(0,Se.eqBy)((0,Se.path)(["relation","relationUri"]),n);return(0,Se.over)(t,(0,Se.pipe)((0,Se.defaultTo)([]),(0,Se.unless)((0,Se.find)(i),(0,Se.append)(n))),e)}}case ua.CLOSE_RELATION_EDITOR:{const{id:r,relationUri:n}=t.payload,i=(0,Se.pathEq)(["relation","relationUri"],n);return(0,Se.evolve)({[r]:{relationToAdd:(0,Se.when)(i,(0,Se.always)(null)),relationsToEdit:(0,Se.reject)(i)}},e)}case ua.SET_RELATION_TYPE:{const{id:r,relationUri:n,relationType:i}=t.payload,o=Vs(r,n,e);if(o){const t=[...o,"relation"],r=(0,Se.lensPath)(t);return(0,Se.over)(r,(0,$e.ewt)(i),e)}return e}case at.ADD_ATTRIBUTES:return t.payload.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i,viewId:o}=t,a=(0,$e.u5q)(n),E=Ms(o,a,e);if(E&&(0,$e.bC9)(a)){if((0,$e.j2U)(r)){const t=(0,Se.view)(E,e),n=(0,$e.Wm5)({entity:t,attributeType:r});return(0,Se.set)(E,n,e)}{const t=ks(o,a,e),E=(0,Se.view)(t,e),s=(0,$e.tPT)({entity:E,attributeType:r,parentUri:n,index:i});return(0,Se.set)(t,s,e)}}return e}),e);case at.ADD_NEXT_PAGE_ATTRIBUTE_VALUES:{const{parentUri:r,attributeTypeName:n,values:i,viewId:o}=t.payload;if(!(0,$e.bC9)(r))return e;const a=(0,$e.u5q)(r),E=Vs(o,a,e),s=(0,Se.lensPath)([...E,"relation","object","attributes",n]);return(0,Se.over)(s,(0,Se.pipe)((0,Se.defaultTo)([]),(0,Se.append)(i)),e)}case at.MODIFY_ATTRIBUTE:{const{attributeType:r,viewId:n,uri:i,value:o}=t.payload,a=(0,$e.u5q)(i),E=Ms(n,a,e);if(E&&(0,$e.bC9)(a)){if((0,$e.j2U)(r)){const t=(0,Se.view)(E,e),n=(0,$e.hxF)({entity:t,attributeType:r,value:o});return(0,Se.set)(E,n,e)}{const t=ks(n,a,e),E=(0,Se.view)(t,e),s=(0,$e.ww$)({entity:E,attributeType:r,uri:i,value:o});return(0,Se.set)(t,s,e)}}return e}case at.REMOVE_ATTRIBUTE:{const{attributeType:r,uri:n,viewId:i}=t.payload,o=(0,$e.u5q)(n),a=Ms(i,o,e);if(a&&(0,$e.bC9)(o)){if((0,$e.j2U)(r)){const t=(0,Se.view)(a,e),n=(0,$e.Ki6)({entity:t,attributeType:r});return(0,Se.set)(a,n,e)}{const t=ks(i,o,e),a=(0,Se.view)(t,e),E=(0,$e.d$I)({entity:a,attributeType:r,uri:n});return(0,Se.set)(t,E,e)}}return e}case ua.SET_RELATION_ENTITY:{const{id:r,relationUri:n,entityInfo:i}=t.payload,o=Vs(r,n,e);if(o){const t=[...o,"entity"],r=(0,Se.lensPath)(t),{uri:n,label:a,type:E}=i,s=(0,Se.isEmpty)(i)?{}:{entityUri:n,entityLabel:a,entityType:E,object:{uri:n,label:a,type:E}};return(0,Se.set)(r,s,e)}return e}case at.ADD_DEFAULT_VALUES:{const{viewId:r,attributeType:n,parentUri:i,metadata:o,mode:a}=t.payload,E=(0,$e.u5q)(i);if((0,$e.bC9)(E)){const t=Vs(r,E,e);if(t){if(n){const r=[...t,"relation","object"],i=(0,$e.EUG)(o,n);return(0,Se.over)((0,Se.lensPath)(r),cs({attributeType:n,subAttributes:i,metadata:o,mode:a}),e)}{const r=[...t,"relation","object","attributes"],n=[...t,"relation","object","type"],E=(0,Se.view)((0,Se.lensPath)(n),e),{attributes:s=[]}=(0,$e.V3K)(o,E);return(0,Se.over)((0,Se.lensPath)(r),(0,$e.X0$)({metadata:o,mode:a,attributeTypes:s,parentUri:i}),e)}}return e}return e}default:return e}};let js;!function(e){e.TREES_RESET_INITIAL_TREES="TREES_RESET_INITIAL_TREES",e.TREES_RESTORE_FROM_INITIAL_TREES="TREES_RESTORE_FROM_INITIAL_TREES",e.TREES_STATE_RESTORED="TREES_STATE_RESTORED",e.TREES_STATE_SAVED="TREES_STATE_SAVED",e.TREE_ACTIVENESS_DATE_CHANGED="TREE_ACTIVENESS_DATE_CHANGED",e.TREE_CHANGED="TREE_CHANGED",e.TREE_CHILDREN_LOADED="TREE_CHILDREN_LOADED",e.TREE_CHILDREN_LOADING="TREE_CHILDREN_LOADING",e.TREE_COMMANDS_CLEARED="TREE_COMMANDS_CLEARED",e.TREE_CURRENT_ENTITY_SHOWN="TREE_CURRENT_ENTITY_SHOWN",e.TREE_ENTITIES_MAPPING_LOADED="TREE_ENTITIES_MAPPING_LOADED",e.TREE_LOADED="TREE_LOADED",e.TREE_LOADED_WITH_ERROR="TREE_LOADED_WITH_ERROR",e.TREE_LOADING="TREE_LOADING",e.TREE_NODE_CREATED="TREE_NODE_CREATED",e.TREE_NODE_EDITED="TREE_NODE_EDITED",e.TREE_NODE_EDITING_APPLIED="TREE_NODE_EDITING_APPLIED",e.TREE_NODE_EDITING_CANCELED="TREE_NODE_EDITING_CANCELED",e.TREE_NODE_EDITING_STARTED="TREE_NODE_EDITING_STARTED",e.TREE_NODE_ENTITY_CHANGED="TREE_NODE_ENTITY_CHANGED",e.TREE_NODE_EXPANDED="TREE_NODE_EXPANDED",e.TREE_NODE_NEW_CHILD_EDITING_APPLIED="TREE_NODE_NEW_CHILD_EDITING_APPLIED",e.TREE_NODE_NEW_CHILD_EDITING_CANCELED="TREE_NODE_NEW_CHILD_EDITING_CANCELED",e.TREE_NODE_NEW_CHILD_EDITING_STARTED="TREE_NODE_NEW_CHILD_EDITING_STARTED",e.TREE_NODE_NEW_PARENT_EDITING_APPLIED="TREE_NODE_NEW_PARENT_EDITING_APPLIED",e.TREE_NODE_NEW_PARENT_EDITING_CANCELED="TREE_NODE_NEW_PARENT_EDITING_CANCELED",e.TREE_NODE_NEW_PARENT_EDITING_STARTED="TREE_NODE_NEW_PARENT_EDITING_STARTED",e.TREE_NODE_RELATION_TYPE_CHANGED="TREE_NODE_RELATION_TYPE_CHANGED",e.TREE_NODE_REMOVED="TREE_NODE_REMOVED",e.TREE_SECONDARY_LABEL_SHOWN="TREE_SECONDARY_LABEL_SHOWN",e.TREE_SCROLL_TO_NODE_RESET="TREE_SCROLL_TO_NODE_RESET",e.TREE_SORTED="TREE_SORTED",e.TREE_REFRESHED="TREE_REFRESHED",e.TREE_RELATION_CREATED="TREE_RELATION_CREATED",e.TREE_RELATION_EDITED="TREE_RELATION_EDITED",e.TREE_RELATION_REMOVED="TREE_RELATION_REMOVED",e.TREE_RELATION_REPOINTED="TREE_RELATION_REPOINTED"}(js||(js={}));const Hs=ve(js.TREE_LOADED),Gs=ve(js.TREE_LOADED_WITH_ERROR),Ws=ve(js.TREE_LOADING),Bs=ve(js.TREE_SCROLL_TO_NODE_RESET),Ks=ve(js.TREE_COMMANDS_CLEARED),xs=ve(js.TREE_CHILDREN_LOADING),zs=ve(js.TREE_CURRENT_ENTITY_SHOWN),qs=ve(js.TREE_REFRESHED),Xs=ve(js.TREE_NODE_EXPANDED),Zs=ve(js.TREE_RELATION_REMOVED),Qs=ve(js.TREE_NODE_REMOVED),Js=ve(js.TREE_SECONDARY_LABEL_SHOWN),$s=ve(js.TREE_ENTITIES_MAPPING_LOADED),el=ve(js.TREE_CHANGED),tl=ve(js.TREE_NODE_EDITED),rl=ve(js.TREE_ACTIVENESS_DATE_CHANGED),nl=ve(js.TREE_RELATION_REPOINTED),il=ve(js.TREE_RELATION_CREATED),ol=ve(js.TREE_NODE_CREATED),al=ve(js.TREE_RELATION_EDITED),El=ve(js.TREE_NODE_EDITED),sl=ve(js.TREE_NODE_EDITING_STARTED),ll=ve(js.TREE_NODE_EDITING_APPLIED),dl=ve(js.TREE_NODE_EDITING_CANCELED),cl=ve(js.TREE_NODE_NEW_PARENT_EDITING_STARTED),Tl=ve(js.TREE_NODE_NEW_PARENT_EDITING_APPLIED),ul=ve(js.TREE_NODE_NEW_PARENT_EDITING_CANCELED),_l=ve(js.TREE_NODE_NEW_CHILD_EDITING_STARTED),pl=ve(js.TREE_NODE_NEW_CHILD_EDITING_APPLIED),yl=ve(js.TREE_NODE_NEW_CHILD_EDITING_CANCELED),Dl=ve(js.TREE_NODE_RELATION_TYPE_CHANGED),Rl=ve(js.TREE_NODE_ENTITY_CHANGED),Ol=ve(js.TREE_SORTED),Il=ve(js.TREES_STATE_SAVED),gl=ve(js.TREES_STATE_RESTORED),Al=ve(js.TREE_CHILDREN_LOADED),fl=ve(js.TREES_RESTORE_FROM_INITIAL_TREES),Nl=ve(js.TREES_RESET_INITIAL_TREES),Sl=(e,t)=>e.trees[t],vl=(e,t)=>(0,Se.path)(["trees",t,"root"],e),Pl=(e,t)=>(0,Se.path)(["trees",t,"total"],e),bl=(0,Se.path)(["common","commands"]),hl=(e,t,r)=>(0,Se.path)(["trees",t,"editingConnections",r],e),Ll=(e,t)=>(0,Se.pipe)((0,Se.prop)("trees"),(0,Se.when)((0,Se.always)(t),(0,Se.pick)(t)),Se.values,(0,Se.map)((0,Se.pipe)((0,Se.prop)("editingConnections"),Se.values)),Se.flatten,(0,Se.reject)(Se.isNil))(e);var Ul=r(76665);function Cl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ml(e,t,r[t])}))}return e}function ml(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wl=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if((0,Se.path)(["entity","uri"],e)===t)return r.forEach((e=>e.expanded=!0)),e;if(e.children)for(const n of e.children){const i=wl(n,t,r.concat(e));if(i)return i}},Yl=(e,t)=>{const r=Object.keys(e).reduce(((r,n)=>{const i=e[n];return t[n]&&(i.parent=(0,Se.uniq)([].concat(i.parent).concat(t[n].parent).filter(Se.identity))),r[n]=i,r}),{});return Object.keys(t).forEach((e=>{r[e]||(r[e]=t[e])})),r},Vl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=(0,Se.reject)((0,Se.prop)("loading")),n=r(e);return t.forEach((t=>{e.find((e=>(0,Se.path)(["entity","uri"],e)===t.entity.uri))||n.push(t)})),n},Ml=(e,t)=>{if(e&&e.children){const r=e.children.findIndex((e=>{let{nodeId:r}=e;return r===t}));r>-1&&e.children.splice(r,1)}},kl=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e&&e.children&&e.children.splice(r,0,t)},Fl=e=>{let{path:t,value:r,object:n}=e,i=n;for(let e=0;e<t.length;e++){const n=t[e];e===t.length-1?i[n]="function"==typeof r?r(i[n]):r:(i[n]=i[n]||("number"==typeof n?[]:{}),i=i[n])}},jl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;e[t]=r,e.children&&e.children.forEach((e=>jl(e,t,r)))},Hl=e=>({entity:e.entity,relation:e.relation}),Gl=e=>{let{id:t,draft:r,node:n}=e;Fl({path:["editingConnections",n.relation.uri],object:r[t],value:Hl(n)})},Wl=e=>{let{id:t,draft:r,node:n,entity:i}=e;Fl({path:["editingConnections",n.relation.uri,"entity"],object:r[t],value:i})},Bl=e=>{let{id:t,draft:r,node:n,relationTypeUri:i}=e;Fl({path:["editingConnections",n.relation.uri,"relation"],object:r[t],value:e=>Cl({},e,{type:i,attributes:{}})})},Kl=e=>{let{id:t,draft:r,relationUri:n}=e;delete r[t].editingConnections[n]},xl=e=>{let{id:t,draft:r,relationUri:n}=e;return r[t].editingConnections[n]},zl=e=>{delete e.editingMode,delete e.relatedEntity,delete e.initialConnection},ql=e=>{let{id:t,draft:r,currentNode:n}=e;const i=r[t].root;if(i===n)r[t].root=n.children[0],r[t].root.children=r[t].root.children||[],r[t].root.children.push(...n.children.slice(1));else{const e=(0,$e.JgD)(i,n.nodeId);Ml(e,n.nodeId)}},Xl=(e,t,r)=>{const n=[e,"editingConnections",t,"relation"];return(0,Se.path)(n,r)?(0,Se.lensPath)(n):null},Zl=(0,Se.pick)(["showSecondaryLabel","sortField","sortOrder"]),Ql=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Yl(e,t.reduce(((e,t)=>Cl({},e,{[t.entity.uri]:(0,Se.pick)(["entity","parent","relations"],t)})),{}))},Jl=e=>({entity:(0,Se.pick)(["uri","type","label","secondaryLabel"],e.entity),parent:[],relations:[(0,Se.pick)(["uri","type"],e.relation)]});function $l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ed(e,t,r[t])}))}return e}function ed(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const td={common:{commands:[]},trees:{},initialTrees:{}},rd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:td,t=arguments.length>1?arguments[1]:void 0;return(0,Ul.ZP)(e,(r=>{switch(t.type){case Nt.MODE_UPDATED:Object.keys(null==r?void 0:r.trees).forEach((e=>{jl(r.trees[e].root,"showDetails",!1)})),(0,$e.uzs)(t.payload)&&(r.common.commands=[],r.initialTrees={}),(0,$e.KIu)(t.payload)&&(r.initialTrees=$l({},r.trees));break;case Nt.MODE_EDITING_CANCELED:case js.TREES_RESTORE_FROM_INITIAL_TREES:r.trees=$l({},r.initialTrees);break;case js.TREES_RESET_INITIAL_TREES:r.initialTrees={};break;case js.TREE_LOADED_WITH_ERROR:{const{id:e,errorMessage:n}=t.payload;r.trees[e]=r.trees[e]||{},r.trees[e].errorMessage=n,r.trees[e].loading=!1,delete r.trees[e].root,delete r.trees[e].entitiesMap;break}case js.TREE_LOADING:{const e=t.payload;r.trees[e]=r.trees[e]||{},r.trees[e].loading=!0;break}case js.TREE_CHILDREN_LOADING:{const{id:e,parentId:n,nodeId:i}=t.payload,o=r.trees[e].root,a=(0,$e.nv3)(o,n);a.pending=!1,a.children=(a.children||[]).concat({entity:{},loading:!0,nodeId:i});break}case js.TREE_CHILDREN_LOADED:{const{children:e,id:n,parentId:i}=t.payload,o=r.trees[n].root,a=(0,$e.nv3)(o,i);a.children=Vl(a.children,e),delete a.pending;break}case js.TREE_NODE_REMOVED:{const{id:e,nodeId:n}=t.payload,i=r.trees[e].root,o=(0,$e.JgD)(i,n);Ml(o||i,n);break}case js.TREE_NODE_CREATED:{const{id:e,parentId:n,node:i}=t.payload,o=r.trees[e].root,a=(0,$e.nv3)(o,n)||o,E=a.children.length;kl(a,i,E);break}case js.TREE_NODE_EDITED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.nv3)(i,n.nodeId),a=Object.keys(n);for(const e of a)o[e]=n[e];break}case js.TREE_NODE_EDITING_STARTED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.nv3)(i,n.nodeId),a=(0,$e.JgD)(i,n.nodeId);o&&a&&(o.editingMode=$e.wwy.editing,o.relatedEntity=a.entity,delete o.loading,o.initialConnection=Hl(o),Gl({id:e,draft:r.trees,node:o}));break}case js.TREE_NODE_EDITING_APPLIED:{const{id:e,node:i}=t.payload,o=r.trees[e].root,a=(0,$e.nv3)(o,i.nodeId),E=xl({id:e,draft:r.trees,relationUri:i.relation.uri});var n;a&&E&&(zl(a),a.entity.uri!==E.entity.uri&&null!==(n=a.children)&&void 0!==n&&n.length&&(delete a.children,a.pending=!0),a.entity=E.entity,a.relation=E.relation,Kl({id:e,draft:r.trees,relationUri:i.relation.uri}));break}case js.TREE_NODE_EDITING_CANCELED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.nv3)(i,n.nodeId);o&&(zl(o),Kl({id:e,draft:r.trees,relationUri:n.relation.uri}));break}case js.TREE_NODE_NEW_PARENT_EDITING_STARTED:{const{id:e,node:n,newNode:i}=t.payload,o=r.trees[e].root,a=(0,$e.nv3)(o,n.nodeId);if(i.relatedEntity=a.entity,i.relatedNodeId=a.nodeId,i.editingMode=$e.wwy.addingParent,o===a)i.children=[o],r.trees[e].root=i;else{const e=(0,$e.JgD)(o,n.nodeId),t=e.children.findIndex((e=>a===e));kl(e,i,t)}i.initialConnection=Hl(i),Gl({id:e,draft:r.trees,node:i});break}case js.TREE_NODE_NEW_PARENT_EDITING_APPLIED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.nv3)(i,n.nodeId),a=(0,$e.nv3)(i,n.relatedNodeId),E=xl({id:e,draft:r.trees,relationUri:n.relation.uri});o&&E&&(ql({id:e,draft:r.trees,currentNode:o}),a.parent=a.parent||[],a.parent.push(E.entity.uri),a.relations=a.relations||[],a.relations.push(E.relation),r.trees[e].entitiesMap=Ql(r.trees[e].entitiesMap,[a,Jl(E)]),Kl({id:e,draft:r.trees,relationUri:o.relation.uri}));break}case js.TREE_NODE_NEW_PARENT_EDITING_CANCELED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.nv3)(i,n.nodeId);o&&(ql({id:e,draft:r.trees,currentNode:o}),Kl({id:e,draft:r.trees,relationUri:o.relation.uri}));break}case js.TREE_NODE_NEW_CHILD_EDITING_STARTED:{const{id:e,node:n,newNode:i}=t.payload,o=r.trees[e].root,a=(0,$e.nv3)(o,n.nodeId);i.relatedEntity=a.entity,i.editingMode=$e.wwy.addingChild,i.parent=[a.entity.uri],i.directParentUri=a.entity.uri,a.children=a.children||[],a.children.unshift(i),a.expanded=!0,i.initialConnection=Hl(i),Gl({id:e,draft:r.trees,node:i});break}case js.TREE_NODE_NEW_CHILD_EDITING_APPLIED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.JgD)(i,n.nodeId),a=(0,$e.nv3)(o,n.nodeId),E=xl({id:e,draft:r.trees,relationUri:n.relation.uri});o&&a&&E&&(zl(a),a.entity=E.entity,a.relation=E.relation,a.relations=[E.relation],Kl({id:e,draft:r.trees,relationUri:n.relation.uri}));break}case js.TREE_NODE_NEW_CHILD_EDITING_CANCELED:{const{id:e,node:n}=t.payload,i=r.trees[e].root,o=(0,$e.JgD)(i,n.nodeId);o&&(Ml(o,n.nodeId),Kl({id:e,draft:r.trees,relationUri:n.relation.uri}));break}case js.TREE_NODE_RELATION_TYPE_CHANGED:{const{id:e,node:n,relationTypeUri:i}=t.payload,o=xl({id:e,draft:r.trees,relationUri:n.relation.uri}).relation.type;o!==i&&(o&&Wl({id:e,draft:r.trees,node:n,entity:null}),Bl({id:e,draft:r.trees,node:n,relationTypeUri:i}));break}case js.TREE_NODE_ENTITY_CHANGED:{const{id:e,node:n,entity:i}=t.payload;Wl({id:e,draft:r.trees,node:n,entity:i});break}case at.ADD_ATTRIBUTES:return t.payload.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i,viewId:o}=t,a=(0,$e.u5q)(n),E=Xl(o,a,e.trees);if(E&&(0,$e.bC9)(a)){const t=(0,Se.view)(E,e.trees);if((0,$e.j2U)(r)){const n=(0,$e.Wm5)({entity:t,attributeType:r});return $l({},e,{trees:(0,Se.set)(E,n,e.trees)})}{const o=(0,$e.tPT)({entity:t,attributeType:r,parentUri:n,index:i});return $l({},e,{trees:(0,Se.set)(E,o,e.trees)})}}return e}),e);case at.MODIFY_ATTRIBUTE:{const{attributeType:r,viewId:n,uri:i,value:o}=t.payload,a=(0,$e.u5q)(i),E=Xl(n,a,e.trees);if(E&&(0,$e.bC9)(a)){const t=(0,Se.view)(E,e.trees);if((0,$e.j2U)(r)){const n=(0,$e.hxF)({entity:t,attributeType:r,value:o});return $l({},e,{trees:(0,Se.set)(E,n,e.trees)})}{const n=(0,$e.ww$)({entity:t,attributeType:r,uri:i,value:o});return $l({},e,{trees:(0,Se.set)(E,n,e.trees)})}}return e}case at.REMOVE_ATTRIBUTE:{const{attributeType:r,uri:n,viewId:i}=t.payload,o=(0,$e.u5q)(n),a=Xl(i,o,e.trees);if(a&&(0,$e.bC9)(o)){const t=(0,Se.view)(a,e.trees);if((0,$e.j2U)(r)){const n=(0,$e.Ki6)({entity:t,attributeType:r});return $l({},e,{trees:(0,Se.set)(a,n,e.trees)})}{const i=(0,$e.d$I)({entity:t,attributeType:r,uri:n});return $l({},e,{trees:(0,Se.set)(a,i,e.trees)})}}return e}case at.ADD_DEFAULT_VALUES:{const{viewId:r,attributeType:n,parentUri:i,metadata:o,mode:a}=t.payload,E=(0,$e.u5q)(i),s=Xl(r,E,e.trees);if((0,$e.bC9)(E)&&s){if(n){const t=(0,$e.EUG)(o,n);return $l({},e,{trees:(0,Se.over)(s,cs({attributeType:n,subAttributes:t,metadata:o,mode:a}),e.trees)})}{const t=(0,Se.compose)(s,(0,Se.lensPath)(["attributes"])),r=(0,Se.compose)(s,(0,Se.lensPath)(["type"])),n=(0,Se.view)(r,e.trees),{attributes:E=[]}=(0,$e.V3K)(o,n);return $l({},e,{trees:(0,Se.over)(t,(0,$e.X0$)({metadata:o,mode:a,attributeTypes:E,parentUri:i}),e.trees)})}}return e}case js.TREE_ENTITIES_MAPPING_LOADED:{const{id:e,entitiesSubMap:n}=t.payload,i=r.trees[e].entitiesMap;r.trees[e].entitiesMap=Yl(i,n);break}case js.TREE_LOADED:{const{tree:e,id:n,graphTypes:i,activenessDate:o,isReversed:a}=t.payload,E=Zl(r.trees[n]||{});r.trees[n]=$l({},E,e,{graphTypes:i,activenessDate:o,isReversed:a}),delete r.trees[n].errorMessage,r.trees[n].loading=!1;break}case js.TREE_SORTED:{const{id:e,typesLabelsMap:n={},sortField:i,sortOrder:o}=t.payload;r.trees[e]=r.trees[e]||{},r.trees[e].sortField=i,r.trees[e].sortOrder=o,r.trees[e].root&&(r.trees[e].root=(0,$e.GyU)(r.trees[e].root,{childrenProcessing:(0,$e.MjG)({sortField:i,sortOrder:o,typesLabelsMap:n})}));break}case js.TREE_SECONDARY_LABEL_SHOWN:{const{id:e,show:n}=t.payload;r.trees[e].showSecondaryLabel=n,r.trees[e].root=$l({},r.trees[e].root);break}case js.TREES_STATE_RESTORED:{const e=t.payload;Object.keys(e).forEach((t=>{r.trees[t]=r.trees[t]||{},r.trees[t]=$l({},r.trees[t],e[t]),r.trees[t].root&&(r.trees[t].root=$l({},r.trees[t].root))}));break}case js.TREE_CHANGED:{const{id:e,tree:n}=t.payload;r.trees[e].root=n;break}case js.TREE_REFRESHED:{const e=t.payload;r.trees[e].root=$l({},r.trees[e].root);break}case js.TREE_NODE_EXPANDED:{const{id:e,nodeId:n}=t.payload,i=r.trees[e].root;(0,$e.nv3)(i,n).expanded=!0;break}case js.TREE_CURRENT_ENTITY_SHOWN:{const{id:n,uri:i=(0,Se.path)(["entity","uri"],e)}=t.payload;if(r.trees[n]){const e=wl(r.trees[n].root,i);r.trees[n].scrollTo=e}break}case js.TREE_SCROLL_TO_NODE_RESET:{const e=t.payload;r.trees[e]&&(r.trees[e].scrollTo=null);break}case js.TREE_ACTIVENESS_DATE_CHANGED:{const{id:e,activenessDate:n}=t.payload;r.trees[e].activenessDate=n;break}case js.TREE_RELATION_REPOINTED:{const{entity:e,relation:n,newParent:i,isReversed:o}=t.payload,a=(0,Se.prop)("uri"),E=a(e),s=a(i),l=(0,$e.ipn)({entityUri:E,relation:n,newEntityUri:s,isReversed:o});r.common.commands.push(l);break}case js.TREE_RELATION_REMOVED:{const{relationUri:e}=t.payload;if((0,$e.ZiX)(e))r.common.commands=(0,Se.reject)((0,$e.kMF)(e),r.common.commands);else{const t=(0,$e.gWE)({relationUri:e});r.common.commands.push(t)}break}case js.TREE_RELATION_CREATED:{const{entityUri:e,relation:n,parentEntityUri:i}=t.payload,o=(0,$e.MPc)({parentUri:i,relation:n,entityUri:e});r.common.commands.push(o);break}case js.TREE_RELATION_EDITED:{const{oldRelation:e,newRelation:n,entityUri:i,newEntityUri:o,isReversed:a}=t.payload,E=o?(0,$e.ipn)({entityUri:i,newEntityUri:o,relation:n,isReversed:a}):(0,$e._wz)({oldRelation:e,newRelation:n});r.common.commands.push(E);break}case js.TREE_COMMANDS_CLEARED:r.common.commands=[]}}))},nd=e=>e.entity,id=e=>e.modifiedEntities,od=e=>e.errors,ad=e=>e.relations,Ed=e=>e.trees,sd=e=>e.lookups,ld=e=>e.dependentLookups,dd=e=>e.mode,cd=e=>e.history,Td=e=>e.operation,ud=e=>e.views,_d=e=>e.sidePanelViews,pd=e=>oE(nd(e)),yd=(e,t)=>ss(id(e),t),Dd=(e,t)=>ls(id(e),t),Rd=e=>(0,Se.keys)(ad(e)),Od=(e,t,r)=>ma(ad(e),t,r),Id=(e,t,r)=>wa(ad(e),t,r),gd=(e,t,r)=>Ya(ad(e),t,r),Ad=(e,t)=>Ca(ad(e),t),fd=(e,t)=>Na(ad(e),t),Nd=(e,t)=>Va(ad(e),t),Sd=e=>Ma(ad(e)),vd=e=>ts(dd(e)),Pd=e=>es(dd(e)),bd=e=>JE(dd(e)),hd=(e,t)=>Pa(ad(e),t),Ld=(e,t)=>ba(ad(e),t),Ud=(e,t)=>La(ad(e),t),Cd=(e,t)=>Ua(ad(e),t),md=(e,t,r)=>cE(od(e),t,r),wd=(e,t,r)=>TE(od(e),t,r),Yd=(e,t,r)=>pE(od(e),t,r),Vd=(e,t)=>Sl(Ed(e),t),Md=(e,t)=>vl(Ed(e),t),kd=(e,t)=>Pl(Ed(e),t),Fd=e=>bl(Ed(e)),jd=(e,t,r)=>hl(Ed(e),t,r),Hd=(e,t)=>Ll(Ed(e),t),Gd=e=>It(ld(e)),Wd=(e,t)=>At(ld(e),t),Bd=e=>gt(ld(e)),Kd=(e,t)=>ft(ld(e),t),xd=e=>hE(cd(e)),zd=e=>LE(cd(e)),qd=e=>UE(cd(e)),Xd=e=>CE(cd(e)),Zd=e=>mE(cd(e)),Qd=(0,Jt.createSelector)(nd,(e=>yd(e,pd(e))),((e,t)=>!(!e||!t||(0,$e.O27)((0,$e.AID)(e,t))))),Jd=(0,Jt.createSelector)(Ed,(e=>{const t=bl(e),r=(0,$e.Ywp)((0,Se.reject)((0,Se.propSatisfies)($e.O27,"root"),e.trees));return!(0,$e.O27)(t)||!(0,$e.O27)(r)})),$d=(0,Jt.createSelector)(ad,(e=>(0,Se.keys)(e).reduce(((t,r)=>t||!(0,Se.all)($e.O27)((0,Se.values)(Va(e,r)))),!1))),ec=(0,Jt.createSelector)(Qd,$d,Jd,((e,t,r)=>e||t||r)),tc=(0,Jt.createSelector)(dd,nd,ec,((e,t,r)=>!(e===$e.ARY.Viewing||!t)&&((0,$e.ZiX)(t.uri)||r)));var rc=r(87918),nc=r.n(rc);let ic;!function(e){e.PROFILE_OPERATION_UPDATE="PROFILE_OPERATION_UPDATE"}(ic||(ic={}));const oc=ve(ic.PROFILE_OPERATION_UPDATE);function ac(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ec(e,t,r[t])}))}return e}function Ec(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function*sc(){const e=yield(0,ht.Ys)(Hc.selectors.getEntity),t=yield(0,ht.Ys)(Hc.selectors.getMode),r=yield(0,ht.Ys)(Hc.selectors.getEntityUri),n=yield(0,ht.Ys)(Hc.selectors.getMetadata),i=yield(0,ht.Ys)(Hc.selectors.getModifiedEntity,r),o=yield(0,ht.Ys)(Hc.selectors.getModifiedEntities),a=yield(0,ht.Ys)(Hc.selectors.getProfileViews);return{entity:e,modifiedEntity:t===$e.ARY.Viewing?e:i,entityUri:r,metadata:n,modifiedEntities:t===$e.ARY.Viewing?{[r]:e}:o,profileViews:a,mode:t}}function*lc(){return ac({},yield(0,ht.RE)(sc),{validationServicePath:yield(0,ht.Ys)(Hc.selectors.getValidationServicePath),tenant:yield(0,ht.Ys)(Hc.selectors.getTenant),severity:yield(0,ht.Ys)(Hc.selectors.getValidationServiceSeverityLevels)})}function*dc(){const{entityUri:e,metadata:t,modifiedEntities:r,modifiedEntity:n,profileViews:i}=yield(0,ht.RE)(sc),o=(0,$e.V3i)(i,[$e.ZIY.Relations,$e.ZIY.RelationsTable]),a=(0,$e.V3i)(i,[$e.ZIY.HierarchyTree]),E=yield(0,ht.Ys)(Hc.selectors.getAllRelationsToAddAndEdit,o),s=yield(0,ht.Ys)(Hc.selectors.getAllTreesEditingConnections,a);return[...(0,$e.sSE)(t,r,n,(0,$e.FgW)(i)),...E.flatMap((e=>(0,$e.Bd_)(t,r,e))),...s.flatMap((e=>(0,$e.Bxm)(t,e)))].map((n=>ac({},n,{path:(0,$e.Z9i)({entityUri:e,metadata:t,connections:E,entitiesMap:r},n.uri||n.parentUri)})))}function*cc(){const{entityUri:e,metadata:t,modifiedEntity:r,mode:n,modifiedEntities:i,validationServicePath:o}=yield(0,ht.RE)(lc);if(o&&(0,$e.oCZ)(t,r.type)){const r=yield(0,ht.RE)((0,$e.ZiX)(e)?uc:_c),o=(0,Se.pipe)($e.NcL,(0,Se.uniqBy)($e.SpP))(r,{entityUri:e,metadata:t,entitiesMap:i});if(n!==$e.ARY.Viewing){const e=((e,t,r)=>r.filter((e=>{let{attributeType:t,type:r}=e;return t&&!(0,$e.q9e)(t)&&r===$e.NIO.missed})).filter((r=>{let{attributeType:n,parentUri:i}=r;const o=(0,$e.u5q)(i),a=t[o],E=a&&(0,$e.XtP)(e,a,n.uri,!0);return null==E?void 0:E.some((e=>{let{parent:t,attrValues:r}=e;return t.uri===i&&0===r.length}))})).map((e=>{let{attributeType:t,parentUri:r}=e;return{attributeType:t,parentUri:r}})))(t,i,o);e.length&&(yield(0,ht.gz)(Et(e)))}return o}return[]}function Tc(e){return console.error("Validation service error",e),[]}function*uc(){const{mode:e,modifiedEntity:t,modifiedEntities:r,validationServicePath:n,tenant:i,severity:o}=yield(0,ht.RE)(lc),a=(0,$e.rkF)(t,r);try{return yield(0,ht.RE)($e.W41,{validationServicePath:n,entity:a,tenant:i,severity:o,options:(0,Se.reject)(Se.isNil,[$e.cKm.preserveURIs,e===$e.ARY.Editing?$e.cKm.validateDataPermissions:null])})}catch(e){return Tc(e)}}function*_c(){const{entityUri:e,mode:t,entity:r,modifiedEntity:n,modifiedEntities:i,validationServicePath:o,tenant:a,severity:E}=yield(0,ht.RE)(lc),s=t===$e.ARY.Viewing?[]:(0,$e.C_p)(r,n,i);try{return yield(0,ht.RE)($e.WkI,{validationServicePath:o,uri:e,diff:s,tenant:a,severity:E,options:(0,Se.reject)(Se.isNil,[$e.cKm.preserveURIs,$e.cKm.updateAttributeUpdateDates,t===$e.ARY.Editing?$e.cKm.validateDataPermissions:null])})}catch(e){return Tc(e)}}function*pc(){const e=yield(0,ht.RE)(dc),t=yield(0,ht.RE)(cc),r=(0,Se.uniqBy)($e.SpP,[...e,...t]);return yield(0,ht.gz)(DE(r)),0===r.filter($e.IT0).length}function yc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function*Dc(e){const t=yield(0,ht.Ys)(Hc.selectors.getMetadata),r=yield(0,ht.Ys)(Hc.selectors.getMode);switch(e.type){case ua.OPEN_RELATION_EDITOR:{const{id:n,connection:i}=e.payload;i.relation.relationType&&(yield(0,ht.gz)(st({viewId:n,metadata:t,mode:r,parentUri:i.relation.object.uri})));break}case at.ADD_ATTRIBUTES:{const n=e.payload;for(const e of n){const{attributeType:n,parentUri:i,viewId:o}=e;(0,$e.YkM)(n)&&(yield(0,ht.gz)(st({viewId:o,attributeType:n,parentUri:i,metadata:t,mode:r})))}break}case ua.SET_RELATION_TYPE:{const{id:n,relationUri:i}=e.payload;yield(0,ht.gz)(st({viewId:n,metadata:t,mode:r,parentUri:i}));break}case js.TREE_NODE_RELATION_TYPE_CHANGED:{var n;const{id:i,node:o}=e.payload;yield(0,ht.gz)(st({viewId:i,metadata:t,mode:r,parentUri:null==o||null===(n=o.relation)||void 0===n?void 0:n.uri}));break}}}function*Rc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=yield(0,ht.Ys)(no),n=(0,$e.Ywp)(null==r?void 0:r.trees),i=yield(0,ht.Ys)(Eo),o=(0,$e.Jct)([...i,...n]);if(null!=o&&o.length){const r=(0,Se.when)((0,Se.always)(t),(0,$e.Lkd)(t))(o);yield(0,ht.RE)(e,r),yield(0,ht.gz)(Ks())}}function*Oc(e){const t=yield(0,ht.Ys)(Xn),r=yield(0,ht.Ys)(Zn),n=yield(0,ht.Ys)(Ti,r),i=(0,$e.AID)(t,n);return(0,$e.lCl)(e,i)}function*Ic(e){const t=yield(0,ht.Ys)(ri),r=yield(0,ht.Ys)(_i),n=yield(0,ht.Ys)(Zn),i=yield(0,ht.Ys)(Ti,n),o=(0,$e.UO$)(i),a=(0,Se.concat)(o,t);return yield(0,ht.RE)($e.J$p,r,a,e)}function*gc(e,t){const r=e.getDCRObjectUris(),n=yield(0,ht.Ys)(Ro),i=yield(0,ht.Ys)(Oo),o=yield(0,ht.Ys)(_o);if(null!=r&&r.length){const a=yield(0,ht.RE)($e.$ju,{workflowPath:n,processType:"dataChangeRequestReview",objectURIs:(0,Se.uniq)([t,...r,e.getDCRUri()]),tenant:o,environment:i});"OK"!==(null==a?void 0:a.status)&&console.error(a)}}function*Ac(e,t,r,n){const i=yield(0,ht.Ys)(Qn,r),o=yield(0,ht.Ys)(ti,r),a=(0,$e.RYR)(i,o,n,t);a.length&&(yield(0,ht.RE)(e,a))}function*fc(e,t,r){const n=yield(0,ht.Ys)(ai),i=yield(0,ht.Ys)(Zn);for(const o of n)yield(0,ht.rM)(Ac,e,r||i,o,t)}function*Nc(){try{const e=yield(0,ht.Ys)(Xi),{commandExecutor:t,dcrProcessor:r}=(0,$e.XiW)({alwaysCreateDCR:e,dcrUri:null}),n=yield(0,ht.RE)(Ic,r),i=(0,Se.map)((0,Se.prop)("uri"),n);yield(0,ht.$6)([(0,ht.RE)(Rc,t),(0,ht.RE)(fc,t,i)]);const o=yield(0,ht.RE)(Oc,i),a=yield(0,ht.Ys)(Zn);let E;null!=o&&o.length&&(E=yield(0,ht.RE)($e.Mzk,{uri:a,diff:o,uriPreprocessor:r.enhanceUriWithDCR})),e?(E&&r.updateDCRUriFromResponse(E),yield(0,ht.RE)(gc,r,a),yield(0,ht.gz)(fl())):E&&(yield(0,ht.gz)($a(E))),yield(0,ht.gz)(XE($e.ARY.Viewing))}catch(e){console.error(e)}}function*Sc(){try{const e=yield(0,ht.Ys)(Xi),{commandExecutor:t,dcrProcessor:r}=(0,$e.XiW)({alwaysCreateDCR:e,dcrUri:null}),n=yield(0,ht.Ys)(Zn),i=yield(0,ht.Ys)(Hc.selectors.getModifiedEntity,n),o=yield(0,ht.RE)(Ic,r),a=yield(0,ht.RE)($e.b5s,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yc(e,t,r[t])}))}return e}({},o,{[n]:i}),n,o,r),E=(0,Se.map)((0,Se.prop)("uri"),o);yield(0,ht.$6)([(0,ht.RE)(Rc,t,{[n]:a.uri}),(0,ht.RE)(fc,t,E,a.uri)]),e&&(yield(0,ht.RE)(gc,r,a.uri),window.alert(nc().text("Your changes are saved as pending and have been sent for review"))),yield(0,ht.gz)(XE($e.ARY.Viewing)),yield(0,ht.gz)(e?gr({perspectiveId:null,viewId:null}):Rr({uri:a.uri,viewId:null}))}catch(e){console.error(e)}}function*vc(){if(yield(0,ht.gz)(oc($e.OXy.Saving)),yield(0,ht.RE)(pc)){const e=yield(0,ht.Ys)(Zn);(0,$e.ZiX)(e)?yield(0,ht.RE)(Sc):yield(0,ht.RE)(Nc)}yield(0,ht.gz)(oc(null))}function*Pc(e){if(e.payload!==$e.ARY.Viewing){const e=yield(0,ht.Ys)(Hc.selectors.getEntity),t=yield(0,ht.Ys)(Hc.selectors.getModifiedEntity,null==e?void 0:e.uri);if(e&&!t){const t=yield(0,ht.Ys)(Hc.selectors.getMetadata),r=(0,$e.Wtd)({entity:e,metadata:t});yield(0,ht.gz)(is(r))}}}function*bc(e){const{entityTypeUri:t}=e.payload,r=yield(0,ht.Ys)(Hc.selectors.getMetadata),n=(0,Se.prop)("attributes",(0,$e.nt9)(r,t)),i=(0,$e.pBq)({entityTypeUri:t,attributeTypes:n,metadata:r,mode:$e.ARY.Editing});yield(0,ht.gz)(Or({entity:i})),yield(0,ht.gz)($a(i)),yield(0,ht.gz)(XE($e.ARY.Editing)),yield(0,ht.gz)(Nl())}function*hc(e){const{entityUri:t}=e.payload;if(!(0,$e.ZiX)(t))try{yield(0,ht.RE)($e.Sx,t),yield(0,ht.gz)(Ir())}catch(e){yield(0,ht.gz)(Fr((0,$e.xU7)(e,nc().text("Something went wrong"))))}}function*Lc(){(yield(0,ht.Ys)(uo))&&!confirm(nc().text("Are you sure you want to cancel changes for this Profile?"))||(yield(0,ht.gz)(QE()))}const Uc=[function*(){yield(0,ht.A7)([Nt.MODE_CANCEL_EDITING],Lc)},function*(){yield(0,ht.ib)([ua.OPEN_RELATION_EDITOR,at.ADD_ATTRIBUTES,ua.SET_RELATION_TYPE,js.TREE_NODE_RELATION_TYPE_CHANGED],Dc)},function*(){yield(0,ht.A7)([at.SAVE_PROFILE],vc)},function*(){yield(0,ht.ib)([Nt.MODE_UPDATED],Pc)},function*(){yield(0,ht.ib)([Ja.ENTITY_CREATION_REQUESTED],bc)},function*(){yield(0,ht.Fm)([at.VALIDATE_PROFILE],pc)},function*(){yield(0,ht.ib)([Ja.ENTITY_REMOVE_REQUESTED],hc)}],Cc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===ic.PROFILE_OPERATION_UPDATE?t.payload:e};let mc;!function(e){e.PROFILE_VIEWS_SET="PROFILE_VIEWS_SET"}(mc||(mc={}));const wc=ve(mc.PROFILE_VIEWS_SET),Yc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===mc.PROFILE_VIEWS_SET?t.payload:e};let Vc;!function(e){e.SIDE_PANEL_VIEWS_LOADED="SIDE_PANEL_VIEWS_LOADED"}(Vc||(Vc={}));const Mc=ve(Vc.SIDE_PANEL_VIEWS_LOADED),kc=[],Fc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kc,t=arguments.length>1?arguments[1]:void 0;return t.type===Vc.SIDE_PANEL_VIEWS_LOADED?t.payload:e},jc=(0,r(28523).combineReducers)({dependentLookups:bt,entity:lE,errors:gE,history:kE,lookups:qE,mode:ns,modifiedEntities:ps,relations:Fs,trees:rd,operation:Cc,views:Yc,sidePanelViews:Fc}),Hc={getModule:()=>({id:"mdm",reducerMap:{dataTenants:be,metadata:ot,profile:jc,tenant:wn,environment:jn,user:Sn,ui:In,search:Dr},sagas:[...gs,...Qa,...Uc,...ur]}),selectors:Y}}}]);
|
package/{5411.css → 77.css}
RENAMED
|
File without changes
|