@reltio/remotes 1.4.1055 → 1.4.1057

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/525.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[525],{50548:(e,t,n)=>{n.d(t,{l:()=>i});var r=n(24328),a=n.n(r);function o(){return o=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},o.apply(this,arguments)}const i=(e,t,n)=>{if(e&&t){const i=(0,r.memo)(n);return n=>a().createElement(e.Consumer,null,(e=>a().createElement(i,o({},n,t(e,n)))))}return n}},44938:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),o=n(50166),i=n(44443),l=n(22241);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 d=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:u,data:d,children:p,itemKey:m,showNotMeasuredItems:h,listRef:g}=e;const f=s(),b=(0,r.useRef)({}),[y,v]=(0,r.useState)({}),x=(0,r.useCallback)((0,l.DsO)((()=>{v(c({},b.current))})),[]),w=(0,r.useCallback)(((e,t)=>m?m(t,e):t),[m]),E=(0,r.useRef)(),C=g||E;C.current&&C.current.resetAfterIndex(0,!1);const T=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const o=w(t,n);return a().createElement("div",{style:r,className:f.item},a().createElement("div",{style:h?void 0:{visibility:o in y?void 0:"hidden"}},a().createElement(i.Z,{handleHeight:!0,onResize:(e,t)=>{b.current[o]!==t&&(((e,t)=>{b.current=c({},b.current,{[e]:t})})(o,t),x())}}),p({data:t,index:n})))}),[p,h,w,x,!h&&y]);return a().createElement(o.VariableSizeList,{ref:C,width:t,height:n,itemCount:d.length,itemData:d,itemSize:e=>y[(e=>w(d,e))(e)]||u,itemKey:m},T)}))},42011:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),l=n(71153),s=n.n(l),c=n(28899),u=n(87918),d=n.n(u),p=n(79573),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){f(e,t,n[t])}))}return e}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 b=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:a,onChangePage:l,rowsPerPage:u,onChangeRowsPerPage:f,basicTableRef:b,labelRowsPerPage:y}=e;const v=h(),x=(0,o.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],b)()}),[b]),w=(0,o.useCallback)((e=>{l(e),x()}),[l,x]),E=(0,o.useCallback)((e=>{l(0),f(e),x()}),[l,f,x]);return i().createElement(c.Z,{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||d().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return d().text("${fromRow}-${toRow} of ${countRows}",{fromRow:d().number(t,"0,0"),toRow:d().number(n,"0,0"),countRows:d().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:a,onChangePage:(0,m.pipe)((0,m.nthArg)(1),w),rowsPerPage:u,onChangeRowsPerPage:(0,m.pipe)(p.NA,E)})};b.propTypes={classes:a().object,rowsPerPageOptions:a().arrayOf(a().number),count:a().number,page:a().number,onChangePage:a().func,rowsPerPage:a().number,onChangeRowsPerPage:a().func,basicTableRef:a().shape({current:a().object}),labelRowsPerPage:a().string};const y=i().memo(b)},1730:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(27556),a=n(13980),o=n.n(a),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 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)}const p=(0,i.forwardRef)(((e,t)=>{let{children:n,className:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const i=u();return l().createElement(r.Z,d({ref:t,className:a,classes:{root:i["basic-view__paper"]}},o),n)}));p.displayName="BasicView",p.propTypes={children:o().node,className:o().string};const m=p},22118:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(77277),s=n(8629),c=n(49429),u=n(38724),d=n(55999),p=n(79249);const m=(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"}}),h=e=>{let{open:t,title:n,content:r,onCancel:o,cancelCaption:h=i().text("Cancel"),onDiscard:g,discardCaption:f="",onSave:b,saveCaption:y=i().text("Save"),disabledSave:v=!1}=e;const x=m();return a().createElement(s.Z,{open:t,onClose:o,classes:{paperScrollPaper:x.paper}},a().createElement(p.Z,{classes:{root:x.title}},n),a().createElement(u.Z,{classes:{root:x.content}},a().createElement(d.Z,{classes:{root:x.contentText}},r)),a().createElement(c.Z,{className:x.actionButtons,disableSpacing:!0},o&&a().createElement(l.Z,{onClick:o},h),a().createElement("div",null,g&&a().createElement(l.Z,{onClick:g,classes:{root:x.discardButton}},f),a().createElement(l.Z,{onClick:b,color:"primary",disabled:v,autoFocus:!0},y))))}},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(52730),i=n(71153),l=n.n(i),s=n(90436),c=n(22241),u=n(35674);const d=(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"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const i=d(),p=(0,o.useSelector)(u.ZP.selectors.getMetadata),m=t.type,h=(0,c.nt9)(p,m)||{},g=(0,c.VD3)(p,h,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Z,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:l()(i[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(22241),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p={},ListLabelProps:m={},disabled:h=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.oDv)),[t]);return a().createElement(s.S,{items:g,selectedItemsUris:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p,ListLabelProps:m,disabled:h,label:i().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:i().text("Select entity types")})}));c.displayName="EntityTypesSelector"},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(17998);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 o=s();return a().createElement(l.Z,{title:n,classes:{root:i()(o.container,t),title:o.title}},r)}},72108:(e,t,n)=>{n.d(t,{S:()=>N});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(17440),s=n(22241),c=n(86619),u=n(83543),d=n(80030),p=n(79692);const m=(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)"}}),h=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:a}=t;if(n.length>0){const[t]=Array.from(n),o=document.createRange();o.setStart(t,0);for(let n=0;n<e.length;n++){o.setEnd(t,o.endOffset+e[n].length);const{width:i}=o.getBoundingClientRect();if(r+i>a)return n;n!==e.length-1&&o.setEnd(t,o.endOffset+", ".length)}}return-1},g=e=>e.join(", "),f=e=>`calc(${(0,l.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const o=m(),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=h(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 c=g(t),u=l>0,p=u?g(t.slice(0,-l)):c;return a().createElement(d.ZP,{title:u?c:""},a().createElement("div",{className:o.listLabelContainer},a().createElement("div",{style:{width:f(n)},className:o.listLabel,ref:i},c),a().createElement("div",{className:o.visibleItemsLabel},p),u&&a().createElement("div",{className:o.hiddenCount},`+${l}`)))};var y=n(40435),v=n(22311),x=n(26638),w=n(33117),E=n(94792),C=n(63485);function T(){return T=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},T.apply(this,arguments)}const S=(0,l.always)(32),P=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:o,height:i}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return a().createElement(C.Z,T({getItemSize:S,renderItem:(e,o,i)=>{let{item:l}=o;const s=!!t.find((e=>l.uri===e)),c=i===r;return a().createElement(w.Z,{key:l.uri,onClick:n,checked:s,data:l,label:a().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:o,height:i},l))}));P.displayName="SelectMetadataTypesList";const O=(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 R(){return R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(this,arguments)}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){L(e,t,n[t])}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:o,selectedItemsUris:d,onChange:p,ListLabelProps:m={},disabled:h,enableEmptyValueUnderline:g,single:f,label:w,dataReltioId:E,selectionPopupTitle:C}=e;const T=O(),[S,L]=(0,r.useState)(!1),N=(0,r.useCallback)((()=>L(!0)),[]),I=(0,r.useCallback)((()=>L(!1)),[]),[k,j]=(0,r.useState)(""),Z=(0,r.useCallback)((()=>j("")),[]),z=(0,r.useCallback)((0,l.pipe)(Z,I),[I,Z]),A=o.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,k)})).map(((e,t)=>({item:{item:_({},e,{filterText:k})},index:t}))),D=(0,r.useMemo)((()=>d.map((e=>o.find((0,l.propEq)("uri",e)))).map((0,l.prop)("label"))),[d,o]),U=(0,r.useCallback)(((e,t)=>{f?(p(t?[e.uri]:[]),z()):p(t?d.concat(e.uri):d.filter((t=>t!==e.uri)))}),[d,p,f,z]),M=(0,r.useCallback)((e=>{let{item:t}=e;const n=!d.includes(t.uri);U(t,n)}),[d,U]),{focusIndex:B,handleKeyDown:F}=(0,x.t)({items:A,open:S,onSelectFocusedItem:M,selectedItems:d,onClose:z}),G=(0,r.useRef)(),H=G.current?G.current.getBoundingClientRect().width:0,V=Math.max(H,255),W=0===d.length;return a().createElement(a().Fragment,null,a().createElement(c.Z,{label:w,ref:G,InputProps:{startAdornment:W&&!t?null:a().createElement("div",{className:i()(T.inputText,n.inputText)},W?a().createElement("div",null,t):a().createElement(b,R({},m,{list:D}))),classes:{root:T.inputRoot,input:i()(T.input,n.input,{[T.emptyInput]:W&&!t}),disabled:i()(T.disabledInput,{[T.disabledPointer]:h}),underline:T.disabledUnderline},endAdornment:a().createElement(y.Z,{size:"L",icon:u.Z,iconClassName:i()(T.icon,{[T["popup-opened-icon"]]:S}),disabled:h}),readOnly:!0,disabled:!0,disableUnderline:W&&!g},inputProps:{tabIndex:-1},InputLabelProps:{classes:{root:i()(T.inputLabel,n.label)}},value:"",onClick:h?void 0:N,classes:{root:i()(T.root,n.root)},margin:"dense",variant:"filled",disabled:h,"data-reltio-id":E}),a().createElement(v.Z,{open:S,anchorEl:G.current,onClose:z,onSearch:j,title:C,containerWidth:V,containerHeight:355,searchInputOnKeyDown:F,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${E}-popup`}},a().createElement(P,{items:A,onItemClick:U,selectedItems:d,width:V,height:245,focusIndex:B})))}));N.displayName="MetadataTypesSelector"},33109:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(71153),s=n.n(l),c=n(52730),u=n(17440),d=n(90436),p=n(80030),m=n(87918),h=n.n(m),g=n(22241),f=n(35674),b=n(37573),y=n(20146);const v=(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"}}}))),x=e=>{let{className:t,entity:n,children:o,classes:i}=e;const l=v({classes:i}),m=(0,c.useSelector)(f.ZP.selectors.getMetadata),x=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,g.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const w=(0,g.idV)(n.label),E=n.secondaryLabel,C=(0,g.ptG)(m,n),T=(0,g.Fn9)(n),S=n.uri,P=(0,g.BTI)(n);return a().createElement("div",{className:s()(l.profileBandWrapper,t)},a().createElement("div",{className:s()(l.profileBand,{[l.inactive]:!T}),"data-entity-uri":S},a().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:l.profileIcon,imageClassName:l.imageProfileIcon}),a().createElement("div",{className:l.profileInfo},a().createElement("div",null,a().createElement(d.Z,{variant:"h6",className:l.label},w),E&&a().createElement(d.Z,{variant:"subtitle2",className:l.secondaryLabel},E),C&&a().createElement(d.Z,{variant:"subtitle1",className:l.businessCard},C)),a().createElement("div",{className:l.specialInfo},a().createElement("div",{className:l.entityType},a().createElement(y.Z,{entity:n,size:"medium",className:l.badge}),!(0,g.ZiX)(S)&&a().createElement(p.ZP,{title:h().text("Copy to clipboard")},a().createElement(d.Z,{display:"inline",variant:"body2",className:l.entityId,onClick:x},h().text("Entity ID"),": ",P))))),o&&a().createElement("div",null,o)))};x.propTypes={className:i().string,entity:i().object,children:i().node,classes:i().object};const w=x},68977:(e,t,n)=>{n.d(t,{U:()=>c});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(22241),s=n(72108);const c=(0,r.memo)((e=>{let{relationTypes:t,selectedRelationTypes:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p={},ListLabelProps:m={},disabled:h=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.Tt2)),[t]);return a().createElement(s.S,{items:g,selectedItemsUris:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p,ListLabelProps:m,disabled:h,label:i().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:i().text("Select relation types")})}));c.displayName="RelationTypesSelector"},28101:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(39475),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 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)}function p(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:o,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:h}=s,g=p(s,["active","buttonWrapper"]);return a().createElement("div",{className:i()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return a().createElement(l.k,d({},r,{classes:g,size:"S",key:t,className:i()({[i()(c.active,m)]:n===t},c.buttonWrapper,h),onClick:()=>o(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(24328),a=n.n(r);const o=(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=o();return a().createElement("div",{className:i.contentWrapper,style:{width:`${n?t:0}px`}},n&&a().createElement(a().Fragment,null,r))}},15177:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(52730),a=n(35674),o=n(24328),i=n.n(o),l=n(22241),s=n(71153),c=n.n(s),u=n(87918),d=n.n(u),p=n(95544),m=n(90436),h=n(80687),g=n(1730),f=n(52194),b=n(89978),y=n(26978),v=n(79692);const x=(0,v.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),w=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:u="",excludeUris:v=[],includeUris:w=[],attributesCount:E=16}=e;const C=x(),T=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),S=(0,o.useMemo)((()=>(0,y.U)(s,n.type,w,v)),[v,w,s,n.type]),P=(0,l.fyF)(S,n).filter((e=>{let{values:t}=e;return!(0,l.O27)(t)})).length>0;return P||!(0,l.O27)(u)?i().createElement(h.J.Provider,{value:T},i().createElement(g.Z,{className:t},u&&i().createElement(f.Z,{className:C.header,title:u}),i().createElement(p.Z,{className:c()(C.attributesContainer,{[C.noCaption]:!u})},P?i().createElement(b.Z,{entity:n,attrTypes:S,parentUri:n.uri,drawLines:!1,max:E}):i().createElement(m.Z,{className:C.noData},d().text("No data found"))))):null}));var E=n(17440),C=n(76141),T=n(12212);const S=(0,v.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});var P=n(1108);function O(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){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:u,caption:d="",excludeUris:m=[],includeUris:h=[],pinnedAttributes:b}=e;const v=S(),x=(0,r.useDispatch)(),w=(0,o.useContext)(T.m),R=(0,r.useSelector)(a.ZP.selectors.getUserRoles),_=(0,o.useMemo)((()=>(0,l.mC3)(b,R)),[b,R]),L=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),N=(0,o.useMemo)((()=>(0,y.U)(u,L.type,h,m)),[m,h,u,L.type]),I=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.addAttributes,x)(e.map((e=>O({},e,{viewId:w}))))),[w,x]),k=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.modifyAttribute,x)(O({},e,{viewId:w}))),[w,x]),j=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.removeAttribute,x)(O({},e,{viewId:w}))),[w,x]);return i().createElement(g.Z,{className:t},d&&i().createElement(f.Z,{className:v.header,title:d}),i().createElement(p.Z,{className:c()(v.attributesContainer,{[v.noCaption]:!d})},i().createElement(P.c.Provider,{value:_},i().createElement(C.Z,{entity:L,attrTypes:N,parentUri:L.uri,drawLines:!1,mode:s,showEmptyEditors:(0,l.ZiX)(L.uri),crosswalks:L.crosswalks,onAddAttributes:I,onChangeAttribute:k,onDeleteAttribute:j}))))}));var L=n(10609);function N(){return N=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},N.apply(this,arguments)}const I=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=l.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return i().createElement(L.u.Provider,{value:a},(0,l.uzs)(t)?i().createElement(w,N({attributesCount:n,entity:a},o)):i().createElement(_,N({mode:t,pinnedAttributes:r,entity:a},o)))}))},80525:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Xt});var r=n(24328),a=n.n(r),o=n(52730),i=n(36138),l=n(97333),s=n(22664),c=n(52844),u=n(35674),d=n(87378),p=n(98996),m=n(22241),h=n(87918),g=n.n(h),f=n(17440),b=n(60715),y=n(35174);const v=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,f.either)((0,f.pipe)(m.nqN,(0,f.equals)(e)),(0,f.pipe)(m.j5q,(0,f.equals)(e))));n.push(...r);const a=(0,f.pipe)(x,(0,f.without)([e]))(r);return a.forEach((e=>v(e,t,n))),n},x=e=>(0,f.pipe)((0,f.chain)((e=>[(0,m.nqN)(e),(0,m.j5q)(e)])),f.uniq)(e),w=e=>{const[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(null),l=(0,o.useDispatch)(),[s,c]=(0,r.useState)(null),[d,h]=(0,r.useState)(!1),w=null==e?void 0:e.uri,E=(0,m.biM)(e);(0,r.useEffect)((()=>(!w||(0,m.ZiX)(w)||E||(h(!0),(0,m.ZYI)({uri:w,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,m.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then((e=>{const t=new p.MultiGraph;((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}`)}));const a=e.entities.map((e=>({id:e.uri,name:e.label,entityTypeUri:e.type,traversedRelationsCount:e.traversedRelations,untraversedRelationsCount:e.untraversedRelations}))),o=[];return r.forEach((e=>{const[t,n,r]=e.split("--");o.push({from:t,to:n,key:r})})),{nodes:a,edges:o}})(t);n.nodes.forEach((t=>{e.hasNode(t.id)||e.addNode(t.id,{label:(0,m.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})}))})(t,e),i(t),c(e)})).catch((e=>{console.error(e),c(null),l(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Something went wrong"))))})).finally((()=>{h(!1)}))),()=>{i(null),c(null),h(!1)})),[w,E,l,t]);const C=(0,r.useCallback)((e=>{h(!0),(0,m.VGk)(e).then((()=>{a.dropEdge(e);const{updatedData:t,removedEntitiesUris:n}=((e,t,n,r)=>{const a=r.relations.find((0,f.propEq)("uri",t)),o=(0,m.nqN)(a),i=(0,m.j5q)(a),l=(0,y.toUndirected)(n),s=(0,f.cond)([[()=>!(0,b.Ar)(l,e,o),(0,f.always)(o)],[()=>!(0,b.Ar)(l,e,i),(0,f.always)(i)],[f.T,(0,f.always)(null)]])(),c=(0,f.evolve)({relations:(0,f.reject)((0,f.propEq)("uri",t))})(r),{updatedData:u,removedEntitiesUris:d}=s?((e,t)=>{const n=v(e,t),r=(0,f.pipe)(x,(0,f.append)(e),f.uniq)(n);return{updatedData:(0,f.evolve)({relations:(0,f.reject)((e=>n.includes(e))),entities:(0,f.reject)((e=>r.includes(e.uri)))})(t),removedEntitiesUris:r}})(s,c):{updatedData:c,removedEntitiesUris:[]};return{updatedData:u,removedEntitiesUris:d}})(w,e,a,s);((e,t)=>{(t||[]).forEach((t=>{e.dropNode(t)}))})(a,n),c(t)})).catch((e=>{l(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Something went wrong"))))})).finally((()=>{h(!1)}))}),[l,a,w,s]);return{graphLoading:d,data:s,graphologyGraph:a,graphTypeUri:t,setGraphTypeUri:n,onDeleteRelation:C}};var E=n(29627);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 T=(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){C(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},S=[25,50,100],P=(e,t,n)=>{const{startObject:r,endObject:a,type:o}=t,{directionalLabel:i}=(0,m.nqN)(t)===n?r:a;return i||(0,m.Lmx)(e,o)},O=(e,t,n)=>{const[a,i]=(0,r.useState)({field:"",order:"asc"}),[l,s]=(0,r.useState)(0),[c,d]=(0,r.useState)(S[0]),[p,h]=(0,r.useState)([]),g=(0,o.useSelector)(u.ZP.selectors.getMetadata),b=(0,r.useMemo)((()=>{const t=(null==e?void 0:e.entities)||[];return(0,f.zipObj)(t.map((0,f.prop)("uri")),t)}),[null==e?void 0:e.entities]),y=(0,r.useMemo)((()=>(0,f.pipe)((0,f.filter)((0,f.either)((0,f.pipe)(m.nqN,(0,f.equals)(t)),(0,f.pipe)(m.j5q,(0,f.equals)(t)))),(0,f.uniqBy)((0,f.prop)("uri")),(0,f.map)((e=>{const n=b[((e,t)=>{const n=(0,m.nqN)(t),r=(0,m.j5q)(t);return n===e?r:n})(t,e)];return{relation:e,entity:n,entityLabel:(0,m.idV)(n.label),entityTypeLabel:(0,m.jFi)(g,n),relationTypeLabel:P(g,e,n.uri)}})))((null==e?void 0:e.relations)||[])),[e,t,b,g]),{searchText:v,onChangeSearchText:x,filters:w,onFilter:E,relationTypesOptions:C,entityTypesOptions:T}=(e=>{const[t,n]=(0,r.useState)(""),[a,i]=(0,r.useState)({entityTypesUris:[],relationTypesUris:[]}),l=(0,o.useSelector)(u.ZP.selectors.getMetadata);return{searchText:t,onChangeSearchText:n,filters:a,onFilter:i,entityTypesOptions:(0,r.useMemo)((()=>(0,f.pipe)((0,f.map)((e=>{let{entity:t}=e;return t.type})),f.uniq,(0,f.map)((0,m.nt9)(l)))(e)),[e,l]),relationTypesOptions:(0,r.useMemo)((()=>(0,f.pipe)((0,f.map)((e=>{let{relation:t}=e;return t.type})),f.uniq,(0,f.map)((0,m.V3K)(l)))(e)),[e,l])}})(y),O=(0,r.useMemo)((()=>(0,f.pipe)((0,f.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:a,relationTypesUris:o}=w;return t.toLowerCase().includes(v)&&(0,f.ifElse)((0,f.prop)("length"),(0,f.includes)(r.type),f.T)(o)&&(0,f.ifElse)((0,f.prop)("length"),(0,f.includes)(n.type),f.T)(a)})),a.field?(0,f.sort)(((e,t)=>m.P6Y.strings.sort(a.order,e[a.field],t[a.field]))):f.identity)(y)),[y,a,v,w]),R=(0,r.useMemo)((()=>O.slice(l*c,l*c+c)),[O,l,c]),_=(0,r.useCallback)((e=>{h((t=>[...t,e]))}),[]),L=(0,r.useCallback)((e=>{h((t=>(0,f.without)([e],t)))}),[]);return(0,r.useEffect)((()=>{s(0),x(""),E({entityTypesUris:[],relationTypesUris:[]})}),[t,n,x,E]),(0,r.useEffect)((()=>{s(0)}),[a,v,w]),{rowsData:R,onSort:i,sorting:a,searchText:v,onChangeSearchText:x,filters:w,onFilter:E,entityTypesOptions:T,relationTypesOptions:C,editingRelations:p,onStartRelationEditing:_,onFinishRelationEditing:L,total:O.length,page:l,rowsPerPage:c,onPageChange:s,onRowsPerPageChange:d}},R=a().createContext({graphLoading:!1,data:null,graphologyGraph:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{}});R.displayName="GraphStateContext";var _=n(71153),L=n.n(_),N=n(33109),I=n(62901),k=n(72316),j=n(95544),Z=n(79692);const z=(0,Z.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),A=(0,r.memo)((e=>{let{className:t}=e;const n=z(),r=(0,o.useSelector)(u.ZP.selectors.getEntity);return a().createElement(N.Z,{className:L()(t,I.U),entity:r},a().createElement(j.Z,{className:n.comments},a().createElement(k.Z,{uri:r.uri,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:r.uri}),objectType:m.q7e.ENTITY})))}));A.displayName="GraphProfileBand";const D=A;var U=n(11821),M=n(28101),B=n(82726);const F=(0,Z.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function G(){return G=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},G.apply(this,arguments)}const H=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",G({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),a().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 V=n(50548);const W=(0,V.l)(R,(0,f.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return a().createElement(N.Z,{entity:t})}));var q=n(15177);const $=(0,Z.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),X=(0,V.l)(R,(0,f.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=$();return a().createElement("div",{className:r.wrapper},n&&a().createElement(d.Z,null),a().createElement(q.Z,{entity:t,caption:g().text("Entity details"),className:r.noShadowBlock}))}));var Y=n(90436),K=n(42011),Q=n(44443),J=n(44938),ee=n(79573);const te="1px solid rgba(0, 0, 0, 0.05)",ne=(0,Z.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:te},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},headRow:{borderBottom:te}});function re(){return re=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},re.apply(this,arguments)}const ae=(0,r.memo)((e=>{let{columnsData:t,sorting:n,onSort:r}=e;const o=ne();return a().createElement("div",{className:L()(o.tableRow,o.headRow)},t.map((e=>{const{id:t,sortable:o,headCellRenderer:i,columnClassName:l}=e,s=i,c=o?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{r({field:t,order:n.field===t?(0,ee.Dh)(n.order):"asc"})}}:{};return a().createElement("div",{key:t,className:l},a().createElement(s,re({headCellData:e},c)))})))})),oe=(0,r.forwardRef)(((e,t)=>{let{classes:n,columnsData:o,rowsData:i,sorting:l,onSort:s,getRowKey:c,ExpandedRowRenderer:u,defaultRowHeight:d}=e;const p=ne(),[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 a().createElement("div",{className:L()(p.tableRowWrapper,null==n?void 0:n.tableRowWrapper)},a().createElement("div",{className:L()(p.tableRow,null==n?void 0:n.tableRow)},o.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:r}=e;const o=n;return a().createElement("div",{key:t,className:r},a().createElement(o,{value:i[t],rowValue:i}))}))),i.expanded&&u&&a().createElement(u,{open:i.expanded,rowValue:i}))}),[o,u]),f=(0,r.useCallback)(((e,t)=>{h({width:e,height:t})}),[]),b=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=b.current)||void 0===e||e.scrollTo(0)}}))),a().createElement("div",{className:p.table},a().createElement(ae,{columnsData:o,sorting:l,onSort:s}),a().createElement("div",{className:p.tableBodyWrapper},a().createElement(Q.Z,{handleHeight:!0,handleWidth:!0,onResize:f}),a().createElement("div",{className:p.tableBody},a().createElement(J.Z,{listRef:b,width:m.width,height:m.height,data:i,defaultItemSize:d,itemKey:c,showNotMeasuredItems:!0},g))))})),ie=(0,r.memo)(oe);var le=n(92332),se=n(83088);const ce="rgba(238, 238, 238, 1)",ue=(0,Z.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:ce}}});function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pe={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"},me=".collapsibleTableRow:hover &",he=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){de(e,t,n[t])}))}return e}({},pe,{[me]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${ce} 100%)`}}),ge=(0,Z.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":pe},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":he},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",[me]:{visibility:"visible",background:ce}},editButton:{marginRight:"7px"},entityAvatar:{width:"20px",height:"20px",marginRight:"8px"}})));function fe(){return fe=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},fe.apply(this,arguments)}function be(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){ye(e,t,n[t])}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ve=e=>{let{className:t,headCellData:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","headCellData"]);const o=ge();return a().createElement("div",{className:L()(o.headCell,t)},a().createElement(le.default,fe({},r,{headCellData:be({},n,{label:a().createElement(se.C,{value:n.label},a().createElement("div",{className:o.headLabel},n.label))})})))},xe=(0,r.memo)((e=>{let{value:t="",tooltip:n,onClick:r,className:o}=e;const i=ge();return n=n||t,a().createElement(se.C,{value:n},a().createElement("div",{className:L()(i.defaultCell,o,{[i.clickable]:!!r}),onClick:r},t))}));var we=n(37573);const Ee=(0,V.l)(R,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:r,onClick:o}=e;const i=ge(),l=a().createElement(a().Fragment,null,a().createElement(we.Z,{entity:n,avatarClassName:i.entityAvatar}),t);return a().createElement(xe,{value:l,tooltip:t,className:L()(i.profileCell,r),onClick:()=>o(n.uri)})})),Ce=(0,r.memo)((e=>{let{open:t,rowValue:n}=e;return t?a().createElement("div",{style:{padding:"6px 16px",fontSize:"13px"}},n.relation.uri):null}));var Te=n(39475),Se=n(27604),Pe=n(22983),Oe=n(22118);const Re=(0,V.l)(R,(0,f.pick)(["onDeleteRelation"]),(e=>{let{uri:t,open:n,onClose:r,onDeleteRelation:o}=e;return a().createElement(Oe.Z,{open:n,title:g().text("Do you want to make a clean break?"),content:g().text("To end this relationship, click Delete Relationship. To keep the connection, click Cancel."),saveCaption:g().text("Delete relationship"),discardCaption:g().text("Cancel"),onDiscard:r,onSave:()=>{o(t),r()}})})),_e=(0,r.memo)((e=>{let{uri:t}=e;const[n,o]=(0,r.useState)(!1),i=(0,r.useCallback)((()=>o(!0)),[]),l=(0,r.useCallback)((()=>o(!1)),[]);return a().createElement(a().Fragment,null,a().createElement(Te.k,{icon:Pe.Z,size:"XXS",tooltipTitle:g().text("Delete"),onClick:i}),a().createElement(Re,{open:n,onClose:l,uri:t}))}));_e.displayName="DeleteRelationButton";const Le=_e,Ne=(0,V.l)(R,(e=>{let{relationshipTable:{onStartRelationEditing:t}}=e;return{onEdit:t}}),(e=>{let{rowValue:{relation:{uri:t}},className:n,onEdit:r}=e;const o=ge();return a().createElement("div",{className:L()(o.controlsCell,n)},a().createElement(Te.k,{className:o.editButton,icon:Se.Z,size:"XXS",tooltipTitle:g().text("Edit"),onClick:()=>r(t)}),a().createElement(Le,{uri:t}))}));function Ie(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){ke(e,t,n[t])}))}return e}function ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const je=(e,t)=>t[e].relation.uri||`${e}`,Ze=(0,V.l)(R,(e=>{let{relationshipTable:t}=e;return Ie({},t)}),(e=>{let{rowsData:t,sorting:n,onSort:o,total:i,page:l,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:u,editingRelations:d}=e;const p=ue(),m=(0,r.useMemo)((()=>[{id:"entityLabel",label:g().text("Profile"),headCellRenderer:ve,rowCellValueRenderer:Ee,sortable:!0,columnClassName:p.profileColumn},{id:"relationTypeLabel",label:g().text("Relationship type"),headCellRenderer:ve,rowCellValueRenderer:xe,sortable:!0,columnClassName:p.relationshipTypeColumn},{id:"entityTypeLabel",label:g().text("Entity Type"),headCellRenderer:ve,rowCellValueRenderer:xe,sortable:!0,columnClassName:p.entityTypeColumn},{id:"controls",label:"",headCellRenderer:ve,rowCellValueRenderer:Ne}]),[p]),h=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;null===(e=h.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const f=(0,r.useMemo)((()=>t.map((e=>{var t;return null!=d&&d.includes(null==e||null===(t=e.relation)||void 0===t?void 0:t.uri)?Ie({},e,{expanded:!0}):e}))),[t,d]),b=(0,r.useMemo)((()=>({tableRow:L()(p.row,"collapsibleTableRow")})),[p]);return a().createElement("div",{className:p.tableWithPagination},a().createElement("div",{className:p.tableContainer},a().createElement(ie,{ref:h,columnsData:m,rowsData:f,sorting:n,onSort:o,getRowKey:je,ExpandedRowRenderer:Ce,defaultRowHeight:28,classes:b})),i>S[0]&&a().createElement(K.Z,{count:i,rowsPerPageOptions:S,rowsPerPage:s,onChangeRowsPerPage:u,page:l,onChangePage:c,basicTableRef:h}))}));var ze=n(36444),Ae=n(61837),De=n(33662);const Ue=(0,Z.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}}}))),Me=(0,V.l)(R,(0,f.pipe)((0,f.prop)("relationshipTable"),(0,f.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const r=Ue();return a().createElement(De.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:g().text("Search profiles"),classes:{input:r.input}})}));var Be=n(92934),Fe=n(68977),Ge=n(77277),He=n(8629);const Ve=(0,Z.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"}}))),We=(0,V.l)(R,(0,f.pipe)((0,f.prop)("relationshipTable"),(0,f.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:n,filters:o,onFilter:i,entityTypesOptions:l,relationTypesOptions:s}=e;const c=Ve(),[u,d]=(0,r.useState)([]),[p,m]=(0,r.useState)([]),h=()=>{d(o.entityTypesUris),m(o.relationTypesUris),n()};return(0,r.useEffect)((()=>{d(o.entityTypesUris),m(o.relationTypesUris)}),[o.entityTypesUris,o.relationTypesUris]),a().createElement(He.Z,{classes:{paper:c.dialogPaper},onClose:h,open:t},a().createElement(Y.Z,{className:c.title},g().text("Filter")),a().createElement(Be.Q,{classes:{root:c.entityTypesSelector},entityTypes:l,selectedEntityTypes:u,enableEmptyValueUnderline:!0,onChange:d}),a().createElement(Fe.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:p,enableEmptyValueUnderline:!0,onChange:m}),a().createElement("div",{className:c.footer},a().createElement(Ge.Z,{className:c.clearAllButton,onClick:()=>{d([]),m([])}},g().text("Clear All")),a().createElement(Ge.Z,{className:c.cancelButton,onClick:h},g().text("Cancel")),a().createElement(Ge.Z,{onClick:()=>{i({entityTypesUris:u,relationTypesUris:p}),n()},color:"primary"},g().text("Apply"))))})),qe=(0,Z.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}}))),$e=(0,V.l)(R,(0,f.pipe)((0,f.prop)("relationshipTable"),(0,f.pick)(["filters"])),(e=>{let{filters:t}=e;const n=qe(),[o,i]=(0,r.useState)(!1),{entityTypesUris:l,relationTypesUris:s}=t,c=l.length||s.length;return a().createElement("div",{className:n.wrapper},a().createElement(Me,null),a().createElement(Ae.Z,{className:n.iconButton,onClick:()=>i(!0)},a().createElement(ze.Z,{className:c?n.activeFiltersIcon:n.inactiveFiltersIcon})),a().createElement(We,{open:o,onClose:()=>i(!1)}))})),Xe=(0,Z.Z)({caption:{marginLeft:"16px",marginTop:"12px",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),Ye=()=>{const e=Xe();return a().createElement("div",{className:e.wrapper},a().createElement(Y.Z,{className:e.caption,variant:"subtitle1"},g().text("Relationships")),a().createElement($e,null),a().createElement(Ze,null))};let Ke;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(Ke||(Ke={}));const Qe=(0,r.memo)((()=>{var e;const t=F(),[n,o]=(0,r.useState)(null),i=(0,r.useCallback)((e=>{o((t=>t===e?null:e))}),[]),l=null!==n,s=(0,r.useMemo)((()=>[{buttonProps:{id:Ke.Relationship,icon:H,tooltipTitle:g().text("Relationship")},content:a().createElement(Ye,null)},{buttonProps:{id:Ke.EntityDetails,icon:B.Z,tooltipTitle:g().text("Entity Details")},content:a().createElement(X,null)}]),[]);return a().createElement("div",{className:t.wrapper},a().createElement(U.h,{open:l,width:480},a().createElement(W,null),null===(e=s[n])||void 0===e?void 0:e.content),a().createElement(M.G,{buttonsProps:(0,f.pluck)("buttonProps",s),onButtonClick:i,activeIndexId:n}))}));Qe.displayName="GraphRightSidePanel";const Je=Qe;var et=n(46339),tt=n(23304);const nt=(e,t,n)=>{var r;if(!t.label)return;const a=n.labelSize,o=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} ${a}px ${o}`,e.fillText(t.label,t.x+t.size+11,t.y+a/3)},rt=(e,t,n)=>{const r=n.labelSize,a=n.labelFont,o=n.labelWeight;if(e.font=`${o} ${r}px ${a}`,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,a=Math.round(n+16),o=Math.round(r+2+4),i=Math.max(t.size,r/2)+2,l=Math.asin(o/2/i),s=Math.sqrt(Math.abs(Math.pow(i,2)-Math.pow(o/2,2)));e.beginPath(),e.moveTo(t.x+s,t.y+o/2),e.lineTo(t.x+i+a,t.y+o/2),e.lineTo(t.x+i+a,t.y-o/2),e.lineTo(t.x+s,t.y-o/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,nt(e,t,n)};var at=n(88586);class ot extends tt.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 a=1*n*5;if(t||!e.inPath)return r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,void(r[a++]=0);r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,at.floatColor)(e.color),r[a]=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 it{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:a,size:o}=e;const i=Math.min(128,o);let l=0,s=0;(a.width||0)>(a.height||0)?l=(a.width-a.height)/2:s=(a.height-a.width)/2,n.drawImage(a,l,s,o,o,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 lt={id:"defaultImage",path:(0,m.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 st extends tt.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 it,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(lt.id,lt.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 a=1*n*9;const o=e.image;let i=o&&this.imageLoader.images[o];if("string"!=typeof o||i||this.imageLoader.loadImage(o,o),t)return r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,void(r[a++]=0);if(r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,at.floatColor)(e.color),r[a++]=e.inactive?1:0,i&&"ready"===i.status||(i=this.imageLoader.images[lt.id]),i&&"ready"===i.status){const{width:e,height:t}=this.imageLoader.textureImage;r[a++]=i.x/e,r[a++]=i.y/t,r[a++]=i.width/e,r[a++]=i.height/t}else r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=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 ct=[{id:"expandIcon",path:(0,m.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,m.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 ut extends tt.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 it,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 a=e.getUniformLocation(this.program,"u_atlas");if(null===a)throw new Error("NodeButtonsProgram: error while getting atlasLocation");this.atlasLocation=a,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])),ct.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 a=2*n*11;const o=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),o||0===e.untraversedRelationsCount)r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0;else{const t=this.imageLoader.images.expandIcon;if(r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,at.floatColor)(e.color),r[a++]=e.buttonSize||0,r[a++]=c,r[a++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[a++]=t.x/e,r[a++]=t.y/n,r[a++]=t.width/e,r[a++]=t.height/n}else r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0}if(o||0===e.traversedRelationsCount)r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0;else{const t=this.imageLoader.images.collapseIcon;if(r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,at.floatColor)(e.color),r[a++]=e.buttonSize||0,r[a++]=-c,r[a++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[a++]=t.x/e,r[a++]=t.y/n,r[a++]=t.width/e,r[a++]=t.height/n}else r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=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 dt=e=>{let{children:t}=e;const n=(0,r.useMemo)((()=>({allowInvalidContainer:!0,defaultNodeType:"image",hoverRenderer:rt,labelRenderer:nt,nodeProgramClasses:{image:(0,tt.createNodeCompoundProgram)([st,ot,ut])},labelFont:"Roboto",labelSize:13,labelColor:{color:"rgba(0, 0, 0, 0.87)"}})),[]);return a().createElement(et.C6,{graph:p.MultiGraph,style:{background:"transparent"},initialSettings:n},t)};var pt=n(28833),mt=n.n(pt),ht=n(3660),gt=n.n(ht),ft=n(28301),bt=n.n(ft),yt=n(31181),vt=n(30284);const xt=.6,wt=(e,t,n,r,a)=>{if(t.loop){const{size:r,color:a}=t,o=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)}}(o,i,.6*l);if(e.strokeStyle=a,e.lineWidth=r,"arrow"===t.type){const{aX:t,aY:n,vX:r,vY:c}=((e,t,n,r)=>{const a=Math.max(.5*r,5),o=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return{aX:e.x1+(t-e.x1)*(o-a-r)/o,aY:e.y1+(n-e.y1)*(o-a-r)/o,vX:(t-e.x1)*a/o,vY:(n-e.y1)*a/o}})(s,o,i,l);e.beginPath(),e.moveTo(o,i),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,n),e.stroke(),e.fillStyle=a,e.beginPath(),e.moveTo(t+r,n+c),e.lineTo(t+c*xt,n-r*xt),e.lineTo(t-c*xt,n+r*xt),e.lineTo(t+r,n+c),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(o,i),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,o,i),e.stroke()}(0,vt.default)(e,t,n,r,a)};function Et(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){Ct(e,t,n[t])}))}return e}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tt=(0,f.memoizeWith)(((e,t,n)=>n.type),m.uie),St={size:24,buttonSize:8,buttonOffset:[19,19]},Pt={size:12,buttonSize:6,buttonOffset:[8,13]},Ot=e=>{let{data:t,graph:n,syncLayout:a,workerLayout:i,layoutSettings:l,selectedNode:s,onNodeClick:c}=e;const d=(0,et.Ys)(),p=(0,et.sG)(),m=(0,et.$j)(),h=(0,et.eP)(),g=(0,o.useSelector)(u.ZP.selectors.getEntity),f=(0,o.useSelector)(u.ZP.selectors.getMetadata),v=(0,o.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",[x,w]=(0,r.useState)(void 0),[E,C]=(0,r.useState)(null),[T,S]=(0,r.useState)({});(0,r.useEffect)((()=>{d.getCamera().setState({ratio:1.2})}),[n,d]),(0,r.useEffect)((()=>{if(C((0,y.toUndirected)(n)),p(n),a){const e=a(d.getGraph(),l);(0,yt.animateNodes)(d.getGraph(),e,{duration:1e3})}if(i){const e=new i(d.getGraph(),l);e.start();const t=setTimeout((()=>{e.stop()}),5e3);return()=>{clearTimeout(t),e.kill()}}}),[t,n,a,i,d,l,p]);const P=(0,r.useCallback)((e=>{const t=d.getGraph(),n=null==g?void 0:g.uri;if(t&&E&&n&&e&&n!==e){const r=(0,b.Ar)(E,n,e),a=((e,t)=>{const n=[];return t&&t.reduce(((t,r)=>(n.push(e.findEdge(t,r,(e=>!!e))||e.findEdge(r,t,(e=>!!e))),r))),n})(t,r);return{edges:a,nodes:r}}return{}}),[d,null==g?void 0:g.uri,E]);(0,r.useEffect)((()=>{S(P(s))}),[s,P]),(0,r.useEffect)((()=>{m({enterNode:e=>{let{node:t}=e;w(t)},leaveNode:()=>{w(void 0)},clickNode:e=>{let{node:t}=e;c(t)}})}),[d,m,c]),(0,r.useEffect)((()=>{const e=d.getGraph(),t=e.neighbors(s);h({nodeReducer:(e,n)=>{const r=Tt(f,v,{type:n.entityTypeUri}),a=Et({},n,e===s?St:Pt,{color:"#0072CE",image:r}),o=(T.nodes||[]).includes(e),i=x===e;return o||e===s?a.inPath=!0:!t||t.includes(e)||s===e||s===(null==g?void 0:g.uri)||o||(i||(a.label=""),a.inactive=!0),i&&(a.highlighted=!0),a},edgeReducer:(t,n)=>{const r=Et({},n,{hidden:!1}),a=(T.edges||[]).includes(t);return!s||s===(null==g?void 0:g.uri)||e.hasExtremity(t,s)||a||(r.hidden=!0),a&&(r.color="#0072CE",r.size=4),r},renderEdgeLabels:!0,edgeLabelRenderer:wt})}),[d,h,x,s,T,null==g?void 0:g.uri,f,v])};function Rt(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){_t(e,t,n[t])}))}return e}function _t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Lt=e=>{let{data:t,graph:n,selectedNode:a,onNodeClick:o}=e;const i=(0,r.useMemo)((()=>(mt().assign(n),{settings:Rt({},gt().inferSettings(n),{gravity:1})})),[n]);return Ot({workerLayout:bt(),layoutSettings:i,data:t,graph:n,selectedNode:a,onNodeClick:o}),null};var Nt=n(36039);let It;!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy"}(It||(It={}));const kt=(e,t,n,r)=>{const a=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)||a.add(r.to)}))})),a.size&&t.push(Array.from(a)),((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})(a,r,n)?kt(a,t,n,r):t},jt=(e,t,n,r)=>{if(e.length<10&&(t[r]=[...e]),e.length>10){const a=e.slice(10),o=e.slice(0,10);t[r]=o,t[r+1]=n[r+1]?[...n[r+1],...a]:a}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return jt(e,t,n,r)}return t};function Zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const zt=e=>{let{data:t,graph:n,selectedNode:a,layout:o,onNodeClick:i}=e;const l=(0,r.useCallback)((e=>{const t=e.copy(),n=(e=>{switch(e){case It.VERTICAL_TB:return 180;case It.HORIZONTAL_LR:return 270}})(o),r=((e,t)=>{const n=e.nodes,r=e.edges.filter((e=>e.from!==e.to)),a=((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),o=kt(a,[],new Set,r);return jt(o[0],[],o,0)})((e=>({nodes:e.nodes().map((e=>({id:e,name:""}))),edges:e.mapEdges(((e,t,n,r)=>({from:n,to:r,key:e})))}))(t),a),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 Nt.rotation.assign(t,n,{degrees:!0}),t.reduceNodes(((e,t,n)=>{let{x:r,y:a}=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){Zt(e,t,n[t])}))}return e}({},e,{[t]:{x:r,y:a}})}),{})}),[o,a]);return Ot({syncLayout:l,data:t,graph:n,selectedNode:a,onNodeClick:i}),null};var At=n(84425);const Dt=(0,Z.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),Ut=(0,V.l)(R,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;const i=Dt(),l=(0,o.useSelector)(u.ZP.selectors.getMetadata),s=(0,o.useSelector)(u.ZP.selectors.getEntity),c=(0,r.useMemo)((()=>[{label:g().text("All"),value:null},...(0,m.mmY)(l,s.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[s,l]),d=(0,r.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return a().createElement(At.Z,{classes:{valueContainer:i.valueContainer},className:i.graphTypeSelector,height:42,label:g().text("Graph type"),value:d,options:c,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:i.filledInputRoot}}}})})),Mt=(0,Z.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),Bt=(0,r.memo)((e=>{let{value:t,onChangeHandler:n}=e;const r=Mt(),o=[{label:g().text("Simple network"),value:It.SIMPLE_NETWORK},{label:g().text("Vertical hierarchy"),value:It.VERTICAL_TB},{label:g().text("Horizontal hierarchy"),value:It.HORIZONTAL_LR}];return a().createElement(At.Z,{className:r.graphLayoutSelector,label:g().text("Graph layout"),value:o.find((0,f.propEq)("value",t)),options:o,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:r.filledInputRoot}}}})})),Ft=(0,Z.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});function Gt(){return Gt=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},Gt.apply(this,arguments)}const Ht=(0,V.l)(R,(e=>{let{data:t,graphologyGraph:n,selectedEntity:r,onEntitySelect:a}=e;return{data:t,graph:n,selectedNode:null==r?void 0:r.uri,onNodeSelect:a}}),(e=>{let{data:t,graph:n,selectedNode:o,onNodeSelect:i}=e;const[l,s]=(0,r.useState)(It.SIMPLE_NETWORK),c=Ft(),u={data:t,graph:n,selectedNode:o,onNodeClick:i};return a().createElement("div",{className:c.wrapper},a().createElement("div",{className:c.selectors},a().createElement(Ut,null),a().createElement(Bt,{value:l,onChangeHandler:s})),a().createElement("div",{className:c.graph},n&&a().createElement(dt,null,l===It.SIMPLE_NETWORK?a().createElement(Lt,u):a().createElement(zt,Gt({},u,{layout:l})))))})),Vt=(0,Z.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"}}))),Wt=(0,r.memo)((()=>{const e=Vt(),t=(0,o.useSelector)(u.ZP.selectors.getEntity),n=(e=>{const{graphLoading:t,data:n,graphologyGraph:a,graphTypeUri:i,setGraphTypeUri:l,onDeleteRelation:s}=w(e),{selectedEntity:c,onEntitySelect:d,selectedEntityLoading:p}=((e,t)=>{const n=(0,E._)(),a=(0,o.useDispatch)(),[i,l]=(0,r.useState)(null),s=(0,r.useRef)({}),[c,d]=(0,r.useState)(!1),p=(0,r.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,m.HvW)(e).then((e=>(s.current=T(s.current,e),e)))}),[]),h=(0,r.useCallback)((e=>{var r;const o=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,f.propEq)("uri",e));o&&l(o),d(!0),n(p(e)).then(l).catch((e=>{a(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Something went wrong"))))})).finally((()=>{d(!1)}))}),[a,t,n,p]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(s.current=T({},e),h(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=T({},e),h(e.uri)):(s.current={},l(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:i,onEntitySelect:h}})(e,n);return{graphLoading:t,data:n,graphologyGraph:a,onDeleteRelation:s,selectedEntity:c,onEntitySelect:d,selectedEntityLoading:p,graphTypeUri:i,setGraphTypeUri:l,relationshipTable:O(n,null==c?void 0:c.uri,i)}})(t),{graphLoading:i}=n;return a().createElement(R.Provider,{value:n},a().createElement("div",{className:e.perspectiveView},i&&a().createElement(d.Z,null),(null==t?void 0:t.uri)&&a().createElement("div",{className:e.graphContainer},a().createElement("div",{className:e.graphWrapper},a().createElement(D,null),a().createElement(Ht,null)),a().createElement(Je,null))))}));Wt.displayName="GraphPerspectiveView";const qt=Wt,$t=(0,i.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),Xt=e=>{let{store:t}=e;return a().createElement(o.Provider,{store:t},a().createElement(i.StylesProvider,{generateClassName:$t},a().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},a().createElement(qt,null),a().createElement(l.Z,{showErrorFromStore:!0}))))}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[525],{50548:(e,t,n)=>{n.d(t,{l:()=>i});var r=n(24328),a=n.n(r);function o(){return o=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},o.apply(this,arguments)}const i=(e,t,n)=>{if(e&&t){const i=(0,r.memo)(n);return n=>a().createElement(e.Consumer,null,(e=>a().createElement(i,o({},n,t(e,n)))))}return n}},44938:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),o=n(50166),i=n(44443),l=n(22241);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 d=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:u,data:d,children:p,itemKey:m,showNotMeasuredItems:h,listRef:g}=e;const f=s(),b=(0,r.useRef)({}),[y,v]=(0,r.useState)({}),x=(0,r.useCallback)((0,l.DsO)((()=>{v(c({},b.current))})),[]),E=(0,r.useCallback)(((e,t)=>m?m(t,e):t),[m]),w=(0,r.useRef)(),C=g||w;C.current&&C.current.resetAfterIndex(0,!1);const O=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const o=E(t,n);return a().createElement("div",{style:r,className:f.item},a().createElement("div",{style:h?void 0:{visibility:o in y?void 0:"hidden"}},a().createElement(i.Z,{handleHeight:!0,onResize:(e,t)=>{b.current[o]!==t&&(((e,t)=>{b.current=c({},b.current,{[e]:t})})(o,t),x())}}),p({data:t,index:n})))}),[p,h,E,x,!h&&y]);return a().createElement(o.VariableSizeList,{ref:C,width:t,height:n,itemCount:d.length,itemData:d,itemSize:e=>y[(e=>E(d,e))(e)]||u,itemKey:m},O)}))},42011:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),l=n(71153),s=n.n(l),c=n(28899),u=n(87918),d=n.n(u),p=n(79573),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){f(e,t,n[t])}))}return e}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 b=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:a,onChangePage:l,rowsPerPage:u,onChangeRowsPerPage:f,basicTableRef:b,labelRowsPerPage:y}=e;const v=h(),x=(0,o.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],b)()}),[b]),E=(0,o.useCallback)((e=>{l(e),x()}),[l,x]),w=(0,o.useCallback)((e=>{l(0),f(e),x()}),[l,f,x]);return i().createElement(c.Z,{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||d().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return d().text("${fromRow}-${toRow} of ${countRows}",{fromRow:d().number(t,"0,0"),toRow:d().number(n,"0,0"),countRows:d().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:a,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:u,onChangeRowsPerPage:(0,m.pipe)(p.NA,w)})};b.propTypes={classes:a().object,rowsPerPageOptions:a().arrayOf(a().number),count:a().number,page:a().number,onChangePage:a().func,rowsPerPage:a().number,onChangeRowsPerPage:a().func,basicTableRef:a().shape({current:a().object}),labelRowsPerPage:a().string};const y=i().memo(b)},1730:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(27556),a=n(13980),o=n.n(a),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 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)}const p=(0,i.forwardRef)(((e,t)=>{let{children:n,className:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const i=u();return l().createElement(r.Z,d({ref:t,className:a,classes:{root:i["basic-view__paper"]}},o),n)}));p.displayName="BasicView",p.propTypes={children:o().node,className:o().string};const m=p},22118:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(77277),s=n(8629),c=n(49429),u=n(38724),d=n(55999),p=n(79249);const m=(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"}}),h=e=>{let{open:t,title:n,content:r,onCancel:o,cancelCaption:h=i().text("Cancel"),onDiscard:g,discardCaption:f="",onSave:b,saveCaption:y=i().text("Save"),disabledSave:v=!1}=e;const x=m();return a().createElement(s.Z,{open:t,onClose:o,classes:{paperScrollPaper:x.paper}},a().createElement(p.Z,{classes:{root:x.title}},n),a().createElement(u.Z,{classes:{root:x.content}},a().createElement(d.Z,{classes:{root:x.contentText}},r)),a().createElement(c.Z,{className:x.actionButtons,disableSpacing:!0},o&&a().createElement(l.Z,{onClick:o},h),a().createElement("div",null,g&&a().createElement(l.Z,{onClick:g,classes:{root:x.discardButton}},f),a().createElement(l.Z,{onClick:b,color:"primary",disabled:v,autoFocus:!0},y))))}},17906:(e,t,n)=>{n.d(t,{n:()=>u});var r=n(24328),a=n.n(r),o=n(52730),i=n(35674),l=n(22241),s=n(76141);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,onChangeAttribute:n,onRemoveAttribute:u,onAddAttributes:d,showEmptyEditors:p}=e;const{relation:m}=t,{attributes:h,uri:g,type:f=""}=m,b=(0,o.useSelector)(i.ZP.selectors.getMetadata),y=(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){c(e,t,n[t])}))}return e}({attributes:h},(0,l.p2l)(m))),[m,h]),v=(0,r.useMemo)((()=>(0,l.xF8)(b,f)),[f,b]);return a().createElement(s.Z,{attrTypes:v,entity:y,showEmptyEditors:p,mode:l.fO_.EDITING,parentUri:g,onAddAttributes:d,onChangeAttribute:n,onDeleteAttribute:u})}},20146:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(52730),i=n(71153),l=n.n(i),s=n(90436),c=n(22241),u=n(35674);const d=(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"}}),p=e=>{let{entity:t,className:n,size:r="small"}=e;const i=d(),p=(0,o.useSelector)(u.ZP.selectors.getMetadata),m=t.type,h=(0,c.nt9)(p,m)||{},g=(0,c.VD3)(p,h,"typeColor")||c.rSc.palette.primary.main;return a().createElement(s.Z,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:l()(i[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},92934:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(22241),s=n(72108);const c=(0,r.memo)((e=>{let{entityTypes:t,selectedEntityTypes:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p={},ListLabelProps:m={},disabled:h=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.oDv)),[t]);return a().createElement(s.S,{items:g,selectedItemsUris:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p,ListLabelProps:m,disabled:h,label:i().text("Entity type"),dataReltioId:"entity-type-selector",selectionPopupTitle:i().text("Select entity types")})}));c.displayName="EntityTypesSelector"},52194:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(17998);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 o=s();return a().createElement(l.Z,{title:n,classes:{root:i()(o.container,t),title:o.title}},r)}},72108:(e,t,n)=>{n.d(t,{S:()=>N});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(17440),s=n(22241),c=n(86619),u=n(83543),d=n(80030),p=n(79692);const m=(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)"}}),h=(e,t)=>{const{childNodes:n,clientLeft:r,clientWidth:a}=t;if(n.length>0){const[t]=Array.from(n),o=document.createRange();o.setStart(t,0);for(let n=0;n<e.length;n++){o.setEnd(t,o.endOffset+e[n].length);const{width:i}=o.getBoundingClientRect();if(r+i>a)return n;n!==e.length-1&&o.setEnd(t,o.endOffset+", ".length)}}return-1},g=e=>e.join(", "),f=e=>`calc(${(0,l.isNil)(e)?"100%":`${e}px`} - 35px)`,b=e=>{let{list:t,maxWidth:n}=e;const o=m(),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=h(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 c=g(t),u=l>0,p=u?g(t.slice(0,-l)):c;return a().createElement(d.ZP,{title:u?c:""},a().createElement("div",{className:o.listLabelContainer},a().createElement("div",{style:{width:f(n)},className:o.listLabel,ref:i},c),a().createElement("div",{className:o.visibleItemsLabel},p),u&&a().createElement("div",{className:o.hiddenCount},`+${l}`)))};var y=n(40435),v=n(22311),x=n(26638),E=n(33117),w=n(94792),C=n(63485);function O(){return O=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},O.apply(this,arguments)}const S=(0,l.always)(32),P=(0,r.memo)((e=>{let{selectedItems:t,onItemClick:n,focusIndex:r,width:o,height:i}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["selectedItems","onItemClick","focusIndex","width","height"]);return a().createElement(C.Z,O({getItemSize:S,renderItem:(e,o,i)=>{let{item:l}=o;const s=!!t.find((e=>l.uri===e)),c=i===r;return a().createElement(E.Z,{key:l.uri,onClick:n,checked:s,data:l,label:a().createElement(w.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:o,height:i},l))}));P.displayName="SelectMetadataTypesList";const T=(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 R(){return R=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(this,arguments)}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){L(e,t,n[t])}))}return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const N=(0,r.memo)((e=>{let{placeholder:t,classes:n={},items:o,selectedItemsUris:d,onChange:p,ListLabelProps:m={},disabled:h,enableEmptyValueUnderline:g,single:f,label:E,dataReltioId:w,selectionPopupTitle:C}=e;const O=T(),[S,L]=(0,r.useState)(!1),N=(0,r.useCallback)((()=>L(!0)),[]),k=(0,r.useCallback)((()=>L(!1)),[]),[I,j]=(0,r.useState)(""),Z=(0,r.useCallback)((()=>j("")),[]),A=(0,r.useCallback)((0,l.pipe)(Z,k),[k,Z]),z=o.filter((e=>{let{label:t}=e;return s.P6Y.strings.search(t,I)})).map(((e,t)=>({item:{item:_({},e,{filterText:I})},index:t}))),D=(0,r.useMemo)((()=>d.map((e=>o.find((0,l.propEq)("uri",e)))).map((0,l.prop)("label"))),[d,o]),U=(0,r.useCallback)(((e,t)=>{f?(p(t?[e.uri]:[]),A()):p(t?d.concat(e.uri):d.filter((t=>t!==e.uri)))}),[d,p,f,A]),M=(0,r.useCallback)((e=>{let{item:t}=e;const n=!d.includes(t.uri);U(t,n)}),[d,U]),{focusIndex:B,handleKeyDown:F}=(0,x.t)({items:z,open:S,onSelectFocusedItem:M,selectedItems:d,onClose:A}),G=(0,r.useRef)(),H=G.current?G.current.getBoundingClientRect().width:0,V=Math.max(H,255),W=0===d.length;return a().createElement(a().Fragment,null,a().createElement(c.Z,{label:E,ref:G,InputProps:{startAdornment:W&&!t?null:a().createElement("div",{className:i()(O.inputText,n.inputText)},W?a().createElement("div",null,t):a().createElement(b,R({},m,{list:D}))),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:a().createElement(y.Z,{size:"L",icon:u.Z,iconClassName:i()(O.icon,{[O["popup-opened-icon"]]:S}),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:N,classes:{root:i()(O.root,n.root)},margin:"dense",variant:"filled",disabled:h,"data-reltio-id":w}),a().createElement(v.Z,{open:S,anchorEl:G.current,onClose:A,onSearch:j,title:C,containerWidth:V,containerHeight:355,searchInputOnKeyDown:F,transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"left",vertical:"bottom"},PaperProps:{"data-reltio-id":`${w}-popup`}},a().createElement(P,{items:z,onItemClick:U,selectedItems:d,width:V,height:245,focusIndex:B})))}));N.displayName="MetadataTypesSelector"},33109:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(71153),s=n.n(l),c=n(52730),u=n(17440),d=n(90436),p=n(80030),m=n(87918),h=n.n(m),g=n(22241),f=n(35674),b=n(37573),y=n(20146);const v=(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"}}}))),x=e=>{let{className:t,entity:n,children:o,classes:i}=e;const l=v({classes:i}),m=(0,c.useSelector)(f.ZP.selectors.getMetadata),x=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,g.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const E=(0,g.idV)(n.label),w=n.secondaryLabel,C=(0,g.ptG)(m,n),O=(0,g.Fn9)(n),S=n.uri,P=(0,g.BTI)(n);return a().createElement("div",{className:s()(l.profileBandWrapper,t)},a().createElement("div",{className:s()(l.profileBand,{[l.inactive]:!O}),"data-entity-uri":S},a().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:l.profileIcon,imageClassName:l.imageProfileIcon}),a().createElement("div",{className:l.profileInfo},a().createElement("div",null,a().createElement(d.Z,{variant:"h6",className:l.label},E),w&&a().createElement(d.Z,{variant:"subtitle2",className:l.secondaryLabel},w),C&&a().createElement(d.Z,{variant:"subtitle1",className:l.businessCard},C)),a().createElement("div",{className:l.specialInfo},a().createElement("div",{className:l.entityType},a().createElement(y.Z,{entity:n,size:"medium",className:l.badge}),!(0,g.ZiX)(S)&&a().createElement(p.ZP,{title:h().text("Copy to clipboard")},a().createElement(d.Z,{display:"inline",variant:"body2",className:l.entityId,onClick:x},h().text("Entity ID"),": ",P))))),o&&a().createElement("div",null,o)))};x.propTypes={className:i().string,entity:i().object,children:i().node,classes:i().object};const E=x},68977:(e,t,n)=>{n.d(t,{U:()=>c});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(22241),s=n(72108);const c=(0,r.memo)((e=>{let{relationTypes:t,selectedRelationTypes:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p={},ListLabelProps:m={},disabled:h=!1}=e;const g=(0,r.useMemo)((()=>t.filter(l.Tt2)),[t]);return a().createElement(s.S,{items:g,selectedItemsUris:n,single:o,placeholder:c,enableEmptyValueUnderline:u,onChange:d,classes:p,ListLabelProps:m,disabled:h,label:i().text("Relation type"),dataReltioId:"relation-type-selector",selectionPopupTitle:i().text("Select relation types")})}));c.displayName="RelationTypesSelector"},28101:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(39475),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 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)}function p(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:o,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:h}=s,g=p(s,["active","buttonWrapper"]);return a().createElement("div",{className:i()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return a().createElement(l.k,d({},r,{classes:g,size:"S",key:t,className:i()({[i()(c.active,m)]:n===t},c.buttonWrapper,h),onClick:()=>o(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},11821:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(24328),a=n.n(r);const o=(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=o();return a().createElement("div",{className:i.contentWrapper,style:{width:`${n?t:0}px`}},n&&a().createElement(a().Fragment,null,r))}},15177:(e,t,n)=>{n.d(t,{Z:()=>k});var r=n(52730),a=n(35674),o=n(24328),i=n.n(o),l=n(22241),s=n(71153),c=n.n(s),u=n(87918),d=n.n(u),p=n(95544),m=n(90436),h=n(80687),g=n(1730),f=n(52194),b=n(89978),y=n(26978),v=n(79692);const x=(0,v.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),E=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:u="",excludeUris:v=[],includeUris:E=[],attributesCount:w=16}=e;const C=x(),O=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),S=(0,o.useMemo)((()=>(0,y.U)(s,n.type,E,v)),[v,E,s,n.type]),P=(0,l.fyF)(S,n).filter((e=>{let{values:t}=e;return!(0,l.O27)(t)})).length>0;return P||!(0,l.O27)(u)?i().createElement(h.J.Provider,{value:O},i().createElement(g.Z,{className:t},u&&i().createElement(f.Z,{className:C.header,title:u}),i().createElement(p.Z,{className:c()(C.attributesContainer,{[C.noCaption]:!u})},P?i().createElement(b.Z,{entity:n,attrTypes:S,parentUri:n.uri,drawLines:!1,max:w}):i().createElement(m.Z,{className:C.noData},d().text("No data found"))))):null}));var w=n(17440),C=n(76141),O=n(12212),S=n(1108);const P=(0,v.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});function T(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){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:u,caption:d="",excludeUris:m=[],includeUris:h=[],pinnedAttributes:b}=e;const v=P(),x=(0,r.useDispatch)(),E=(0,o.useContext)(O.m),R=(0,r.useSelector)(a.ZP.selectors.getUserRoles),_=(0,o.useMemo)((()=>(0,l.mC3)(b,R)),[b,R]),L=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),N=(0,o.useMemo)((()=>(0,y.U)(u,L.type,h,m)),[m,h,u,L.type]),k=(0,o.useCallback)((e=>(0,w.pipe)(a.N5.actions.addAttributes,x)(e.map((e=>T({},e,{viewId:E}))))),[E,x]),I=(0,o.useCallback)((e=>(0,w.pipe)(a.N5.actions.modifyAttribute,x)(T({},e,{viewId:E}))),[E,x]),j=(0,o.useCallback)((e=>(0,w.pipe)(a.N5.actions.removeAttribute,x)(T({},e,{viewId:E}))),[E,x]);return i().createElement(g.Z,{className:t},d&&i().createElement(f.Z,{className:v.header,title:d}),i().createElement(p.Z,{className:c()(v.attributesContainer,{[v.noCaption]:!d})},i().createElement(S.c.Provider,{value:_},i().createElement(C.Z,{entity:L,attrTypes:N,parentUri:L.uri,drawLines:!1,mode:s,showEmptyEditors:(0,l.ZiX)(L.uri),crosswalks:L.crosswalks,onAddAttributes:k,onChangeAttribute:I,onDeleteAttribute:j}))))}));var L=n(10609);function N(){return N=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},N.apply(this,arguments)}const k=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=l.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return i().createElement(L.u.Provider,{value:a},(0,l.uzs)(t)?i().createElement(E,N({attributesCount:n,entity:a},o)):i().createElement(_,N({mode:t,pinnedAttributes:r,entity:a},o)))}))},32794:(e,t,n)=>{n.d(t,{R:()=>l});var r=n(24328),a=n(17440),o=n(22241);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{connection:t,onConnectionChange:n}=e;const l=(0,r.useCallback)((e=>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){i(e,t,n[t])}))}return e}({},t,{relation:e}))),[t,n]);return{onAddAttributes:(0,r.useCallback)((0,a.pipe)((0,o.zE1)(t.relation),l),[t.relation,l]),onChangeAttribute:(0,r.useCallback)((0,a.pipe)((0,o.lIv)(t.relation),l),[t.relation,l]),onRemoveAttribute:(0,r.useCallback)((0,a.pipe)((0,o.Ilm)(t.relation),l),[t.relation,l])}}},80525:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Qt});var r=n(24328),a=n.n(r),o=n(52730),i=n(36138),l=n(97333),s=n(22664),c=n(52844),u=n(35674),d=n(87378),p=n(98996),m=n(22241),h=n(87918),g=n.n(h),f=n(17440),b=n(60715),y=n(35174);const v=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,f.either)((0,f.pipe)(m.nqN,(0,f.equals)(e)),(0,f.pipe)(m.j5q,(0,f.equals)(e))));n.push(...r);const a=(0,f.pipe)(x,(0,f.without)([e]))(r);return a.forEach((e=>v(e,t,n))),n},x=e=>(0,f.pipe)((0,f.chain)((e=>[(0,m.nqN)(e),(0,m.j5q)(e)])),f.uniq)(e),E=e=>{const[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(null),l=(0,o.useDispatch)(),[s,c]=(0,r.useState)(null),[d,h]=(0,r.useState)(!1),E=null==e?void 0:e.uri,w=(0,m.biM)(e);(0,r.useEffect)((()=>(!E||(0,m.ZiX)(E)||w||(h(!0),(0,m.ZYI)({uri:E,deep:t?2:1,limitCreditsConsumption:!0,graphTypes:t?[(0,m.nIW)(t)]:null,activenessDate:null,max:t?200:3e3}).then((e=>{const t=new p.MultiGraph;((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}`)}));const a=e.entities.map((e=>({id:e.uri,name:e.label,entityTypeUri:e.type,traversedRelationsCount:e.traversedRelations,untraversedRelationsCount:e.untraversedRelations}))),o=[];return r.forEach((e=>{const[t,n,r]=e.split("--");o.push({from:t,to:n,key:r})})),{nodes:a,edges:o}})(t);n.nodes.forEach((t=>{e.hasNode(t.id)||e.addNode(t.id,{label:(0,m.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})}))})(t,e),i(t),c(e)})).catch((e=>{console.error(e),c(null),l(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Something went wrong"))))})).finally((()=>{h(!1)}))),()=>{i(null),c(null),h(!1)})),[E,w,l,t]);const C=(0,r.useCallback)((e=>{h(!0),(0,m.VGk)(e).then((()=>{a.dropEdge(e);const{updatedData:t,removedEntitiesUris:n}=((e,t,n,r)=>{const a=r.relations.find((0,f.propEq)("uri",t)),o=(0,m.nqN)(a),i=(0,m.j5q)(a),l=(0,y.toUndirected)(n),s=(0,f.cond)([[()=>!(0,b.Ar)(l,e,o),(0,f.always)(o)],[()=>!(0,b.Ar)(l,e,i),(0,f.always)(i)],[f.T,(0,f.always)(null)]])(),c=(0,f.evolve)({relations:(0,f.reject)((0,f.propEq)("uri",t))})(r),{updatedData:u,removedEntitiesUris:d}=s?((e,t)=>{const n=v(e,t),r=(0,f.pipe)(x,(0,f.append)(e),f.uniq)(n);return{updatedData:(0,f.evolve)({relations:(0,f.reject)((e=>n.includes(e))),entities:(0,f.reject)((e=>r.includes(e.uri)))})(t),removedEntitiesUris:r}})(s,c):{updatedData:c,removedEntitiesUris:[]};return{updatedData:u,removedEntitiesUris:d}})(E,e,a,s);((e,t)=>{(t||[]).forEach((t=>{e.dropNode(t)}))})(a,n),c(t)})).catch((e=>{l(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Something went wrong"))))})).finally((()=>{h(!1)}))}),[l,a,E,s]);return{graphLoading:d,data:s,graphologyGraph:a,graphTypeUri:t,setGraphTypeUri:n,onDeleteRelation:C}};var w=n(29627);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 O=(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){C(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},S=[25,50,100];function P(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)=>{const{startObject:r,endObject:a,type:o}=t,{directionalLabel:i}=(0,m.nqN)(t)===n?r:a;return i||(0,m.Lmx)(e,o)},R=(e,t,n)=>{const[a,i]=(0,r.useState)({field:"",order:"asc"}),[l,s]=(0,r.useState)(0),[c,d]=(0,r.useState)(S[0]),[p,h]=(0,r.useState)([]),[b,y]=(0,r.useState)(!1),v=(0,o.useDispatch)(),x=(0,o.useSelector)(u.ZP.selectors.getMetadata),E=(0,r.useMemo)((()=>{const t=(null==e?void 0:e.entities)||[];return(0,f.zipObj)(t.map((0,f.prop)("uri")),t)}),[null==e?void 0:e.entities]),w=(0,r.useMemo)((()=>(0,f.pipe)((0,f.filter)((0,f.either)((0,f.pipe)(m.nqN,(0,f.equals)(t)),(0,f.pipe)(m.j5q,(0,f.equals)(t)))),(0,f.uniqBy)((0,f.prop)("uri")),(0,f.map)((e=>{const n=E[((e,t)=>{const n=(0,m.nqN)(t),r=(0,m.j5q)(t);return n===e?r:n})(t,e)];return{relation:e,entity:n,entityLabel:(0,m.idV)(n.label),entityTypeLabel:(0,m.jFi)(x,n),relationTypeLabel:T(x,e,n.uri)}})))((null==e?void 0:e.relations)||[])),[e,t,E,x]),{searchText:C,onChangeSearchText:O,filters:R,onFilter:_,relationTypesOptions:L,entityTypesOptions:N}=(e=>{const[t,n]=(0,r.useState)(""),[a,i]=(0,r.useState)({entityTypesUris:[],relationTypesUris:[]}),l=(0,o.useSelector)(u.ZP.selectors.getMetadata);return{searchText:t,onChangeSearchText:n,filters:a,onFilter:i,entityTypesOptions:(0,r.useMemo)((()=>(0,f.pipe)((0,f.map)((e=>{let{entity:t}=e;return t.type})),f.uniq,(0,f.map)((0,m.nt9)(l)))(e)),[e,l]),relationTypesOptions:(0,r.useMemo)((()=>(0,f.pipe)((0,f.map)((e=>{let{relation:t}=e;return t.type})),f.uniq,(0,f.map)((0,m.V3K)(l)))(e)),[e,l])}})(w),k=(0,r.useMemo)((()=>(0,f.pipe)((0,f.filter)((e=>{let{entityLabel:t,entity:n,relation:r}=e;const{entityTypesUris:a,relationTypesUris:o}=R;return t.toLowerCase().includes(C)&&(0,f.ifElse)((0,f.prop)("length"),(0,f.includes)(r.type),f.T)(o)&&(0,f.ifElse)((0,f.prop)("length"),(0,f.includes)(n.type),f.T)(a)})),a.field?(0,f.sort)(((e,t)=>m.P6Y.strings.sort(a.order,e[a.field],t[a.field]))):f.identity)(w)),[w,a,C,R]),I=(0,r.useMemo)((()=>k.slice(l*c,l*c+c)),[k,l,c]),j=(0,r.useCallback)((e=>{y(!0),(0,m._vs)(e).then((e=>{h((t=>[...t,{initialRelation:e,relation:e}]))})).catch((e=>{v(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Can't load relationship's attributes"))))})).finally((()=>y(!1)))}),[v]),Z=(0,r.useCallback)((e=>{h((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){P(e,t,n[t])}))}return e}({},t,{relation:e}):t))))}),[]);(0,r.useEffect)((()=>{s(0),O(""),_({entityTypesUris:[],relationTypesUris:[]})}),[t,n,O,_]),(0,r.useEffect)((()=>{s(0)}),[a,C,R]);const A=(0,r.useCallback)((e=>{h((t=>t.filter((t=>t.relation.uri!==e))))}),[]),z=(0,r.useCallback)(((e,t)=>{y(!0),(0,m.HH7)({oldRelation:e,newRelation:t}).then((()=>{A(t.uri)})).catch((e=>{v(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Can't edit relationship"))))})).finally((()=>y(!1)))}),[A,v]);return{rowsData:I,onSort:i,sorting:a,searchText:C,onChangeSearchText:O,filters:R,onFilter:_,entityTypesOptions:N,relationTypesOptions:L,editingRelations:p,onStartRelationEditing:j,onCancelRelationEditing:A,onUpdateEditingRelation:Z,total:k.length,page:l,rowsPerPage:c,onPageChange:s,onRowsPerPageChange:d,onSaveEditingRelation:z,loading:b}},_=a().createContext({graphLoading:!1,data:null,graphologyGraph:null,selectedEntityLoading:!1,selectedEntity:null,onEntitySelect:()=>{},relationshipTable:{}});_.displayName="GraphStateContext";var L=n(71153),N=n.n(L),k=n(33109),I=n(62901),j=n(72316),Z=n(95544),A=n(79692);const z=(0,A.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),D=(0,r.memo)((e=>{let{className:t}=e;const n=z(),r=(0,o.useSelector)(u.ZP.selectors.getEntity);return a().createElement(k.Z,{className:N()(t,I.U),entity:r},a().createElement(Z.Z,{className:n.comments},a().createElement(j.Z,{uri:r.uri,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:r.uri}),objectType:m.q7e.ENTITY})))}));D.displayName="GraphProfileBand";const U=D;var M=n(11821),B=n(28101),F=n(82726);const G=(0,A.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(this,arguments)}const V=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["styles"]);return a().createElement("svg",H({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),a().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 W=n(50548);const q=(0,W.l)(_,(0,f.pick)(["selectedEntity"]),(e=>{let{selectedEntity:t}=e;return a().createElement(k.Z,{entity:t})}));var $=n(15177);const X=(0,A.Z)({noShadowBlock:{boxShadow:"none"},wrapper:{position:"relative",paddingRight:"1px",overflow:"auto"}}),Y=(0,W.l)(_,(0,f.pick)(["selectedEntity","selectedEntityLoading"]),(e=>{let{selectedEntity:t,selectedEntityLoading:n}=e;const r=X();return a().createElement("div",{className:r.wrapper},n&&a().createElement(d.Z,null),a().createElement($.Z,{entity:t,caption:g().text("Entity details"),className:r.noShadowBlock}))}));var K=n(90436),Q=n(42011),J=n(44443),ee=n(44938),te=n(79573);const ne="1px solid rgba(0, 0, 0, 0.05)",re=(0,A.Z)({table:{flex:1,height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},tableBody:{height:"100%",overflow:"auto"},tableBodyWrapper:{height:"100%",overflow:"hidden"},tableRowWrapper:{borderBottom:ne},tableRow:{display:"flex",alignItems:"center","& > div":{flexShrink:0}},editingRow:{paddingTop:"8px"},headRow:{borderBottom:ne}});function ae(){return ae=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},ae.apply(this,arguments)}const oe=(0,r.memo)((e=>{let{columnsData:t,sorting:n,onSort:r}=e;const o=re();return a().createElement("div",{className:N()(o.tableRow,o.headRow)},t.map((e=>{const{id:t,sortable:o,headCellRenderer:i,columnClassName:l}=e,s=i,c=o?{sortField:n.field,sortOrder:n.order,sortHandler:()=>{r({field:t,order:n.field===t?(0,te.Dh)(n.order):"asc"})}}:{};return a().createElement("div",{key:t,className:l},a().createElement(s,ae({headCellData:e},c)))})))})),ie=(0,r.forwardRef)(((e,t)=>{let{classes:n,columnsData:o,rowsData:i,sorting:l,onSort:s,getRowKey:c,ExpandedRowRenderer:u,defaultRowHeight:d}=e;const p=re(),[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 a().createElement("div",{className:N()(p.tableRowWrapper,null==n?void 0:n.tableRowWrapper)},a().createElement("div",{className:N()(p.tableRow,null==n?void 0:n.tableRow,{[p.editingRow]:i.expanded})},o.map((e=>{let{id:t,rowCellValueRenderer:n,columnClassName:r}=e;const o=n;return a().createElement("div",{key:t,className:r},a().createElement(o,{value:i[t],rowValue:i}))}))),i.expanded&&u&&a().createElement(u,{open:i.expanded,rowValue:i}))}),[o,u]),f=(0,r.useCallback)(((e,t)=>{h({width:e,height:t})}),[]),b=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,(()=>({resetScrollbarPosition:()=>{var e;null===(e=b.current)||void 0===e||e.scrollTo(0)}}))),a().createElement("div",{className:p.table},a().createElement(oe,{columnsData:o,sorting:l,onSort:s}),a().createElement("div",{className:p.tableBodyWrapper},a().createElement(J.Z,{handleHeight:!0,handleWidth:!0,onResize:f}),a().createElement("div",{className:p.tableBody},a().createElement(ee.Z,{listRef:b,width:m.width,height:m.height,data:i,defaultItemSize:d,itemKey:c,showNotMeasuredItems:!0},g))))})),le=(0,r.memo)(ie);var se=n(92332),ce=n(83088);const ue="rgba(238, 238, 238, 1)",de=(0,A.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:ue}}});function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const me={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"},he=".collapsibleTableRow:hover &",ge=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){pe(e,t,n[t])}))}return e}({},me,{[he]:{background:`linear-gradient(to right, rgba(238, 238, 238, 0), ${ue} 100%)`}}),fe=(0,A.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":me},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":ge},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",[he]:{visibility:"visible",background:ue}},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 be(){return be=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},be.apply(this,arguments)}function ye(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){ve(e,t,n[t])}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xe=e=>{let{className:t,headCellData:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["className","headCellData"]);const o=fe();return a().createElement("div",{className:N()(o.headCell,t)},a().createElement(se.default,be({},r,{headCellData:ye({},n,{label:a().createElement(ce.C,{value:n.label},a().createElement("div",{className:o.headLabel},n.label))})})))},Ee=(0,r.memo)((e=>{let{value:t="",tooltip:n,onClick:r,className:o}=e;const i=fe();return n=n||t,a().createElement(ce.C,{value:n},a().createElement("div",{className:N()(i.defaultCell,o,{[i.clickable]:!!r}),onClick:r},t))}));var we=n(37573);const Ce=(0,W.l)(_,(e=>{let{onEntitySelect:t}=e;return{onClick:t}}),(e=>{let{value:t,rowValue:{entity:n},className:r,onClick:o}=e;const i=fe(),l=a().createElement(a().Fragment,null,a().createElement(we.Z,{entity:n,avatarClassName:i.entityAvatar}),t);return a().createElement(Ee,{value:l,tooltip:t,className:N()(i.profileCell,r),onClick:()=>o(n.uri)})}));var Oe=n(77277),Se=n(32794),Pe=n(17906);const Te=(0,W.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,o.useDispatch)(),d=(0,o.useSelector)(u.ZP.selectors.getMetadata),{relation:p,initialRelation:h}=n,b=(0,r.useMemo)((()=>!(0,f.equals)(h,p)),[p,h]),y=fe(),v=(0,r.useCallback)((e=>{let{relation:t}=e;return i(t)}),[i]),x=(0,r.useCallback)((()=>l(p.uri)),[l,p.uri]),E=(0,r.useMemo)((()=>({relation:p})),[p]),{onAddAttributes:w,onChangeAttribute:C,onRemoveAttribute:O}=(0,Se.R)({connection:E,onConnectionChange:v});return t?a().createElement("div",{className:y.expandedRow},a().createElement(Pe.n,{connection:E,onAddAttributes:w,onChangeAttribute:C,onRemoveAttribute:O}),a().createElement("div",{className:y.actionButtons},a().createElement(Oe.Z,{onClick:x},g().text("Cancel")),a().createElement(Oe.Z,{color:"primary",disabled:!b,onClick:()=>{(e=>{const t=(0,m.xkB)(d,{relation:{object:e}});return c(u.N5.errors.actions.errorsSet(t)),0===t.length})(p)&&s(h,p)}},g().text("Save")))):null}));var Re=n(39475),_e=n(27604),Le=n(22983),Ne=n(22118);const ke=(0,W.l)(_,(0,f.pick)(["onDeleteRelation"]),(e=>{let{uri:t,open:n,onClose:r,onDeleteRelation:o}=e;return a().createElement(Ne.Z,{open:n,title:g().text("Do you want to make a clean break?"),content:g().text("To end this relationship, click Delete Relationship. To keep the connection, click Cancel."),saveCaption:g().text("Delete relationship"),discardCaption:g().text("Cancel"),onDiscard:r,onSave:()=>{o(t),r()}})})),Ie=(0,r.memo)((e=>{let{uri:t}=e;const[n,o]=(0,r.useState)(!1),i=(0,r.useCallback)((()=>o(!0)),[]),l=(0,r.useCallback)((()=>o(!1)),[]);return a().createElement(a().Fragment,null,a().createElement(Re.k,{icon:Le.Z,size:"XXS",tooltipTitle:g().text("Delete"),onClick:i}),a().createElement(ke,{open:n,onClose:l,uri:t}))}));Ie.displayName="DeleteRelationButton";const je=Ie,Ze=(0,W.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:o}=e;const i=fe();return a().createElement("div",{className:N()(i.controlsCell,n,{[i.editingMode]:o})},a().createElement(Re.k,{className:N()(i.editButton,{[i.hidden]:o}),icon:_e.Z,size:"XXS",tooltipTitle:g().text("Edit"),onClick:()=>r(t)}),a().createElement(je,{uri:t}))}));function Ae(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 De=(e,t)=>t[e].relation.uri||`${e}`,Ue=(0,W.l)(_,(e=>{let{relationshipTable:t}=e;return Ae({},t)}),(e=>{let{rowsData:t,sorting:n,onSort:o,total:i,page:l,rowsPerPage:s,onPageChange:c,onRowsPerPageChange:u,editingRelations:p,loading:m}=e;const h=de(),f=(0,r.useMemo)((()=>[{id:"entityLabel",label:g().text("Profile"),headCellRenderer:xe,rowCellValueRenderer:Ce,sortable:!0,columnClassName:h.profileColumn},{id:"relationTypeLabel",label:g().text("Relationship type"),headCellRenderer:xe,rowCellValueRenderer:Ee,sortable:!0,columnClassName:h.relationshipTypeColumn},{id:"entityTypeLabel",label:g().text("Entity Type"),headCellRenderer:xe,rowCellValueRenderer:Ee,sortable:!0,columnClassName:h.entityTypeColumn},{id:"controls",label:"",headCellRenderer:xe,rowCellValueRenderer:Ze}]),[h]),b=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e;null===(e=b.current)||void 0===e||e.resetScrollbarPosition()}),[t]);const y=(0,r.useMemo)((()=>t.map((e=>null!=p&&p.some((t=>{var n;return t.initialRelation.uri===(null==e||null===(n=e.relation)||void 0===n?void 0:n.uri)}))?Ae({},e,{expanded:!0}):e))),[t,p]),v=(0,r.useMemo)((()=>({tableRow:N()(h.row,"collapsibleTableRow")})),[h]);return a().createElement("div",{className:h.tableWithPagination},a().createElement("div",{className:h.tableContainer},a().createElement(le,{ref:b,columnsData:f,rowsData:y,sorting:n,onSort:o,getRowKey:De,ExpandedRowRenderer:Te,defaultRowHeight:28,classes:v})),i>S[0]&&a().createElement(Q.Z,{count:i,rowsPerPageOptions:S,rowsPerPage:s,onChangeRowsPerPage:u,page:l,onChangePage:c,basicTableRef:b}),m&&a().createElement(d.Z,null))}));var Me=n(36444),Be=n(61837),Fe=n(33662);const Ge=(0,A.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}}}))),He=(0,W.l)(_,(0,f.pipe)((0,f.prop)("relationshipTable"),(0,f.pick)(["searchText","onChangeSearchText"])),(e=>{let{searchText:t,onChangeSearchText:n}=e;const r=Ge();return a().createElement(Fe.Z,{fullWidth:!0,height:40,autofocus:!1,value:t,onSearch:n,placeholder:g().text("Search profiles"),classes:{input:r.input}})}));var Ve=n(92934),We=n(68977),qe=n(8629);const $e=(0,A.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"}}))),Xe=(0,W.l)(_,(0,f.pipe)((0,f.prop)("relationshipTable"),(0,f.pick)(["onFilter","filters","entityTypesOptions","relationTypesOptions"])),(e=>{let{open:t,onClose:n,filters:o,onFilter:i,entityTypesOptions:l,relationTypesOptions:s}=e;const c=$e(),[u,d]=(0,r.useState)([]),[p,m]=(0,r.useState)([]),h=()=>{d(o.entityTypesUris),m(o.relationTypesUris),n()};return(0,r.useEffect)((()=>{d(o.entityTypesUris),m(o.relationTypesUris)}),[o.entityTypesUris,o.relationTypesUris]),a().createElement(qe.Z,{classes:{paper:c.dialogPaper},onClose:h,open:t},a().createElement(K.Z,{className:c.title},g().text("Filter")),a().createElement(Ve.Q,{classes:{root:c.entityTypesSelector},entityTypes:l,selectedEntityTypes:u,enableEmptyValueUnderline:!0,onChange:d}),a().createElement(We.U,{classes:{root:c.relationTypesSelector},relationTypes:s,selectedRelationTypes:p,enableEmptyValueUnderline:!0,onChange:m}),a().createElement("div",{className:c.footer},a().createElement(Oe.Z,{className:c.clearAllButton,onClick:()=>{d([]),m([])}},g().text("Clear All")),a().createElement(Oe.Z,{className:c.cancelButton,onClick:h},g().text("Cancel")),a().createElement(Oe.Z,{onClick:()=>{i({entityTypesUris:u,relationTypesUris:p}),n()},color:"primary"},g().text("Apply"))))})),Ye=(0,A.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,W.l)(_,(0,f.pipe)((0,f.prop)("relationshipTable"),(0,f.pick)(["filters"])),(e=>{let{filters:t}=e;const n=Ye(),[o,i]=(0,r.useState)(!1),{entityTypesUris:l,relationTypesUris:s}=t,c=l.length||s.length;return a().createElement("div",{className:n.wrapper},a().createElement(He,null),a().createElement(Be.Z,{className:n.iconButton,onClick:()=>i(!0)},a().createElement(Me.Z,{className:c?n.activeFiltersIcon:n.inactiveFiltersIcon})),a().createElement(Xe,{open:o,onClose:()=>i(!1)}))})),Qe=(0,A.Z)({caption:{marginLeft:"16px",marginTop:"12px",marginBottom:"14px",fontSize:"16px",lineHeight:"24px"},wrapper:{flex:1,display:"flex",flexDirection:"column",height:0}}),Je=()=>{const e=Qe();return a().createElement("div",{className:e.wrapper},a().createElement(K.Z,{className:e.caption,variant:"subtitle1"},g().text("Relationships")),a().createElement(Ke,null),a().createElement(Ue,null))};let et;!function(e){e[e.Relationship=0]="Relationship",e[e.EntityDetails=1]="EntityDetails"}(et||(et={}));const tt=(0,r.memo)((()=>{var e;const t=G(),[n,o]=(0,r.useState)(null),i=(0,r.useCallback)((e=>{o((t=>t===e?null:e))}),[]),l=null!==n,s=(0,r.useMemo)((()=>[{buttonProps:{id:et.Relationship,icon:V,tooltipTitle:g().text("Relationship")},content:a().createElement(Je,null)},{buttonProps:{id:et.EntityDetails,icon:F.Z,tooltipTitle:g().text("Entity Details")},content:a().createElement(Y,null)}]),[]);return a().createElement("div",{className:t.wrapper},a().createElement(M.h,{open:l,width:480},a().createElement(q,null),null===(e=s[n])||void 0===e?void 0:e.content),a().createElement(B.G,{buttonsProps:(0,f.pluck)("buttonProps",s),onButtonClick:i,activeIndexId:n}))}));tt.displayName="GraphRightSidePanel";const nt=tt;var rt=n(46339),at=n(23304);const ot=(e,t,n)=>{var r;if(!t.label)return;const a=n.labelSize,o=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} ${a}px ${o}`,e.fillText(t.label,t.x+t.size+11,t.y+a/3)},it=(e,t,n)=>{const r=n.labelSize,a=n.labelFont,o=n.labelWeight;if(e.font=`${o} ${r}px ${a}`,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,a=Math.round(n+16),o=Math.round(r+2+4),i=Math.max(t.size,r/2)+2,l=Math.asin(o/2/i),s=Math.sqrt(Math.abs(Math.pow(i,2)-Math.pow(o/2,2)));e.beginPath(),e.moveTo(t.x+s,t.y+o/2),e.lineTo(t.x+i+a,t.y+o/2),e.lineTo(t.x+i+a,t.y-o/2),e.lineTo(t.x+s,t.y-o/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,ot(e,t,n)};var lt=n(88586);class st extends at.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 a=1*n*5;if(t||!e.inPath)return r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,void(r[a++]=0);r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,lt.floatColor)(e.color),r[a]=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 ct{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:a,size:o}=e;const i=Math.min(128,o);let l=0,s=0;(a.width||0)>(a.height||0)?l=(a.width-a.height)/2:s=(a.height-a.width)/2,n.drawImage(a,l,s,o,o,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 ut={id:"defaultImage",path:(0,m.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 dt extends at.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 ct,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(ut.id,ut.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 a=1*n*9;const o=e.image;let i=o&&this.imageLoader.images[o];if("string"!=typeof o||i||this.imageLoader.loadImage(o,o),t)return r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,void(r[a++]=0);if(r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,lt.floatColor)(e.color),r[a++]=e.inactive?1:0,i&&"ready"===i.status||(i=this.imageLoader.images[ut.id]),i&&"ready"===i.status){const{width:e,height:t}=this.imageLoader.textureImage;r[a++]=i.x/e,r[a++]=i.y/t,r[a++]=i.width/e,r[a++]=i.height/t}else r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=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 pt=[{id:"expandIcon",path:(0,m.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,m.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 mt extends at.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 ct,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 a=e.getUniformLocation(this.program,"u_atlas");if(null===a)throw new Error("NodeButtonsProgram: error while getting atlasLocation");this.atlasLocation=a,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])),pt.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 a=2*n*11;const o=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),o||0===e.untraversedRelationsCount)r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0;else{const t=this.imageLoader.images.expandIcon;if(r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,lt.floatColor)(e.color),r[a++]=e.buttonSize||0,r[a++]=c,r[a++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[a++]=t.x/e,r[a++]=t.y/n,r[a++]=t.width/e,r[a++]=t.height/n}else r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0}if(o||0===e.traversedRelationsCount)r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=0;else{const t=this.imageLoader.images.collapseIcon;if(r[a++]=e.x,r[a++]=e.y,r[a++]=e.size,r[a++]=(0,lt.floatColor)(e.color),r[a++]=e.buttonSize||0,r[a++]=-c,r[a++]=-u,t&&"ready"===t.status){const{width:e,height:n}=this.imageLoader.textureImage;r[a++]=t.x/e,r[a++]=t.y/n,r[a++]=t.width/e,r[a++]=t.height/n}else r[a++]=0,r[a++]=0,r[a++]=0,r[a++]=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 ht=e=>{let{children:t}=e;const n=(0,r.useMemo)((()=>({allowInvalidContainer:!0,defaultNodeType:"image",hoverRenderer:it,labelRenderer:ot,nodeProgramClasses:{image:(0,at.createNodeCompoundProgram)([dt,st,mt])},labelFont:"Roboto",labelSize:13,labelColor:{color:"rgba(0, 0, 0, 0.87)"}})),[]);return a().createElement(rt.C6,{graph:p.MultiGraph,style:{background:"transparent"},initialSettings:n},t)};var gt=n(28833),ft=n.n(gt),bt=n(3660),yt=n.n(bt),vt=n(28301),xt=n.n(vt),Et=n(31181),wt=n(30284);const Ct=.6,Ot=(e,t,n,r,a)=>{if(t.loop){const{size:r,color:a}=t,o=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)}}(o,i,.6*l);if(e.strokeStyle=a,e.lineWidth=r,"arrow"===t.type){const{aX:t,aY:n,vX:r,vY:c}=((e,t,n,r)=>{const a=Math.max(.5*r,5),o=Math.sqrt(Math.pow(t-e.x1,2)+Math.pow(n-e.y1,2));return{aX:e.x1+(t-e.x1)*(o-a-r)/o,aY:e.y1+(n-e.y1)*(o-a-r)/o,vX:(t-e.x1)*a/o,vY:(n-e.y1)*a/o}})(s,o,i,l);e.beginPath(),e.moveTo(o,i),e.bezierCurveTo(s.x2,s.y2,s.x1,s.y1,t,n),e.stroke(),e.fillStyle=a,e.beginPath(),e.moveTo(t+r,n+c),e.lineTo(t+c*Ct,n-r*Ct),e.lineTo(t-c*Ct,n+r*Ct),e.lineTo(t+r,n+c),e.closePath(),e.fill()}else e.beginPath(),e.moveTo(o,i),e.bezierCurveTo(s.x1,s.y1,s.x2,s.y2,o,i),e.stroke()}(0,wt.default)(e,t,n,r,a)};function St(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){Pt(e,t,n[t])}))}return e}function Pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Tt=(0,f.memoizeWith)(((e,t,n)=>n.type),m.uie),Rt={size:24,buttonSize:8,buttonOffset:[19,19]},_t={size:12,buttonSize:6,buttonOffset:[8,13]},Lt=e=>{let{data:t,graph:n,syncLayout:a,workerLayout:i,layoutSettings:l,selectedNode:s,onNodeClick:c}=e;const d=(0,rt.Ys)(),p=(0,rt.sG)(),m=(0,rt.$j)(),h=(0,rt.eP)(),g=(0,o.useSelector)(u.ZP.selectors.getEntity),f=(0,o.useSelector)(u.ZP.selectors.getMetadata),v=(0,o.useSelector)(u.ZP.selectors.getAbsoluteImagePath)||"",[x,E]=(0,r.useState)(void 0),[w,C]=(0,r.useState)(null),[O,S]=(0,r.useState)({});(0,r.useEffect)((()=>{d.getCamera().setState({ratio:1.2})}),[n,d]),(0,r.useEffect)((()=>{if(C((0,y.toUndirected)(n)),p(n),a){const e=a(d.getGraph(),l);(0,Et.animateNodes)(d.getGraph(),e,{duration:1e3})}if(i){const e=new i(d.getGraph(),l);e.start();const t=setTimeout((()=>{e.stop()}),5e3);return()=>{clearTimeout(t),e.kill()}}}),[t,n,a,i,d,l,p]);const P=(0,r.useCallback)((e=>{const t=d.getGraph(),n=null==g?void 0:g.uri;if(t&&w&&n&&e&&n!==e){const r=(0,b.Ar)(w,n,e),a=((e,t)=>{const n=[];return t&&t.reduce(((t,r)=>(n.push(e.findEdge(t,r,(e=>!!e))||e.findEdge(r,t,(e=>!!e))),r))),n})(t,r);return{edges:a,nodes:r}}return{}}),[d,null==g?void 0:g.uri,w]);(0,r.useEffect)((()=>{S(P(s))}),[s,P]),(0,r.useEffect)((()=>{m({enterNode:e=>{let{node:t}=e;E(t)},leaveNode:()=>{E(void 0)},clickNode:e=>{let{node:t}=e;c(t)}})}),[d,m,c]),(0,r.useEffect)((()=>{const e=d.getGraph(),t=e.neighbors(s);h({nodeReducer:(e,n)=>{const r=Tt(f,v,{type:n.entityTypeUri}),a=St({},n,e===s?Rt:_t,{color:"#0072CE",image:r}),o=(O.nodes||[]).includes(e),i=x===e;return o||e===s?a.inPath=!0:!t||t.includes(e)||s===e||s===(null==g?void 0:g.uri)||o||(i||(a.label=""),a.inactive=!0),i&&(a.highlighted=!0),a},edgeReducer:(t,n)=>{const r=St({},n,{hidden:!1}),a=(O.edges||[]).includes(t);return!s||s===(null==g?void 0:g.uri)||e.hasExtremity(t,s)||a||(r.hidden=!0),a&&(r.color="#0072CE",r.size=4),r},renderEdgeLabels:!0,edgeLabelRenderer:Ot})}),[d,h,x,s,O,null==g?void 0:g.uri,f,v])};function Nt(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 It=e=>{let{data:t,graph:n,selectedNode:a,onNodeClick:o}=e;const i=(0,r.useMemo)((()=>(ft().assign(n),{settings:Nt({},yt().inferSettings(n),{gravity:1})})),[n]);return Lt({workerLayout:xt(),layoutSettings:i,data:t,graph:n,selectedNode:a,onNodeClick:o}),null};var jt=n(36039);let Zt;!function(e){e.SIMPLE_NETWORK="Simple network",e.VERTICAL_TB="Vertical hierarchy",e.HORIZONTAL_LR="Horizontal hierarchy"}(Zt||(Zt={}));const At=(e,t,n,r)=>{const a=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)||a.add(r.to)}))})),a.size&&t.push(Array.from(a)),((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})(a,r,n)?At(a,t,n,r):t},zt=(e,t,n,r)=>{if(e.length<10&&(t[r]=[...e]),e.length>10){const a=e.slice(10),o=e.slice(0,10);t[r]=o,t[r+1]=n[r+1]?[...n[r+1],...a]:a}if(t[r+1]||n[r+1]){const e=t[++r]||n[r];return zt(e,t,n,r)}return t};function Dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ut=e=>{let{data:t,graph:n,selectedNode:a,layout:o,onNodeClick:i}=e;const l=(0,r.useCallback)((e=>{const t=e.copy(),n=(e=>{switch(e){case Zt.VERTICAL_TB:return 180;case Zt.HORIZONTAL_LR:return 270}})(o),r=((e,t)=>{const n=e.nodes,r=e.edges.filter((e=>e.from!==e.to)),a=((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),o=At(a,[],new Set,r);return zt(o[0],[],o,0)})((e=>({nodes:e.nodes().map((e=>({id:e,name:""}))),edges:e.mapEdges(((e,t,n,r)=>({from:n,to:r,key:e})))}))(t),a),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 jt.rotation.assign(t,n,{degrees:!0}),t.reduceNodes(((e,t,n)=>{let{x:r,y:a}=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){Dt(e,t,n[t])}))}return e}({},e,{[t]:{x:r,y:a}})}),{})}),[o,a]);return Lt({syncLayout:l,data:t,graph:n,selectedNode:a,onNodeClick:i}),null};var Mt=n(84425);const Bt=(0,A.Z)({graphTypeSelector:{minWidth:"200px",backgroundColor:"#FAFAFA",opacity:1,height:"40px"},filledInputRoot:{borderRadius:"4px"},valueContainer:{width:"auto",marginLeft:"16px"}}),Ft=(0,W.l)(_,(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;return{setGraphTypeUri:n,graphTypeUri:t}}),(e=>{let{graphTypeUri:t,setGraphTypeUri:n}=e;const i=Bt(),l=(0,o.useSelector)(u.ZP.selectors.getMetadata),s=(0,o.useSelector)(u.ZP.selectors.getEntity),c=(0,r.useMemo)((()=>[{label:g().text("All"),value:null},...(0,m.mmY)(l,s.type).map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))]),[s,l]),d=(0,r.useMemo)((()=>c.find((e=>e.value===t))),[c,t]);return a().createElement(Mt.Z,{classes:{valueContainer:i.valueContainer},className:i.graphTypeSelector,height:42,label:g().text("Graph type"),value:d,options:c,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:i.filledInputRoot}}}})})),Gt=(0,A.Z)({graphLayoutSelector:{minWidth:"202px",backgroundColor:"#FAFAFA",opacity:1,marginLeft:"10px"},filledInputRoot:{borderRadius:"4px",height:"42px"}}),Ht=(0,r.memo)((e=>{let{value:t,onChangeHandler:n}=e;const r=Gt(),o=[{label:g().text("Simple network"),value:Zt.SIMPLE_NETWORK},{label:g().text("Vertical hierarchy"),value:Zt.VERTICAL_TB},{label:g().text("Horizontal hierarchy"),value:Zt.HORIZONTAL_LR}];return a().createElement(Mt.Z,{className:r.graphLayoutSelector,label:g().text("Graph layout"),value:o.find((0,f.propEq)("value",t)),options:o,onChange:e=>n(e.value),TextFieldProps:{InputProps:{disableUnderline:!0,classes:{root:r.filledInputRoot}}}})})),Vt=(0,A.Z)({wrapper:{height:"100%",position:"relative"},selectors:{display:"flex",position:"absolute",top:"12px",right:"16px",zIndex:2},graph:{height:"calc(100% - 5px)"}});function Wt(){return Wt=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},Wt.apply(this,arguments)}const qt=(0,W.l)(_,(e=>{let{data:t,graphologyGraph:n,selectedEntity:r,onEntitySelect:a}=e;return{data:t,graph:n,selectedNode:null==r?void 0:r.uri,onNodeSelect:a}}),(e=>{let{data:t,graph:n,selectedNode:o,onNodeSelect:i}=e;const[l,s]=(0,r.useState)(Zt.SIMPLE_NETWORK),c=Vt(),u={data:t,graph:n,selectedNode:o,onNodeClick:i};return a().createElement("div",{className:c.wrapper},a().createElement("div",{className:c.selectors},a().createElement(Ft,null),a().createElement(Ht,{value:l,onChangeHandler:s})),a().createElement("div",{className:c.graph},n&&a().createElement(ht,null,l===Zt.SIMPLE_NETWORK?a().createElement(It,u):a().createElement(Ut,Wt({},u,{layout:l})))))})),$t=(0,A.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"}}))),Xt=(0,r.memo)((()=>{const e=$t(),t=(0,o.useSelector)(u.ZP.selectors.getEntity),n=(e=>{const{graphLoading:t,data:n,graphologyGraph:a,graphTypeUri:i,setGraphTypeUri:l,onDeleteRelation:s}=E(e),{selectedEntity:c,onEntitySelect:d,selectedEntityLoading:p}=((e,t)=>{const n=(0,w._)(),a=(0,o.useDispatch)(),[i,l]=(0,r.useState)(null),s=(0,r.useRef)({}),[c,d]=(0,r.useState)(!1),p=(0,r.useCallback)((e=>{const t=s.current[e];return t?Promise.resolve(t):(0,m.HvW)(e).then((e=>(s.current=O(s.current,e),e)))}),[]),h=(0,r.useCallback)((e=>{var r;const o=null==t||null===(r=t.entities)||void 0===r?void 0:r.find((0,f.propEq)("uri",e));o&&l(o),d(!0),n(p(e)).then(l).catch((e=>{a(u.ui.actions.errorSet((0,m.xU7)(e,g().text("Something went wrong"))))})).finally((()=>{d(!1)}))}),[a,t,n,p]);return(0,r.useEffect)((()=>{null!=e&&e.uri&&(s.current=O({},e),h(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=O({},e),h(e.uri)):(s.current={},l(null)))}),[t]),{selectedEntityLoading:c,selectedEntity:i,onEntitySelect:h}})(e,n);return{graphLoading:t,data:n,graphologyGraph:a,onDeleteRelation:s,selectedEntity:c,onEntitySelect:d,selectedEntityLoading:p,graphTypeUri:i,setGraphTypeUri:l,relationshipTable:R(n,null==c?void 0:c.uri,i)}})(t),{graphLoading:i}=n;return a().createElement(_.Provider,{value:n},a().createElement("div",{className:e.perspectiveView},i&&a().createElement(d.Z,null),(null==t?void 0:t.uri)&&a().createElement("div",{className:e.graphContainer},a().createElement("div",{className:e.graphWrapper},a().createElement(U,null),a().createElement(qt,null)),a().createElement(nt,null))))}));Xt.displayName="GraphPerspectiveView";const Yt=Xt,Kt=(0,i.createGenerateClassName)({productionPrefix:"graph",disableGlobal:!0}),Qt=e=>{let{store:t}=e;return a().createElement(o.Provider,{store:t},a().createElement(i.StylesProvider,{generateClassName:Kt},a().createElement(s.MuiPickersUtilsProvider,{utils:c.Z},a().createElement(Yt,null),a().createElement(l.Z,{showErrorFromStore:!0}))))}}}]);
package/5406.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5406],{24276:(e,t,a)=>{a.d(t,{Z:()=>d});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(97580),s=n.forwardRef((function(e,t){var a=e.classes,l=e.className,s=e.color,d=void 0===s?"inherit":s,u=e.component,m=void 0===u?"span":u,p=e.fontSize,v=void 0===p?"default":p,f=(0,o.Z)(e,["classes","className","color","component","fontSize"]);return n.createElement(m,(0,r.Z)({className:(0,i.Z)("material-icons",a.root,l,"inherit"!==d&&a["color".concat((0,c.Z)(d))],"default"!==v&&a["fontSize".concat((0,c.Z)(v))]),"aria-hidden":!0,ref:t},f))}));s.muiName="Icon";const d=(0,l.Z)((function(e){return{root:{userSelect:"none",fontSize:e.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(36)}}}),{name:"MuiIcon"})(s)},11433:(e,t,a)=>{a.d(t,{Z:()=>z});var r=a(11720),o=a(85354),n=a(54530),i=a(7560),l=a(24328),c=(a(13980),a(6277)),s=a(15459),d=a(60364),u=a(41128),m=a(54736),p=a(8732),v=a(74718),f=a(85974),b=a(97580),h=a(24514);const g=(0,s.Z)((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:(0,i.Z)({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,a=e.classes,r=e.className,o=e.open,n=e.value,i=e.valueLabelDisplay;return"off"===i?t:l.cloneElement(t,{className:(0,c.Z)(t.props.className,(o||"on"===i)&&a.open,a.thumb)},l.createElement("span",{className:(0,c.Z)(a.offset,r)},l.createElement("span",{className:a.circle},l.createElement("span",{className:a.label},n))))}));function x(e,t){return e-t}function y(e,t,a){return Math.min(Math.max(t,e),a)}function Z(e,t){return e.reduce((function(e,a,r){var o=Math.abs(t-a);return null===e||o<e.distance||o===e.distance?{distance:o,index:r}:e}),null).index}function L(e,t){if(void 0!==t.current&&e.changedTouches){for(var a=0;a<e.changedTouches.length;a+=1){var r=e.changedTouches[a];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function w(e,t,a){return 100*(e-t)/(a-t)}function E(e,t,a){var r=Math.round((e-a)/t)*t+a;return Number(r.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),a=t[0].split(".")[1];return(a?a.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function N(e){var t=e.values,a=e.source,r=e.newValue,o=e.index;if(t[o]===r)return a;var n=t.slice();return n[o]=r,n}function k(e){var t=e.sliderRef,a=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===a||t.current.querySelector('[role="slider"][data-index="'.concat(a,'"]')).focus(),r&&r(a)}var S={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},C=function(e){return e},R=l.forwardRef((function(e,t){var a=e["aria-label"],s=e["aria-labelledby"],u=e["aria-valuetext"],R=e.classes,z=e.className,$=e.color,A=void 0===$?"primary":$,T=e.component,I=void 0===T?"span":T,M=e.defaultValue,V=e.disabled,D=void 0!==V&&V,F=e.getAriaLabel,H=e.getAriaValueText,P=e.marks,B=void 0!==P&&P,O=e.max,U=void 0===O?100:O,j=e.min,W=void 0===j?0:j,_=e.name,X=e.onChange,Y=e.onChangeCommitted,q=e.onMouseDown,K=e.orientation,G=void 0===K?"horizontal":K,J=e.scale,Q=void 0===J?C:J,ee=e.step,te=void 0===ee?1:ee,ae=e.ThumbComponent,re=void 0===ae?"span":ae,oe=e.track,ne=void 0===oe?"normal":oe,ie=e.value,le=e.ValueLabelComponent,ce=void 0===le?g:le,se=e.valueLabelDisplay,de=void 0===se?"off":se,ue=e.valueLabelFormat,me=void 0===ue?C:ue,pe=(0,n.Z)(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),ve=(0,d.Z)(),fe=l.useRef(),be=l.useState(-1),he=be[0],ge=be[1],xe=l.useState(-1),ye=xe[0],Ze=xe[1],Le=(0,h.Z)({controlled:ie,default:M,name:"Slider"}),we=(0,o.Z)(Le,2),Ee=we[0],Ne=we[1],ke=Array.isArray(Ee),Se=ke?Ee.slice().sort(x):[Ee];Se=Se.map((function(e){return y(e,W,U)}));var Ce=!0===B&&null!==te?(0,r.Z)(Array(Math.floor((U-W)/te)+1)).map((function(e,t){return{value:W+te*t}})):B||[],Re=(0,m.Z)(),ze=Re.isFocusVisible,$e=Re.onBlurVisible,Ae=Re.ref,Te=l.useState(-1),Ie=Te[0],Me=Te[1],Ve=l.useRef(),De=(0,f.Z)(Ae,Ve),Fe=(0,f.Z)(t,De),He=(0,v.Z)((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));ze(e)&&Me(t),Ze(t)})),Pe=(0,v.Z)((function(){-1!==Ie&&(Me(-1),$e()),Ze(-1)})),Be=(0,v.Z)((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));Ze(t)})),Oe=(0,v.Z)((function(){Ze(-1)})),Ue="rtl"===ve.direction,je=(0,v.Z)((function(e){var t,a=Number(e.currentTarget.getAttribute("data-index")),r=Se[a],o=(U-W)/10,n=Ce.map((function(e){return e.value})),i=n.indexOf(r),l=Ue?"ArrowLeft":"ArrowRight",c=Ue?"ArrowRight":"ArrowLeft";switch(e.key){case"Home":t=W;break;case"End":t=U;break;case"PageUp":te&&(t=r+o);break;case"PageDown":te&&(t=r-o);break;case l:case"ArrowUp":t=te?r+te:n[i+1]||n[n.length-1];break;case c:case"ArrowDown":t=te?r-te:n[i-1]||n[0];break;default:return}if(e.preventDefault(),te&&(t=E(t,te,W)),t=y(t,W,U),ke){var s=t;t=N({values:Se,source:Ee,newValue:t,index:a}).sort(x),k({sliderRef:Ve,activeIndex:t.indexOf(s)})}Ne(t),Me(a),X&&X(e,t),Y&&Y(e,t)})),We=l.useRef(),_e=G;Ue&&"vertical"!==G&&(_e+="-reverse");var Xe=function(e){var t,a,r=e.finger,o=e.move,n=void 0!==o&&o,i=e.values,l=e.source,c=Ve.current.getBoundingClientRect(),s=c.width,d=c.height,u=c.bottom,m=c.left;if(t=0===_e.indexOf("vertical")?(u-r.y)/d:(r.x-m)/s,-1!==_e.indexOf("-reverse")&&(t=1-t),a=function(e,t,a){return(a-t)*e+t}(t,W,U),te)a=E(a,te,W);else{var p=Ce.map((function(e){return e.value}));a=p[Z(p,a)]}a=y(a,W,U);var v=0;if(ke){var f=a;v=(a=N({values:i,source:l,newValue:a,index:v=n?We.current:Z(i,a)}).sort(x)).indexOf(f),We.current=v}return{newValue:a,activeIndex:v}},Ye=(0,v.Z)((function(e){var t=L(e,fe);if(t){var a=Xe({finger:t,move:!0,values:Se,source:Ee}),r=a.newValue,o=a.activeIndex;k({sliderRef:Ve,activeIndex:o,setActive:ge}),Ne(r),X&&X(e,r)}})),qe=(0,v.Z)((function(e){var t=L(e,fe);if(t){var a=Xe({finger:t,values:Se,source:Ee}).newValue;ge(-1),"touchend"===e.type&&Ze(-1),Y&&Y(e,a),fe.current=void 0;var r=(0,p.Z)(Ve.current);r.removeEventListener("mousemove",Ye),r.removeEventListener("mouseup",qe),r.removeEventListener("touchmove",Ye),r.removeEventListener("touchend",qe)}})),Ke=(0,v.Z)((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(fe.current=t.identifier);var a=L(e,fe),r=Xe({finger:a,values:Se,source:Ee}),o=r.newValue,n=r.activeIndex;k({sliderRef:Ve,activeIndex:n,setActive:ge}),Ne(o),X&&X(e,o);var i=(0,p.Z)(Ve.current);i.addEventListener("touchmove",Ye),i.addEventListener("touchend",qe)}));l.useEffect((function(){var e=Ve.current;e.addEventListener("touchstart",Ke);var t=(0,p.Z)(e);return function(){e.removeEventListener("touchstart",Ke),t.removeEventListener("mousemove",Ye),t.removeEventListener("mouseup",qe),t.removeEventListener("touchmove",Ye),t.removeEventListener("touchend",qe)}}),[qe,Ye,Ke]);var Ge=(0,v.Z)((function(e){q&&q(e),e.preventDefault();var t=L(e,fe),a=Xe({finger:t,values:Se,source:Ee}),r=a.newValue,o=a.activeIndex;k({sliderRef:Ve,activeIndex:o,setActive:ge}),Ne(r),X&&X(e,r);var n=(0,p.Z)(Ve.current);n.addEventListener("mousemove",Ye),n.addEventListener("mouseup",qe)})),Je=w(ke?Se[0]:W,W,U),Qe=w(Se[Se.length-1],W,U)-Je,et=(0,i.Z)({},S[_e].offset(Je),S[_e].leap(Qe));return l.createElement(I,(0,i.Z)({ref:Fe,className:(0,c.Z)(R.root,R["color".concat((0,b.Z)(A))],z,D&&R.disabled,Ce.length>0&&Ce.some((function(e){return e.label}))&&R.marked,!1===ne&&R.trackFalse,"vertical"===G&&R.vertical,"inverted"===ne&&R.trackInverted),onMouseDown:Ge},pe),l.createElement("span",{className:R.rail}),l.createElement("span",{className:R.track,style:et}),l.createElement("input",{value:Se.join(","),name:_,type:"hidden"}),Ce.map((function(e,t){var a,r=w(e.value,W,U),o=S[_e].offset(r);return a=!1===ne?-1!==Se.indexOf(e.value):"normal"===ne&&(ke?e.value>=Se[0]&&e.value<=Se[Se.length-1]:e.value<=Se[0])||"inverted"===ne&&(ke?e.value<=Se[0]||e.value>=Se[Se.length-1]:e.value>=Se[0]),l.createElement(l.Fragment,{key:e.value},l.createElement("span",{style:o,"data-index":t,className:(0,c.Z)(R.mark,a&&R.markActive)}),null!=e.label?l.createElement("span",{"aria-hidden":!0,"data-index":t,style:o,className:(0,c.Z)(R.markLabel,a&&R.markLabelActive)},e.label):null)})),Se.map((function(e,t){var r=w(e,W,U),o=S[_e].offset(r);return l.createElement(ce,{key:t,valueLabelFormat:me,valueLabelDisplay:de,className:R.valueLabel,value:"function"==typeof me?me(Q(e),t):me,index:t,open:ye===t||he===t||"on"===de,disabled:D},l.createElement(re,{className:(0,c.Z)(R.thumb,R["thumbColor".concat((0,b.Z)(A))],he===t&&R.active,D&&R.disabled,Ie===t&&R.focusVisible),tabIndex:D?null:0,role:"slider",style:o,"data-index":t,"aria-label":F?F(t):a,"aria-labelledby":s,"aria-orientation":G,"aria-valuemax":Q(U),"aria-valuemin":Q(W),"aria-valuenow":Q(e),"aria-valuetext":H?H(Q(e),t):u,onKeyDown:je,onFocus:He,onBlur:Pe,onMouseOver:Be,onMouseLeave:Oe}))})))}));const z=(0,s.Z)((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?(0,u.$n)(e.palette.primary.main,.62):(0,u._j)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat((0,u.U1)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat((0,u.U1)(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat((0,u.U1)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat((0,u.U1)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:(0,i.Z)({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(R)},31377:(e,t,a)=>{a.d(t,{Z:()=>s});var r=a(7560),o=a(54530),n=a(24328),i=(a(48570),a(13980),a(6277)),l=a(15459),c=n.forwardRef((function(e,t){var a=e.active,l=void 0!==a&&a,c=e.alternativeLabel,s=e.children,d=e.classes,u=e.className,m=e.completed,p=void 0!==m&&m,v=e.connector,f=e.disabled,b=void 0!==f&&f,h=e.expanded,g=void 0!==h&&h,x=e.index,y=e.last,Z=e.orientation,L=(0,o.Z)(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","expanded","index","last","orientation"]),w=v?n.cloneElement(v,{orientation:Z,alternativeLabel:c,index:x,active:l,completed:p,disabled:b}):null,E=n.createElement("div",(0,r.Z)({className:(0,i.Z)(d.root,d[Z],u,c&&d.alternativeLabel,p&&d.completed),ref:t},L),w&&c&&0!==x?w:null,n.Children.map(s,(function(e){return n.isValidElement(e)?n.cloneElement(e,(0,r.Z)({active:l,alternativeLabel:c,completed:p,disabled:b,expanded:g,last:y,icon:x+1,orientation:Z},e.props)):null})));return w&&!c&&0!==x?n.createElement(n.Fragment,null,w,E):E}));const s=(0,l.Z)({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(c)},97136:(e,t,a)=>{a.d(t,{Z:()=>m});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(57074),s=a(34546),d=a(33996),u=n.forwardRef((function(e,t){var a=e.active,l=e.alternativeLabel,u=e.children,m=e.classes,p=e.className,v=e.completed,f=e.disabled,b=(e.expanded,e.icon),h=(e.last,e.optional),g=e.orientation,x=(0,o.Z)(e,["active","alternativeLabel","children","classes","className","completed","disabled","expanded","icon","last","optional","orientation"]),y={active:a,alternativeLabel:l,completed:v,disabled:f,icon:b,optional:h,orientation:g},Z=(0,d.Z)(u,["StepLabel"])?n.cloneElement(u,y):n.createElement(s.Z,y,u);return n.createElement(c.Z,(0,r.Z)({focusRipple:!0,disabled:f,TouchRippleProps:{className:m.touchRipple},className:(0,i.Z)(m.root,m[g],p),ref:t},x),Z)}));const m=(0,l.Z)({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(u)},1707:(e,t,a)=>{a.d(t,{Z:()=>s});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=n.forwardRef((function(e,t){var a=e.active,l=e.alternativeLabel,c=void 0!==l&&l,s=e.classes,d=e.className,u=e.completed,m=e.disabled,p=(e.index,e.orientation),v=void 0===p?"horizontal":p,f=(0,o.Z)(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return n.createElement("div",(0,r.Z)({className:(0,i.Z)(s.root,s[v],d,c&&s.alternativeLabel,a&&s.active,u&&s.completed,m&&s.disabled),ref:t},f),n.createElement("span",{className:(0,i.Z)(s.line,{horizontal:s.lineHorizontal,vertical:s.lineVertical}[v])}))}));const s=(0,l.Z)((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(c)},30594:(e,t,a)=>{a.d(t,{Z:()=>m});var r=a(24328),o=(a(13980),a(6277)),n=a(3752);const i=(0,n.Z)(r.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),l=(0,n.Z)(r.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");var c=a(15459),s=a(72379),d=r.createElement("circle",{cx:"12",cy:"12",r:"12"}),u=r.forwardRef((function(e,t){var a=e.completed,n=void 0!==a&&a,c=e.icon,u=e.active,m=void 0!==u&&u,p=e.error,v=void 0!==p&&p,f=e.classes;if("number"==typeof c||"string"==typeof c){var b=(0,o.Z)(f.root,m&&f.active,v&&f.error,n&&f.completed);return v?r.createElement(l,{className:b,ref:t}):n?r.createElement(i,{className:b,ref:t}):r.createElement(s.Z,{className:b,ref:t},d,r.createElement("text",{className:f.text,x:"12",y:"16",textAnchor:"middle"},c))}return c}));const m=(0,c.Z)((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$completed":{color:e.palette.primary.main},"&$active":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(u)},34546:(e,t,a)=>{a.d(t,{Z:()=>u});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(90436),s=a(30594),d=n.forwardRef((function(e,t){var a=e.active,l=void 0!==a&&a,d=e.alternativeLabel,u=void 0!==d&&d,m=e.children,p=e.classes,v=e.className,f=e.completed,b=void 0!==f&&f,h=e.disabled,g=void 0!==h&&h,x=e.error,y=void 0!==x&&x,Z=(e.expanded,e.icon),L=(e.last,e.optional),w=e.orientation,E=void 0===w?"horizontal":w,N=e.StepIconComponent,k=e.StepIconProps,S=(0,o.Z)(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","expanded","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),C=N;return Z&&!C&&(C=s.Z),n.createElement("span",(0,r.Z)({className:(0,i.Z)(p.root,p[E],v,g&&p.disabled,u&&p.alternativeLabel,y&&p.error),ref:t},S),Z||C?n.createElement("span",{className:(0,i.Z)(p.iconContainer,u&&p.alternativeLabel)},n.createElement(C,(0,r.Z)({completed:b,active:l,error:y,icon:Z},k))):null,n.createElement("span",{className:p.labelContainer},m?n.createElement(c.Z,{variant:"body2",component:"span",display:"block",className:(0,i.Z)(p.label,u&&p.alternativeLabel,b&&p.completed,l&&p.active,y&&p.error)},m):null,L))}));d.muiName="StepLabel";const u=(0,l.Z)((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(d)},31625:(e,t,a)=>{a.d(t,{Z:()=>m});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(27556),s=a(1707),d=n.createElement(s.Z,null),u=n.forwardRef((function(e,t){var a=e.activeStep,l=void 0===a?0:a,s=e.alternativeLabel,u=void 0!==s&&s,m=e.children,p=e.classes,v=e.className,f=e.connector,b=void 0===f?d:f,h=e.nonLinear,g=void 0!==h&&h,x=e.orientation,y=void 0===x?"horizontal":x,Z=(0,o.Z)(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),L=n.isValidElement(b)?n.cloneElement(b,{orientation:y}):null,w=n.Children.toArray(m),E=w.map((function(e,t){var a={index:t,active:!1,completed:!1,disabled:!1};return l===t?a.active=!0:!g&&l>t?a.completed=!0:!g&&l<t&&(a.disabled=!0),n.cloneElement(e,(0,r.Z)({alternativeLabel:u,connector:L,last:t+1===w.length,orientation:y},a,e.props))}));return n.createElement(c.Z,(0,r.Z)({square:!0,elevation:0,className:(0,i.Z)(p.root,p[y],v,u&&p.alternativeLabel),ref:t},Z),E)}));const m=(0,l.Z)({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(u)},37390:(e,t,a)=>{a.d(t,{Z:()=>u});var r=a(54530),o=a(7560),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(98287),s="table",d=n.forwardRef((function(e,t){var a=e.classes,l=e.className,d=e.component,u=void 0===d?s:d,m=e.padding,p=void 0===m?"default":m,v=e.size,f=void 0===v?"medium":v,b=e.stickyHeader,h=void 0!==b&&b,g=(0,r.Z)(e,["classes","className","component","padding","size","stickyHeader"]),x=n.useMemo((function(){return{padding:p,size:f,stickyHeader:h}}),[p,f,h]);return n.createElement(c.Z.Provider,{value:x},n.createElement(u,(0,o.Z)({role:u===s?null:"table",ref:t,className:(0,i.Z)(a.root,l,h&&a.stickyHeader)},g)))}));const u=(0,l.Z)((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,o.Z)({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(d)},97485:(e,t,a)=>{a.d(t,{Z:()=>m});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(49456),s={variant:"body"},d="tbody",u=n.forwardRef((function(e,t){var a=e.classes,l=e.className,u=e.component,m=void 0===u?d:u,p=(0,o.Z)(e,["classes","className","component"]);return n.createElement(c.Z.Provider,{value:s},n.createElement(m,(0,r.Z)({className:(0,i.Z)(a.root,l),ref:t,role:m===d?null:"rowgroup"},p)))}));const m=(0,l.Z)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(u)},91256:(e,t,a)=>{a.d(t,{Z:()=>s});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=n.forwardRef((function(e,t){var a=e.classes,l=e.className,c=e.component,s=void 0===c?"div":c,d=(0,o.Z)(e,["classes","className","component"]);return n.createElement(s,(0,r.Z)({ref:t,className:(0,i.Z)(a.root,l)},d))}));const s=(0,l.Z)({root:{width:"100%",overflowX:"auto"}},{name:"MuiTableContainer"})(c)},58987:(e,t,a)=>{a.d(t,{Z:()=>m});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(49456),s={variant:"head"},d="thead",u=n.forwardRef((function(e,t){var a=e.classes,l=e.className,u=e.component,m=void 0===u?d:u,p=(0,o.Z)(e,["classes","className","component"]);return n.createElement(c.Z.Provider,{value:s},n.createElement(m,(0,r.Z)({className:(0,i.Z)(a.root,l),ref:t,role:m===d?null:"rowgroup"},p)))}));const m=(0,l.Z)({root:{display:"table-header-group"}},{name:"MuiTableHead"})(u)},89571:(e,t,a)=>{a.d(t,{Z:()=>u});var r=a(7560),o=a(54530),n=a(24328),i=(a(13980),a(6277)),l=a(15459),c=a(49456),s=a(41128),d=n.forwardRef((function(e,t){var a=e.classes,l=e.className,s=e.component,d=void 0===s?"tr":s,u=e.hover,m=void 0!==u&&u,p=e.selected,v=void 0!==p&&p,f=(0,o.Z)(e,["classes","className","component","hover","selected"]),b=n.useContext(c.Z);return n.createElement(d,(0,r.Z)({ref:t,className:(0,i.Z)(a.root,l,b&&{head:a.head,footer:a.footer}[b.variant],m&&a.hover,v&&a.selected),role:"tr"===d?null:"row"},f))}));const u=(0,l.Z)((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:(0,s.U1)(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(d)}}]);