@reltio/remotes 1.4.1090 → 1.4.1091

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/5884.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5884],{97991:(e,t,r)=>{r.d(t,{Z:()=>u});var n,a=r(94079),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(n||(n={}));const u=e=>{let{className:t,icon:r,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(r?n.ICON_MODE:n.TEXT_MODE)}),[r,l]);const b=()=>{m(n.ERROR_MODE)};switch(d){case n.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:r,onError:b},p));case n.TEXT_MODE:case n.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},74402:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r(17440),l=r(30830);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},s=()=>{const[e,t]=(0,n.useState)({}),r=(0,n.useRef)({}),s=(0,n.useCallback)((0,l.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({},r.current))})),[]),c=(0,n.useCallback)((()=>{r.current={}}),[]);return{getDynamicRowCellHeight:(0,n.useCallback)((0,a.pipe)(i,(0,a.prop)(a.__,e)),[e]),changeRowCellHeight:(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(((e,t)=>{r.current[e]=t}),s),[i,a.identity])),[]),clearHeightsCache:c}}},97946:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(44443),s=r(94079),c=r(20562);const u=e=>{let{onChangeHeight:t,children:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const o=(0,n.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=l,b=t({rowIndex:p,cellIndex:m,columnData:d}),g=()=>o.current&&b(o.current.clientHeight);return(0,c.D)(g,[u.rawValue]),a().createElement("div",null,a().createElement(i.Z,{handleHeight:!0,onResize:g}),a().createElement(s.RootRef,{rootRef:o},r))};u.propTypes={onChangeHeight:o().func,children:o().node};const p=u},85209:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079);const s=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(i.Dialog,{open:t},a().createElement(i.DialogContent,null,a().createElement(i.DialogContentText,null,o().text("Are you sure you want to delete this?"))),a().createElement(i.DialogActions,null,a().createElement(i.Button,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Button,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},94111:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(80030);const o=(0,r(79692).Z)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.ZP,i({},e,{classes:t,arrow:!0}))}},96955:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(31396),u=r(60364);const p=(0,r(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var d=r(30830);const m=e=>"horizontal"===e,b=e=>{let{className:t,children:r,orientation:l,defaultSize:i,size:s,minSize:b,maxSize:g,allowResize:f,onChange:y}=e;const v=p(),h=(0,u.Z)(),[E,w]=(0,n.useState)(),[x,O]=(0,n.useState)(!0),k=(0,n.useCallback)((()=>O(!0)),[]),C=(0,n.useCallback)((()=>O(!1)),[]),T=()=>m(l)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,S=(0,n.useCallback)((0,d.DsO)((e=>{const t=T();y({percentageSize:e/t*100+"%",isMaxSize:g>0?e===g:e===t+g,isMinSize:e===b})}),250),[y,l,g,E]),I=(0,n.useMemo)((()=>({transition:h.transitions.create(m(l)?"height":"width",{easing:h.transitions.easing.sharp,duration:h.transitions.duration.leavingScreen})})),[l,h]);return"number"==typeof s&&s<0&&(s=(T()||0)+s),a().createElement("div",{ref:w,className:o()(v.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:f,onChange:S,defaultSize:i,minSize:b,maxSize:g,onDragStarted:C,onDragFinished:k,pane1Style:x?I:void 0},r))},g=s().oneOfType([s().number,s().string]);b.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:g,size:g,minSize:g,maxSize:g,allowResize:s().bool,onChange:s().func};const f=b},94175:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(87638),a=r(30830),l=r(24328),o=r.n(l),i=r(52730),s=r(97991);const c=e=>{let{sourceType:t,className:r,classes:l}=e;const c=(0,i.useSelector)(n.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,a.PWK)(c,t),d=(0,a.tH7)(c,u)[0];return o().createElement(s.Z,{className:r,avatarText:d,icon:p?(0,a.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null,variant:"square",rootClasses:l})}},4073:(e,t,r)=>{r.d(t,{Z:()=>ne});var n=r(24328),a=r.n(n),l=r(30830),o=r(48554),i=r(12437),s=r(22983),c=r(27604),u=r(43054),p=r(71153),d=r.n(p),m=r(87918),b=r.n(m),g=r(72768),f=r(55847),y=r(94079),v=r(17440),h=r(25310),E=r(40879),w=r(79692);const x=(0,w.Z)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],C=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c}=e;const u=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),p=(0,l.PFL)(t),m=(0,E.AG)(r,p),[b,g]=(0,n.useState)(m),f={className:u.textField,InputProps:{disableUnderline:!0,classes:{root:u.input,multiline:u.inputMultiline}}},w=()=>{const e=(0,E.Ho)(t,b);if(!(0,v.isNil)(b)&&!(0,v.equals)(b,m)){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===b&&(0,l.FVt)(p.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(y.Popover,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(u.paper,{[u.booleanEditor]:(0,l.T6Y)(p.type),[u.timestampEditor]:(0,l.j5n)(p.type)}),root:u.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(p.type)?"Escape"===e.key&&s():w()},onBackdropClick:w},a().createElement(h.Z,{autoFocus:!0,dataTypeDefinition:p,fieldName:(0,l.Tde)(t.uri),onChange:g,TextFieldProps:f,value:b,fullWidth:!0}))};var T=r(8818),S=r(57507),I=r(35315),j=r(83348),A=r(77585);const Z=(0,w.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),N=(0,j.Z)(y.MenuItem),P=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(y.Typography,{classes:{root:t.menuText}},n))},D=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=Z(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(A.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(N,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(P,{icon:p,text:i,styles:l}))}));D.displayName="CrosswalkMenuItem";const R=D;var V=r(26905),M=r(63149);function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const W=(0,w.Z)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){z(e,t,r[t])}))}return e}({height:"28px"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",maxWidth:"230px",opacity:r?1:.38,transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flex:1},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),L=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:y,onIgnore:v,onEdit:h,onPin:E,onDelete:w}=e;const{isReadingMode:x,isEditingMode:O,isHovered:k,onMouseEnter:j,onMouseLeave:A,setReadingMode:Z,setEditingMode:N}=(0,V.p)(),P=(0,n.useRef)(),D=(0,l.nIW)(i.uri),z=(0,l.x_)(p),L=!o.system&&!z,U=L&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),F=L&&!y&&(0,l.Edd)(l.fO_.EDITING,o),B=(0,l.ZiX)(i.uri),H=!B&&(!x&&U||i.pin),Y=!B&&(!x&&U||i.ignored),_=(0,M.nX)(p),{isHighlighted:G,isDimmed:q,highlightCrosswalk:X,removeHighlight:$}=(0,M.pu)(p),Q=W({variant:z?"outlined":"filled",opaque:!q,fullyColored:G,color:_}),J=[{crosswalk:p,color:_},{disabled:!U,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:U?null:b().text("You don't have permissions to edit"),onClick:()=>N(),id:"edit"},{disabled:!F,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:F?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],K=()=>{$(),Z()};return a().createElement("div",{ref:P,className:d()(t,Q.root),onMouseEnter:()=>{X(),j()},onMouseLeave:()=>{$(),A()},"data-reltio-id":r},a().createElement("div",{className:Q.attributeValue},a().createElement(g.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:Q.actions},H&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!U}),Y&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!U}),k&&a().createElement(f.Z,{MenuItemRenderer:R,menuId:`simple-attribute-additional-actions-${D}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:K,menuItems:J})),O&&a().createElement(C,{attributeType:o,attributeValue:i,color:_,onClose:K,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P}))};var U=r(13896);const F=(0,w.Z)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const H=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd"]);const u=F(),[{isDragItemOver:p},d]=(0,U.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let m=0;return a().createElement("div",{ref:d,className:u.simpleAttributesWrapper},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(L,B({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,dataReltioId:"value-index-"+m++},c))))})),p&&a().createElement("div",{className:u.dropIndicator},b().text("Drop here")))};var Y=r(58896);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}const G=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(y.Button,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(Y.Z,_({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var q=r(85592);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(q.Z,X({key:e.uri,attributeValue:e},n)))))};var Q=r(22246);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))},ee=(0,w.Z)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}function re(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const ne=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=re(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ee(),[m,b]=(0,n.useState)(c),g=(0,v.propOr)(r.length,"totalValues",s),f=c<g,y=f&&m<g,h=f&&m>=g,E=r.slice(0,m),w=g-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement(G,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=re(p,["crosswalksMap"]);return a().createElement($,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(K,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(H,te({attributeValues:e,attributeType:t},p))}})(E),y&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<g&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},8148:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(30830),o=r(26905),i=r(51229),s=r(63149),c=r(77585),u=r(94111),p=r(71153),d=r.n(p),m=r(32625);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,s.pu)(t),p=(0,m.y)({isOpaque:!l,color:n});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{className:d()(p.crosswalkIcon,r),onMouseEnter:()=>o(),onMouseLeave:()=>i()}))};var g=r(17440),f=r(19592),y=r(4073),v=r(95629),h=r(95974),E=r(79692);const w=(0,E.Z)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(y.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,g.path)(["paging",e.uri],r)},n))))))};var k=r(35315),C=r(57507),T=r(8818),S=r(22983),I=r(87918),j=r.n(I);const A=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var Z=r(20562),N=r(66095);const P=(0,E.Z)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),D=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}=e;const w=P(),{isReadingMode:x,onMouseEnter:T,onMouseLeave:S}=(0,o.p)(),I=!p&&(0,l.Z5t)(l.fO_.EDITING,t),j=!d&&(0,l.Edd)(l.fO_.EDITING,t),D=(0,l.ZiX)(r.uri),R=!D&&(!x&&I||r.pin),V=!D&&(!x&&I||r.ignored),M=!x&&j,z=(0,N.Q)(r.uri),[W,L]=(0,n.useState)(z||D);(0,Z.D)((()=>{z&&L(z)}),[z]);const U=(0,g.pipe)((0,g.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),g.values,g.flatten,(0,g.uniqBy)((0,g.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:w.root,onMouseEnter:T,onMouseLeave:S},a().createElement(f.Z,{onClick:()=>L((e=>!e)),expanded:W}),a().createElement("span",null,c,U.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:w.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:w.actions},R&&a().createElement(k.Z,{disabled:!I,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),V&&a().createElement(C.Z,{disabled:!I,isIgnored:r.ignored,onClick:()=>y({attributeValue:r})}),M&&a().createElement(A,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),W&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!I,disableDelete:!j,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}))}},22246:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(30830),o=r(27952),i=r(8148);const s=(0,r(79692).Z)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},58896:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(30830),o=r(8148),i=r(10174);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},85592:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),l=r(52730),o=r(87638),i=r(30830),s=r(8148),c=r(17440),u=r(10174);const p=(0,r(79692).Z)((e=>({label:{color:e.palette.primary.main,textDecoration:"none"},relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}const m=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const m=p(),b=(0,l.useSelector)(o.ZP.selectors.getMetadata),g=(0,l.useSelector)(o.ZP.selectors.getUIPath),f=a().createElement(u.x,null,a().createElement("a",{href:(0,i.ChB)({uiPath:g,uri:(0,i.bwT)(t)}),className:m.label},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:m.relationshipLabel},t.relationshipLabel))),y=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(b,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,d({attributeValue:t,attributeType:r,attributeTypesList:y,label:f},n))}},10174:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(94079),o=r(32625);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Typography,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},57507:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},35315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},77585:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(87638),s=r(30830),c=r(52730),u=r(72753),p=r(94175),d=r(71153),m=r.n(d),b=r(63149),g=r(8818),f=r(32625);const y=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:y}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:y}),h=(0,c.useSelector)(i.ZP.selectors.getMetadata),{label:E}=(0,s.PWK)(h,t.type);return a().createElement("div",{className:m()(v.sourceItem,n)},a().createElement(p.Z,{className:v.sourceIcon,sourceType:t.type}),a().createElement("div",{className:v.sourceInfo},a().createElement("div",null,a().createElement("span",{className:v.label},E),l&&a().createElement(g.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},32625:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(79692);const a=(0,n.Z)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r}=e;return{backgroundColor:t,height:"12px",width:"12px",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.Z)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},26905:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(30830),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},87760:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(30830),a=r(24328),l=r.n(a),o=r(81303),i=r(13074);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t}=e,r=p(e,["expanded"]);const{attributeType:a,values:o,valueContainerClassName:c}=r;switch(a.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t},r));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:c},l().createElement(i.Z,{attributeType:a,attributeValues:o,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},r))}}))},20982:(e,t,r)=>{r.d(t,{Z:()=>Te});var n=r(24328),a=r.n(n),l=r(52730),o=r(87918),i=r.n(o),s=r(87638),c=r(30830),u=r(74402),p=r(97946),d=r(64876),m=r(85709),b=r(92778),g=r(17440),f=r(92332),y=r(71153),v=r.n(y),h=r(79692);const E=(0,h.Z)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}}))),w=e=>{const t=E();return a().createElement("div",{className:v()(t.headCell,t.coloredCell)},a().createElement(f.default,e),e.children)};var x=r(63459),O=r(32528);const k=(0,h.Z)({root:{marginBottom:"-6px"}}),C=(0,O.Z)((0,g.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:u}=e;const p=k(),d=(0,l.useSelector)(s.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,g.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,g.propEq)("uri",e.uri))),f=(0,g.pipe)((0,g.propOr)([],"attributes"),(0,g.reject)((0,g.either)(c.YkG,c.Or$)),(0,g.filter)((0,g.either)(c.QZu,b)),(0,g.filter)((0,g.both)(c.Uty,(e=>(0,c.Vg3)({attributeType:e,mode:c.fO_.EDITING})))))(m);return a().createElement("div",{className:p.root},a().createElement(x.Z,{label:i().text("Attribute"),popupTitle:i().text("Add attributes"),data:f,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(c.QZu).forEach((e=>{u({attributeType:e,parentUri:r})}))}}))}));var T=r(51229);const S=(0,O.Z)((0,g.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(w,r):a().createElement(w,r,a().createElement(T.Z,null),a().createElement(C,null))})),I=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:r.cellValueWrapper},t)};var j=r(4073);const A=(0,h.Z)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}const N=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(j.Z,Z({attributeValues:t},r)))};var P=r(58896);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const R=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(P.Z,D({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var V=r(85592);function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const z=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=A(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(V.Z,M({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var W=r(22246);function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(this,arguments)}const U=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(W.Z,L({attributeValue:e},r))))))};function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const B=(0,O.Z)((0,g.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,parentUri:s,readOnly:u}=e;return class{static build(e,t){switch(e){case c.oS0.TYPE_NESTED:return a().createElement(R,t);case c.oS0.TYPE_REFERENCE:return a().createElement(z,t);case c.oS0.TYPE_IMAGE:return a().createElement(U,t);default:return a().createElement(N,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){F(e,t,r[t])}))}return e}({},t,{parentUri:s,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,disableEdit:u,disableDelete:u}))}));var H=r(95629),Y=r(87760);const _=e=>{let{value:{values:t,attributeType:r}}=e;const n=E();return a().createElement("div",{className:n.cellValueWrapper},a().createElement(H.Z,{className:n.attributeTitle,label:r.label}),a().createElement(Y.Z,{values:t,attributeType:r,valueContainerClassName:n.ovValue}))},G=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:v()(r.cellValueWrapper,r.count)},t)};var q=r(94079),X=r(87685),$=r(99144),Q=r(8818),J=r(94175);const K=e=>{let{sourcesUriOrder:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(q.ListItem,{key:e,className:r.popupItem},a().createElement(J.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ee=e=>{let{attributeUri:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),o=(0,c.zeJ)(n,t);return a().createElement(q.ListItem,{key:o.uri,className:r.popupItem},a().createElement(q.ListItemText,{primary:(0,c.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},te=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),()=>i().text("Source sequence")],[(0,g.prop)("primaryAttributeUri"),()=>i().text("Attribute winner")],[(0,g.prop)("comparisonAttributeUri"),()=>i().text("Comparison attribute")]]),re=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(K,{sourcesUriOrder:t})}],[(0,g.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}],[(0,g.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}]]),ne=e=>{let{info:t}=e;const r=E(),[l,o]=(0,n.useState)(null),s=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(Q.k,{icon:$.Z,tooltipTitle:i().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(q.Popover,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(q.IconButton,{className:r.closeButton,onClick:s},a().createElement(X.default,null)),a().createElement(q.Typography,{variant:"subtitle1",className:r.popupTitle},te(t))),a().createElement(q.List,{component:"div",className:r.popupItemsWrapper},re(t))))},ae=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=E(),i=r||n||l;return a().createElement("div",{className:v()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),i&&a().createElement(ne,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var le=r(63149),oe=r(40625);const ie=e=>{let{crosswalk:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:u}=(0,le.pu)(t);return a().createElement(oe.Z,{className:r.winnerSourceItem,color:(0,c.CJp)((0,c.uKF)(t)),opacity:o?.38:1,onMouseEnter:()=>i(),onMouseLeave:()=>u()},a().createElement(J.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},se=e=>{let{value:{crosswalks:t}}=e;const r=E();return a().createElement(q.List,{component:"div"},t.map((e=>a().createElement(q.ListItem,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ie,{crosswalk:e})))))},ce=[{id:"ovValues",get label(){return i().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return i().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return i().text("Rule type")},initialWidth:200},{id:"count",get label(){return i().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return i().text("Attribute values")},hideable:!1}],ue=e=>(0,c.OXP)(e)&&!(0,c.ZiX)(e.uri),pe=["ovValues","ruleType","values"],de=e=>{switch(e){case"ovValues":return _;case"values":return B;case"count":return G;case"ruleType":return ae;case"winnerSources":return se;default:return I}},me=(0,g.pipe)(c.cwx,(0,g.sortWith)([(0,g.descend)((0,g.propOr)(-1,"priority"))]),(0,g.map)((0,g.prop)("uri"))),be=(0,g.curry)(((e,t)=>(0,c.YkG)(e)&&t&&(0,g.pipe)(c.c31,(0,g.find)((r=>r.slice((0,c.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,g.pipe)((0,g.filter)(ue),(0,g.chain)((e=>(0,g.pipe)((0,g.pickBy)(((t,r)=>{const n=(0,c.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,c.IM5)(e.value,a);return n&&(!l||ue(l))})),g.values,g.flatten)(t))),(0,g.uniqBy)((0,g.prop)("uri")))(e)},fe=(0,g.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?S:w,rowCellValueRenderer:de(t)}})),ye=(e,t,r,n,a,l)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(ue)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case c.oS0.TYPE_REFERENCE:case c.oS0.TYPE_NESTED:case c.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+r[t.uri].length),0)}}(n.type,l,a);case"ruleType":return((e,t,r)=>{var n,a;const l=[...e.entityTypes,...e.relationTypes||[]].find((0,g.propEq)("uri",r)),o=null==l||null===(n=l.survivorshipGroups)||void 0===n?void 0:n.find((0,g.propEq)("default",!0)),i=null==o||null===(a=o.mapping)||void 0===a?void 0:a.find((0,g.propEq)("attribute",t.uri)),s=(0,c.o_J)(e,null==i?void 0:i.survivorshipStrategy)||(0,c.Xaq)(e),u=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(s)?(0,g.uniq)([...(null==i?void 0:i.sourcesUriOrder)||[],...(null==o?void 0:o.sourcesUriOrder)||[],...me(e)]):void 0,p=be(t),d=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.primaryAttributeUri):void 0,m=(0,c.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.comparisonAttributeUri):void 0;return{ruleType:s,sourcesUriOrder:u,primaryAttributeUri:d,comparisonAttributeUri:m}})(t,n,r);case"winnerSources":return{crosswalks:ge(l,a)};default:return null}};function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(this,arguments)}const he=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData"]);const i=E(),s=0===n;return a().createElement("div",{className:v()(i.rowCell,s&&i.coloredCell),"data-reltio-id":`column-name-${l.id}`},t.values.map(((e,t)=>a().createElement(r,ve({key:t,value:e},o)))))};var Ee=r(99136),we=r(85209),xe=r(31276);const Oe=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[s,c]=(0,n.useState)("without");return a().createElement(q.Dialog,{open:t,onEnter:()=>c("without")},a().createElement(q.DialogContent,null,a().createElement(q.DialogContentText,null,i().text("You are attempting to change a value that is presently ignored.")),a().createElement(q.FormControl,{component:"fieldset"},a().createElement(q.FormLabel,{component:"legend"},i().text("Please choose an option:")),a().createElement(q.RadioGroup,{value:s,onChange:(0,g.pipe)(xe.NA,c)},a().createElement(q.FormControlLabel,{value:"without",control:a().createElement(q.Radio,null),label:i().text("Save without Ignore")}),a().createElement(q.FormControlLabel,{value:"with",control:a().createElement(q.Radio,null),label:i().text("Save and apply Ignore to new value")})))),a().createElement(q.DialogActions,null,a().createElement(q.Button,{onClick:r,color:"primary"},i().text("Cancel")),a().createElement(q.Button,{onClick:()=>{"with"===s?o():l(),r()},color:"primary"},i().text("Ok"))))},ke=(0,h.Z)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ce.apply(this,arguments)}const Te=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:f=pe,onChangeVisibleColumns:y,readOnly:v,onDelete:h=xe.ZT,onPin:E=xe.ZT,onIgnore:w=xe.ZT,onEdit:x=xe.ZT,onAdd:O=xe.ZT,selectedAttributeTypes:k,onSelectAttributeTypes:C=xe.ZT}=e;const T=ke(),S=(0,n.useMemo)((()=>(0,g.pipe)((0,g.filter)((e=>{let{id:t}=e;return f.includes(t)})),fe)(ce)),[f]),{type:I,uri:j,attributes:A={}}=t||{},Z=(0,l.useSelector)(s.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,g.isNil)(k)){const e=(0,g.pipe)(g.keys,(0,g.without)(["paging"]),(0,g.map)((0,c.tCm)(I)),(0,g.map)((e=>(0,c.zeJ)(Z,e,I))),(0,g.filter)(c.Uty))(A);C(e)}}),[t,k]);const N=(0,n.useMemo)((()=>I?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((l=>{const o=(0,c.nIW)(l.uri),i=a[o],s=(0,c.YkG)(l)?n.relation:n.entity;return(0,g.pipe)((0,g.reduce)(((r,n)=>(0,g.assoc)(n,ye(n,e,t,l,s,i),r)),{}),(0,g.assoc)("rawValue",i))(r)}))}(Z,I,k,f,o,A):[]),[Z,I,k,f,A,o]),{getDynamicRowCellHeight:P,changeRowCellHeight:D}=(0,u.Z)(),R=(0,n.useCallback)((e=>a().createElement(p.Z,Ce({onChangeHeight:D},e),a().createElement(he,e))),[D]),V=(0,n.useCallback)((0,g.either)(P,(0,g.always)(68)),[P]),[M,z]=(0,n.useState)(null),[W,L]=(0,n.useState)(null),U=(0,n.useCallback)((e=>{e.attributeValue.ignored?L(e):x(e)}),[x,L]),F=(0,n.useMemo)((()=>({onDelete:z,onPin:E,onIgnore:w,onEdit:U,onAdd:O,parentUri:j,parentTypeUri:I,selectedAttributeTypes:k,onSelectAttributeTypes:C,readOnly:v})),[z,E,w,U,O,j,I,k,C,v]);return a().createElement("div",{className:T.tableContainer},a().createElement(b.Z,{classes:{root:T.tableHeader},title:i().text("Sources")},a().createElement(d.Z,{columnsData:ce,selectedColumns:f,onChangeColumns:y})),a().createElement("div",{className:T.tableContent},r&&a().createElement(Ee.Z,null),a().createElement(m.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:S,rowsData:N,renderRowCell:R,getRowCellHeight:V,context:F})),a().createElement(we.Z,{open:!!M,onClose:()=>z(null),onConfirm:()=>h(M)}),a().createElement(Oe,{open:!!W,onClose:()=>L(null),onConfirmEditWithIgnore:()=>x(W),onConfirmEditWithoutIgnore:()=>{w({attributeValue:W.attributeValue}),x(W)}}))}))},40625:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const s=(0,r(79692).Z)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},"filled"===n&&{backgroundColor:t},"outlined"===n&&{border:`${t} solid 2px`},{opacity:r,transition:"opacity 0.3s",boxSizing:"border-box"})}});function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="filled",children:i,className:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const d=s({color:r,opacity:n,variant:l});return a().createElement("div",c({ref:t,className:o()(d.item,u)},p),i)}))},61305:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(85209),i=r(63459),s=r(31517),c=r(8818),u=r(94175),p=r(81174),d=r(94079),m=r(22983),b=r(30830),g=r(17440),f=r(87918),y=r.n(f),v=r(87638),h=r(22385);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(79692);const O=(0,x.Z)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(d.Typography,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var C=r(71153),T=r.n(C),S=r(43305);const I=(0,x.Z)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(!1),u=e=>o(e.valueOf());return a().createElement(S.Z,{variant:"filled",value:t?new Date(t):null,disabled:l,onChange:(0,g.unless)((0,g.always)(s),u),onAccept:u,onOpen:()=>c(!0),onClose:()=>c(!1),InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:T()(i.timestampEditor,r.root)}}})};var A=r(95038),Z=r.n(A);const N=(0,x.Z)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),P=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:f,onDeleteAttribute:h}=e;const E=N(),w=!("uri"in t),x=(0,l.useSelector)(v.ZP.selectors.getMetadata),[O,C]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),I=(0,n.useMemo)((()=>[{label:b.G39.sourceSystems.label,uri:"type"},{label:b.G39.value.label,uri:"value"},{label:b.G39.sourceTable.label,uri:"sourceTable",canBeAdded:w,canBeDeleted:w},{label:b.G39.createDate.label,uri:"createDate"},{label:b.G39.updateDate.label,uri:"updateDate"},{label:b.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:b.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:b.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),A=(0,g.pipe)((0,g.filter)((0,g.propEq)("canBeAdded",!0)),(0,g.filter)((e=>!(0,g.has)(e.uri,t))),(0,g.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,A.length>0&&r&&a().createElement(i.Z,{label:y().text("Add attributes"),onApply:e=>{e.length>0&&C((t=>t.concat((0,g.map)((0,g.prop)("uri"),e))))},data:A}),I.map((e=>e.uri in t||O.includes(e.uri)?a().createElement("div",{key:e.uri,className:E.attributeWrapper},a().createElement(d.Typography,{variant:"body2",className:E.attributeTitle},`${e.label}:`),a().createElement("div",{className:E.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,b.tH7)(x,t);return w?a().createElement(s.Z,{label:"",placeholder:t,className:E.editor,value:{value:t,label:r},options:(0,b.cwx)(x).sort((0,g.ascend)((0,g.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return f(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(u.Z,{className:E.sourceIcon,sourceType:t}),a().createElement(d.Typography,{className:E.text,variant:"body2"},r))}case"sourceTable":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Typography,{className:E.text,variant:"body2"},t);case"value":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&Z().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Typography,{className:E.text,variant:"body2"},(0,b.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(c.k,{icon:m.Z,disabled:!r,onClick:()=>S(e.uri),size:"XS",tooltipTitle:y().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!T,onClose:()=>S(null),onConfirm:()=>{return e=T,C((t=>(0,g.without)([e],t))),void((0,g.isNil)(t[e])||h(e));var e}}))}},48017:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(30830),s=r(40625),c=r(63149),u=r(94175),p=r(94079),d=r(87638);const m=(0,r(79692).Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),b=e=>{let{crosswalk:t}=e;const r=m(),n=(0,c.nX)(t),l=(0,o.useSelector)(d.ZP.selectors.getMetadata),b=(0,i.tH7)(l,t.type);return a().createElement(s.Z,{color:n,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(p.Typography,{className:r.sourceLabel,variant:"body2"},b))},g=(0,n.memo)((()=>{var e;const t=m(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(b,{crosswalk:i.crosswalk})))}))},79769:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(61305),c=r(17440);const u=(0,r(79692).Z)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),p=e=>{let{className:t,onAdd:r,onClose:l}=e;const p=u(),[d,m]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(i.Typography,{variant:"body1",className:p.caption},o().text("Add crosswalk")),a().createElement(s.Z,{crosswalk:d,onDeleteAttribute:e=>{m((0,c.dissoc)(e))},onEditAttribute:(e,t)=>{m((0,c.assoc)(e,t))}}),a().createElement("div",{className:p.controlButtons},a().createElement(i.Button,{className:p.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Button,{color:"primary",onClick:()=>{r(d),l()},disabled:!d.type||!d.value},o().text("Add"))))}},52017:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(63149),o=r(77243),i=r(30830),s=r(52730),c=r(94079),u=r(72753),p=r(94175),d=r(22385),m=r(87638),b=r(79692);const g=(0,b.Z)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:{width:"100%",display:"flex",alignItems:"center",height:28,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),f=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=g({isOpaque:!n}),b=(0,s.useSelector)(m.ZP.selectors.getMetadata),f=(0,i.tH7)(b,t);return a().createElement("div",{className:o.root},a().createElement(d.Z,{size:"XXS",className:o.focusedIcon,icon:r&&u.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(p.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(c.Typography,{variant:"body2"},f)))}));var y=r(87918),v=r.n(y),h=r(22983),E=r(19592),w=r(88611),x=r(40625),O=r(85209),k=r(8818),C=r(51229),T=r(71543),S=r(13896),I=r(42484),j=r(61305);const A=(0,b.Z)({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5,marginRight:8},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),Z=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:g,disableDelete:f,onDelete:y,onEdit:Z}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:R}=(0,l.BF)(t),V=o?"#FFF":d?P:"#CACCD1",{isDimmed:M,highlightCrosswalk:z,removeHighlight:W}=(0,l.pu)(t),[L]=(0,l.RT)(),U=A({color:V,isOpaque:!M,isFocused:R}),[F,B]=(0,n.useState)(!1),[H,Y]=(0,n.useState)(!1),_=(0,s.useSelector)(m.ZP.selectors.getMetadata),G=(0,i.tH7)(_,t.type),q=(0,i.nIW)(t.uri),X=(0,i.x_)(t),[,$,Q]=(0,S.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!X}),J=!X&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{Q((0,I.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;b&&L&&(0,i.aFF)(L,t)&&L!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[L]),a().createElement("div",{className:U.root,ref:N},a().createElement(k.k,{size:"XXS",className:U.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:U.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:U.header,color:V,variant:X?"outlined":"filled",onMouseEnter:()=>z(),onMouseLeave:()=>W()},r&&a().createElement(T.Z,{className:U.dependentIcon}),a().createElement(E.Z,{onClick:()=>B((e=>!e)),expanded:F}),a().createElement(p.Z,{className:U.sourceIcon,sourceType:t.type}),a().createElement(w.C,{value:G},a().createElement(c.Typography,{variant:"body2",noWrap:!0},G)),a().createElement(C.Z,null),a().createElement(w.C,{value:t.value},a().createElement(c.Typography,{variant:"body2",className:U.labelValue,noWrap:!0},t.value))),F&&a().createElement("div",{className:U.attributesWrapper},J&&a().createElement("div",{className:U.deleteCrosswalkButton},a().createElement(k.k,{icon:h.Z,disabled:f,onClick:()=>Y(!0),size:"XS",tooltipTitle:f?v().text("You don't have permissions to delete"):v().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(O.Z,{open:H,onConfirm:()=>{R&&D(),y(q)},onClose:()=>Y(!1)})),a().createElement(j.Z,{crosswalk:t,canEditAttribute:!g,onEditAttribute:(e,t)=>{Z({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:q,attributeName:e})}}))))})),N=(0,b.Z)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(c.Link,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?v().text("View dependent crosswalks"):v().text("Hide dependent crosswalks")))},D=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:g}=e;const y=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>y.some((0,i.aFF)(e))))&&g()}),[y]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(f,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>g()}))}},39417:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(17440),l=r(30830),o=r(31276);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},85965:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(30830),l=r(17440),o=r(31276);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),g=(0,n.useRef)([]),f=(0,n.useRef)(null),y=(0,n.useCallback)((()=>{f.current=null}),[]),[v,h]=(0,n.useState)(c),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:E(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.HQx,E)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&f.current){const{ownerType:t}=f.current,r=Object.keys(e[t]),n=Object.keys(m[t]);h((0,l.difference)(r,n))}else h(c);y(),d(t),b(e),g.current=[]}),[t]);const w=(0,n.useCallback)((0,l.pipe)(u,y),[u,y]),{deleteAttribute:x,ignoreAttribute:O,pinAttribute:k,createAttribute:C,updateAttribute:T}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:w}),S=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;b((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c)}),[]),I=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),b((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):x(e)}),[x]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});C({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),f.current=n}}else T(e)}),[C,T,p]);return{modifiedEntity:p,crosswalksMap:m,onAddAttribute:S,onDeleteAttribute:I,onPinAttribute:k,onIgnoreAttribute:O,onEditAttribute:j,newlyCreatedAttributes:v}}},77243:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},90186:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(30830),a=r(17440),l=r(77243);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},63149:(e,t,r)=>{r.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var n=r(24328),a=r.n(n),l=r(30830),o=r(17440),i=r(31276);const s=(0,n.createContext)(null),c=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children"]);return a().createElement(s.Provider,{value:r},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(l.uKF,l.CJp)}=(0,n.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,n.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:r=i.ZT}=(0,n.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(l.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,n.useCallback)((()=>r(e,!0)),[e,r]),removeHighlight:(0,n.useCallback)((()=>r(e,!1)),[e,r])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:r=[]}=(0,n.useContext)(s)||{};return{isFocused:!!e&&r.some((0,o.eqBy)(l.uKF,e)),toggleCrosswalkFocus:(0,n.useCallback)((()=>t(e)),[e,t])}}},66095:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(30830);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5884],{97991:(e,t,r)=>{r.d(t,{Z:()=>u});var n,a=r(94079),l=r(71153),o=r.n(l),i=r(24328),s=r.n(i);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}!function(e){e[e.ICON_MODE=0]="ICON_MODE",e[e.TEXT_MODE=1]="TEXT_MODE",e[e.ERROR_MODE=2]="ERROR_MODE"}(n||(n={}));const u=e=>{let{className:t,icon:r,avatarText:l,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(r?n.ICON_MODE:n.TEXT_MODE)}),[r,l]);const b=()=>{m(n.ERROR_MODE)};switch(d){case n.ICON_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.iconRoot),src:r,onError:b},p));case n.TEXT_MODE:case n.ERROR_MODE:return s().createElement(a.Avatar,c({className:o()(t,null==u?void 0:u.textRoot)},p),l);default:return null}}},74402:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r(17440),l=r(16299);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i=e=>{let{rowIndex:t,columnData:{id:r},cellIndex:n}=e;return`${r}[${t}][${n}]`},s=()=>{const[e,t]=(0,n.useState)({}),r=(0,n.useRef)({}),s=(0,n.useCallback)((0,l.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({},r.current))})),[]),c=(0,n.useCallback)((()=>{r.current={}}),[]);return{getDynamicRowCellHeight:(0,n.useCallback)((0,a.pipe)(i,(0,a.prop)(a.__,e)),[e]),changeRowCellHeight:(0,n.useCallback)((0,a.curry)((0,a.useWith)((0,a.pipe)(((e,t)=>{r.current[e]=t}),s),[i,a.identity])),[]),clearHeightsCache:c}}},97946:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(13980),o=r.n(l),i=r(44443),s=r(94079),c=r(20562);const u=e=>{let{onChangeHeight:t,children:r}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["onChangeHeight","children"]);const o=(0,n.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=l,b=t({rowIndex:p,cellIndex:m,columnData:d}),g=()=>o.current&&b(o.current.clientHeight);return(0,c.D)(g,[u.rawValue]),a().createElement("div",null,a().createElement(i.Z,{handleHeight:!0,onResize:g}),a().createElement(s.RootRef,{rootRef:o},r))};u.propTypes={onChangeHeight:o().func,children:o().node};const p=u},85209:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079);const s=e=>{let{open:t,onClose:r,onConfirm:n}=e;return a().createElement(i.Dialog,{open:t},a().createElement(i.DialogContent,null,a().createElement(i.DialogContentText,null,o().text("Are you sure you want to delete this?"))),a().createElement(i.DialogActions,null,a().createElement(i.Button,{onClick:r,color:"primary"},o().text("No")),a().createElement(i.Button,{onClick:()=>{n(),r()},color:"primary"},o().text("Yes"))))}},94111:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),l=r(80030);const o=(0,r(79692).Z)((e=>({tooltip:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,filter:"drop-shadow(0px 1px 5px #00000033) drop-shadow(0px 3px 1px #0000001F) drop-shadow(0px 2px 2px #00000024)",padding:"10px",maxWidth:"none"},arrow:{color:e.palette.background.paper}})));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}const s=e=>{const t=o();return a().createElement(l.ZP,i({},e,{classes:t,arrow:!0}))}},96955:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l),i=r(13980),s=r.n(i),c=r(31396),u=r(60364);const p=(0,r(79692).Z)((()=>({container:{position:"relative","& .Resizer":{zIndex:1,boxSizing:"border-box",backgroundClip:"padding-box","&.disabled":{cursor:"initial",height:0,margin:0},"&.horizontal":{height:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"100% 1px",backgroundPosition:"top",width:"100%",marginBottom:"-10px","&:not(.disabled):hover":{cursor:"row-resize",backgroundImage:"linear-gradient(rgba(0, 114, 206, 0), rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1))",backgroundSize:"100% 3px"}},"&.vertical":{width:"11px",backgroundImage:"linear-gradient(rgba(0,0,0,0.33), rgba(0,0,0,0.33))",backgroundRepeat:"no-repeat",backgroundSize:"1px 100%",backgroundPosition:"left",height:"100%",marginRight:"-10px","&:not(.disabled):hover":{cursor:"col-resize",backgroundImage:"linear-gradient(to left, rgba(0, 114, 206, 0.35), rgba(0, 114, 206, 1), rgba(0, 114, 206, 0.35))",backgroundSize:"3px 100%"}}}}})));var d=r(16299);const m=e=>"horizontal"===e,b=e=>{let{className:t,children:r,orientation:l,defaultSize:i,size:s,minSize:b,maxSize:g,allowResize:f,onChange:y}=e;const v=p(),h=(0,u.Z)(),[E,w]=(0,n.useState)(),[x,O]=(0,n.useState)(!0),k=(0,n.useCallback)((()=>O(!0)),[]),C=(0,n.useCallback)((()=>O(!1)),[]),T=()=>m(l)?null==E?void 0:E.clientHeight:null==E?void 0:E.clientWidth,S=(0,n.useCallback)((0,d.DsO)((e=>{const t=T();y({percentageSize:e/t*100+"%",isMaxSize:g>0?e===g:e===t+g,isMinSize:e===b})}),250),[y,l,g,E]),I=(0,n.useMemo)((()=>({transition:h.transitions.create(m(l)?"height":"width",{easing:h.transitions.easing.sharp,duration:h.transitions.duration.leavingScreen})})),[l,h]);return"number"==typeof s&&s<0&&(s=(T()||0)+s),a().createElement("div",{ref:w,className:o()(v.container,t)},a().createElement(c.Z,{split:l,size:s,allowResize:f,onChange:S,defaultSize:i,minSize:b,maxSize:g,onDragStarted:C,onDragFinished:k,pane1Style:x?I:void 0},r))},g=s().oneOfType([s().number,s().string]);b.propTypes={className:s().string,children:s().arrayOf(s().node).isRequired,orientation:s().oneOf(["horizontal","vertical"]).isRequired,defaultSize:g,size:g,minSize:g,maxSize:g,allowResize:s().bool,onChange:s().func};const f=b},94175:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(87638),a=r(16299),l=r(24328),o=r.n(l),i=r(52730),s=r(97991);const c=e=>{let{sourceType:t,className:r,classes:l}=e;const c=(0,i.useSelector)(n.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,a.PWK)(c,t),d=(0,a.tH7)(c,u)[0];return o().createElement(s.Z,{className:r,avatarText:d,icon:p?(0,a.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null,variant:"square",rootClasses:l})}},4073:(e,t,r)=>{r.d(t,{Z:()=>ne});var n=r(24328),a=r.n(n),l=r(16299),o=r(48554),i=r(12437),s=r(22983),c=r(27604),u=r(43054),p=r(71153),d=r.n(p),m=r(87918),b=r.n(m),g=r(72768),f=r(55847),y=r(94079),v=r(17440),h=r(25310),E=r(40879),w=r(79692);const x=(0,w.Z)((()=>({textField:{margin:0},input:{borderRadius:0},inputMultiline:{"&$input":{paddingTop:0,paddingBottom:0}},booleanEditor:{paddingLeft:"10px"},timestampEditor:{"&$paper":{minWidth:"255px"}},paper:e=>{let{color:t,containerWidth:r}=e;return{border:`3px solid ${t}`,borderRadius:"4px",width:r,minWidth:"160px"}},popoverRoot:{zIndex:"10!important"}})));function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const k=[l.oS0.TYPE_TEXT,l.oS0.TYPE_BLOB],C=e=>{let{attributeType:t,attributeValue:r,color:o,containerRef:i,onClose:s,onEdit:c}=e;const u=x({color:o,containerWidth:i.current?i.current.getBoundingClientRect().width:0}),p=(0,l.PFL)(t),m=(0,E.AG)(r,p),[b,g]=(0,n.useState)(m),f={className:u.textField,InputProps:{disableUnderline:!0,classes:{root:u.input,multiline:u.inputMultiline}}},w=()=>{const e=(0,E.Ho)(t,b);if(!(0,v.isNil)(b)&&!(0,v.equals)(b,m)){const n=(0,l.CwH)(t)?{value:e.value,lookupCode:e.lookupCode}:{value:""===b&&(0,l.FVt)(p.type)?null:e};c(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){O(e,t,r[t])}))}return e}({},r,n))}s()};return a().createElement(y.Popover,{open:!!i,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},classes:{paper:d()(u.paper,{[u.booleanEditor]:(0,l.T6Y)(p.type),[u.timestampEditor]:(0,l.j5n)(p.type)}),root:u.popoverRoot},onKeyUp:e=>{"Enter"!==e.key||k.includes(p.type)?"Escape"===e.key&&s():w()},onBackdropClick:w},a().createElement(h.Z,{autoFocus:!0,dataTypeDefinition:p,fieldName:(0,l.Tde)(t.uri),onChange:g,TextFieldProps:f,value:b,fullWidth:!0}))};var T=r(8818),S=r(57507),I=r(35315),j=r(83348),A=r(77585);const Z=(0,w.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},sourceItem:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)",paddingBottom:"8px",paddingLeft:"16px",maxWidth:"200px"}}))),N=(0,j.Z)(y.MenuItem),P=e=>{let{styles:t,icon:r,text:n}=e;return a().createElement(a().Fragment,null,r,a().createElement(y.Typography,{classes:{root:t.menuText}},n))},D=(0,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=(()=>{})}=e;const l=Z(),{disabled:o,text:i,tooltip:s,onClick:c,id:u="",icon:p,crosswalk:d,color:m}=r;return d?a().createElement(A.Z,{className:l.sourceItem,color:m,crosswalk:d,focusable:!0}):a().createElement(N,{tooltipTitle:s,showForDisabled:!0,classes:{root:l.menuItem},onClick:e=>{n(e),c(e)},disabled:o,ref:t,"data-reltio-id":`crosswalk-menu-item${u}`},a().createElement(P,{icon:p,text:i,styles:l}))}));D.displayName="CrosswalkMenuItem";const R=D;var V=r(26905),M=r(63149);function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const W=(0,w.Z)((()=>({root:e=>{let{fullyColored:t,opaque:r,color:n,variant:a}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){z(e,t,r[t])}))}return e}({height:"28px"},"filled"===a&&{borderRadius:"4px",background:t?n:`linear-gradient(to right, ${n} 8px, rgba(0,0,0,0.05) 8px)`},"outlined"===a&&{"&::after":{content:'""',position:"absolute",background:n,borderRadius:"4px 0px 0px 4px",width:"8px",height:"100%",pointerEvents:"none"},"&::before":{content:'""',position:"absolute",boxSizing:"border-box",borderRadius:"4px",border:t?`${n} solid 2px`:"rgba(0,0,0,0.12) solid 1px",width:"100%",height:"100%",pointerEvents:"none"}},{display:"flex",alignItems:"center",maxWidth:"230px",opacity:r?1:.38,transition:"opacity 0.3s",position:"relative"})},attributeValue:{marginLeft:"16px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flex:1},actions:{display:"flex",width:"71px",justifyContent:"flex-end",marginRight:"4px"}}))),L=e=>{let{className:t,dataReltioId:r,attributeType:o=null,attributeValue:i,crosswalk:p,disableEdit:m,disableDelete:y,onIgnore:v,onEdit:h,onPin:E,onDelete:w}=e;const{isReadingMode:x,isEditingMode:O,isHovered:k,onMouseEnter:j,onMouseLeave:A,setReadingMode:Z,setEditingMode:N}=(0,V.p)(),P=(0,n.useRef)(),D=(0,l.nIW)(i.uri),z=(0,l.x_)(p),L=!o.system&&!z,U=L&&!m&&(0,l.Z5t)(l.fO_.EDITING,o),F=L&&!y&&(0,l.Edd)(l.fO_.EDITING,o),B=(0,l.ZiX)(i.uri),H=!B&&(!x&&U||i.pin),Y=!B&&(!x&&U||i.ignored),_=(0,M.nX)(p),{isHighlighted:G,isDimmed:q,highlightCrosswalk:X,removeHighlight:$}=(0,M.pu)(p),Q=W({variant:z?"outlined":"filled",opaque:!q,fullyColored:G,color:_}),J=[{crosswalk:p,color:_},{disabled:!U,text:b().text("Edit"),icon:a().createElement(c.Z,null),tooltip:U?null:b().text("You don't have permissions to edit"),onClick:()=>N(),id:"edit"},{disabled:!F,text:b().text("Delete"),icon:a().createElement(s.Z,null),tooltip:F?null:b().text("You don't have permissions to delete"),onClick:()=>w({attributeType:o,attributeValue:i,crosswalks:[p]}),id:"delete"}],K=()=>{$(),Z()};return a().createElement("div",{ref:P,className:d()(t,Q.root),onMouseEnter:()=>{X(),j()},onMouseLeave:()=>{$(),A()},"data-reltio-id":r},a().createElement("div",{className:Q.attributeValue},a().createElement(g.Z,{value:(0,l.kDl)(i),dataTypeDefinition:(0,l.PFL)(o)})),a().createElement("div",{className:Q.actions},H&&a().createElement(I.Z,{isPinned:i.pin,onClick:()=>E({attributeValue:i}),disabled:!U}),Y&&a().createElement(S.Z,{isIgnored:i.ignored,onClick:()=>v({attributeValue:i}),disabled:!U}),k&&a().createElement(f.Z,{MenuItemRenderer:R,menuId:`simple-attribute-additional-actions-${D}`,buttonComponent:T.k,buttonProps:{icon:u.Z,size:"XS",tooltipTitle:b().text("More actions")},onMenuClose:K,menuItems:J})),O&&a().createElement(C,{attributeType:o,attributeValue:i,color:_,onClose:K,onEdit:e=>h({attributeType:o,attributeValue:e,crosswalk:p}),containerRef:P}))};var U=r(13896);const F=(0,w.Z)((()=>({simpleAttributesWrapper:{display:"flex",flexWrap:"wrap",gap:"4px",width:"100%",minHeight:"28px"},dropIndicator:{height:"28px",color:"#828282",fontSize:"13px",lineHeight:"28px",background:"rgba(0, 0, 0, 0.04)",border:"1px dashed #828282",borderRadius:"4px",boxSizing:"border-box",padding:"0 12px"}})));function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(this,arguments)}const H=e=>{let{attributeValues:t,attributeType:r,parentUri:n,disableEdit:o,crosswalksMap:i,onAdd:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","attributeType","parentUri","disableEdit","crosswalksMap","onAdd"]);const u=F(),[{isDragItemOver:p},d]=(0,U.useDrop)({accept:"Crosswalk",canDrop:e=>{let{crosswalk:t}=e;const n=(0,l.bC9)(t.uri)||"relation"===t.ownerType,a=(0,l.WgC)(t.uri)&&"entity"===t.ownerType;return(0,l.d89)(l.fO_.EDITING,r)&&!o&&(n&&(0,l.$NE)(r.uri)||a&&(0,l.EdS)(r.uri))},collect:e=>({isDragItemOver:e.isOver()&&e.canDrop()}),drop:(e,a)=>{let{crosswalk:l}=e;s({attributeType:r,crosswalk:l,parentUri:n,index:t.length})}});let m=0;return a().createElement("div",{ref:d,className:u.simpleAttributesWrapper},t.map((e=>{var t;return null===(t=i[e.uri])||void 0===t?void 0:t.map((t=>a().createElement(L,B({key:e.uri+t.uri,attributeType:r,attributeValue:e,crosswalk:t,disableEdit:o,dataReltioId:"value-index-"+m++},c))))})),p&&a().createElement("div",{className:u.dropIndicator},b().text("Drop here")))};var Y=r(58896);function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_.apply(this,arguments)}const G=e=>{let{className:t,attributeValues:r,attributeType:n,onAdd:o,parentUri:i,disableEdit:s}=e,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues","attributeType","onAdd","parentUri","disableEdit"]);const u=!s&&(0,l.d89)(l.fO_.EDITING,n);return 0===r.length&&u?a().createElement(y.Button,{variant:"text",color:"primary",onClick:()=>o({parentUri:i,attributeType:n,index:0})},b().text("Create attribute")):a().createElement("div",{className:t},r.map((e=>a().createElement(Y.Z,_({key:e.uri,attributeValue:e,attributeType:n,onAdd:o,disableEdit:s},c)))))};var q=r(85592);function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},X.apply(this,arguments)}const $=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(q.Z,X({key:e.uri,attributeValue:e},n)))))};var Q=r(22246);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}const K=e=>{let{className:t,attributeValues:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["className","attributeValues"]);return a().createElement("div",{className:t},r.map((e=>a().createElement(Q.Z,J({key:e.uri,attributeValue:e},n)))))},ee=(0,w.Z)((()=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-start"},complexAttributesWrapper:{width:"100%"}})));function te(){return te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},te.apply(this,arguments)}function re(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const ne=e=>{let{attributeType:t,attributeValues:r=[],paging:s={},max:c=1/0,requestNextPage:u}=e,p=re(e,["attributeType","attributeValues","paging","max","requestNextPage"]);const d=ee(),[m,b]=(0,n.useState)(c),g=(0,v.propOr)(r.length,"totalValues",s),f=c<g,y=f&&m<g,h=f&&m>=g,E=r.slice(0,m),w=g-m;return a().createElement("div",{className:d.wrapper},(e=>{switch(t.type){case l.oS0.TYPE_NESTED:return a().createElement(G,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));case l.oS0.TYPE_REFERENCE:{const{crosswalksMap:r}=p,n=re(p,["crosswalksMap"]);return a().createElement($,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t,crosswalksMap:r},n))}case l.oS0.TYPE_IMAGE:return a().createElement(K,te({className:d.complexAttributesWrapper,attributeValues:e,attributeType:t},p));default:return a().createElement(H,te({attributeValues:e,attributeType:t},p))}})(E),y&&a().createElement(o.Z,{moreNumber:Math.min(c,w),valueNumber:w,onClick:()=>{r.length<g&&u(),b(m+c)}}),h&&a().createElement(i.Z,{onClick:()=>{b(c)}}))}},8148:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(16299),o=r(26905),i=r(51229),s=r(63149),c=r(77585),u=r(94111),p=r(71153),d=r.n(p),m=r(32625);const b=e=>{let{crosswalk:t,className:r}=e;const n=(0,s.nX)(t),{isDimmed:l,highlightCrosswalk:o,removeHighlight:i}=(0,s.pu)(t),p=(0,m.y)({isOpaque:!l,color:n});return a().createElement(u.Z,{title:a().createElement(c.Z,{crosswalk:t,color:n}),placement:"top"},a().createElement("div",{className:d()(p.crosswalkIcon,r),onMouseEnter:()=>o(),onMouseLeave:()=>i()}))};var g=r(17440),f=r(19592),y=r(4073),v=r(95629),h=r(95974),E=r(79692);const w=(0,E.Z)((e=>({title:{fontSize:"12px",lineHeight:"14px",paddingBottom:"4px",display:"inline-block",color:e.palette.text.secondary}})));function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(this,arguments)}const O=e=>{let{attributeTypes:t,attributes:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeTypes","attributes"]);const o=w();return a().createElement(a().Fragment,null,t.filter(l.Uty).map((e=>a().createElement(h.Z,{key:e.uri,enabled:!0},a().createElement(v.Z,{className:o.title,label:e.label}),a().createElement(y.Z,x({attributeType:e,attributeValues:r[e.name],paging:(0,g.path)(["paging",e.uri],r)},n))))))};var k=r(35315),C=r(57507),T=r(8818),S=r(22983),I=r(87918),j=r.n(I);const A=e=>{let{onClick:t}=e;return a().createElement(T.k,{icon:S.Z,tooltipTitle:j().text("Delete"),onClick:t,size:"XS",disableRipple:!0})};var Z=r(20562),N=r(66095);const P=(0,E.Z)((()=>({root:{display:"flex",minHeight:"20px"},actions:{display:"flex",width:"65px",justifyContent:"flex-end",flexShrink:0,alignSelf:"center"},crosswalkIcon:{display:"inline-block",verticalAlign:"middle","& + &":{marginLeft:"4px"}}}))),D=e=>{let{attributeType:t,attributeValue:r,attributeTypesList:s,label:c,crosswalksMap:u,disableEdit:p,disableDelete:d,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}=e;const w=P(),{isReadingMode:x,onMouseEnter:T,onMouseLeave:S}=(0,o.p)(),I=!p&&(0,l.Z5t)(l.fO_.EDITING,t),j=!d&&(0,l.Edd)(l.fO_.EDITING,t),D=(0,l.ZiX)(r.uri),R=!D&&(!x&&I||r.pin),V=!D&&(!x&&I||r.ignored),M=!x&&j,z=(0,N.Q)(r.uri),[W,L]=(0,n.useState)(z||D);(0,Z.D)((()=>{z&&L(z)}),[z]);const U=(0,g.pipe)((0,g.pickBy)(((e,t)=>(0,l.sOy)(t,null==r?void 0:r.uri))),g.values,g.flatten,(0,g.uniqBy)((0,g.prop)("uri")))(u);return a().createElement(a().Fragment,null,a().createElement("div",{className:w.root,onMouseEnter:T,onMouseLeave:S},a().createElement(f.Z,{onClick:()=>L((e=>!e)),expanded:W}),a().createElement("span",null,c,U.map((e=>a().createElement(b,{key:(0,l.uKF)(e),crosswalk:e,className:w.crosswalkIcon})))),a().createElement(i.Z,null),a().createElement("div",{className:w.actions},R&&a().createElement(k.Z,{disabled:!I,isPinned:r.pin,onClick:()=>m({attributeValue:r})}),V&&a().createElement(C.Z,{disabled:!I,isIgnored:r.ignored,onClick:()=>y({attributeValue:r})}),M&&a().createElement(A,{onClick:()=>v({attributeType:t,attributeValue:r,crosswalks:u[r.uri]})}))),W&&a().createElement(O,{attributeTypes:s,attributes:r.value,parentUri:r.uri,crosswalksMap:u,disableEdit:!I,disableDelete:!j,onPin:m,onIgnore:y,onDelete:v,onEdit:h,onAdd:E}))}},22246:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(16299),o=r(27952),i=r(8148);const s=(0,r(79692).Z)((()=>({image:{borderRadius:"4px",background:"white",display:"inline-block",verticalAlign:"middle"},imageContainer:{display:"inline",lineHeight:"45px",paddingRight:"8px"}})));function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u={imageWidth:55,imageHeight:45},p=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const p=s();return a().createElement(i.Z,c({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:a().createElement(o.Z,{containerClassName:p.imageContainer,className:p.image,src:(0,l.Ysv)(t),size:u})},n))}},58896:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),l=r(16299),o=r(8148),i=r(10174);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const c=a().createElement(i.x,null,(0,l.idV)(null==t?void 0:t.label));return a().createElement(o.Z,s({attributeValue:t,attributeType:r,attributeTypesList:r.attributes,label:c},n))}},85592:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),l=r(52730),o=r(87638),i=r(16299),s=r(8148),c=r(17440),u=r(10174);const p=(0,r(79692).Z)((e=>({label:{color:e.palette.primary.main,textDecoration:"none"},relationshipLabel:{marginLeft:"4px",color:e.palette.text.primary}})));function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}const m=e=>{let{attributeValue:t,attributeType:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValue","attributeType"]);const m=p(),b=(0,l.useSelector)(o.ZP.selectors.getMetadata),g=(0,l.useSelector)(o.ZP.selectors.getUIPath),f=a().createElement(u.x,null,a().createElement("a",{href:(0,i.ChB)({uiPath:g,uri:(0,i.bwT)(t)}),className:m.label},(0,i.idV)(t.label),t.relationshipLabel&&a().createElement("span",{className:m.relationshipLabel},t.relationshipLabel))),y=(0,c.pipe)(i.tF$,(0,c.map)((e=>(0,i.zeJ)(b,e))),(0,c.reject)(c.isNil))(r);return a().createElement(s.Z,d({attributeValue:t,attributeType:r,attributeTypesList:y,label:f},n))}},10174:(e,t,r)=>{r.d(t,{x:()=>i});var n=r(24328),a=r.n(n),l=r(94079),o=r(32625);const i=e=>{let{children:t}=e;const r=(0,o.q)();return a().createElement(l.Typography,{component:"span",variant:"body2",classes:{body2:r.label}},t)}},57507:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5A8.503 8.503 0 003.5 12c0 4.692 3.808 8.5 8.5 8.5s8.5-3.808 8.5-8.5-3.808-8.5-8.5-8.5zM6.1 12c0-3.26 2.64-5.9 5.9-5.9 1.161 0 2.24.336 3.149.917L7.017 15.15A5.821 5.821 0 016.101 12zm5.9 5.9c-1.16 0-2.24-.336-3.148-.917l8.131-8.131c.581.908.917 1.987.917 3.148 0 3.26-2.64 5.9-5.9 5.9z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.847 9.402a6.34 6.34 0 00-.8-1.322L8.08 17.048A6.34 6.34 0 0012 18.4a6.398 6.398 0 005.847-8.998zm-7.283 7.283l6.121-6.121a4.898 4.898 0 01-6.121 6.121zm1.437-11.084a6.334 6.334 0 013.92 1.352L6.953 15.92A6.334 6.334 0 015.6 12c0-3.536 2.864-6.4 6.4-6.4zm0 1.5c.5 0 .982.075 1.436.215l-6.121 6.12A4.898 4.898 0 0112 7.1zM6.6 17.903A7.967 7.967 0 0012 20c4.417-.001 8.001-3.585 8.001-8.001a7.967 7.967 0 00-2.601-5.902A7.988 7.988 0 0012 4c-4.416 0-8 3.584-8 8a7.967 7.967 0 002.602 5.902zM12 2.5c-5.244 0-9.5 4.256-9.5 9.5s4.256 9.5 9.5 9.5 9.5-4.256 9.5-9.5-4.256-9.5-9.5-9.5z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isIgnored:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,icon:t?i:c,tooltipTitle:n?p().text("You don't have permissions to ignore"):p().text("Ignore"),onClick:r,size:"XS",disableRipple:!0})}},35315:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(24328),a=r.n(n),l=r(8818);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const i=e=>a().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 4v6l2 2v2h-5v7l-.992 1L11 21v-7H6v-2l2-2V4H7V2h10v2h-1z",fill:"#000",fillOpacity:.54}));function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}const c=e=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 10V4h1V2H7v2h1v6l-2 2v2h5v7l1.008 1L13 21v-7h5v-2l-2-2zm-6-6h4v7l1 1H9l1-1V4z",fill:"#000",fillOpacity:.54}));var u=r(87918),p=r.n(u);const d=e=>{let{isPinned:t,onClick:r,disabled:n}=e;return a().createElement(l.k,{disabled:n,showForDisabled:!0,onClick:r,icon:t?i:c,tooltipTitle:n?"You don't have permissions to pin":p().text("Pin"),size:"XS",disableRipple:!0})}},77585:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(87638),s=r(16299),c=r(52730),u=r(72753),p=r(94175),d=r(71153),m=r.n(d),b=r(63149),g=r(8818),f=r(32625);const y=e=>{let{crosswalk:t,color:r,className:n,focusable:l=!1}=e;const{toggleCrosswalkFocus:d,isFocused:y}=(0,b.BF)(t),v=(0,f.y)({color:r,isFocused:y}),h=(0,c.useSelector)(i.ZP.selectors.getMetadata),{label:E}=(0,s.PWK)(h,t.type);return a().createElement("div",{className:m()(v.sourceItem,n)},a().createElement(p.Z,{className:v.sourceIcon,sourceType:t.type}),a().createElement("div",{className:v.sourceInfo},a().createElement("div",null,a().createElement("span",{className:v.label},E),l&&a().createElement(g.k,{icon:u.Z,className:v.eyeIcon,size:"XXS",tooltipTitle:o().text("Focus"),onClick:()=>d()})),a().createElement("div",{className:v.crosswalkValue},t.value)))}},32625:(e,t,r)=>{r.d(t,{y:()=>a,q:()=>l});var n=r(79692);const a=(0,n.Z)({sourceItem:{display:"flex",overflow:"hidden"},eyeIcon:e=>{let{isFocused:t}=e;return{marginLeft:"10px",color:t?"#000":"rgba(0, 0, 0, 0.54)"}},label:{color:"rgba(0, 0, 0, 0.87)",verticalAlign:"top",fontSize:"13px",lineHeight:"16px"},sourceInfo:{overflow:"hidden"},crosswalkValue:{color:"rgba(0, 0, 0, 0.54)",fontSize:"12px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},sourceIcon:e=>{let{color:t}=e;return{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px",backgroundColor:t}},crosswalkIcon:e=>{let{color:t,isOpaque:r}=e;return{backgroundColor:t,height:"12px",width:"12px",borderRadius:"30px",opacity:r?1:.38,transition:"opacity 0.3s"}}}),l=(0,n.Z)((()=>({label:{fontSize:"13px",lineHeight:"15px",letterSpacing:"normal",marginLeft:"2px",marginRight:"8px"}})))},26905:(e,t,r)=>{r.d(t,{p:()=>o});var n,a=r(16299),l=r(24328);!function(e){e.READING="READING",e.HOVERED="HOVERED",e.EDITING="EDITING"}(n||(n={}));const o=()=>{const[e,t]=(0,l.useState)(null),r=e===n.READING,o=e===n.EDITING,i=e===n.HOVERED;(0,l.useEffect)((()=>{t(n.READING)}),[]);const s=(0,l.useCallback)((0,a.DsO)(t,50),[]),c=(0,l.useCallback)((()=>{o||s(n.HOVERED)}),[s,o]),u=(0,l.useCallback)((()=>{o||s(n.READING)}),[s,o]);return{setReadingMode:(0,l.useCallback)((()=>t(n.READING)),[t]),setEditingMode:(0,l.useCallback)((()=>t(n.EDITING)),[t]),onMouseLeave:u,onMouseEnter:c,isReadingMode:r,isEditingMode:o,isHovered:i}}},87760:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(16299),a=r(24328),l=r.n(a),o=r(81303),i=r(13074);function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){c(e,t,r[t])}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const d=e=>{let{values:t,valueContainerClassName:r}=e,n=p(e,["values","valueContainerClassName"]);return l().createElement(l().Fragment,null,(t||[]).map((e=>l().createElement("div",{key:e.uri,className:r},l().createElement(o.Z,u({attributeValue:e},n))))))},m=(0,a.memo)((e=>{let{expanded:t}=e,r=p(e,["expanded"]);const{attributeType:a,values:o,valueContainerClassName:c}=r;switch(a.type){case n.oS0.TYPE_NESTED:case n.oS0.TYPE_REFERENCE:return d(s({expanded:t},r));case n.oS0.TYPE_IMAGE:return l().createElement("div",{className:c},l().createElement(i.Z,{attributeType:a,attributeValues:o,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},r))}}))},20982:(e,t,r)=>{r.d(t,{Z:()=>Te});var n=r(24328),a=r.n(n),l=r(52730),o=r(87918),i=r.n(o),s=r(87638),c=r(16299),u=r(74402),p=r(97946),d=r(60894),m=r(85709),b=r(92778),g=r(17440),f=r(92332),y=r(71153),v=r.n(y),h=r(79692);const E=(0,h.Z)((e=>({coloredCell:{"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.06)",pointerEvents:"none"}},headCell:{display:"flex",alignItems:"center",fontSize:"12px",height:"100%",color:e.palette.text.secondary},rowCell:{fontSize:"13px",overflow:"hidden"},cellValueWrapper:{padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"}},attributeTitle:{display:"block",marginLeft:"3px","&:not(:last-child)":{marginBottom:"5px"}},ovValue:{"& + &":{marginTop:"4px"}},count:{textAlign:"center"},ruleType:{display:"flex",alignItems:"center"},ruleTypeLabel:{marginRight:"5px"},rulePopup:{width:"270px",overflowY:"hidden"},popupItem:{paddingBottom:"5px",paddingTop:"5px"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},closeButton:{height:24,width:24},popupTitle:{fontWeight:500,marginLeft:"12px"},popupTitleWrapper:{display:"flex",paddingLeft:16,paddingTop:16},popupItemsWrapper:{overflowY:"auto",maxHeight:"280px"},winnerSourceItemWrapper:{paddingBottom:"2px",paddingTop:"2px"},winnerSourceItem:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"8px"},winnerSourceItemLabel:{fontSize:13}}))),w=e=>{const t=E();return a().createElement("div",{className:v()(t.headCell,t.coloredCell)},a().createElement(f.default,e),e.children)};var x=r(63459),O=r(32528);const k=(0,h.Z)({root:{marginBottom:"-6px"}}),C=(0,O.Z)((0,g.pick)(["parentUri","parentTypeUri","onAdd","selectedAttributeTypes","onSelectAttributeTypes"]))((e=>{let{parentTypeUri:t,parentUri:r,selectedAttributeTypes:n,onSelectAttributeTypes:o,onAdd:u}=e;const p=k(),d=(0,l.useSelector)(s.ZP.selectors.getMetadata),m=[...d.entityTypes,...d.relationTypes||[]].find((0,g.propEq)("uri",t)),b=e=>!(null!=n&&n.find((0,g.propEq)("uri",e.uri))),f=(0,g.pipe)((0,g.propOr)([],"attributes"),(0,g.reject)((0,g.either)(c.YkG,c.Or$)),(0,g.filter)((0,g.either)(c.QZu,b)),(0,g.filter)((0,g.both)(c.Uty,(e=>(0,c.Vg3)({attributeType:e,mode:c.fO_.EDITING})))))(m);return a().createElement("div",{className:p.root},a().createElement(x.Z,{label:i().text("Attribute"),popupTitle:i().text("Add attributes"),data:f,onApply:e=>{const t=e.filter(b);t.length>0&&o([...t,...n]),e.filter(c.QZu).forEach((e=>{u({attributeType:e,parentUri:r})}))}}))}));var T=r(51229);const S=(0,O.Z)((0,g.pick)(["readOnly"]))((e=>{let{readOnly:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["readOnly"]);return t?a().createElement(w,r):a().createElement(w,r,a().createElement(T.Z,null),a().createElement(C,null))})),I=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:r.cellValueWrapper},t)};var j=r(4073);const A=(0,h.Z)((()=>({simpleAttributeWrapper:{padding:"15px"},complexAttributeWrapper:{padding:"15px","& + &":{borderTop:"1px solid rgba(0,0,0,.1)"}}})));function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}const N=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement("div",{className:n.simpleAttributeWrapper},a().createElement(j.Z,Z({attributeValues:t},r)))};var P=r(58896);function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const R=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A(),l=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(P.Z,D({attributeValue:e},r)))));return a().createElement(a().Fragment,null,l)};var V=r(85592);function M(){return M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}const z=e=>{let{attributeValues:t,crosswalksMap:r}=e,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues","crosswalksMap"]);const l=A(),o=null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:l.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(V.Z,M({attributeValue:e,crosswalksMap:r},n)))));return a().createElement(a().Fragment,null,o)};var W=r(22246);function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(this,arguments)}const U=e=>{let{attributeValues:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["attributeValues"]);const n=A();return a().createElement(a().Fragment,null,null==t?void 0:t.map(((e,t)=>a().createElement("div",{key:null==e?void 0:e.uri,className:n.complexAttributeWrapper,"data-reltio-id":`value-index-${t}`},a().createElement(W.Z,L({attributeValue:e},r))))))};function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const B=(0,O.Z)((0,g.pick)(["onDelete","onPin","onIgnore","onEdit","onAdd","parentUri","readOnly"]))((e=>{let{value:t,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,parentUri:s,readOnly:u}=e;return class{static build(e,t){switch(e){case c.oS0.TYPE_NESTED:return a().createElement(R,t);case c.oS0.TYPE_REFERENCE:return a().createElement(z,t);case c.oS0.TYPE_IMAGE:return a().createElement(U,t);default:return a().createElement(N,t)}}}.build(t.attributeType.type,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){F(e,t,r[t])}))}return e}({},t,{parentUri:s,onDelete:r,onEdit:n,onPin:l,onIgnore:o,onAdd:i,disableEdit:u,disableDelete:u}))}));var H=r(95629),Y=r(87760);const _=e=>{let{value:{values:t,attributeType:r}}=e;const n=E();return a().createElement("div",{className:n.cellValueWrapper},a().createElement(H.Z,{className:n.attributeTitle,label:r.label}),a().createElement(Y.Z,{values:t,attributeType:r,valueContainerClassName:n.ovValue}))},G=e=>{let{value:t}=e;const r=E();return a().createElement("div",{className:v()(r.cellValueWrapper,r.count)},t)};var q=r(94079),X=r(87685),$=r(99144),Q=r(8818),J=r(94175);const K=e=>{let{sourcesUriOrder:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata);return a().createElement(a().Fragment,null,t.map((e=>a().createElement(q.ListItem,{key:e,className:r.popupItem},a().createElement(J.Z,{className:r.sourceIcon,sourceType:e}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,e),primaryTypographyProps:{variant:"body2"}})))))},ee=e=>{let{attributeUri:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),o=(0,c.zeJ)(n,t);return a().createElement(q.ListItem,{key:o.uri,className:r.popupItem},a().createElement(q.ListItemText,{primary:(0,c.idV)(o.label),primaryTypographyProps:{variant:"body2"}}))},te=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),()=>i().text("Source sequence")],[(0,g.prop)("primaryAttributeUri"),()=>i().text("Attribute winner")],[(0,g.prop)("comparisonAttributeUri"),()=>i().text("Comparison attribute")]]),re=(0,g.cond)([[(0,g.prop)("sourcesUriOrder"),e=>{let{sourcesUriOrder:t}=e;return a().createElement(K,{sourcesUriOrder:t})}],[(0,g.prop)("primaryAttributeUri"),e=>{let{primaryAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}],[(0,g.prop)("comparisonAttributeUri"),e=>{let{comparisonAttributeUri:t}=e;return a().createElement(ee,{attributeUri:t})}]]),ne=e=>{let{info:t}=e;const r=E(),[l,o]=(0,n.useState)(null),s=()=>o(null);return a().createElement(a().Fragment,null,a().createElement(Q.k,{icon:$.Z,tooltipTitle:i().text("View details"),size:"XS",onClick:e=>o(e.currentTarget)}),a().createElement(q.Popover,{classes:{paper:r.rulePopup},open:!!l,anchorEl:l,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},a().createElement("div",{className:r.popupTitleWrapper},a().createElement(q.IconButton,{className:r.closeButton,onClick:s},a().createElement(X.default,null)),a().createElement(q.Typography,{variant:"subtitle1",className:r.popupTitle},te(t))),a().createElement(q.List,{component:"div",className:r.popupItemsWrapper},re(t))))},ae=e=>{let{value:{ruleType:t,sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}=e;const o=E(),i=r||n||l;return a().createElement("div",{className:v()(o.cellValueWrapper,o.ruleType)},a().createElement("div",{className:o.ruleTypeLabel},t.label),i&&a().createElement(ne,{info:{sourcesUriOrder:r,primaryAttributeUri:n,comparisonAttributeUri:l}}))};var le=r(63149),oe=r(40625);const ie=e=>{let{crosswalk:t}=e;const r=E(),n=(0,l.useSelector)(s.ZP.selectors.getMetadata),{isDimmed:o,highlightCrosswalk:i,removeHighlight:u}=(0,le.pu)(t);return a().createElement(oe.Z,{className:r.winnerSourceItem,color:(0,c.CJp)((0,c.uKF)(t)),opacity:o?.38:1,onMouseEnter:()=>i(),onMouseLeave:()=>u()},a().createElement(J.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(q.ListItemText,{primary:(0,c.tH7)(n,t.type),primaryTypographyProps:{variant:"body2"},classes:{primary:r.winnerSourceItemLabel}}))},se=e=>{let{value:{crosswalks:t}}=e;const r=E();return a().createElement(q.List,{component:"div"},t.map((e=>a().createElement(q.ListItem,{key:e.uri,className:r.winnerSourceItemWrapper},a().createElement(ie,{crosswalk:e})))))},ce=[{id:"ovValues",get label(){return i().text("Attributes & OV")},hideable:!1,initialWidth:360,minWidth:250},{id:"winnerSources",get label(){return i().text("Winner source systems")},initialWidth:220},{id:"ruleType",get label(){return i().text("Rule type")},initialWidth:200},{id:"count",get label(){return i().text("Count")},initialWidth:80,minWidth:80},{id:"values",get label(){return i().text("Attribute values")},hideable:!1}],ue=e=>(0,c.OXP)(e)&&!(0,c.ZiX)(e.uri),pe=["ovValues","ruleType","values"],de=e=>{switch(e){case"ovValues":return _;case"values":return B;case"count":return G;case"ruleType":return ae;case"winnerSources":return se;default:return I}},me=(0,g.pipe)(c.cwx,(0,g.sortWith)([(0,g.descend)((0,g.propOr)(-1,"priority"))]),(0,g.map)((0,g.prop)("uri"))),be=(0,g.curry)(((e,t)=>(0,c.YkG)(e)&&t&&(0,g.pipe)(c.c31,(0,g.find)((r=>r.slice((0,c.u5q)(r).length)===t.slice(e.uri.length))))(e)||t)),ge=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,g.pipe)((0,g.filter)(ue),(0,g.chain)((e=>(0,g.pipe)((0,g.pickBy)(((t,r)=>{const n=(0,c.sOy)(r,e.uri),a=n?r.slice(e.uri.length+1):"",l=a&&(0,c.IM5)(e.value,a);return n&&(!l||ue(l))})),g.values,g.flatten)(t))),(0,g.uniqBy)((0,g.prop)("uri")))(e)},fe=(0,g.map)((e=>{let{id:t,label:r,initialWidth:n,minWidth:a}=e;return{id:t,label:r,initialWidth:n,minWidth:a,autoResize:!n,resizable:!0,sortable:!1,headCellRenderer:"ovValues"===t?S:w,rowCellValueRenderer:de(t)}})),ye=(e,t,r,n,a,l)=>{switch(e){case"ovValues":return{attributeType:n,values:null==l?void 0:l.filter(ue)};case"values":return{attributeType:n,attributeValues:l,crosswalksMap:a};case"count":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;switch(e){case c.oS0.TYPE_REFERENCE:case c.oS0.TYPE_NESTED:case c.oS0.TYPE_IMAGE:return t.length;default:return t.reduce(((e,t)=>e+r[t.uri].length),0)}}(n.type,l,a);case"ruleType":return((e,t,r)=>{var n,a;const l=[...e.entityTypes,...e.relationTypes||[]].find((0,g.propEq)("uri",r)),o=null==l||null===(n=l.survivorshipGroups)||void 0===n?void 0:n.find((0,g.propEq)("default",!0)),i=null==o||null===(a=o.mapping)||void 0===a?void 0:a.find((0,g.propEq)("attribute",t.uri)),s=(0,c.o_J)(e,null==i?void 0:i.survivorshipStrategy)||(0,c.Xaq)(e),u=(e=>"configuration/survivorshipStrategies/SRC_SYS"===(null==e?void 0:e.uri))(s)?(0,g.uniq)([...(null==i?void 0:i.sourcesUriOrder)||[],...(null==o?void 0:o.sourcesUriOrder)||[],...me(e)]):void 0,p=be(t),d=(e=>"configuration/survivorshipStrategies/OtherAttributeWinnerCrosswalk"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.primaryAttributeUri):void 0,m=(0,c.YkM)(t)&&(e=>"configuration/survivorshipStrategies/MinValue"===(null==e?void 0:e.uri)||"configuration/survivorshipStrategies/MaxValue"===(null==e?void 0:e.uri))(s)?p(null==i?void 0:i.comparisonAttributeUri):void 0;return{ruleType:s,sourcesUriOrder:u,primaryAttributeUri:d,comparisonAttributeUri:m}})(t,n,r);case"winnerSources":return{crosswalks:ge(l,a)};default:return null}};function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ve.apply(this,arguments)}const he=e=>{let{cell:t,CellValueRenderer:r,columnIndex:n,columnData:l}=e,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["cell","CellValueRenderer","columnIndex","columnData"]);const i=E(),s=0===n;return a().createElement("div",{className:v()(i.rowCell,s&&i.coloredCell),"data-reltio-id":`column-name-${l.id}`},t.values.map(((e,t)=>a().createElement(r,ve({key:t,value:e},o)))))};var Ee=r(99136),we=r(85209),xe=r(31276);const Oe=e=>{let{open:t,onClose:r,onConfirmEditWithoutIgnore:l,onConfirmEditWithIgnore:o}=e;const[s,c]=(0,n.useState)("without");return a().createElement(q.Dialog,{open:t,onEnter:()=>c("without")},a().createElement(q.DialogContent,null,a().createElement(q.DialogContentText,null,i().text("You are attempting to change a value that is presently ignored.")),a().createElement(q.FormControl,{component:"fieldset"},a().createElement(q.FormLabel,{component:"legend"},i().text("Please choose an option:")),a().createElement(q.RadioGroup,{value:s,onChange:(0,g.pipe)(xe.NA,c)},a().createElement(q.FormControlLabel,{value:"without",control:a().createElement(q.Radio,null),label:i().text("Save without Ignore")}),a().createElement(q.FormControlLabel,{value:"with",control:a().createElement(q.Radio,null),label:i().text("Save and apply Ignore to new value")})))),a().createElement(q.DialogActions,null,a().createElement(q.Button,{onClick:r,color:"primary"},i().text("Cancel")),a().createElement(q.Button,{onClick:()=>{"with"===s?o():l(),r()},color:"primary"},i().text("Ok"))))},ke=(0,h.Z)({tableContainer:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"},tableHeader:{display:"flex",flexDirection:"row",justifyContent:"space-between"},tableContent:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ce.apply(this,arguments)}const Te=(0,n.memo)((e=>{let{entity:t,isLoading:r,crosswalksMap:o,visibleColumns:f=pe,onChangeVisibleColumns:y,readOnly:v,onDelete:h=xe.ZT,onPin:E=xe.ZT,onIgnore:w=xe.ZT,onEdit:x=xe.ZT,onAdd:O=xe.ZT,selectedAttributeTypes:k,onSelectAttributeTypes:C=xe.ZT}=e;const T=ke(),S=(0,n.useMemo)((()=>(0,g.pipe)((0,g.filter)((e=>{let{id:t}=e;return f.includes(t)})),fe)(ce)),[f]),{type:I,uri:j,attributes:A={}}=t||{},Z=(0,l.useSelector)(s.ZP.selectors.getMetadata);(0,n.useEffect)((()=>{if(t&&(0,g.isNil)(k)){const e=(0,g.pipe)(g.keys,(0,g.without)(["paging"]),(0,g.map)((0,c.tCm)(I)),(0,g.map)((e=>(0,c.zeJ)(Z,e,I))),(0,g.filter)(c.Uty))(A);C(e)}}),[t,k]);const N=(0,n.useMemo)((()=>I?function(e,t){let r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).map((l=>{const o=(0,c.nIW)(l.uri),i=a[o],s=(0,c.YkG)(l)?n.relation:n.entity;return(0,g.pipe)((0,g.reduce)(((r,n)=>(0,g.assoc)(n,ye(n,e,t,l,s,i),r)),{}),(0,g.assoc)("rawValue",i))(r)}))}(Z,I,k,f,o,A):[]),[Z,I,k,f,A,o]),{getDynamicRowCellHeight:P,changeRowCellHeight:D}=(0,u.Z)(),R=(0,n.useCallback)((e=>a().createElement(p.Z,Ce({onChangeHeight:D},e),a().createElement(he,e))),[D]),V=(0,n.useCallback)((0,g.either)(P,(0,g.always)(68)),[P]),[M,z]=(0,n.useState)(null),[W,L]=(0,n.useState)(null),U=(0,n.useCallback)((e=>{e.attributeValue.ignored?L(e):x(e)}),[x,L]),F=(0,n.useMemo)((()=>({onDelete:z,onPin:E,onIgnore:w,onEdit:U,onAdd:O,parentUri:j,parentTypeUri:I,selectedAttributeTypes:k,onSelectAttributeTypes:C,readOnly:v})),[z,E,w,U,O,j,I,k,C,v]);return a().createElement("div",{className:T.tableContainer},a().createElement(b.Z,{classes:{root:T.tableHeader},title:i().text("Sources")},a().createElement(d.Z,{columnsData:ce,selectedColumns:f,onChangeColumns:y})),a().createElement("div",{className:T.tableContent},r&&a().createElement(Ee.Z,null),a().createElement(m.Z,{fixFirstColumn:!0,headRowHeight:48,defaultColumnWidth:250,defaultColumnMinWidth:200,columnsData:S,rowsData:N,renderRowCell:R,getRowCellHeight:V,context:F})),a().createElement(we.Z,{open:!!M,onClose:()=>z(null),onConfirm:()=>h(M)}),a().createElement(Oe,{open:!!W,onClose:()=>L(null),onConfirmEditWithIgnore:()=>x(W),onConfirmEditWithoutIgnore:()=>{w({attributeValue:W.attributeValue}),x(W)}}))}))},40625:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(24328),a=r.n(n),l=r(71153),o=r.n(l);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const s=(0,r(79692).Z)({item:e=>{let{color:t,opacity:r,variant:n}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},"filled"===n&&{backgroundColor:t},"outlined"===n&&{border:`${t} solid 2px`},{opacity:r,transition:"opacity 0.3s",boxSizing:"border-box"})}});function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}const u=(0,n.forwardRef)(((e,t)=>{let{color:r,opacity:n,variant:l="filled",children:i,className:u}=e,p=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["color","opacity","variant","children","className"]);const d=s({color:r,opacity:n,variant:l});return a().createElement("div",c({ref:t,className:o()(d.item,u)},p),i)}))},61305:(e,t,r)=>{r.d(t,{Z:()=>P});var n=r(24328),a=r.n(n),l=r(52730),o=r(85209),i=r(63459),s=r(31517),c=r(8818),u=r(94175),p=r(81174),d=r(94079),m=r(22983),b=r(16299),g=r(17440),f=r(87918),y=r.n(f),v=r(87638),h=r(22385);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(this,arguments)}const w=e=>a().createElement("svg",E({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM20 8H8v12h12V8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"Copy_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Copy_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Copy_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#Copy_svg__b)",d:"M0 0h24v24H0z"})));var x=r(79692);const O=(0,x.Z)((()=>({root:{display:"flex",justifyContent:"space-between",alignItems:"center",overflowWrap:"anywhere"},text:{fontSize:13},button:{flexShrink:0,marginLeft:8,padding:0,textTransform:"none"}}))),k=e=>{let{value:t}=e;const r=O();return a().createElement("div",{className:r.root},a().createElement(d.Typography,{className:r.text,variant:"body2"},t),a().createElement(h.Z,{size:"XXS",icon:w,color:"primary",className:r.button,onClick:()=>navigator.clipboard.writeText(t)}))};var C=r(71153),T=r.n(C),S=r(43305);const I=(0,x.Z)((()=>({timestampEditorInput:{paddingTop:15,paddingBottom:15,fontSize:13},timestampEditor:{height:38}}))),j=e=>{let{value:t,classes:r={},disabled:l=!1,onChange:o}=e;const i=I(),[s,c]=(0,n.useState)(!1),u=e=>o(e.valueOf());return a().createElement(S.Z,{variant:"filled",value:t?new Date(t):null,disabled:l,onChange:(0,g.unless)((0,g.always)(s),u),onAccept:u,onOpen:()=>c(!0),onClose:()=>c(!1),InputProps:{disableUnderline:!0,classes:{input:i.timestampEditorInput,root:T()(i.timestampEditor,r.root)}}})};var A=r(95038),Z=r.n(A);const N=(0,x.Z)((e=>({text:{fontSize:13},attributeWrapper:{display:"flex",alignItems:"center",paddingTop:5,paddingBottom:5,marginLeft:12},attributeTitle:{fontSize:13,width:135,color:e.palette.text.secondary},attributeValue:{paddingLeft:10,display:"flex",alignItems:"center",flexGrow:1},input:{paddingTop:14,paddingBottom:14,fontSize:13},editor:{flexGrow:1},moreButton:{marginLeft:24},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"}}))),P=e=>{let{crosswalk:t,canEditAttribute:r=!0,onEditAttribute:f,onDeleteAttribute:h}=e;const E=N(),w=!("uri"in t),x=(0,l.useSelector)(v.ZP.selectors.getMetadata),[O,C]=(0,n.useState)([]),[T,S]=(0,n.useState)(null),I=(0,n.useMemo)((()=>[{label:b.G39.sourceSystems.label,uri:"type"},{label:b.G39.value.label,uri:"value"},{label:b.G39.sourceTable.label,uri:"sourceTable",canBeAdded:w,canBeDeleted:w},{label:b.G39.createDate.label,uri:"createDate"},{label:b.G39.updateDate.label,uri:"updateDate"},{label:b.G39.deleteDate.label,uri:"deleteDate",canBeAdded:!0,canBeDeleted:!0},{label:b.G39.reltioLoadDate.label,uri:"reltioLoadDate"},{label:b.G39.publishDate.label,uri:"sourcePublishDate"}]),[]),A=(0,g.pipe)((0,g.filter)((0,g.propEq)("canBeAdded",!0)),(0,g.filter)((e=>!(0,g.has)(e.uri,t))),(0,g.filter)((e=>!O.includes(e.uri))))(I);return a().createElement(a().Fragment,null,A.length>0&&r&&a().createElement(i.Z,{label:y().text("Add attributes"),onApply:e=>{e.length>0&&C((t=>t.concat((0,g.map)((0,g.prop)("uri"),e))))},data:A}),I.map((e=>e.uri in t||O.includes(e.uri)?a().createElement("div",{key:e.uri,className:E.attributeWrapper},a().createElement(d.Typography,{variant:"body2",className:E.attributeTitle},`${e.label}:`),a().createElement("div",{className:E.attributeValue},((e,t)=>{switch(e){case"type":{const r=(0,b.tH7)(x,t);return w?a().createElement(s.Z,{label:"",placeholder:t,className:E.editor,value:{value:t,label:r},options:(0,b.cwx)(x).sort((0,g.ascend)((0,g.prop)("label"))).map((e=>{let{uri:t,label:r}=e;return{value:t,label:r}})),onChange:t=>{let{value:r}=t;return f(e,r)},TextFieldProps:{InputProps:{disableUnderline:!0}}}):a().createElement(a().Fragment,null,a().createElement(u.Z,{className:E.sourceIcon,sourceType:t}),a().createElement(d.Typography,{className:E.text,variant:"body2"},r))}case"sourceTable":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(d.Typography,{className:E.text,variant:"body2"},t);case"value":return w?a().createElement(p.Z,{multiple:!1,multiline:!1,getValueLabel:void 0,classes:{root:E.editor},required:!0,variant:"filled",value:t,onInput:t=>f(e,t.target.value),margin:"dense",InputProps:{disableUnderline:!0,classes:{input:E.input}}}):a().createElement(k,{value:t});case"deleteDate":return a().createElement(j,{value:t&&Z().utc((0,b.ZBU)(t)).valueOf(),onChange:t=>f(e,t.toString()),classes:{root:E.editor},disabled:!r});case"sourcePublishDate":case"createDate":case"updateDate":case"reltioLoadDate":return a().createElement(d.Typography,{className:E.text,variant:"body2"},(0,b.o0x)(t));default:return null}})(e.uri,t[e.uri]),e.canBeDeleted&&a().createElement(c.k,{icon:m.Z,disabled:!r,onClick:()=>S(e.uri),size:"XS",tooltipTitle:y().text("Delete attribute"),showForDisabled:!0}))):null)),a().createElement(o.Z,{open:!!T,onClose:()=>S(null),onConfirm:()=>{return e=T,C((t=>(0,g.without)([e],t))),void((0,g.isNil)(t[e])||h(e));var e}}))}},48017:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(24328),a=r.n(n),l=r(13896),o=r(52730),i=r(16299),s=r(40625),c=r(63149),u=r(94175),p=r(94079),d=r(87638);const m=(0,r(79692).Z)({dragLayer:{position:"fixed",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",zIndex:1300,pointerEvents:"none"},crosswalkPreview:{height:"28px",maxWidth:"394px",display:"flex",overflow:"hidden",padding:"6px",alignItems:"center",boxSizing:"border-box"},sourceLabel:{fontSize:"13px",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},sourceIcon:{width:"16px",height:"16px",marginRight:"9px"}}),b=e=>{let{crosswalk:t}=e;const r=m(),n=(0,c.nX)(t),l=(0,o.useSelector)(d.ZP.selectors.getMetadata),b=(0,i.tH7)(l,t.type);return a().createElement(s.Z,{color:n,className:r.crosswalkPreview},a().createElement(u.Z,{className:r.sourceIcon,sourceType:t.type}),a().createElement(p.Typography,{className:r.sourceLabel,variant:"body2"},b))},g=(0,n.memo)((()=>{var e;const t=m(),{isDragging:r,clientOffset:o,item:i}=(0,l.useDragLayer)((e=>({isDragging:e.isDragging(),clientOffset:e.getClientOffset(),item:e.getItem()}))),s=(0,n.useRef)(),c=(null===(e=s.current)||void 0===e?void 0:e.getBoundingClientRect())||{x:0,y:0},u=`translate(${(null==o?void 0:o.x)-(null==c?void 0:c.x)}px, ${(null==o?void 0:o.y)-(null==c?void 0:c.y)}px`;return r&&a().createElement("div",{ref:s,className:t.dragLayer},a().createElement("div",{style:{display:"flex",transform:u,WebkitTransform:u}},"Crosswalk"===i.type&&a().createElement(b,{crosswalk:i.crosswalk})))}))},79769:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),l=r(87918),o=r.n(l),i=r(94079),s=r(61305),c=r(17440);const u=(0,r(79692).Z)({caption:{paddingLeft:15,paddingTop:16,paddingBottom:8},controlButtons:{display:"flex",justifyContent:"flex-end",paddingBottom:10,paddingTop:20},cancelButton:{marginRight:20}}),p=e=>{let{className:t,onAdd:r,onClose:l}=e;const p=u(),[d,m]=(0,n.useState)({type:"",value:""});return a().createElement("div",{className:t},a().createElement(i.Typography,{variant:"body1",className:p.caption},o().text("Add crosswalk")),a().createElement(s.Z,{crosswalk:d,onDeleteAttribute:e=>{m((0,c.dissoc)(e))},onEditAttribute:(e,t)=>{m((0,c.assoc)(e,t))}}),a().createElement("div",{className:p.controlButtons},a().createElement(i.Button,{className:p.cancelButton,onClick:l},o().text("Cancel")),a().createElement(i.Button,{color:"primary",onClick:()=>{r(d),l()},disabled:!d.type||!d.value},o().text("Add"))))}},52017:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(24328),a=r.n(n),l=r(63149),o=r(77243),i=r(16299),s=r(52730),c=r(94079),u=r(72753),p=r(94175),d=r(22385),m=r(87638),b=r(79692);const g=(0,b.Z)((()=>({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.38,transition:"opacity 0.3s"}},wrapper:{width:"100%",display:"flex",alignItems:"center",height:28,backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMjYvMTMEw7WpAAAAeElEQVQ4ja3VuwrAIBBE0aup0uX/v9ImCCGSdIL4WF136+EwxcC6+3k/hAsxSREArvPAW2LAGFzFhqAG64JarAnuYBW4ixWgBZZBKwzAW2Ig7HAVCzHJ4AoGQsNVbAhqsC6oxZrgDlaBu1gBWmAZtMIA3MwLmMUAfmyqQ9/LD+oDAAAAAElFTkSuQmCC)"},focusedIcon:{width:28,height:28,backgroundColor:"rgba(0, 0, 0, 0.12)",borderRadius:0,borderRight:"1px solid #fff"},sourceIcon:{height:"16px",width:"16px",marginLeft:"16px",marginRight:"9px",fontSize:"14px"}}))),f=(0,n.memo)((e=>{let{crosswalkType:t,focusable:r=!0}=e;const{isDimmed:n}=(0,l.pu)(),o=g({isOpaque:!n}),b=(0,s.useSelector)(m.ZP.selectors.getMetadata),f=(0,i.tH7)(b,t);return a().createElement("div",{className:o.root},a().createElement(d.Z,{size:"XXS",className:o.focusedIcon,icon:r&&u.Z,disabled:!0}),a().createElement("div",{className:o.wrapper},a().createElement(p.Z,{className:o.sourceIcon,sourceType:t}),a().createElement(c.Typography,{variant:"body2"},f)))}));var y=r(87918),v=r.n(y),h=r(22983),E=r(19592),w=r(88611),x=r(40625),O=r(85209),k=r(8818),C=r(51229),T=r(71543),S=r(13896),I=r(42484),j=r(61305);const A=(0,b.Z)({root:e=>{let{isOpaque:t}=e;return{display:"flex",opacity:t?1:.19,transition:"opacity 0.3s"}},header:{width:"100%",display:"flex",alignItems:"center",height:"28px"},focusedIcon:e=>{let{isFocused:t}=e;return{width:"26px","&:not([disabled])":{border:"1px solid rgba(0, 0, 0, 0.12)"},height:"28px",color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0,margin:"0px 1px"}},crosswalkWrapper:{width:"100%",overflow:"hidden"},sourceIcon:{height:"16px",width:"16px",marginRight:"9px",fontSize:"14px"},attributesWrapper:e=>{let{color:t}=e;return{border:"1px solid",borderColor:t,position:"relative"}},deleteCrosswalkButton:{position:"absolute",top:5,right:5},labelValue:{marginLeft:5,marginRight:8},dependentIcon:{width:"16px",height:"16px",fillOpacity:.38}}),Z=(0,n.memo)((e=>{let{crosswalk:t,isDependent:r,isEmpty:o=!1,isColored:d=!0,focusable:b=!0,disableEdit:g,disableDelete:f,onDelete:y,onEdit:Z}=e;const N=(0,n.useRef)(null),P=(0,l.nX)(t),{toggleCrosswalkFocus:D,isFocused:R}=(0,l.BF)(t),V=o?"#FFF":d?P:"#CACCD1",{isDimmed:M,highlightCrosswalk:z,removeHighlight:W}=(0,l.pu)(t),[L]=(0,l.RT)(),U=A({color:V,isOpaque:!M,isFocused:R}),[F,B]=(0,n.useState)(!1),[H,Y]=(0,n.useState)(!1),_=(0,s.useSelector)(m.ZP.selectors.getMetadata),G=(0,i.tH7)(_,t.type),q=(0,i.nIW)(t.uri),X=(0,i.x_)(t),[,$,Q]=(0,S.useDrag)({item:{type:"Crosswalk",crosswalk:t},canDrag:!X}),J=!X&&"relation"!==t.ownerType;return(0,n.useEffect)((()=>{Q((0,I.r)(),{captureDraggingState:!0})}),[]),(0,n.useEffect)((()=>{var e;b&&L&&(0,i.aFF)(L,t)&&L!==t&&(null==N||null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}))}),[L]),a().createElement("div",{className:U.root,ref:N},a().createElement(k.k,{size:"XXS",className:U.focusedIcon,icon:b&&u.Z,onClick:()=>D(),disabled:!b,tooltipTitle:b&&v().text("Focus")}),a().createElement("div",{className:U.crosswalkWrapper},a().createElement(x.Z,{ref:$,className:U.header,color:V,variant:X?"outlined":"filled",onMouseEnter:()=>z(),onMouseLeave:()=>W()},r&&a().createElement(T.Z,{className:U.dependentIcon}),a().createElement(E.Z,{onClick:()=>B((e=>!e)),expanded:F}),a().createElement(p.Z,{className:U.sourceIcon,sourceType:t.type}),a().createElement(w.C,{value:G},a().createElement(c.Typography,{variant:"body2",noWrap:!0},G)),a().createElement(C.Z,null),a().createElement(w.C,{value:t.value},a().createElement(c.Typography,{variant:"body2",className:U.labelValue,noWrap:!0},t.value))),F&&a().createElement("div",{className:U.attributesWrapper},J&&a().createElement("div",{className:U.deleteCrosswalkButton},a().createElement(k.k,{icon:h.Z,disabled:f,onClick:()=>Y(!0),size:"XS",tooltipTitle:f?v().text("You don't have permissions to delete"):v().text("Delete crosswalk"),showForDisabled:!0}),a().createElement(O.Z,{open:H,onConfirm:()=>{R&&D(),y(q)},onClose:()=>Y(!1)})),a().createElement(j.Z,{crosswalk:t,canEditAttribute:!g,onEditAttribute:(e,t)=>{Z({crosswalkId:q,attributeName:e,value:t})},onDeleteAttribute:e=>{Z({crosswalkId:q,attributeName:e})}}))))})),N=(0,b.Z)((()=>({root:{display:"flex",alignItems:"center",height:"28px",paddingLeft:"37px"}}))),P=e=>{let{showMore:t,onClick:r}=e;const n=N();return a().createElement(c.Link,{className:n.root,component:"button",variant:"caption",underline:"none",onClick:r},a().createElement("span",null,t?v().text("View dependent crosswalks"):v().text("Hide dependent crosswalks")))},D=e=>{let{source:t,crosswalksByTypes:r,showCrosswalkColors:s=!0,crosswalksFocusEnabled:c=!0,expanded:u,disableEditCrosswalk:p,disableDeleteCrosswalk:d,onEdit:m,onDelete:b,onToggleExpanded:g}=e;const y=(0,l.RT)();return(0,n.useEffect)((()=>{!u&&c&&r[o.Y.Dependent].some((e=>y.some((0,i.aFF)(e))))&&g()}),[y]),a().createElement(a().Fragment,null,0===r[o.Y.Simple].length&&0===r[o.Y.Empty].length&&a().createElement(f,{crosswalkType:t,focusable:c}),r[o.Y.Simple].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),r[o.Y.Empty].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,focusable:c,isEmpty:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,isColored:s}))),u&&r[o.Y.Dependent].map((e=>a().createElement(Z,{key:e.uri,crosswalk:e,isDependent:!0,disableEdit:p,disableDelete:d,onDelete:b,onEdit:m,focusable:c,isColored:s}))),r[o.Y.Dependent].length>0&&a().createElement(P,{showMore:!u,onClick:()=>g()}))}},39417:(e,t,r)=>{r.d(t,{P:()=>i});var n=r(24328),a=r(17440),l=r(16299),o=r(31276);const i=e=>{let{onLoad:t=o.ZT,onSuccess:r=o.ZT,onError:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{t(),e.then((e=>{let{errors:t}=e;if(t)throw t;r()})).catch(i)}),[t,i,r]);return{addCrosswalk:(0,n.useCallback)((e=>{let{entity:t,contributorCrosswalk:r,crosswalk:n}=e;const o=r?(0,l.psB)({entityTypeUri:t.type,contributorCrosswalkType:r.type,contributorCrosswalkValue:r.value,contributorCrosswalkSourceTable:r.sourceTable,crosswalkType:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,crosswalkDeleteDate:n.deleteDate}):(0,l.kRE)({entityUri:t.uri,crosswalk:n});(0,a.pipe)((0,a.andThen)((e=>{let[t]=e;return t})),s)(o)}),[s]),editCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:o}=e;(0,a.pipe)((0,a.ifElse)((e=>{let{value:t}=e;return(0,a.isNil)(t)}),l.K$w,l.WVU),(0,a.andThen)((e=>{let[t]=e;return t})),s)({entityUri:t,crosswalkId:r,attributeName:n,value:o})}),[s]),deleteCrosswalk:(0,n.useCallback)((e=>{let{entityUri:t,crosswalkId:r}=e;(0,a.pipe)(l.Gmt,s)({entityUri:t,crosswalkId:r})}),[s])}}},85965:(e,t,r)=>{r.d(t,{Q:()=>u});var n=r(24328),a=r(16299),l=r(17440),o=r(31276);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const c=[],u=e=>{let{entity:t,onLoad:r=o.ZT,onModify:s=o.ZT,onError:u=o.ZT}=e;const[p,d]=(0,n.useState)(null),[m,b]=(0,n.useState)(null),g=(0,n.useRef)([]),f=(0,n.useRef)(null),y=(0,n.useCallback)((()=>{f.current=null}),[]),[v,h]=(0,n.useState)(c),E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce(((e,t)=>((0,a.sJj)(t).forEach((r=>{e[r]=[...e[r]||[],t]})),e)),{})};(0,n.useEffect)((()=>{const e={entity:E(null==t?void 0:t.crosswalks),relation:(0,l.pipe)(a.HQx,E)(t)};if((null==p?void 0:p.uri)===(null==t?void 0:t.uri)&&f.current){const{ownerType:t}=f.current,r=Object.keys(e[t]),n=Object.keys(m[t]);h((0,l.difference)(r,n))}else h(c);y(),d(t),b(e),g.current=[]}),[t]);const w=(0,n.useCallback)((0,l.pipe)(u,y),[u,y]),{deleteAttribute:x,ignoreAttribute:O,pinAttribute:k,createAttribute:C,updateAttribute:T}=(e=>{let{onSuccess:t=o.ZT,onError:r=o.ZT,onLoad:i=o.ZT}=e;const s=(0,n.useCallback)((e=>{i(),e.then((()=>{t()})).catch(r)}),[r,t,i]),c=(0,n.useCallback)((e=>e.then((e=>{if("error"in e)throw e.error;return e}))),[]);return{deleteAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalks:n}=e;const o=(0,a.YkG)(r)?(0,l.pipe)(a.o96,(0,l.prop)("objectURI"),a.VGk,c)(t):Promise.all((n||[]).map((e=>{let{type:r,value:n,sourceTable:l}=e;return c((0,a.xZs)({attributeUri:t.uri,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:l}))})));s(o)}),[s,c]),pinAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.xkv,c,s)({attributeUri:t.uri,value:!t.pin})}),[s,c]),ignoreAttribute:(0,n.useCallback)((e=>{let{attributeValue:t}=e;(0,l.pipe)(a.P8_,c,s)({attributeUri:t.uri,value:!t.ignored})}),[s,c]),updateAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,attributeType:r,crosswalk:n}=e;(0,a.YkM)(r)||(0,a.Or$)(r)||(0,l.pipe)(a.tCj,c,s)({attributeUri:t.uri,sourceUri:n.type,crosswalkValue:n.value,crosswalkSourceTable:n.sourceTable,value:(0,a.CwH)(r)?t.lookupCode:t.value})}),[s,c]),createAttribute:(0,n.useCallback)((e=>{let{attributeValue:t,crosswalk:r}=e;(0,l.pipe)(a.JV_,(0,l.andThen)((e=>{let[{errors:t}]=e;if(t)throw t})),s)({attributeUri:t.uri,sourceUri:r.type,crosswalkValue:r.value,crosswalkSourceTable:r.sourceTable,value:t.value})}),[s])}})({onLoad:r,onSuccess:s,onError:w}),S=(0,n.useCallback)((e=>{let{attributeType:t,parentUri:r,crosswalk:n,index:o}=e;const s=(0,a.gjI)({parentUri:r,attributeType:t}),{uri:c}=s;if(n){const{ownerType:e}=n;b((t=>i({},t,{[e]:i({},t[e],{[c]:[n]})})))}d((e=>{var n;return(0,l.isNil)(o)&&(o=null===(n=(0,a.JQy)(e,r,t.name))||void 0===n?void 0:n.length),(0,a.wLZ)({entity:e,attributeType:t,newAttribute:s,index:o})})),g.current.some((e=>(0,a.sOy)(c,e)))||g.current.push(c)}),[]),I=(0,n.useCallback)((e=>{const{attributeValue:{uri:t},attributeType:r}=e;(0,a.ZiX)(t)?(d((e=>(0,a.d$I)({entity:e,attributeType:r,uri:t}))),b((0,l.evolve)({entity:(0,l.dissoc)(t),relation:(0,l.dissoc)(t)})),g.current=(0,l.without)([t],g.current)):x(e)}),[x]),j=(0,n.useCallback)((e=>{if((0,a.ZiX)(e.attributeValue.uri)){const{attributeValue:t,attributeType:r,crosswalk:n}=e;if(!(0,l.isNil)(t.value)){const{uri:e}=t,l=g.current.find((t=>(0,a.sOy)(e,t))),o=(0,a.ww$)({entity:p,attributeType:r,uri:e,value:(0,a.kDl)(t)});C({attributeValue:(0,a.dLR)(o,l),crosswalk:n}),f.current=n}}else T(e)}),[C,T,p]);return{modifiedEntity:p,crosswalksMap:m,onAddAttribute:S,onDeleteAttribute:I,onPinAttribute:k,onIgnoreAttribute:O,onEditAttribute:j,newlyCreatedAttributes:v}}},77243:(e,t,r)=>{let n;r.d(t,{Y:()=>n}),function(e){e.Simple="simple",e.Empty="empty",e.Dependent="dependent"}(n||(n={}))},90186:(e,t,r)=>{r.d(t,{o:()=>s});var n=r(16299),a=r(17440),l=r(77243);const o=e=>e[l.Y.Simple].length>0?1:e[l.Y.Dependent].length>0?e[l.Y.Empty].length>0?2:3:4,i=(0,a.evolve)({[l.Y.Dependent]:(0,a.sort)(((e,t)=>{const r=e.sourceTable||"",n=t.sourceTable||"";return r===n?0:r?n?r<n?-1:1:-1:1}))}),s=(0,a.curry)(((e,t,r)=>{const s=(r||[]).reduce(((r,o)=>(r[o.type]||(r[o.type]={[l.Y.Simple]:[],[l.Y.Empty]:[],[l.Y.Dependent]:[]}),"relation"===o.ownerType?r[o.type][l.Y.Dependent].push(o):((e,t,r)=>0===(0,n.sJj)(r).filter((r=>{const l=(0,n.AFK)(r,e);return t.some((0,a.propEq)("uri",l))})).length)(e,t,o)?r[o.type][l.Y.Empty].push(o):((e,t,r)=>!(0,n.sJj)(r).some((r=>{const l=(0,n.AFK)(r,e),o=t.find((0,a.propEq)("uri",l));return o&&!(0,n.YkM)(o)})))(e,t,o)?r[o.type][l.Y.Dependent].push(o):r[o.type][l.Y.Simple].push(o),r)),{});return Object.keys(s).sort(((e,t)=>o(s[e])-o(s[t])||(e<t?-1:1))).map((e=>({source:e,crosswalksByTypes:i(s[e])})))}))},63149:(e,t,r)=>{r.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var n=r(24328),a=r.n(n),l=r(16299),o=r(17440),i=r(31276);const s=(0,n.createContext)(null),c=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["children"]);return a().createElement(s.Provider,{value:r},t)},u=e=>{const{getCrosswalkColor:t=(0,o.pipe)(l.uKF,l.CJp)}=(0,n.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,n.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:r=i.ZT}=(0,n.useContext)(s)||{},a=!!e&&!!t.find((0,o.eqBy)(l.uKF,e));return{isHighlighted:a,isDimmed:t.length>0&&!a,highlightCrosswalk:(0,n.useCallback)((()=>r(e,!0)),[e,r]),removeHighlight:(0,n.useCallback)((()=>r(e,!1)),[e,r])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:r=[]}=(0,n.useContext)(s)||{};return{isFocused:!!e&&r.some((0,o.eqBy)(l.uKF,e)),toggleCrosswalkFocus:(0,n.useCallback)((()=>t(e)),[e,t])}}},66095:(e,t,r)=>{r.d(t,{R:()=>i,Q:()=>s});var n=r(24328),a=r.n(n),l=r(16299);const o=(0,n.createContext)(null),i=e=>{let{children:t,attributeUris:r}=e;return a().createElement(o.Provider,{value:r},t)},s=e=>((0,n.useContext)(o)||[]).some((t=>(0,l.sOy)(t,e)))}}]);
package/6222.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6222],{48852:(e,t,n)=>{n.d(t,{l:()=>a});var r=n(24328),o=n.n(r);function l(){return l=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},l.apply(this,arguments)}const a=(e,t,n)=>{if(e&&t){const a=(0,r.memo)(n);return n=>o().createElement(e.Consumer,null,(e=>o().createElement(a,l({},n,t(e,n)))))}return n}},32528:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(13688),o=n(48852);const l=e=>t=>(0,o.l)(r.X,e,t)},60894:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(94656);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>o().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),o().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),d=n(17440),p=n(47458),m=n(87918),h=n.n(m),g=n(85657);const f=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:l,title:a,tooltipTitle:i}=e;const[s,m]=(0,r.useState)(null),f=(0,r.useCallback)((e=>{const t=(0,d.pipe)(g.JJ,(0,d.pluck)("id"))(e),r=(0,g.u)(n,e);l(r?(0,d.difference)(n,t):(0,d.uniq)((0,d.concat)(n,t)))}),[n,l]);return o().createElement(o().Fragment,null,o().createElement(u.k,{tooltipTitle:i||h().text("Show/hide columns"),size:"L",icon:c,onClick:e=>m(e.currentTarget)}),o().createElement(p.G,{onColumnClick:f,anchorEl:s,columnsData:t,onClose:()=>m(null),title:a,selectedColumns:n}))};f.propTypes={columnsData:i.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func,title:a().string,tooltipTitle:a().string};const y=f},47458:(e,t,n)=>{n.d(t,{G:()=>w});var r=n(24328),o=n.n(r),l=n(87918),a=n.n(l),i=n(17440),s=n(16299),c=n(44890),u=n(97820),d=n(85657),p=n(56656),m=n(54763),h=n(13980),g=n.n(h),f=n(7785),y=n(27239),b=n(71153),v=n.n(b);const x=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),k=e=>{let{item:t,onClick:n,checked:r,level:l,style:a,isFocused:i,isGroupItem:s,hideCheckBox:c}=e;const u=x();return o().createElement(f.Z,{hideCheckBox:c,key:t.id,onClick:n,checked:r,level:l,data:t,label:o().createElement(y.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:a,isFocused:i,hideIcon:s,className:v()({[u.groupItem]:s})})};k.propTypes={item:g().shape({label:g().string,filterText:g().string}),level:g().number,onClick:g().func,checked:g().bool,style:g().object,isGroupItem:g().bool,isFocused:g().bool,hideCheckBox:g().bool};const E=k,w=e=>{let{anchorEl:t,onClose:n,title:l,columnsData:h,onColumnClick:g,selectedColumns:f,hideCheckBox:y}=e;const b=x(),[v,k]=(0,r.useState)(""),w=(0,r.useMemo)((()=>(0,d.eX)(h,v)),[h,v]),C=(0,r.useMemo)((()=>(0,p.LG)(w)),[w]),S=(0,s.fW1)("label")(w)||308,O=(0,r.useCallback)((e=>{let{item:t}=e;return g(t)}),[g]),{focusIndex:T,handleKeyDown:z}=(0,m.t)({items:C,open:!0,onSelectFocusedItem:O,selectedItems:f,onClose:n}),M=(0,r.useCallback)((0,i.pipe)(n,(()=>k(""))),[n]),N=Math.min(300,32*C.length),P=Math.max(140,N+108);return o().createElement(u.Z,{className:b.popup,open:!!t,anchorEl:t,onClose:M,onSearch:k,title:l||a().text("Show/hide columns"),containerWidth:S,containerHeight:P,searchInputOnKeyDown:z},o().createElement(c.Z,{fixedTitle:!1,height:N,renderItem:(e,t,n)=>{let{item:r,level:l=0}=t;return o().createElement(E,{hideCheckBox:y,style:e,item:r,level:l,isFocused:T===n,checked:(0,d.u)(f,r),isGroupItem:(0,d.yf)(r),onClick:y?(0,i.pipe)(g,M):g})},items:C,getItemSize:()=>32,focusIndex:T}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>y,JJ:()=>b,yf:()=>i,u:()=>v});var r=n(17440),o=n(16299);function l(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){a(e,t,n[t])}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>e.id===e.groupId,s=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),c=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),d=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(c(t),s(t))))(e,t);return n?(n.children=d(n.children||[],t),e):e.concat(t)},p=(0,r.curry)(((e,t)=>o.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),m=(0,r.reduce)(((e,t)=>d(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),h=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(p(e)),(0,r.chain)((t=>[{item:l({},t,{filterText:e}),level:n},...t.children?h(e,t.children,n+1):[]])))(t)})),g=(0,r.has)("columns"),f=e=>{let{id:t,label:n,columns:o}=e;return[{id:t,groupId:t,label:n},...o.map((0,r.assoc)("groupId",t))]},y=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(g,f)),(0,r.filter)((0,r.either)(i,u)),m,h(t))(e),b=e=>e.children?(0,r.chain)(b,e.children):[e],v=(e,t)=>{const n=b(t),r=t=>e.includes(t.id);return i(t)?n.every(r):n.some(r)}},68439:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),l=n(52730),a=n(71153),i=n.n(a),s=n(94079),c=n(16299),u=n(87638);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 a=d(),p=(0,l.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 o().createElement(s.Typography,{style:{backgroundColor:g,color:c.P6Y.Colors.getColor(g)?"#FFFFFF":"#212121"},className:i()(a[`entityType-${r}`],n),component:"div"},(0,c.jFi)(p,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),l=n(13980),a=n.n(l),i=n(71153),s=n.n(i),c=n(52730),u=n(17440),d=n(94079),p=n(87918),m=n.n(p),h=n(16299),g=n(87638),f=n(53180),y=n(68439);const b=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:l,classes:a}=e;const i=b({classes:a}),p=(0,c.useSelector)(g.ZP.selectors.getMetadata),v=(0,r.useCallback)((()=>{navigator.clipboard.writeText((0,h.BTI)(n))}),[n]);if((0,u.isNil)(n))return null;const x=(0,h.idV)(n.label),k=n.secondaryLabel,E=(0,h.ptG)(p,n),w=(0,h.Fn9)(n),C=n.uri,S=(0,h.BTI)(n);return o().createElement("div",{className:s()(i.profileBandWrapper,t)},o().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":C},o().createElement(f.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),o().createElement("div",{className:i.profileInfo},o().createElement("div",null,o().createElement(d.Typography,{variant:"h6",className:i.label},x),k&&o().createElement(d.Typography,{variant:"subtitle2",className:i.secondaryLabel},k),E&&o().createElement(d.Typography,{variant:"subtitle1",className:i.businessCard},E)),o().createElement("div",{className:i.specialInfo},o().createElement("div",{className:i.entityType},o().createElement(y.Z,{entity:n,size:"medium",className:i.badge}),!(0,h.ZiX)(C)&&o().createElement(d.Tooltip,{title:m().text("Copy to clipboard")},o().createElement(d.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",S))))),l&&o().createElement("div",null,l)))};v.propTypes={className:a().string,entity:a().object,children:a().node,classes:a().object};const x=v},39827:(e,t,n)=>{n.d(t,{G:()=>m});var r=n(24328),o=n.n(r),l=n(71153),a=n.n(l),i=n(8818),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function 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,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const m=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:l,classes:s={}}=e;const c=u(),{active:m,buttonWrapper:h}=s,g=p(s,["active","buttonWrapper"]);return o().createElement("div",{className:a()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return o().createElement(i.k,d({},r,{classes:g,size:"S",key:t,className:a()({[a()(c.active,m)]:n===t},c.buttonWrapper,h),onClick:()=>l(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},68108:(e,t,n)=>{n.r(t),n.d(t,{default:()=>lt});var r=n(24328),o=n.n(r),l=n(52730),a=n(8598),i=n(36138),s=n(44443),c=n(22664),u=n(39450),d=n(585),p=n(87918),m=n.n(p),h=n(87638),g=n(16299),f=n(71820),y=n(57730),b=n(20562),v=n(2804),x=n(85965),k=n(85890),E=n(91515),w=n(54362),C=n(6674),S=n(63149),O=n(48017),T=n(96955),z=n(57304),M=n(3409),N=n(93873),P=n(66095),R=n(20982),L=n(39827),D=n(94079),U=n(80147),Z=n(87685),B=n(22385),I=n(79692);const H=(0,I.Z)({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"16px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12);"},closeButton:{marginRight:"12px"}}),F=e=>{let{title:t,className:n,onClose:r,children:l}=e;const a=H();return o().createElement("div",{className:n},o().createElement("div",{className:a.header},o().createElement(B.Z,{className:a.closeButton,icon:Z.default,onClick:r}),t),l)};var j=n(99144),W=n(17440),$=n(31276),A=n(83401);let V;!function(e){e.Crosswalk="crosswalks",e.Source="source",e.Contributor="contributor"}(V||(V={}));const G=e=>(0,W.pipe)((0,W.map)((0,W.prop)("value")),W.sum)(e);function X(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){Y(e,t,n[t])}))}return e}function Y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=e=>{let{data:t,width:n,height:o}=e;return(0,r.useMemo)((()=>{if(!n||!o)return{nodes:[],links:[]};const e=function(){let e=24,t=15,n=10,r=8,o=[1,1];function l(l){let{nodes:i,links:s}=l;const c={nodes:i,links:s};return function(e){let{nodes:t,links:n}=e;t.forEach((e=>{e.sourceLinks=[],e.targetLinks=[]})),n.forEach((e=>{e.source.sourceLinks.push(e),e.target.targetLinks.push(e)}))}(c),function(e){let{nodes:t}=e;t.forEach((e=>{e.value=Math.max(G(e.sourceLinks),G(e.targetLinks))}))}(c),function(t){let{nodes:n}=t;if(!n.length)return;let r,l=[n[0]],a=0;for(;l.length;)r=[],l.forEach((t=>{t.x=a,t.dx=e,t.targetLinks.forEach((e=>{r.indexOf(e.source)<0&&r.push(e.source)}))})),l=r,++a;if(n.forEach((e=>{e.x=a-1-e.x})),a>2){const t=(o[0]-2*e-22)/(a-2);n.forEach((n=>{n.sourceLinks&&0!=n.sourceLinks.length?n.x*=t:n.x=o[0]-e}))}else n[0].x=o[0]-e,n[1].x=n[0].x-22-e}(c),function(e){let{nodes:l,links:a}=e;const i=(0,W.pipe)((0,W.groupBy)((0,W.prop)("x")),W.toPairs,(0,W.sort)(((e,t)=>e[0]-t[0])),(0,W.map)((0,W.nth)(1)))(l);(function(){let e=(0,W.pipe)((0,W.map)((e=>(o[1]-(e.length-1)*r)/G(e))),(0,W.reduce)(Math.min,1/0))(i);const s=(0,W.pipe)((0,W.map)((e=>{var t;return e.value/((null===(t=e.targetLinks)||void 0===t?void 0:t.length)||1)})),(0,W.reduce)(Math.min,1/0))(l);e=Math.max(Math.min(e,t/s),n/s),i.forEach((t=>{t.forEach(((t,n)=>{t.y=n,t.dy=t.value*e}))})),a.forEach((t=>{t.dy=t.value*e}))})(),i.forEach((e=>{let t,n,l,a=0;const i=e.length;for(e.sort(((e,t)=>e.y-t.y)),l=0;l<i;++l)t=e[l],n=a-t.y,n>0&&(t.y+=n),a=t.y+t.dy+r;if(n=a-r-o[1],n>0)for(a=t.y-=n,l=i-2;l>=0;--l)t=e[l],n=t.y+t.dy+r-a,n>0&&(t.y-=n),a=t.y}));const s=(0,W.pipe)((0,W.map)((e=>(e.length-1)*r+(0,W.sum)((0,W.map)((e=>e.dy),e)))),(0,W.reduce)(Math.max,0))(i),c=(o[1]-s)/2;i.forEach((e=>{const{y:t,dy:n}=(0,W.last)(e),r=o[1]-(t+n);e.forEach((e=>{e.y+=r,c>0&&(e.y-=c)}))}))}(c),a(c),function(e){let{nodes:t}=e;(0,W.pipe)((0,W.groupBy)((0,W.prop)("x")),W.toPairs,(0,W.sort)(((e,t)=>t[0]-e[0])),(0,W.map)((0,W.nth)(1)))(t).forEach((e=>{(e=e.concat().sort(((e,t)=>e.y-t.y))).forEach(((t,n)=>{var o;if(null!==(o=t.sourceLinks)&&void 0!==o&&o.length){var l,a,i;const{target:o,ty:s,dy:c}=(0,W.last)(t.sourceLinks);let u=o.y+s+c-t.dy;(null===(l=e[n-1])||void 0===l?void 0:l.x)==t.x&&u<(null===(a=e[n-1])||void 0===a?void 0:a.y)+(null===(i=e[n-1])||void 0===i?void 0:i.dy)+r&&(u=e[n-1].y+e[n-1].dy+r),t.y>u&&(t.y=u)}}))}))}(c),c}function a(e){let{nodes:t}=e;(0,W.pipe)((0,W.groupBy)((0,W.prop)("x")),W.toPairs,(0,W.sort)(((e,t)=>e[0]-t[0])),(0,W.map)((0,W.nth)(1)))(t).forEach((e=>{e.forEach((e=>{var t,n;if(null!==(t=e.targetLinks)&&void 0!==t&&t.length){const t=[],n=e.targetLinks.map((e=>e.crosswalk.uuid)),r=[];e.targetLinks.forEach((function(e){-1==this.indexOf(e.source)&&this.push(e.source)}),r);for(let o=0;o<r.length;o++)for(let l=0;l<r[o].sourceLinks.length;l++){const a=n.indexOf(r[o].sourceLinks[l].crosswalk.uuid);-1!=a&&t.push(e.targetLinks[a])}e.targetLinks=t}if(null!==(n=e.sourceLinks)&&void 0!==n&&n.length){var r;const t=[];if(null!==(r=e.targetLinks)&&void 0!==r&&r.length){const n=e.sourceLinks.map((e=>e.crosswalk.uuid));for(let r=0;r<e.targetLinks.length;r++){const o=n.indexOf(e.targetLinks[r].crosswalk.uuid);-1!=o&&t.push(e.sourceLinks[o])}}const n=t.map((e=>e.crosswalk.uuid)),o=e.sourceLinks.filter((function(e){return-1==this.indexOf(e.crosswalk.uuid)}),n);if(e.sourceLinks=o.concat(t),t.length>0){let t=0;for(let e=0;e<o.length;e++)t+=o[e].dy;e.sizeForNewSources=t}}}))})),t.forEach((e=>{let t=0,n=e.sizeForNewSources||0;delete e.sizeForNewSources,e.sourceLinks.forEach((e=>{e.sy=t,t+=e.dy})),e.targetLinks.forEach((e=>{e.ty=n,n+=e.dy}))}))}return l.nodeWidth=()=>e,l.setNodeWidth=t=>(e=+t,l),l.nodePadding=()=>r,l.setNodePadding=e=>(r=+e,l),l.smallestNodeMaxHeight=()=>t,l.setSmallestNodeMaxHeight=e=>(t=+e,l),l.smallestNodeMinHeight=()=>n,l.setSmallestNodeMinHeight=e=>(n=+e,l),l.size=()=>o,l.setSize=e=>(o=e,l),l.update=e=>(a(e),e),l.link=()=>{let t=.5;function n(n){const r=!n.target.sourceLinks||0==n.target.sourceLinks.length,o=n.source.x+n.source.dx,l=n.target.x,a=(d=+(d=o),p=+(p=l),e=>d*(1-e)+p*e),i=a(t),s=a(1-t),c=n.source.y+n.sy-.13,u=n.target.y+n.ty-.13;var d,p;const m=r?"":`L${l+e},${u} L${l+e},${u+n.dy+.26}`;return c===u?`M${o},${c} \n L${l},${u}${m} \n L${l},${u+n.dy+.26} \n L${o},${c+n.dy+.26} Z`:`M${o},${c}\n C${i},${c} ${s},${u} ${l},${u}${m} \n L${l},${u+n.dy+.26} \n C${s},${u+n.dy+.26} ${i},${c+n.dy+.26} \n ${o},${c+n.dy+.26} Z`}return n.curvature=function(e){return arguments.length?(t=+e,n):t},n},l}().setNodeWidth(14).setNodePadding(20).setSize([o-2,n-2]),r=e.nodeWidth(),l=e.link(),a=(e=>{const t=e.nodes.map((e=>X({},e))),n=n=>{const r=e.nodes.indexOf(n);return t[r]},r=e.links.map((e=>X({},e,{source:n(e.source),target:n(e.target)})));return{nodes:t,links:r}})(t),{nodes:i,links:s}=e(a);return{nodes:i,links:s,nodeWidth:r,path:l}}),[t,o,n])};var J=n(94111),K=n(12147),q=n(98685);const Q=(0,I.Z)({tooltipTitle:{fontWeight:500,fontSize:"16px",lineHeight:"24px",letterSpacing:"0.15px",marginBottom:"8px",userSelect:"none"},tooltipRow:{display:"flex",alignItems:"center",fontSize:"13px",lineHeight:"15px",fontWeight:"normal","&:not(:last-child)":{marginBottom:"4px"}},tooltipIcon:{fontSize:"18px",color:"rgba(0, 0, 0, 0.54)",marginRight:"8px"},node:{stroke:"#000000",strokeWidth:1,strokeOpacity:.38},rootNode:{transform:"rotate(90deg)",userSelect:"none"}}),ee=e=>{let{user:t,time:n,children:r}=e;const l=Q(),a=o().createElement("div",null,o().createElement("span",{className:l.tooltipTitle},m().text("Merge details")),o().createElement("div",{className:l.tooltipRow},o().createElement(K.Z,{className:l.tooltipIcon}),m().date(n,"L LTS")),o().createElement("div",{className:l.tooltipRow},o().createElement(q.Z,{className:l.tooltipIcon}),t));return o().createElement(J.Z,{title:a,placement:"top"},r)},te=e=>{let{node:t,nodeWidth:n,highlightEnabled:l,isColored:a}=e;const i=Q(),[s,c]=(0,r.useState)(0),u=(0,r.useRef)(null),{x:d,y:p,name:m,label:h,targetLinks:g,sourceLinks:f,entity:{crosswalks:y=[],merges:b}}=t,[v]=y,{isDimmed:x,highlightCrosswalk:k,removeHighlight:E}=(0,S.pu)(v),w=(0,S.nX)(v),C=null!=y&&y.length?f[y.length-1].sy+f[y.length-1].dy:0;return(0,r.useEffect)((()=>{var e;const n=t.dy,r=(null==u||null===(e=u.current)||void 0===e?void 0:e.clientWidth)||0;n<r&&c(n/2-r/2)}),[]),o().createElement("g",{transform:`translate(${d},${p})`},"ROOT"===m?o().createElement("text",{dy:-5,dx:s,ref:u,className:i.rootNode},h||""):o().createElement(o().Fragment,null,o().createElement("rect",{height:C,width:14,className:i.node,fill:a?w:"#F0F0F0",key:"node-main",opacity:l&&x?.19:1,onMouseEnter:()=>{l&&k()},onMouseLeave:()=>{l&&E()}}),!(null==g||!g.length)&&(()=>{const e=(0,W.pipe)((0,W.map)((0,W.prop)("source")),(0,W.groupBy)((0,W.prop)("time")))(g);return null==b?void 0:b.map(((t,r)=>{let{time:a,user:s}=t;const c=e[a];if(!c)return;const[u,d]=c.reduce(((e,t)=>{let{sourceLinks:n}=t;return[(0,W.min)((0,W.head)(n).ty,e[0]),(0,W.max)((0,W.last)(n).ty+(0,W.last)(n).dy,e[1])]}),[1/0,0]);return o().createElement(ee,{user:s,time:a,key:"node-"+r},o().createElement("rect",{transform:`translate(0,${u})`,height:d-u,width:n,className:i.node,fillOpacity:.54,fill:"#F0F0F0",opacity:l&&x?.38:1}))}))})()))},ne=e=>{let{link:t,path:n,highlightEnabled:r,isColored:l}=e;const{crosswalk:a}=t,i=(0,S.nX)(a),{isDimmed:s,highlightCrosswalk:c,removeHighlight:u}=(0,S.pu)(a);return o().createElement("path",{d:n,fill:l?i:"#F0F0F0",opacity:r&&s?.1:1,onMouseEnter:()=>{r&&c()},onMouseLeave:()=>{r&&u()}})},re=e=>{let{width:t,height:n,data:l,accentContributors:a}=e;const[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(0),[d,p]=(0,r.useState)(0),{links:m,nodes:h,nodeWidth:g,path:f}=_({data:l,width:t,height:n});(0,r.useEffect)((()=>{p(0),u(0)}),[t,n]);const y=(0,r.useMemo)((()=>h.map(((e,t)=>o().createElement(te,{highlightEnabled:a,isColored:a,node:e,nodeWidth:g,key:`SankeyNode-${t}`})))),[h,a,g,t,n]),b=(0,r.useMemo)((()=>m.map(((e,t)=>o().createElement(ne,{highlightEnabled:!a,isColored:!a,link:e,path:f(e),key:`SankeyLink-${t}`})))),[a,m,f]),v=e=>{const t=e.pageX,n=t-c;return u(t),n},x=()=>s(!1),k=i?"none":"auto",E=i?"move":"default";return o().createElement("svg",{width:t,height:n,cursor:E,onPointerDown:e=>{e.preventDefault(),s(!0),v(e)},onPointerMove:e=>{if(!i)return;const t=v(e);p(d+t)},onPointerUp:x,onPointerLeave:x},o().createElement("g",{transform:`translate(${d},${n}) rotate(-90)`,pointerEvents:k},o().createElement("g",null,b),o().createElement("g",null,y)))};function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const le=(0,W.curry)(((e,t)=>!e||e.some((0,g.aFF)(t)))),ae=(0,W.curry)(((e,t)=>(0,W.evolve)({crosswalks:(0,W.filter)(le(e)),merges:(0,W.map)((0,W.evolve)({losers:(0,W.map)(ae(e))}))},t))),ie=e=>{let t=1;const n=(0,W.pipe)((0,W.evolve)({crosswalks:(0,W.map)((e=>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){oe(e,t,n[t])}))}return e}({},e,{uuid:t++})))}),(0,W.evolve)({merges:(0,W.map)((0,W.evolve)({losers:(0,W.map)((e=>n(e)))}))}));return n(e)},se=e=>{const t=[],n=[],r=(e,o,l)=>{const{crosswalks:a=[],merges:i=[],uri:s="",label:c}=e;t.push({entity:e,name:s,time:l,label:c});const u=t.length-1,d=(0,W.pipe)((0,W.chain)((e=>{let{losers:t,time:n}=e;return(0,W.pipe)((0,W.filter)((e=>{var t,n;return(null===(t=e.crosswalks)||void 0===t?void 0:t.length)||(null===(n=e.merges)||void 0===n?void 0:n.length)})),(0,W.chain)((e=>r(e,u,n))))(t)})),(0,W.concat)(a))(i);return-1!=o&&d.forEach((e=>n.push({source:t[u],target:t[o],value:10,crosswalk:e}))),d};r(e,-1,Date.now());const o=(0,W.pipe)((0,W.chain)((e=>{let{source:t,target:n}=e;return[t,n]})),W.uniq)(n);return{nodes:t.filter((e=>o.includes(e))),links:n}},ce=(0,I.Z)((()=>({graph:{padding:"8px 12px",boxSizing:"border-box",height:"100%",width:"100%",maxHeight:"500px"}}))),ue=(0,r.memo)((e=>{let{crosswalkTree:t,entityLabel:n,visibleCrosswalks:r,accentContributors:l}=e;const a=ce(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return(0,W.pipe)(ae(n),ie,se)({uri:"ROOT",label:t,crosswalks:[],merges:[{time:Date.now(),losers:[e]}]})}(t,n,r);return o().createElement("div",{className:a.graph},o().createElement(s.Z,{refreshMode:"debounce",refreshRate:100,handleWidth:!0,handleHeight:!0},(e=>{let{width:t=0,height:n=200}=e;return o().createElement(re,{width:t,height:n,data:i,accentContributors:l})})))}));var de=n(90186),pe=n(77243);function me(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){he(e,t,n[t])}))}return e}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=n(52017),fe=n(79769),ye=n(71153),be=n.n(ye),ve=n(72753),xe=n(65549);function ke(){return ke=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},ke.apply(this,arguments)}const Ee=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",ke({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M17 13.138l4.5 4.5-4.5 4.5V18.5h-1.247l-3.488-3.479 1.413-1.414 2.901 2.893H17v-3.362zM17 1.5L21.5 6 17 10.5V7.138h-.421l-11.03 11H2v-2h2.723l11.03-11H17V1.5zm-11.45 4l3.294 3.286-1.414 1.413L4.723 7.5H2v-2h3.55z",id:"svg457070356a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("mask",{id:"svg457070356b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg457070356a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg457070356b)",d:"M0 0h24v24H0z"})))};var we=n(22983),Ce=n(8818),Se=n(51229);const Oe=(0,I.Z)((e=>({root:{display:"flex",alignItems:"center",paddingRight:"8px","& button + button":{marginLeft:"4px"}},focusedIcon:e=>{let{isFocused:t}=e;return{width:28,height:28,color:t?"#000":"rgba(0, 0, 0, 0.54)",borderRadius:0}},title:{color:e.palette.text.secondary,paddingLeft:"6px",paddingRight:"2px"},uri:{lineHeight:"15px",color:e.palette.text.primary}}))),Te=e=>{let{contributorUri:t,focusable:n,disableAdd:r,disableUnmerge:l,onAdd:a,onUnmerge:i,onToggleFocus:s,onUnsubscribe:c,isFocused:u}=e;const d=Oe({isFocused:u});return o().createElement("div",{className:d.root},o().createElement(Ce.k,{size:"XXS",onClick:()=>s(),className:d.focusedIcon,icon:n&&ve.Z,disabled:!n,tooltipTitle:n&&m().text("Focus")}),o().createElement(D.Typography,{variant:"body2",className:d.uri},o().createElement("span",{className:d.title},m().text("Entity ID:")),(0,g.nIW)(t)),o().createElement(Se.Z,null),a&&o().createElement(Ce.k,{size:"XS",icon:xe.Z,disabled:r,tooltipTitle:m().text("Add crosswalk"),showForDisabled:!0,onClick:()=>a()}),o().createElement(Ce.k,{size:"XS",icon:Ee,disabled:l,tooltipTitle:m().text("Unmerge"),showForDisabled:!0,onClick:()=>i()}),c&&o().createElement(Ce.k,{size:"XS",icon:we.Z,disabled:l,tooltipTitle:m().text("Unsubscribe"),showForDisabled:!0,onClick:()=>c()}))},ze=(0,I.Z)((()=>({root:e=>{let{contributorColor:t}=e;return{fontSize:"13px",position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",border:"1px solid rgba(0, 0, 0, 0.05)",paddingLeft:"8px","&:before":{content:'" "',borderLeft:`8px solid ${t}`,position:"absolute",top:-1,left:0,bottom:-1},"& > div + div":{marginTop:"1px"}}},editor:{padding:"0px 30px 0px 25px"}}))),Me=e=>{let{className:t,contributorUri:n,accentContributor:a,crosswalksBySources:i,expandedSources:s,disableAddCrosswalk:c,disableEditCrosswalk:u,disableDeleteCrosswalk:d,disableUnmergeContributor:p,onUnmerge:m,onEdit:f,onDelete:y,onAdd:b,onToggleSourceExpanded:v,onUnsubscribeContributor:x}=e;const k=a?(0,g.GtP)(n):"rgba(0, 0, 0, 0.38)",E=ze({contributorColor:k}),w=(0,l.useSelector)(h.ZP.selectors.getDataTenants),C=(0,r.useRef)(null),[O]=(0,S.RT)();(0,r.useEffect)((()=>{var e;a&&O&&((0,W.pipe)((0,W.find)((e=>{let{source:t}=e;return t===O.type})),(0,W.propOr)({},"crosswalksByTypes"),W.values,W.flatten)(i).some((e=>(0,g.aFF)(O,e)&&e!==O))&&(null==C||null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})))}),[O]);const[T,z]=(0,r.useState)(!1),M=(0,W.pipe)((0,W.pluck)("crosswalksByTypes"),(0,W.find)((e=>e[pe.Y.Simple].length||e[pe.Y.Empty].length)),(0,W.props)([pe.Y.Simple,pe.Y.Empty]),W.flatten,W.head)(i),{toggleCrosswalkFocus:N,isFocused:P}=(0,S.BF)(M),R=(0,W.pipe)((0,W.pluck)("crosswalksByTypes"),(0,W.chain)(W.values),W.flatten)(i),L=(0,g.KMQ)(R,w);return o().createElement("div",{ref:C,className:be()(E.root,t)},o().createElement(Te,{contributorUri:n,focusable:a&&!!M,disableAdd:c,disableUnmerge:p,isFocused:a&&P,onToggleFocus:N,onAdd:M&&(()=>z(!0)),onUnmerge:m,onUnsubscribe:L&&(()=>x({contributorUri:n,dataTenant:L,crosswalk:M}))}),i.map((e=>{let{source:t,crosswalksByTypes:n}=e;return o().createElement(ge.Z,{key:t,source:t,crosswalksByTypes:n,showCrosswalkColors:!a,crosswalksFocusEnabled:!a,expanded:null==s?void 0:s.includes(t),disableEditCrosswalk:u,disableDeleteCrosswalk:d,onEdit:f,onDelete:y,onToggleExpanded:()=>v(t)})})),T&&o().createElement(fe.Z,{className:E.editor,onAdd:e=>b({contributorCrosswalk:M,crosswalk:e}),onClose:()=>z(!1)}))},Ne=(0,I.Z)((()=>({table:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"},tableRow:{"& + &":{marginTop:"10px"},margin:"auto",maxWidth:"448px"}})));function Pe(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){Re(e,t,n[t])}))}return e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Le=(0,r.memo)((e=>{let{accentContributors:t,entity:n,contributors:a,selectedAttributeTypes:i,onChangeVisibleCrosswalks:s,readOnly:c,onAddCrosswalk:u=$.ZT,onEditCrosswalk:d=$.ZT,onDeleteCrosswalk:p=$.ZT,onUnmergeContributor:m=$.ZT,onUnsubscribeContributor:f=$.ZT}=e;const y=(0,l.useSelector)(h.ZP.selectors.getMetadata),b=(0,g.nt9)(y,n.type),v=Ne(),x=(0,r.useMemo)((()=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=e.crosswalks,o=(0,g.HQx)(e);return t.filter((e=>!(0,g.O27)(e.crosswalks))).map((t=>{let{uri:l,crosswalks:a}=t;return{contributorUri:l,crosswalksBySources:(0,W.pipe)((0,W.map)((e=>{if("relation"===e.ownerType){const t=o.find((0,g.aFF)(e));return t&&me({ownerType:"relation"},t)}{const t=r.find((0,g.aFF)(e));return t&&me({ownerType:"entity"},t)}})),(0,W.filter)((e=>!!e)),(0,de.o)(e.type,n))(a)}})).filter((e=>{let{crosswalksBySources:t}=e;return t.length>0}))}(n,a,i)),[n,a,i]),[k,E]=(0,r.useState)({}),w=(0,r.useMemo)((()=>((e,t)=>e.reduce(((e,n)=>{let{contributorUri:r,crosswalksBySources:o}=n;const l=(0,W.chain)((e=>{var n;let{source:o,crosswalksByTypes:l}=e;const a=null===(n=t[r])||void 0===n?void 0:n.includes(o);return l[pe.Y.Simple].concat(l[pe.Y.Empty]).concat(a?l[pe.Y.Dependent]:[])}),o);return e.concat(l)}),[]))(x,k)),[x,k]);(0,r.useEffect)((()=>{s(w)}),[w]);const C=(0,r.useCallback)((e=>{p({entityUri:null==n?void 0:n.uri,crosswalkId:e})}),[null==n?void 0:n.uri,p]),S=(0,r.useCallback)((e=>{d(Pe({},e,{entityUri:null==n?void 0:n.uri}))}),[null==n?void 0:n.uri,d]);return o().createElement("div",{className:v.table},x.map((e=>{let{contributorUri:r,crosswalksBySources:l}=e;return o().createElement(Me,{key:r,className:v.tableRow,contributorUri:r,accentContributor:t,crosswalksBySources:l,disableAddCrosswalk:c||!(0,g.mkC)(b),disableEditCrosswalk:c||!(0,g.Zm0)(b),disableDeleteCrosswalk:c||!(0,g.a14)(b),disableUnmergeContributor:c||!(0,g.uGe)(g.BDP.UNMERGE,b),onAdd:e=>u(Pe({},e,{entity:n})),onDelete:C,onEdit:S,onUnmerge:()=>m(r),onUnsubscribeContributor:f,expandedSources:k[r],onToggleSourceExpanded:e=>{E((0,W.pipe)((0,W.unless)((0,W.has)(r),(0,W.assoc)(r,[])),(0,W.evolve)({[r]:(0,W.ifElse)((0,W.includes)(e),(0,W.without)([e]),(0,W.append)(e))})))}})})))}));var De=n(81556);const Ue=(0,I.Z)((e=>({container:{display:"flex",flexDirection:"column","& + &":{marginLeft:"16px"}},title:{fontSize:"13px",lineHeight:"15px",color:"#666666",marginBottom:"7px"},hintIcon:{width:"16px",height:"16px",verticalAlign:"middle"},graph:{width:"400px",height:"300px",borderRadius:"8px",background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",position:"relative"},checkedIcon:{position:"absolute",height:"20px",width:"20px",right:"10px",top:"10px",color:e.palette.primary.main},selectedTree:{border:`1px solid ${e.palette.primary.main}`,background:"rgba(0, 114, 206, 0.05)"}}))),Ze=e=>{let{coloredCrosswalks:t,crosswalkTree:n,selected:l,title:a,onSelect:i=$.ZT}=e;const s=Ue(),c=(0,r.useCallback)((e=>t.includes(e.uri)?(0,g.CJp)((0,g.uKF)(e)):"#CACCD1"),[t]);return o().createElement(S.hR,{getCrosswalkColor:c},o().createElement("div",{className:s.container,onClick:i},o().createElement("span",{className:s.title},a," ",o().createElement(j.Z,{className:s.hintIcon})),o().createElement("div",{className:be()(s.graph,{[`${s.selectedTree}`]:l})},l&&o().createElement(De.Z,{className:s.checkedIcon}),o().createElement(ue,{crosswalkTree:n}))))},Be=(0,I.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},trees:{display:"flex"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Ie=e=>{let{canUnmerge:t,contributor:n,crosswalkTree:l,onClose:a,onUnmergeContributor:i}=e;const s=Be(),[c,u]=(0,r.useState)(g.MBD.Unmerge),d=(0,r.useCallback)((e=>(0,g.keo)(n,e).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(D.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(D.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unmerge")),o().createElement(D.DialogContent,{classes:{root:s.dialogContent}},o().createElement(D.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,g.nIW)(n.uri).toUpperCase()),o().createElement("div",{className:s.trees},o().createElement(Ze,{onSelect:()=>u(g.MBD.Unmerge),selected:c===g.MBD.Unmerge,title:m().text("Unmerge"),crosswalkTree:l,coloredCrosswalks:d(!0)}),n.merges&&n.uri!==l.uri&&o().createElement(Ze,{onSelect:()=>u(g.MBD.TreeUnmerge),selected:c===g.MBD.TreeUnmerge,title:m().text("Tree unmerge"),crosswalkTree:l,coloredCrosswalks:d(!1)}))),o().createElement(D.DialogActions,null,o().createElement(D.Button,{onClick:a},m().text("Cancel")),o().createElement(D.Button,{disabled:!t,onClick:()=>{i(c),a()},color:"primary"},m().text("Unmerge"))))},He=(0,I.Z)((e=>({dialogContainer:{maxWidth:"unset"},dialogTitle:{padding:"13px 16px 0 16px",fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},dialogContent:{display:"flex",flexDirection:"column",padding:"13px 16px 0 16px"},uri:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.primary,marginBottom:"15px"},title:{fontSize:"13px",lineHeight:"15px",color:e.palette.text.secondary,paddingRight:"2px"}}))),Fe=e=>{let{canUnsubscribe:t,contributor:n,crosswalkTree:l,onClose:a,onUnsubscribeContributor:i}=e;const s=He(),c=(0,r.useMemo)((()=>(0,g.keo)(n,!0).map((e=>{let{uri:t}=e;return t}))),[n]);return o().createElement(D.Dialog,{open:!0,onClose:a,classes:{paper:s.dialogContainer}},o().createElement(D.DialogTitle,{classes:{root:s.dialogTitle}},m().text("Unsubscribe")),o().createElement(D.DialogContent,{classes:{root:s.dialogContent}},o().createElement(D.Typography,{variant:"body2",className:s.uri},o().createElement("span",{className:s.title},m().text("Entity URI:")),(0,g.nIW)(n.uri).toUpperCase()),o().createElement(Ze,{selected:!0,title:m().text("Unsubscribe"),crosswalkTree:l,coloredCrosswalks:c})),o().createElement(D.DialogActions,null,o().createElement(D.Button,{onClick:a},m().text("Cancel")),o().createElement(D.Button,{disabled:!t,onClick:()=>{i(),a()},color:"primary"},m().text("Unsubscribe"))))},je=(0,I.Z)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%"},modeSwitcher:{backgroundColor:e.palette.background.paper,marginTop:"8px"},infoIcon:{fontSize:"18px",marginRight:"8px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"5px 12px 10px 12px"},hintText:{fontSize:"12px",lineHeight:"16px"},crosswalksList:{height:"100%",width:"calc(100% - 24px)",margin:"8px 12px",background:e.palette.divider,opacity:.2},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},resizablePanesWrapper:{flexGrow:1,width:"100%"}})));function We(){return We=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},We.apply(this,arguments)}const $e=(0,r.memo)((e=>{let{activeMode:t,contributors:n,crosswalkTree:l,entity:a,onChangeMode:i,onUnmergeContributor:s=$.ZT,onUnsubscribeContributor:c=$.ZT}=e,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["activeMode","contributors","crosswalkTree","entity","onChangeMode","onUnmergeContributor","onUnsubscribeContributor"]);const d=je(),[p,h]=(0,r.useState)("50%"),f=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return h(t)}),[]),[y,b]=(0,r.useState)(),[v,x]=(0,r.useState)(),k=(0,r.useMemo)((()=>(0,g.Qbq)(l)>1),[l]),E=(0,r.useMemo)((()=>[{id:V.Crosswalk,title:m().text("Crosswalk")},{id:V.Source,title:m().text("Source")},{id:V.Contributor,title:m().text("Contributor")}]),[]),[w,C]=(0,r.useState)(),S=t===V.Contributor;return o().createElement("div",{className:d.root},y&&o().createElement(Ie,{canUnmerge:k,onClose:()=>b(null),onUnmergeContributor:e=>{s({entityUri:a.uri,contributorUri:y,operationType:e})},crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===y}))}),v&&o().createElement(Fe,{canUnsubscribe:k,onClose:()=>x(null),onUnsubscribeContributor:()=>c({dataTenant:v.dataTenant,crosswalk:v.crosswalk}),crosswalkTree:l,contributor:n.find((e=>{let{uri:t}=e;return t===v.contributorUri}))}),o().createElement(A.Z,{modes:E,modeId:t,className:d.modeSwitcher,onChange:i}),o().createElement(T.Z,{className:d.resizablePanesWrapper,orientation:"horizontal",size:p,minSize:170,maxSize:-170,allowResize:!0,onChange:f},o().createElement("div",{className:d.pane},l&&!(0,W.isEmpty)(w)&&o().createElement(ue,{entityLabel:(0,g.idV)(null==a?void 0:a.label),crosswalkTree:l,visibleCrosswalks:w,accentContributors:S})),o().createElement("div",{className:d.pane},o().createElement("div",{className:d.hint},o().createElement(j.Z,{className:d.infoIcon}),o().createElement("span",{className:d.hintText},m().text("You can drag a crosswalk to add values to attributes swimlanes"))),a&&o().createElement(Le,We({onUnmergeContributor:b,onUnsubscribeContributor:x,accentContributors:S,contributors:n,entity:a,onChangeVisibleCrosswalks:C},u)))))}));var Ae=n(67218);function Ve(){return Ve=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},Ve.apply(this,arguments)}const Ge=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ve({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("mask",{id:"svg4041339336a",masktype:"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"19",height:"17"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S4.83 6.5 4 6.5 2.5 5.83 2.5 5zM21 20H8v-2h13v2zM8 10h13V8H8v2zm0-4V4h13v2H8zm0 10h13v-2H8v2zm-2.5.5v-3h-3v3h3z",fill:"#fff"})),o().createElement("g",{mask:"url(#svg4041339336a)"},o().createElement("path",{fillOpacity:".54",fill:"#000",d:"M0 0h24v24H0z"})))},Xe=e=>{console.error(e),d.Z.addError({title:m().text("Error"),message:(0,g.xU7)(e,m().text("Something went wrong"))})};var Ye=n(39417),_e=n(58651),Je=n(13896);function Ke(){return Ke=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},Ke.apply(this,arguments)}const qe=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Ke({width:"90",height:"90",viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#0072CE",fillOpacity:".1"}),o().createElement("mask",{id:"svg985456408a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"90",height:"90"},o().createElement("circle",{cx:"45",cy:"45",r:"45",fill:"#fff"})),o().createElement("g",{mask:"url(#svg985456408a)"},o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-5.625 3.164h90V90h-90V3.164z",fill:"url(#paint0_linear)"}),o().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M66.01 19.992l20.615 20.615v52.337H32.83L18.281 79.131V19.99H66.01z",fill:"url(#paint1_linear)"}),o().createElement("path",{opacity:".06",fillRule:"evenodd",clipRule:"evenodd",d:"M16.523 20.39H87.54A2.46 2.46 0 0190 22.853v55.195a2.46 2.46 0 01-2.46 2.46H16.522a2.46 2.46 0 01-2.46-2.46V22.852a2.46 2.46 0 012.46-2.461z",fill:"#000"}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 19.688h70.664c.971 0 1.758.787 1.758 1.757v55.196c0 .97-.787 1.757-1.758 1.757H17.578c-.97 0-1.758-.787-1.758-1.757V21.445c0-.97.787-1.758 1.758-1.758z",fill:"#fff"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 25.536c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 29.754c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 57.305c0-.583.472-1.055 1.055-1.055h14.633a1.055 1.055 0 110 2.11H38.101a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 61.523c0-.582.472-1.054 1.055-1.054H60.54a1.055 1.055 0 110 2.11H37.969a1.055 1.055 0 01-1.055-1.056z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M37.046 67.852c0-.583.472-1.055 1.055-1.055h28.696a1.055 1.055 0 110 2.11H38.1a1.055 1.055 0 01-1.055-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M36.914 72.07c0-.582.472-1.054 1.055-1.054h26.087a1.055 1.055 0 110 2.109H37.97a1.055 1.055 0 01-1.055-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 36.21c0-.582.472-1.054 1.054-1.054h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 40.43c0-.583.472-1.055 1.054-1.055h22.572a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"27.773",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"37.266",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"42.188",cy:"47.813",r:"2.109",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"59.414",r:"3.164",fill:"#B6C7DB"}),o().createElement("circle",{cx:"23.555",cy:"69.961",r:"3.164",fill:"#B6C7DB"}),o().createElement("path",{opacity:".8",fillRule:"evenodd",clipRule:"evenodd",d:"M48.648 46.758c0-.583.472-1.055 1.054-1.055h28.696a1.055 1.055 0 110 2.11H49.702a1.055 1.055 0 01-1.054-1.055z",fill:"#B6C7DB"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M48.516 50.977c0-.583.472-1.055 1.054-1.055h26.088a1.055 1.055 0 110 2.11H49.57a1.055 1.055 0 01-1.054-1.055z",fill:"#979797"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M32.524 37.969v-2.813h-.703v14.191h3.93v-.703h-3.227v-9.972h3.227v-.703h-3.227z",fill:"#2B98F0"}),o().createElement("path",{opacity:".54",fillRule:"evenodd",clipRule:"evenodd",d:"M33.423 27.07l-1.242 1.243-1.243-1.243h2.485z",fill:"#000"}),o().createElement("path",{opacity:".6",fillRule:"evenodd",clipRule:"evenodd",d:"M17.578 7.734h65.39a2.11 2.11 0 012.11 2.11v6.328a2.11 2.11 0 01-2.11 2.11h-65.39a2.11 2.11 0 01-2.11-2.11V9.844a2.11 2.11 0 012.11-2.11z",fill:"#fff"}),o().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M20.39 13.008a2.11 2.11 0 012.11-2.11h24.61a2.11 2.11 0 110 4.22H22.5a2.11 2.11 0 01-2.11-2.11zM52.031 13.008a2.11 2.11 0 012.11-2.11h3.515a2.11 2.11 0 110 4.22h-3.515a2.11 2.11 0 01-2.11-2.11z",fill:"#979797"})),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear",x1:"-5.625",y1:"3.164",x2:"-5.625",y2:"90",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:".01"}),o().createElement("stop",{offset:"1",stopColor:"#F4F4F4"})),o().createElement("linearGradient",{id:"paint1_linear",x1:"93.557",y1:"63.672",x2:"54.451",y2:"27.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopOpacity:".01"}),o().createElement("stop",{offset:"1"}))))},Qe=(0,I.Z)((e=>({root:{height:"100%",overflow:"hidden",background:e.palette.background.default,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"115px"},info:{color:e.palette.text.secondary,fontSize:"16px",lineHeight:"24px",marginTop:"16px"}}))),et=()=>{const e=Qe();return o().createElement("div",{className:e.root},o().createElement(qe,null),o().createElement("span",{className:e.info},m().text("Please persist your profile to be able to edit crosswalks")))},tt=(0,I.Z)({sourcesView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},resizablePanesWrapper:{flexGrow:1,height:"100%"},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"},tabs:{marginLeft:"1px"}});var nt;!function(e){e[e.Legend=0]="Legend",e[e.History=1]="History"}(nt||(nt={}));const rt=(0,l.connect)((e=>({entity:h.ZP.selectors.getEntity(e),metadata:h.ZP.selectors.getMetadata(e),historyEvent:h.ZP.selectors.getHistoryEvent(e)})))((e=>{var t,n;let{config:a,entity:i,metadata:s,getSavedState:c,saveState:u,dispatch:d,historyEvent:p}=e;const Z=tt(),[B,I]=(0,r.useState)(V.Crosswalk),[H,j]=(0,r.useState)(0),A=e=>j((t=>t===e?null:e)),G=null!==H,X=H===nt.History,{isHistoryEnabled:Y,isProfilePersisted:_}=(0,f.C)({isHistoryTabActive:X,entity:i}),J=_?i:null,K=null==J?void 0:J.uri,q=(0,g.nt9)(s,null==i?void 0:i.type),{historySlice:Q}=(0,y.a)({entity:J,historyEvent:p}),[ee,te]=(0,r.useState)();(0,b.D)((()=>{te(void 0)}),[Q]),(0,b.D)((()=>{te(void 0)}),[K]);const[ne,re]=(0,r.useState)(-480),oe=(0,r.useCallback)((e=>{let{percentageSize:t}=e;return re(t)}),[]),{isLoaded:le,savedState:ae}=(0,v.a)(c),[ie,se]=(0,r.useState)();(0,r.useEffect)((()=>{le&&se(ae.visibleColumns)}),[le]),(0,r.useEffect)((()=>{const e=!(0,W.equals)(ie,ae.visibleColumns);le&&e&&u({visibleColumns:ie})}),[ie]);const{crosswalkTree:ce,reload:ue}=(e=>{const[t,n]=(0,r.useState)(null),[o,l]=(0,r.useState)(!1),a=(0,Ae._)(),i=e=>{console.warn("Failed to load crosswalk tree",e),n(null)},s=(0,r.useCallback)((()=>{e?(l(!0),a((0,g.wo0)({entityUri:e})).then((e=>{n(e)})).catch(i).finally((()=>{l(!1)}))):n(null)}),[e]);return(0,r.useEffect)((()=>{s()}),[s]),{isLoading:o,crosswalkTree:t,reload:s}})((null==Q?void 0:Q.aEntity.uri)||K),de=(0,r.useMemo)((()=>(0,g.b7X)(ce)),[ce]),pe=(0,r.useCallback)((()=>{K&&d(h.N5.entity.actions.loadEntity({viewId:a.id,uri:K}))}),[K,a,d]),me=(0,r.useCallback)((0,W.pipe)(pe,ue),[pe,ue]),{modifiedEntity:he,crosswalksMap:ge,newlyCreatedAttributes:fe,onDeleteAttribute:ye,onPinAttribute:be,onIgnoreAttribute:ve,onEditAttribute:xe,onAddAttribute:ke}=(0,x.Q)({entity:(null==Q?void 0:Q.aEntity)||J,onModify:me,onError:Xe}),{addCrosswalk:Ee,deleteCrosswalk:we,editCrosswalk:Ce,unmergeContributor:Se,unsubscribeContributor:Oe}=(e=>{let{onLoad:t=$.ZT,onSuccess:n=$.ZT,onError:o=$.ZT}=e;const{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s}=(0,Ye.P)({onLoad:t,onSuccess:n,onError:o}),c=(0,l.useSelector)(h.ZP.selectors.getDtssPath),u=(0,l.useSelector)(h.ZP.selectors.getTenant),d=(0,r.useCallback)((e=>{t(),e.then((()=>{n()})).catch(o)}),[t,o,n]);return{addCrosswalk:a,editCrosswalk:i,deleteCrosswalk:s,unmergeContributor:(0,r.useCallback)((e=>(0,W.pipe)(g.L8n,d)(e)),[d]),unsubscribeContributor:(0,r.useCallback)((e=>{let{crosswalk:t,dataTenant:n}=e;return(0,W.pipe)(g.R9X,(0,W.andThen)((e=>{if(!e.successful)throw new Error(m().text("Failed to unsubscribe contributor"));return e})),d)({dtssPath:c,value:t.value,type:t.type,sourceTable:t.sourceTable,dataTenant:n.id,customerTenant:u})}),[d,c,u])}})({onSuccess:me,onError:(0,r.useCallback)((e=>{Xe(e),e.errorCode===g.Xt7.CROSSWALK_NOT_FOUND&&me()}),[me])}),{historyFilter:Te,onApplyFilter:ze,onClearFilter:Me,isLoading:Ne,historicUris:Pe,historyWithTotal:Re,canLoadMore:Le,onLoadMore:De}=(0,k.k)({entity:J,enabled:Y}),Ue=(e=>{let{activeMode:t,contributors:n}=e;const o=(0,r.useCallback)((e=>{var r;switch(t){case V.Source:return(0,g.kW2)(e.type);case V.Contributor:return(0,g.GtP)((null===(r=(0,g.A1W)(n,e))||void 0===r?void 0:r.uri)||"");case V.Crosswalk:return(0,g.CJp)((0,g.uKF)(e))}}),[t,n]),[l,a]=(0,r.useState)([]),i=(0,r.useRef)([]),s=(0,r.useCallback)((0,g.DsO)((()=>{a([...i.current])}),50),[]),c=(0,r.useCallback)((e=>{i.current=e,s(e)}),[s]),u=(0,r.useCallback)(((e,r)=>{if(e)if(r)if(t===V.Contributor){const t=(0,g.A1W)(n,e);c([e,...(null==t?void 0:t.crosswalks)||[]])}else c([e]);else c([])}),[t,c,n]),[d,p]=(0,r.useState)([]),m=(0,r.useCallback)(((e,t)=>(0,W.concat)(e.filter((e=>!(0,W.any)((0,g.aFF)(e),t))),t.filter((t=>!(0,W.any)((0,g.aFF)(t),e))))),[]),h=(0,r.useCallback)((e=>{if(e)if(t===V.Contributor){const t=(0,g.A1W)(n,e);p((n=>m([e,...(null==t?void 0:t.crosswalks)||[]],n)))}else p((t=>m([e],t)))}),[t,m,n]);return(0,r.useEffect)((()=>{p([])}),[t]),{getCrosswalkColor:o,highlightedCrosswalks:(0,r.useMemo)((()=>[...l,...d]),[l,d]),focusedCrosswalks:d,toggleCrosswalkFocus:h,setCrosswalkHighlighted:u}})({activeMode:B,contributors:de}),Ze=[{buttonProps:{id:nt.Legend,icon:Ge,tooltipTitle:m().text("Legend")},title:o().createElement(D.Typography,{variant:"h6"},m().text("Legend")),content:o().createElement($e,{activeMode:B,onChangeMode:I,entity:(null==Q?void 0:Q.aEntity)||J,crosswalkTree:ce,contributors:de,selectedAttributeTypes:ee,readOnly:!!Q,onAddCrosswalk:Ee,onUnmergeContributor:Se,onUnsubscribeContributor:Oe,onEditCrosswalk:Ce,onDeleteCrosswalk:we})},{buttonProps:{id:nt.History,icon:U.Z,tooltipTitle:m().text("History")},title:o().createElement(E.Z,{total:((null==Pe?void 0:Pe.length)||0)+1,entityType:q,filter:Te,onApplyFilter:ze,onClearFilter:Me}),content:_?o().createElement(w.Z,{isLoading:Ne,historyWithTotal:Re,contributorsUris:Pe,entityUri:K,historyEvent:p,onLoadMore:De,canLoadMore:Le}):o().createElement(C.Z,null)}];return o().createElement("div",{className:Z.sourcesView},o().createElement(S.hR,Ue,o().createElement(Je.DndProvider,{backend:_e.default},o().createElement(O.Z,null),o().createElement(T.Z,{className:Z.resizablePanesWrapper,orientation:"vertical",size:G?ne:"100%",minSize:480,maxSize:-480,allowResize:G,onChange:oe},o().createElement("div",{className:Z.pane},o().createElement(z.Z,{entity:(null==Q?void 0:Q.aEntity)||i},Q?o().createElement(M.Z,null):o().createElement(N.a,null)),_?o().createElement(P.R,{attributeUris:fe},o().createElement(R.Z,{visibleColumns:ie,onChangeVisibleColumns:se,entity:he,crosswalksMap:ge,selectedAttributeTypes:ee,onSelectAttributeTypes:te,readOnly:!!Q,onDelete:ye,onPin:be,onIgnore:ve,onEdit:xe,onAdd:ke})):o().createElement(et,null)),o().createElement(F,{className:Z.pane,title:null===(t=Ze[H])||void 0===t?void 0:t.title,onClose:()=>A(H)},null===(n=Ze[H])||void 0===n?void 0:n.content)))),o().createElement(L.G,{className:Z.tabs,buttonsProps:(0,W.pipe)((0,W.reject)((0,W.propEq)("hidden",!0)),(0,W.pluck)("buttonProps"))(Ze),onButtonClick:A,activeIndexId:H}))})),ot=(0,i.createGenerateClassName)({productionPrefix:"sourcesPerspective",disableGlobal:!0}),lt=e=>{let{config:t,store:n,onResize:p,saveState:m,getSavedState:h}=e;const f=(0,r.useCallback)((0,g.aYu)(h),[h]);return o().createElement(l.Provider,{store:n},o().createElement(u.m.Provider,{value:t.id},o().createElement(i.StylesProvider,{generateClassName:ot},o().createElement(c.MuiPickersUtilsProvider,{utils:a.Z},o().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==p?void 0:p(Math.floor(e),Math.floor(t))}),t&&o().createElement(rt,{config:t,saveState:m,getSavedState:f}),o().createElement(d.Z,null)))))}}}]);