@reltio/remotes 1.4.1229 → 1.4.1232
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/2771.js +1 -1
- package/2771.js.map +1 -1
- package/9431.js +1 -1
- package/9431.js.map +1 -1
- package/package.json +1 -1
package/2771.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2771],{79821:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),o=n.n(r),a=n(52730),l=n(59431),i=n(57941),s=n(97991);const c=(0,n(79692).Z)({icon:{maxHeight:"25px",maxWidth:"25px",marginRight:"16px"}}),u=e=>{let{group:t,metadata:n}=e;const r=c(),u=(0,a.useSelector)(l.ZP.selectors.getAbsoluteImagePath),p=(0,i.XH8)(n,{type:t.id}),d=(0,i.vPL)(u,p);return o().createElement(s.Z,{className:r.icon,icon:d,avatarText:t.title[0]})}},97991:(e,t,n)=>{n.d(t,{Z:()=>u});var r,o=n(94079),a=n(71153),l=n.n(a),i=n(24328),s=n.n(i);function c(){return c=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},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"}(r||(r={}));const u=e=>{let{className:t,icon:n,avatarText:a,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(n?r.ICON_MODE:r.TEXT_MODE)}),[n,a]);const h=()=>{m(r.ERROR_MODE)};switch(d){case r.ICON_MODE:return s().createElement(o.Avatar,c({className:l()(t,null==u?void 0:u.iconRoot),src:n,onError:h},p));case r.TEXT_MODE:case r.ERROR_MODE:return s().createElement(o.Avatar,c({className:l()(t,null==u?void 0:u.textRoot)},p),a);default:return null}}},99757:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(24328),o=n.n(r),a=n(87918),l=n.n(a),i=n(71153),s=n.n(i),c=n(17440),u=n(97820),p=n(54763),d=n(45767),m=n(88611),h=n(22385),f=n(79692);const g=(0,f.Z)({attribute:{cursor:"pointer",lineHeight:"16px",flexBasis:"100%",display:"flex",alignItems:"center",padding:"0 10px 0 16px",width:"calc(100% - 32px)","&$attributeWithValue":{borderBottom:"1px solid rgba(0,0,0,0.38)"},"&$disabled":{cursor:"default"}},disabled:{},attributeWithValue:{},noSelect:{},name:{fontSize:"14px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",direction:"rtl",textAlign:"left",flex:"1 0",width:"0","& $noSelect":{color:"rgba(0,0,0,0.38)"},"&$disabled":{color:"rgba(0,0,0,0.26)","& $noSelect":{color:"rgba(0,0,0,0.26)"}}}}),b=(0,c.either)((0,c.prop)("title"),(0,c.prop)("fieldName")),y=e=>{let{value:t,getLabel:n=b,onSelectAttributeClick:r,disabled:a=!1}=e;const i=g(),c=t&&n(t);return o().createElement("div",{onClick:a?void 0:r,className:s()(i.attribute,{[i.attributeWithValue]:!!c},{[i.disabled]:a})},o().createElement(m.C,{value:c},o().createElement("div",{className:s()(i.name,{[i.disabled]:a})},c||o().createElement("span",{className:i.noSelect},l().text("Select attribute")))),o().createElement(h.Z,{size:"M",icon:d.Z,disabled:a}))};var v=n(57941);function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=(0,c.eqBy)((0,c.pick)(["fieldName","uri","entityTypeUri"])),x=(e,t)=>t&&!!t.find(C(e)),O=(e,t)=>e.title.toLowerCase().includes(t.toLowerCase()),S=(e,t)=>O(e,t)||(e.children||[]).some((e=>S(e,t))),R=(e,t)=>e.findIndex(C(t)),P=(0,v.fW1)("title"),k=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const l=O(e,r);return[{item:r?w({},e,{filterText:r}):e,level:o,groupId:t,groupName:n}].concat(e.children?e.children.filter((e=>a||l||S(e,r))).flatMap((e=>k(e,t,n,r,o+1,a||l))):[]).flat()},T=(0,c.curry)(((e,t)=>t.map((t=>({item:t,items:t.attributes.filter((t=>S(t,e))).map((n=>k(n,t.id,t.title,e)))}))).filter((e=>e.items.length))));var M=n(52730),j=n(94079),N=n(59431),I=n(7785),A=n(44890),D=n(27239),Z=n(79821);const B=(0,f.Z)({subHeader:{backgroundColor:"#f5f5f5",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500}});function V(){return V=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},V.apply(this,arguments)}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){z(e,t,n[t])}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const H=(0,r.memo)((e=>{let{selectedAttributes:t,onItemClick:n,focusIndex:r,hideCheckBox:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["selectedAttributes","onItemClick","focusIndex","hideCheckBox"]);const i=B(),s=(0,M.useSelector)(N.ZP.selectors.getMetadata);return o().createElement(A.Z,V({getItemSize:(e,t)=>t.items?40:28,renderItem:(e,l,i)=>{let{item:s,level:c,groupId:u,groupName:p}=l;const d=x(s,t),m=i===r;return o().createElement(I.Z,{key:`item-${u}-${s.fieldName}`,onClick:n,checked:d,data:L({},s,{groupName:p}),notSelectable:s.notSelectable,hideCheckBox:a,label:o().createElement(D.Z,{text:s.title,highlight:s.filterText}),labelInText:s.title,level:c,style:e,isFocused:m,groupId:u,LogoIcon:s.LogoIcon})},renderGroupTitle:(e,t)=>o().createElement(j.ListItem,{component:"div",className:i.subHeader,style:e,key:`group-${t.item.id}`},t.item.needGroupIcon&&o().createElement(Z.Z,{group:t.item,metadata:s}),t.item.title),focusIndex:r},l))}));var F=n(56656);const W=(0,f.Z)({selector:{minWidth:"200px",alignItems:"stretch",background:"rgba(0,0,0, 0.0267)",boxSizing:"border-box",borderRadius:"4px",display:"flex"}}),_=(0,r.memo)((e=>{let{className:t,itemsGroups:n,value:a,getLabel:i,onSelect:d,onRestoreFocus:m=c.identity,onOpenPopup:h=c.identity,disableRestoreFocus:f=!1,disableEnforceFocus:g=!1,single:b=!1,ungroup:v=!1,disabled:E=!1,hideCheckBox:O=!1}=e;const S=W(),[k,M]=(0,r.useState)(null),j=(0,r.useCallback)((()=>M(null)),[]),N=!!k,[I,A]=(0,r.useState)(""),D=(0,r.useCallback)((()=>A("")),[]),[Z,B]=(0,r.useState)([]),V=(0,r.useCallback)((()=>B([])),[]),L=(0,r.useMemo)((()=>T(I,n)),[n,I]),z=(0,r.useMemo)((()=>(0,c.pipe)((0,c.when)((0,c.always)(v),(0,c.chain)((0,c.pipe)((0,c.prop)("items"),c.flatten,(0,c.map)((0,c.pick)(["item","level"]))))),F.LG)(L)),[v,L]),_=(0,r.useMemo)((()=>Math.max(P(L),308)),[L]),U=(0,c.pipe)((0,c.tap)((0,c.pipe)(V,D,j)),m),G=(0,r.useRef)(),q=(0,r.useCallback)(((e,t)=>{d({checked:t,attribute:e,index:t?Z.length:R(Z,e),selectedAttributes:Z}),b?(B(t?[e]:[]),U({})):(B((e=>{let{attribute:t,selectedAttributes:n,checked:r}=e;return r?n.concat(t):n.filter((e=>!C(t,e)))})({selectedAttributes:Z,attribute:e,checked:t})),G.current&&G.current.focus())}),[Z,d,b,U,G]),$=(0,r.useCallback)((e=>{let{onListItemClick:t,selectedAttributes:n}=e;return e=>{let{item:r,groupData:o}=e;const a=x(r,n);t(w({},r,{groupName:o.groupName}),!a)}})({onListItemClick:q,selectedAttributes:Z}),[q,Z]),{focusIndex:X,handleKeyDown:Y}=(0,p.t)({items:z,open:N,onSelectFocusedItem:$,selectedItems:Z,onClose:U});return o().createElement("div",{className:s()(S.selector,t),"data-reltio-id":"attribute-selector"},o().createElement(y,{value:a,getLabel:i,onSelectAttributeClick:e=>{h(),M(e.currentTarget)},disabled:E}),o().createElement(u.Z,{open:N,anchorEl:k,onClose:U,onSearch:A,title:l().text("Select attribute"),containerWidth:_,containerHeight:507,searchInputOnKeyDown:Y,anchorOrigin:{horizontal:"right",vertical:"bottom"},searchInputRef:G,disableRestoreFocus:f,disableEnforceFocus:g},o().createElement(H,{items:z,onItemClick:q,selectedAttributes:Z,width:_,height:400,focusIndex:X,hideCheckBox:O})))}))},74402:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),o=n(17440),a=n(57941);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>{let{rowIndex:t,columnData:{id:n},cellIndex:r}=e;return`${n}[${t}][${r}]`},s=()=>{const[e,t]=(0,r.useState)({}),n=(0,r.useRef)({}),s=(0,r.useCallback)((0,a.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},n.current))})),[]),c=(0,r.useCallback)((()=>{n.current={}}),[]);return{getDynamicRowCellHeight:(0,r.useCallback)((0,o.pipe)(i,(0,o.prop)(o.__,e)),[e]),changeRowCellHeight:(0,r.useCallback)((0,o.curry)((0,o.useWith)((0,o.pipe)(((e,t)=>{n.current[e]=t}),s),[i,o.identity])),[]),clearHeightsCache:c}}},74566:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(73038),s=n(58241),c=n(71153),u=n.n(c);const p=(0,n(79692).Z)((()=>({hidden:{visibility:"hidden"}}))),d=e=>{let{rowIndex:t,rowValue:n,className:a}=e;const l=p(),{toggleRowCollapse:c,getIsRowCollapsible:d,getIsRowCollapsed:m}=(0,r.useContext)(i.x),h=d(n),f=m(t);return o().createElement(s.Z,{className:u()(a,{[l.hidden]:!h}),isOpen:!f,onClick:e=>{c(t),e.stopPropagation()}})};d.propTypes={rowIndex:l().number,rowValue:l().object,className:l().string};const m=d},97946:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(44443),s=n(94079),c=n(20562);const u=e=>{let{onChangeHeight:t,children:n}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["onChangeHeight","children"]);const l=(0,r.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=a,h=t({rowIndex:p,cellIndex:m,columnData:d}),f=()=>l.current&&h(l.current.clientHeight);return(0,c.D)(f,[u.rawValue]),o().createElement("div",null,o().createElement(i.Z,{handleHeight:!0,onResize:f}),o().createElement(s.RootRef,{rootRef:l},n))};u.propTypes={onChangeHeight:l().func,children:l().node};const p=u},23598:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(71153),s=n.n(i),c=n(79692);const u=(0,c.Z)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));var p=n(87918),d=n.n(p),m=n(6782);const h="46px",f=(0,c.Z)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:h},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:h}}))),g=e=>{let{className:t,rowData:n}=e;const r=f();return o().createElement("div",{className:s()(r.readOnlyLogicOperatorContainer,t)},n&&n.operator?(0,m.Z)(n.operator):d().text("Where"))};g.propTypes={className:l().string,rowData:l().object};const b=g;var y=n(57941);const v=e=>{let{className:t,rowData:n}=e;const r=f();return o().createElement("div",{className:s()(r.readOnlyFilter,t)},n&&n.filter?(0,y.XS2)(n.filter):d().text("equals"))};v.propTypes={className:l().string,rowData:l().object};const w=v;var E=n(94656);const C=e=>{let{classes:t={},rowData:n,previousRowData:r,LogicOperatorComponent:a=b,AttributeSelectorComponent:l,FilterSelectorComponent:i=w,ValuesEditorComponent:c,ActionsComponent:p,filterSelectorRef:d,attributeSelectorProps:m={}}=e,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const f=u();return o().createElement("div",{className:s()(f.row,t.root)},o().createElement(a,{className:t.logicOperatorContainer,rowContext:h,rowData:r}),o().createElement("div",{className:s()(f.rowItem,t.attributeSelectorContainer)},o().createElement(l,{attributeSelectorProps:m,rowContext:h,rowData:n})),o().createElement("div",{className:s()(f.rowItem,t.filterSelectorContainer)},o().createElement(i,{textFieldInputRef:d,rowContext:h,rowData:n})),o().createElement("div",{className:s()(f.rowItem,f.fullWidth,t.valuesEditorContainer)},o().createElement(c,{rowContext:h,rowData:n})),o().createElement("div",{className:s()(f.rowItem,t.actionsContainer,{[f.hidden]:!n})},o().createElement(p,{rowContext:h,rowData:n})))};C.propTypes={classes:l().shape({root:l().string,logicOperatorContainer:l().string,attributeSelectorContainer:l().string,filterSelectorContainer:l().string,valuesEditorContainer:l().string,actionsContainer:l().string}),rowData:E.Xw,previousRowData:E.Xw,LogicOperatorComponent:l().elementType,AttributeSelectorComponent:l().elementType,FilterSelectorComponent:l().elementType,ValuesEditorComponent:l().elementType,ActionsComponent:l().elementType,filterSelectorRef:l().object,attributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const x=(0,r.memo)(C)},41315:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(17440),s=n(23598),c=n(94656);function u(){return u=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},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:n,rowsData:r,lastRowAttributeSelectorProps:a,filterSelectorRef:l,filterSelectorRefIndex:c}=e,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const d=(e,t,r)=>{const d=t>0?(0,i.path)([t-1],r):null,m=t===r.length?{attributeSelectorProps:a}:{};return o().createElement(s.Z,u({key:e&&e.id,rowData:e,previousRowData:d,classes:n,filterSelectorRef:t===c?l:void 0},p,m))};return o().createElement("div",{className:t},r.map(d),d(null,r.length,r))};p.propTypes={className:l().string,rowClasses:l().shape({root:l().string,logicOperatorContainer:l().string,attributeSelectorContainer:l().string,filterSelectorContainer:l().string,valuesEditorContainer:l().string,actionsContainer:l().string}),rowsData:l().arrayOf(c.Xw),LogicOperatorComponent:l().elementType,AttributeSelectorComponent:l().elementType,FilterSelectorComponent:l().elementType,ValuesEditorComponent:l().elementType,ActionsComponent:l().elementType,filterSelectorRef:l().object,filterSelectorRefIndex:l().number,lastRowAttributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const d=(0,r.memo)(p)},94175:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(59431),o=n(57941),a=n(24328),l=n.n(a),i=n(52730),s=n(97991);const c=e=>{let{sourceType:t,className:n,classes:a}=e;const c=(0,i.useSelector)(r.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,o.PWK)(c,t),d=(0,o.tH7)(c,u)[0];return l().createElement(s.Z,{className:n,avatarText:d,icon:p?(0,o.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null,variant:"square",rootClasses:a})}},87760:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(57941),o=n(24328),a=n.n(o),l=n(81303),i=n(13074);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=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},u.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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const d=e=>{let{values:t,valueContainerClassName:n}=e,r=p(e,["values","valueContainerClassName"]);return a().createElement(a().Fragment,null,(t||[]).map((e=>a().createElement("div",{key:e.uri,className:n},a().createElement(l.Z,u({attributeValue:e},r))))))},m=(0,o.memo)((e=>{let{expanded:t,LabelRenderer:n}=e,o=p(e,["expanded","LabelRenderer"]);const{attributeType:l,values:c,valueContainerClassName:u}=o;switch(l.type){case r.oS0.TYPE_NESTED:case r.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:n},o));case r.oS0.TYPE_IMAGE:return a().createElement("div",{className:u},a().createElement(i.Z,{attributeType:l,attributeValues:c,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},63149:(e,t,n)=>{n.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var r=n(24328),o=n.n(r),a=n(57941),l=n(17440),i=n(31276);const s=(0,r.createContext)(null),c=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children"]);return o().createElement(s.Provider,{value:n},t)},u=e=>{const{getCrosswalkColor:t=(0,l.pipe)(a.uKF,a.CJp)}=(0,r.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,r.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:n=i.ZT}=(0,r.useContext)(s)||{},o=!!e&&!!t.find((0,l.eqBy)(a.uKF,e));return{isHighlighted:o,isDimmed:t.length>0&&!o,highlightCrosswalk:(0,r.useCallback)((()=>n(e,!0)),[e,n]),removeHighlight:(0,r.useCallback)((()=>n(e,!1)),[e,n])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:n=[]}=(0,r.useContext)(s)||{};return{isFocused:!!e&&n.some((0,l.eqBy)(a.uKF,e)),toggleCrosswalkFocus:(0,r.useCallback)((()=>t(e)),[e,t])}}},90178:(e,t,n)=>{n.r(t),n.d(t,{default:()=>bc});var r=n(8598),o=n(13980),a=n.n(o),l=n(24328),i=n.n(l),s=n(44443),c=n(36138),u=n(22664),p=n(52730),d=n(17440),m=n(57941),h=n(10237),f=n(17554),g=n(49759),b=n(6521);const y={FIND_MATCHES:"findMatches",POTENTIAL_MATCHES:"potentialMatches",NOT_A_MATCH:"notAMatch"},v="FULL_SCREEN",w="HIDDEN",E="VISIBLE";var C=n(20562),x=n(58662),O=n(99136);const S=(0,l.createContext)({reloadData:()=>{},setReloadHandler:()=>{}}),R=(()=>{let e;return{reloadData:()=>{e&&e()},setReloadHandler:t=>{e=t}}})(),P=e=>{let{children:t}=e;return i().createElement(S.Provider,{value:R},t)};P.propTypes={children:a().node};const k=()=>{const e=(0,l.useContext)(S);if(void 0===e)throw new Error("useReloadData must be used within a ReloadDataProvider");return e};var T=n(31276),M=n(86361);function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){N(e,t,n[t])}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I=(0,l.createContext)(null),A=(0,l.createContext)(null),D="UPDATE_COMPARISON_VIEW_MODE",Z="SET_GLOBAL_SPINNER",B={setComparisonViewMode:(0,T.zD)(D),setGlobalSpinner:(0,T.zD)(Z)},V=(e,t)=>{switch(t.type){case D:return j({},e,{comparisonViewMode:t.payload});case Z:return j({},e,{isGlobalSpinnerActive:t.payload})}},L=e=>{let{children:t}=e;const[n,r]=(0,l.useReducer)(V,{comparisonViewMode:w,isGlobalSpinnerActive:!1}),o=(0,M.o)({actions:B,dispatch:r});return i().createElement(I.Provider,{value:n},i().createElement(A.Provider,{value:o},t))};L.propTypes={children:a().node};const z=()=>{const e=(0,l.useContext)(I);if(void 0===e)throw new Error("useViewState must be used within a ViewStateProvider");return e},H=()=>{const e=(0,l.useContext)(A);if(void 0===e)throw new Error("useViewStateActions must be used within a ViewStateProvider");return e},F=i().createContext(null);F.displayName="ColumnHandlerContext";var W=n(99341);const _=e=>({filter:"equals",fieldName:"type",values:[e]}),U=(e,t,n)=>{const r=m.wSh.fromNull(e).map(_).orSome("");return m.wSh.fromNull(t).map((e=>Object.entries(e).map((e=>{let[t,r]=e;const o=n.find((0,d.propEq)("id",t));return(0,W.su)(o,r)})))).orSome([]).concat(r)};var G=n(87918),q=n.n(G);const $=(0,d.pipe)((0,d.map)((e=>({id:(0,m.Tde)(e.uri),label:(0,m.idV)(e.label),dataTypeDefinition:(0,m.PFL)(e)})))),X=(0,d.pipe)(m.Fof,$),Y=(0,d.pluck)("id"),Q=(0,d.curry)(((e,t)=>e.map(m.Tde).some((e=>t.id===e||J(t)&&ee(t,e))))),K=e=>(0,m.QZu)(e.dataTypeDefinition),J=e=>(0,m.YkG)(e.dataTypeDefinition),ee=(0,d.curry)(((e,t)=>t.startsWith(`${e.id}.`))),te=(0,d.curry)(((e,t)=>K(t)&&e.some((e=>{let{id:n}=e;return ee(t,n)})))),ne=e=>(0,d.either)((0,d.includes)(d.__,e),te(e)),re=(e,t)=>(0,d.pipe)((0,d.reject)(K),(0,d.filter)(Q(e)))(t);var oe=n(67218);const ae=e=>{let{defaultColumnsData:t,additionalColumnsData:n,metadata:r,entityType:o}=e;return(0,l.useMemo)((()=>{const e=X(r,o),a=t.concat(n||[]).concat(e),l=(0,m.qhs)(r,o),i=((e,t)=>{const[n,r]=(0,d.pipe)((0,d.reject)(K),(0,d.partition)(Q(e)))(t);return n.length?[{id:"match",label:q().text("Match attributes"),columns:t.filter(ne(n))},{id:"all",label:q().text("All attributes"),columns:t.filter(ne(r))}]:t})(l,a);return[a,i,(0,d.pipe)(re,(0,d.concat)(t),Y)(l,e)]}),[t,n,r,o])};var le=n(26180);function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){se(e,t,n[t])}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ce="RESET",ue="SET_SELECTED_ITEMS",pe="TOGGLE_SELECT",de="SET_OPTIONS",me="SET_LIMIT_SELECTION",he=ie({},le.ZP.actions,{reset:(0,T.zD)(ce),toggleSelect:(0,T.zD)(pe),setSelectedItems:(0,T.zD)(ue),setOptions:(0,T.zD)(de),setLimitSelection:(0,T.zD)(me)}),fe=(e,t)=>{switch(t.type){case ce:return ie({},t.payload);case de:return ie({},e,{options:t.payload});case ue:return ie({},e,{selectedItems:t.payload});case pe:return(0,d.evolve)({selectedItems:n=>{const r=t.payload,o=n.findIndex((e=>e===r));if(o>-1)return(0,d.remove)(o,1,n);{const{limitSelection:t}=e;return(0,d.pipe)((0,d.when)((0,d.both)((0,d.complement)(d.isNil),(0,d.propSatisfies)((0,d.gte)(d.__,t),"length")),(0,d.take)(t-1)),(0,d.append)(r))(n)}}},e);case me:return ie({},e,{limitSelection:t.payload});default:return le.ZP.reducer(e,t)}},ge=(e,t,n,r)=>{const{field:o,order:a}=t,i={visibleColumns:e,filters:null,sorting:{field:o,order:a},page:0,rowsPerPage:n,selectedItems:[],options:r,limitSelection:null},[s,c]=(0,l.useReducer)(fe,i);return[(0,M.o)({actions:he,dispatch:c}),s,c]};var be=n(93428),ye=n(585);const ve=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:q().text("Can't add relationship")})},we=e=>{(null==e?void 0:e.errorCode)!==m.Xt7.DCR_ALREADY_EXISTS&&Ee(e)},Ee=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:(null==e?void 0:e.errorMessage)||q().text("Something went wrong...")})},Ce=()=>{const{setGlobalSpinner:e}=H(),{isGlobalSpinnerActive:t}=z(),{reloadData:n}=k();return{onStartRequest:(0,l.useCallback)((()=>{e(!0)}),[e]),onFinishRequest:(0,l.useCallback)((()=>{e(!1),n()}),[n,e]),isGlobalSpinnerActive:t}},xe=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a="iconButton",onMenuClose:l=T.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:c,onStartRequest:u}=Ce();return i().createElement(be.H,{className:n,disabled:s,entities:r,entity:o,mode:a,onMenuClose:l,onStartRequest:u,onFinishRequest:c,onError:Ee,"data-reltio-id":"reltio-potential-matches-merge-button",ref:t})}));xe.propTypes={className:a().string,entity:m.pyR,entities:a().arrayOf(a().object),mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},xe.displayName="mergeButton";var Oe=n(98808),Se=n(59431);function Re(){return Re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(this,arguments)}const Pe=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Re({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),i().createElement("defs",null,i().createElement("path",{d:"M10 6v2H4v12.22h12V14h2v6c0 1.05-.82 1.918-1.851 1.994L16 22H4c-1.05 0-1.918-.82-1.994-1.851L2 20V8c0-1.05.82-1.918 1.851-1.994L4 6h6zm4 10v2H6v-2h8zm-3.997-3l-.001 2H6v-2h4.003zM21 2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-7l-2 2 .005-11c0-.55.445-1 .995-1h8zm-10.996 8l-.001 2H6v-2h4.004zm9.286-6.3l-3.17 3.17-1.41-1.42-1.41 1.41 2.82 2.84 4.59-4.58-1.42-1.42z",id:"svg3192636834a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg3192636834b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg3192636834a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg3192636834b)",d:"M0 0h24v24H0z"})))},ke=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a="iconButton",onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n}=e;const{selectors:r}=Se.ZP,{setGlobalSpinner:o}=H(),{isGlobalSpinnerActive:a}=z(),i=(0,p.useSelector)(r.getWorkflowPath),s=(0,p.useSelector)(r.getWorkflowEnvironmentUrl),c=(0,p.useSelector)(r.getTenant),u=(0,d.prop)("uri"),h=(0,d.pipe)(d.concat,(0,d.map)(u))([n],t);return[a,(0,l.useCallback)((()=>{o(!0),(0,m.t6d)({workflowPath:i,processType:"potentialMatchReview",objectURIs:h,tenant:c,environment:s}).catch(we).finally((()=>{o(!1)}))}),[i,h,c,s,o])]})({entity:o,entities:r}),h=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),f=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath);return h&&!(0,m.O27)(f)?i().createElement(Oe.K,{className:n,disabled:c,mode:a,label:q().text("Potential match request"),icon:Pe,onClick:u,onMenuClose:s,ref:t}):null}));function Te(){return Te=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},Te.apply(this,arguments)}ke.propTypes={className:a().string,entity:m.pyR,entities:a().arrayOf(a().object),mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},ke.displayName="DCRReviewButton";const Me=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Te({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),i().createElement("defs",null,i().createElement("path",{d:"M19 14v3h3v2h-3v3h-2v-3h-3v-2l3-.001V14h2zM17 2a3 3 0 11-1.293 5.708l-4.535 4.535a5 5 0 11-1.414-1.414l4.534-4.536A3 3 0 0117 2zM7 12a3 3 0 100 6 3 3 0 000-6zm10-8a1 1 0 100 2 1 1 0 000-2z",id:"svg2192258504a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2192258504b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2192258504a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2192258504b)",d:"M0 0h24v24H0z"})))},je=(0,l.forwardRef)(((e,t)=>{let{className:n,mainEntity:r,currentEntity:o,matchRules:a,mode:l="iconButton",onClick:s=T.ZT,onMenuClose:c=T.ZT}=e;return i().createElement(Oe.K,{className:n,mode:l,label:q().text("Add relationship"),icon:Me,onClick:()=>s({mainEntity:r,currentEntity:o,matchRules:a}),onMenuClose:c,ref:t})}));je.propTypes={className:a().string,mainEntity:m.pyR,currentEntity:m.pyR,matchRules:a().arrayOf(a().string),mode:a().oneOf(["iconButton","button","menuItem"]),onClick:a().func,onMenuClose:a().func},je.displayName="CreateRelationButton";var Ne=n(30885);const Ie=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a="iconButton",onMenuClose:l=T.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:c,onStartRequest:u}=Ce();return i().createElement(Ne.i,{className:n,disabled:s,entities:r,entity:o,mode:a,onMenuClose:l,onStartRequest:u,onFinishRequest:c,ref:t})}));Ie.propTypes={className:a().string,entity:m.pyR,entities:a().arrayOf(a().object),mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},Ie.displayName="NotMatchButton";var Ae=n(71153),De=n.n(Ae),Ze=n(8818);function Be(){return Be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Be.apply(this,arguments)}const Ve=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Be({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),i().createElement("defs",null,i().createElement("path",{d:"M3 15h8v-2H3v2zm0 4h8v-2H3v2zm0-8h8V9H3v2zm0-6v2h8V5H3zm10 0h8v14h-8V5z",id:"svg2461472690a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"#111",fillRule:"evenodd"},i().createElement("mask",{id:"svg2461472690b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2461472690a"})),i().createElement("path",{fillOpacity:".54",fill:"red",mask:"url(#svg2461472690b)",d:"M0 0h24v24H0z"})))};var Le=n(79692),ze=n(41128);const He=(0,Le.Z)((e=>({iconButton:{"& svg g path":{fill:e.palette.primary.main,fillOpacity:1}},comparisonButtonSelected:{backgroundColor:e.palette.primary.main,borderRadius:0,"& svg g path":{fill:"#FFFFFF",fillOpacity:1},"&:hover":{backgroundColor:(0,ze._j)(e.palette.primary.main,e.palette.action.hoverOpacity),"& svg g path":{fill:(0,ze._j)("#FFFFFF",e.palette.action.hoverOpacity)}}},comparisonButton:{backgroundColor:"#FFFFFF",borderRadius:0}}))),Fe=e=>{let{className:t,selectedMatchesCount:n}=e;const r=He(),{comparisonViewMode:o}=z(),{setComparisonViewMode:a}=H(),s=o===w,c=n>3,u=(0,l.useCallback)((()=>{a(s?E:w)}),[a,s]),p=(0,l.useMemo)((()=>c?q().text("Select 1-${maxProfilesToCompare} profiles to compare",{maxProfilesToCompare:3}):s?q().text("Show comparison view"):q().text("Hide comparison view")),[s,c]);return i().createElement(Ze.k,{tooltipTitle:p,className:De()(t,{[r.iconButton]:s,[r.comparisonButton]:s,[r.comparisonButtonSelected]:!s}),size:"S",onClick:u,icon:Ve,showForDisabled:!0,disabled:c})};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)}Fe.propTypes={entities:a().arrayOf(a().object),entity:m.pyR,className:a().string,selectedMatchesCount:a().number.isRequired};const _e=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",We({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),i().createElement("defs",null,i().createElement("path",{d:"M9 4c4.42 0 8 3.58 8 8s-3.58 8-8 8a8 8 0 01-7.419-5h2.224A6.002 6.002 0 009 18c3.31 0 6-2.69 6-6s-2.69-6-6-6a6.002 6.002 0 00-5.196 3H1.581A8 8 0 019 4zm8 .26c3.45.89 6 4.01 6 7.74 0 3.73-2.55 6.85-6 7.74v-2.09a5.99 5.99 0 000-11.3V4.26zM8 7.5l4.5 4.5L8 16.5V13H0v-2h8V7.5z",id:"svg689336942a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg689336942b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg689336942a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg689336942b)",d:"M0 0h24v24H0z"})))},Ue=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a="iconButton",onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n}=e;const{setGlobalSpinner:r}=H(),{isGlobalSpinnerActive:o}=z(),{reloadData:a}=k(),i=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),s=(0,p.useSelector)(Se.ZP.selectors.getTenant);return[o,(0,l.useCallback)((()=>{r(!0);const e={dtssPath:i,customerTenant:s,entity:n,entities:t};((0,m.biM)(n)?(0,m.XkY)(e):(0,m.uQS)(e)).finally((()=>{r(!1),a()}))}),[t,n,r,a,i,s])]})({entity:n,entities:r});return i().createElement(Oe.K,{className:o,disabled:c,mode:a,label:q().text("Save as potential match"),icon:_e,onClick:u,onMenuClose:s,ref:t})}));Ue.propTypes={entities:a().arrayOf(a().object),entity:m.pyR,className:a().string,mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},Ue.displayName="ReinstateMatchButton";const Ge=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a="iconButton",onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n,_tenant:r}=e;const{setGlobalSpinner:o}=H(),{isGlobalSpinnerActive:a}=z(),{reloadData:i}=k();return[a,(0,l.useCallback)((()=>{o(!0),(0,m.ck9)(n.uri,t).finally((()=>{o(!1),i()}))}),[t,n,o,i])]})({entity:n,entities:r});return i().createElement(Oe.K,{className:o,disabled:c,mode:a,label:q().text("Save on potential matches"),icon:_e,onClick:u,onMenuClose:s,ref:t})}));Ge.propTypes={className:a().string,entities:a().arrayOf(a().object),entity:m.pyR,mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},Ge.displayName="SetAMatchButton";const qe=(0,Le.Z)({container:{display:"flex",height:"100%",alignItems:"center",marginLeft:"8px"},mergeButton:{flexShrink:0,marginRight:"8px"},rightButton:{display:"flex",alignItems:"center",marginLeft:"auto"},moreOptions:{marginRight:"-2px"}}),$e={value:a().shape({show:a().bool,config:a().object,entity:m.pyR,entities:a().arrayOf(a().object),matchRules:a().arrayOf(a().string),permission:a().shape({canMerge:a().bool,canAddRelation:a().bool,canMark:a().bool})})},Xe=e=>{let{value:{show:t,entity:n,entities:r,permission:o}}=e;const a=qe(),{canMark:l}=o;return t?i().createElement(i().Fragment,null,i().createElement("div",{className:a.container},l&&i().createElement(Ge,{entity:n,entities:r,className:a.rightButton,mode:"button"}))):null};Xe.propTypes=$e;const Ye=Xe;var Qe=n(34635),Ke=n(87760);const Je=i().createContext({});function et(){return et=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},et.apply(this,arguments)}Je.displayName="ExpandedContext";const tt=(0,Le.Z)((()=>({complexAttributesHeadRenderer:{height:"100%",width:"100%",display:"flex",alignItems:"flex-start"},complexAttributesHeadLabel:{flex:1},attribute:{whiteSpace:"pre-wrap"},matchedAttribute:{fontWeight:500,height:"100%",margin:"-5px -16px",padding:"5px 16px",background:"rgba(140, 193, 82, 0.12)"}}))),nt=(e=>{const t=(0,l.forwardRef)(((t,n)=>{const{attributeType:r}=t,{expandedMap:o}=(0,l.useContext)(Je),a=o[r.uri];return i().createElement(e,et({},t,{expanded:a,ref:n}))}));return t.displayName="WithExpanded",t})(Ke.Z),rt=e=>{let{value:{attributeType:t,attributeValues:n,matched:r=!1}}=e;const o=tt();return i().createElement("div",{className:De()(o.attribute,{[o.matchedAttribute]:r})},i().createElement(nt,{values:n,attributeType:t}))};function ot(){return ot=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},ot.apply(this,arguments)}const at=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",ot({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),i().createElement("defs",null,i().createElement("path",{d:"M21.843 14.8l-4.242 4.243-4.243-4.243h8.485zM8 6v12H5V6h3zm2 8.919L12.941 18H10v-3.081zM13 6v6h-3V6h3zm5 0v6h-3V6h3z",id:"svg2425089452a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2425089452b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2425089452a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2425089452b)",d:"M0 0h24v24H0z"})))};function lt(){return lt=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},lt.apply(this,arguments)}const it=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",lt({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),i().createElement("defs",null,i().createElement("path",{d:"M15.879 12.879l4.242 4.242-4.242 4.243v-8.485zM8 6v12H5V6h3zm5 0v12h-3V6h3zm5 0v5.464l-3-3V6h3z",id:"svg1931425825a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg1931425825b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg1931425825a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1931425825b)",d:"M0 0h24v24H0z"})))},st=e=>{let{label:t,attributeType:n}=e;const r=tt(),{expandedMap:o,onExpandType:a}=(0,l.useContext)(Je),s=(0,l.useCallback)((()=>a(n.uri)),[a,n]),c=o[n.uri];return i().createElement("div",{className:r.complexAttributesHeadRenderer},i().createElement("div",{className:r.complexAttributesHeadLabel},t),i().createElement(Ze.k,{icon:c?at:it,size:"XS",onClick:s}))};st.propTypes={label:a().string,attributeType:m.EMD};var ct=n(22385),ut=n(93517),pt=n(87685);const dt=(0,Le.Z)({container:{position:"relative",width:"100%",height:"87px",display:"flex",overflow:"hidden"},closeButton:{position:"absolute",backgroundColor:"#FFFFFF",zIndex:1,borderRadius:"2px",margin:"4px"},profileCard_container:{overflow:"hidden"},profileCard_label:{display:"-webkit-box",lineClamp:2,boxOrient:"vertical",whiteSpace:"normal"},"@media all and (-ms-high-contrast: none), (-ms-high-contrast: active)":{profileCard_label:{display:"block",whiteSpace:"nowrap"}},profileCard_secondaryLabel:{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}),mt=e=>{let{value:{entity:t,showCloseButton:n,onClose:r}}=e;const o=dt();return i().createElement("div",{className:o.container},n&&i().createElement(ct.Z,{className:o.closeButton,icon:pt.default,onClick:r,size:"XXS"}),i().createElement(ut.Z,{entity:t,classes:{container:o.profileCard_container,secondaryLabel:o.profileCard_secondaryLabel,label:o.profileCard_label}}))};mt.propTypes={value:a().shape({entity:m.pyR,showCloseButton:a().bool,onClose:a().func})};const ht=mt;var ft=n(22071);const gt=(0,Le.Z)({container:{paddingTop:"7px"}});var bt=n(84504),yt=n(59119),vt=n(5434),wt=n(55847),Et=n(35071),Ct=n(24737),xt=n(89140),Ot=n(43054);const St=e=>"potentialMatchReview"===e.processType,Rt=(0,Le.Z)({container:{position:"relative",width:"100%",minHeight:"86px",display:"flex",overflow:"hidden"},assigneeSelector:{},assigneeContainer:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"16px 14px 16px 48px"}});function Pt(){return Pt=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},Pt.apply(this,arguments)}const kt=(0,d.pick)(["processInstanceComments","taskId"]),Tt=e=>{let{entity:t,match:n}=e;const r=Rt(),{tasks:o,loadTasks:a}=(e=>{let{entity:t,match:n}=e;const r=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),o=(0,p.useSelector)(Se.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,p.useSelector)(Se.ZP.selectors.getTenant),i=(0,oe._)(),{uri:s}=t,c=(0,m.ev7)(n),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)([]),b=(0,l.useCallback)((()=>{r&&c!==s&&(h(!0),i((0,m.uT0)({entityUri:s,workflowPath:r,environment:o,tenant:a})).then((e=>{const{data:t}=e,n=(0,d.propSatisfies)((0,d.includes)(c),"objectURIs"),r=(0,d.allPass)([St,n]),o=t.filter(r);g(o)})).finally((e=>h(!1))))}),[s,o,a,r,c]);return{enabled:!!r,loading:u,tasks:f,loadTasks:b}})({entity:t,match:n}),{isPending:s,sendMergeAllRequest:c}=(0,bt._)({entity:t,entities:[n.object]}),{isPending:u,sendMarkAsNotMatchRequest:h}=(0,yt.m)({entity:t,entities:[n.object]}),f={Merge:c,NotAMatch:h};(0,l.useEffect)((()=>{a()}),[a]);const g=o[0],b=(g&&g.possibleActions||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:f[t]}})),{assignee:y,getAssignees:v,updateAssignee:w,updateRequestIsInProgress:E}=(0,vt.r)(g||{}),C=b.length>0?i().createElement(wt.Z,{buttonComponent:ct.Z,buttonProps:{icon:Ot.Z,size:"L"},enabled:!s||!u,menuId:"custom-actions",menuItems:b}):null;return g?i().createElement("div",{className:r.container},i().createElement(Et.Z,Pt({},(e=>({date:e.dueDate,type:e.processDefinitionDisplayName,createdBy:e.createdBy,step:e.displayName}))(g),{Actions:C}),i().createElement("div",{className:r.assigneeContainer},i().createElement(Ct.Z,{className:r.assigneeSelector,enabled:!E||y,getOptions:v,onChange:w,hideSelectedOptions:!1,label:q().text("Assigned to"),value:y,defaultOptions:!0})),i().createElement(xt.V,kt(g)))):null};Tt.propTypes={entity:m.pyR,match:m.nqG};const Mt=e=>{let{value:{entity:t,match:n}}=e;return i().createElement(Tt,{entity:t,match:n})};Mt.propTypes={value:a().shape({entity:m.pyR,match:m.nqG})};const jt=[{id:"entityCard",label:"",cellRenderer:ht},{id:"matchControls",cellRenderer:()=>null},{id:"matchMethod",label:"Match Method",cellRenderer:e=>{let{value:{metadata:t,entity:n,match:r,entitiesMap:o,show:a}}=e;const l=gt();return a?i().createElement("div",{className:l.container},i().createElement(ft.Z,{entity:n,match:r,entitiesMap:o,metadata:t})):null}},{id:"workflowCard",label:"",cellRenderer:Mt},{id:"entityId",label:"Entity ID"}],Nt=(0,d.curry)(((e,t)=>`${e}/attributes/${t}`)),It=(0,d.pipe)((0,d.split)("/"),d.last),At="1px solid rgba(0,0,0,0.12)",Dt="2px solid rgba(0,0,0,0.12)",Zt=(0,Le.Z)((e=>({container:{overflow:"auto",height:"100%",width:"100%"},comparisonTable:{borderSpacing:0,"& td, & th":{borderRight:At,borderBottom:At,margin:0,verticalAlign:"top",textAlign:"left",fontSize:"13px",boxSizing:"border-box",wordBreak:"break-word",wordWrap:"break-word"},"& td":{minWidth:310,maxWidth:310,padding:"5px 16px",overflow:"hidden",height:0},"& td:empty, th:empty":{padding:"0px 16px"},"& th":{minWidth:212,maxWidth:212,padding:"5px 8px"},"& thead tr:first-child th:first-child":{borderBottom:"none",borderTop:"none"},"& td:first-child, th:first-child":{borderLeft:At,position:"sticky",left:"0",zIndex:2,backgroundColor:"white",color:e.palette.text.secondary,fontWeight:"normal"},"& td:nth-child(2), th:nth-child(2)":{borderRight:Dt,position:"sticky",left:"212px",zIndex:2},"& thead tr:first-child td, & thead tr:first-child th":{borderTop:"none",position:"sticky",top:"0",backgroundColor:"white",height:88,padding:0,zIndex:2},"& thead tr:nth-child(2) td, & thead tr:nth-child(2) th":{position:"sticky",top:"88px",backgroundColor:"white",height:48,padding:0,zIndex:2},"& thead tr:nth-child(3) td, & thead tr:nth-child(3) th":{position:"sticky",top:"136px",backgroundColor:"white",borderBottom:Dt,zIndex:2},"& thead tr:nth-child(-n+3) td:nth-child(-n+2), & thead tr:nth-child(-n+3) th:nth-child(-n+2)":{zIndex:3},"table& tr td:nth-child(2), th:nth-child(2)":{backgroundColor:"rgb(245,245,245)"}}})));function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Vt=e=>{let{className:t,entity:n,matches:r,metadata:o,config:a,selectedAttributes:s,entitiesMap:c,controlsRenderer:u}=e;const p=Zt(),h=(0,l.useMemo)((()=>((e,t,n,r)=>{const o=n||(e=>Object.keys(e.attributes).map(Nt(e.type)))(t),a=o.map((n=>{const r=(0,m.zeJ)(e,n,t.type),o=(0,m.xy8)(n);return r?{id:`${o}.${It(n)}`,label:r.label,attributeType:r,cellRenderer:rt,headCellRenderer:(0,m.YkM)(r)?st:void 0}:null})).filter(d.identity);return(e=>jt.map((0,d.when)((0,d.propEq)("id","matchControls"),(0,d.assoc)("cellRenderer",e))))(r).concat(a)})(o,n,s,u)),[o,n,s,u]),f=(0,l.useContext)(F),g=(0,l.useMemo)((()=>((e,t,n,r,o,a,l)=>[{object:n,isMainEntity:!0}].concat(r).map((r=>t.reduce(((t,i)=>(t[i.id]=((e,t,n,r,o,a,l)=>{const{object:i,isMainEntity:s,matchRules:c}=t;switch(o.id){case"entityId":return(0,m.BTI)(i);case"entityCard":return{entity:i,showCloseButton:!s,onClose:()=>l(t)};case"matchControls":return{show:!s,entity:r,entities:[i],matchRules:c,permission:(0,m.hXd)(e,a,i,r,c),config:a};case"matchMethod":return{metadata:e,entity:r,match:t,entitiesMap:n,show:!s&&!!c};case"workflowCard":return{entity:r,match:t}}if((0,m.vZp)(o.id)){const t=(0,m.xy8)(o.attributeType),n=(0,d.pipe)((0,d.pathOr)([],[t,o.attributeType.name]),(0,d.filter)(m.OXP))(i),a=(0,m.w80)(e,r.type,c||[]).includes((0,d.path)(["attributeType","uri"],o))&&!(0,m.O27)(n);return{attributeType:o.attributeType,attributeValues:n,matched:a}}})(e,r,o,n,i,a,l),t)),{}))))(o,h,n,r,c,a,f)),[o,h,r,n,c,a,f]),[b,y]=(0,l.useState)({}),v=(0,l.useCallback)((e=>{y((t=>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){Bt(e,t,n[t])}))}return e}({},t,{[e]:!t[e]})))}),[]),w=(0,l.useMemo)((()=>({expandedMap:b,onExpandType:v})),[v,b]);return i().createElement("div",{className:De()(p.container,t)},i().createElement("div",null,i().createElement(Je.Provider,{value:w},i().createElement(Qe.Z,{className:p.comparisonTable,rowsData:h,columnsData:g,theadRowsNumber:3}))))};Vt.propTypes={className:a().string,entity:m.pyR,matches:a().arrayOf(m.nqG),metadata:m.pGS,config:m.yxQ,selectedAttributes:a().arrayOf(a().string),entitiesMap:a().object,controlsRenderer:a().func};var Lt=n(94079),zt=n(92778),Ht=n(29103),Ft=n(83911);function Wt(){return Wt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}const _t=e=>{let{isFullscreen:t=!1,onClick:n=d.identity}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isFullscreen","onClick"]);return i().createElement(Ze.k,Wt({size:"L",icon:t?Ft.Z:Ht.Z,tooltipTitle:t?q().text("Exit full screen"):q().text("Full screen"),onClick:n},r))};_t.propTypes={isFullscreen:a().bool,onClick:a().func};const Ut=_t,Gt=e=>{let{onClick:t}=e;return i().createElement(ct.Z,{size:"L",icon:pt.default,onClick:t})};Gt.propTypes={onClick:a().func};const qt=Gt;var $t=n(60894),Xt=n(94656);const Yt=(0,Le.Z)((e=>({header:{"& > button":{margin:"0 -2px"},padding:"8px 15px 8px 0",borderLeft:"1px solid rgba(0,0,0,0.12)"},flex1:{flex:1},title:{display:"flex",flexDirection:"row",alignItems:"center"}}))),Qt=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:r}=e;const o=Yt(),{setComparisonViewMode:a}=H(),{comparisonViewMode:s}=z(),c=(0,l.useCallback)((()=>{a(w)}),[a]),u=(0,l.useCallback)((()=>{a(s!==v?v:E)}),[a,s]);return i().createElement(zt.Z,{title:"",classes:{root:o.header}},i().createElement("div",{className:De()(o.flex1,o.title)},i().createElement(qt,{onClick:c}),i().createElement(Ut,{onClick:u,isFullscreen:s===v}),i().createElement(Lt.Typography,null,q().text("Comparison view"))),i().createElement($t.Z,{title:q().text("Show/hide attributes"),tooltipTitle:q().text("Show/hide attributes"),columnsData:t,selectedColumns:n,onChangeColumns:r}))};Qt.propTypes={columnsData:Xt.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func};const Kt=(0,d.pipe)((0,d.split)("."),(0,d.slice)(0,2),(0,d.join)(".")),Jt=(0,d.pipe)((0,d.map)((0,d.when)(m.vZp,Kt)),d.uniq),en=(0,d.curry)(((e,t)=>(0,d.reduce)(((t,n)=>(n.id.startsWith(`${e}.`)&&!(0,m.QZu)(n.dataTypeDefinition)&&t.push(n.id),t)),[])(t))),tn=(0,d.curry)(((e,t)=>(0,d.pipe)((0,d.map)((0,d.when)(m.vZp,(t=>{const n=Kt(t),r=((e,t)=>e.reduce(((e,n)=>(0,d.pipe)((0,d.prop)("columns"),en(t),d.flatten,(0,d.concat)(e))(n)),[]))(e,n);return r.length?r:t}))),d.flatten,d.uniq)(t))),nn=(0,d.pipe)((0,d.prop)("id"),(0,d.both)(m.vZp,(0,d.pipe)((0,d.split)("."),(0,d.propSatisfies)((0,d.lt)(2),"length")))),rn=(0,d.map)((0,d.evolve)({columns:(0,d.reject)(nn)})),on=(0,Le.Z)((()=>({container:{display:"flex",flexDirection:"column"},table:{flex:1}}))),an=e=>{let{classes:t,columnsData:n,selectedColumns:r,onChangeColumns:o,selectedItems:a,config:l,metadata:s,entity:c,entitiesMap:u,controlsRenderer:p}=e;const h=on(),f=a.slice(-3),g=Jt(r),b=(y=c.type,v=g,(0,d.pipe)((0,d.filter)(m.vZp),(0,d.map)((e=>(0,m.h2W)(e,y))))(v));var y,v;return i().createElement("div",{className:De()(t.root,h.container)},i().createElement(Qt,{columnsData:rn(n),selectedColumns:g,onChangeColumns:(0,d.pipe)(tn(n),o)}),i().createElement(Vt,{className:h.table,entity:c,metadata:s,config:l,matches:f,selectedAttributes:b,entitiesMap:u,controlsRenderer:p}))};an.propTypes={entity:m.pyR,metadata:m.pGS,columnsData:Xt.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func,selectedItems:a().arrayOf(a().object),classes:a().object,config:m.yxQ,entitiesMap:a().object,controlsRenderer:a().func},an.defaultProps={classes:{}};const ln=e=>{let{fullScreenContainer:t,children:n}=e;return t?i().createElement(Lt.Portal,{container:t},n):i().createElement("div",null)};ln.propTypes={fullScreenContainer:a().instanceOf(Element),children:a().oneOfType([a().node,a().arrayOf(a().node)])};var sn=n(46177),cn=n(74402),un=n(94646),pn=n(97946),dn=n(25461),mn=n(85709),hn=n(92332),fn=n(67353);function gn(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){bn(e,t,n[t])}))}return e}function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yn={position:"relative",whiteSpace:"pre",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"},color:"rgba(0,0,0,0.87)"},vn={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},wn=(e,t)=>({"& > *":{position:"relative"},"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:e,pointerEvents:"none","div.hoveredRow &":{background:t||"none"}},"& $defaultWrapper::after":{background:`linear-gradient(to right, ${(0,ze.U1)(e,0)}, ${e} 100%)`,"div.hoveredRow &":{background:t&&`linear-gradient(to right, ${(0,ze.U1)(t,0)}, ${t} 100%)`}}}),En=(0,Le.Z)((e=>{const t=(0,ze.$n)(e.palette.primary.main,.88),n=(0,ze.$n)(e.palette.primary.main,.82),r=(0,ze.$n)("rgb(140,193,82)",.88),o=(0,ze.$n)("rgb(0, 0, 0)",.96),a={color:e.palette.primary.main,cursor:"pointer",textDecoration:"none"};return{link:a,hidden:{visibility:"hidden"},rowCheckbox:{marginLeft:"-9px",marginRight:"19px"},headCheckbox:{marginLeft:"6px"},headCell:{display:"flex",alignItems:"center",height:"56px",fontSize:"12px",position:"relative",flex:1,overflow:"hidden",color:"rgba(0,0,0,0.87)","&::after":gn({},vn,{width:"30px"})},headCellWithEntity:{height:"100%",display:"flex",flexDirection:"column"},rowCell:{fontSize:"12px",overflow:"hidden"},rowCellFirstColumn:{height:"100%"},firstEntityCell:{maxHeight:"200px"},entityRowCell:{fontSize:"12px",position:"relative"},entityRowCellSelected:wn(o),rowCellHighlighted:wn(r),rowCellSelected:wn(t,n),defaultWrapper:gn({},yn,{"&::after":gn({},vn,{"div.hoveredRow &":{background:"linear-gradient(to right, rgba(238, 238, 238, 0), rgba(238, 238, 238, 1) 100%)"}})}),hoveredDefaultWrapper:gn({},yn),entityWrapper:{paddingLeft:"12px"},profileWrapper:{height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",position:"relative"},entityLabel:gn({},a,{fontWeight:500}),commentsContainer:{position:"absolute",right:0,top:0,zIndex:1,height:"100%",display:"flex",alignItems:"center",paddingRight:"15px",backgroundColor:"#fff","&$checked":{backgroundColor:t}},checked:{},matchRulesWrapper:{padding:"12px 15px 4px 10px",display:"flex",alignItems:"center",boxSizing:"border-box"},blobWrapper:gn({},yn,{whiteSpace:"pre-wrap",height:"100px",boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}),imageWrapper:gn({},yn,{display:"flex","& > img":{height:"64px",width:"64px"}}),referenceWrapper:{display:"flex",alignItems:"center",boxSizing:"border-box",height:"48px"},entityAvatar:{transform:"scale(0.5)",marginLeft:"-10px"},collapseButton:{position:"absolute",left:"40px",zIndex:2},dragIcon:{position:"absolute",left:"-5px",zIndex:2,opacity:.38}}})),Cn=(0,fn.Z)((e=>{const t=En();return i().createElement("div",{className:t.headCell},i().createElement(hn.default,e))}));var xn=n(72768);const On=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const r=En();return i().createElement("div",{className:r.defaultWrapper},i().createElement(xn.Z,{value:t,dataTypeDefinition:n}))};On.propTypes={columnData:a().shape({dataTypeDefinition:a().object}),value:a().any};const Sn=On;var Rn=n(52049),Pn=n(74566),kn=n(31039),Tn=n(32528),Mn=n(14940);const jn=e=>{const{value:t,rowIndex:n,rowValue:r,onToggleSelect:o,entityToMatch:a,isRowSelected:s,hoverRowIndex:c}=e,u=En(),p=(0,l.useContext)(Rn.B),d=t!==a,h=n===c,f=0===n,g=h?u.hoveredDefaultWrapper:u.defaultWrapper,b=t.uri!==a.uri&&!h;return i().createElement(i().Fragment,null,i().createElement("div",{className:De()(g,u.profileWrapper,u.entityWrapper,{[u.firstEntityCell]:f&&!d})},h&&i().createElement(Mn.Z,{className:u.dragIcon}),i().createElement(Pn.Z,{className:u.collapseButton,rowIndex:n,rowValue:r}),i().createElement(Lt.Checkbox,{className:De()(u.rowCheckbox,{[u.hidden]:!d}),checked:s,onChange:o,"data-reltio-id":`reltio-matches-table-${p?p+"-":""}checkbox-${n}`}),i().createElement(kn.Z,{value:(0,m.wwR)(t),className:u.entityLabel},(0,m.idV)(t.label)),b&&i().createElement(un.Z,{className:De()(u.commentsContainer,{[u.checked]:s}),uri:(0,m.E_P)(a.uri,t.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:a.uri,matchEntityUri:t.uri}),allowOnlyOneComment:!0})))};jn.propTypes={value:m.pyR,rowIndex:a().number,rowValue:a().shape({rawValue:a().object}),onToggleSelect:a().func,isRowSelected:a().bool,columnsData:a().array,entityToMatch:m.pyR,hoverRowIndex:a().number};const Nn=(0,Tn.Z)(((e,t)=>{let{onToggleSelect:n,entityToMatch:r}=e,{rowValue:o,value:a}=t;const{rawValue:l}=o;return{onToggleSelect:()=>n(l),isRowSelectable:a!==r,entityToMatch:r}}))(jn);const In=e=>{let{isAllSelected:t,isSomeSelected:n,onCheckboxClick:r,isComparisonViewShown:o}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isAllSelected","isSomeSelected","onCheckboxClick","isComparisonViewShown"]);const l=En();return i().createElement("div",{className:l.headCell},i().createElement(Lt.Checkbox,{className:l.headCheckbox,indeterminate:n&&!t,checked:t,disabled:!n&&o,onChange:()=>r(),"data-reltio-id":"reltio-matches-table-selectAll-checkbox"}),i().createElement(hn.default,a))};In.propTypes={isSomeSelected:a().bool,isAllSelected:a().bool,onCheckboxClick:a().func,isComparisonViewShown:a().bool};const An=(0,Tn.Z)((e=>{let{selected:t,isAllSelected:n,onResetSelect:r,onSelectAll:o,isComparisonViewShown:a}=e;const l=!!t&&t.length>0;return{isSomeSelected:l,isAllSelected:n,onCheckboxClick:l?r:o,isComparisonViewShown:a}}))((0,fn.Z)(In));var Dn=n(74615),Zn=n(93301);const Bn=e=>{let{value:{transitiveMatchRules:t=[],matchRules:n=[]}={}}=e;const r=En();return i().createElement("div",{className:r.matchRulesWrapper},n.length>0&&i().createElement(Dn.Z,{matchRules:n}),t.length>0&&i().createElement(Zn.Z,{transitiveMatchRules:t}))};Bn.propTypes={value:a().shape({transitiveMatchRules:a().array,matchRules:a().array})};const Vn=Bn,Ln=e=>{let{value:{mlMatchRules:t=[]}={}}=e;const n=En();return i().createElement("div",{className:n.matchRulesWrapper},t.length>0&&i().createElement(Dn.Z,{isMlMatch:!0,matchRules:t}))};Ln.propTypes={value:a().shape({mlMatchRules:a().array})};const zn=Ln,Hn=e=>{let{value:t}=e;const n=En();return i().createElement("div",{className:n.blobWrapper,onScroll:T.UW},t)};Hn.propTypes={value:a().any};const Fn=Hn,Wn=e=>{let{value:t}=e;const n=En(),r=(0,m.efz)({value:t});return r&&i().createElement("div",{className:n.imageWrapper},i().createElement("img",{src:r}))};Wn.propTypes={value:a().any};const _n=Wn;var Un=n(31254);const Gn=e=>{let{value:t}=e;const n=En(),r=(0,p.useSelector)(Se.ZP.selectors.getMetadata);return t&&i().createElement("div",{className:De()(n.defaultWrapper,n.referenceWrapper)},i().createElement(Un.Z,{className:n.entityAvatar,entityType:(0,m.nt9)(r,(0,m.CZ8)(t).type)}),i().createElement(kn.Z,{value:(0,m.CZ8)(t).objectURI,className:n.link},(0,m.idV)(t.label)))};Gn.propTypes={value:a().any};const qn=Gn;function $n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xn=(0,d.split)("."),Yn=(e,t,n,r)=>n.map((o=>{const a=o.object,l=(0,m.ZYr)(e,n,a,r),i=o.matchRules||[],s=o.matchScore||0,[c,u]=(0,d.isEmpty)(l)?(0,d.pipe)((0,m.LS0)(e,a.type),m.UkJ)(i):[[],[]],p=(0,m.w80)(e,a.type,i),h={entity:a,matchRules:u,mlMatchRules:c,transitiveMatchRules:l,matchScore:s};return(0,d.pipe)((0,d.reduce)(((e,t)=>(0,d.assoc)(t.id,((e,t,n)=>{let{entity:r,transitiveMatchRules:o,matchRules:a,mlMatchRules:l,matchScore:i}=n;switch(t.id){case"label":return r;case"id":return(0,m.BTI)(r);case"matchRules":return{transitiveMatchRules:o,matchRules:a};case"mlMatchRules":return{mlMatchRules:l};case"score":return i;default:{const[e,...n]=Xn(t.id);return(0,d.pipe)((0,d.prop)(e),(0,m.tT_)(n))(r)}}})(0,t,h),e)),{}),(0,d.assoc)("matchAttributes",p),(0,d.assoc)("rawValue",o))(t)})),Qn=e=>{if((0,m.vZp)(e)){const[,...t]=Xn(e);return t.length>1?t.slice(0,-1):null}return null},Kn=e=>{switch(e.id){case"label":return Nn;case"matchRules":return Vn;case"mlMatchRules":return zn;default:return(e=>{switch(e){case m.oS0.TYPE_BLOB:return Fn;case m.oS0.TYPE_IMAGE:return _n;case m.oS0.TYPE_REFERENCE:return qn;default:return Sn}})(e.dataTypeDefinition.type)}};function Jn(){return Jn=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},Jn.apply(this,arguments)}const er=e=>{let{rowValue:t,cell:n,CellValueRenderer:r,isRowSelected:o,isCellHighlighted:a,columnIndex:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["rowValue","cell","CellValueRenderer","isRowSelected","isCellHighlighted","columnIndex"]);const c=En(),u=0===l;return i().createElement("div",{className:De()({[c.rowCellSelected]:o,[c.rowCellHighlighted]:a,[c.rowCellFirstColumn]:u},c.rowCell)},n.values.map(((e,n)=>i().createElement(r,Jn({key:n,value:e,rowValue:t,isRowSelected:o},s)))))};er.propTypes={rowValue:a().object,cell:a().object,CellValueRenderer:a().elementType,isRowSelected:a().bool,isCellHighlighted:a().bool,columnIndex:a().number};const tr=(0,Tn.Z)(((e,t)=>{let{selected:n}=e,{columnData:r,rowValue:o,cell:a}=t;return{isRowSelected:!!n&&n.includes(o.rawValue),isCellHighlighted:Q(o.matchAttributes,r)&&!a.values.every(m.O27)}}))(er),nr=(0,Le.Z)((e=>({tableContainer:{flex:1,display:"flex",color:"rgba(0,0,0,0.54)",overflow:"hidden"},rowActionButtonsWrapper:{height:"100%",display:"flex",alignItems:"center",marginRight:"1px"},rowActionButtons:{backgroundColor:"rgba(238, 238, 238, 1)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",backgroundColor:"rgba(238, 238, 238, 1)",borderLeft:"1px solid rgba(0,0,0,0.12)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},checked:{},actionButton:{marginLeft:"12px","&:last-child":{marginRight:"3px"}},hoveredRowRightContentContainer:{alignItems:"center !important"}})));function rr(){return rr=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},rr.apply(this,arguments)}const or=e=>{let{entity:t,matches:n,metadata:r,columnsData:o,filters:s,onFilter:c,sorting:u,onSort:p,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,entitiesMap:y,actionButtonsRenderer:v,basicTableRef:w,isComparisonViewShown:E}=e;const C=nr(),[x,O]=(0,l.useState)(n);(0,l.useEffect)((()=>{O(n)}),[n]);const S=(0,l.useCallback)(((e,t)=>{O((0,d.move)(e,t)),U(t)}),[]),R=(0,l.useMemo)((()=>Yn(r,o,x,y)),[x,o,r,y]),P=!!p,k=(0,l.useMemo)((()=>((e,t)=>(0,d.map)((t=>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){$n(e,t,n[t])}))}return e}({sortable:e},t,{resizable:!0,nestedPath:Qn(t.id),headCellRenderer:"label"===t.id?An:Cn,rowCellValueRenderer:Kn(t)})))(t))(P,o)),[o,P]),T=(0,l.useMemo)((()=>t?Yn(r,o,[{object:t}]):[]),[t,r,o]),{getRowHeight:M,CellRenderer:j}=(0,sn.Z)({rowsData:T,columnsData:k,maxRowValuesCount:3}),N=M(0),I=(0,l.useMemo)((()=>{const e=(e=>t=>{const n=n=>{const r=En();return i().createElement(Rn.B.Provider,{value:"tableHeader"},i().createElement("div",{className:r.headCellWithEntity},i().createElement(t,n),i().createElement(e,{className:De()(r.entityRowCell,r.entityRowCellSelected),columnId:n.headCellData.id,rowIndex:0})))};return n.propTypes={headCellData:a().shape({id:a().string})},n})(j);return k.map((0,d.evolve)({headCellRenderer:e}))}),[k,j]),A=(0,l.useMemo)((()=>({isAllSelected:h.length>0&&h.length===n.length,entityToMatch:t,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,isComparisonViewShown:E})),[t,h,f,g,b,n,E]),{getDynamicRowCellHeight:D,changeRowCellHeight:Z,clearHeightsCache:B}=(0,cn.Z)();(0,l.useLayoutEffect)(B,[n]);const[V,L]=(0,l.useState)(!1),z=(0,l.useCallback)((()=>L(!0)),[]),H=(0,l.useCallback)((()=>L(!1)),[]),[F,W]=(0,l.useState)(!1),[_,U]=(0,l.useState)(null),G=(0,l.useCallback)((e=>{U((t=>V||F?t:e))}),[V,F]),q=(0,l.useMemo)((()=>{if(!v||null===_)return null;const e=x[_],n=h.includes(e);return i().createElement("div",{className:De()(C.rowActionButtonsWrapper)},i().createElement("div",{className:De()(C.rowActionButtons,{[C.checked]:n})},v({hoveredMatch:e,buttonClassName:C.actionButton,onActionsMenuOpen:z,onActionsMenuClose:H})),t&&i().createElement(un.Z,{className:De()(C.commentsContainer,{[C.checked]:n}),uri:(0,m.E_P)(t.uri,e.object.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:t.uri,matchEntityUri:e.object.uri}),onChangePopupVisibility:W,allowOnlyOneComment:!0,showAlways:!0}))}),[v,_,x,h,C,z,H,t]),$=(0,l.useCallback)((e=>{switch(e.columnData.id){case"label":return i().createElement(tr,rr({},e,{hoverRowIndex:_,actionsContent:q,tableRef:w}));case"matchRules":case"mlMatchRules":return i().createElement(pn.Z,rr({onChangeHeight:Z},e),i().createElement(tr,e));default:return i().createElement(tr,e)}}),[Z,_,q,w]),X=(0,l.useCallback)((0,d.either)(D,dn.Z),[D,dn.Z]),Y=(0,l.useMemo)((()=>({hoveredRowRightContentContainer:C.hoveredRowRightContentContainer})),[C]);return i().createElement("div",{className:C.tableContainer},i().createElement(mn.Z,{fixFirstColumn:!0,columnsData:I,rowsData:R,context:A,sorting:u,onSort:p,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:100,headRowHeight:56+N,renderRowCell:$,getRowCellHeight:X,hoverStateEnabled:!0,hoveredRowRightContent:q,hoverRowIndex:_,onRowHover:G,classes:Y,maxRowValuesCount:3,dndRowReorderingEnabled:!0,dndRowReorderingHandler:S,ref:w,hoveredContentPosition:0}))};or.propTypes={entity:m.pyR,metadata:m.pGS,columnsData:Xt.uz,matches:a().array,selected:a().array,onToggleSelect:a().func,onResetSelect:a().func,onSelectAll:a().func,filters:a().objectOf(Xt.Dq),onFilter:a().func,sorting:Xt.nI,onSort:a().func,entitiesMap:a().object,actionButtonsRenderer:a().func,basicTableRef:a().shape({current:a().object}),isComparisonViewShown:a().bool};const ar=or;var lr=n(51229),ir=n(1876),sr=n(30553),cr=n(98281);const ur=(0,Le.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,ze.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,ze.U1)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px",paddingLeft:"12px",paddingRight:"38px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0},hidden:{visibility:"hidden"},checkIcon:{color:"rgba(0,0,0,0.54)",marginRight:"12px"}})));function pr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dr=e=>{let{options:t,optionsData:n,onChangeOptions:r}=e;const o="options-menu",a=ur(),s=(0,l.useRef)(),[c,u]=(0,l.useState)(!1),p=()=>u((e=>!e));return i().createElement(i().Fragment,null,i().createElement(ct.Z,{icon:Ot.Z,size:"L",ref:s,className:De()(a.buttonRoot,{[a.selected]:c}),onClick:p,"aria-pressed":c,"aria-controls":c?o:void 0,"aria-haspopup":"true"}),i().createElement(Lt.Menu,{id:o,variant:"menu",open:c,autoFocus:!1,classes:{paper:a.paper},anchorEl:s.current,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:c}},n.map((e=>{const{label:n,id:o}=e,l=t[o];return i().createElement(Lt.MenuItem,{key:o,classes:{root:a.menuItem},onClick:()=>{u(!1),r(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){pr(e,t,n[t])}))}return e}({},t,{[o]:!l}))}},i().createElement(cr.Z,{className:De()(a.checkIcon,{[a.hidden]:!l})}),i().createElement(Lt.Typography,{classes:{root:a.menuText}},n))}))))};dr.propTypes={options:a().object,optionsData:a().array,onChangeOptions:a().func};const mr=dr,hr=(0,Le.Z)((e=>({header:{"& > button":{margin:"0 -2px"},paddingRight:"15px"},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500},flex1:{flex:1},selected:{backgroundColor:(0,ze.U1)(e.palette.primary.main,.12)}}))),fr=e=>{let{total:t,columnsData:n,selectedColumns:r,onChangeColumns:o,filtersEnabled:a,onToggleFilters:l,showFilters:s,options:c,optionsData:u,onChangeOptions:p}=e;const d=hr(),h=!(0,m.O27)(u);return i().createElement(zt.Z,{title:"",classes:{root:d.header}},i().createElement(Lt.Typography,{className:d.totalCaption,variant:"caption"},i().createElement("span",{className:d.totalNumber},q().number(t,"0,0")),q().text("total profiles")),i().createElement(lr.Z,null),s&&i().createElement(ir.Z,{enabled:a,onClick:l}),h&&i().createElement(mr,{options:c,optionsData:u,onChangeOptions:p}),(s||h)&&i().createElement(sr.Z,{height:28,margin:10}),i().createElement($t.Z,{columnsData:n,selectedColumns:r,onChangeColumns:o}))};fr.propTypes={total:a().number,showFilters:a().bool,columnsData:Xt.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func,filtersEnabled:a().bool,onToggleFilters:a().func,options:a().object,optionsData:a().array,onChangeOptions:a().func};const gr=fr,br=(0,Le.Z)((e=>({header:{"& > button":{margin:"0 -2px"},paddingRight:"15px"},flex1:{flex:1},selected:{backgroundColor:(0,ze.U1)(e.palette.primary.main,.12)}}))),yr=e=>{let{selectedItems:t,children:n}=e;const r=br(),o=t.length>0;return i().createElement(zt.Z,{title:"",classes:{root:De()(r.header,{[r.selected]:o})}},i().createElement("div",{className:r.flex1},i().createElement(Lt.Typography,{color:"primary"},q().text("Selected: ${count}",{count:t.length}))),n)};yr.propTypes={selectedItems:a().arrayOf(a().object),children:a().oneOfType([a().arrayOf(a().node),a().node])},yr.defaultProps={selectedItems:[]};const vr=yr,wr=(0,Le.Z)({actions:{display:"flex",alignItems:"center"},button:{marginLeft:"8px"}}),Er=(0,d.map)((0,d.prop)("object")),Cr=e=>{let{entity:t,matches:n,metadata:r,config:o}=e;const a=wr(),l=Er(n),{canMark:s}=(0,m.OCS)(r,o,t,n);return i().createElement("div",{className:a.actions},s&&i().createElement(Ge,{entity:t,entities:l,mode:"button"}),i().createElement(sr.Z,{height:28,margin:10}),i().createElement(Fe,{selectedMatchesCount:n.length}))};Cr.propTypes={entity:m.pyR,matches:a().arrayOf(a().object),metadata:m.pGS,config:m.yxQ};const xr=[{id:"label",get label(){return q().text("Profile name")},dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1},{id:"id",get label(){return q().text("Entity ID")},dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1}],Or=[{id:"showInactiveEntities",get label(){return q().text("Include entities that have ended")}}],Sr=(0,Le.Z)((e=>({tableView:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},matchesView:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},mainArea:{flex:1,display:"flex",flexDirection:"row",overflow:"hidden"},comparisonView:{width:"calc(100% - 280px)"},fullScreen:{height:"100%",zIndex:"200"}}))),Rr=(e,t)=>{(0,l.useEffect)((()=>{t(e!==w?3:void 0)}),[e,t])};function Pr(){return Pr=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},Pr.apply(this,arguments)}const kr=[20,50,100],[Tr]=kr,Mr=Y(xr),[jr]=Mr,Nr={showInactiveEntities:!1},Ir=(0,l.memo)((e=>{let{entity:t,metadata:n,config:r,fullScreenContainer:o}=e;const a=Sr(),[s,c]=ge(Mr,{order:"asc",field:jr},Tr,Nr),{comparisonViewMode:u,isGlobalSpinnerActive:p}=z(),{changeRowsPerPage:h,changePage:f,changeColumns:g,toggleFilters:b,changeFilter:y,toggleSort:w,setSelectedItems:S,toggleSelect:R,setOptions:P,setLimitSelection:T}=s,{sorting:M,page:j,rowsPerPage:N,visibleColumns:I,filters:A,selectedItems:D,options:Z}=c,{uri:B,type:V}=t||{},[L,W,_]=ae({defaultColumnsData:xr,metadata:n,entityType:V}),G=(0,l.useMemo)((()=>I.map((e=>L.find((0,d.propEq)("id",e)))).filter(d.identity)),[I,L]);(0,l.useEffect)((()=>{g(_)}),[_,g]);const q=(0,l.useMemo)((()=>[...U(V,A,L),{filter:"not equals",fieldName:"uri",values:[B]}]),[V,A,L,B]),$=(0,l.useMemo)((()=>Y(G)),[G]),{entities:X,total:Q,findEntities:K}=(e=>{let{entityType:t,filters:n,select:r,sorting:o,page:a,rowsPerPage:i,options:s,enabled:c}=e;const{order:u,field:p}=o,{setGlobalSpinner:d}=H(),[h,f]=(0,l.useState)(0),[g,b]=(0,l.useState)([]),y=(0,oe._)(),v=["uri","label","type","secondaryLabel","defaultProfilePicValue"],w=s.showInactiveEntities?m.YJ7.ALL:m.YJ7.ACTIVE_ONLY,E=(0,l.useCallback)((()=>{c&&(d(!0),y(Promise.all([(0,m.ZOr)(n,{offset:a*i,max:i,sort:p,order:u,select:v.concat(r).join(","),activityFilter:w}),(0,m.j_Q)(n,{activityFilter:w})])).then((e=>{const[t,n]=e,{total:r}=n;b(t.map((e=>({object:e})))),f(r)})).finally((e=>d(!1))))}),[t,n,p,u,a,i,c,r,w]);return(0,l.useEffect)((()=>{E()}),[E]),{entities:g,total:h,findEntities:E}})({enabled:!!B,entityType:V,filters:q,sorting:M,select:$,page:j,rowsPerPage:N,options:Z}),{setReloadHandler:J}=k();J((()=>{K(),ee()}));const ee=(0,l.useCallback)((()=>{S([])}),[S]),te=(0,l.useCallback)((()=>{S(X)}),[S,X]);(0,l.useEffect)((()=>{const e=D.map((e=>X.find((t=>(0,m.ev7)(t)===(0,m.ev7)(e)))||e));S(e)}),[X]),(0,C.D)((()=>{f(0),ee()}),[B,A,Z]),Rr(u,T);const ne=u===v,re=u===E,le={entity:t,metadata:n,selectedItems:D||[],columnsData:W,config:r,selectedColumns:I,onChangeColumns:g,controlsRenderer:Ye},ie=(0,l.useCallback)((e=>{let{hoveredMatch:o,buttonClassName:a}=e;const l=[o.object],{canMark:s}=(0,m.hXd)(n,r,o.object,t,o.matchRules);return s&&i().createElement(Ge,{entity:t,entities:l,mode:"iconButton",className:a})}),[r,t,n]),se=(0,l.useRef)(null);return ne?i().createElement(ln,{fullScreenContainer:o},i().createElement(F.Provider,{value:R},i().createElement(an,Pr({},le,{classes:{root:a.fullScreen}})))):i().createElement("div",{className:a.matchesView},D&&D.length>0?i().createElement(vr,{selectedItems:D},i().createElement(Cr,{matches:D,entity:t,metadata:n,config:r})):i().createElement(gr,{total:Q,columnsData:W,selectedColumns:I,onChangeColumns:g,filtersEnabled:!!A,onToggleFilters:b,showFilters:!0,options:Z,optionsData:Or,onChangeOptions:P}),i().createElement("div",{className:a.mainArea},i().createElement("div",{className:a.tableView},i().createElement(ar,{entity:t,metadata:n,columnsData:G,matches:X,selected:D,onToggleSelect:R,onResetSelect:ee,onSelectAll:te,filters:A,onFilter:y,sorting:M,onSort:w,actionButtonsRenderer:ie,basicTableRef:se,isComparisonViewShown:re}),i().createElement(x.Z,{rowsPerPageOptions:re?[]:kr,count:Q,page:j,onChangePage:f,rowsPerPage:N,onChangeRowsPerPage:h,basicTableRef:se}),p&&i().createElement(O.Z,null)),re&&i().createElement(F.Provider,{value:R},i().createElement(an,Pr({},le,{classes:{root:a.comparisonView}})))))}));Ir.displayName="FindMatchesView",Ir.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,fullScreenContainer:a().instanceOf(Element)};var Ar=n(7718),Dr=n(3515),Zr=n(31274),Br=n(7154),Vr=n(91262);const Lr=(0,Le.Z)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"16px 16px 0"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px"},path:{color:e.palette.text.secondary,fontize:"13px",letterSpacing:0,lineHeight:"15px",padding:"6px 0"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}})));function zr(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){Hr(e,t,n[t])}))}return e}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fr=e=>{let{config:t,mainEntity:n,currentEntity:r,matchRules:o,open:a,onClose:s=d.identity}=e;const c=Lr(),u=(0,p.useDispatch)(),h=(0,p.useSelector)(Se.ZP.selectors.getMetadata),{relation:f={}}=(0,p.useSelector)((e=>Se.ZP.selectors.getRelationToAddByViewId(e,t.id)))||{},{inRelations:g=[],outRelations:b=[]}=(0,l.useMemo)((()=>((e,t,n,r,o)=>{const{isNotDuplicatedInRelation:a,isNotDuplicatedOutRelation:l}=(0,m.xE1)(),i=t=>(0,d.pipe)((0,d.assocPath)(["startObject","objectType"],(0,m.nt9)(e,t.startObject.objectTypeURI)),(0,d.assocPath)(["endObject","objectType"],(0,m.nt9)(e,t.endObject.objectTypeURI)))(t),s=(0,m.nt9)(e,r.type),c=(0,d.propOr)({},"matchActions",t),u=(0,m.dzT)(c,s,o),[p]=u.map((e=>{let{createRelation:t}=e;return t})).filter(d.identity);return(0,d.evolve)({inRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,r,n)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(a),(0,d.map)(i)),outRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,n,r)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(l),(0,d.map)(i))},p)||{}})(h,t,n,r,o)),[t,n,r,o,h]),{relationUri:y,relationType:v={}}=f,w=(0,d.pathOr)({},["object","attributes"],f),E=(0,l.useMemo)((()=>(0,m.xF8)(h,v)),[v,h]),C=(0,l.useMemo)((()=>zr({attributes:w},(0,m.p2l)(f))),[f,w]),x=t.id,O=(0,l.useCallback)((e=>{(0,d.pipe)(Se.N5.relations.actions.setRelationType(t.id,y),u)(e)}),[t,y,u]),S=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.addAttributes,u)(e.map((e=>zr({},e,{viewId:x}))))),[x,u]),R=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.modifyAttribute,u)(zr({},e,{viewId:x}))),[x,u]),P=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.removeAttribute,u)(zr({},e,{viewId:x}))),[x,u]),k=(0,l.useCallback)((()=>s(y)),[y,s]),T=(0,l.useCallback)((()=>u(Se.N5.errors.actions.errorsSet([]))),[u]),M=(0,l.useCallback)((()=>{const e=(0,m.xkB)(h,{relation:f});return u(Se.N5.errors.actions.errorsSet(e)),0===e.length}),[f,h,u]),j=(0,l.useCallback)((()=>{T(),k()}),[T,k]),N=`${(0,m.idV)(r.label)} → ${(0,m.idV)(n.label)}`,I=(0,d.isEmpty)(v);return i().createElement(Lt.Dialog,{open:a,fullWidth:!0,maxWidth:"sm",onClose:j,classes:{paper:c.dialogPaper}},i().createElement(Lt.DialogTitle,{disableTypography:!0,classes:{root:c.dialogTitle}},i().createElement(Lt.Typography,{variant:"subtitle1",classes:{root:c.titleText}},q().text("Add relationship")),i().createElement(Lt.Typography,{variant:"body2",classes:{root:c.path}},N)),i().createElement(Lt.DialogContent,{classes:{root:c.content}},i().createElement(Br.Z,{relation:f,metadata:h,inRelationTypes:g,outRelationTypes:b,onChange:O,applyFirstByDefault:!0}),i().createElement(Vr.Z,{className:c.attributeList,attrTypes:E,entity:C,showEmptyEditors:!0,mode:m.fO_.EDITING,parentUri:y,onAddAttributes:S,onChangeAttribute:R,onDeleteAttribute:P})),i().createElement(Lt.DialogActions,null,i().createElement(Lt.Button,{onClick:j},q().text("Cancel")),i().createElement(Lt.Button,{disabled:I,color:"primary",onClick:()=>{const{relationType:e,startDate:t,endDate:o}=f;M()&&((0,m.DsR)({startEntityUri:n.uri,endEntityUri:r.uri,relationType:e,attributes:(0,d.pathOr)({},["object","attributes"],f),startDate:t,endDate:o}).catch(ve),k())}},q().text("Add"))))};Fr.propTypes={config:m.yxQ,mainEntity:m.pyR,currentEntity:m.pyR,matchRules:a().arrayOf(a().string),open:a().bool,onClose:a().func};const Wr=Fr;function _r(){return _r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(this,arguments)}const Ur=e=>{const[t,n]=(0,l.useState)(!1),[r,o]=(0,l.useState)({}),a=(0,p.useDispatch)(),s=(0,l.useCallback)((t=>{let{mainEntity:r,currentEntity:l,matchRules:i}=t;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{relation:{relationUri:(0,m.ncP)()},entity:e,isNew:!0}}(l);(0,d.pipe)(Se.N5.relations.actions.openRelationEditor(e.id),a)(s),o({mainEntity:r,currentEntity:l,matchRules:i}),n(!0)}),[e,a]),c=(0,l.useCallback)((t=>{(0,d.pipe)(Se.N5.relations.actions.closeRelationEditor,a)(e.id,t),n(!1)}),[e.id,a]),u=()=>t?i().createElement(Wr,_r({config:e,open:t,onClose:c},r)):null;return u.propTypes={},{showDialog:t,openAddRelationDialog:s,AddRelationDialogRenderer:u}};var Gr=n(28741);function qr(){return qr=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},qr.apply(this,arguments)}const $r=(0,l.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=d.identity}=e;const{ActionButton:o,props:a}=n;return i().createElement(o,qr({ref:t,mode:"menuItem",onMenuClose:r},a))}));$r.displayName="MenuItemRenderer";const Xr=$r;function Yr(){return Yr=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},Yr.apply(this,arguments)}const Qr=e=>{let{actions:t,numberOfButtons:n=2,mode:r="normal",classes:o,onActionsMenuOpen:a,onActionsMenuClose:l}=e;const[s,c]=(0,d.splitAt)(n,t),u="normal"===r?"button":"iconButton",p="normal"===r?"MPlus":"S";return i().createElement(i().Fragment,null,s.map(((e,t)=>{let{ActionButton:n,props:r}=e;return i().createElement(n,Yr({key:t,mode:u,className:null==o?void 0:o.actionButton},r))})),c.length>0&&i().createElement(wt.Z,{buttonComponent:Ze.k,buttonProps:{icon:Ot.Z,size:p,tooltipTitle:q().text("More actions")},className:null==o?void 0:o.moreOptions,menuId:"matches-view-actions",menuItems:c,onMenuOpen:a,onMenuClose:l,MenuItemRenderer:Xr}))},Kr=e=>{let{value:{show:t,entity:n,entities:r,matchRules:o,permission:a,config:l}}=e;const s=qe(),{canMerge:c,canAddRelation:u,canMark:p}=a,{showDialog:h,openAddRelationDialog:f,AddRelationDialogRenderer:g}=Ur(l),b=[...r,n].some(m.biM),y=[{ActionButton:Ie,show:p,props:{entity:n,entities:r}},{ActionButton:ke,show:!b,props:{entity:n,entities:r}},{ActionButton:je,show:u&&!b,props:{mainEntity:n,currentEntity:r.length>0?r[0]:{},matchRules:o,onClick:f}}].filter((0,d.prop)("show"));return t?i().createElement(i().Fragment,null,i().createElement("div",{className:s.container},c&&i().createElement(xe,{entity:n,entities:r,className:s.mergeButton,mode:"button"}),i().createElement(Qr,{actions:y,numberOfButtons:1,classes:{actionButton:s.rightButton,moreOptions:s.moreOptions}})),u&&h&&i().createElement(g,null)):null};Kr.propTypes=$e;const Jr=Kr,eo=(0,d.map)((0,d.prop)("object")),to=e=>{let{entity:t,matches:n,metadata:r,config:o}=e;const a=eo(n),{canMerge:s,canMark:c}=(0,m.OCS)(r,o,t,n),u=wr(),p=[...a,t].some(m.biM),h=(0,l.useMemo)((()=>[{ActionButton:xe,show:s,props:{entity:t,entities:a}},{ActionButton:Ie,show:c,props:{entity:t,entities:a}},{ActionButton:ke,show:!p,props:{entity:t,entities:a}}].filter((0,d.prop)("show"))),[c,s,t,a,p]);return i().createElement("div",{className:u.actions},i().createElement(Qr,{actions:h,numberOfButtons:2,classes:{actionButton:u.button}}),i().createElement(sr.Z,{height:28,margin:10}),i().createElement(Fe,{selectedMatchesCount:n.length}))};to.propTypes={entity:m.pyR,matches:a().arrayOf(a().object),metadata:m.pGS,config:m.yxQ};const no=[{id:"label",get label(){return q().text("Profile name")},dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1},{id:"matchRules",get label(){return q().text("Match rule")},dataTypeDefinition:{type:m.oS0.TYPE_SELECT},hideable:!1,initialWidth:100,autoResize:!1},{id:"mlMatchRules",get label(){return q().text("Match IQ")},dataTypeDefinition:{type:m.oS0.TYPE_SELECT},hideable:!1,initialWidth:130,minWidth:130,autoResize:!1},{id:"id",get label(){return q().text("Entity ID")},dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1}],ro=[{id:"showTransitiveMatches",get label(){return q().text("Show transitive matches")}},{id:"showInactiveEntities",get label(){return q().text("Include entities that have ended")}}],oo=[{id:"score",get label(){return q().text("Match score")},dataTypeDefinition:{type:m.oS0.TYPE_INT},initialWidth:100}],ao=(0,Le.Z)((e=>({tableView:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},matchesView:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},mainArea:{flex:1,display:"flex",flexDirection:"row",overflow:"hidden"},comparisonView:{width:"calc(100% - 280px)"},fullScreen:{height:"100%",zIndex:"200"}})));function lo(){return lo=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},lo.apply(this,arguments)}const io=[20,50,100],[so]=io,co=Y(no),uo={showTransitiveMatches:!0,showInactiveEntities:!1},po=(0,l.memo)((e=>{let{entity:t,metadata:n,config:r,fullScreenContainer:o}=e;const a=ao(),[s,c]=ge(co,{order:"asc",field:co[0]},so,uo),{comparisonViewMode:u,isGlobalSpinnerActive:p}=z(),{changeRowsPerPage:h,changePage:f,changeColumns:g,toggleFilters:b,changeFilter:y,setSelectedItems:w,toggleSelect:S,setOptions:R,setLimitSelection:P}=s,{page:T,rowsPerPage:M,visibleColumns:j,filters:N,selectedItems:I,options:A}=c,{uri:D,type:Z}=t||{},B=j.includes("score")?{field:"score",order:"desc"}:{order:"asc",field:co[0]},{matches:V,total:L,entitiesMap:W,loadMatches:_}=(e=>{let{entity:t,filter:n,sorting:r,page:o,rowsPerPage:a,options:i,enabled:s}=e;const{setGlobalSpinner:c}=H(),u=(0,l.useCallback)((()=>{c(!0)}),[c]),p=(0,l.useCallback)((()=>{c(!1)}),[c]),{total:d,matches:m,entitiesMap:h,loadMatches:f}=(0,Gr.s)({enabled:s,entity:t,filter:n,onFinishLoading:p,onStartLoading:u,options:i,page:o,rowsPerPage:a,sorting:r});return{matches:m,total:d,entitiesMap:h,loadMatches:f}})({enabled:!!D,entity:t,filter:"",page:T,sorting:B,rowsPerPage:M,options:A}),U=(0,l.useMemo)((()=>(0,m.NVY)(D,Object.keys(W))),[D,W]),G=(0,Ar.C)({objectIds:U}),{setReloadHandler:q}=k();q((()=>{_(),K()}));const[$,X,Y]=ae({defaultColumnsData:no,additionalColumnsData:oo,metadata:n,entityType:Z});(0,l.useEffect)((()=>{g(Y)}),[Y,g]);const Q=(0,l.useMemo)((()=>j.map((e=>$.find((0,d.propEq)("id",e)))).filter(d.identity)),[j,$]),K=(0,l.useCallback)((()=>{w([])}),[w]),J=(0,l.useCallback)((()=>{w(V)}),[w,V]);(0,C.D)((()=>{f(0),K()}),[D,A]),Rr(u,P);const ee=u===v,te=u===E,ne={entity:t,metadata:n,selectedItems:I||[],columnsData:X,config:r,selectedColumns:j,onChangeColumns:g,entitiesMap:W,controlsRenderer:Jr},{showDialog:re,openAddRelationDialog:oe,AddRelationDialogRenderer:le}=Ur(r),ie=(0,l.useCallback)((e=>{let{hoveredMatch:o,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canAddRelation:u,canMark:p}=(0,m.hXd)(n,r,o.object,t,o.matchRules),h=[o.object],f=[...h,t].some(m.biM),g=[{ActionButton:xe,show:c,props:{entity:t,entities:h}},{ActionButton:Ie,show:p,props:{entity:t,entities:h}},{ActionButton:ke,show:!f,props:{entity:t,entities:h}},{ActionButton:je,show:u&&!f,props:{mainEntity:t,currentEntity:o.object,matchRules:o.matchRules,onClick:oe}}].filter((0,d.prop)("show"));return i().createElement(Qr,{actions:g,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,r,n,oe]),se=(0,l.useRef)(null);return i().createElement(Dr.h.Provider,{value:G},i().createElement(Zr.X.Provider,{value:W},ee?i().createElement(ln,{fullScreenContainer:o},i().createElement(F.Provider,{value:S},i().createElement(an,lo({},ne,{classes:{root:a.fullScreen}})))):i().createElement("div",{className:a.matchesView},I&&I.length>0?i().createElement(vr,{selectedItems:I},i().createElement(to,{matches:I,entity:t,metadata:n,config:r})):i().createElement(gr,{total:L,columnsData:X,selectedColumns:j,onChangeColumns:g,filtersEnabled:!!N,onToggleFilters:b,options:A,optionsData:(0,m.biM)(t)?void 0:ro,onChangeOptions:R}),i().createElement("div",{className:a.mainArea},i().createElement("div",{className:a.tableView},i().createElement(ar,{entity:t,metadata:n,columnsData:Q,matches:V,selected:I||[],onToggleSelect:S,onResetSelect:K,onSelectAll:J,filters:N,onFilter:y,entitiesMap:W,actionButtonsRenderer:ie,basicTableRef:se,isComparisonViewShown:te}),i().createElement(x.Z,{rowsPerPageOptions:te?[]:io,count:L,page:T,onChangePage:f,rowsPerPage:M,onChangeRowsPerPage:h,basicTableRef:se}),p&&i().createElement(O.Z,null)),te&&i().createElement(F.Provider,{value:S},i().createElement(an,lo({},ne,{classes:{root:a.comparisonView}})))),re&&i().createElement(le,null))))}));po.displayName="MatchesView",po.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,fullScreenContainer:a().instanceOf(Element)};var mo=n(20449);const ho=e=>{let{value:{show:t,entity:n,entities:r,permission:o}}=e;const a=qe(),{canMerge:l,canMark:s}=o,c=[...r,n].some(m.biM),u=[{ActionButton:Ue,show:s,props:{entity:n,entities:r}},{ActionButton:ke,show:!c,props:{entity:n,entities:r}}].filter((0,d.prop)("show"));return t?i().createElement(i().Fragment,null,i().createElement("div",{className:a.container},l&&i().createElement(xe,{entity:n,entities:r,className:a.mergeButton,mode:"button"}),i().createElement(Qr,{actions:u,numberOfButtons:1,classes:{actionButton:a.rightButton,moreOptions:a.moreOptions}}))):null};ho.propTypes=$e;const fo=ho,go=(0,d.map)((0,d.prop)("object")),bo=e=>{let{entity:t,matches:n,metadata:r,config:o}=e;const a=wr(),s=go(n),{canMerge:c,canMark:u}=(0,m.OCS)(r,o,t,n),p=[...s,t].some(m.biM),h=(0,l.useMemo)((()=>[{ActionButton:xe,show:c,props:{entity:t,entities:s}},{ActionButton:Ue,show:u,props:{entity:t,entities:s}},{ActionButton:ke,show:!p,props:{entity:t,entities:s}}].filter((0,d.prop)("show"))),[u,c,s,t,p]);return i().createElement("div",{className:a.actions},i().createElement(Qr,{actions:h,numberOfButtons:2,classes:{actionButton:a.button}}),i().createElement(sr.Z,{height:28,margin:10}),i().createElement(Fe,{selectedMatchesCount:n.length}))};bo.propTypes={entity:m.pyR,matches:a().arrayOf(a().object),metadata:m.pGS,config:m.yxQ};const yo=[{id:"label",get label(){return q().text("Profile name")},dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1},{id:"id",get label(){return q().text("Entity ID")},dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1}],vo=[{id:"showInactiveEntities",get label(){return q().text("Include entities that have ended")}}],wo=(0,Le.Z)((e=>({tableView:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},matchesView:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},mainArea:{flex:1,display:"flex",flexDirection:"row",overflow:"hidden"},comparisonView:{width:"calc(100% - 280px)"},fullScreen:{height:"100%",zIndex:"200"}})));function Eo(){return Eo=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},Eo.apply(this,arguments)}const Co=[20,50,100],[xo]=Co,Oo=Y(yo),So={showInactiveEntities:!1},Ro=(0,l.memo)((e=>{let{entity:t,metadata:n,config:r,fullScreenContainer:o}=e;const{comparisonViewMode:a,isGlobalSpinnerActive:s}=z(),c=wo(),[u,h]=ge(Oo,{order:"asc",field:Oo[0]},xo,So),{changeRowsPerPage:f,changePage:g,changeColumns:b,toggleFilters:y,changeFilter:w,setSelectedItems:S,toggleSelect:R,setOptions:P,setLimitSelection:T}=u,{page:M,rowsPerPage:j,visibleColumns:N,filters:I,selectedItems:A,options:D}=h,{uri:Z,type:B}=t||{},{matches:V,total:L,entitiesMap:W,loadNotMatches:_}=(e=>{let{entityUri:t,filter:n,sorting:r,page:o,rowsPerPage:a,options:i,enabled:s}=e;const{order:c,field:u}=r||{},{setGlobalSpinner:d}=H(),[h,f]=(0,l.useState)(0),[g,b]=(0,l.useState)([]),[y,v]=(0,l.useState)({}),w=(0,p.useSelector)(Se.ZP.selectors.getTenant),E=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),C=(0,p.useSelector)(Se.ZP.selectors.getDataTenants),x=(0,l.useMemo)((()=>({dtssPath:E,dataTenants:C,entity:{uri:t},customerTenant:w,dtssRequest:m.WSA})),[E,C,t,w]),O=(0,l.useCallback)((0,m.U_T)(x,m.pg),[x]),S=(0,mo.a)(O),R=(0,oe._)(),P=(0,l.useCallback)((e=>{s&&(d(!0),R(S({entityUri:t,offset:o*a,max:a,filter:n,sort:u,force:e,order:c,activeness:i.showInactiveEntities?m.YJ7.ALL:m.YJ7.ACTIVE_ONLY})).then((e=>{const{response:t,total:n,originalResponse:r}=e;f(n),b(t),t.map((e=>{let{uri:t}=e;return t})).length>0&&v((0,m.KPC)(r))})).finally((e=>d(!1))))}),[t,n,u,c,o,a,i,s]);return(0,l.useEffect)((()=>{P()}),[P]),{matches:g,total:h,entitiesMap:y,loadNotMatches:(0,l.useCallback)((()=>{P(!0)}),[P])}})({enabled:!!Z,entityUri:Z,filter:"",page:M,rowsPerPage:j,options:D}),U=(0,l.useMemo)((()=>(0,m.NVY)(Z,Object.keys(W))),[Z,W]),G=(0,Ar.C)({objectIds:U}),{setReloadHandler:q}=k();q((()=>{_(),K()}));const[$,X,Y]=ae({defaultColumnsData:yo,metadata:n,entityType:B});(0,l.useEffect)((()=>{b(Y)}),[Y,b]);const Q=(0,l.useMemo)((()=>N.map((e=>$.find((0,d.propEq)("id",e)))).filter(d.identity)),[N,$]),K=(0,l.useCallback)((()=>{S([])}),[S]),J=(0,l.useCallback)((()=>{S(V)}),[S,V]);(0,C.D)((()=>{g(0),K()}),[Z,D]),Rr(a,T);const ee=a===v,te=a===E,ne={entity:t,metadata:n,selectedItems:A||[],columnsData:X,config:r,selectedColumns:N,onChangeColumns:b,controlsRenderer:fo},re=(0,l.useCallback)((e=>{let{hoveredMatch:o,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canMark:u}=(0,m.hXd)(n,r,o.object,t,o.matchRules),p=[o.object],h=[...p,t].some(m.biM),f=[{ActionButton:xe,show:c,props:{entity:t,entities:p}},{ActionButton:Ue,show:u,props:{entity:t,entities:p}},{ActionButton:ke,show:!h,props:{entity:t,entities:p}}].filter((0,d.prop)("show"));return i().createElement(Qr,{actions:f,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,r,n]),le=(0,l.useRef)(null);return i().createElement(Dr.h.Provider,{value:G},i().createElement(Zr.X.Provider,{value:W},ee?i().createElement(ln,{fullScreenContainer:o},i().createElement(F.Provider,{value:R},i().createElement(an,Eo({},ne,{classes:{root:c.fullScreen}})))):i().createElement("div",{className:c.matchesView},A&&A.length>0?i().createElement(vr,{selectedItems:A},i().createElement(bo,{matches:A,entity:t,metadata:n,config:r})):i().createElement(gr,{total:L,columnsData:X,selectedColumns:N,onChangeColumns:b,filtersEnabled:!!I,onToggleFilters:y,options:D,optionsData:vo,onChangeOptions:P}),i().createElement("div",{className:c.mainArea},i().createElement("div",{className:c.tableView},i().createElement(ar,{entity:t,metadata:n,columnsData:Q,matches:V,selected:A||[],onToggleSelect:R,onResetSelect:K,onSelectAll:J,filters:I,onFilter:w,actionButtonsRenderer:re,basicTableRef:le,isComparisonViewShown:te}),i().createElement(x.Z,{rowsPerPageOptions:te?[]:Co,count:L,page:M,onChangePage:g,rowsPerPage:j,onChangeRowsPerPage:f,basicTableRef:le}),s&&i().createElement(O.Z,null)),te&&i().createElement(F.Provider,{value:R},i().createElement(an,Eo({},ne,{classes:{root:c.comparisonView}})))))))}));Ro.displayName="NotMatchView",Ro.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,fullScreenContainer:a().instanceOf(Element)};const Po=e=>{let{entity:t,metadata:n,config:r,activeView:o,fullScreenContainer:a}=e;const l=(0,f.U)();let s;switch(o){case y.POTENTIAL_MATCHES:s=i().createElement(po,{entity:t,metadata:n,config:r,fullScreenContainer:a});break;case y.FIND_MATCHES:s=i().createElement(Ir,{entity:t,metadata:n,config:r,fullScreenContainer:a});break;case y.NOT_A_MATCH:s=i().createElement(Ro,{entity:t,metadata:n,config:r,fullScreenContainer:a});break;default:s=i().createElement("div",null)}return i().createElement(g.s.Provider,{value:l},i().createElement(b.l,null,i().createElement(P,null,s)))};Po.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,activeView:a().string,fullScreenContainer:a().instanceOf(Element)};const ko=e=>{let{availableTabs:t=[y.POTENTIAL_MATCHES,y.FIND_MATCHES,y.NOT_A_MATCH],activeTab:n,onChange:r}=e;const o={[y.POTENTIAL_MATCHES]:(0,G.text)("POTENTIAL MATCHES"),[y.FIND_MATCHES]:(0,G.text)("FIND MATCHES"),[y.NOT_A_MATCH]:(0,G.text)("NOT A MATCH")};return i().createElement(Lt.Tabs,{value:n,onChange:r,indicatorColor:"primary",textColor:"primary",scrollButtons:"on"},t.map((e=>i().createElement(Lt.Tab,{key:e,label:o[e],value:e,classes:{}}))))};ko.propTypes={availableTabs:a().arrayOf(a().string),activeTab:a().string,onChange:a().func};const To=(0,Le.Z)((e=>({basicView:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",position:"absolute",top:0,bottom:0,left:0,right:0},content:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),Mo=(0,l.memo)((e=>{let{config:t,entity:n,metadata:r,getSavedState:o,saveState:a}=e;const s=To(),c=(0,m.biM)(n)?[y.POTENTIAL_MATCHES]:t.availableTabs,[u,p]=(0,l.useState)(y.POTENTIAL_MATCHES),[d,f]=(0,l.useState)();return i().createElement(h.Z,{ref:f,className:s.basicView},i().createElement("div",{className:s.content},i().createElement(ko,{activeTab:u,availableTabs:c,onChange:(e,t)=>p(t)}),i().createElement(Po,{fullScreenContainer:d,entity:n,metadata:r,config:t,activeView:u})))}));Mo.displayName="PotentialMatchesView",Mo.propTypes={config:m.yxQ,entity:m.pyR,metadata:m.pGS,dispatch:a().func,getSavedState:a().func,saveState:a().func};const jo=(0,p.connect)((e=>({entity:Se.ZP.selectors.getEntity(e),metadata:Se.ZP.selectors.getMetadata(e)})))((e=>i().createElement(L,null,i().createElement(Mo,e))));var No=n(24605),Io=n(97094),Ao=n(57304),Do=n(19603),Zo=n(93873);const Bo=(0,Le.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),Vo=(0,l.memo)((e=>{let{className:t}=e;const n=Bo(),r=(0,p.useSelector)(Se.ZP.selectors.getEntity),o=(0,p.useSelector)(Se.ZP.selectors.getEntityUriWithDataTenant);return i().createElement(Ao.Z,{className:De()(t,Do.U),entity:r},i().createElement(Lt.Box,{display:"flex",alignItems:"center"},i().createElement(Lt.Box,{mr:3},i().createElement(Zo.a,null))),i().createElement(Lt.Box,{className:n.comments},i().createElement(un.Z,{uri:o,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:o}),objectType:m.q7e.ENTITY})))}));Vo.displayName="PotentialMatchesProfileBand";var Lo=n(63172),zo=n(52043),Ho=n(39827);function Fo(){return Fo=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},Fo.apply(this,arguments)}const Wo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Fo({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{d:"M20 4v14h2V4c0-1.1-.9-2-2-2H6v2h14zM2 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12z",fill:"currentColor"}))};function _o(){return _o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_o.apply(this,arguments)}const Uo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",_o({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{d:"M10 12a4 4 0 100-8 4 4 0 000 8zM10.35 14.01C7.62 13.91 2 15.27 2 18v2h9.54c-2.47-2.76-1.23-5.89-1.19-5.99zM19.43 18.02c.36-.59.57-1.28.57-2.02 0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4c.74 0 1.43-.22 2.02-.57L20.59 22 22 20.59l-2.57-2.57zM16 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor"}))};function Go(){return Go=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},Go.apply(this,arguments)}const qo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Go({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 20h15.002L21 23l1.27-1.27-20-20.01L1 2.99l6.172 6.175a4.007 4.007 0 002.66 2.662l2.23 2.23A10.754 10.754 0 0011 14c-2.67 0-8 1.34-8 4v2zm8-16a3.987 3.987 0 00-2.795 1.137l5.656 5.659A3.999 3.999 0 0011 4z",fill:"#000",fillOpacity:".54"}))};let $o,Xo;var Yo;!function(e){e[e.PotentialMatches=0]="PotentialMatches",e[e.FindMatches=1]="FindMatches",e[e.NotAMatch=2]="NotAMatch"}($o||($o={})),(Yo=Xo||(Xo={})).TABLE="TABLE",Yo.COLUMNS="COLUMNS";const Qo=(0,l.createContext)({reloadData:()=>{},setReloadHandler:()=>{}}),Ko=(()=>{let e;return{reloadData:()=>{e&&e()},setReloadHandler:t=>{e=t}}})(),Jo=e=>{let{children:t}=e;return i().createElement(Qo.Provider,{value:Ko},t)},ea=()=>{const e=(0,l.useContext)(Qo);if(void 0===e)throw new Error("useReloadData must be used within a ReloadDataProvider");return e},ta=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const o=na(e,t,n,r),a=(t.children||[]).map((n=>ta(e,n,"",r.concat({name:t.name,label:t.label}))));return a.length&&(o.children=a,o.notSelectable=!0),o},na=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const o=(0,d.omit)(["children"],t),a=o.label||o.name;return{title:a,fieldName:n||(0,m.Tde)(o.uri,r)}},ra=(e,t)=>t?(0,m.k66)(e,t).map((t=>ta(e,t))):[],oa=(0,d.pipe)((0,d.map)((e=>({id:(0,m.Tde)(e.uri),label:(0,m.idV)(e.label),dataTypeDefinition:(0,m.PFL)(e)})))),aa=(0,d.pipe)(m.Fof,oa),la=(0,d.pluck)("id"),ia=(0,d.curry)(((e,t)=>e.map((e=>(0,m.Tde)(e))).some((e=>t.id===e||ca(t)&&ua(t,e))))),sa=e=>(0,m.QZu)(e.dataTypeDefinition),ca=e=>(0,m.YkG)(e.dataTypeDefinition),ua=(0,d.curry)(((e,t)=>t.startsWith(`${e.id}.`))),pa=(0,d.curry)(((e,t)=>sa(t)&&e.some((e=>{let{id:n}=e;return ua(t,n)})))),da=e=>(0,d.either)((0,d.includes)(d.__,e),pa(e)),ma=(e,t)=>(0,d.pipe)((0,d.reject)(sa),(0,d.filter)(ia(e)))(t);function ha(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){fa(e,t,n[t])}))}return e}function fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ga=(0,l.createContext)(null),ba=(0,l.createContext)(null),ya="SET_GLOBAL_SPINNER",va="SET_SELECTED_ITEMS",wa="TOGGLE_SELECT",Ea="SET_LIMIT_SELECTION",Ca="SET_COMPARISON_VIEW_MODE",xa="SET_ENTITIES_MAP",Oa="DELETE_EXTRA_MATCHES",Sa={setGlobalSpinner:(0,T.zD)(ya),setSelectedItems:(0,T.zD)(va),toggleSelect:(0,T.zD)(wa),setLimitSelection:(0,T.zD)(Ea),setComparisonViewMode:(0,T.zD)(Ca),setEntitiesMap:(0,T.zD)(xa),deleteExtraMatches:(0,T.zD)(Oa)},Ra=(e,t)=>{switch(t.type){case ya:return ha({},e,{isGlobalSpinnerActive:t.payload});case Oa:return ha({},e,{selectedItems:e.selectedItems.slice(0,e.limitSelection)});case va:return ha({},e,{selectedItems:t.payload.slice(0,e.limitSelection)});case wa:return(0,d.evolve)({selectedItems:n=>{const r=t.payload,o=n.findIndex((e=>{var t,n;return(null==e||null===(t=e.object)||void 0===t?void 0:t.uri)===(null==r||null===(n=r.object)||void 0===n?void 0:n.uri)}));if(o>-1)return(0,d.remove)(o,1,n);{const{limitSelection:t}=e;return e.tableViewModeAvailable?(0,d.append)(r,n):(0,d.pipe)((0,d.when)((0,d.both)((0,d.complement)(d.isNil),(0,d.propSatisfies)((0,d.gte)(d.__,t),"length")),(0,d.take)(t-1)),(0,d.append)(r))(n)}}},e);case Ea:return ha({},e,{limitSelection:t.payload});case Ca:{const n=t.payload;return ha({},e,{comparisonViewMode:n,limitSelection:n===Xo.COLUMNS?4:void 0})}case xa:{const n=t.payload;return ha({},e,{entitiesMap:n})}}},Pa=e=>{let{children:t,tableViewModeAvailable:n}=e;const[r,o]=(0,l.useReducer)(Ra,{isGlobalSpinnerActive:!1,selectedItems:[],comparisonViewMode:Xo.COLUMNS,limitSelection:4,entitiesMap:{},tableViewModeAvailable:n}),a=(0,M.o)({actions:Sa,dispatch:o});return i().createElement(ga.Provider,{value:r},i().createElement(ba.Provider,{value:a},t))},ka=()=>{const e=(0,l.useContext)(ga);if(void 0===e)throw new Error("useViewState must be used within a ViewStateProvider");return e},Ta=()=>{const e=(0,l.useContext)(ba);if(void 0===e)throw new Error("useViewStateActions must be used within a ViewStateProvider");return e};function Ma(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){ja(e,t,n[t])}))}return e}function ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Na="RESET",Ia="SET_OPTIONS",Aa=Ma({},le.ZP.actions,{reset:(0,T.zD)(Na),setOptions:(0,T.zD)(Ia)}),Da=(e,t)=>{switch(t.type){case Na:return Ma({},t.payload);case Ia:return Ma({},e,{options:t.payload});default:return le.ZP.reducer(e,t)}};function Za(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){Ba(e,t,n[t])}))}return e}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Va=(e,t)=>{const{field:n,order:r}=e,o={sorting:{field:n,order:r},page:0,rowsPerPage:t,selectedItems:[],limitSelection:null},[a,i]=(0,l.useReducer)(Da,o),s=(0,M.o)({actions:Aa,dispatch:i}),c=Ta(),u=ka();return[Za({},s,c),Za({},a,u),i]},La=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:q().text("Can't add relationship")})},za=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:(null==e?void 0:e.errorMessage)||q().text("Something went wrong...")})},Ha=e=>{(null==e?void 0:e.errorCode)!==m.Xt7.DCR_ALREADY_EXISTS&&za(e)},Fa=()=>{const{setGlobalSpinner:e}=Ta(),{isGlobalSpinnerActive:t}=ka(),{reloadData:n}=ea();return{onStartRequest:(0,l.useCallback)((()=>{e(!0)}),[e]),onFinishRequest:(0,l.useCallback)((()=>{e(!1),n()}),[n,e]),isGlobalSpinnerActive:t}},Wa=(e,t)=>e.filter((e=>{let{object:n}=e;return!t.some((e=>{let{uri:t}=e;return t===n.uri}))}));function _a(){return _a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_a.apply(this,arguments)}const Ua=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a=Oe.N.iconButton,size:l,onMenuClose:s=T.ZT}=e;const{isGlobalSpinnerActive:c,onFinishRequest:u,onStartRequest:p}=Fa(),{selectedItems:d}=ka(),{setSelectedItems:m}=Ta();return i().createElement(be.H,_a({className:n,disabled:c,entities:r,entity:o,mode:a},l?{size:l}:{},{onMenuClose:s,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{m(Wa(d,r))},onError:za,"data-reltio-id":"reltio-potential-matches-merge-button",ref:t}))}));function Ga(){return Ga=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},Ga.apply(this,arguments)}Ua.displayName="mergeButton";const qa=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a=Oe.N.iconButton,size:l,onMenuClose:s=T.ZT}=e;const{isGlobalSpinnerActive:c,onFinishRequest:u,onStartRequest:p}=Fa(),{selectedItems:d}=ka(),{setSelectedItems:m}=Ta();return i().createElement(Ne.i,Ga({className:n,disabled:c,entities:r,entity:o,mode:a},l?{size:l}:{},{onMenuClose:s,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{m(Wa(d,r))},ref:t}))}));function $a(){return $a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$a.apply(this,arguments)}qa.displayName="NotMatchButton";const Xa=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",$a({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{d:"M9 4c4.42 0 8 3.58 8 8s-3.58 8-8 8a8 8 0 01-7.419-5h2.224A6.002 6.002 0 009 18c3.31 0 6-2.69 6-6s-2.69-6-6-6a6.002 6.002 0 00-5.196 3H1.581A8 8 0 019 4zm8 .26c3.45.89 6 4.01 6 7.74 0 3.73-2.55 6.85-6 7.74v-2.09a5.99 5.99 0 000-11.3V4.26zM8 7.5l4.5 4.5L8 16.5V13H0v-2h8V7.5z",fillOpacity:".541"}))},Ya=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a=Oe.N.iconButton,onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n}=e;const{setGlobalSpinner:r}=Ta(),{isGlobalSpinnerActive:o}=ka(),{reloadData:a}=ea();return[o,(0,l.useCallback)((()=>{r(!0),(0,m.ck9)(n.uri,t).finally((()=>{r(!1),a()}))}),[t,n,r,a])]})({entity:n,entities:r});return i().createElement(Oe.K,{className:o,disabled:c,mode:a,label:c?"":q().text("Save on potential matches"),icon:Xa,onClick:u,onMenuClose:s,ref:t})}));function Qa(){return Qa=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},Qa.apply(this,arguments)}Ya.displayName="SetAMatchButton";const Ka=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Qa({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),i().createElement("defs",null,i().createElement("path",{d:"M10 6v2H4v12.22h12V14h2v6c0 1.05-.82 1.918-1.851 1.994L16 22H4c-1.05 0-1.918-.82-1.994-1.851L2 20V8c0-1.05.82-1.918 1.851-1.994L4 6h6zm4 10v2H6v-2h8zm-3.997-3l-.001 2H6v-2h4.003zM21 2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-7l-2 2 .005-11c0-.55.445-1 .995-1h8zm-10.996 8l-.001 2H6v-2h4.004zm9.286-6.3l-3.17 3.17-1.41-1.42-1.41 1.41 2.82 2.84 4.59-4.58-1.42-1.42z",id:"svg2465811894a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2465811894b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2465811894a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2465811894b)",d:"M0 0h24v24H0z"})))},Ja=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a=Oe.N.iconButton,onMenuClose:s=T.ZT}=e;const c=(0,l.useContext)(Io.S),[u,h]=(e=>{let{entities:t,entity:n,showSnackbarMessage:r}=e;const{selectors:o}=Se.ZP,{setGlobalSpinner:a}=Ta(),{isGlobalSpinnerActive:i}=ka(),s=(0,p.useSelector)(o.getWorkflowPath),c=(0,p.useSelector)(o.getWorkflowEnvironmentUrl),u=(0,p.useSelector)(o.getTenant),h=(0,d.prop)("uri"),f=(0,d.pipe)(d.concat,(0,d.map)(h))([n],t);return[i,(0,l.useCallback)((()=>{a(!0),(0,m.t6d)({workflowPath:s,processType:"potentialMatchReview",objectURIs:f,tenant:u,environment:c}).then((()=>{null==r||r(q().text("Potential match request: Done"))})).catch(Ha).finally((()=>{a(!1)}))}),[a,s,f,u,c,r])]})({entity:o,entities:r,showSnackbarMessage:c}),f=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),g=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath);return f&&!(0,m.O27)(g)?i().createElement(Oe.K,{className:n,disabled:u,mode:a,label:u?"":q().text("Potential match request"),icon:Ka,onClick:h,onMenuClose:s,ref:t}):null}));Ja.displayName="DCRReviewButton";const el=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a=Oe.N.iconButton,onMenuClose:s=T.ZT}=e;const c=(0,l.useContext)(Io.S),[u,d]=(e=>{let{entities:t,entity:n,showSnackbarMessage:r}=e;const{setGlobalSpinner:o}=Ta(),{isGlobalSpinnerActive:a}=ka(),{reloadData:i}=ea(),s=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),c=(0,p.useSelector)(Se.ZP.selectors.getTenant);return[a,(0,l.useCallback)((()=>{o(!0);const e={dtssPath:s,customerTenant:c,entity:n,entities:t};((0,m.biM)(n)?(0,m.XkY)(e):(0,m.uQS)(e)).then((()=>{null==r||r(q().text("Save as potential match: Done"))})).finally((()=>{o(!1),i()}))}),[o,s,c,n,t,r,i])]})({entity:n,entities:r,showSnackbarMessage:c});return i().createElement(Oe.K,{className:o,disabled:u,mode:a,label:u?"":q().text("Save as potential match"),icon:Xa,onClick:d,onMenuClose:s,ref:t})}));function tl(){return tl=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},tl.apply(this,arguments)}el.displayName="ReinstateMatchButton";const nl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",tl({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),i().createElement("defs",null,i().createElement("path",{d:"M19 14v3h3v2h-3v3h-2v-3h-3v-2l3-.001V14h2zM17 2a3 3 0 11-1.293 5.708l-4.535 4.535a5 5 0 11-1.414-1.414l4.534-4.536A3 3 0 0117 2zM7 12a3 3 0 100 6 3 3 0 000-6zm10-8a1 1 0 100 2 1 1 0 000-2z",id:"svg2904917532a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2904917532b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2904917532a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2904917532b)",d:"M0 0h24v24H0z"})))},rl=(0,l.forwardRef)(((e,t)=>{let{className:n,mainEntity:r,currentEntity:o,matchRules:a,mode:l=Oe.N.iconButton,onClick:s=T.ZT,onMenuClose:c=T.ZT}=e;return i().createElement(Oe.K,{className:n,mode:l,label:q().text("Add relationship"),icon:nl,onClick:()=>s({mainEntity:r,currentEntity:o,matchRules:a}),onMenuClose:c,ref:t})}));rl.displayName="CreateRelationButton";var ol=n(17308);const al=i().createContext({onClose:()=>{}});var ll=n(99757);const il=(0,Le.Z)((()=>({attributeSelect:{width:"100%",height:"40px"}}))),sl=(0,l.memo)((e=>{let{onChange:t,options:n,sortField:r}=e;const o=il(),a=(0,l.useMemo)((()=>{const e=r.split("."),t=e.length,o=n=>{const a=n[0].fieldName.split(".").length;if(a===t)return n.find((e=>e.fieldName===r));if(a<t){var l;const t=e.slice(0,a).join("."),r=null===(l=n.find((e=>e.fieldName===t)))||void 0===l?void 0:l.children;if(r)return o(r)}};for(const e of n){const t=o(e.attributes);if(t)return t}}),[r,n]),s=(0,l.useCallback)((e=>{t(e.attribute.fieldName)}),[t]);return i().createElement(ll.Z,{hideCheckBox:!0,className:o.attributeSelect,value:a,itemsGroups:n,onSelect:s,ungroup:!0,single:!0})}));var cl=n(90324);const ul=(0,Le.Z)((()=>({rowCheckbox:{marginRight:"20px",height:"24px",position:"relative",padding:"12px"},header:{padding:"8px 12px 8px 0",border:"rgba(0,0,0,0.05) 1px solid",display:"flex",justifyContent:"space-between"},selector:{width:"160px"},sorting:{display:"flex"},arrow:{transition:"transform 0.3s ease-in"},rotate:{transform:"rotate(180deg)"}})));function pl(){return pl=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},pl.apply(this,arguments)}const dl=e=>{let{selectedCount:t,totalCount:n,onSelect:r,sortOptions:o,toggleSort:a,sorting:s,totalOnPage:c}=e;const u=ul(),p=(0,l.useContext)(al);return i().createElement(i().Fragment,null,i().createElement(ol.P,pl({},p,{secondTitle:!!n&&q().text("${n} Profiles",{n})})),!!c&&i().createElement("div",{className:u.header},i().createElement(Lt.Checkbox,{className:u.rowCheckbox,checked:t===c,indeterminate:t>0&&t<c,onChange:r}),i().createElement("div",{className:u.sorting},i().createElement(sl,{sortField:s.field,options:o,onChange:a}),i().createElement(Lt.IconButton,{onClick:()=>a(s.field),classes:{root:De()(u.arrow,{[u.rotate]:"desc"===s.order})}},i().createElement(cl.Z,null)))))},ml=[{id:"label",get label(){return q().text("Profile name")}},{id:"id",get label(){return q().text("Entity ID")}}],hl=(e,t,n,r)=>(0,l.useMemo)((()=>{const o=((e,t)=>[{title:"",attributes:ra(e,(0,m.nt9)(e,t))}])(n,r);return[{title:"",attributes:e.concat(t||[]).map((e=>({title:e.label,fieldName:e.id})))},...o]}),[n,r,e,t]);var fl=n(77245);const gl=(0,Le.Z)((e=>({hidden:{visibility:"hidden"},rowCheckbox:{marginLeft:"-9px",marginRight:"19px",height:"24px",position:"relative",padding:"9px"},entity:{paddingTop:"12px",paddingBottom:"8px",overflow:"hidden",textOverflow:"ellipsis"},actions:{marginLeft:"auto",marginRight:0,paddingTop:"15px",display:"flex"},actionButtons:{display:"none"},active:{display:"flex"},wrapper:{position:"relative",whiteSpace:"pre",padding:"0 15px 0 15px",color:"rgba(0,0,0,0.87)","&::after":{content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none"},"&:hover":{backgroundColor:"rgba(0,0,0,0.04)","& $actionButtons":{display:"flex"},"& $commentsContainer":{borderLeft:"1px solid rgba(0,0,0,0.12)"}},display:"flex",boxSizing:"border-box",borderBottom:"1px rgba(0,0,0,0.05) solid",paddingLeft:"12px"},entityLabel:{color:e.palette.primary.main,cursor:"pointer",textDecoration:"none",fontWeight:500},matchRulesWrapper:{padding:"12px 15px 4px 10px",display:"flex",alignItems:"center",boxSizing:"border-box"},selectedRow:{backgroundColor:"rgba(0, 114, 206, 0.12)"},matchScore:{borderLeft:"rgba(0,0,0,0.12) 1px solid",paddingLeft:"12px",height:"20px",marginLeft:"20px",color:"rgba(0,0,0,0.54)"},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",height:"24px",marginLeft:"6px"},border:{borderLeft:"1px solid rgba(0,0,0,0.12)"},rightButton:{marginLeft:"8px"}}))),bl=(0,l.memo)((e=>{let{rowIndex:t,match:n,toggleSelect:r,entityToMatch:o,isRowSelected:a,actionButtonsRenderer:s,metadata:c,entitiesMap:u={}}=e;const p=gl(),d=n.object,[h,f]=(0,l.useState)(!1),g=d!==o,b=s;return i().createElement("div",{className:De()(p.wrapper,Do.U,{[p.selectedRow]:a})},i().createElement(Lt.Checkbox,{className:De()(p.rowCheckbox,{[p.hidden]:!g}),checked:a,onChange:()=>r(n),"data-reltio-id":`reltio-matches-table-checkbox-${t}`}),i().createElement("div",{className:p.entity},i().createElement(kn.Z,{value:(0,m.wwR)(d),className:p.entityLabel},(0,m.idV)(d.label)),i().createElement("div",{className:p.matchRulesWrapper},i().createElement(ft.Z,{entitiesMap:u,entity:d,match:n,metadata:c,variant:fl.g.excludeNotMatch}),!!n.matchScore&&i().createElement("div",{className:p.matchScore},n.matchScore))),i().createElement("div",{className:p.actions},i().createElement("div",{className:De()(p.actionButtons,{[p.active]:h})},i().createElement(b,{buttonClassName:p.rightButton,hoveredMatch:n,onActionsMenuOpen:()=>f(!0),onActionsMenuClose:()=>f(!1)})),o&&i().createElement(un.Z,{className:De()(p.commentsContainer,{[p.border]:h}),uri:(0,m.E_P)(o.uri,n.object.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:o.uri,matchEntityUri:n.object.uri}),allowOnlyOneComment:!0,showAlways:h})))})),yl=(0,Le.Z)((()=>({view:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden"}}))),vl=e=>{let{entityToMatch:t,matches:n,toggleSelect:r,actionButtonsRenderer:o,metadata:a,entitiesMap:l,selectedItems:s}=e;const c=yl();return i().createElement("div",{className:c.view},n.map(((e,c)=>i().createElement(bl,{key:e.object.uri,rowIndex:c,match:e,entityToMatch:t,toggleSelect:r,actionButtonsRenderer:o,matches:n,matchRules:e.matchRules,metadata:a,entitiesMap:l,isRowSelected:s.some((t=>t.object.uri===e.object.uri))}))))},wl=(0,Le.Z)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),El=[20,50,100],[Cl]=El,xl=la(ml),[Ol]=xl,Sl=(0,l.memo)((e=>{let{entity:t,metadata:n,filters:r,config:o}=e;const a=wl(),[s,c]=Va({order:"asc",field:Ol},Cl),{changeRowsPerPage:u,changePage:h,toggleSort:f,setSelectedItems:g,toggleSelect:b}=s,{sorting:y,page:v,rowsPerPage:w,selectedItems:E,isGlobalSpinnerActive:S}=c,{uri:R,type:P}=t||{},k=(0,l.useMemo)((()=>[{filter:"equals",fieldName:"type",values:[P]},{filter:"not equals",fieldName:"uri",values:[R]},...r]),[P,r,R]),T=hl(ml,[],n,P),{entities:M,total:j,findEntities:N}=(e=>{let{entityType:t,filters:n,sorting:r,page:o,rowsPerPage:a,enabled:i}=e;const{order:s,field:c}=r,{setGlobalSpinner:u}=Ta(),{activityFilter:d,globalFilter:h}=(0,p.useSelector)(Se.ZP.selectors.getGlobalSearchRequestOptions)||{},[f,g]=(0,l.useState)(0),[b,y]=(0,l.useState)([]),v=(0,oe._)(),w=["uri","label","type","secondaryLabel","attributes","crosswalks"],E=(0,l.useMemo)((()=>(0,m.Uqd)()(n)),[n]),C=(0,l.useCallback)((()=>{i&&(u(!0),v(Promise.all([(0,m.ZOr)(n,{offset:o*a,max:a,sort:c,order:s,select:w.join(","),globalFilter:h,activityFilter:d}),(0,m.j_Q)(n,{activityFilter:d,globalFilter:h})])).then((e=>{const[t,n]=e,{total:r}=n;y(t.map((e=>({object:e})))),g(r)})).finally((()=>u(!1))))}),[t,E,c,s,o,a,i,d,h]);return(0,l.useEffect)((()=>{C()}),[C]),{entities:b,total:f,findEntities:C}})({enabled:!!R,entityType:P,filters:k,sorting:y,page:v,rowsPerPage:w}),{setReloadHandler:I}=ea();I((()=>{N(),A()}));const A=(0,l.useCallback)((()=>{g([])}),[g]),D=(0,l.useCallback)((()=>{g(M)}),[g,M]);(0,l.useEffect)((()=>{const e=E.map((e=>M.find((t=>(0,m.ev7)(t)===(0,m.ev7)(e)))||e));g(e)}),[M]),(0,C.D)((()=>{h(0),A()}),[R,r]);const Z=(0,l.useCallback)((e=>{let{hoveredMatch:r,buttonClassName:a}=e;const l=[r.object],{canMark:s}=(0,m.hXd)(n,o,r.object,t,r.matchRules);return s&&i().createElement(Ya,{entity:t,entities:l,className:a})}),[o,t,n]),B=(0,l.useMemo)((()=>M.map((e=>null==E?void 0:E.find((0,d.pathEq)(["object","uri"],e.object.uri)))).filter(d.identity).length),[E,M]);return i().createElement("div",{className:a.mainArea},i().createElement(dl,{selectedCount:B,totalCount:j,totalOnPage:M.length,sortOptions:T,sorting:y,toggleSort:f,onSelect:B?A:D}),i().createElement(vl,{entityToMatch:t,toggleSelect:b,actionButtonsRenderer:Z,matches:M,metadata:n,selectedItems:E}),i().createElement(x.Z,{rowsPerPageOptions:El,count:j,page:v,onChangePage:h,rowsPerPage:w,onChangeRowsPerPage:u}),S&&i().createElement(O.Z,null))}));Sl.displayName="FindMatchesView";const Rl=e=>{let{entity:t,filter:n,rules:r,sorting:o,page:a,rowsPerPage:i,options:s,enabled:c}=e;const{setGlobalSpinner:u,setEntitiesMap:p}=Ta(),d=(0,l.useCallback)((()=>{u(!0)}),[u]),m=(0,l.useCallback)((()=>{u(!1)}),[u]),{total:h,matches:f,entitiesMap:g,loadMatches:b}=(0,Gr.s)({enabled:c,entity:t,filter:n,rules:r,onFinishLoading:m,onStartLoading:d,options:s,page:a,rowsPerPage:i,sorting:o,markMatchedValues:!0});return(0,l.useEffect)((()=>{p(g)}),[p,g]),{matches:f,total:h,entitiesMap:g,loadMatches:b}};var Pl=n(30268);const kl=(0,Le.Z)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"16px 16px 0"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px"},path:{color:e.palette.text.secondary,fontize:"13px",letterSpacing:0,lineHeight:"15px",padding:"6px 0"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}})));function Tl(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){Ml(e,t,n[t])}))}return e}function Ml(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const jl=e=>{let{config:t,mainEntity:n,currentEntity:r,matchRules:o,open:a,onClose:s=d.identity}=e;const c=kl(),u=(0,p.useDispatch)(),h=(0,p.useSelector)(Se.ZP.selectors.getMetadata),f=(0,l.useRef)(null),{relation:g={}}=(0,p.useSelector)((e=>Se.ZP.selectors.getRelationToAddByViewId(e,t.id)))||{},{inRelations:b=[],outRelations:y=[]}=(0,l.useMemo)((()=>((e,t,n,r,o)=>{const{isNotDuplicatedInRelation:a,isNotDuplicatedOutRelation:l}=(0,m.xE1)(),i=t=>(0,d.pipe)((0,d.assocPath)(["startObject","objectType"],(0,m.nt9)(e,t.startObject.objectTypeURI)),(0,d.assocPath)(["endObject","objectType"],(0,m.nt9)(e,t.endObject.objectTypeURI)))(t),s=(0,m.nt9)(e,r.type),c=(0,d.propOr)({},"matchActions",t),u=(0,m.dzT)(c,s,o),[p]=u.map((e=>{let{createRelation:t}=e;return t})).filter(d.identity);return(0,d.evolve)({inRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,r,n)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(a),(0,d.map)(i)),outRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,n,r)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(l),(0,d.map)(i))},p)||{}})(h,t,n,r,o)),[t,n,r,o,h]),{relationUri:v,relationType:w={}}=g,E=(0,d.pathOr)({},["object","attributes"],g),C=(0,l.useMemo)((()=>(0,m.xF8)(h,w)),[w,h]),x=(0,l.useMemo)((()=>Tl({attributes:E},(0,m.p2l)(g))),[g,E]),O=t.id,S=(0,l.useCallback)((0,d.pipe)(Se.N5.relations.actions.setRelationType(t.id,v),u),[t,v,u]),R=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.addAttributes,u)(e.map((e=>Tl({},e,{viewId:O}))))),[O,u]),P=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.modifyAttribute,u)(Tl({},e,{viewId:O}))),[O,u]),k=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.removeAttribute,u)(Tl({},e,{viewId:O}))),[O,u]),T=(0,l.useCallback)((()=>s(v)),[v,s]),M=(0,l.useCallback)((()=>u(Se.N5.errors.actions.errorsSet([]))),[u]),j=(0,l.useCallback)((()=>{const e=(0,m.xkB)(h,{relation:g});return u(Se.N5.errors.actions.errorsSet(e)),0===e.length}),[g,h,u]),N=(0,l.useCallback)((()=>{M(),T()}),[M,T]),I=`${(0,m.idV)(r.label)} → ${(0,m.idV)(n.label)}`,A=(0,d.isEmpty)(w),D=f.current,Z=(0,l.useMemo)((()=>({element:D,priority:["top","bottom"]})),[D]);return i().createElement(Lt.Dialog,{open:a,fullWidth:!0,maxWidth:"sm",onClose:N,classes:{paper:c.dialogPaper}},i().createElement(Lt.DialogTitle,{disableTypography:!0,classes:{root:c.dialogTitle}},i().createElement(Lt.Typography,{variant:"subtitle1",classes:{root:c.titleText}},q().text("Add relationship")),i().createElement(Lt.Typography,{variant:"body2",classes:{root:c.path}},I)),i().createElement(Lt.DialogContent,{classes:{root:c.content},ref:f},i().createElement(Pl.p.Provider,{value:Z},i().createElement(Br.Z,{relation:g,metadata:h,inRelationTypes:b,outRelationTypes:y,onChange:S,applyFirstByDefault:!0}),i().createElement(Vr.Z,{className:c.attributeList,attrTypes:C,entity:x,showEmptyEditors:!0,mode:m.fO_.EDITING,parentUri:v,onAddAttributes:R,onChangeAttribute:P,onDeleteAttribute:k}))),i().createElement(Lt.DialogActions,null,i().createElement(Lt.Button,{onClick:N},q().text("Cancel")),i().createElement(Lt.Button,{disabled:A,color:"primary",onClick:()=>{const{relationType:e,startDate:t,endDate:o}=g;j()&&((0,m.DsR)({startEntityUri:n.uri,endEntityUri:r.uri,relationType:e,attributes:(0,d.pathOr)({},["object","attributes"],g),startDate:t,endDate:o}).catch(La),T())}},q().text("Add"))))};function Nl(){return Nl=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},Nl.apply(this,arguments)}const Il=e=>{const[t,n]=(0,l.useState)(!1),[r,o]=(0,l.useState)({}),a=(0,p.useDispatch)(),s=(0,l.useCallback)((t=>{let{mainEntity:r,currentEntity:l,matchRules:i}=t;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{relation:{relationUri:(0,m.ncP)()},entity:e,isNew:!0}}(l);(0,d.pipe)(Se.N5.relations.actions.openRelationEditor(e.id),a)(s),o({mainEntity:r,currentEntity:l,matchRules:i}),n(!0)}),[e,a]),c=(0,l.useCallback)((t=>{(0,d.pipe)(Se.N5.relations.actions.closeRelationEditor,a)(e.id,t),n(!1)}),[e.id,a]),u=(0,l.useCallback)((()=>t?i().createElement(jl,Nl({config:e,open:t,onClose:c},r)):null),[t,e,c,r]);return{showDialog:t,openAddRelationDialog:s,AddRelationDialogRenderer:u}},Al=[{id:"label",get label(){return q().text("Profile name")}},{id:"matchRules",get label(){return q().text("Match rule")}},{id:"mlMatchRules",get label(){return q().text("Match IQ")},dataTypeDefinition:{type:m.oS0.TYPE_SELECT}},{id:"id",get label(){return q().text("Entity ID")}}],Dl=[{id:"score",get label(){return q().text("Match score")}}],Zl=e=>{let{fieldName:t}=e;return(0,d.pipe)(d.values,(0,d.pluck)("name"),(0,d.any)((0,d.equals)(t)))(m.S91)},Bl=e=>(0,d.flatten)(e.map((0,d.prop)("values"))).join(",");function Vl(){return Vl=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},Vl.apply(this,arguments)}const Ll=(0,l.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=d.identity}=e;const{ActionButton:o,props:a}=n;return i().createElement(o,Vl({ref:t,mode:"menuItem",onMenuClose:r},a))}));Ll.displayName="MenuItemRenderer";const zl=Ll;function Hl(){return Hl=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},Hl.apply(this,arguments)}const Fl=e=>{let{actions:t,numberOfButtons:n=2,mode:r="normal",actionButtonSize:o,classes:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const[c,u]=(0,d.splitAt)(n,t),p="normal"===r?Oe.N.button:Oe.N.iconButton,m="normal"===r?"MPlus":"S";return i().createElement(i().Fragment,null,c.map(((e,t)=>{let{ActionButton:n,props:r}=e;return i().createElement(n,Hl({key:t,mode:p,className:null==a?void 0:a.actionButton},o?{size:o}:{},r))})),u.length>0&&i().createElement(wt.Z,{buttonComponent:Ze.k,buttonProps:{icon:Ot.Z,size:m,tooltipTitle:q().text("More actions")},className:null==a?void 0:a.moreOptions,menuId:"matches-view-actions",menuItems:u,onMenuOpen:l,onMenuClose:s,MenuItemRenderer:zl}))},Wl={showTransitiveMatches:!0},_l=(0,Le.Z)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),Ul=[20,50,100],[Gl]=Ul,ql=(0,l.memo)((e=>{let{entity:t,metadata:n,filters:r,config:o}=e;const a=_l(),[s,c]=Va({field:Dl[0].id,order:"desc"},Gl),{changeRowsPerPage:u,changePage:h,toggleSort:f,setSelectedItems:g,toggleSelect:b}=s,{page:y,rowsPerPage:v,sorting:w,selectedItems:E,isGlobalSpinnerActive:S}=c,R=Wl,P=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),k=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),T=P&&!(0,m.O27)(k),{uri:M,type:j}=t||{},{showDialog:N,openAddRelationDialog:I,AddRelationDialogRenderer:A}=Il(o),D=hl(Al,Dl,n,j),[Z,B]=(0,l.useMemo)((()=>(0,d.partition)(Zl)(r)),[r]),{matches:V,total:L,entitiesMap:z,loadMatches:H}=Rl({enabled:!!M,entity:t,filter:(0,m.Uqd)()(B),page:y,sorting:w,rowsPerPage:v,options:R,rules:Bl(Z)}),{setReloadHandler:F}=ea();F((()=>{H()}));const W=(0,l.useCallback)((()=>{g([])}),[g]),_=(0,l.useCallback)((()=>{g(V)}),[g,V]);(0,C.D)((()=>{h(0),W()}),[M,R]);const U=(0,l.useMemo)((()=>(0,m.NVY)(M,Object.keys(z))),[M,z]),G=(0,Ar.C)({objectIds:U}),q=(0,l.useCallback)((e=>{let{hoveredMatch:r,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canAddRelation:u,canMark:p}=(0,m.hXd)(n,o,r.object,t,r.matchRules),h=[r.object],f=[...h,t].some(m.biM),g=[{ActionButton:Ua,show:c,props:{entity:t,entities:h}},{ActionButton:qa,show:p,props:{entity:t,entities:h}},{ActionButton:Ja,show:!f&&T,props:{entity:t,entities:h}},{ActionButton:rl,show:u&&!f,props:{mainEntity:t,currentEntity:r.object,matchRules:r.matchRules,onClick:I}}].filter((0,d.prop)("show"));return i().createElement(Fl,{actions:g,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,o,n,I,T]),$=(0,l.useMemo)((()=>V.map((e=>null==E?void 0:E.find((0,d.equals)(e)))).filter(d.identity).length),[E,V]);return i().createElement(Dr.h.Provider,{value:G},i().createElement(Zr.X.Provider,{value:z},i().createElement("div",{className:a.mainArea},i().createElement(dl,{selectedCount:$,totalCount:L,totalOnPage:V.length,sortOptions:D,sorting:w,toggleSort:f,onSelect:$?W:_}),i().createElement(vl,{entityToMatch:t,toggleSelect:b,actionButtonsRenderer:q,matches:V,metadata:n,entitiesMap:z,selectedItems:E}),i().createElement(x.Z,{rowsPerPageOptions:Ul,count:L,page:y,onChangePage:h,rowsPerPage:v,onChangeRowsPerPage:u}),S&&i().createElement(O.Z,null)),N&&i().createElement(A,null)))}));ql.displayName="MatchesView";const $l=ql;function Xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Yl=[{id:"label",get label(){return q().text("Profile name")}},{id:"id",get label(){return q().text("Entity ID")}}],Ql=(0,Le.Z)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),Kl=[20,50,100],[Jl]=Kl,ei=la(Yl),ti=(0,l.memo)((e=>{let{entity:t,metadata:n,filters:r,config:o}=e;const a=Ql(),[s,c]=Va({order:"asc",field:ei[0]},Jl),{changeRowsPerPage:u,changePage:h,setSelectedItems:f,toggleSelect:g,toggleSort:b}=s,{page:y,rowsPerPage:v,sorting:w,selectedItems:E,isGlobalSpinnerActive:S}=c,{uri:R,type:P}=t||{},k=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),T=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),M=k&&!(0,m.O27)(T),{matches:j,total:N,entitiesMap:I,loadNotMatches:A}=(e=>{let{entityUri:t,filter:n,sorting:r,page:o,rowsPerPage:a,enabled:i}=e;const{order:s,field:c}=r||{},{setGlobalSpinner:u}=Ta(),[d,h]=(0,l.useState)(0),[f,g]=(0,l.useState)([]),[b,y]=(0,l.useState)({}),v=(0,p.useSelector)(Se.ZP.selectors.getTenant),w=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),E=(0,p.useSelector)(Se.ZP.selectors.getDataTenants),{activityFilter:C,globalFilter:x}=(0,p.useSelector)(Se.ZP.selectors.getGlobalSearchRequestOptions)||{},O=(0,l.useMemo)((()=>({dtssPath:w,dataTenants:E,entity:{uri:t},customerTenant:v,dtssRequest:m.WSA})),[w,E,t,v]),S=(0,l.useCallback)((0,m.U_T)(O,m.pg),[O]),R=(0,mo.a)(S),P=(0,oe._)(),k=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){Xl(e,t,n[t])}))}return e}({matchRules:[m.h_8]},e),T=(0,l.useCallback)((e=>{i&&(u(!0),P(R({entityUri:t,offset:o*a,max:a,filter:(0,m.vyX)(x,n)||"",sort:c,force:e,order:s,activeness:C})).then((e=>{const{response:t,total:n,originalResponse:r}=e;h(n),g(t.map(k)),t.map((e=>{let{uri:t}=e;return t})).length>0&&y((0,m.KPC)(r))})).finally((()=>u(!1))))}),[t,n,c,s,o,a,C,i,x]);return(0,l.useEffect)((()=>{T()}),[T]),{matches:f,total:d,entitiesMap:b,loadNotMatches:(0,l.useCallback)((()=>{T(!0)}),[T])}})({enabled:!!R,entityUri:R,filter:(0,m.Uqd)()(r),page:y,rowsPerPage:v,sorting:w}),D=(0,l.useMemo)((()=>(0,m.NVY)(R,Object.keys(I))),[R,I]),Z=(0,Ar.C)({objectIds:D}),B=hl(Yl,[],n,P),{setReloadHandler:V}=ea();V((()=>{A()}));const L=(0,l.useCallback)((()=>{f([])}),[f]),z=(0,l.useCallback)((()=>{f(j)}),[f,j]);(0,C.D)((()=>{h(0),L()}),[R]);const H=(0,l.useCallback)((e=>{let{hoveredMatch:r,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canMark:u}=(0,m.hXd)(n,o,r.object,t,r.matchRules),p=[r.object],h=[...p,t].some(m.biM),f=[{ActionButton:Ua,show:c,props:{entity:t,entities:p}},{ActionButton:el,show:u,props:{entity:t,entities:p}},{ActionButton:Ja,show:!h&&M,props:{entity:t,entities:p}}].filter((0,d.prop)("show"));return i().createElement(Fl,{actions:f,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,o,n,M]),F=(0,l.useMemo)((()=>j.map((e=>null==E?void 0:E.find((0,d.equals)(e)))).filter(d.identity).length),[E,j]);return i().createElement(Dr.h.Provider,{value:Z},i().createElement(Zr.X.Provider,{value:I},i().createElement("div",{className:a.mainArea},i().createElement(dl,{selectedCount:F,totalCount:N,totalOnPage:j.length,sortOptions:B,sorting:w,toggleSort:b,onSelect:F?L:z}),i().createElement(vl,{entityToMatch:t,toggleSelect:g,actionButtonsRenderer:H,matches:j,metadata:n,selectedItems:E}),i().createElement(x.Z,{rowsPerPageOptions:Kl,count:N,page:y,onChangePage:h,rowsPerPage:v,onChangeRowsPerPage:u}),S&&i().createElement(O.Z,null))))}));ti.displayName="NotMatchView";const ni=e=>{let{entity:t,metadata:n,filters:r,config:o,activeView:a}=e;const l=(0,f.U)();return i().createElement(g.s.Provider,{value:l},(()=>{switch(a){case $o.PotentialMatches:return i().createElement($l,{entity:t,metadata:n,filters:r,config:o});case $o.FindMatches:return i().createElement(Sl,{entity:t,metadata:n,filters:r,config:o});case $o.NotAMatch:return i().createElement(ti,{entity:t,metadata:n,filters:r,config:o});default:return i().createElement("div",null)}})())};var ri=n(6782),oi=n(64731);function ai(){return ai=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},ai.apply(this,arguments)}var li=n(58970),ii=n(70215);const si=(0,Le.Z)({input:{margin:0,borderRadius:"4px",width:"100%",paddingTop:0,paddingBottom:0}}),ci=(0,Le.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function ui(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){pi(e,t,n[t])}))}return e}function pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const di={FilterSelector:e=>{const{rowData:t}=e,{attribute:{attrType:n}={}}=t||{},r=(0,m.pzC)(n)?[m.j5E.EQUALS].map((e=>({value:e,label:(0,ri.Z)((0,m.XS2)(e))}))):null;return i().createElement(oi.Z,ai({},e,{options:r}))},ValuesEditor:e=>{let{rowData:t,rowContext:n}=e;const r=si(),{values:o=[],attribute:{attrType:a,fieldName:s=null}={},filter:c,id:u}=t||{},{changeFilter:p}=n,{entityType:d}=n,h=(0,l.useCallback)((e=>{p({fieldName:s,filter:c,values:e},u)}),[p,u,s,c]),f=(0,l.useMemo)((()=>({InputProps:{classes:{root:r.input}}})),[r]);return(0,m.pzC)(a)?i().createElement(li.Z,{entityType:d,name:a.name,values:o,onChange:h,TextFieldProps:f,fullWidth:!0}):i().createElement(ii.Z,{rowContext:n,rowData:t})}},mi=(0,l.memo)((e=>{var t;let{config:n}=e;const r=ci(),[o,a]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[u,h]=(0,l.useState)([]),[f,g]=(0,l.useState)(null),b=(0,p.useSelector)(Se.ZP.selectors.getMetadata),y=(0,p.useSelector)(Se.ZP.selectors.getEntity),v=(0,l.useCallback)((e=>{g((t=>t===e?null:e))}),[]),w=(0,l.useCallback)((()=>{g(null)}),[]),E=null!==f,C=(0,m.nt9)(b,null==y?void 0:y.type),x=(0,l.useMemo)((()=>(e=>(e.attributes||[]).concat(e.analyticsAttributes||[]).filter(m.Uty))(C)),[C]),O=(0,l.useMemo)((()=>[ui({},m.S91.matchRules,{check:m.Ir}),ui({},m.S91.MLRecommendedMatch,{check:m.XQO})].reduce(((e,t)=>{let{check:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["check"]);return n(C)&&e.push(r),e}),[])),[C]),S=(0,l.useMemo)((()=>[...O,...x]),[x,O]),R=(0,l.useMemo)((()=>[ui({},m.xPW.id),...x]),[x]),P=(0,l.useMemo)((()=>[{buttonProps:{id:$o.PotentialMatches,icon:Wo,tooltipTitle:q().text("Potential Matches")},headerProps:{mainTitle:q().text("Potential Matches"),rightContent:i().createElement(Lo.Z,{filters:o,onChange:a,attributeTypes:S,components:di})},filters:o},{buttonProps:{id:$o.FindMatches,icon:Uo,tooltipTitle:q().text("Find Matches")},headerProps:{mainTitle:q().text("Find Matches"),rightContent:i().createElement(Lo.Z,{filters:s,onChange:c,attributeTypes:R})},filters:s},{buttonProps:{id:$o.NotAMatch,icon:qo,tooltipTitle:q().text("Not a Match")},headerProps:{mainTitle:q().text("Not a Match"),rightContent:i().createElement(Lo.Z,{filters:u,onChange:h,attributeTypes:x})},filters:u}]),[o,s,u,S,R,x]),k=(0,l.useMemo)((()=>{var e;return ui({},null===(e=P[f])||void 0===e?void 0:e.headerProps,{onClose:w})}),[w,f,P]),T=null===(t=P[f])||void 0===t?void 0:t.filters;return i().createElement("div",{className:r.wrapper},i().createElement(zo.h,{open:E,width:480},i().createElement(al.Provider,{value:k},i().createElement(ni,{config:n,entity:y,filters:T,metadata:b,activeView:f}))),i().createElement(Ho.G,{buttonsProps:(0,d.pluck)("buttonProps",P),onButtonClick:v,activeIndexId:f}))}));mi.displayName="RightSidePanel";var hi=n(60641),fi=n(83401);const gi=(0,Le.Z)((()=>({button:{minWidth:"90px",padding:"8px 12px"}})));var bi=n(66324),yi=n(82882);function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wi=[{id:Xo.COLUMNS,tooltipTitle:q().text("Column"),title:q().text("Column"),Icon:bi.Z},{id:Xo.TABLE,tooltipTitle:q().text("Table"),title:q().text("Table"),Icon:yi.Z}],Ei=e=>{let{className:t}=e;const n=gi(),{comparisonViewMode:r,selectedItems:o}=ka(),{setComparisonViewMode:a}=Ta(),l=o.length>4;return i().createElement(fi.Z,{className:t,classes:{button:n.button},modes:wi.map((e=>e.id===Xo.COLUMNS?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){vi(e,t,n[t])}))}return e}({},e,{disabled:l,tooltipTitle:l?q().text("Column view supports maximum ${maxProfiles} profiles",{maxProfiles:4}):e.tooltipTitle}):e)),modeId:r,onChange:a})},Ci=(0,Le.Z)((e=>({header:{padding:"0 8px 0 16px",backgroundColor:"#fff","& $splitter":{height:"32px",marginRight:"16px",marginLeft:"4px",color:"rgba(0, 0, 0, 0.12)"}},title:{fontSize:"16px",fontWeight:400,lineHeight:"24px",letterSpacing:"0.15px",color:e.palette.text.primary},clearAllButton:{marginLeft:"16px"},mergeButton:{marginRight:"12px"},total:{color:e.palette.text.secondary},splitter:{},actionSplitter:{height:"32px",margin:"0 8px",color:"rgba(0, 0, 0, 0.12)"}})));var xi=n(47603);const Oi=e=>{let{items:t}=e;return i().createElement(wt.Z,{buttonComponent:Ze.k,buttonProps:{icon:xi.Z,tooltipTitle:q().text("Settings"),size:"L"},menuId:"matches-view-settings",menuItems:t})},Si=(0,d.map)((0,d.prop)("object")),Ri=e=>{let{config:t,columnsData:n,selectedColumns:r,onChangeColumns:o,showNonOv:a,onChangeShowNonOv:s}=e;const c=Ci(),u=(0,p.useSelector)(Se.ZP.selectors.getEntity),h=(0,p.useSelector)(Se.ZP.selectors.getMetadata),{selectedItems:f,limitSelection:g}=ka(),{setSelectedItems:b}=Ta(),y=Si(f),{tableViewModeAvailable:v}=t,{canMerge:w,canMark:E}=(0,m.OCS)(h,t,u,f),C=[...y,u].some(m.biM),x=(0,l.useMemo)((()=>[{ActionButton:Ua,show:w,props:{entity:u,entities:y}},{ActionButton:qa,show:E,props:{entity:u,entities:y}},{ActionButton:Ja,show:!C,props:{entity:u,entities:y}}].filter((0,d.prop)("show"))),[E,w,u,y,C]),O=0!==f.length,S=(0,l.useCallback)((()=>{s(d.not)}),[s]),R=(0,l.useMemo)((()=>[{selected:!a,selectable:!0,text:q().text("Show only OV values"),onClick:S,id:"showNonOv"}]),[S,a]);return i().createElement(zt.Z,{title:"",classes:{root:c.header}},i().createElement(Lt.Typography,{className:c.title},i().createElement("span",null,q().text("Match Review")),O&&i().createElement("span",{className:c.total}," ","(",f.length,g&&"/"+g,")")),O&&i().createElement(Lt.Button,{onClick:()=>{b([])},className:c.clearAllButton,color:"primary"},q().text("Clear All")),i().createElement(lr.Z,null),O&&i().createElement(i().Fragment,null,i().createElement(Fl,{actions:x,numberOfButtons:2}),i().createElement(Lt.Divider,{orientation:"vertical",classes:{vertical:c.actionSplitter}})),i().createElement(Oi,{items:R}),i().createElement($t.Z,{columnsData:n,selectedColumns:r,onChangeColumns:o}),v&&i().createElement(i().Fragment,null,i().createElement(Lt.Divider,{orientation:"vertical",classes:{vertical:c.splitter}}),i().createElement(Ei,null)))};var Pi=n(21077),ki=n(43600);const Ti=i().createContext({expandedMap:{},onExpandType:()=>{}});function Mi(){return Mi=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},Mi.apply(this,arguments)}Ti.displayName="ExpandedContext";const ji=e=>{const t=(0,l.forwardRef)(((t,n)=>{const{attributeType:r}=t,{expandedMap:o}=(0,l.useContext)(Ti),a=o[r.uri];return i().createElement(e,Mi({},t,{expanded:a,ref:n}))}));return t.displayName="WithExpanded",t},Ni=(0,Le.Z)({complexAttributesHeadRenderer:{height:"100%",width:"100%",display:"flex",alignItems:"flex-start"},complexAttributesHeadLabel:{flex:1,marginLeft:"5px"},arrowButton:{cursor:"pointer",marginLeft:"-3px"},attribute:{whiteSpace:"pre-wrap"},matchedAttribute:{fontWeight:500,background:"rgb(241, 248, 234)","tr:hover &":{backgroundColor:"rgb(232, 239, 225)"}}}),Ii=ji(Ke.Z),Ai=e=>{let{value:{attributeType:t,attributeValues:n,matchedValuesUris:r,showNonOv:o}}=e;const a=Ni(),s=(0,l.useMemo)((()=>({highlightedValuesUris:r,highlightedClassName:a.matchedAttribute})),[r,a.matchedAttribute]);return i().createElement("div",{className:a.attribute},i().createElement(ki.j.Provider,{value:s},i().createElement(Ii,{values:n,attributeType:t,showNonOv:o})))},Di=i().createContext({});Di.displayName="ColumnDataContext";const Zi=(0,Le.Z)({menuButtonWrapper:{display:"none",position:"absolute",top:"-4px",right:"-14px"},headCell:{display:"flex",position:"relative","th:hover &":{"& $menuButtonWrapper":{display:"block"}}},active:{display:"block"}}),Bi=e=>{let{label:t,id:n,hideable:r}=e;const o=Zi(),{setAnchor:a,setHoveredId:s,hoveredId:c}=(0,l.useContext)(Di),u=(0,l.useRef)();return i().createElement("div",{className:o.headCell},t,!1!==r&&i().createElement("div",{className:De()(o.menuButtonWrapper,{[o.active]:c===n}),ref:u},i().createElement(ct.Z,{icon:Ot.Z,onClick:()=>{a(u.current),s(n)},size:"S"})))};var Vi=n(19592);const Li=e=>{let{label:t,attributeType:n,id:r}=e;const o=Ni(),{expandedMap:a,onExpandType:s}=(0,l.useContext)(Ti),c=(0,l.useCallback)((()=>s(n.uri)),[s,n]),u=a[n.uri];return i().createElement("div",{className:o.complexAttributesHeadRenderer},i().createElement(Vi.Z,{expanded:u,onClick:c,className:o.arrowButton}),i().createElement("div",{className:o.complexAttributesHeadLabel},i().createElement(Bi,{label:t,id:r})))},zi=i().createContext({hoveredEntity:null,resetHoveredEntity:()=>{}});zi.displayName="HoveredEntityContext";const Hi=(0,l.memo)((e=>{let{value:{mainEntity:t,entity:n,matchRules:r,permission:o},onActionsMenuClose:a,onActionsMenuOpen:l,openAddRelationDialog:s,classes:c={},mode:u="hover"}=e;const{canMerge:p,canAddRelation:h,canMark:f}=o,g=[t,n].some(m.biM),b=[{ActionButton:Ua,show:p,props:{entity:t,entities:[n]}},{ActionButton:qa,show:f,props:{entity:t,entities:[n]}},{ActionButton:el,show:f,props:{entity:t,entities:[n]}},{ActionButton:Ja,show:!g,props:{entity:t,entities:[n]}},{ActionButton:rl,show:h&&!g,props:{mainEntity:t,currentEntity:n,matchRules:r,onClick:s}}].filter((0,d.prop)("show"));return i().createElement(Fl,{actions:b,numberOfButtons:2,mode:u,actionButtonSize:"XS",classes:{actionButton:c.actionButton,moreOptions:c.moreOptions},onActionsMenuClose:a,onActionsMenuOpen:l})})),Fi=(0,Le.Z)({container:{position:"relative",width:"100%",height:"140px",display:"flex",flexDirection:"column",overflow:"hidden"},hovered:{backgroundColor:"rgb(245, 245, 245)"},closeButton:{position:"absolute",zIndex:1,margin:"4px"},matchControlsContainer:{display:"flex",alignItems:"center",height:"45px",margin:"4px 8px"},rightButton:{display:"flex",alignItems:"center"},moreOptions:{marginLeft:"8px"}});function Wi(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=>"potentialMatchReview"===e.processType,Ui=i().createContext((()=>{}));Ui.displayName="WorkflowTasksAvailabilityContext";const Gi=(0,Le.Z)({container:{position:"relative",minHeight:"86px",display:"flex",overflow:"hidden",margin:"-16px"},assigneeSelector:{},assigneeContainer:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"16px 14px 16px 48px"}});function qi(){return qi=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},qi.apply(this,arguments)}const $i=(0,d.pick)(["processInstanceComments","taskId"]),Xi=e=>{let{entity:t,match:n}=e;const r=Gi(),{tasks:o,loadTasks:a}=(e=>{let{entity:t,match:n}=e;const r=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),o=(0,p.useSelector)(Se.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,p.useSelector)(Se.ZP.selectors.getTenant),i=(0,oe._)(),{uri:s}=t,c=(0,m.ev7)(n),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)([]),b=(0,l.useCallback)((()=>{r&&c!==s&&(h(!0),i((0,m.uT0)({entityUri:s,workflowPath:r,environment:o,tenant:a})).then((e=>{const{data:t}=e,n=(0,d.propSatisfies)((0,d.includes)(c),"objectURIs"),r=(0,d.allPass)([_i,n]),o=t.filter(r);g(o)})).finally((()=>h(!1))))}),[s,o,a,r,c]);return{enabled:!!r,loading:u,tasks:f,loadTasks:b}})({entity:t,match:n}),s=(0,l.useContext)(Ui),{sendMergeAllRequest:c}=(0,bt._)({entity:t,entities:[n.object]}),{sendMarkAsNotMatchRequest:u}=(0,yt.m)({entity:t,entities:[n.object]}),h={Merge:c,NotAMatch:u};(0,l.useEffect)((()=>{a()}),[a]);const f=o[0],g=(0,m.ev7)(n);(0,l.useEffect)((()=>{null==s||s(g,!!f)}),[s,g,f]);const b=(f&&f.possibleActions||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:h[t]}})),{assignee:y,getAssignees:v,updateAssignee:w,updateRequestIsInProgress:E}=(0,vt.r)(f||{}),C=b.length>0?i().createElement(wt.Z,{buttonComponent:ct.Z,buttonProps:{icon:Ot.Z,size:"L"},menuId:"custom-actions",menuItems:b}):null;return f?i().createElement("div",{className:r.container},i().createElement(Et.Z,qi({},(e=>({date:e.dueDate,type:e.processDefinitionDisplayName,createdBy:e.createdBy,step:e.displayName}))(f),{Actions:C}),i().createElement("div",{className:r.assigneeContainer},i().createElement(Ct.Z,{className:r.assigneeSelector,enabled:!E||y,getOptions:v,onChange:w,hideSelectedOptions:!1,label:q().text("Assigned to"),value:y,defaultOptions:!0})),i().createElement(xt.V,$i(f)))):null},Yi=[{id:"profile",label:q().text("Profile name"),dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1,modes:[Xo.COLUMNS,Xo.TABLE]},{id:"matchRules",label:q().text("Match method"),dataTypeDefinition:{type:m.oS0.TYPE_SELECT},hideable:!1,initialWidth:130,minWidth:130,autoResize:!1,modes:[Xo.COLUMNS,Xo.TABLE]},{id:"workflowCard",label:q().text("Workflow"),modes:[Xo.COLUMNS]},{id:"entityId",label:q().text("Entity ID"),dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1,modes:[Xo.COLUMNS,Xo.TABLE]},{id:"score",label:q().text("Match score"),dataTypeDefinition:{type:m.oS0.TYPE_INT},initialWidth:100,modes:[Xo.TABLE]},{id:"sources",label:q().text("Sources"),modes:[Xo.COLUMNS,Xo.TABLE]},{id:"crosswalks",label:q().text("Crosswalks"),modes:[Xo.COLUMNS]}];var Qi=n(63149),Ki=n(94175);const Ji=(0,Le.Z)({itemContainer:{width:"18px",height:"18px"},item:{width:"18px",height:"18px",background:"none",fontSize:"1rem"}}),es=(0,l.memo)((e=>{let{className:t,crosswalk:n,showTooltip:r=!0}=e;const o=Ji(),a=(0,Qi.nX)(n),l=(0,p.useSelector)(Se.ZP.selectors.getMetadata)||{},s=i().createElement("div",{className:De()(o.itemContainer,t),style:{background:a}},i().createElement(Ki.Z,{sourceType:n.type,className:o.item}));return r?i().createElement(Lt.Tooltip,{title:(0,m.tH7)(l,n.type)},s):s})),ts=(0,Le.Z)({crosswalk:{marginBottom:"8px"},crosswalkIcon:{marginRight:"5px"},labelContainer:{display:"flex",alignItems:"center",width:"100%"},spacer:{flex:1}}),ns=e=>{let{attributeValue:t}=e;const n=ts(),r=(0,p.useSelector)(Se.ZP.selectors.getMetadata),o=t.value.crosswalk;return i().createElement("div",{className:n.labelContainer},i().createElement(es,{className:n.crosswalkIcon,crosswalk:o,showTooltip:!1}),i().createElement("div",null,(0,m.tH7)(r,o.type)),i().createElement("div",{className:n.spacer}),i().createElement("div",null,o.value))},rs=ji(Ke.Z),os=(0,Le.Z)({wrapper:{display:"flex",flexWrap:"wrap",marginBottom:"-8px"},crosswalkIcon:{marginRight:"5px",marginBottom:"8px"}}),as=e=>{let{value:t}=e;const n=os();return t?i().createElement("div",{className:n.wrapper},t.map((e=>i().createElement(es,{key:e.uri,className:n.crosswalkIcon,crosswalk:e})))):null};function ls(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){is(e,t,n[t])}))}return e}function is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ss={profile:{cellRenderer:e=>{let{value:{entity:t,showCloseButton:n,onClose:r,showButtons:o,config:a}}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e.value,["entity","showCloseButton","onClose","showButtons","config"]);const c=Fi(),{hoveredEntity:u,resetHoveredEntity:p}=(0,l.useContext)(zi),d=(0,m.BTI)(t)===u,{showDialog:h,openAddRelationDialog:f,AddRelationDialogRenderer:g}=Il(a),b=(0,l.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Wi(e,t,n[t])}))}return e}({},s,{entity:t})),[s,t]);return i().createElement(i().Fragment,null,i().createElement("div",{className:De()(c.container,{[c.hovered]:o&&d})},n&&i().createElement(ct.Z,{className:c.closeButton,icon:pt.default,onClick:r,size:"XXS"}),i().createElement(ut.Z,{entity:t}),o&&i().createElement("div",{className:c.matchControlsContainer},i().createElement(Hi,{mode:"normal",value:b,onActionsMenuClose:p,openAddRelationDialog:f,classes:{actionButton:c.rightButton,moreOptions:c.moreOptions}}))),h&&i().createElement(g,null))},headCellRenderer:Bi,label:""},matchRules:{cellRenderer:e=>{let{value:{metadata:t,entity:n,match:r,entitiesMap:o,show:a}}=e;return a?i().createElement(ft.Z,{entity:n,match:r,entitiesMap:o,metadata:t}):null},headCellRenderer:Bi},workflowCard:{cellRenderer:e=>{let{value:{entity:t,match:n}}=e;return i().createElement(Xi,{entity:t,match:n})},headCellRenderer:Bi},sources:{cellRenderer:as,headCellRenderer:Bi},entityId:{headCellRenderer:Bi},crosswalks:{cellRenderer:e=>{let{value:{crosswalks:t,attributeType:n}}=e;const r=ts(),o=(0,p.useSelector)(Se.ZP.selectors.getMetadata),a=(0,l.useMemo)((()=>null==t?void 0:t.map((e=>((e,t,n)=>t.attributes.reduce(((t,r)=>(r.uri===m.G39.sourceSystems.uri?t.value[r.uri]=(0,m.tH7)(n,e.type):e[r.uri]&&(t.value[r.uri]=e[r.uri]),t)),{value:{crosswalk:e},uri:e.uri}))(e,n,o)))),[o,t,n]);return a?i().createElement(rs,{values:a,attributeType:n,LabelRenderer:ns,valueContainerClassName:r.crosswalk}):null},headCellRenderer:Li,attributeType:{uri:"crosswalks",name:"crosswalks",type:"Nested",attributes:Object.values(m.G39)}}},cs=Yi.filter((e=>{let{modes:t}=e;return t.includes(Xo.COLUMNS)})).map((e=>ls({},(0,d.pick)(["id","label","hideable"],e),ss[e.id]))),us=(0,d.pipe)((0,d.split)("/"),d.last),ps=e=>(0,d.when)(d.identity,(0,d.pipe)(d.values,(0,d.chain)((0,d.chain)((0,d.cond)([[(0,d.path)(["value","uri"]),(0,d.path)(["value","uri"])],[(0,d.path)(["value","values"]),(0,d.pipe)((0,d.path)(["value","values"]),(0,d.map)((0,d.prop)("uri")))]]))),(0,d.filter)(d.identity)))(e),ds=(e,t,n,r,o,a,l,i)=>{const{object:s,isMainEntity:c,matchRules:u,matchedValues:p}=t;switch(o.id){case"entityId":return(0,m.BTI)(s);case"profile":return{mainEntity:r,showCloseButton:!c,onClose:()=>l(t),showButtons:!c,entity:s,matchRules:u,permission:(0,m.hXd)(e,a,s,r,u),config:a};case"matchRules":return{metadata:e,entity:r,match:t,entitiesMap:n,show:!c&&!!u};case"sources":return s.crosswalks;case"crosswalks":return{crosswalks:s.crosswalks,attributeType:o.attributeType};case"workflowCard":return{entity:r,match:t}}if((0,m.vZp)(o.id)){const e=(0,m.xy8)(o.attributeType),t=(0,d.pipe)((0,d.pathOr)([],[e,o.attributeType.name]),(0,d.when)((0,d.always)(!i),(0,d.filter)(m.OXP)))(s);return{attributeType:o.attributeType,attributeValues:t,matchedValuesUris:ps(p),showNonOv:i}}},ms=i().createContext((()=>{}));ms.displayName="ColumnHandlerContext";const hs=(0,d.pipe)((0,d.split)("."),(0,d.slice)(0,2),(0,d.join)(".")),fs=(0,d.pipe)((0,d.map)((0,d.when)(m.vZp,hs)),d.uniq);let gs;!function(e){e.INSERT_BELOW="below",e.INSERT_ABOVE="above",e.HIDE="hide"}(gs||(gs={}));const bs={[gs.INSERT_BELOW]:q().text("Insert row below"),[gs.INSERT_ABOVE]:q().text("Insert row above"),[gs.HIDE]:q().text("Hide row")},ys=e=>{let{open:t,anchorEl:n,onClick:r,onClose:o,actions:a}=e;return i().createElement(Lt.Popover,{open:t,anchorEl:n,onClose:o},i().createElement(Lt.List,{component:"div"},a.map(((e,t)=>((e,t,n)=>i().createElement(Lt.ListItem,{button:!0,component:"div",key:n,onClick:t},i().createElement(Lt.ListItemText,{primary:bs[e],primaryTypographyProps:{variant:"body2"}})))(e,(e=>()=>{r(e)})(e),t)))))};var vs=n(47458);function ws(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Es=(e,t)=>e.filter(t).map((e=>e.columns?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){ws(e,t,n[t])}))}return e}({},e,{columns:Es(e.columns,t)}):e)),Cs=(0,l.memo)((e=>{let{anchorEl:t,onClose:n,actions:r,id:o,selectedAttributes:a,setSelectedAttributes:s,groupColumnsData:c}=e;const u=(0,l.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Es(e,(e=>!t.some((t=>e.id===t))))}(c,a)),[c,a]),[p,d]=(0,l.useState)(),[m,h]=(0,l.useState)(!1);(0,l.useEffect)((()=>{t&&h(!0)}),[t]);const f=()=>{d(null),h(!1),n()};return i().createElement(i().Fragment,null,i().createElement(ys,{open:m,anchorEl:t,actions:r,onClose:()=>{h(!1),p||n()},onClick:e=>{if(e!==gs.HIDE)d(e),h(!1);else{const e=[...a],t=a.indexOf(o);t>-1&&(e.splice(t,1),s(e),f())}}}),i().createElement(vs.G,{hideCheckBox:!0,anchorEl:p?t:void 0,columnsData:u,selectedColumns:a,onColumnClick:e=>{let{id:t}=e;const n=[...a],r=a.indexOf(o),l=p===gs.INSERT_ABOVE?r:r+1;n.splice(l,0,t),s(n),f()},onClose:f,title:q().text("Add row")}))}));function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Os="1px solid rgba(0,0,0,0.12)",Ss="rgb(245, 245, 245)",Rs=(0,Le.Z)((e=>({container:{overflow:"auto",height:"100%",width:"100%"},comparisonTableWrapper:{display:"flex",alignItems:"flex-start",position:"relative"},collapsedRow:{display:"none"},comparisonTable:{borderSpacing:0,"& tbody tr:hover td, & tbody tr:hover th":{backgroundColor:"rgb(235, 235, 235)"},"table& tbody tr:hover td:nth-child(2)":{backgroundColor:"rgb(215, 228, 239)"},"& td, & th":{borderRight:Os,borderBottom:Os,margin:0,verticalAlign:"top",textAlign:"left",fontSize:"13px",minHeight:"16px",boxSizing:"border-box",wordBreak:"break-word",wordWrap:"break-word",backgroundColor:"white"},"& td":{minWidth:310,maxWidth:310,padding:"16px",overflow:"hidden",height:0},"& td:empty, th:empty":{padding:"0px 16px"},"& th":{minWidth:212,maxWidth:212,padding:"16px"},"& thead tr:first-child th:first-child":{borderBottom:"none",borderTop:"none"},"& td:first-child, th:first-child":{borderLeft:Os,position:"sticky",left:"0",zIndex:2,backgroundColor:Ss,color:e.palette.text.secondary,fontWeight:"normal"},"& td:nth-child(2), th:nth-child(2)":{borderRight:"2px solid rgba(0,0,0,0.12)",position:"sticky",left:"212px",zIndex:2},"& thead tr:first-child td, & thead tr:first-child th":{borderTop:"none",position:"sticky",top:"0",height:141,padding:0,zIndex:2},"& thead tr:nth-child(2) td, & thead tr:nth-child(2) th":{position:"sticky",top:"141px",height:50,padding:"16px",zIndex:2},"& thead tr:nth-child(2) th, & thead tr:nth-child(3) th":{padding:"16px",backgroundColor:Ss},"& thead tr:nth-child(-n+2) td:nth-child(-n+2), & thead tr:nth-child(-n+2) th:nth-child(-n+2)":{zIndex:3},"table& tr td:nth-child(2), th:nth-child(2)":{backgroundColor:"rgb(224, 238, 249)"}},emptyState:{position:"sticky",top:"10vh",display:"flex",width:"100%"}})));function Ps(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){ks(e,t,n[t])}))}return e}function ks(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ts=[gs.INSERT_BELOW,gs.INSERT_ABOVE,gs.HIDE],Ms=e=>{let{className:t,entity:n,metadata:r,config:o,selectedItems:a,setSelectedItems:s,selectedColumns:c,setSelectedColumns:u,entitiesMap:p={},columnsData:h,showNonOv:f=!1}=e;const g=Rs(),[b,y]=(0,l.useState)(null),[v,w]=(0,l.useState)(),[E,C]=(0,l.useState)(),x=(0,l.useMemo)((()=>a.slice(-4)),[a]),O=(0,l.useMemo)((()=>fs(c)),[c]),S=(0,l.useMemo)((()=>((e,t,n)=>n.map((n=>{const r=cs.find((e=>{let{id:t}=e;return t===n}));if(r)return r;if(!(0,m.vZp)(n))return null;const o=(0,m.h2W)(n,t.type),a=(0,m.zeJ)(e,o,t.type),l=(0,m.xy8)(o);return a?{id:`${l}.${us(o)}`,label:a.label,attributeType:a,cellRenderer:Ai,headCellRenderer:(0,m.YkM)(a)?Li:Bi}:null})).filter(d.identity))(r,n,O)),[r,n,O]),R=(0,l.useContext)(ms),P=(0,l.useMemo)((()=>function(e,t,n,r,o,a,l){let i=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return[{object:n,isMainEntity:!0}].concat(r).map((r=>t.reduce(((t,s)=>(t[s.id]=ds(e,r,o,n,s,a,l,i),ls({},t,{isDraggable:!r.isMainEntity,id:r.object.uri}))),{})))}(r,S,n,x,p,o,R,f)),[r,S,x,n,p,o,R,f]),[k,T]=(0,l.useState)({}),M=(0,l.useCallback)((e=>{T((t=>Ps({},t,{[e]:!t[e]})))}),[]),j=(0,l.useMemo)((()=>({expandedMap:k,onExpandType:M})),[M,k]),N=(0,l.useMemo)((()=>({setHoveredId:w,setAnchor:C,hoveredId:v})),[v]),I=(0,l.useCallback)((()=>{w(null),C(null)}),[]),A=(0,l.useMemo)((()=>S.map((0,d.prop)("id"))),[S]),D=(0,l.useCallback)((()=>{y(null)}),[]),Z=(0,l.useMemo)((()=>({hoveredEntity:b,resetHoveredEntity:D})),[b,D]),{isThereAnyTask:B,setWorkflowTaskAvailability:V}=(e=>{const[t,n]=(0,l.useState)({}),r=(0,l.useCallback)(((e,t)=>{n((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xs(e,t,n[t])}))}return e}({},n,{[e]:t})))}),[]);return{isThereAnyTask:(0,d.pipe)((0,d.map)(m.ev7),(0,d.any)((e=>t[e])))(e),setWorkflowTaskAvailability:r}})(x),L=B?void 0:g.collapsedRow,z=(0,l.useMemo)((()=>S.map((e=>L&&"workflowCard"===e.id?Ps({},e,{rowClassName:L}):e))),[S,L]);return i().createElement("div",{className:De()(g.container,t)},i().createElement("div",{className:g.comparisonTableWrapper},i().createElement(zi.Provider,{value:Z},i().createElement(Ti.Provider,{value:j},i().createElement(Di.Provider,{value:N},i().createElement(Ui.Provider,{value:V},i().createElement(Qe.Z,{className:g.comparisonTable,rowsData:z,columnsData:P,theadRowsNumber:2,onMoveRow:(e,t)=>{const n=(0,d.pipe)((0,d.groupBy)((e=>(0,m.vZp)(e)?(0,m.hWO)(e):e)),d.toPairs)(c),r=n.findIndex((t=>{let[n]=t;return n===e})),o=n.findIndex((e=>{let[n]=e;return n===t})),a=n[r];a&&u((0,d.pipe)((0,d.remove)(r,1),(0,d.insert)(o,a),(0,d.chain)((0,d.nth)(1)))(n))},onMoveColumn:(e,t)=>{const n=a.findIndex((t=>{let{object:n}=t;return n.uri===e})),r=a.findIndex((e=>{let{object:n}=e;return n.uri===t})),o=a[n];o&&s((0,d.pipe)((0,d.remove)(n,1),(0,d.insert)(r,o))(a))},setHoveredColumn:e=>{y((null==e?void 0:e.entityId)||null)},resetHoveredColumn:D}))))),!x.length&&i().createElement("div",{className:g.emptyState},i().createElement(Pi.ZP,{LogoRenderer:Pi.B9.SELECT_ATTRIBUTES,variant:Pi.tC.embedded,text:q().text("Select profiles"),secondaryText:q().text("Select one or more profiles to compare it with the current profile")})),i().createElement(Cs,{id:v,anchorEl:E,onClose:I,actions:Ts,selectedAttributes:A,setSelectedAttributes:u,groupColumnsData:h})))},js=(0,Le.Z)({container:{display:"flex",flexDirection:"column"},table:{flex:1}}),Ns=e=>{let{classes:t={},selectedColumns:n,setSelectedColumns:r,selectedItems:o,setSelectedItems:a,config:l,metadata:s,entity:c,entitiesMap:u={},columnsData:p,showNonOv:d}=e;const m=js();return i().createElement("div",{className:De()(t.root,m.container)},i().createElement(Ms,{className:m.table,entity:c,metadata:s,config:l,selectedColumns:n,setSelectedColumns:r,selectedItems:o,setSelectedItems:a,columnsData:p,entitiesMap:u,showNonOv:d}))};function Is(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){As(e,t,n[t])}))}return e}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ds={position:"relative",whiteSpace:"pre",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"},color:"rgba(0,0,0,0.87)"},Zs={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},Bs=(e,t)=>({"& > *":{position:"relative"},"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:e,pointerEvents:"none","div.hoveredRow &":{background:t||"none"}},"& $defaultWrapper::after":{background:`linear-gradient(to right, ${(0,ze.U1)(e,0)}, ${e} 100%)`,"div.hoveredRow &":{background:t&&`linear-gradient(to right, ${(0,ze.U1)(t,0)}, ${t} 100%)`}}}),Vs=(0,Le.Z)((e=>{const t=(0,ze.$n)(e.palette.primary.main,.88),n=(0,ze.$n)(e.palette.primary.main,.82),r=(0,ze.$n)("rgb(140,193,82)",.88),o=(0,ze.$n)("rgb(0, 114, 206)",.88),a={color:e.palette.primary.main,cursor:"pointer",textDecoration:"none"};return{link:a,hidden:{visibility:"hidden"},rowCloseIcon:{color:"rgba(0, 0, 0, 0.54)",margin:"0 24px 0 8px"},headCell:{display:"flex",alignItems:"center",height:"56px",fontSize:"12px",position:"relative",flex:1,overflow:"hidden",color:"rgba(0,0,0,0.87)",backgroundColor:"rgba(0, 0, 0, 0.06)","&::after":Is({},Zs,{width:"30px",backgroundImage:"none"})},firstHeadCell:{paddingLeft:"42px"},headCellWithEntity:{height:"100%",display:"flex",flexDirection:"column"},rowCell:{fontSize:"12px",overflow:"hidden"},rowCellFirstColumn:{height:"100%"},firstEntityCell:{maxHeight:"200px"},entityRowCell:{fontSize:"12px",position:"relative"},entityRowCellSelected:Bs(o),rowCellHighlighted:Bs(r),rowCellSelected:Bs(t,n),defaultWrapper:Is({},Ds,{"&::after":Is({},Zs,{"div.hoveredRow &":{background:"linear-gradient(to right, rgba(238, 238, 238, 0), rgba(238, 238, 238, 1) 100%)"}})}),hoveredDefaultWrapper:Is({},Ds),entityWrapper:{paddingLeft:"12px"},profileWrapper:{height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",position:"relative"},entityLabel:Is({},a,{fontWeight:500}),commentsContainer:{position:"absolute",right:0,top:0,zIndex:1,height:"100%",display:"flex",alignItems:"center",paddingRight:"15px",backgroundColor:"#fff","&$checked":{backgroundColor:t}},checked:{},matchRulesWrapper:{padding:"8px 15px 8px 10px",display:"flex",flexDirection:"column",boxSizing:"border-box"},blobWrapper:Is({},Ds,{whiteSpace:"pre-wrap",height:"100px",boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}),imageWrapper:Is({},Ds,{display:"flex","& > img":{height:"64px",width:"64px"}}),referenceWrapper:{display:"flex",alignItems:"center",boxSizing:"border-box",height:"48px"},entityAvatar:{transform:"scale(0.5)",marginLeft:"-10px"},collapseButton:{position:"absolute",left:"40px",zIndex:2},dragIcon:{position:"absolute",left:"-5px",zIndex:2,opacity:.38}}})),Ls=(0,fn.Z)((e=>{const t=Vs();return i().createElement("div",{className:t.headCell},i().createElement(hn.default,e))})),zs=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const r=Vs();return i().createElement("div",{className:r.defaultWrapper},i().createElement(xn.Z,{value:t,dataTypeDefinition:n}))},Hs=(0,Tn.Z)(((e,t)=>{let{onToggleSelect:n,entityToMatch:r}=e,{rowValue:o,value:a}=t;const{rawValue:l}=o;return{onRemove:()=>n(l),isRowRemovable:a!==r,entityToMatch:r}}))((e=>{let{value:t,rowIndex:n,rowValue:r,onRemove:o,entityToMatch:a,isRowSelected:s,hoverRowIndex:c}=e;const u=Vs(),p=(0,l.useContext)(Rn.B),d=t!==a,h=n===c,f=0===n,g=h?u.hoveredDefaultWrapper:u.defaultWrapper,b=t.uri!==a.uri&&!h;return i().createElement(i().Fragment,null,i().createElement("div",{className:De()(g,u.profileWrapper,u.entityWrapper,{[u.firstEntityCell]:f&&!d})},h&&i().createElement(Mn.Z,{className:u.dragIcon}),i().createElement(Pn.Z,{className:u.collapseButton,rowIndex:n,rowValue:r}),i().createElement(ct.Z,{icon:pt.default,size:"XS",className:De()(u.rowCloseIcon,{[u.hidden]:!d}),onClick:o,"data-reltio-id":`reltio-matches-table-${p?p+"-":""}checkbox-${n}`}),i().createElement(kn.Z,{value:(0,m.wwR)(t),className:u.entityLabel},(0,m.idV)(t.label)),b&&i().createElement(un.Z,{className:De()(u.commentsContainer,{[u.checked]:s}),uri:(0,m.E_P)(a.uri,t.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:a.uri,matchEntityUri:t.uri}),allowOnlyOneComment:!0})))})),Fs=(0,Tn.Z)()((0,fn.Z)((e=>{const t=0===e.headIndex,n=Vs();return i().createElement("div",{className:De()(n.headCell,{[n.firstHeadCell]:t})},i().createElement(hn.default,e))}))),Ws=e=>{let{value:t}=e;const n=Vs();if(!t)return null;const{metadata:r,match:o,entitiesMap:a,entity:l,variant:s}=t;return i().createElement("div",{className:n.matchRulesWrapper},i().createElement(ft.Z,{variant:s,metadata:r,entitiesMap:a,match:o,entity:l}))},_s=e=>{let{value:t}=e;const n=Vs();return i().createElement("div",{className:n.blobWrapper,onScroll:T.UW},t)},Us=e=>{let{value:t}=e;const n=Vs(),r=(0,m.efz)({value:t});return r&&i().createElement("div",{className:n.imageWrapper},i().createElement("img",{src:r}))},Gs=e=>{let{value:t}=e;const n=Vs(),r=(0,p.useSelector)(Se.ZP.selectors.getMetadata);return t&&i().createElement("div",{className:De()(n.defaultWrapper,n.referenceWrapper)},i().createElement(Un.Z,{className:n.entityAvatar,entityType:(0,m.nt9)(r,(0,m.CZ8)(t).type)}),i().createElement(kn.Z,{value:(0,m.CZ8)(t).objectURI,className:n.link},(0,m.idV)(t.label)))},qs=e=>{let{value:t}=e;const n=Vs();return i().createElement("div",{className:n.defaultWrapper},i().createElement(as,{value:t.crosswalks}))};function $s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xs=(0,d.split)("."),Ys=(e,t,n,r)=>n.map((n=>{const o=n.object,a=n.matchRules||[],l=n.matchScore||0,i=(0,m.w80)(e,o.type,a),s={entity:o,metadata:e,match:n,entitiesMap:r,matchScore:l},c=t.filter((e=>{let{modes:t}=e;return!t||t.includes(Xo.TABLE)}));return(0,d.pipe)((0,d.reduce)(((e,t)=>(0,d.assoc)(t.id,((e,t)=>{let{entity:n,metadata:r,match:o,entitiesMap:a,matchScore:l}=t;switch(e.id){case"profile":return n;case"entityId":return(0,m.BTI)(n);case"matchRules":return{metadata:r,match:o,entitiesMap:a,entity:n,variant:"all"};case"score":return l;case"sources":return{crosswalks:n.crosswalks};default:{const[t,...r]=Xs(e.id);return(0,d.pipe)((0,d.prop)(t),(0,m.tT_)(r))(n)}}})(t,s),e)),{}),(0,d.assoc)("matchAttributes",i),(0,d.assoc)("rawValue",n))(c)})),Qs=e=>{if((0,m.vZp)(e)){const[,...t]=Xs(e);return t.length>1?t.slice(0,-1):null}return null},Ks=e=>{switch(e.id){case"profile":return Hs;case"matchRules":return Ws;case"sources":return qs;default:return(e=>{switch(e){case m.oS0.TYPE_BLOB:return _s;case m.oS0.TYPE_IMAGE:return Us;case m.oS0.TYPE_REFERENCE:return Gs;default:return zs}})(e.dataTypeDefinition.type)}};function Js(){return Js=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},Js.apply(this,arguments)}const ec=(0,Tn.Z)(((e,t)=>{let{selected:n}=e,{columnData:r,rowValue:o,cell:a}=t;return{isRowSelected:!!n&&n.includes(o.rawValue),isCellHighlighted:ia(o.matchAttributes,r)&&!a.values.every(m.O27)}}))((e=>{let{rowValue:t,cell:n,CellValueRenderer:r,isRowSelected:o,isCellHighlighted:a,columnIndex:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["rowValue","cell","CellValueRenderer","isRowSelected","isCellHighlighted","columnIndex"]);const c=Vs(),u=0===l;return i().createElement("div",{className:De()({[c.rowCellSelected]:o,[c.rowCellHighlighted]:a,[c.rowCellFirstColumn]:u},c.rowCell)},n.values.map(((e,n)=>i().createElement(r,Js({key:n,value:e,rowValue:t,isRowSelected:o},s)))))})),tc=(0,Le.Z)((e=>({tableContainer:{flex:1,display:"flex",color:"rgba(0,0,0,0.54)",overflow:"hidden",background:e.palette.background.paper},rowActionButtonsWrapper:{height:"100%",display:"flex",alignItems:"center",marginRight:"1px"},rowActionButtons:{backgroundColor:"rgba(238, 238, 238, 1)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",backgroundColor:"rgba(238, 238, 238, 1)",borderLeft:"1px solid rgba(0,0,0,0.12)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},checked:{},actionButton:{marginLeft:"12px","&:last-child":{marginRight:"3px"}},hoveredRowRightContentContainer:{alignItems:"center !important"}})));function nc(){return nc=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},nc.apply(this,arguments)}const rc=e=>{let{entity:t,matches:n,metadata:r,columnsData:o,config:a,filters:s,onFilter:c,sorting:u,onSort:p,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,entitiesMap:y,basicTableRef:v,isComparisonViewShown:w}=e;const E=tc(),[C,x]=(0,l.useState)(n);(0,l.useEffect)((()=>{x(n)}),[n]);const O=(0,l.useCallback)(((e,t)=>{x((0,d.move)(e,t)),_(t)}),[]),S=(0,l.useMemo)((()=>Ys(r,o,C,y)),[C,o,r,y]),R=!!p,P=(0,l.useMemo)((()=>((e,t)=>(0,d.pipe)((0,d.filter)((e=>{let{modes:t}=e;return!t||t.includes(Xo.TABLE)})),(0,d.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$s(e,t,n[t])}))}return e}({sortable:e},t,{resizable:!0,nestedPath:Qs(t.id),headCellRenderer:"profile"===t.id?Fs:Ls,rowCellValueRenderer:Ks(t)}))))(t))(R,o)),[o,R]),k=(0,l.useMemo)((()=>t?Ys(r,o,[{object:t}]):[]),[t,r,o]),{getRowHeight:T,CellRenderer:M}=(0,sn.Z)({rowsData:k,columnsData:P,maxRowValuesCount:3}),j=T(0),N=(0,l.useMemo)((()=>{const e=(e=>t=>n=>{const r=Vs();return i().createElement(Rn.B.Provider,{value:"tableHeader"},i().createElement("div",{className:r.headCellWithEntity},i().createElement(t,n),i().createElement(e,{className:De()(r.entityRowCell,r.entityRowCellSelected),columnId:n.headCellData.id,rowIndex:0})))})(M);return P.map((0,d.evolve)({headCellRenderer:e}))}),[P,M]),I=(0,l.useMemo)((()=>({isAllSelected:h.length>0&&h.length===n.length,entityToMatch:t,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,isComparisonViewShown:w})),[t,h,f,g,b,n,w]),{getDynamicRowCellHeight:A,changeRowCellHeight:D,clearHeightsCache:Z}=(0,cn.Z)();(0,l.useLayoutEffect)(Z,[n]);const[B,V]=(0,l.useState)(!1),L=(0,l.useCallback)((()=>V(!0)),[]),z=(0,l.useCallback)((()=>V(!1)),[]),[H,F]=(0,l.useState)(!1),[W,_]=(0,l.useState)(null),U=(0,l.useCallback)((e=>{_((t=>B||H?t:e))}),[B,H]),{showDialog:G,openAddRelationDialog:q,AddRelationDialogRenderer:$}=Il(a),X=(0,l.useMemo)((()=>{if(null===W)return null;const e=C[W];if(!e)return null;const n=(0,m.hXd)(r,a,e.object,t,e.matchRules),o=h.includes(e);return i().createElement("div",{className:De()(E.rowActionButtonsWrapper)},i().createElement("div",{className:De()(E.rowActionButtons,{[E.checked]:o})},i().createElement(Hi,{value:{mainEntity:t,entity:e.object,matchRules:e.matchRules,permission:n},openAddRelationDialog:q,onActionsMenuClose:z,onActionsMenuOpen:L,classes:{actionButton:E.actionButton,moreOptions:E.actionButton}})),t&&i().createElement(un.Z,{className:De()(E.commentsContainer,{[E.checked]:o}),uri:(0,m.E_P)(t.uri,e.object.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:t.uri,matchEntityUri:e.object.uri}),onChangePopupVisibility:F,allowOnlyOneComment:!0,showAlways:!0}))}),[W,C,h,E,t,a,r,L,z,q]),Y=(0,l.useCallback)((e=>{switch(e.columnData.id){case"profile":return i().createElement(ec,nc({},e,{hoverRowIndex:W,actionsContent:X,tableRef:v}));case"matchRules":return i().createElement(pn.Z,nc({onChangeHeight:D},e),i().createElement(ec,e));default:return i().createElement(ec,e)}}),[D,W,X,v]),Q=(0,l.useCallback)((0,d.either)(A,dn.Z),[A,dn.Z]),K=(0,l.useMemo)((()=>({hoveredRowRightContentContainer:E.hoveredRowRightContentContainer})),[E]);return i().createElement("div",{className:E.tableContainer},i().createElement(mn.Z,{fixFirstColumn:!0,columnsData:N,rowsData:S,context:I,sorting:u,onSort:p,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:100,headRowHeight:56+j,renderRowCell:Y,getRowCellHeight:Q,hoverStateEnabled:!0,hoveredRowRightContent:X,hoverRowIndex:W,onRowHover:U,classes:K,maxRowValuesCount:3,dndRowReorderingEnabled:!0,dndRowReorderingHandler:O,ref:v,hoveredContentPosition:0}),G&&i().createElement($,null))},oc=(0,Le.Z)({comparisonView:{width:"100%",overflow:"auto"}});function ac(){return ac=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},ac.apply(this,arguments)}const lc=e=>{let{config:t,getSavedState:n,saveState:r}=e;const o=(0,p.useSelector)(Se.ZP.selectors.getMetadata),a=(0,p.useSelector)(Se.ZP.selectors.getEntity),{tableViewModeAvailable:s}=t,{isLoaded:c,savedState:u,updateSavedState:h}=(0,hi.w)({getSavedState:n,saveState:r,entityTypeUri:a.type}),f=(0,l.useRef)(),{selectedItems:g,entitiesMap:y,comparisonViewMode:v}=ka(),{toggleSelect:w,setSelectedItems:E,setComparisonViewMode:C}=Ta(),{isGlobalSpinnerActive:x}=Fa(),{uri:S}=a||{};((e,t)=>{const{setSelectedItems:n}=Ta(),r=(0,d.prop)("uri",t),o=(0,d.prop)("dataTenant",t),a=(0,l.useMemo)((()=>({enabled:!!r,entity:t,filter:"",page:0,sorting:{field:"score",order:"desc"},rowsPerPage:3,options:Wl})),[o,r]),{matches:i}=Rl(a);(0,l.useEffect)((()=>{n(i)}),[i,n])})(0,a);const R=(0,l.useMemo)((()=>(0,m.NVY)(S,Object.keys(y))),[S,y]),P=(0,Ar.C)({objectIds:R}),k=oc(),[T,M,j]=(e=>{let{defaultColumnsData:t,additionalColumnsData:n,metadata:r,entityTypeUri:o}=e;return(0,l.useMemo)((()=>{const e=aa(r,o),a=t.concat(n||[]).concat(e),l=(0,m.qhs)(r,o),i=((e,t)=>{const[n,r]=(0,d.pipe)((0,d.reject)(sa),(0,d.partition)(ia(e)))(t);return n.length?[{id:"match",label:q().text("Match attributes"),columns:t.filter(da(n))},{id:"all",label:q().text("All attributes"),columns:t.filter(da(r))}]:t})(l,a);return[a,i,(0,d.pipe)(ma,(0,d.concat)(t),la)(l,e)]}),[t,n,r,o])})({defaultColumnsData:Yi,metadata:o,entityTypeUri:a.type}),[N,I]=(0,l.useState)(j),[A,D]=(0,l.useState)(!1),Z=(0,l.useMemo)((()=>N.map((e=>T.find((0,d.propEq)("id",e)))).filter(d.identity)),[N,T]),B={entity:a,metadata:o,selectedItems:g||[],setSelectedItems:E,config:t,selectedColumns:N,setSelectedColumns:I,entitiesMap:y,columnsData:M,showNonOv:A},V={entity:a,metadata:o,entitiesMap:y,config:t,matches:g,columnsData:Z,onSelectAll:()=>{},onToggleSelect:w,onResetSelect:()=>{},selected:[],isComparisonViewShown:!1};return(0,l.useEffect)((()=>{c&&(f.current=u,null!=u&&u.visibleColumns&&I(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,d.pipe)((0,d.filter)((0,d.propEq)("hideable",!1)),(0,d.map)((0,d.prop)("id"))),n=(0,d.pipe)(d.concat,d.uniq),r=t(Yi);return n(r,e)}(u.visibleColumns)),null!=u&&u.comparisonViewMode&&C(s?u.comparisonViewMode:Xo.COLUMNS),(0,d.has)("showNonOv",u)&&D(u.showNonOv))}),[c]),(0,l.useEffect)((()=>{if(!c)return;const e={comparisonViewMode:v,visibleColumns:N,showNonOv:A};(0,d.equals)(e,f.current)||(h(e),f.current=e)}),[N,v,A]),i().createElement(i().Fragment,null,i().createElement(Ri,{config:t,columnsData:M,selectedColumns:N,onChangeColumns:I,showNonOv:A,onChangeShowNonOv:D}),i().createElement(Dr.h.Provider,{value:P},v===Xo.COLUMNS?i().createElement(b.l,null,i().createElement(ms.Provider,{value:w},c&&i().createElement(Ns,ac({},B,{classes:{root:k.comparisonView}})))):c&&i().createElement(rc,V)),x&&i().createElement(O.Z,null))},ic=(0,Le.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},potentialMatchesWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},potentialMatchesContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var sc=n(81137);function cc(){return cc=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},cc.apply(this,arguments)}const uc=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",cc({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.25 3H3.75c-.825 0-1.5.675-1.5 1.5v9c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-9c0-.825-.675-1.5-1.5-1.5zm-9 10.5h-1.5v-6h1.5v6zM3.75 6h1.5V4.5h-1.5V6zm6 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6zm7.5 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6z",fill:"#000",fillOpacity:".541"}))},pc=(0,Le.Z)({flexBox:{display:"flex",alignItems:"center"},icon:{display:"flex",alignItems:"center",margin:"0 4px"}}),dc=()=>{const{selectedItems:e,comparisonViewMode:t,limitSelection:n}=ka(),{setComparisonViewMode:r,deleteExtraMatches:o}=Ta(),a=pc(),s=(0,l.useCallback)((()=>{r(Xo.TABLE)}),[r]),c=t===Xo.COLUMNS&&e.length>n,u=q().text("Switch to table view"),p=i().createElement("div",{className:a.flexBox},q().text("Please switch to"),i().createElement("div",{className:a.icon},i().createElement(uc,null)),q().text("Table View to compare more than ${max} profiles",{max:4}));return i().createElement(sc.Z,{open:c,title:u,content:p,onSave:s,onDiscard:o,saveCaption:q().text("Proceed"),discardCaption:q().text("Cancel")})},mc=e=>{let{config:t,getSavedState:n,saveState:r}=e;const o=ic(),a=(0,p.useSelector)(Se.ZP.selectors.getEntity),{SnackbarRenderer:l,showSnackbarMessage:s}=(0,No.D)(),{tableViewModeAvailable:c}=t;return i().createElement(Pa,{tableViewModeAvailable:c},i().createElement(Jo,null,i().createElement(Io.S.Provider,{value:s},i().createElement("div",{className:o.perspectiveView},(null==a?void 0:a.uri)&&i().createElement("div",{className:o.potentialMatchesContainer},i().createElement("div",{className:o.potentialMatchesWrapper},i().createElement(Vo,null),i().createElement(lc,{config:t,getSavedState:n,saveState:r})),i().createElement(mi,{config:t}),i().createElement(l,null),c&&i().createElement(dc,null))))))};var hc=n(39450);const fc=(0,c.createGenerateClassName)({productionPrefix:"potentialMathcesView",disableGlobal:!0}),gc=e=>{let{config:t,store:n,onResize:o=d.identity,saveState:a,getSavedState:h}=e;const f=(0,l.useCallback)((0,m.aYu)(h),[h]),g=(0,l.useCallback)((0,m.DsO)(a,3e3),[a]);return i().createElement(p.Provider,{store:n},i().createElement(hc.m.Provider,{value:t.id},i().createElement(c.StylesProvider,{generateClassName:fc},i().createElement(u.MuiPickersUtilsProvider,{utils:r.Z},i().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>o(Math.floor(e),Math.floor(t))}),t&&(!1!==t.newView?i().createElement(mc,{config:t,saveState:g,getSavedState:f}):i().createElement(jo,{config:t,saveState:a,getSavedState:f})),i().createElement(ye.Z,null)))))};gc.propTypes={config:m.yxQ,store:a().object,onResize:a().func,saveState:a().func,getSavedState:a().func};const bc=gc}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[2771],{79821:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),o=n.n(r),a=n(52730),l=n(59431),i=n(57941),s=n(97991);const c=(0,n(79692).Z)({icon:{maxHeight:"25px",maxWidth:"25px",marginRight:"16px"}}),u=e=>{let{group:t,metadata:n}=e;const r=c(),u=(0,a.useSelector)(l.ZP.selectors.getAbsoluteImagePath),p=(0,i.XH8)(n,{type:t.id}),d=(0,i.vPL)(u,p);return o().createElement(s.Z,{className:r.icon,icon:d,avatarText:t.title[0]})}},97991:(e,t,n)=>{n.d(t,{Z:()=>u});var r,o=n(94079),a=n(71153),l=n.n(a),i=n(24328),s=n.n(i);function c(){return c=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},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"}(r||(r={}));const u=e=>{let{className:t,icon:n,avatarText:a,rootClasses:u}=e,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","icon","avatarText","rootClasses"]);const[d,m]=(0,i.useState)(null);(0,i.useEffect)((()=>{m(n?r.ICON_MODE:r.TEXT_MODE)}),[n,a]);const h=()=>{m(r.ERROR_MODE)};switch(d){case r.ICON_MODE:return s().createElement(o.Avatar,c({className:l()(t,null==u?void 0:u.iconRoot),src:n,onError:h},p));case r.TEXT_MODE:case r.ERROR_MODE:return s().createElement(o.Avatar,c({className:l()(t,null==u?void 0:u.textRoot)},p),a);default:return null}}},99757:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(24328),o=n.n(r),a=n(87918),l=n.n(a),i=n(71153),s=n.n(i),c=n(17440),u=n(97820),p=n(54763),d=n(45767),m=n(88611),h=n(22385),f=n(79692);const g=(0,f.Z)({attribute:{cursor:"pointer",lineHeight:"16px",flexBasis:"100%",display:"flex",alignItems:"center",padding:"0 10px 0 16px",width:"calc(100% - 32px)","&$attributeWithValue":{borderBottom:"1px solid rgba(0,0,0,0.38)"},"&$disabled":{cursor:"default"}},disabled:{},attributeWithValue:{},noSelect:{},name:{fontSize:"14px",color:"rgba(0,0,0,0.87)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",direction:"rtl",textAlign:"left",flex:"1 0",width:"0","& $noSelect":{color:"rgba(0,0,0,0.38)"},"&$disabled":{color:"rgba(0,0,0,0.26)","& $noSelect":{color:"rgba(0,0,0,0.26)"}}}}),b=(0,c.either)((0,c.prop)("title"),(0,c.prop)("fieldName")),y=e=>{let{value:t,getLabel:n=b,onSelectAttributeClick:r,disabled:a=!1}=e;const i=g(),c=t&&n(t);return o().createElement("div",{onClick:a?void 0:r,className:s()(i.attribute,{[i.attributeWithValue]:!!c},{[i.disabled]:a})},o().createElement(m.C,{value:c},o().createElement("div",{className:s()(i.name,{[i.disabled]:a})},c||o().createElement("span",{className:i.noSelect},l().text("Select attribute")))),o().createElement(h.Z,{size:"M",icon:d.Z,disabled:a}))};var v=n(57941);function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=(0,c.eqBy)((0,c.pick)(["fieldName","uri","entityTypeUri"])),x=(e,t)=>t&&!!t.find(C(e)),O=(e,t)=>e.title.toLowerCase().includes(t.toLowerCase()),S=(e,t)=>O(e,t)||(e.children||[]).some((e=>S(e,t))),R=(e,t)=>e.findIndex(C(t)),P=(0,v.fW1)("title"),k=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const l=O(e,r);return[{item:r?w({},e,{filterText:r}):e,level:o,groupId:t,groupName:n}].concat(e.children?e.children.filter((e=>a||l||S(e,r))).flatMap((e=>k(e,t,n,r,o+1,a||l))):[]).flat()},T=(0,c.curry)(((e,t)=>t.map((t=>({item:t,items:t.attributes.filter((t=>S(t,e))).map((n=>k(n,t.id,t.title,e)))}))).filter((e=>e.items.length))));var M=n(52730),j=n(94079),N=n(59431),I=n(7785),A=n(44890),D=n(27239),Z=n(79821);const B=(0,f.Z)({subHeader:{backgroundColor:"#f5f5f5",padding:"0 16px",margin:0,display:"flex",alignItems:"center",color:"rgba(0,0,0,0.84)",fontSize:"14px",fontWeight:500}});function V(){return V=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},V.apply(this,arguments)}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){z(e,t,n[t])}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const H=(0,r.memo)((e=>{let{selectedAttributes:t,onItemClick:n,focusIndex:r,hideCheckBox:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["selectedAttributes","onItemClick","focusIndex","hideCheckBox"]);const i=B(),s=(0,M.useSelector)(N.ZP.selectors.getMetadata);return o().createElement(A.Z,V({getItemSize:(e,t)=>t.items?40:28,renderItem:(e,l,i)=>{let{item:s,level:c,groupId:u,groupName:p}=l;const d=x(s,t),m=i===r;return o().createElement(I.Z,{key:`item-${u}-${s.fieldName}`,onClick:n,checked:d,data:L({},s,{groupName:p}),notSelectable:s.notSelectable,hideCheckBox:a,label:o().createElement(D.Z,{text:s.title,highlight:s.filterText}),labelInText:s.title,level:c,style:e,isFocused:m,groupId:u,LogoIcon:s.LogoIcon})},renderGroupTitle:(e,t)=>o().createElement(j.ListItem,{component:"div",className:i.subHeader,style:e,key:`group-${t.item.id}`},t.item.needGroupIcon&&o().createElement(Z.Z,{group:t.item,metadata:s}),t.item.title),focusIndex:r},l))}));var F=n(56656);const W=(0,f.Z)({selector:{minWidth:"200px",alignItems:"stretch",background:"rgba(0,0,0, 0.0267)",boxSizing:"border-box",borderRadius:"4px",display:"flex"}}),_=(0,r.memo)((e=>{let{className:t,itemsGroups:n,value:a,getLabel:i,onSelect:d,onRestoreFocus:m=c.identity,onOpenPopup:h=c.identity,disableRestoreFocus:f=!1,disableEnforceFocus:g=!1,single:b=!1,ungroup:v=!1,disabled:E=!1,hideCheckBox:O=!1}=e;const S=W(),[k,M]=(0,r.useState)(null),j=(0,r.useCallback)((()=>M(null)),[]),N=!!k,[I,A]=(0,r.useState)(""),D=(0,r.useCallback)((()=>A("")),[]),[Z,B]=(0,r.useState)([]),V=(0,r.useCallback)((()=>B([])),[]),L=(0,r.useMemo)((()=>T(I,n)),[n,I]),z=(0,r.useMemo)((()=>(0,c.pipe)((0,c.when)((0,c.always)(v),(0,c.chain)((0,c.pipe)((0,c.prop)("items"),c.flatten,(0,c.map)((0,c.pick)(["item","level"]))))),F.LG)(L)),[v,L]),_=(0,r.useMemo)((()=>Math.max(P(L),308)),[L]),U=(0,c.pipe)((0,c.tap)((0,c.pipe)(V,D,j)),m),G=(0,r.useRef)(),q=(0,r.useCallback)(((e,t)=>{d({checked:t,attribute:e,index:t?Z.length:R(Z,e),selectedAttributes:Z}),b?(B(t?[e]:[]),U({})):(B((e=>{let{attribute:t,selectedAttributes:n,checked:r}=e;return r?n.concat(t):n.filter((e=>!C(t,e)))})({selectedAttributes:Z,attribute:e,checked:t})),G.current&&G.current.focus())}),[Z,d,b,U,G]),$=(0,r.useCallback)((e=>{let{onListItemClick:t,selectedAttributes:n}=e;return e=>{let{item:r,groupData:o}=e;const a=x(r,n);t(w({},r,{groupName:o.groupName}),!a)}})({onListItemClick:q,selectedAttributes:Z}),[q,Z]),{focusIndex:X,handleKeyDown:Y}=(0,p.t)({items:z,open:N,onSelectFocusedItem:$,selectedItems:Z,onClose:U});return o().createElement("div",{className:s()(S.selector,t),"data-reltio-id":"attribute-selector"},o().createElement(y,{value:a,getLabel:i,onSelectAttributeClick:e=>{h(),M(e.currentTarget)},disabled:E}),o().createElement(u.Z,{open:N,anchorEl:k,onClose:U,onSearch:A,title:l().text("Select attribute"),containerWidth:_,containerHeight:507,searchInputOnKeyDown:Y,anchorOrigin:{horizontal:"right",vertical:"bottom"},searchInputRef:G,disableRestoreFocus:f,disableEnforceFocus:g},o().createElement(H,{items:z,onItemClick:q,selectedAttributes:Z,width:_,height:400,focusIndex:X,hideCheckBox:O})))}))},74402:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),o=n(17440),a=n(57941);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=e=>{let{rowIndex:t,columnData:{id:n},cellIndex:r}=e;return`${n}[${t}][${r}]`},s=()=>{const[e,t]=(0,r.useState)({}),n=(0,r.useRef)({}),s=(0,r.useCallback)((0,a.DsO)((()=>{t(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},n.current))})),[]),c=(0,r.useCallback)((()=>{n.current={}}),[]);return{getDynamicRowCellHeight:(0,r.useCallback)((0,o.pipe)(i,(0,o.prop)(o.__,e)),[e]),changeRowCellHeight:(0,r.useCallback)((0,o.curry)((0,o.useWith)((0,o.pipe)(((e,t)=>{n.current[e]=t}),s),[i,o.identity])),[]),clearHeightsCache:c}}},74566:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(73038),s=n(58241),c=n(71153),u=n.n(c);const p=(0,n(79692).Z)((()=>({hidden:{visibility:"hidden"}}))),d=e=>{let{rowIndex:t,rowValue:n,className:a}=e;const l=p(),{toggleRowCollapse:c,getIsRowCollapsible:d,getIsRowCollapsed:m}=(0,r.useContext)(i.x),h=d(n),f=m(t);return o().createElement(s.Z,{className:u()(a,{[l.hidden]:!h}),isOpen:!f,onClick:e=>{c(t),e.stopPropagation()}})};d.propTypes={rowIndex:l().number,rowValue:l().object,className:l().string};const m=d},97946:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(44443),s=n(94079),c=n(20562);const u=e=>{let{onChangeHeight:t,children:n}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["onChangeHeight","children"]);const l=(0,r.useRef)(null),{rowValue:u,rowIndex:p,columnData:d,cellIndex:m}=a,h=t({rowIndex:p,cellIndex:m,columnData:d}),f=()=>l.current&&h(l.current.clientHeight);return(0,c.D)(f,[u.rawValue]),o().createElement("div",null,o().createElement(i.Z,{handleHeight:!0,onResize:f}),o().createElement(s.RootRef,{rootRef:l},n))};u.propTypes={onChangeHeight:l().func,children:l().node};const p=u},23598:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(71153),s=n.n(i),c=n(79692);const u=(0,c.Z)((()=>({row:{display:"flex",marginBottom:"12px"},rowItem:{paddingRight:"10px",display:"flex"},fullWidth:{flexGrow:"1",flexBasis:"0",overflow:"hidden"},hidden:{visibility:"hidden"}})));var p=n(87918),d=n.n(p),m=n(6782);const h="46px",f=(0,c.Z)((e=>({readOnlyLogicOperatorContainer:{display:"flex",alignItems:"center",marginRight:"40px",width:"76px",fontSize:"14px",color:e.palette.text.secondary,maxHeight:h},readOnlyFilter:{display:"flex",alignItems:"center",fontSize:"14px",color:e.palette.text.secondary,width:"50px",marginLeft:"12px",maxHeight:h}}))),g=e=>{let{className:t,rowData:n}=e;const r=f();return o().createElement("div",{className:s()(r.readOnlyLogicOperatorContainer,t)},n&&n.operator?(0,m.Z)(n.operator):d().text("Where"))};g.propTypes={className:l().string,rowData:l().object};const b=g;var y=n(57941);const v=e=>{let{className:t,rowData:n}=e;const r=f();return o().createElement("div",{className:s()(r.readOnlyFilter,t)},n&&n.filter?(0,y.XS2)(n.filter):d().text("equals"))};v.propTypes={className:l().string,rowData:l().object};const w=v;var E=n(94656);const C=e=>{let{classes:t={},rowData:n,previousRowData:r,LogicOperatorComponent:a=b,AttributeSelectorComponent:l,FilterSelectorComponent:i=w,ValuesEditorComponent:c,ActionsComponent:p,filterSelectorRef:d,attributeSelectorProps:m={}}=e,h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["classes","rowData","previousRowData","LogicOperatorComponent","AttributeSelectorComponent","FilterSelectorComponent","ValuesEditorComponent","ActionsComponent","filterSelectorRef","attributeSelectorProps"]);const f=u();return o().createElement("div",{className:s()(f.row,t.root)},o().createElement(a,{className:t.logicOperatorContainer,rowContext:h,rowData:r}),o().createElement("div",{className:s()(f.rowItem,t.attributeSelectorContainer)},o().createElement(l,{attributeSelectorProps:m,rowContext:h,rowData:n})),o().createElement("div",{className:s()(f.rowItem,t.filterSelectorContainer)},o().createElement(i,{textFieldInputRef:d,rowContext:h,rowData:n})),o().createElement("div",{className:s()(f.rowItem,f.fullWidth,t.valuesEditorContainer)},o().createElement(c,{rowContext:h,rowData:n})),o().createElement("div",{className:s()(f.rowItem,t.actionsContainer,{[f.hidden]:!n})},o().createElement(p,{rowContext:h,rowData:n})))};C.propTypes={classes:l().shape({root:l().string,logicOperatorContainer:l().string,attributeSelectorContainer:l().string,filterSelectorContainer:l().string,valuesEditorContainer:l().string,actionsContainer:l().string}),rowData:E.Xw,previousRowData:E.Xw,LogicOperatorComponent:l().elementType,AttributeSelectorComponent:l().elementType,FilterSelectorComponent:l().elementType,ValuesEditorComponent:l().elementType,ActionsComponent:l().elementType,filterSelectorRef:l().object,attributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const x=(0,r.memo)(C)},41315:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),o=n.n(r),a=n(13980),l=n.n(a),i=n(17440),s=n(23598),c=n(94656);function u(){return u=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},u.apply(this,arguments)}const p=e=>{let{className:t,rowClasses:n,rowsData:r,lastRowAttributeSelectorProps:a,filterSelectorRef:l,filterSelectorRefIndex:c}=e,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["className","rowClasses","rowsData","lastRowAttributeSelectorProps","filterSelectorRef","filterSelectorRefIndex"]);const d=(e,t,r)=>{const d=t>0?(0,i.path)([t-1],r):null,m=t===r.length?{attributeSelectorProps:a}:{};return o().createElement(s.Z,u({key:e&&e.id,rowData:e,previousRowData:d,classes:n,filterSelectorRef:t===c?l:void 0},p,m))};return o().createElement("div",{className:t},r.map(d),d(null,r.length,r))};p.propTypes={className:l().string,rowClasses:l().shape({root:l().string,logicOperatorContainer:l().string,attributeSelectorContainer:l().string,filterSelectorContainer:l().string,valuesEditorContainer:l().string,actionsContainer:l().string}),rowsData:l().arrayOf(c.Xw),LogicOperatorComponent:l().elementType,AttributeSelectorComponent:l().elementType,FilterSelectorComponent:l().elementType,ValuesEditorComponent:l().elementType,ActionsComponent:l().elementType,filterSelectorRef:l().object,filterSelectorRefIndex:l().number,lastRowAttributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const d=(0,r.memo)(p)},94175:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(59431),o=n(57941),a=n(24328),l=n.n(a),i=n(52730),s=n(97991);const c=e=>{let{sourceType:t,className:n,classes:a}=e;const c=(0,i.useSelector)(r.ZP.selectors.getMetadata),{uri:u,icon:p}=(0,o.PWK)(c,t),d=(0,o.tH7)(c,u)[0];return l().createElement(s.Z,{className:n,avatarText:d,icon:p?(0,o.vPL)("https://s3.amazonaws.com/reltio.images/api",p):null,variant:"square",rootClasses:a})}},87760:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(57941),o=n(24328),a=n.n(o),l=n(81303),i=n(13074);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=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},u.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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const d=e=>{let{values:t,valueContainerClassName:n}=e,r=p(e,["values","valueContainerClassName"]);return a().createElement(a().Fragment,null,(t||[]).map((e=>a().createElement("div",{key:e.uri,className:n},a().createElement(l.Z,u({attributeValue:e},r))))))},m=(0,o.memo)((e=>{let{expanded:t,LabelRenderer:n}=e,o=p(e,["expanded","LabelRenderer"]);const{attributeType:l,values:c,valueContainerClassName:u}=o;switch(l.type){case r.oS0.TYPE_NESTED:case r.oS0.TYPE_REFERENCE:return d(s({expanded:t,LabelRenderer:n},o));case r.oS0.TYPE_IMAGE:return a().createElement("div",{className:u},a().createElement(i.Z,{attributeType:l,attributeValues:c,imageSize:{imageHeight:40,imageWidth:40,imageMargin:2}}));default:return d(s({},o))}}))},63149:(e,t,n)=>{n.d(t,{hR:()=>c,nX:()=>u,RT:()=>p,pu:()=>d,BF:()=>m});var r=n(24328),o=n.n(r),a=n(57941),l=n(17440),i=n(31276);const s=(0,r.createContext)(null),c=e=>{let{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children"]);return o().createElement(s.Provider,{value:n},t)},u=e=>{const{getCrosswalkColor:t=(0,l.pipe)(a.uKF,a.CJp)}=(0,r.useContext)(s)||{};return e?t(e):""},p=()=>{const{highlightedCrosswalks:e=[]}=(0,r.useContext)(s)||{};return e},d=e=>{const{highlightedCrosswalks:t=[],setCrosswalkHighlighted:n=i.ZT}=(0,r.useContext)(s)||{},o=!!e&&!!t.find((0,l.eqBy)(a.uKF,e));return{isHighlighted:o,isDimmed:t.length>0&&!o,highlightCrosswalk:(0,r.useCallback)((()=>n(e,!0)),[e,n]),removeHighlight:(0,r.useCallback)((()=>n(e,!1)),[e,n])}},m=e=>{const{toggleCrosswalkFocus:t=i.ZT,focusedCrosswalks:n=[]}=(0,r.useContext)(s)||{};return{isFocused:!!e&&n.some((0,l.eqBy)(a.uKF,e)),toggleCrosswalkFocus:(0,r.useCallback)((()=>t(e)),[e,t])}}},90178:(e,t,n)=>{n.r(t),n.d(t,{default:()=>bc});var r=n(8598),o=n(13980),a=n.n(o),l=n(24328),i=n.n(l),s=n(44443),c=n(36138),u=n(22664),p=n(52730),d=n(17440),m=n(57941),h=n(10237),f=n(17554),g=n(49759),b=n(6521);const y={FIND_MATCHES:"findMatches",POTENTIAL_MATCHES:"potentialMatches",NOT_A_MATCH:"notAMatch"},v="FULL_SCREEN",w="HIDDEN",E="VISIBLE";var C=n(20562),x=n(58662),O=n(99136);const S=(0,l.createContext)({reloadData:()=>{},setReloadHandler:()=>{}}),R=(()=>{let e;return{reloadData:()=>{e&&e()},setReloadHandler:t=>{e=t}}})(),P=e=>{let{children:t}=e;return i().createElement(S.Provider,{value:R},t)};P.propTypes={children:a().node};const k=()=>{const e=(0,l.useContext)(S);if(void 0===e)throw new Error("useReloadData must be used within a ReloadDataProvider");return e};var T=n(31276),M=n(86361);function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){N(e,t,n[t])}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I=(0,l.createContext)(null),A=(0,l.createContext)(null),D="UPDATE_COMPARISON_VIEW_MODE",Z="SET_GLOBAL_SPINNER",B={setComparisonViewMode:(0,T.zD)(D),setGlobalSpinner:(0,T.zD)(Z)},V=(e,t)=>{switch(t.type){case D:return j({},e,{comparisonViewMode:t.payload});case Z:return j({},e,{isGlobalSpinnerActive:t.payload})}},L=e=>{let{children:t}=e;const[n,r]=(0,l.useReducer)(V,{comparisonViewMode:w,isGlobalSpinnerActive:!1}),o=(0,M.o)({actions:B,dispatch:r});return i().createElement(I.Provider,{value:n},i().createElement(A.Provider,{value:o},t))};L.propTypes={children:a().node};const z=()=>{const e=(0,l.useContext)(I);if(void 0===e)throw new Error("useViewState must be used within a ViewStateProvider");return e},H=()=>{const e=(0,l.useContext)(A);if(void 0===e)throw new Error("useViewStateActions must be used within a ViewStateProvider");return e},F=i().createContext(null);F.displayName="ColumnHandlerContext";var W=n(99341);const _=e=>({filter:"equals",fieldName:"type",values:[e]}),U=(e,t,n)=>{const r=m.wSh.fromNull(e).map(_).orSome("");return m.wSh.fromNull(t).map((e=>Object.entries(e).map((e=>{let[t,r]=e;const o=n.find((0,d.propEq)("id",t));return(0,W.su)(o,r)})))).orSome([]).concat(r)};var G=n(87918),q=n.n(G);const $=(0,d.pipe)((0,d.map)((e=>({id:(0,m.Tde)(e.uri),label:(0,m.idV)(e.label),dataTypeDefinition:(0,m.PFL)(e)})))),X=(0,d.pipe)(m.Fof,$),Y=(0,d.pluck)("id"),Q=(0,d.curry)(((e,t)=>e.map(m.Tde).some((e=>t.id===e||J(t)&&ee(t,e))))),K=e=>(0,m.QZu)(e.dataTypeDefinition),J=e=>(0,m.YkG)(e.dataTypeDefinition),ee=(0,d.curry)(((e,t)=>t.startsWith(`${e.id}.`))),te=(0,d.curry)(((e,t)=>K(t)&&e.some((e=>{let{id:n}=e;return ee(t,n)})))),ne=e=>(0,d.either)((0,d.includes)(d.__,e),te(e)),re=(e,t)=>(0,d.pipe)((0,d.reject)(K),(0,d.filter)(Q(e)))(t);var oe=n(67218);const ae=e=>{let{defaultColumnsData:t,additionalColumnsData:n,metadata:r,entityType:o}=e;return(0,l.useMemo)((()=>{const e=X(r,o),a=t.concat(n||[]).concat(e),l=(0,m.qhs)(r,o),i=((e,t)=>{const[n,r]=(0,d.pipe)((0,d.reject)(K),(0,d.partition)(Q(e)))(t);return n.length?[{id:"match",label:q().text("Match attributes"),columns:t.filter(ne(n))},{id:"all",label:q().text("All attributes"),columns:t.filter(ne(r))}]:t})(l,a);return[a,i,(0,d.pipe)(re,(0,d.concat)(t),Y)(l,e)]}),[t,n,r,o])};var le=n(26180);function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){se(e,t,n[t])}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ce="RESET",ue="SET_SELECTED_ITEMS",pe="TOGGLE_SELECT",de="SET_OPTIONS",me="SET_LIMIT_SELECTION",he=ie({},le.ZP.actions,{reset:(0,T.zD)(ce),toggleSelect:(0,T.zD)(pe),setSelectedItems:(0,T.zD)(ue),setOptions:(0,T.zD)(de),setLimitSelection:(0,T.zD)(me)}),fe=(e,t)=>{switch(t.type){case ce:return ie({},t.payload);case de:return ie({},e,{options:t.payload});case ue:return ie({},e,{selectedItems:t.payload});case pe:return(0,d.evolve)({selectedItems:n=>{const r=t.payload,o=n.findIndex((e=>e===r));if(o>-1)return(0,d.remove)(o,1,n);{const{limitSelection:t}=e;return(0,d.pipe)((0,d.when)((0,d.both)((0,d.complement)(d.isNil),(0,d.propSatisfies)((0,d.gte)(d.__,t),"length")),(0,d.take)(t-1)),(0,d.append)(r))(n)}}},e);case me:return ie({},e,{limitSelection:t.payload});default:return le.ZP.reducer(e,t)}},ge=(e,t,n,r)=>{const{field:o,order:a}=t,i={visibleColumns:e,filters:null,sorting:{field:o,order:a},page:0,rowsPerPage:n,selectedItems:[],options:r,limitSelection:null},[s,c]=(0,l.useReducer)(fe,i);return[(0,M.o)({actions:he,dispatch:c}),s,c]};var be=n(93428),ye=n(585);const ve=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:q().text("Can't add relationship")})},we=e=>{(null==e?void 0:e.errorCode)!==m.Xt7.DCR_ALREADY_EXISTS&&Ee(e)},Ee=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:(null==e?void 0:e.errorMessage)||q().text("Something went wrong...")})},Ce=()=>{const{setGlobalSpinner:e}=H(),{isGlobalSpinnerActive:t}=z(),{reloadData:n}=k();return{onStartRequest:(0,l.useCallback)((()=>{e(!0)}),[e]),onFinishRequest:(0,l.useCallback)((()=>{e(!1),n()}),[n,e]),isGlobalSpinnerActive:t}},xe=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a="iconButton",onMenuClose:l=T.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:c,onStartRequest:u}=Ce();return i().createElement(be.H,{className:n,disabled:s,entities:r,entity:o,mode:a,onMenuClose:l,onStartRequest:u,onFinishRequest:c,onError:Ee,"data-reltio-id":"reltio-potential-matches-merge-button",ref:t})}));xe.propTypes={className:a().string,entity:m.pyR,entities:a().arrayOf(a().object),mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},xe.displayName="mergeButton";var Oe=n(98808),Se=n(59431);function Re(){return Re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(this,arguments)}const Pe=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Re({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),i().createElement("defs",null,i().createElement("path",{d:"M10 6v2H4v12.22h12V14h2v6c0 1.05-.82 1.918-1.851 1.994L16 22H4c-1.05 0-1.918-.82-1.994-1.851L2 20V8c0-1.05.82-1.918 1.851-1.994L4 6h6zm4 10v2H6v-2h8zm-3.997-3l-.001 2H6v-2h4.003zM21 2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-7l-2 2 .005-11c0-.55.445-1 .995-1h8zm-10.996 8l-.001 2H6v-2h4.004zm9.286-6.3l-3.17 3.17-1.41-1.42-1.41 1.41 2.82 2.84 4.59-4.58-1.42-1.42z",id:"svg3192636834a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg3192636834b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg3192636834a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg3192636834b)",d:"M0 0h24v24H0z"})))},ke=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a="iconButton",onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n}=e;const{selectors:r}=Se.ZP,{setGlobalSpinner:o}=H(),{isGlobalSpinnerActive:a}=z(),i=(0,p.useSelector)(r.getWorkflowPath),s=(0,p.useSelector)(r.getWorkflowEnvironmentUrl),c=(0,p.useSelector)(r.getTenant),u=(0,d.prop)("uri"),h=(0,d.pipe)(d.concat,(0,d.map)(u))([n],t);return[a,(0,l.useCallback)((()=>{o(!0),(0,m.t6d)({workflowPath:i,processType:"potentialMatchReview",objectURIs:h,tenant:c,environment:s}).catch(we).finally((()=>{o(!1)}))}),[i,h,c,s,o])]})({entity:o,entities:r}),h=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),f=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath);return h&&!(0,m.O27)(f)?i().createElement(Oe.K,{className:n,disabled:c,mode:a,label:q().text("Potential match request"),icon:Pe,onClick:u,onMenuClose:s,ref:t}):null}));function Te(){return Te=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},Te.apply(this,arguments)}ke.propTypes={className:a().string,entity:m.pyR,entities:a().arrayOf(a().object),mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},ke.displayName="DCRReviewButton";const Me=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Te({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),i().createElement("defs",null,i().createElement("path",{d:"M19 14v3h3v2h-3v3h-2v-3h-3v-2l3-.001V14h2zM17 2a3 3 0 11-1.293 5.708l-4.535 4.535a5 5 0 11-1.414-1.414l4.534-4.536A3 3 0 0117 2zM7 12a3 3 0 100 6 3 3 0 000-6zm10-8a1 1 0 100 2 1 1 0 000-2z",id:"svg2192258504a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2192258504b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2192258504a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2192258504b)",d:"M0 0h24v24H0z"})))},je=(0,l.forwardRef)(((e,t)=>{let{className:n,mainEntity:r,currentEntity:o,matchRules:a,mode:l="iconButton",onClick:s=T.ZT,onMenuClose:c=T.ZT}=e;return i().createElement(Oe.K,{className:n,mode:l,label:q().text("Add relationship"),icon:Me,onClick:()=>s({mainEntity:r,currentEntity:o,matchRules:a}),onMenuClose:c,ref:t})}));je.propTypes={className:a().string,mainEntity:m.pyR,currentEntity:m.pyR,matchRules:a().arrayOf(a().string),mode:a().oneOf(["iconButton","button","menuItem"]),onClick:a().func,onMenuClose:a().func},je.displayName="CreateRelationButton";var Ne=n(30885);const Ie=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a="iconButton",onMenuClose:l=T.ZT}=e;const{isGlobalSpinnerActive:s,onFinishRequest:c,onStartRequest:u}=Ce();return i().createElement(Ne.i,{className:n,disabled:s,entities:r,entity:o,mode:a,onMenuClose:l,onStartRequest:u,onFinishRequest:c,ref:t})}));Ie.propTypes={className:a().string,entity:m.pyR,entities:a().arrayOf(a().object),mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},Ie.displayName="NotMatchButton";var Ae=n(71153),De=n.n(Ae),Ze=n(8818);function Be(){return Be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Be.apply(this,arguments)}const Ve=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Be({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),i().createElement("defs",null,i().createElement("path",{d:"M3 15h8v-2H3v2zm0 4h8v-2H3v2zm0-8h8V9H3v2zm0-6v2h8V5H3zm10 0h8v14h-8V5z",id:"svg2461472690a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"#111",fillRule:"evenodd"},i().createElement("mask",{id:"svg2461472690b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2461472690a"})),i().createElement("path",{fillOpacity:".54",fill:"red",mask:"url(#svg2461472690b)",d:"M0 0h24v24H0z"})))};var Le=n(79692),ze=n(41128);const He=(0,Le.Z)((e=>({iconButton:{"& svg g path":{fill:e.palette.primary.main,fillOpacity:1}},comparisonButtonSelected:{backgroundColor:e.palette.primary.main,borderRadius:0,"& svg g path":{fill:"#FFFFFF",fillOpacity:1},"&:hover":{backgroundColor:(0,ze._j)(e.palette.primary.main,e.palette.action.hoverOpacity),"& svg g path":{fill:(0,ze._j)("#FFFFFF",e.palette.action.hoverOpacity)}}},comparisonButton:{backgroundColor:"#FFFFFF",borderRadius:0}}))),Fe=e=>{let{className:t,selectedMatchesCount:n}=e;const r=He(),{comparisonViewMode:o}=z(),{setComparisonViewMode:a}=H(),s=o===w,c=n>3,u=(0,l.useCallback)((()=>{a(s?E:w)}),[a,s]),p=(0,l.useMemo)((()=>c?q().text("Select 1-${maxProfilesToCompare} profiles to compare",{maxProfilesToCompare:3}):s?q().text("Show comparison view"):q().text("Hide comparison view")),[s,c]);return i().createElement(Ze.k,{tooltipTitle:p,className:De()(t,{[r.iconButton]:s,[r.comparisonButton]:s,[r.comparisonButtonSelected]:!s}),size:"S",onClick:u,icon:Ve,showForDisabled:!0,disabled:c})};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)}Fe.propTypes={entities:a().arrayOf(a().object),entity:m.pyR,className:a().string,selectedMatchesCount:a().number.isRequired};const _e=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",We({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),i().createElement("defs",null,i().createElement("path",{d:"M9 4c4.42 0 8 3.58 8 8s-3.58 8-8 8a8 8 0 01-7.419-5h2.224A6.002 6.002 0 009 18c3.31 0 6-2.69 6-6s-2.69-6-6-6a6.002 6.002 0 00-5.196 3H1.581A8 8 0 019 4zm8 .26c3.45.89 6 4.01 6 7.74 0 3.73-2.55 6.85-6 7.74v-2.09a5.99 5.99 0 000-11.3V4.26zM8 7.5l4.5 4.5L8 16.5V13H0v-2h8V7.5z",id:"svg689336942a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg689336942b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg689336942a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg689336942b)",d:"M0 0h24v24H0z"})))},Ue=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a="iconButton",onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n}=e;const{setGlobalSpinner:r}=H(),{isGlobalSpinnerActive:o}=z(),{reloadData:a}=k(),i=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),s=(0,p.useSelector)(Se.ZP.selectors.getTenant);return[o,(0,l.useCallback)((()=>{r(!0);const e={dtssPath:i,customerTenant:s,entity:n,entities:t};((0,m.biM)(n)?(0,m.XkY)(e):(0,m.uQS)(e)).finally((()=>{r(!1),a()}))}),[t,n,r,a,i,s])]})({entity:n,entities:r});return i().createElement(Oe.K,{className:o,disabled:c,mode:a,label:q().text("Save as potential match"),icon:_e,onClick:u,onMenuClose:s,ref:t})}));Ue.propTypes={entities:a().arrayOf(a().object),entity:m.pyR,className:a().string,mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},Ue.displayName="ReinstateMatchButton";const Ge=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a="iconButton",onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n,_tenant:r}=e;const{setGlobalSpinner:o}=H(),{isGlobalSpinnerActive:a}=z(),{reloadData:i}=k();return[a,(0,l.useCallback)((()=>{o(!0),(0,m.ck9)(n.uri,t).finally((()=>{o(!1),i()}))}),[t,n,o,i])]})({entity:n,entities:r});return i().createElement(Oe.K,{className:o,disabled:c,mode:a,label:q().text("Save on potential matches"),icon:_e,onClick:u,onMenuClose:s,ref:t})}));Ge.propTypes={className:a().string,entities:a().arrayOf(a().object),entity:m.pyR,mode:a().oneOf(["iconButton","button","menuItem"]),onMenuClose:a().func},Ge.displayName="SetAMatchButton";const qe=(0,Le.Z)({container:{display:"flex",height:"100%",alignItems:"center",marginLeft:"8px"},mergeButton:{flexShrink:0,marginRight:"8px"},rightButton:{display:"flex",alignItems:"center",marginLeft:"auto"},moreOptions:{marginRight:"-2px"}}),$e={value:a().shape({show:a().bool,config:a().object,entity:m.pyR,entities:a().arrayOf(a().object),matchRules:a().arrayOf(a().string),permission:a().shape({canMerge:a().bool,canAddRelation:a().bool,canMark:a().bool})})},Xe=e=>{let{value:{show:t,entity:n,entities:r,permission:o}}=e;const a=qe(),{canMark:l}=o;return t?i().createElement(i().Fragment,null,i().createElement("div",{className:a.container},l&&i().createElement(Ge,{entity:n,entities:r,className:a.rightButton,mode:"button"}))):null};Xe.propTypes=$e;const Ye=Xe;var Qe=n(34635),Ke=n(87760);const Je=i().createContext({});function et(){return et=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},et.apply(this,arguments)}Je.displayName="ExpandedContext";const tt=(0,Le.Z)((()=>({complexAttributesHeadRenderer:{height:"100%",width:"100%",display:"flex",alignItems:"flex-start"},complexAttributesHeadLabel:{flex:1},attribute:{whiteSpace:"pre-wrap"},matchedAttribute:{fontWeight:500,height:"100%",margin:"-5px -16px",padding:"5px 16px",background:"rgba(140, 193, 82, 0.12)"}}))),nt=(e=>{const t=(0,l.forwardRef)(((t,n)=>{const{attributeType:r}=t,{expandedMap:o}=(0,l.useContext)(Je),a=o[r.uri];return i().createElement(e,et({},t,{expanded:a,ref:n}))}));return t.displayName="WithExpanded",t})(Ke.Z),rt=e=>{let{value:{attributeType:t,attributeValues:n,matched:r=!1}}=e;const o=tt();return i().createElement("div",{className:De()(o.attribute,{[o.matchedAttribute]:r})},i().createElement(nt,{values:n,attributeType:t}))};function ot(){return ot=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},ot.apply(this,arguments)}const at=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",ot({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),i().createElement("defs",null,i().createElement("path",{d:"M21.843 14.8l-4.242 4.243-4.243-4.243h8.485zM8 6v12H5V6h3zm2 8.919L12.941 18H10v-3.081zM13 6v6h-3V6h3zm5 0v6h-3V6h3z",id:"svg2425089452a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2425089452b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2425089452a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2425089452b)",d:"M0 0h24v24H0z"})))};function lt(){return lt=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},lt.apply(this,arguments)}const it=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",lt({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),i().createElement("defs",null,i().createElement("path",{d:"M15.879 12.879l4.242 4.242-4.242 4.243v-8.485zM8 6v12H5V6h3zm5 0v12h-3V6h3zm5 0v5.464l-3-3V6h3z",id:"svg1931425825a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg1931425825b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg1931425825a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1931425825b)",d:"M0 0h24v24H0z"})))},st=e=>{let{label:t,attributeType:n}=e;const r=tt(),{expandedMap:o,onExpandType:a}=(0,l.useContext)(Je),s=(0,l.useCallback)((()=>a(n.uri)),[a,n]),c=o[n.uri];return i().createElement("div",{className:r.complexAttributesHeadRenderer},i().createElement("div",{className:r.complexAttributesHeadLabel},t),i().createElement(Ze.k,{icon:c?at:it,size:"XS",onClick:s}))};st.propTypes={label:a().string,attributeType:m.EMD};var ct=n(22385),ut=n(93517),pt=n(87685);const dt=(0,Le.Z)({container:{position:"relative",width:"100%",height:"87px",display:"flex",overflow:"hidden"},closeButton:{position:"absolute",backgroundColor:"#FFFFFF",zIndex:1,borderRadius:"2px",margin:"4px"},profileCard_container:{overflow:"hidden"},profileCard_label:{display:"-webkit-box",lineClamp:2,boxOrient:"vertical",whiteSpace:"normal"},"@media all and (-ms-high-contrast: none), (-ms-high-contrast: active)":{profileCard_label:{display:"block",whiteSpace:"nowrap"}},profileCard_secondaryLabel:{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}),mt=e=>{let{value:{entity:t,showCloseButton:n,onClose:r}}=e;const o=dt();return i().createElement("div",{className:o.container},n&&i().createElement(ct.Z,{className:o.closeButton,icon:pt.default,onClick:r,size:"XXS"}),i().createElement(ut.Z,{entity:t,classes:{container:o.profileCard_container,secondaryLabel:o.profileCard_secondaryLabel,label:o.profileCard_label}}))};mt.propTypes={value:a().shape({entity:m.pyR,showCloseButton:a().bool,onClose:a().func})};const ht=mt;var ft=n(22071);const gt=(0,Le.Z)({container:{paddingTop:"7px"}});var bt=n(84504),yt=n(59119),vt=n(5434),wt=n(55847),Et=n(35071),Ct=n(24737),xt=n(89140),Ot=n(43054);const St=e=>"potentialMatchReview"===e.processType,Rt=(0,Le.Z)({container:{position:"relative",width:"100%",minHeight:"86px",display:"flex",overflow:"hidden"},assigneeSelector:{},assigneeContainer:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"16px 14px 16px 48px"}});function Pt(){return Pt=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},Pt.apply(this,arguments)}const kt=(0,d.pick)(["processInstanceComments","taskId"]),Tt=e=>{let{entity:t,match:n}=e;const r=Rt(),{tasks:o,loadTasks:a}=(e=>{let{entity:t,match:n}=e;const r=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),o=(0,p.useSelector)(Se.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,p.useSelector)(Se.ZP.selectors.getTenant),i=(0,oe._)(),{uri:s}=t,c=(0,m.ev7)(n),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)([]),b=(0,l.useCallback)((()=>{r&&c!==s&&(h(!0),i((0,m.uT0)({entityUri:s,workflowPath:r,environment:o,tenant:a})).then((e=>{const{data:t}=e,n=(0,d.propSatisfies)((0,d.includes)(c),"objectURIs"),r=(0,d.allPass)([St,n]),o=t.filter(r);g(o)})).finally((e=>h(!1))))}),[s,o,a,r,c]);return{enabled:!!r,loading:u,tasks:f,loadTasks:b}})({entity:t,match:n}),{isPending:s,sendMergeAllRequest:c}=(0,bt._)({entity:t,entities:[n.object]}),{isPending:u,sendMarkAsNotMatchRequest:h}=(0,yt.m)({entity:t,entities:[n.object]}),f={Merge:c,NotAMatch:h};(0,l.useEffect)((()=>{a()}),[a]);const g=o[0],b=(g&&g.possibleActions||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:f[t]}})),{assignee:y,getAssignees:v,updateAssignee:w,updateRequestIsInProgress:E}=(0,vt.r)(g||{}),C=b.length>0?i().createElement(wt.Z,{buttonComponent:ct.Z,buttonProps:{icon:Ot.Z,size:"L"},enabled:!s||!u,menuId:"custom-actions",menuItems:b}):null;return g?i().createElement("div",{className:r.container},i().createElement(Et.Z,Pt({},(e=>({date:e.dueDate,type:e.processDefinitionDisplayName,createdBy:e.createdBy,step:e.displayName}))(g),{Actions:C}),i().createElement("div",{className:r.assigneeContainer},i().createElement(Ct.Z,{className:r.assigneeSelector,enabled:!E||y,getOptions:v,onChange:w,hideSelectedOptions:!1,label:q().text("Assigned to"),value:y,defaultOptions:!0})),i().createElement(xt.V,kt(g)))):null};Tt.propTypes={entity:m.pyR,match:m.nqG};const Mt=e=>{let{value:{entity:t,match:n}}=e;return i().createElement(Tt,{entity:t,match:n})};Mt.propTypes={value:a().shape({entity:m.pyR,match:m.nqG})};const jt=[{id:"entityCard",label:"",cellRenderer:ht},{id:"matchControls",cellRenderer:()=>null},{id:"matchMethod",label:"Match Method",cellRenderer:e=>{let{value:{metadata:t,entity:n,match:r,entitiesMap:o,show:a}}=e;const l=gt();return a?i().createElement("div",{className:l.container},i().createElement(ft.Z,{entity:n,match:r,entitiesMap:o,metadata:t})):null}},{id:"workflowCard",label:"",cellRenderer:Mt},{id:"entityId",label:"Entity ID"}],Nt=(0,d.curry)(((e,t)=>`${e}/attributes/${t}`)),It=(0,d.pipe)((0,d.split)("/"),d.last),At="1px solid rgba(0,0,0,0.12)",Dt="2px solid rgba(0,0,0,0.12)",Zt=(0,Le.Z)((e=>({container:{overflow:"auto",height:"100%",width:"100%"},comparisonTable:{borderSpacing:0,"& td, & th":{borderRight:At,borderBottom:At,margin:0,verticalAlign:"top",textAlign:"left",fontSize:"13px",boxSizing:"border-box",wordBreak:"break-word",wordWrap:"break-word"},"& td":{minWidth:310,maxWidth:310,padding:"5px 16px",overflow:"hidden",height:0},"& td:empty, th:empty":{padding:"0px 16px"},"& th":{minWidth:212,maxWidth:212,padding:"5px 8px"},"& thead tr:first-child th:first-child":{borderBottom:"none",borderTop:"none"},"& td:first-child, th:first-child":{borderLeft:At,position:"sticky",left:"0",zIndex:2,backgroundColor:"white",color:e.palette.text.secondary,fontWeight:"normal"},"& td:nth-child(2), th:nth-child(2)":{borderRight:Dt,position:"sticky",left:"212px",zIndex:2},"& thead tr:first-child td, & thead tr:first-child th":{borderTop:"none",position:"sticky",top:"0",backgroundColor:"white",height:88,padding:0,zIndex:2},"& thead tr:nth-child(2) td, & thead tr:nth-child(2) th":{position:"sticky",top:"88px",backgroundColor:"white",height:48,padding:0,zIndex:2},"& thead tr:nth-child(3) td, & thead tr:nth-child(3) th":{position:"sticky",top:"136px",backgroundColor:"white",borderBottom:Dt,zIndex:2},"& thead tr:nth-child(-n+3) td:nth-child(-n+2), & thead tr:nth-child(-n+3) th:nth-child(-n+2)":{zIndex:3},"table& tr td:nth-child(2), th:nth-child(2)":{backgroundColor:"rgb(245,245,245)"}}})));function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Vt=e=>{let{className:t,entity:n,matches:r,metadata:o,config:a,selectedAttributes:s,entitiesMap:c,controlsRenderer:u}=e;const p=Zt(),h=(0,l.useMemo)((()=>((e,t,n,r)=>{const o=n||(e=>Object.keys(e.attributes).map(Nt(e.type)))(t),a=o.map((n=>{const r=(0,m.zeJ)(e,n,t.type),o=(0,m.xy8)(n);return r?{id:`${o}.${It(n)}`,label:r.label,attributeType:r,cellRenderer:rt,headCellRenderer:(0,m.YkM)(r)?st:void 0}:null})).filter(d.identity);return(e=>jt.map((0,d.when)((0,d.propEq)("id","matchControls"),(0,d.assoc)("cellRenderer",e))))(r).concat(a)})(o,n,s,u)),[o,n,s,u]),f=(0,l.useContext)(F),g=(0,l.useMemo)((()=>((e,t,n,r,o,a,l)=>[{object:n,isMainEntity:!0}].concat(r).map((r=>t.reduce(((t,i)=>(t[i.id]=((e,t,n,r,o,a,l)=>{const{object:i,isMainEntity:s,matchRules:c}=t;switch(o.id){case"entityId":return(0,m.BTI)(i);case"entityCard":return{entity:i,showCloseButton:!s,onClose:()=>l(t)};case"matchControls":return{show:!s,entity:r,entities:[i],matchRules:c,permission:(0,m.hXd)(e,a,i,r,c),config:a};case"matchMethod":return{metadata:e,entity:r,match:t,entitiesMap:n,show:!s&&!!c};case"workflowCard":return{entity:r,match:t}}if((0,m.vZp)(o.id)){const t=(0,m.xy8)(o.attributeType),n=(0,d.pipe)((0,d.pathOr)([],[t,o.attributeType.name]),(0,d.filter)(m.OXP))(i),a=(0,m.w80)(e,r.type,c||[]).includes((0,d.path)(["attributeType","uri"],o))&&!(0,m.O27)(n);return{attributeType:o.attributeType,attributeValues:n,matched:a}}})(e,r,o,n,i,a,l),t)),{}))))(o,h,n,r,c,a,f)),[o,h,r,n,c,a,f]),[b,y]=(0,l.useState)({}),v=(0,l.useCallback)((e=>{y((t=>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){Bt(e,t,n[t])}))}return e}({},t,{[e]:!t[e]})))}),[]),w=(0,l.useMemo)((()=>({expandedMap:b,onExpandType:v})),[v,b]);return i().createElement("div",{className:De()(p.container,t)},i().createElement("div",null,i().createElement(Je.Provider,{value:w},i().createElement(Qe.Z,{className:p.comparisonTable,rowsData:h,columnsData:g,theadRowsNumber:3}))))};Vt.propTypes={className:a().string,entity:m.pyR,matches:a().arrayOf(m.nqG),metadata:m.pGS,config:m.yxQ,selectedAttributes:a().arrayOf(a().string),entitiesMap:a().object,controlsRenderer:a().func};var Lt=n(94079),zt=n(92778),Ht=n(29103),Ft=n(83911);function Wt(){return Wt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}const _t=e=>{let{isFullscreen:t=!1,onClick:n=d.identity}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isFullscreen","onClick"]);return i().createElement(Ze.k,Wt({size:"L",icon:t?Ft.Z:Ht.Z,tooltipTitle:t?q().text("Exit full screen"):q().text("Full screen"),onClick:n},r))};_t.propTypes={isFullscreen:a().bool,onClick:a().func};const Ut=_t,Gt=e=>{let{onClick:t}=e;return i().createElement(ct.Z,{size:"L",icon:pt.default,onClick:t})};Gt.propTypes={onClick:a().func};const qt=Gt;var $t=n(60894),Xt=n(94656);const Yt=(0,Le.Z)((e=>({header:{"& > button":{margin:"0 -2px"},padding:"8px 15px 8px 0",borderLeft:"1px solid rgba(0,0,0,0.12)"},flex1:{flex:1},title:{display:"flex",flexDirection:"row",alignItems:"center"}}))),Qt=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:r}=e;const o=Yt(),{setComparisonViewMode:a}=H(),{comparisonViewMode:s}=z(),c=(0,l.useCallback)((()=>{a(w)}),[a]),u=(0,l.useCallback)((()=>{a(s!==v?v:E)}),[a,s]);return i().createElement(zt.Z,{title:"",classes:{root:o.header}},i().createElement("div",{className:De()(o.flex1,o.title)},i().createElement(qt,{onClick:c}),i().createElement(Ut,{onClick:u,isFullscreen:s===v}),i().createElement(Lt.Typography,null,q().text("Comparison view"))),i().createElement($t.Z,{title:q().text("Show/hide attributes"),tooltipTitle:q().text("Show/hide attributes"),columnsData:t,selectedColumns:n,onChangeColumns:r}))};Qt.propTypes={columnsData:Xt.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func};const Kt=(0,d.pipe)((0,d.split)("."),(0,d.slice)(0,2),(0,d.join)(".")),Jt=(0,d.pipe)((0,d.map)((0,d.when)(m.vZp,Kt)),d.uniq),en=(0,d.curry)(((e,t)=>(0,d.reduce)(((t,n)=>(n.id.startsWith(`${e}.`)&&!(0,m.QZu)(n.dataTypeDefinition)&&t.push(n.id),t)),[])(t))),tn=(0,d.curry)(((e,t)=>(0,d.pipe)((0,d.map)((0,d.when)(m.vZp,(t=>{const n=Kt(t),r=((e,t)=>e.reduce(((e,n)=>(0,d.pipe)((0,d.prop)("columns"),en(t),d.flatten,(0,d.concat)(e))(n)),[]))(e,n);return r.length?r:t}))),d.flatten,d.uniq)(t))),nn=(0,d.pipe)((0,d.prop)("id"),(0,d.both)(m.vZp,(0,d.pipe)((0,d.split)("."),(0,d.propSatisfies)((0,d.lt)(2),"length")))),rn=(0,d.map)((0,d.evolve)({columns:(0,d.reject)(nn)})),on=(0,Le.Z)((()=>({container:{display:"flex",flexDirection:"column"},table:{flex:1}}))),an=e=>{let{classes:t,columnsData:n,selectedColumns:r,onChangeColumns:o,selectedItems:a,config:l,metadata:s,entity:c,entitiesMap:u,controlsRenderer:p}=e;const h=on(),f=a.slice(-3),g=Jt(r),b=(y=c.type,v=g,(0,d.pipe)((0,d.filter)(m.vZp),(0,d.map)((e=>(0,m.h2W)(e,y))))(v));var y,v;return i().createElement("div",{className:De()(t.root,h.container)},i().createElement(Qt,{columnsData:rn(n),selectedColumns:g,onChangeColumns:(0,d.pipe)(tn(n),o)}),i().createElement(Vt,{className:h.table,entity:c,metadata:s,config:l,matches:f,selectedAttributes:b,entitiesMap:u,controlsRenderer:p}))};an.propTypes={entity:m.pyR,metadata:m.pGS,columnsData:Xt.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func,selectedItems:a().arrayOf(a().object),classes:a().object,config:m.yxQ,entitiesMap:a().object,controlsRenderer:a().func},an.defaultProps={classes:{}};const ln=e=>{let{fullScreenContainer:t,children:n}=e;return t?i().createElement(Lt.Portal,{container:t},n):i().createElement("div",null)};ln.propTypes={fullScreenContainer:a().instanceOf(Element),children:a().oneOfType([a().node,a().arrayOf(a().node)])};var sn=n(46177),cn=n(74402),un=n(94646),pn=n(97946),dn=n(25461),mn=n(85709),hn=n(92332),fn=n(67353);function gn(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){bn(e,t,n[t])}))}return e}function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yn={position:"relative",whiteSpace:"pre",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"},color:"rgba(0,0,0,0.87)"},vn={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},wn=(e,t)=>({"& > *":{position:"relative"},"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:e,pointerEvents:"none","div.hoveredRow &":{background:t||"none"}},"& $defaultWrapper::after":{background:`linear-gradient(to right, ${(0,ze.U1)(e,0)}, ${e} 100%)`,"div.hoveredRow &":{background:t&&`linear-gradient(to right, ${(0,ze.U1)(t,0)}, ${t} 100%)`}}}),En=(0,Le.Z)((e=>{const t=(0,ze.$n)(e.palette.primary.main,.88),n=(0,ze.$n)(e.palette.primary.main,.82),r=(0,ze.$n)("rgb(140,193,82)",.88),o=(0,ze.$n)("rgb(0, 0, 0)",.96),a={color:e.palette.primary.main,cursor:"pointer",textDecoration:"none"};return{link:a,hidden:{visibility:"hidden"},rowCheckbox:{marginLeft:"-9px",marginRight:"19px"},headCheckbox:{marginLeft:"6px"},headCell:{display:"flex",alignItems:"center",height:"56px",fontSize:"12px",position:"relative",flex:1,overflow:"hidden",color:"rgba(0,0,0,0.87)","&::after":gn({},vn,{width:"30px"})},headCellWithEntity:{height:"100%",display:"flex",flexDirection:"column"},rowCell:{fontSize:"12px",overflow:"hidden"},rowCellFirstColumn:{height:"100%"},firstEntityCell:{maxHeight:"200px"},entityRowCell:{fontSize:"12px",position:"relative"},entityRowCellSelected:wn(o),rowCellHighlighted:wn(r),rowCellSelected:wn(t,n),defaultWrapper:gn({},yn,{"&::after":gn({},vn,{"div.hoveredRow &":{background:"linear-gradient(to right, rgba(238, 238, 238, 0), rgba(238, 238, 238, 1) 100%)"}})}),hoveredDefaultWrapper:gn({},yn),entityWrapper:{paddingLeft:"12px"},profileWrapper:{height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",position:"relative"},entityLabel:gn({},a,{fontWeight:500}),commentsContainer:{position:"absolute",right:0,top:0,zIndex:1,height:"100%",display:"flex",alignItems:"center",paddingRight:"15px",backgroundColor:"#fff","&$checked":{backgroundColor:t}},checked:{},matchRulesWrapper:{padding:"12px 15px 4px 10px",display:"flex",alignItems:"center",boxSizing:"border-box"},blobWrapper:gn({},yn,{whiteSpace:"pre-wrap",height:"100px",boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}),imageWrapper:gn({},yn,{display:"flex","& > img":{height:"64px",width:"64px"}}),referenceWrapper:{display:"flex",alignItems:"center",boxSizing:"border-box",height:"48px"},entityAvatar:{transform:"scale(0.5)",marginLeft:"-10px"},collapseButton:{position:"absolute",left:"40px",zIndex:2},dragIcon:{position:"absolute",left:"-5px",zIndex:2,opacity:.38}}})),Cn=(0,fn.Z)((e=>{const t=En();return i().createElement("div",{className:t.headCell},i().createElement(hn.default,e))}));var xn=n(72768);const On=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const r=En();return i().createElement("div",{className:r.defaultWrapper},i().createElement(xn.Z,{value:t,dataTypeDefinition:n}))};On.propTypes={columnData:a().shape({dataTypeDefinition:a().object}),value:a().any};const Sn=On;var Rn=n(52049),Pn=n(74566),kn=n(31039),Tn=n(32528),Mn=n(14940);const jn=e=>{const{value:t,rowIndex:n,rowValue:r,onToggleSelect:o,entityToMatch:a,isRowSelected:s,hoverRowIndex:c}=e,u=En(),p=(0,l.useContext)(Rn.B),d=t!==a,h=n===c,f=0===n,g=h?u.hoveredDefaultWrapper:u.defaultWrapper,b=t.uri!==a.uri&&!h;return i().createElement(i().Fragment,null,i().createElement("div",{className:De()(g,u.profileWrapper,u.entityWrapper,{[u.firstEntityCell]:f&&!d})},h&&i().createElement(Mn.Z,{className:u.dragIcon}),i().createElement(Pn.Z,{className:u.collapseButton,rowIndex:n,rowValue:r}),i().createElement(Lt.Checkbox,{className:De()(u.rowCheckbox,{[u.hidden]:!d}),checked:s,onChange:o,"data-reltio-id":`reltio-matches-table-${p?p+"-":""}checkbox-${n}`}),i().createElement(kn.Z,{value:(0,m.wwR)(t),className:u.entityLabel},(0,m.idV)(t.label)),b&&i().createElement(un.Z,{className:De()(u.commentsContainer,{[u.checked]:s}),uri:(0,m.E_P)(a.uri,t.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:a.uri,matchEntityUri:t.uri}),allowOnlyOneComment:!0})))};jn.propTypes={value:m.pyR,rowIndex:a().number,rowValue:a().shape({rawValue:a().object}),onToggleSelect:a().func,isRowSelected:a().bool,columnsData:a().array,entityToMatch:m.pyR,hoverRowIndex:a().number};const Nn=(0,Tn.Z)(((e,t)=>{let{onToggleSelect:n,entityToMatch:r}=e,{rowValue:o,value:a}=t;const{rawValue:l}=o;return{onToggleSelect:()=>n(l),isRowSelectable:a!==r,entityToMatch:r}}))(jn);const In=e=>{let{isAllSelected:t,isSomeSelected:n,onCheckboxClick:r,isComparisonViewShown:o}=e,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isAllSelected","isSomeSelected","onCheckboxClick","isComparisonViewShown"]);const l=En();return i().createElement("div",{className:l.headCell},i().createElement(Lt.Checkbox,{className:l.headCheckbox,indeterminate:n&&!t,checked:t,disabled:!n&&o,onChange:()=>r(),"data-reltio-id":"reltio-matches-table-selectAll-checkbox"}),i().createElement(hn.default,a))};In.propTypes={isSomeSelected:a().bool,isAllSelected:a().bool,onCheckboxClick:a().func,isComparisonViewShown:a().bool};const An=(0,Tn.Z)((e=>{let{selected:t,isAllSelected:n,onResetSelect:r,onSelectAll:o,isComparisonViewShown:a}=e;const l=!!t&&t.length>0;return{isSomeSelected:l,isAllSelected:n,onCheckboxClick:l?r:o,isComparisonViewShown:a}}))((0,fn.Z)(In));var Dn=n(74615),Zn=n(93301);const Bn=e=>{let{value:{transitiveMatchRules:t=[],matchRules:n=[]}={}}=e;const r=En();return i().createElement("div",{className:r.matchRulesWrapper},n.length>0&&i().createElement(Dn.Z,{matchRules:n}),t.length>0&&i().createElement(Zn.Z,{transitiveMatchRules:t}))};Bn.propTypes={value:a().shape({transitiveMatchRules:a().array,matchRules:a().array})};const Vn=Bn,Ln=e=>{let{value:{mlMatchRules:t=[]}={}}=e;const n=En();return i().createElement("div",{className:n.matchRulesWrapper},t.length>0&&i().createElement(Dn.Z,{isMlMatch:!0,matchRules:t}))};Ln.propTypes={value:a().shape({mlMatchRules:a().array})};const zn=Ln,Hn=e=>{let{value:t}=e;const n=En();return i().createElement("div",{className:n.blobWrapper,onScroll:T.UW},t)};Hn.propTypes={value:a().any};const Fn=Hn,Wn=e=>{let{value:t}=e;const n=En(),r=(0,m.efz)({value:t});return r&&i().createElement("div",{className:n.imageWrapper},i().createElement("img",{src:r}))};Wn.propTypes={value:a().any};const _n=Wn;var Un=n(31254);const Gn=e=>{let{value:t}=e;const n=En(),r=(0,p.useSelector)(Se.ZP.selectors.getMetadata);return t&&i().createElement("div",{className:De()(n.defaultWrapper,n.referenceWrapper)},i().createElement(Un.Z,{className:n.entityAvatar,entityType:(0,m.nt9)(r,(0,m.CZ8)(t).type)}),i().createElement(kn.Z,{value:(0,m.CZ8)(t).objectURI,className:n.link},(0,m.idV)(t.label)))};Gn.propTypes={value:a().any};const qn=Gn;function $n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xn=(0,d.split)("."),Yn=(e,t,n,r)=>n.map((o=>{const a=o.object,l=(0,m.ZYr)(e,n,a,r),i=o.matchRules||[],s=o.matchScore||0,[c,u]=(0,d.isEmpty)(l)?(0,d.pipe)((0,m.LS0)(e,a.type),m.UkJ)(i):[[],[]],p=(0,m.w80)(e,a.type,i),h={entity:a,matchRules:u,mlMatchRules:c,transitiveMatchRules:l,matchScore:s};return(0,d.pipe)((0,d.reduce)(((e,t)=>(0,d.assoc)(t.id,((e,t,n)=>{let{entity:r,transitiveMatchRules:o,matchRules:a,mlMatchRules:l,matchScore:i}=n;switch(t.id){case"label":return r;case"id":return(0,m.BTI)(r);case"matchRules":return{transitiveMatchRules:o,matchRules:a};case"mlMatchRules":return{mlMatchRules:l};case"score":return i;default:{const[e,...n]=Xn(t.id);return(0,d.pipe)((0,d.prop)(e),(0,m.tT_)(n))(r)}}})(0,t,h),e)),{}),(0,d.assoc)("matchAttributes",p),(0,d.assoc)("rawValue",o))(t)})),Qn=e=>{if((0,m.vZp)(e)){const[,...t]=Xn(e);return t.length>1?t.slice(0,-1):null}return null},Kn=e=>{switch(e.id){case"label":return Nn;case"matchRules":return Vn;case"mlMatchRules":return zn;default:return(e=>{switch(e){case m.oS0.TYPE_BLOB:return Fn;case m.oS0.TYPE_IMAGE:return _n;case m.oS0.TYPE_REFERENCE:return qn;default:return Sn}})(e.dataTypeDefinition.type)}};function Jn(){return Jn=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},Jn.apply(this,arguments)}const er=e=>{let{rowValue:t,cell:n,CellValueRenderer:r,isRowSelected:o,isCellHighlighted:a,columnIndex:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["rowValue","cell","CellValueRenderer","isRowSelected","isCellHighlighted","columnIndex"]);const c=En(),u=0===l;return i().createElement("div",{className:De()({[c.rowCellSelected]:o,[c.rowCellHighlighted]:a,[c.rowCellFirstColumn]:u},c.rowCell)},n.values.map(((e,n)=>i().createElement(r,Jn({key:n,value:e,rowValue:t,isRowSelected:o},s)))))};er.propTypes={rowValue:a().object,cell:a().object,CellValueRenderer:a().elementType,isRowSelected:a().bool,isCellHighlighted:a().bool,columnIndex:a().number};const tr=(0,Tn.Z)(((e,t)=>{let{selected:n}=e,{columnData:r,rowValue:o,cell:a}=t;return{isRowSelected:!!n&&n.includes(o.rawValue),isCellHighlighted:Q(o.matchAttributes,r)&&!a.values.every(m.O27)}}))(er),nr=(0,Le.Z)((e=>({tableContainer:{flex:1,display:"flex",color:"rgba(0,0,0,0.54)",overflow:"hidden"},rowActionButtonsWrapper:{height:"100%",display:"flex",alignItems:"center",marginRight:"1px"},rowActionButtons:{backgroundColor:"rgba(238, 238, 238, 1)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",backgroundColor:"rgba(238, 238, 238, 1)",borderLeft:"1px solid rgba(0,0,0,0.12)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},checked:{},actionButton:{marginLeft:"12px","&:last-child":{marginRight:"3px"}},hoveredRowRightContentContainer:{alignItems:"center !important"}})));function rr(){return rr=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},rr.apply(this,arguments)}const or=e=>{let{entity:t,matches:n,metadata:r,columnsData:o,filters:s,onFilter:c,sorting:u,onSort:p,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,entitiesMap:y,actionButtonsRenderer:v,basicTableRef:w,isComparisonViewShown:E}=e;const C=nr(),[x,O]=(0,l.useState)(n);(0,l.useEffect)((()=>{O(n)}),[n]);const S=(0,l.useCallback)(((e,t)=>{O((0,d.move)(e,t)),U(t)}),[]),R=(0,l.useMemo)((()=>Yn(r,o,x,y)),[x,o,r,y]),P=!!p,k=(0,l.useMemo)((()=>((e,t)=>(0,d.map)((t=>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){$n(e,t,n[t])}))}return e}({sortable:e},t,{resizable:!0,nestedPath:Qn(t.id),headCellRenderer:"label"===t.id?An:Cn,rowCellValueRenderer:Kn(t)})))(t))(P,o)),[o,P]),T=(0,l.useMemo)((()=>t?Yn(r,o,[{object:t}]):[]),[t,r,o]),{getRowHeight:M,CellRenderer:j}=(0,sn.Z)({rowsData:T,columnsData:k,maxRowValuesCount:3}),N=M(0),I=(0,l.useMemo)((()=>{const e=(e=>t=>{const n=n=>{const r=En();return i().createElement(Rn.B.Provider,{value:"tableHeader"},i().createElement("div",{className:r.headCellWithEntity},i().createElement(t,n),i().createElement(e,{className:De()(r.entityRowCell,r.entityRowCellSelected),columnId:n.headCellData.id,rowIndex:0})))};return n.propTypes={headCellData:a().shape({id:a().string})},n})(j);return k.map((0,d.evolve)({headCellRenderer:e}))}),[k,j]),A=(0,l.useMemo)((()=>({isAllSelected:h.length>0&&h.length===n.length,entityToMatch:t,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,isComparisonViewShown:E})),[t,h,f,g,b,n,E]),{getDynamicRowCellHeight:D,changeRowCellHeight:Z,clearHeightsCache:B}=(0,cn.Z)();(0,l.useLayoutEffect)(B,[n]);const[V,L]=(0,l.useState)(!1),z=(0,l.useCallback)((()=>L(!0)),[]),H=(0,l.useCallback)((()=>L(!1)),[]),[F,W]=(0,l.useState)(!1),[_,U]=(0,l.useState)(null),G=(0,l.useCallback)((e=>{U((t=>V||F?t:e))}),[V,F]),q=(0,l.useMemo)((()=>{if(!v||null===_)return null;const e=x[_],n=h.includes(e);return i().createElement("div",{className:De()(C.rowActionButtonsWrapper)},i().createElement("div",{className:De()(C.rowActionButtons,{[C.checked]:n})},v({hoveredMatch:e,buttonClassName:C.actionButton,onActionsMenuOpen:z,onActionsMenuClose:H})),t&&i().createElement(un.Z,{className:De()(C.commentsContainer,{[C.checked]:n}),uri:(0,m.E_P)(t.uri,e.object.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:t.uri,matchEntityUri:e.object.uri}),onChangePopupVisibility:W,allowOnlyOneComment:!0,showAlways:!0}))}),[v,_,x,h,C,z,H,t]),$=(0,l.useCallback)((e=>{switch(e.columnData.id){case"label":return i().createElement(tr,rr({},e,{hoverRowIndex:_,actionsContent:q,tableRef:w}));case"matchRules":case"mlMatchRules":return i().createElement(pn.Z,rr({onChangeHeight:Z},e),i().createElement(tr,e));default:return i().createElement(tr,e)}}),[Z,_,q,w]),X=(0,l.useCallback)((0,d.either)(D,dn.Z),[D,dn.Z]),Y=(0,l.useMemo)((()=>({hoveredRowRightContentContainer:C.hoveredRowRightContentContainer})),[C]);return i().createElement("div",{className:C.tableContainer},i().createElement(mn.Z,{fixFirstColumn:!0,columnsData:I,rowsData:R,context:A,sorting:u,onSort:p,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:100,headRowHeight:56+N,renderRowCell:$,getRowCellHeight:X,hoverStateEnabled:!0,hoveredRowRightContent:q,hoverRowIndex:_,onRowHover:G,classes:Y,maxRowValuesCount:3,dndRowReorderingEnabled:!0,dndRowReorderingHandler:S,ref:w,hoveredContentPosition:0}))};or.propTypes={entity:m.pyR,metadata:m.pGS,columnsData:Xt.uz,matches:a().array,selected:a().array,onToggleSelect:a().func,onResetSelect:a().func,onSelectAll:a().func,filters:a().objectOf(Xt.Dq),onFilter:a().func,sorting:Xt.nI,onSort:a().func,entitiesMap:a().object,actionButtonsRenderer:a().func,basicTableRef:a().shape({current:a().object}),isComparisonViewShown:a().bool};const ar=or;var lr=n(51229),ir=n(1876),sr=n(30553),cr=n(98281);const ur=(0,Le.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,ze.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,ze.U1)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px",paddingLeft:"12px",paddingRight:"38px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0},hidden:{visibility:"hidden"},checkIcon:{color:"rgba(0,0,0,0.54)",marginRight:"12px"}})));function pr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const dr=e=>{let{options:t,optionsData:n,onChangeOptions:r}=e;const o="options-menu",a=ur(),s=(0,l.useRef)(),[c,u]=(0,l.useState)(!1),p=()=>u((e=>!e));return i().createElement(i().Fragment,null,i().createElement(ct.Z,{icon:Ot.Z,size:"L",ref:s,className:De()(a.buttonRoot,{[a.selected]:c}),onClick:p,"aria-pressed":c,"aria-controls":c?o:void 0,"aria-haspopup":"true"}),i().createElement(Lt.Menu,{id:o,variant:"menu",open:c,autoFocus:!1,classes:{paper:a.paper},anchorEl:s.current,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:c}},n.map((e=>{const{label:n,id:o}=e,l=t[o];return i().createElement(Lt.MenuItem,{key:o,classes:{root:a.menuItem},onClick:()=>{u(!1),r(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){pr(e,t,n[t])}))}return e}({},t,{[o]:!l}))}},i().createElement(cr.Z,{className:De()(a.checkIcon,{[a.hidden]:!l})}),i().createElement(Lt.Typography,{classes:{root:a.menuText}},n))}))))};dr.propTypes={options:a().object,optionsData:a().array,onChangeOptions:a().func};const mr=dr,hr=(0,Le.Z)((e=>({header:{"& > button":{margin:"0 -2px"},paddingRight:"15px"},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500},flex1:{flex:1},selected:{backgroundColor:(0,ze.U1)(e.palette.primary.main,.12)}}))),fr=e=>{let{total:t,columnsData:n,selectedColumns:r,onChangeColumns:o,filtersEnabled:a,onToggleFilters:l,showFilters:s,options:c,optionsData:u,onChangeOptions:p}=e;const d=hr(),h=!(0,m.O27)(u);return i().createElement(zt.Z,{title:"",classes:{root:d.header}},i().createElement(Lt.Typography,{className:d.totalCaption,variant:"caption"},i().createElement("span",{className:d.totalNumber},q().number(t,"0,0")),q().text("total profiles")),i().createElement(lr.Z,null),s&&i().createElement(ir.Z,{enabled:a,onClick:l}),h&&i().createElement(mr,{options:c,optionsData:u,onChangeOptions:p}),(s||h)&&i().createElement(sr.Z,{height:28,margin:10}),i().createElement($t.Z,{columnsData:n,selectedColumns:r,onChangeColumns:o}))};fr.propTypes={total:a().number,showFilters:a().bool,columnsData:Xt.uz,selectedColumns:a().arrayOf(a().string),onChangeColumns:a().func,filtersEnabled:a().bool,onToggleFilters:a().func,options:a().object,optionsData:a().array,onChangeOptions:a().func};const gr=fr,br=(0,Le.Z)((e=>({header:{"& > button":{margin:"0 -2px"},paddingRight:"15px"},flex1:{flex:1},selected:{backgroundColor:(0,ze.U1)(e.palette.primary.main,.12)}}))),yr=e=>{let{selectedItems:t,children:n}=e;const r=br(),o=t.length>0;return i().createElement(zt.Z,{title:"",classes:{root:De()(r.header,{[r.selected]:o})}},i().createElement("div",{className:r.flex1},i().createElement(Lt.Typography,{color:"primary"},q().text("Selected: ${count}",{count:t.length}))),n)};yr.propTypes={selectedItems:a().arrayOf(a().object),children:a().oneOfType([a().arrayOf(a().node),a().node])},yr.defaultProps={selectedItems:[]};const vr=yr,wr=(0,Le.Z)({actions:{display:"flex",alignItems:"center"},button:{marginLeft:"8px"}}),Er=(0,d.map)((0,d.prop)("object")),Cr=e=>{let{entity:t,matches:n,metadata:r,config:o}=e;const a=wr(),l=Er(n),{canMark:s}=(0,m.OCS)(r,o,t,n);return i().createElement("div",{className:a.actions},s&&i().createElement(Ge,{entity:t,entities:l,mode:"button"}),i().createElement(sr.Z,{height:28,margin:10}),i().createElement(Fe,{selectedMatchesCount:n.length}))};Cr.propTypes={entity:m.pyR,matches:a().arrayOf(a().object),metadata:m.pGS,config:m.yxQ};const xr=[{id:"label",get label(){return q().text("Profile name")},dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1},{id:"id",get label(){return q().text("Entity ID")},dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1}],Or=[{id:"showInactiveEntities",get label(){return q().text("Include entities that have ended")}}],Sr=(0,Le.Z)((e=>({tableView:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},matchesView:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},mainArea:{flex:1,display:"flex",flexDirection:"row",overflow:"hidden"},comparisonView:{width:"calc(100% - 280px)"},fullScreen:{height:"100%",zIndex:"200"}}))),Rr=(e,t)=>{(0,l.useEffect)((()=>{t(e!==w?3:void 0)}),[e,t])};function Pr(){return Pr=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},Pr.apply(this,arguments)}const kr=[20,50,100],[Tr]=kr,Mr=Y(xr),[jr]=Mr,Nr={showInactiveEntities:!1},Ir=(0,l.memo)((e=>{let{entity:t,metadata:n,config:r,fullScreenContainer:o}=e;const a=Sr(),[s,c]=ge(Mr,{order:"asc",field:jr},Tr,Nr),{comparisonViewMode:u,isGlobalSpinnerActive:p}=z(),{changeRowsPerPage:h,changePage:f,changeColumns:g,toggleFilters:b,changeFilter:y,toggleSort:w,setSelectedItems:S,toggleSelect:R,setOptions:P,setLimitSelection:T}=s,{sorting:M,page:j,rowsPerPage:N,visibleColumns:I,filters:A,selectedItems:D,options:Z}=c,{uri:B,type:V}=t||{},[L,W,_]=ae({defaultColumnsData:xr,metadata:n,entityType:V}),G=(0,l.useMemo)((()=>I.map((e=>L.find((0,d.propEq)("id",e)))).filter(d.identity)),[I,L]);(0,l.useEffect)((()=>{g(_)}),[_,g]);const q=(0,l.useMemo)((()=>[...U(V,A,L),{filter:"not equals",fieldName:"uri",values:[B]}]),[V,A,L,B]),$=(0,l.useMemo)((()=>Y(G)),[G]),{entities:X,total:Q,findEntities:K}=(e=>{let{entityType:t,filters:n,select:r,sorting:o,page:a,rowsPerPage:i,options:s,enabled:c}=e;const{order:u,field:p}=o,{setGlobalSpinner:d}=H(),[h,f]=(0,l.useState)(0),[g,b]=(0,l.useState)([]),y=(0,oe._)(),v=["uri","label","type","secondaryLabel","defaultProfilePicValue"],w=s.showInactiveEntities?m.YJ7.ALL:m.YJ7.ACTIVE_ONLY,E=(0,l.useCallback)((()=>{c&&(d(!0),y(Promise.all([(0,m.ZOr)(n,{offset:a*i,max:i,sort:p,order:u,select:v.concat(r).join(","),activityFilter:w}),(0,m.j_Q)(n,{activityFilter:w})])).then((e=>{const[t,n]=e,{total:r}=n;b(t.map((e=>({object:e})))),f(r)})).finally((e=>d(!1))))}),[t,n,p,u,a,i,c,r,w]);return(0,l.useEffect)((()=>{E()}),[E]),{entities:g,total:h,findEntities:E}})({enabled:!!B,entityType:V,filters:q,sorting:M,select:$,page:j,rowsPerPage:N,options:Z}),{setReloadHandler:J}=k();J((()=>{K(),ee()}));const ee=(0,l.useCallback)((()=>{S([])}),[S]),te=(0,l.useCallback)((()=>{S(X)}),[S,X]);(0,l.useEffect)((()=>{const e=D.map((e=>X.find((t=>(0,m.ev7)(t)===(0,m.ev7)(e)))||e));S(e)}),[X]),(0,C.D)((()=>{f(0),ee()}),[B,A,Z]),Rr(u,T);const ne=u===v,re=u===E,le={entity:t,metadata:n,selectedItems:D||[],columnsData:W,config:r,selectedColumns:I,onChangeColumns:g,controlsRenderer:Ye},ie=(0,l.useCallback)((e=>{let{hoveredMatch:o,buttonClassName:a}=e;const l=[o.object],{canMark:s}=(0,m.hXd)(n,r,o.object,t,o.matchRules);return s&&i().createElement(Ge,{entity:t,entities:l,mode:"iconButton",className:a})}),[r,t,n]),se=(0,l.useRef)(null);return ne?i().createElement(ln,{fullScreenContainer:o},i().createElement(F.Provider,{value:R},i().createElement(an,Pr({},le,{classes:{root:a.fullScreen}})))):i().createElement("div",{className:a.matchesView},D&&D.length>0?i().createElement(vr,{selectedItems:D},i().createElement(Cr,{matches:D,entity:t,metadata:n,config:r})):i().createElement(gr,{total:Q,columnsData:W,selectedColumns:I,onChangeColumns:g,filtersEnabled:!!A,onToggleFilters:b,showFilters:!0,options:Z,optionsData:Or,onChangeOptions:P}),i().createElement("div",{className:a.mainArea},i().createElement("div",{className:a.tableView},i().createElement(ar,{entity:t,metadata:n,columnsData:G,matches:X,selected:D,onToggleSelect:R,onResetSelect:ee,onSelectAll:te,filters:A,onFilter:y,sorting:M,onSort:w,actionButtonsRenderer:ie,basicTableRef:se,isComparisonViewShown:re}),i().createElement(x.Z,{rowsPerPageOptions:re?[]:kr,count:Q,page:j,onChangePage:f,rowsPerPage:N,onChangeRowsPerPage:h,basicTableRef:se}),p&&i().createElement(O.Z,null)),re&&i().createElement(F.Provider,{value:R},i().createElement(an,Pr({},le,{classes:{root:a.comparisonView}})))))}));Ir.displayName="FindMatchesView",Ir.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,fullScreenContainer:a().instanceOf(Element)};var Ar=n(7718),Dr=n(3515),Zr=n(31274),Br=n(7154),Vr=n(91262);const Lr=(0,Le.Z)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"16px 16px 0"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px"},path:{color:e.palette.text.secondary,fontize:"13px",letterSpacing:0,lineHeight:"15px",padding:"6px 0"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}})));function zr(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){Hr(e,t,n[t])}))}return e}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fr=e=>{let{config:t,mainEntity:n,currentEntity:r,matchRules:o,open:a,onClose:s=d.identity}=e;const c=Lr(),u=(0,p.useDispatch)(),h=(0,p.useSelector)(Se.ZP.selectors.getMetadata),{relation:f={}}=(0,p.useSelector)((e=>Se.ZP.selectors.getRelationToAddByViewId(e,t.id)))||{},{inRelations:g=[],outRelations:b=[]}=(0,l.useMemo)((()=>((e,t,n,r,o)=>{const{isNotDuplicatedInRelation:a,isNotDuplicatedOutRelation:l}=(0,m.xE1)(),i=t=>(0,d.pipe)((0,d.assocPath)(["startObject","objectType"],(0,m.nt9)(e,t.startObject.objectTypeURI)),(0,d.assocPath)(["endObject","objectType"],(0,m.nt9)(e,t.endObject.objectTypeURI)))(t),s=(0,m.nt9)(e,r.type),c=(0,d.propOr)({},"matchActions",t),u=(0,m.dzT)(c,s,o),[p]=u.map((e=>{let{createRelation:t}=e;return t})).filter(d.identity);return(0,d.evolve)({inRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,r,n)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(a),(0,d.map)(i)),outRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,n,r)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(l),(0,d.map)(i))},p)||{}})(h,t,n,r,o)),[t,n,r,o,h]),{relationUri:y,relationType:v={}}=f,w=(0,d.pathOr)({},["object","attributes"],f),E=(0,l.useMemo)((()=>(0,m.xF8)(h,v)),[v,h]),C=(0,l.useMemo)((()=>zr({attributes:w},(0,m.p2l)(f))),[f,w]),x=t.id,O=(0,l.useCallback)((e=>{(0,d.pipe)(Se.N5.relations.actions.setRelationType(t.id,y),u)(e)}),[t,y,u]),S=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.addAttributes,u)(e.map((e=>zr({},e,{viewId:x}))))),[x,u]),R=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.modifyAttribute,u)(zr({},e,{viewId:x}))),[x,u]),P=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.removeAttribute,u)(zr({},e,{viewId:x}))),[x,u]),k=(0,l.useCallback)((()=>s(y)),[y,s]),T=(0,l.useCallback)((()=>u(Se.N5.errors.actions.errorsSet([]))),[u]),M=(0,l.useCallback)((()=>{const e=(0,m.xkB)(h,{relation:f});return u(Se.N5.errors.actions.errorsSet(e)),0===e.length}),[f,h,u]),j=(0,l.useCallback)((()=>{T(),k()}),[T,k]),N=`${(0,m.idV)(r.label)} → ${(0,m.idV)(n.label)}`,I=(0,d.isEmpty)(v);return i().createElement(Lt.Dialog,{open:a,fullWidth:!0,maxWidth:"sm",onClose:j,classes:{paper:c.dialogPaper}},i().createElement(Lt.DialogTitle,{disableTypography:!0,classes:{root:c.dialogTitle}},i().createElement(Lt.Typography,{variant:"subtitle1",classes:{root:c.titleText}},q().text("Add relationship")),i().createElement(Lt.Typography,{variant:"body2",classes:{root:c.path}},N)),i().createElement(Lt.DialogContent,{classes:{root:c.content}},i().createElement(Br.Z,{relation:f,metadata:h,inRelationTypes:g,outRelationTypes:b,onChange:O,applyFirstByDefault:!0}),i().createElement(Vr.Z,{className:c.attributeList,attrTypes:E,entity:C,showEmptyEditors:!0,mode:m.fO_.EDITING,parentUri:y,onAddAttributes:S,onChangeAttribute:R,onDeleteAttribute:P})),i().createElement(Lt.DialogActions,null,i().createElement(Lt.Button,{onClick:j},q().text("Cancel")),i().createElement(Lt.Button,{disabled:I,color:"primary",onClick:()=>{const{relationType:e,startDate:t,endDate:o}=f;M()&&((0,m.DsR)({startEntityUri:n.uri,endEntityUri:r.uri,relationType:e,attributes:(0,d.pathOr)({},["object","attributes"],f),startDate:t,endDate:o}).catch(ve),k())}},q().text("Add"))))};Fr.propTypes={config:m.yxQ,mainEntity:m.pyR,currentEntity:m.pyR,matchRules:a().arrayOf(a().string),open:a().bool,onClose:a().func};const Wr=Fr;function _r(){return _r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(this,arguments)}const Ur=e=>{const[t,n]=(0,l.useState)(!1),[r,o]=(0,l.useState)({}),a=(0,p.useDispatch)(),s=(0,l.useCallback)((t=>{let{mainEntity:r,currentEntity:l,matchRules:i}=t;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{relation:{relationUri:(0,m.ncP)()},entity:e,isNew:!0}}(l);(0,d.pipe)(Se.N5.relations.actions.openRelationEditor(e.id),a)(s),o({mainEntity:r,currentEntity:l,matchRules:i}),n(!0)}),[e,a]),c=(0,l.useCallback)((t=>{(0,d.pipe)(Se.N5.relations.actions.closeRelationEditor,a)(e.id,t),n(!1)}),[e.id,a]),u=()=>t?i().createElement(Wr,_r({config:e,open:t,onClose:c},r)):null;return u.propTypes={},{showDialog:t,openAddRelationDialog:s,AddRelationDialogRenderer:u}};var Gr=n(28741);function qr(){return qr=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},qr.apply(this,arguments)}const $r=(0,l.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=d.identity}=e;const{ActionButton:o,props:a}=n;return i().createElement(o,qr({ref:t,mode:"menuItem",onMenuClose:r},a))}));$r.displayName="MenuItemRenderer";const Xr=$r;function Yr(){return Yr=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},Yr.apply(this,arguments)}const Qr=e=>{let{actions:t,numberOfButtons:n=2,mode:r="normal",classes:o,onActionsMenuOpen:a,onActionsMenuClose:l}=e;const[s,c]=(0,d.splitAt)(n,t),u="normal"===r?"button":"iconButton",p="normal"===r?"MPlus":"S";return i().createElement(i().Fragment,null,s.map(((e,t)=>{let{ActionButton:n,props:r}=e;return i().createElement(n,Yr({key:t,mode:u,className:null==o?void 0:o.actionButton},r))})),c.length>0&&i().createElement(wt.Z,{buttonComponent:Ze.k,buttonProps:{icon:Ot.Z,size:p,tooltipTitle:q().text("More actions")},className:null==o?void 0:o.moreOptions,menuId:"matches-view-actions",menuItems:c,onMenuOpen:a,onMenuClose:l,MenuItemRenderer:Xr}))},Kr=e=>{let{value:{show:t,entity:n,entities:r,matchRules:o,permission:a,config:l}}=e;const s=qe(),{canMerge:c,canAddRelation:u,canMark:p}=a,{showDialog:h,openAddRelationDialog:f,AddRelationDialogRenderer:g}=Ur(l),b=[...r,n].some(m.biM),y=[{ActionButton:Ie,show:p,props:{entity:n,entities:r}},{ActionButton:ke,show:!b,props:{entity:n,entities:r}},{ActionButton:je,show:u&&!b,props:{mainEntity:n,currentEntity:r.length>0?r[0]:{},matchRules:o,onClick:f}}].filter((0,d.prop)("show"));return t?i().createElement(i().Fragment,null,i().createElement("div",{className:s.container},c&&i().createElement(xe,{entity:n,entities:r,className:s.mergeButton,mode:"button"}),i().createElement(Qr,{actions:y,numberOfButtons:1,classes:{actionButton:s.rightButton,moreOptions:s.moreOptions}})),u&&h&&i().createElement(g,null)):null};Kr.propTypes=$e;const Jr=Kr,eo=(0,d.map)((0,d.prop)("object")),to=e=>{let{entity:t,matches:n,metadata:r,config:o}=e;const a=eo(n),{canMerge:s,canMark:c}=(0,m.OCS)(r,o,t,n),u=wr(),p=[...a,t].some(m.biM),h=(0,l.useMemo)((()=>[{ActionButton:xe,show:s,props:{entity:t,entities:a}},{ActionButton:Ie,show:c,props:{entity:t,entities:a}},{ActionButton:ke,show:!p,props:{entity:t,entities:a}}].filter((0,d.prop)("show"))),[c,s,t,a,p]);return i().createElement("div",{className:u.actions},i().createElement(Qr,{actions:h,numberOfButtons:2,classes:{actionButton:u.button}}),i().createElement(sr.Z,{height:28,margin:10}),i().createElement(Fe,{selectedMatchesCount:n.length}))};to.propTypes={entity:m.pyR,matches:a().arrayOf(a().object),metadata:m.pGS,config:m.yxQ};const no=[{id:"label",get label(){return q().text("Profile name")},dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1},{id:"matchRules",get label(){return q().text("Match rule")},dataTypeDefinition:{type:m.oS0.TYPE_SELECT},hideable:!1,initialWidth:100,autoResize:!1},{id:"mlMatchRules",get label(){return q().text("Match IQ")},dataTypeDefinition:{type:m.oS0.TYPE_SELECT},hideable:!1,initialWidth:130,minWidth:130,autoResize:!1},{id:"id",get label(){return q().text("Entity ID")},dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1}],ro=[{id:"showTransitiveMatches",get label(){return q().text("Show transitive matches")}},{id:"showInactiveEntities",get label(){return q().text("Include entities that have ended")}}],oo=[{id:"score",get label(){return q().text("Match score")},dataTypeDefinition:{type:m.oS0.TYPE_INT},initialWidth:100}],ao=(0,Le.Z)((e=>({tableView:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},matchesView:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},mainArea:{flex:1,display:"flex",flexDirection:"row",overflow:"hidden"},comparisonView:{width:"calc(100% - 280px)"},fullScreen:{height:"100%",zIndex:"200"}})));function lo(){return lo=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},lo.apply(this,arguments)}const io=[20,50,100],[so]=io,co=Y(no),uo={showTransitiveMatches:!0,showInactiveEntities:!1},po=(0,l.memo)((e=>{let{entity:t,metadata:n,config:r,fullScreenContainer:o}=e;const a=ao(),[s,c]=ge(co,{order:"asc",field:co[0]},so,uo),{comparisonViewMode:u,isGlobalSpinnerActive:p}=z(),{changeRowsPerPage:h,changePage:f,changeColumns:g,toggleFilters:b,changeFilter:y,setSelectedItems:w,toggleSelect:S,setOptions:R,setLimitSelection:P}=s,{page:T,rowsPerPage:M,visibleColumns:j,filters:N,selectedItems:I,options:A}=c,{uri:D,type:Z}=t||{},B=j.includes("score")?{field:"score",order:"desc"}:{order:"asc",field:co[0]},{matches:V,total:L,entitiesMap:W,loadMatches:_}=(e=>{let{entity:t,filter:n,sorting:r,page:o,rowsPerPage:a,options:i,enabled:s}=e;const{setGlobalSpinner:c}=H(),u=(0,l.useCallback)((()=>{c(!0)}),[c]),p=(0,l.useCallback)((()=>{c(!1)}),[c]),{total:d,matches:m,entitiesMap:h,loadMatches:f}=(0,Gr.s)({enabled:s,entity:t,filter:n,onFinishLoading:p,onStartLoading:u,options:i,page:o,rowsPerPage:a,sorting:r});return{matches:m,total:d,entitiesMap:h,loadMatches:f}})({enabled:!!D,entity:t,filter:"",page:T,sorting:B,rowsPerPage:M,options:A}),U=(0,l.useMemo)((()=>(0,m.NVY)(D,Object.keys(W))),[D,W]),G=(0,Ar.C)({objectIds:U}),{setReloadHandler:q}=k();q((()=>{_(),K()}));const[$,X,Y]=ae({defaultColumnsData:no,additionalColumnsData:oo,metadata:n,entityType:Z});(0,l.useEffect)((()=>{g(Y)}),[Y,g]);const Q=(0,l.useMemo)((()=>j.map((e=>$.find((0,d.propEq)("id",e)))).filter(d.identity)),[j,$]),K=(0,l.useCallback)((()=>{w([])}),[w]),J=(0,l.useCallback)((()=>{w(V)}),[w,V]);(0,C.D)((()=>{f(0),K()}),[D,A]),Rr(u,P);const ee=u===v,te=u===E,ne={entity:t,metadata:n,selectedItems:I||[],columnsData:X,config:r,selectedColumns:j,onChangeColumns:g,entitiesMap:W,controlsRenderer:Jr},{showDialog:re,openAddRelationDialog:oe,AddRelationDialogRenderer:le}=Ur(r),ie=(0,l.useCallback)((e=>{let{hoveredMatch:o,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canAddRelation:u,canMark:p}=(0,m.hXd)(n,r,o.object,t,o.matchRules),h=[o.object],f=[...h,t].some(m.biM),g=[{ActionButton:xe,show:c,props:{entity:t,entities:h}},{ActionButton:Ie,show:p,props:{entity:t,entities:h}},{ActionButton:ke,show:!f,props:{entity:t,entities:h}},{ActionButton:je,show:u&&!f,props:{mainEntity:t,currentEntity:o.object,matchRules:o.matchRules,onClick:oe}}].filter((0,d.prop)("show"));return i().createElement(Qr,{actions:g,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,r,n,oe]),se=(0,l.useRef)(null);return i().createElement(Dr.h.Provider,{value:G},i().createElement(Zr.X.Provider,{value:W},ee?i().createElement(ln,{fullScreenContainer:o},i().createElement(F.Provider,{value:S},i().createElement(an,lo({},ne,{classes:{root:a.fullScreen}})))):i().createElement("div",{className:a.matchesView},I&&I.length>0?i().createElement(vr,{selectedItems:I},i().createElement(to,{matches:I,entity:t,metadata:n,config:r})):i().createElement(gr,{total:L,columnsData:X,selectedColumns:j,onChangeColumns:g,filtersEnabled:!!N,onToggleFilters:b,options:A,optionsData:(0,m.biM)(t)?void 0:ro,onChangeOptions:R}),i().createElement("div",{className:a.mainArea},i().createElement("div",{className:a.tableView},i().createElement(ar,{entity:t,metadata:n,columnsData:Q,matches:V,selected:I||[],onToggleSelect:S,onResetSelect:K,onSelectAll:J,filters:N,onFilter:y,entitiesMap:W,actionButtonsRenderer:ie,basicTableRef:se,isComparisonViewShown:te}),i().createElement(x.Z,{rowsPerPageOptions:te?[]:io,count:L,page:T,onChangePage:f,rowsPerPage:M,onChangeRowsPerPage:h,basicTableRef:se}),p&&i().createElement(O.Z,null)),te&&i().createElement(F.Provider,{value:S},i().createElement(an,lo({},ne,{classes:{root:a.comparisonView}})))),re&&i().createElement(le,null))))}));po.displayName="MatchesView",po.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,fullScreenContainer:a().instanceOf(Element)};var mo=n(20449);const ho=e=>{let{value:{show:t,entity:n,entities:r,permission:o}}=e;const a=qe(),{canMerge:l,canMark:s}=o,c=[...r,n].some(m.biM),u=[{ActionButton:Ue,show:s,props:{entity:n,entities:r}},{ActionButton:ke,show:!c,props:{entity:n,entities:r}}].filter((0,d.prop)("show"));return t?i().createElement(i().Fragment,null,i().createElement("div",{className:a.container},l&&i().createElement(xe,{entity:n,entities:r,className:a.mergeButton,mode:"button"}),i().createElement(Qr,{actions:u,numberOfButtons:1,classes:{actionButton:a.rightButton,moreOptions:a.moreOptions}}))):null};ho.propTypes=$e;const fo=ho,go=(0,d.map)((0,d.prop)("object")),bo=e=>{let{entity:t,matches:n,metadata:r,config:o}=e;const a=wr(),s=go(n),{canMerge:c,canMark:u}=(0,m.OCS)(r,o,t,n),p=[...s,t].some(m.biM),h=(0,l.useMemo)((()=>[{ActionButton:xe,show:c,props:{entity:t,entities:s}},{ActionButton:Ue,show:u,props:{entity:t,entities:s}},{ActionButton:ke,show:!p,props:{entity:t,entities:s}}].filter((0,d.prop)("show"))),[u,c,s,t,p]);return i().createElement("div",{className:a.actions},i().createElement(Qr,{actions:h,numberOfButtons:2,classes:{actionButton:a.button}}),i().createElement(sr.Z,{height:28,margin:10}),i().createElement(Fe,{selectedMatchesCount:n.length}))};bo.propTypes={entity:m.pyR,matches:a().arrayOf(a().object),metadata:m.pGS,config:m.yxQ};const yo=[{id:"label",get label(){return q().text("Profile name")},dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1},{id:"id",get label(){return q().text("Entity ID")},dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1}],vo=[{id:"showInactiveEntities",get label(){return q().text("Include entities that have ended")}}],wo=(0,Le.Z)((e=>({tableView:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},matchesView:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},mainArea:{flex:1,display:"flex",flexDirection:"row",overflow:"hidden"},comparisonView:{width:"calc(100% - 280px)"},fullScreen:{height:"100%",zIndex:"200"}})));function Eo(){return Eo=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},Eo.apply(this,arguments)}const Co=[20,50,100],[xo]=Co,Oo=Y(yo),So={showInactiveEntities:!1},Ro=(0,l.memo)((e=>{let{entity:t,metadata:n,config:r,fullScreenContainer:o}=e;const{comparisonViewMode:a,isGlobalSpinnerActive:s}=z(),c=wo(),[u,h]=ge(Oo,{order:"asc",field:Oo[0]},xo,So),{changeRowsPerPage:f,changePage:g,changeColumns:b,toggleFilters:y,changeFilter:w,setSelectedItems:S,toggleSelect:R,setOptions:P,setLimitSelection:T}=u,{page:M,rowsPerPage:j,visibleColumns:N,filters:I,selectedItems:A,options:D}=h,{uri:Z,type:B}=t||{},{matches:V,total:L,entitiesMap:W,loadNotMatches:_}=(e=>{let{entityUri:t,filter:n,sorting:r,page:o,rowsPerPage:a,options:i,enabled:s}=e;const{order:c,field:u}=r||{},{setGlobalSpinner:d}=H(),[h,f]=(0,l.useState)(0),[g,b]=(0,l.useState)([]),[y,v]=(0,l.useState)({}),w=(0,p.useSelector)(Se.ZP.selectors.getTenant),E=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),C=(0,p.useSelector)(Se.ZP.selectors.getDataTenants),x=(0,l.useMemo)((()=>({dtssPath:E,dataTenants:C,entity:{uri:t},customerTenant:w,dtssRequest:m.WSA})),[E,C,t,w]),O=(0,l.useCallback)((0,m.U_T)(x,m.pg),[x]),S=(0,mo.a)(O),R=(0,oe._)(),P=(0,l.useCallback)((e=>{s&&(d(!0),R(S({entityUri:t,offset:o*a,max:a,filter:n,sort:u,force:e,order:c,activeness:i.showInactiveEntities?m.YJ7.ALL:m.YJ7.ACTIVE_ONLY})).then((e=>{const{response:t,total:n,originalResponse:r}=e;f(n),b(t),t.map((e=>{let{uri:t}=e;return t})).length>0&&v((0,m.KPC)(r))})).finally((e=>d(!1))))}),[t,n,u,c,o,a,i,s]);return(0,l.useEffect)((()=>{P()}),[P]),{matches:g,total:h,entitiesMap:y,loadNotMatches:(0,l.useCallback)((()=>{P(!0)}),[P])}})({enabled:!!Z,entityUri:Z,filter:"",page:M,rowsPerPage:j,options:D}),U=(0,l.useMemo)((()=>(0,m.NVY)(Z,Object.keys(W))),[Z,W]),G=(0,Ar.C)({objectIds:U}),{setReloadHandler:q}=k();q((()=>{_(),K()}));const[$,X,Y]=ae({defaultColumnsData:yo,metadata:n,entityType:B});(0,l.useEffect)((()=>{b(Y)}),[Y,b]);const Q=(0,l.useMemo)((()=>N.map((e=>$.find((0,d.propEq)("id",e)))).filter(d.identity)),[N,$]),K=(0,l.useCallback)((()=>{S([])}),[S]),J=(0,l.useCallback)((()=>{S(V)}),[S,V]);(0,C.D)((()=>{g(0),K()}),[Z,D]),Rr(a,T);const ee=a===v,te=a===E,ne={entity:t,metadata:n,selectedItems:A||[],columnsData:X,config:r,selectedColumns:N,onChangeColumns:b,controlsRenderer:fo},re=(0,l.useCallback)((e=>{let{hoveredMatch:o,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canMark:u}=(0,m.hXd)(n,r,o.object,t,o.matchRules),p=[o.object],h=[...p,t].some(m.biM),f=[{ActionButton:xe,show:c,props:{entity:t,entities:p}},{ActionButton:Ue,show:u,props:{entity:t,entities:p}},{ActionButton:ke,show:!h,props:{entity:t,entities:p}}].filter((0,d.prop)("show"));return i().createElement(Qr,{actions:f,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,r,n]),le=(0,l.useRef)(null);return i().createElement(Dr.h.Provider,{value:G},i().createElement(Zr.X.Provider,{value:W},ee?i().createElement(ln,{fullScreenContainer:o},i().createElement(F.Provider,{value:R},i().createElement(an,Eo({},ne,{classes:{root:c.fullScreen}})))):i().createElement("div",{className:c.matchesView},A&&A.length>0?i().createElement(vr,{selectedItems:A},i().createElement(bo,{matches:A,entity:t,metadata:n,config:r})):i().createElement(gr,{total:L,columnsData:X,selectedColumns:N,onChangeColumns:b,filtersEnabled:!!I,onToggleFilters:y,options:D,optionsData:vo,onChangeOptions:P}),i().createElement("div",{className:c.mainArea},i().createElement("div",{className:c.tableView},i().createElement(ar,{entity:t,metadata:n,columnsData:Q,matches:V,selected:A||[],onToggleSelect:R,onResetSelect:K,onSelectAll:J,filters:I,onFilter:w,actionButtonsRenderer:re,basicTableRef:le,isComparisonViewShown:te}),i().createElement(x.Z,{rowsPerPageOptions:te?[]:Co,count:L,page:M,onChangePage:g,rowsPerPage:j,onChangeRowsPerPage:f,basicTableRef:le}),s&&i().createElement(O.Z,null)),te&&i().createElement(F.Provider,{value:R},i().createElement(an,Eo({},ne,{classes:{root:c.comparisonView}})))))))}));Ro.displayName="NotMatchView",Ro.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,fullScreenContainer:a().instanceOf(Element)};const Po=e=>{let{entity:t,metadata:n,config:r,activeView:o,fullScreenContainer:a}=e;const l=(0,f.U)();let s;switch(o){case y.POTENTIAL_MATCHES:s=i().createElement(po,{entity:t,metadata:n,config:r,fullScreenContainer:a});break;case y.FIND_MATCHES:s=i().createElement(Ir,{entity:t,metadata:n,config:r,fullScreenContainer:a});break;case y.NOT_A_MATCH:s=i().createElement(Ro,{entity:t,metadata:n,config:r,fullScreenContainer:a});break;default:s=i().createElement("div",null)}return i().createElement(g.s.Provider,{value:l},i().createElement(b.l,null,i().createElement(P,null,s)))};Po.propTypes={entity:m.pyR,metadata:m.pGS,config:m.yxQ,activeView:a().string,fullScreenContainer:a().instanceOf(Element)};const ko=e=>{let{availableTabs:t=[y.POTENTIAL_MATCHES,y.FIND_MATCHES,y.NOT_A_MATCH],activeTab:n,onChange:r}=e;const o={[y.POTENTIAL_MATCHES]:(0,G.text)("POTENTIAL MATCHES"),[y.FIND_MATCHES]:(0,G.text)("FIND MATCHES"),[y.NOT_A_MATCH]:(0,G.text)("NOT A MATCH")};return i().createElement(Lt.Tabs,{value:n,onChange:r,indicatorColor:"primary",textColor:"primary",scrollButtons:"on"},t.map((e=>i().createElement(Lt.Tab,{key:e,label:o[e],value:e,classes:{}}))))};ko.propTypes={availableTabs:a().arrayOf(a().string),activeTab:a().string,onChange:a().func};const To=(0,Le.Z)((e=>({basicView:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",position:"absolute",top:0,bottom:0,left:0,right:0},content:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),Mo=(0,l.memo)((e=>{let{config:t,entity:n,metadata:r,getSavedState:o,saveState:a}=e;const s=To(),c=(0,m.biM)(n)?[y.POTENTIAL_MATCHES]:t.availableTabs,[u,p]=(0,l.useState)(y.POTENTIAL_MATCHES),[d,f]=(0,l.useState)();return i().createElement(h.Z,{ref:f,className:s.basicView},i().createElement("div",{className:s.content},i().createElement(ko,{activeTab:u,availableTabs:c,onChange:(e,t)=>p(t)}),i().createElement(Po,{fullScreenContainer:d,entity:n,metadata:r,config:t,activeView:u})))}));Mo.displayName="PotentialMatchesView",Mo.propTypes={config:m.yxQ,entity:m.pyR,metadata:m.pGS,dispatch:a().func,getSavedState:a().func,saveState:a().func};const jo=(0,p.connect)((e=>({entity:Se.ZP.selectors.getEntity(e),metadata:Se.ZP.selectors.getMetadata(e)})))((e=>i().createElement(L,null,i().createElement(Mo,e))));var No=n(24605),Io=n(97094),Ao=n(57304),Do=n(19603),Zo=n(93873);const Bo=(0,Le.Z)({comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),Vo=(0,l.memo)((e=>{let{className:t}=e;const n=Bo(),r=(0,p.useSelector)(Se.ZP.selectors.getEntity),o=(0,p.useSelector)(Se.ZP.selectors.getEntityUriWithDataTenant);return i().createElement(Ao.Z,{className:De()(t,Do.U),entity:r},i().createElement(Lt.Box,{display:"flex",alignItems:"center"},i().createElement(Lt.Box,{mr:3},i().createElement(Zo.a,null))),i().createElement(Lt.Box,{className:n.comments},i().createElement(un.Z,{uri:o,relatedObjectUris:(0,m.wp9)(m.q7e.ENTITY,{entityUri:o}),objectType:m.q7e.ENTITY})))}));Vo.displayName="PotentialMatchesProfileBand";var Lo=n(63172),zo=n(52043),Ho=n(39827);function Fo(){return Fo=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},Fo.apply(this,arguments)}const Wo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Fo({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{d:"M20 4v14h2V4c0-1.1-.9-2-2-2H6v2h14zM2 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12z",fill:"currentColor"}))};function _o(){return _o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_o.apply(this,arguments)}const Uo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",_o({width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{d:"M10 12a4 4 0 100-8 4 4 0 000 8zM10.35 14.01C7.62 13.91 2 15.27 2 18v2h9.54c-2.47-2.76-1.23-5.89-1.19-5.99zM19.43 18.02c.36-.59.57-1.28.57-2.02 0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4c.74 0 1.43-.22 2.02-.57L20.59 22 22 20.59l-2.57-2.57zM16 18c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",fill:"currentColor"}))};function Go(){return Go=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},Go.apply(this,arguments)}const qo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Go({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 20h15.002L21 23l1.27-1.27-20-20.01L1 2.99l6.172 6.175a4.007 4.007 0 002.66 2.662l2.23 2.23A10.754 10.754 0 0011 14c-2.67 0-8 1.34-8 4v2zm8-16a3.987 3.987 0 00-2.795 1.137l5.656 5.659A3.999 3.999 0 0011 4z",fill:"#000",fillOpacity:".54"}))};let $o,Xo;var Yo;!function(e){e[e.PotentialMatches=0]="PotentialMatches",e[e.FindMatches=1]="FindMatches",e[e.NotAMatch=2]="NotAMatch"}($o||($o={})),(Yo=Xo||(Xo={})).TABLE="TABLE",Yo.COLUMNS="COLUMNS";const Qo=(0,l.createContext)({reloadData:()=>{},setReloadHandler:()=>{}}),Ko=(()=>{let e;return{reloadData:()=>{e&&e()},setReloadHandler:t=>{e=t}}})(),Jo=e=>{let{children:t}=e;return i().createElement(Qo.Provider,{value:Ko},t)},ea=()=>{const e=(0,l.useContext)(Qo);if(void 0===e)throw new Error("useReloadData must be used within a ReloadDataProvider");return e},ta=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const o=na(e,t,n,r),a=(t.children||[]).map((n=>ta(e,n,"",r.concat({name:t.name,label:t.label}))));return a.length&&(o.children=a,o.notSelectable=!0),o},na=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const o=(0,d.omit)(["children"],t),a=o.label||o.name;return{title:a,fieldName:n||(0,m.Tde)(o.uri,r)}},ra=(e,t)=>t?(0,m.k66)(e,t).map((t=>ta(e,t))):[],oa=(0,d.pipe)((0,d.map)((e=>({id:(0,m.Tde)(e.uri),label:(0,m.idV)(e.label),dataTypeDefinition:(0,m.PFL)(e)})))),aa=(0,d.pipe)(m.Fof,oa),la=(0,d.pluck)("id"),ia=(0,d.curry)(((e,t)=>e.map((e=>(0,m.Tde)(e))).some((e=>t.id===e||ca(t)&&ua(t,e))))),sa=e=>(0,m.QZu)(e.dataTypeDefinition),ca=e=>(0,m.YkG)(e.dataTypeDefinition),ua=(0,d.curry)(((e,t)=>t.startsWith(`${e.id}.`))),pa=(0,d.curry)(((e,t)=>sa(t)&&e.some((e=>{let{id:n}=e;return ua(t,n)})))),da=e=>(0,d.either)((0,d.includes)(d.__,e),pa(e)),ma=(e,t)=>(0,d.pipe)((0,d.reject)(sa),(0,d.filter)(ia(e)))(t);function ha(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){fa(e,t,n[t])}))}return e}function fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ga=(0,l.createContext)(null),ba=(0,l.createContext)(null),ya="SET_GLOBAL_SPINNER",va="SET_SELECTED_ITEMS",wa="TOGGLE_SELECT",Ea="SET_LIMIT_SELECTION",Ca="SET_COMPARISON_VIEW_MODE",xa="SET_ENTITIES_MAP",Oa="DELETE_EXTRA_MATCHES",Sa={setGlobalSpinner:(0,T.zD)(ya),setSelectedItems:(0,T.zD)(va),toggleSelect:(0,T.zD)(wa),setLimitSelection:(0,T.zD)(Ea),setComparisonViewMode:(0,T.zD)(Ca),setEntitiesMap:(0,T.zD)(xa),deleteExtraMatches:(0,T.zD)(Oa)},Ra=(e,t)=>{switch(t.type){case ya:return ha({},e,{isGlobalSpinnerActive:t.payload});case Oa:return ha({},e,{selectedItems:e.selectedItems.slice(0,e.limitSelection)});case va:return ha({},e,{selectedItems:t.payload.slice(0,e.limitSelection)});case wa:return(0,d.evolve)({selectedItems:n=>{const r=t.payload,o=n.findIndex((e=>{var t,n;return(null==e||null===(t=e.object)||void 0===t?void 0:t.uri)===(null==r||null===(n=r.object)||void 0===n?void 0:n.uri)}));if(o>-1)return(0,d.remove)(o,1,n);{const{limitSelection:t}=e;return e.tableViewModeAvailable?(0,d.append)(r,n):(0,d.pipe)((0,d.when)((0,d.both)((0,d.complement)(d.isNil),(0,d.propSatisfies)((0,d.gte)(d.__,t),"length")),(0,d.take)(t-1)),(0,d.append)(r))(n)}}},e);case Ea:return ha({},e,{limitSelection:t.payload});case Ca:{const n=t.payload;return ha({},e,{comparisonViewMode:n,limitSelection:n===Xo.COLUMNS?4:void 0})}case xa:{const n=t.payload;return ha({},e,{entitiesMap:n})}}},Pa=e=>{let{children:t,tableViewModeAvailable:n}=e;const[r,o]=(0,l.useReducer)(Ra,{isGlobalSpinnerActive:!1,selectedItems:[],comparisonViewMode:Xo.COLUMNS,limitSelection:4,entitiesMap:{},tableViewModeAvailable:n}),a=(0,M.o)({actions:Sa,dispatch:o});return i().createElement(ga.Provider,{value:r},i().createElement(ba.Provider,{value:a},t))},ka=()=>{const e=(0,l.useContext)(ga);if(void 0===e)throw new Error("useViewState must be used within a ViewStateProvider");return e},Ta=()=>{const e=(0,l.useContext)(ba);if(void 0===e)throw new Error("useViewStateActions must be used within a ViewStateProvider");return e};function Ma(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){ja(e,t,n[t])}))}return e}function ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Na="RESET",Ia="SET_OPTIONS",Aa=Ma({},le.ZP.actions,{reset:(0,T.zD)(Na),setOptions:(0,T.zD)(Ia)}),Da=(e,t)=>{switch(t.type){case Na:return Ma({},t.payload);case Ia:return Ma({},e,{options:t.payload});default:return le.ZP.reducer(e,t)}};function Za(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){Ba(e,t,n[t])}))}return e}function Ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Va=(e,t)=>{const{field:n,order:r}=e,o={sorting:{field:n,order:r},page:0,rowsPerPage:t,selectedItems:[],limitSelection:null},[a,i]=(0,l.useReducer)(Da,o),s=(0,M.o)({actions:Aa,dispatch:i}),c=Ta(),u=ka();return[Za({},s,c),Za({},a,u),i]},La=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:q().text("Can't add relationship")})},za=e=>{console.error(e),ye.Z.addError({title:q().text("Error"),message:(null==e?void 0:e.errorMessage)||q().text("Something went wrong...")})},Ha=e=>{(null==e?void 0:e.errorCode)!==m.Xt7.DCR_ALREADY_EXISTS&&za(e)},Fa=()=>{const{setGlobalSpinner:e}=Ta(),{isGlobalSpinnerActive:t}=ka(),{reloadData:n}=ea();return{onStartRequest:(0,l.useCallback)((()=>{e(!0)}),[e]),onFinishRequest:(0,l.useCallback)((()=>{e(!1),n()}),[n,e]),isGlobalSpinnerActive:t}},Wa=(e,t)=>e.filter((e=>{let{object:n}=e;return!t.some((e=>{let{uri:t}=e;return t===n.uri}))}));function _a(){return _a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_a.apply(this,arguments)}const Ua=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a=Oe.N.iconButton,size:l,onMenuClose:s=T.ZT}=e;const{isGlobalSpinnerActive:c,onFinishRequest:u,onStartRequest:p}=Fa(),{selectedItems:d}=ka(),{setSelectedItems:m}=Ta();return i().createElement(be.H,_a({className:n,disabled:c,entities:r,entity:o,mode:a},l?{size:l}:{},{onMenuClose:s,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{m(Wa(d,r))},onError:za,"data-reltio-id":"reltio-potential-matches-merge-button",ref:t}))}));function Ga(){return Ga=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},Ga.apply(this,arguments)}Ua.displayName="mergeButton";const qa=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a=Oe.N.iconButton,size:l,onMenuClose:s=T.ZT}=e;const{isGlobalSpinnerActive:c,onFinishRequest:u,onStartRequest:p}=Fa(),{selectedItems:d}=ka(),{setSelectedItems:m}=Ta();return i().createElement(Ne.i,Ga({className:n,disabled:c,entities:r,entity:o,mode:a},l?{size:l}:{},{onMenuClose:s,onStartRequest:p,onFinishRequest:u,onSuccess:()=>{m(Wa(d,r))},ref:t}))}));function $a(){return $a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$a.apply(this,arguments)}qa.displayName="NotMatchButton";const Xa=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",$a({width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{d:"M9 4c4.42 0 8 3.58 8 8s-3.58 8-8 8a8 8 0 01-7.419-5h2.224A6.002 6.002 0 009 18c3.31 0 6-2.69 6-6s-2.69-6-6-6a6.002 6.002 0 00-5.196 3H1.581A8 8 0 019 4zm8 .26c3.45.89 6 4.01 6 7.74 0 3.73-2.55 6.85-6 7.74v-2.09a5.99 5.99 0 000-11.3V4.26zM8 7.5l4.5 4.5L8 16.5V13H0v-2h8V7.5z",fillOpacity:".541"}))},Ya=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a=Oe.N.iconButton,onMenuClose:s=T.ZT}=e;const[c,u]=(e=>{let{entities:t,entity:n}=e;const{setGlobalSpinner:r}=Ta(),{isGlobalSpinnerActive:o}=ka(),{reloadData:a}=ea();return[o,(0,l.useCallback)((()=>{r(!0),(0,m.ck9)(n.uri,t).finally((()=>{r(!1),a()}))}),[t,n,r,a])]})({entity:n,entities:r});return i().createElement(Oe.K,{className:o,disabled:c,mode:a,label:c?"":q().text("Save on potential matches"),icon:Xa,onClick:u,onMenuClose:s,ref:t})}));function Qa(){return Qa=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},Qa.apply(this,arguments)}Ya.displayName="SetAMatchButton";const Ka=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",Qa({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),i().createElement("defs",null,i().createElement("path",{d:"M10 6v2H4v12.22h12V14h2v6c0 1.05-.82 1.918-1.851 1.994L16 22H4c-1.05 0-1.918-.82-1.994-1.851L2 20V8c0-1.05.82-1.918 1.851-1.994L4 6h6zm4 10v2H6v-2h8zm-3.997-3l-.001 2H6v-2h4.003zM21 2c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1h-7l-2 2 .005-11c0-.55.445-1 .995-1h8zm-10.996 8l-.001 2H6v-2h4.004zm9.286-6.3l-3.17 3.17-1.41-1.42-1.41 1.41 2.82 2.84 4.59-4.58-1.42-1.42z",id:"svg2465811894a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2465811894b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2465811894a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2465811894b)",d:"M0 0h24v24H0z"})))},Ja=(0,l.forwardRef)(((e,t)=>{let{className:n,entities:r,entity:o,mode:a=Oe.N.iconButton,onMenuClose:s=T.ZT}=e;const c=(0,l.useContext)(Io.S),[u,h]=(e=>{let{entities:t,entity:n,showSnackbarMessage:r}=e;const{selectors:o}=Se.ZP,{setGlobalSpinner:a}=Ta(),{isGlobalSpinnerActive:i}=ka(),s=(0,p.useSelector)(o.getWorkflowPath),c=(0,p.useSelector)(o.getWorkflowEnvironmentUrl),u=(0,p.useSelector)(o.getTenant),h=(0,d.prop)("uri"),f=(0,d.pipe)(d.concat,(0,d.map)(h))([n],t);return[i,(0,l.useCallback)((()=>{a(!0),(0,m.t6d)({workflowPath:s,processType:"potentialMatchReview",objectURIs:f,tenant:u,environment:c}).then((()=>{null==r||r(q().text("Potential match request: Done"))})).catch(Ha).finally((()=>{a(!1)}))}),[a,s,f,u,c,r])]})({entity:o,entities:r,showSnackbarMessage:c}),f=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),g=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath);return f&&!(0,m.O27)(g)?i().createElement(Oe.K,{className:n,disabled:u,mode:a,label:u?"":q().text("Potential match request"),icon:Ka,onClick:h,onMenuClose:s,ref:t}):null}));Ja.displayName="DCRReviewButton";const el=(0,l.forwardRef)(((e,t)=>{let{entity:n,entities:r,className:o,mode:a=Oe.N.iconButton,onMenuClose:s=T.ZT}=e;const c=(0,l.useContext)(Io.S),[u,d]=(e=>{let{entities:t,entity:n,showSnackbarMessage:r}=e;const{setGlobalSpinner:o}=Ta(),{isGlobalSpinnerActive:a}=ka(),{reloadData:i}=ea(),s=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),c=(0,p.useSelector)(Se.ZP.selectors.getTenant);return[a,(0,l.useCallback)((()=>{o(!0);const e={dtssPath:s,customerTenant:c,entity:n,entities:t};((0,m.biM)(n)?(0,m.XkY)(e):(0,m.uQS)(e)).then((()=>{null==r||r(q().text("Save as potential match: Done"))})).finally((()=>{o(!1),i()}))}),[o,s,c,n,t,r,i])]})({entity:n,entities:r,showSnackbarMessage:c});return i().createElement(Oe.K,{className:o,disabled:u,mode:a,label:u?"":q().text("Save as potential match"),icon:Xa,onClick:d,onMenuClose:s,ref:t})}));function tl(){return tl=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},tl.apply(this,arguments)}el.displayName="ReinstateMatchButton";const nl=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",tl({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),i().createElement("defs",null,i().createElement("path",{d:"M19 14v3h3v2h-3v3h-2v-3h-3v-2l3-.001V14h2zM17 2a3 3 0 11-1.293 5.708l-4.535 4.535a5 5 0 11-1.414-1.414l4.534-4.536A3 3 0 0117 2zM7 12a3 3 0 100 6 3 3 0 000-6zm10-8a1 1 0 100 2 1 1 0 000-2z",id:"svg2904917532a"})),i().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},i().createElement("mask",{id:"svg2904917532b",fill:"#fff"},i().createElement("use",{xlinkHref:"#svg2904917532a"})),i().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2904917532b)",d:"M0 0h24v24H0z"})))},rl=(0,l.forwardRef)(((e,t)=>{let{className:n,mainEntity:r,currentEntity:o,matchRules:a,mode:l=Oe.N.iconButton,onClick:s=T.ZT,onMenuClose:c=T.ZT}=e;return i().createElement(Oe.K,{className:n,mode:l,label:q().text("Add relationship"),icon:nl,onClick:()=>s({mainEntity:r,currentEntity:o,matchRules:a}),onMenuClose:c,ref:t})}));rl.displayName="CreateRelationButton";var ol=n(17308);const al=i().createContext({onClose:()=>{}});var ll=n(99757);const il=(0,Le.Z)((()=>({attributeSelect:{width:"100%",height:"40px"}}))),sl=(0,l.memo)((e=>{let{onChange:t,options:n,sortField:r}=e;const o=il(),a=(0,l.useMemo)((()=>{const e=r.split("."),t=e.length,o=n=>{const a=n[0].fieldName.split(".").length;if(a===t)return n.find((e=>e.fieldName===r));if(a<t){var l;const t=e.slice(0,a).join("."),r=null===(l=n.find((e=>e.fieldName===t)))||void 0===l?void 0:l.children;if(r)return o(r)}};for(const e of n){const t=o(e.attributes);if(t)return t}}),[r,n]),s=(0,l.useCallback)((e=>{t(e.attribute.fieldName)}),[t]);return i().createElement(ll.Z,{hideCheckBox:!0,className:o.attributeSelect,value:a,itemsGroups:n,onSelect:s,ungroup:!0,single:!0})}));var cl=n(90324);const ul=(0,Le.Z)((()=>({rowCheckbox:{marginRight:"20px",height:"24px",position:"relative",padding:"12px"},header:{padding:"8px 12px 8px 0",border:"rgba(0,0,0,0.05) 1px solid",display:"flex",justifyContent:"space-between"},selector:{width:"160px"},sorting:{display:"flex"},arrow:{transition:"transform 0.3s ease-in"},rotate:{transform:"rotate(180deg)"}})));function pl(){return pl=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},pl.apply(this,arguments)}const dl=e=>{let{selectedCount:t,totalCount:n,onSelect:r,sortOptions:o,toggleSort:a,sorting:s,totalOnPage:c}=e;const u=ul(),p=(0,l.useContext)(al);return i().createElement(i().Fragment,null,i().createElement(ol.P,pl({},p,{secondTitle:!!n&&q().text("${n} Profiles",{n})})),!!c&&i().createElement("div",{className:u.header},i().createElement(Lt.Checkbox,{className:u.rowCheckbox,checked:t===c,indeterminate:t>0&&t<c,onChange:r}),i().createElement("div",{className:u.sorting},i().createElement(sl,{sortField:s.field,options:o,onChange:a}),i().createElement(Lt.IconButton,{onClick:()=>a(s.field),classes:{root:De()(u.arrow,{[u.rotate]:"desc"===s.order})}},i().createElement(cl.Z,null)))))},ml=[{id:"label",get label(){return q().text("Profile name")}},{id:"id",get label(){return q().text("Entity ID")}}],hl=(e,t,n,r)=>(0,l.useMemo)((()=>{const o=((e,t)=>[{title:"",attributes:ra(e,(0,m.nt9)(e,t))}])(n,r);return[{title:"",attributes:e.concat(t||[]).map((e=>({title:e.label,fieldName:e.id})))},...o]}),[n,r,e,t]);var fl=n(77245);const gl=(0,Le.Z)((e=>({hidden:{visibility:"hidden"},rowCheckbox:{marginLeft:"-9px",marginRight:"19px",height:"24px",position:"relative",padding:"9px"},entity:{paddingTop:"12px",paddingBottom:"8px",overflow:"hidden",textOverflow:"ellipsis"},actions:{marginLeft:"auto",marginRight:0,paddingTop:"15px",display:"flex"},actionButtons:{display:"none"},active:{display:"flex"},wrapper:{position:"relative",whiteSpace:"pre",padding:"0 15px 0 15px",color:"rgba(0,0,0,0.87)","&::after":{content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",pointerEvents:"none"},"&:hover":{backgroundColor:"rgba(0,0,0,0.04)","& $actionButtons":{display:"flex"},"& $commentsContainer":{borderLeft:"1px solid rgba(0,0,0,0.12)"}},display:"flex",boxSizing:"border-box",borderBottom:"1px rgba(0,0,0,0.05) solid",paddingLeft:"12px"},entityLabel:{color:e.palette.primary.main,cursor:"pointer",textDecoration:"none",fontWeight:500},matchRulesWrapper:{padding:"12px 15px 4px 10px",display:"flex",alignItems:"center",boxSizing:"border-box"},selectedRow:{backgroundColor:"rgba(0, 114, 206, 0.12)"},matchScore:{borderLeft:"rgba(0,0,0,0.12) 1px solid",paddingLeft:"12px",height:"20px",marginLeft:"20px",color:"rgba(0,0,0,0.54)"},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",height:"24px",marginLeft:"6px"},border:{borderLeft:"1px solid rgba(0,0,0,0.12)"},rightButton:{marginLeft:"8px"}}))),bl=(0,l.memo)((e=>{let{rowIndex:t,match:n,toggleSelect:r,entityToMatch:o,isRowSelected:a,actionButtonsRenderer:s,metadata:c,entitiesMap:u={}}=e;const p=gl(),d=n.object,[h,f]=(0,l.useState)(!1),g=d!==o,b=s;return i().createElement("div",{className:De()(p.wrapper,Do.U,{[p.selectedRow]:a})},i().createElement(Lt.Checkbox,{className:De()(p.rowCheckbox,{[p.hidden]:!g}),checked:a,onChange:()=>r(n),"data-reltio-id":`reltio-matches-table-checkbox-${t}`}),i().createElement("div",{className:p.entity},i().createElement(kn.Z,{value:(0,m.wwR)(d),className:p.entityLabel},(0,m.idV)(d.label)),i().createElement("div",{className:p.matchRulesWrapper},i().createElement(ft.Z,{entitiesMap:u,entity:d,match:n,metadata:c,variant:fl.g.excludeNotMatch}),!!n.matchScore&&i().createElement("div",{className:p.matchScore},n.matchScore))),i().createElement("div",{className:p.actions},i().createElement("div",{className:De()(p.actionButtons,{[p.active]:h})},i().createElement(b,{buttonClassName:p.rightButton,hoveredMatch:n,onActionsMenuOpen:()=>f(!0),onActionsMenuClose:()=>f(!1)})),o&&i().createElement(un.Z,{className:De()(p.commentsContainer,{[p.border]:h}),uri:(0,m.E_P)(o.uri,n.object.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:o.uri,matchEntityUri:n.object.uri}),allowOnlyOneComment:!0,showAlways:h})))})),yl=(0,Le.Z)((()=>({view:{position:"relative",flex:1,display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden"}}))),vl=e=>{let{entityToMatch:t,matches:n,toggleSelect:r,actionButtonsRenderer:o,metadata:a,entitiesMap:l,selectedItems:s}=e;const c=yl();return i().createElement("div",{className:c.view},n.map(((e,c)=>i().createElement(bl,{key:e.object.uri,rowIndex:c,match:e,entityToMatch:t,toggleSelect:r,actionButtonsRenderer:o,matches:n,matchRules:e.matchRules,metadata:a,entitiesMap:l,isRowSelected:s.some((t=>t.object.uri===e.object.uri))}))))},wl=(0,Le.Z)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),El=[20,50,100],[Cl]=El,xl=la(ml),[Ol]=xl,Sl=(0,l.memo)((e=>{let{entity:t,metadata:n,filters:r,config:o}=e;const a=wl(),[s,c]=Va({order:"asc",field:Ol},Cl),{changeRowsPerPage:u,changePage:h,toggleSort:f,setSelectedItems:g,toggleSelect:b}=s,{sorting:y,page:v,rowsPerPage:w,selectedItems:E,isGlobalSpinnerActive:S}=c,{uri:R,type:P}=t||{},k=(0,l.useMemo)((()=>[{filter:"equals",fieldName:"type",values:[P]},{filter:"not equals",fieldName:"uri",values:[R]},...r]),[P,r,R]),T=hl(ml,[],n,P),{entities:M,total:j,findEntities:N}=(e=>{let{entityType:t,filters:n,sorting:r,page:o,rowsPerPage:a,enabled:i}=e;const{order:s,field:c}=r,{setGlobalSpinner:u}=Ta(),{activityFilter:d,globalFilter:h}=(0,p.useSelector)(Se.ZP.selectors.getGlobalSearchRequestOptions)||{},[f,g]=(0,l.useState)(0),[b,y]=(0,l.useState)([]),v=(0,oe._)(),w=["uri","label","type","secondaryLabel","attributes","crosswalks"],E=(0,l.useMemo)((()=>(0,m.Uqd)()(n)),[n]),C=(0,l.useCallback)((()=>{i&&(u(!0),v(Promise.all([(0,m.ZOr)(n,{offset:o*a,max:a,sort:c,order:s,select:w.join(","),globalFilter:h,activityFilter:d}),(0,m.j_Q)(n,{activityFilter:d,globalFilter:h})])).then((e=>{const[t,n]=e,{total:r}=n;y(t.map((e=>({object:e})))),g(r)})).finally((()=>u(!1))))}),[t,E,c,s,o,a,i,d,h]);return(0,l.useEffect)((()=>{C()}),[C]),{entities:b,total:f,findEntities:C}})({enabled:!!R,entityType:P,filters:k,sorting:y,page:v,rowsPerPage:w}),{setReloadHandler:I}=ea();I((()=>{N(),A()}));const A=(0,l.useCallback)((()=>{g([])}),[g]),D=(0,l.useCallback)((()=>{g(M)}),[g,M]);(0,l.useEffect)((()=>{const e=E.map((e=>M.find((t=>(0,m.ev7)(t)===(0,m.ev7)(e)))||e));g(e)}),[M]),(0,C.D)((()=>{h(0),A()}),[R,r]);const Z=(0,l.useCallback)((e=>{let{hoveredMatch:r,buttonClassName:a}=e;const l=[r.object],{canMark:s}=(0,m.hXd)(n,o,r.object,t,r.matchRules);return s&&i().createElement(Ya,{entity:t,entities:l,className:a})}),[o,t,n]),B=(0,l.useMemo)((()=>M.map((e=>null==E?void 0:E.find((0,d.pathEq)(["object","uri"],e.object.uri)))).filter(d.identity).length),[E,M]);return i().createElement("div",{className:a.mainArea},i().createElement(dl,{selectedCount:B,totalCount:j,totalOnPage:M.length,sortOptions:T,sorting:y,toggleSort:f,onSelect:B?A:D}),i().createElement(vl,{entityToMatch:t,toggleSelect:b,actionButtonsRenderer:Z,matches:M,metadata:n,selectedItems:E}),i().createElement(x.Z,{rowsPerPageOptions:El,count:j,page:v,onChangePage:h,rowsPerPage:w,onChangeRowsPerPage:u}),S&&i().createElement(O.Z,null))}));Sl.displayName="FindMatchesView";const Rl=e=>{let{entity:t,filter:n,rules:r,sorting:o,page:a,rowsPerPage:i,options:s,enabled:c}=e;const{setGlobalSpinner:u,setEntitiesMap:p}=Ta(),d=(0,l.useCallback)((()=>{u(!0)}),[u]),m=(0,l.useCallback)((()=>{u(!1)}),[u]),{total:h,matches:f,entitiesMap:g,loadMatches:b}=(0,Gr.s)({enabled:c,entity:t,filter:n,rules:r,onFinishLoading:m,onStartLoading:d,options:s,page:a,rowsPerPage:i,sorting:o,markMatchedValues:!0});return(0,l.useEffect)((()=>{p(g)}),[p,g]),{matches:f,total:h,entitiesMap:g,loadMatches:b}};var Pl=n(30268);const kl=(0,Le.Z)((e=>({dialogPaper:{height:"600px",maxWidth:"600px"},dialogTitle:{padding:"16px 16px 0"},titleText:{color:e.palette.text.primary,fontSize:"18px",letterSpacing:0,lineHeight:"21px"},path:{color:e.palette.text.secondary,fontize:"13px",letterSpacing:0,lineHeight:"15px",padding:"6px 0"},content:{padding:"8px 16px 0px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},attributeList:{paddingTop:"22px"}})));function Tl(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){Ml(e,t,n[t])}))}return e}function Ml(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const jl=e=>{let{config:t,mainEntity:n,currentEntity:r,matchRules:o,open:a,onClose:s=d.identity}=e;const c=kl(),u=(0,p.useDispatch)(),h=(0,p.useSelector)(Se.ZP.selectors.getMetadata),f=(0,l.useRef)(null),{relation:g={}}=(0,p.useSelector)((e=>Se.ZP.selectors.getRelationToAddByViewId(e,t.id)))||{},{inRelations:b=[],outRelations:y=[]}=(0,l.useMemo)((()=>((e,t,n,r,o)=>{const{isNotDuplicatedInRelation:a,isNotDuplicatedOutRelation:l}=(0,m.xE1)(),i=t=>(0,d.pipe)((0,d.assocPath)(["startObject","objectType"],(0,m.nt9)(e,t.startObject.objectTypeURI)),(0,d.assocPath)(["endObject","objectType"],(0,m.nt9)(e,t.endObject.objectTypeURI)))(t),s=(0,m.nt9)(e,r.type),c=(0,d.propOr)({},"matchActions",t),u=(0,m.dzT)(c,s,o),[p]=u.map((e=>{let{createRelation:t}=e;return t})).filter(d.identity);return(0,d.evolve)({inRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,r,n)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(a),(0,d.map)(i)),outRelations:(0,d.pipe)((0,d.filter)((0,m.rny)(e,n,r)),(0,d.map)((0,m.V3K)(e)),(0,d.filter)(l),(0,d.map)(i))},p)||{}})(h,t,n,r,o)),[t,n,r,o,h]),{relationUri:v,relationType:w={}}=g,E=(0,d.pathOr)({},["object","attributes"],g),C=(0,l.useMemo)((()=>(0,m.xF8)(h,w)),[w,h]),x=(0,l.useMemo)((()=>Tl({attributes:E},(0,m.p2l)(g))),[g,E]),O=t.id,S=(0,l.useCallback)((0,d.pipe)(Se.N5.relations.actions.setRelationType(t.id,v),u),[t,v,u]),R=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.addAttributes,u)(e.map((e=>Tl({},e,{viewId:O}))))),[O,u]),P=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.modifyAttribute,u)(Tl({},e,{viewId:O}))),[O,u]),k=(0,l.useCallback)((e=>(0,d.pipe)(Se.N5.actions.removeAttribute,u)(Tl({},e,{viewId:O}))),[O,u]),T=(0,l.useCallback)((()=>s(v)),[v,s]),M=(0,l.useCallback)((()=>u(Se.N5.errors.actions.errorsSet([]))),[u]),j=(0,l.useCallback)((()=>{const e=(0,m.xkB)(h,{relation:g});return u(Se.N5.errors.actions.errorsSet(e)),0===e.length}),[g,h,u]),N=(0,l.useCallback)((()=>{M(),T()}),[M,T]),I=`${(0,m.idV)(r.label)} → ${(0,m.idV)(n.label)}`,A=(0,d.isEmpty)(w),D=f.current,Z=(0,l.useMemo)((()=>({element:D,priority:["top","bottom"]})),[D]);return i().createElement(Lt.Dialog,{open:a,fullWidth:!0,maxWidth:"sm",onClose:N,classes:{paper:c.dialogPaper}},i().createElement(Lt.DialogTitle,{disableTypography:!0,classes:{root:c.dialogTitle}},i().createElement(Lt.Typography,{variant:"subtitle1",classes:{root:c.titleText}},q().text("Add relationship")),i().createElement(Lt.Typography,{variant:"body2",classes:{root:c.path}},I)),i().createElement(Lt.DialogContent,{classes:{root:c.content},ref:f},i().createElement(Pl.p.Provider,{value:Z},i().createElement(Br.Z,{relation:g,metadata:h,inRelationTypes:b,outRelationTypes:y,onChange:S,applyFirstByDefault:!0}),i().createElement(Vr.Z,{className:c.attributeList,attrTypes:C,entity:x,showEmptyEditors:!0,mode:m.fO_.EDITING,parentUri:v,onAddAttributes:R,onChangeAttribute:P,onDeleteAttribute:k}))),i().createElement(Lt.DialogActions,null,i().createElement(Lt.Button,{onClick:N},q().text("Cancel")),i().createElement(Lt.Button,{disabled:A,color:"primary",onClick:()=>{const{relationType:e,startDate:t,endDate:o}=g;j()&&((0,m.DsR)({startEntityUri:n.uri,endEntityUri:r.uri,relationType:e,attributes:(0,d.pathOr)({},["object","attributes"],g),startDate:t,endDate:o}).catch(La),T())}},q().text("Add"))))};function Nl(){return Nl=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},Nl.apply(this,arguments)}const Il=e=>{const[t,n]=(0,l.useState)(!1),[r,o]=(0,l.useState)({}),a=(0,p.useDispatch)(),s=(0,l.useCallback)((t=>{let{mainEntity:r,currentEntity:l,matchRules:i}=t;const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{relation:{relationUri:(0,m.ncP)()},entity:e,isNew:!0}}(l);(0,d.pipe)(Se.N5.relations.actions.openRelationEditor(e.id),a)(s),o({mainEntity:r,currentEntity:l,matchRules:i}),n(!0)}),[e,a]),c=(0,l.useCallback)((t=>{(0,d.pipe)(Se.N5.relations.actions.closeRelationEditor,a)(e.id,t),n(!1)}),[e.id,a]),u=(0,l.useCallback)((()=>t?i().createElement(jl,Nl({config:e,open:t,onClose:c},r)):null),[t,e,c,r]);return{showDialog:t,openAddRelationDialog:s,AddRelationDialogRenderer:u}},Al=[{id:"label",get label(){return q().text("Profile name")}},{id:"matchRules",get label(){return q().text("Match rule")}},{id:"mlMatchRules",get label(){return q().text("Match IQ")},dataTypeDefinition:{type:m.oS0.TYPE_SELECT}},{id:"id",get label(){return q().text("Entity ID")}}],Dl=[{id:"score",get label(){return q().text("Match score")}}],Zl=e=>{let{fieldName:t}=e;return(0,d.pipe)(d.values,(0,d.pluck)("name"),(0,d.any)((0,d.equals)(t)))(m.S91)},Bl=e=>(0,d.flatten)(e.map((0,d.prop)("values"))).join(",");function Vl(){return Vl=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},Vl.apply(this,arguments)}const Ll=(0,l.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=d.identity}=e;const{ActionButton:o,props:a}=n;return i().createElement(o,Vl({ref:t,mode:"menuItem",onMenuClose:r},a))}));Ll.displayName="MenuItemRenderer";const zl=Ll;function Hl(){return Hl=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},Hl.apply(this,arguments)}const Fl=e=>{let{actions:t,numberOfButtons:n=2,mode:r="normal",actionButtonSize:o,classes:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const[c,u]=(0,d.splitAt)(n,t),p="normal"===r?Oe.N.button:Oe.N.iconButton,m="normal"===r?"MPlus":"S";return i().createElement(i().Fragment,null,c.map(((e,t)=>{let{ActionButton:n,props:r}=e;return i().createElement(n,Hl({key:t,mode:p,className:null==a?void 0:a.actionButton},o?{size:o}:{},r))})),u.length>0&&i().createElement(wt.Z,{buttonComponent:Ze.k,buttonProps:{icon:Ot.Z,size:m,tooltipTitle:q().text("More actions")},className:null==a?void 0:a.moreOptions,menuId:"matches-view-actions",menuItems:u,onMenuOpen:l,onMenuClose:s,MenuItemRenderer:zl}))},Wl={showTransitiveMatches:!0},_l=(0,Le.Z)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),Ul=[20,50,100],[Gl]=Ul,ql=(0,l.memo)((e=>{let{entity:t,metadata:n,filters:r,config:o}=e;const a=_l(),[s,c]=Va({field:Dl[0].id,order:"desc"},Gl),{changeRowsPerPage:u,changePage:h,toggleSort:f,setSelectedItems:g,toggleSelect:b}=s,{page:y,rowsPerPage:v,sorting:w,selectedItems:E,isGlobalSpinnerActive:S}=c,R=Wl,P=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),k=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),T=P&&!(0,m.O27)(k),{uri:M,type:j}=t||{},{showDialog:N,openAddRelationDialog:I,AddRelationDialogRenderer:A}=Il(o),D=hl(Al,Dl,n,j),[Z,B]=(0,l.useMemo)((()=>(0,d.partition)(Zl)(r)),[r]),{matches:V,total:L,entitiesMap:z,loadMatches:H}=Rl({enabled:!!M,entity:t,filter:(0,m.Uqd)()(B),page:y,sorting:w,rowsPerPage:v,options:R,rules:Bl(Z)}),{setReloadHandler:F}=ea();F((()=>{H()}));const W=(0,l.useCallback)((()=>{g([])}),[g]),_=(0,l.useCallback)((()=>{g(V)}),[g,V]);(0,C.D)((()=>{h(0),W()}),[M,R]);const U=(0,l.useMemo)((()=>(0,m.NVY)(M,Object.keys(z))),[M,z]),G=(0,Ar.C)({objectIds:U}),q=(0,l.useCallback)((e=>{let{hoveredMatch:r,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canAddRelation:u,canMark:p}=(0,m.hXd)(n,o,r.object,t,r.matchRules),h=[r.object],f=[...h,t].some(m.biM),g=[{ActionButton:Ua,show:c,props:{entity:t,entities:h}},{ActionButton:qa,show:p,props:{entity:t,entities:h}},{ActionButton:Ja,show:!f&&T,props:{entity:t,entities:h}},{ActionButton:rl,show:u&&!f,props:{mainEntity:t,currentEntity:r.object,matchRules:r.matchRules,onClick:I}}].filter((0,d.prop)("show"));return i().createElement(Fl,{actions:g,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,o,n,I,T]),$=(0,l.useMemo)((()=>V.map((e=>null==E?void 0:E.find((0,d.equals)(e)))).filter(d.identity).length),[E,V]);return i().createElement(Dr.h.Provider,{value:G},i().createElement(Zr.X.Provider,{value:z},i().createElement("div",{className:a.mainArea},i().createElement(dl,{selectedCount:$,totalCount:L,totalOnPage:V.length,sortOptions:D,sorting:w,toggleSort:f,onSelect:$?W:_}),i().createElement(vl,{entityToMatch:t,toggleSelect:b,actionButtonsRenderer:q,matches:V,metadata:n,entitiesMap:z,selectedItems:E}),i().createElement(x.Z,{rowsPerPageOptions:Ul,count:L,page:y,onChangePage:h,rowsPerPage:v,onChangeRowsPerPage:u}),S&&i().createElement(O.Z,null)),N&&i().createElement(A,null)))}));ql.displayName="MatchesView";const $l=ql;function Xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Yl=[{id:"label",get label(){return q().text("Profile name")}},{id:"id",get label(){return q().text("Entity ID")}}],Ql=(0,Le.Z)((()=>({mainArea:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"}}))),Kl=[20,50,100],[Jl]=Kl,ei=la(Yl),ti=(0,l.memo)((e=>{let{entity:t,metadata:n,filters:r,config:o}=e;const a=Ql(),[s,c]=Va({order:"asc",field:ei[0]},Jl),{changeRowsPerPage:u,changePage:h,setSelectedItems:f,toggleSelect:g,toggleSort:b}=s,{page:y,rowsPerPage:v,sorting:w,selectedItems:E,isGlobalSpinnerActive:S}=c,{uri:R,type:P}=t||{},k=(0,p.useSelector)(Se.ZP.selectors.getCanUserStartProcessFromQuery),T=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),M=k&&!(0,m.O27)(T),{matches:j,total:N,entitiesMap:I,loadNotMatches:A}=(e=>{let{entityUri:t,filter:n,sorting:r,page:o,rowsPerPage:a,enabled:i}=e;const{order:s,field:c}=r||{},{setGlobalSpinner:u}=Ta(),[d,h]=(0,l.useState)(0),[f,g]=(0,l.useState)([]),[b,y]=(0,l.useState)({}),v=(0,p.useSelector)(Se.ZP.selectors.getTenant),w=(0,p.useSelector)(Se.ZP.selectors.getDtssPath),E=(0,p.useSelector)(Se.ZP.selectors.getDataTenants),{activityFilter:C,globalFilter:x}=(0,p.useSelector)(Se.ZP.selectors.getGlobalSearchRequestOptions)||{},O=(0,l.useMemo)((()=>({dtssPath:w,dataTenants:E,entity:{uri:t},customerTenant:v,dtssRequest:m.WSA})),[w,E,t,v]),S=(0,l.useCallback)((0,m.U_T)(O,m.pg),[O]),R=(0,mo.a)(S),P=(0,oe._)(),k=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){Xl(e,t,n[t])}))}return e}({matchRules:[m.h_8]},e),T=(0,l.useCallback)((e=>{i&&(u(!0),P(R({entityUri:t,offset:o*a,max:a,filter:(0,m.vyX)(x,n)||"",sort:c,force:e,order:s,activeness:C})).then((e=>{const{response:t,total:n,originalResponse:r}=e;h(n),g(t.map(k)),t.map((e=>{let{uri:t}=e;return t})).length>0&&y((0,m.KPC)(r))})).finally((()=>u(!1))))}),[t,n,c,s,o,a,C,i,x]);return(0,l.useEffect)((()=>{T()}),[T]),{matches:f,total:d,entitiesMap:b,loadNotMatches:(0,l.useCallback)((()=>{T(!0)}),[T])}})({enabled:!!R,entityUri:R,filter:(0,m.Uqd)()(r),page:y,rowsPerPage:v,sorting:w}),D=(0,l.useMemo)((()=>(0,m.NVY)(R,Object.keys(I))),[R,I]),Z=(0,Ar.C)({objectIds:D}),B=hl(Yl,[],n,P),{setReloadHandler:V}=ea();V((()=>{A()}));const L=(0,l.useCallback)((()=>{f([])}),[f]),z=(0,l.useCallback)((()=>{f(j)}),[f,j]);(0,C.D)((()=>{h(0),L()}),[R]);const H=(0,l.useCallback)((e=>{let{hoveredMatch:r,buttonClassName:a,onActionsMenuOpen:l,onActionsMenuClose:s}=e;const{canMerge:c,canMark:u}=(0,m.hXd)(n,o,r.object,t,r.matchRules),p=[r.object],h=[...p,t].some(m.biM),f=[{ActionButton:Ua,show:c,props:{entity:t,entities:p}},{ActionButton:el,show:u,props:{entity:t,entities:p}},{ActionButton:Ja,show:!h&&M,props:{entity:t,entities:p}}].filter((0,d.prop)("show"));return i().createElement(Fl,{actions:f,classes:{actionButton:a,moreOptions:a},mode:"hover",numberOfButtons:2,onActionsMenuOpen:l,onActionsMenuClose:s})}),[t,o,n,M]),F=(0,l.useMemo)((()=>j.map((e=>null==E?void 0:E.find((0,d.equals)(e)))).filter(d.identity).length),[E,j]);return i().createElement(Dr.h.Provider,{value:Z},i().createElement(Zr.X.Provider,{value:I},i().createElement("div",{className:a.mainArea},i().createElement(dl,{selectedCount:F,totalCount:N,totalOnPage:j.length,sortOptions:B,sorting:w,toggleSort:b,onSelect:F?L:z}),i().createElement(vl,{entityToMatch:t,toggleSelect:g,actionButtonsRenderer:H,matches:j,metadata:n,selectedItems:E}),i().createElement(x.Z,{rowsPerPageOptions:Kl,count:N,page:y,onChangePage:h,rowsPerPage:v,onChangeRowsPerPage:u}),S&&i().createElement(O.Z,null))))}));ti.displayName="NotMatchView";const ni=e=>{let{entity:t,metadata:n,filters:r,config:o,activeView:a}=e;const l=(0,f.U)();return i().createElement(g.s.Provider,{value:l},(()=>{switch(a){case $o.PotentialMatches:return i().createElement($l,{entity:t,metadata:n,filters:r,config:o});case $o.FindMatches:return i().createElement(Sl,{entity:t,metadata:n,filters:r,config:o});case $o.NotAMatch:return i().createElement(ti,{entity:t,metadata:n,filters:r,config:o});default:return i().createElement("div",null)}})())};var ri=n(6782),oi=n(64731);function ai(){return ai=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},ai.apply(this,arguments)}var li=n(58970),ii=n(70215);const si=(0,Le.Z)({input:{margin:0,borderRadius:"4px",width:"100%",paddingTop:0,paddingBottom:0}}),ci=(0,Le.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0}});function ui(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){pi(e,t,n[t])}))}return e}function pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const di={FilterSelector:e=>{const{rowData:t}=e,{attribute:{attrType:n}={}}=t||{},r=(0,m.pzC)(n)?[m.j5E.EQUALS].map((e=>({value:e,label:(0,ri.Z)((0,m.XS2)(e))}))):null;return i().createElement(oi.Z,ai({},e,{options:r}))},ValuesEditor:e=>{let{rowData:t,rowContext:n}=e;const r=si(),{values:o=[],attribute:{attrType:a,fieldName:s=null}={},filter:c,id:u}=t||{},{changeFilter:p}=n,{entityType:d}=n,h=(0,l.useCallback)((e=>{p({fieldName:s,filter:c,values:e},u)}),[p,u,s,c]),f=(0,l.useMemo)((()=>({InputProps:{classes:{root:r.input}}})),[r]);return(0,m.pzC)(a)?i().createElement(li.Z,{entityType:d,name:a.name,values:o,onChange:h,TextFieldProps:f,fullWidth:!0}):i().createElement(ii.Z,{rowContext:n,rowData:t})}},mi=(0,l.memo)((e=>{var t;let{config:n}=e;const r=ci(),[o,a]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[u,h]=(0,l.useState)([]),[f,g]=(0,l.useState)(null),b=(0,p.useSelector)(Se.ZP.selectors.getMetadata),y=(0,p.useSelector)(Se.ZP.selectors.getEntity),v=(0,l.useCallback)((e=>{g((t=>t===e?null:e))}),[]),w=(0,l.useCallback)((()=>{g(null)}),[]),E=null!==f,C=(0,m.nt9)(b,null==y?void 0:y.type),x=(0,l.useMemo)((()=>(e=>(e.attributes||[]).concat(e.analyticsAttributes||[]).filter(m.Uty))(C)),[C]),O=(0,l.useMemo)((()=>[ui({},m.S91.matchRules,{check:m.Ir}),ui({},m.S91.MLRecommendedMatch,{check:m.XQO})].reduce(((e,t)=>{let{check:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["check"]);return n(C)&&e.push(r),e}),[])),[C]),S=(0,l.useMemo)((()=>[...O,...x]),[x,O]),R=(0,l.useMemo)((()=>[ui({},m.xPW.id),...x]),[x]),P=(0,l.useMemo)((()=>[{buttonProps:{id:$o.PotentialMatches,icon:Wo,tooltipTitle:q().text("Potential Matches")},headerProps:{mainTitle:q().text("Potential Matches"),rightContent:i().createElement(Lo.Z,{filters:o,onChange:a,attributeTypes:S,components:di})},filters:o},{buttonProps:{id:$o.FindMatches,icon:Uo,tooltipTitle:q().text("Find Matches")},headerProps:{mainTitle:q().text("Find Matches"),rightContent:i().createElement(Lo.Z,{filters:s,onChange:c,attributeTypes:R})},filters:s},{buttonProps:{id:$o.NotAMatch,icon:qo,tooltipTitle:q().text("Not a Match")},headerProps:{mainTitle:q().text("Not a Match"),rightContent:i().createElement(Lo.Z,{filters:u,onChange:h,attributeTypes:x})},filters:u}]),[o,s,u,S,R,x]),k=(0,l.useMemo)((()=>{var e;return ui({},null===(e=P[f])||void 0===e?void 0:e.headerProps,{onClose:w})}),[w,f,P]),T=null===(t=P[f])||void 0===t?void 0:t.filters;return i().createElement("div",{className:r.wrapper},i().createElement(zo.h,{open:E,width:480},i().createElement(al.Provider,{value:k},i().createElement(ni,{config:n,entity:y,filters:T,metadata:b,activeView:f}))),i().createElement(Ho.G,{buttonsProps:(0,d.pluck)("buttonProps",P),onButtonClick:v,activeIndexId:f}))}));mi.displayName="RightSidePanel";var hi=n(60641),fi=n(83401);const gi=(0,Le.Z)((()=>({button:{minWidth:"90px",padding:"8px 12px"}})));var bi=n(66324),yi=n(82882);function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wi=[{id:Xo.COLUMNS,tooltipTitle:q().text("Column"),title:q().text("Column"),Icon:bi.Z},{id:Xo.TABLE,tooltipTitle:q().text("Table"),title:q().text("Table"),Icon:yi.Z}],Ei=e=>{let{className:t}=e;const n=gi(),{comparisonViewMode:r,selectedItems:o}=ka(),{setComparisonViewMode:a}=Ta(),l=o.length>4;return i().createElement(fi.Z,{className:t,classes:{button:n.button},modes:wi.map((e=>e.id===Xo.COLUMNS?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){vi(e,t,n[t])}))}return e}({},e,{disabled:l,tooltipTitle:l?q().text("Column view supports maximum ${maxProfiles} profiles",{maxProfiles:4}):e.tooltipTitle}):e)),modeId:r,onChange:a})},Ci=(0,Le.Z)((e=>({header:{padding:"0 8px 0 16px",backgroundColor:"#fff","& $splitter":{height:"32px",marginRight:"16px",marginLeft:"4px",color:"rgba(0, 0, 0, 0.12)"}},title:{fontSize:"16px",fontWeight:400,lineHeight:"24px",letterSpacing:"0.15px",color:e.palette.text.primary},clearAllButton:{marginLeft:"16px"},mergeButton:{marginRight:"12px"},total:{color:e.palette.text.secondary},splitter:{},actionSplitter:{height:"32px",margin:"0 8px",color:"rgba(0, 0, 0, 0.12)"}})));var xi=n(47603);const Oi=e=>{let{items:t}=e;return i().createElement(wt.Z,{buttonComponent:Ze.k,buttonProps:{icon:xi.Z,tooltipTitle:q().text("Settings"),size:"L"},menuId:"matches-view-settings",menuItems:t})},Si=(0,d.map)((0,d.prop)("object")),Ri=e=>{let{config:t,columnsData:n,selectedColumns:r,onChangeColumns:o,showNonOv:a,onChangeShowNonOv:s}=e;const c=Ci(),u=(0,p.useSelector)(Se.ZP.selectors.getEntity),h=(0,p.useSelector)(Se.ZP.selectors.getMetadata),{selectedItems:f,limitSelection:g}=ka(),{setSelectedItems:b}=Ta(),y=Si(f),{tableViewModeAvailable:v}=t,{canMerge:w,canMark:E}=(0,m.OCS)(h,t,u,f),C=[...y,u].some(m.biM),x=(0,l.useMemo)((()=>[{ActionButton:Ua,show:w,props:{entity:u,entities:y}},{ActionButton:qa,show:E,props:{entity:u,entities:y}},{ActionButton:Ja,show:!C,props:{entity:u,entities:y}}].filter((0,d.prop)("show"))),[E,w,u,y,C]),O=0!==f.length,S=(0,l.useCallback)((()=>{s(d.not)}),[s]),R=(0,l.useMemo)((()=>[{selected:!a,selectable:!0,text:q().text("Show only OV values"),onClick:S,id:"showNonOv"}]),[S,a]);return i().createElement(zt.Z,{title:"",classes:{root:c.header}},i().createElement(Lt.Typography,{className:c.title},i().createElement("span",null,q().text("Match Review")),O&&i().createElement("span",{className:c.total}," ","(",f.length,g&&"/"+g,")")),O&&i().createElement(Lt.Button,{onClick:()=>{b([])},className:c.clearAllButton,color:"primary"},q().text("Clear All")),i().createElement(lr.Z,null),O&&i().createElement(i().Fragment,null,i().createElement(Fl,{actions:x,numberOfButtons:2}),i().createElement(Lt.Divider,{orientation:"vertical",classes:{vertical:c.actionSplitter}})),i().createElement(Oi,{items:R}),i().createElement($t.Z,{columnsData:n,selectedColumns:r,onChangeColumns:o}),v&&i().createElement(i().Fragment,null,i().createElement(Lt.Divider,{orientation:"vertical",classes:{vertical:c.splitter}}),i().createElement(Ei,null)))};var Pi=n(21077),ki=n(43600);const Ti=i().createContext({expandedMap:{},onExpandType:()=>{}});function Mi(){return Mi=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},Mi.apply(this,arguments)}Ti.displayName="ExpandedContext";const ji=e=>{const t=(0,l.forwardRef)(((t,n)=>{const{attributeType:r}=t,{expandedMap:o}=(0,l.useContext)(Ti),a=o[r.uri];return i().createElement(e,Mi({},t,{expanded:a,ref:n}))}));return t.displayName="WithExpanded",t},Ni=(0,Le.Z)({complexAttributesHeadRenderer:{height:"100%",width:"100%",display:"flex",alignItems:"flex-start"},complexAttributesHeadLabel:{flex:1,marginLeft:"5px"},arrowButton:{cursor:"pointer",marginLeft:"-3px"},attribute:{whiteSpace:"pre-wrap"},matchedAttribute:{fontWeight:500,background:"rgb(241, 248, 234)","tr:hover &":{backgroundColor:"rgb(232, 239, 225)"}}}),Ii=ji(Ke.Z),Ai=e=>{let{value:{attributeType:t,attributeValues:n,matchedValuesUris:r,showNonOv:o}}=e;const a=Ni(),s=(0,l.useMemo)((()=>({highlightedValuesUris:r,highlightedClassName:a.matchedAttribute})),[r,a.matchedAttribute]);return i().createElement("div",{className:a.attribute},i().createElement(ki.j.Provider,{value:s},i().createElement(Ii,{values:n,attributeType:t,showNonOv:o})))},Di=i().createContext({});Di.displayName="ColumnDataContext";const Zi=(0,Le.Z)({menuButtonWrapper:{display:"none",position:"absolute",top:"-4px",right:"-14px"},headCell:{display:"flex",position:"relative","th:hover &":{"& $menuButtonWrapper":{display:"block"}}},active:{display:"block"}}),Bi=e=>{let{label:t,id:n,hideable:r}=e;const o=Zi(),{setAnchor:a,setHoveredId:s,hoveredId:c}=(0,l.useContext)(Di),u=(0,l.useRef)();return i().createElement("div",{className:o.headCell},t,!1!==r&&i().createElement("div",{className:De()(o.menuButtonWrapper,{[o.active]:c===n}),ref:u},i().createElement(ct.Z,{icon:Ot.Z,onClick:()=>{a(u.current),s(n)},size:"S"})))};var Vi=n(19592);const Li=e=>{let{label:t,attributeType:n,id:r}=e;const o=Ni(),{expandedMap:a,onExpandType:s}=(0,l.useContext)(Ti),c=(0,l.useCallback)((()=>s(n.uri)),[s,n]),u=a[n.uri];return i().createElement("div",{className:o.complexAttributesHeadRenderer},i().createElement(Vi.Z,{expanded:u,onClick:c,className:o.arrowButton}),i().createElement("div",{className:o.complexAttributesHeadLabel},i().createElement(Bi,{label:t,id:r})))},zi=i().createContext({hoveredEntity:null,resetHoveredEntity:()=>{}});zi.displayName="HoveredEntityContext";const Hi=(0,l.memo)((e=>{let{value:{mainEntity:t,entity:n,matchRules:r,permission:o},onActionsMenuClose:a,onActionsMenuOpen:l,openAddRelationDialog:s,classes:c={},mode:u="hover"}=e;const{canMerge:p,canAddRelation:h,canMark:f}=o,g=[t,n].some(m.biM),b=[{ActionButton:Ua,show:p,props:{entity:t,entities:[n]}},{ActionButton:qa,show:f,props:{entity:t,entities:[n]}},{ActionButton:el,show:f,props:{entity:t,entities:[n]}},{ActionButton:Ja,show:!g,props:{entity:t,entities:[n]}},{ActionButton:rl,show:h&&!g,props:{mainEntity:t,currentEntity:n,matchRules:r,onClick:s}}].filter((0,d.prop)("show"));return i().createElement(Fl,{actions:b,numberOfButtons:2,mode:u,actionButtonSize:"XS",classes:{actionButton:c.actionButton,moreOptions:c.moreOptions},onActionsMenuClose:a,onActionsMenuOpen:l})})),Fi=(0,Le.Z)({container:{position:"relative",width:"100%",height:"140px",display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden"},hovered:{backgroundColor:"rgb(245, 245, 245)"},closeButton:{position:"absolute",zIndex:1,margin:"4px"},matchControlsContainer:{display:"flex",alignItems:"center",height:"45px",margin:"4px 8px"},rightButton:{display:"flex",alignItems:"center"},moreOptions:{marginLeft:"8px"}});function Wi(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=>"potentialMatchReview"===e.processType,Ui=i().createContext((()=>{}));Ui.displayName="WorkflowTasksAvailabilityContext";const Gi=(0,Le.Z)({container:{position:"relative",minHeight:"86px",display:"flex",overflow:"hidden",margin:"-16px"},assigneeSelector:{},assigneeContainer:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"16px 14px 16px 48px"}});function qi(){return qi=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},qi.apply(this,arguments)}const $i=(0,d.pick)(["processInstanceComments","taskId"]),Xi=e=>{let{entity:t,match:n}=e;const r=Gi(),{tasks:o,loadTasks:a}=(e=>{let{entity:t,match:n}=e;const r=(0,p.useSelector)(Se.ZP.selectors.getWorkflowPath),o=(0,p.useSelector)(Se.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,p.useSelector)(Se.ZP.selectors.getTenant),i=(0,oe._)(),{uri:s}=t,c=(0,m.ev7)(n),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)([]),b=(0,l.useCallback)((()=>{r&&c!==s&&(h(!0),i((0,m.uT0)({entityUri:s,workflowPath:r,environment:o,tenant:a})).then((e=>{const{data:t}=e,n=(0,d.propSatisfies)((0,d.includes)(c),"objectURIs"),r=(0,d.allPass)([_i,n]),o=t.filter(r);g(o)})).finally((()=>h(!1))))}),[s,o,a,r,c]);return{enabled:!!r,loading:u,tasks:f,loadTasks:b}})({entity:t,match:n}),s=(0,l.useContext)(Ui),{sendMergeAllRequest:c}=(0,bt._)({entity:t,entities:[n.object]}),{sendMarkAsNotMatchRequest:u}=(0,yt.m)({entity:t,entities:[n.object]}),h={Merge:c,NotAMatch:u};(0,l.useEffect)((()=>{a()}),[a]);const f=o[0],g=(0,m.ev7)(n);(0,l.useEffect)((()=>{null==s||s(g,!!f)}),[s,g,f]);const b=(f&&f.possibleActions||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:h[t]}})),{assignee:y,getAssignees:v,updateAssignee:w,updateRequestIsInProgress:E}=(0,vt.r)(f||{}),C=b.length>0?i().createElement(wt.Z,{buttonComponent:ct.Z,buttonProps:{icon:Ot.Z,size:"L"},menuId:"custom-actions",menuItems:b}):null;return f?i().createElement("div",{className:r.container},i().createElement(Et.Z,qi({},(e=>({date:e.dueDate,type:e.processDefinitionDisplayName,createdBy:e.createdBy,step:e.displayName}))(f),{Actions:C}),i().createElement("div",{className:r.assigneeContainer},i().createElement(Ct.Z,{className:r.assigneeSelector,enabled:!E||y,getOptions:v,onChange:w,hideSelectedOptions:!1,label:q().text("Assigned to"),value:y,defaultOptions:!0})),i().createElement(xt.V,$i(f)))):null},Yi=[{id:"profile",label:q().text("Profile name"),dataTypeDefinition:{type:m.oS0.TYPE_STRING},hideable:!1,initialWidth:280,autoResize:!1,modes:[Xo.COLUMNS,Xo.TABLE]},{id:"matchRules",label:q().text("Match method"),dataTypeDefinition:{type:m.oS0.TYPE_SELECT},hideable:!1,initialWidth:130,minWidth:130,autoResize:!1,modes:[Xo.COLUMNS,Xo.TABLE]},{id:"workflowCard",label:q().text("Workflow"),modes:[Xo.COLUMNS]},{id:"entityId",label:q().text("Entity ID"),dataTypeDefinition:{type:m.oS0.TYPE_ENTITY_ID},initialWidth:100,autoResize:!1,modes:[Xo.COLUMNS,Xo.TABLE]},{id:"score",label:q().text("Match score"),dataTypeDefinition:{type:m.oS0.TYPE_INT},initialWidth:100,modes:[Xo.TABLE]},{id:"sources",label:q().text("Sources"),modes:[Xo.COLUMNS,Xo.TABLE]},{id:"crosswalks",label:q().text("Crosswalks"),modes:[Xo.COLUMNS]}];var Qi=n(63149),Ki=n(94175);const Ji=(0,Le.Z)({itemContainer:{width:"18px",height:"18px"},item:{width:"18px",height:"18px",background:"none",fontSize:"1rem"}}),es=(0,l.memo)((e=>{let{className:t,crosswalk:n,showTooltip:r=!0}=e;const o=Ji(),a=(0,Qi.nX)(n),l=(0,p.useSelector)(Se.ZP.selectors.getMetadata)||{},s=i().createElement("div",{className:De()(o.itemContainer,t),style:{background:a}},i().createElement(Ki.Z,{sourceType:n.type,className:o.item}));return r?i().createElement(Lt.Tooltip,{title:(0,m.tH7)(l,n.type)},s):s})),ts=(0,Le.Z)({crosswalk:{marginBottom:"8px"},crosswalkIcon:{marginRight:"5px"},labelContainer:{display:"flex",alignItems:"center",width:"100%"},spacer:{flex:1}}),ns=e=>{let{attributeValue:t}=e;const n=ts(),r=(0,p.useSelector)(Se.ZP.selectors.getMetadata),o=t.value.crosswalk;return i().createElement("div",{className:n.labelContainer},i().createElement(es,{className:n.crosswalkIcon,crosswalk:o,showTooltip:!1}),i().createElement("div",null,(0,m.tH7)(r,o.type)),i().createElement("div",{className:n.spacer}),i().createElement("div",null,o.value))},rs=ji(Ke.Z),os=(0,Le.Z)({wrapper:{display:"flex",flexWrap:"wrap",marginBottom:"-8px"},crosswalkIcon:{marginRight:"5px",marginBottom:"8px"}}),as=e=>{let{value:t}=e;const n=os();return t?i().createElement("div",{className:n.wrapper},t.map((e=>i().createElement(es,{key:e.uri,className:n.crosswalkIcon,crosswalk:e})))):null};function ls(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){is(e,t,n[t])}))}return e}function is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ss={profile:{cellRenderer:e=>{let{value:{entity:t,showCloseButton:n,onClose:r,showButtons:o,config:a}}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e.value,["entity","showCloseButton","onClose","showButtons","config"]);const c=Fi(),{hoveredEntity:u,resetHoveredEntity:p}=(0,l.useContext)(zi),d=(0,m.BTI)(t)===u,{showDialog:h,openAddRelationDialog:f,AddRelationDialogRenderer:g}=Il(a),b=(0,l.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Wi(e,t,n[t])}))}return e}({},s,{entity:t})),[s,t]);return i().createElement(i().Fragment,null,i().createElement("div",{className:De()(c.container,{[c.hovered]:o&&d})},n&&i().createElement(ct.Z,{className:c.closeButton,icon:pt.default,onClick:r,size:"XXS"}),i().createElement(ut.Z,{entity:t}),o&&i().createElement("div",{className:c.matchControlsContainer},i().createElement(Hi,{mode:"normal",value:b,onActionsMenuClose:p,openAddRelationDialog:f,classes:{actionButton:c.rightButton,moreOptions:c.moreOptions}}))),h&&i().createElement(g,null))},headCellRenderer:Bi,label:""},matchRules:{cellRenderer:e=>{let{value:{metadata:t,entity:n,match:r,entitiesMap:o,show:a}}=e;return a?i().createElement(ft.Z,{entity:n,match:r,entitiesMap:o,metadata:t}):null},headCellRenderer:Bi},workflowCard:{cellRenderer:e=>{let{value:{entity:t,match:n}}=e;return i().createElement(Xi,{entity:t,match:n})},headCellRenderer:Bi},sources:{cellRenderer:as,headCellRenderer:Bi},entityId:{headCellRenderer:Bi},crosswalks:{cellRenderer:e=>{let{value:{crosswalks:t,attributeType:n}}=e;const r=ts(),o=(0,p.useSelector)(Se.ZP.selectors.getMetadata),a=(0,l.useMemo)((()=>null==t?void 0:t.map((e=>((e,t,n)=>t.attributes.reduce(((t,r)=>(r.uri===m.G39.sourceSystems.uri?t.value[r.uri]=(0,m.tH7)(n,e.type):e[r.uri]&&(t.value[r.uri]=e[r.uri]),t)),{value:{crosswalk:e},uri:e.uri}))(e,n,o)))),[o,t,n]);return a?i().createElement(rs,{values:a,attributeType:n,LabelRenderer:ns,valueContainerClassName:r.crosswalk}):null},headCellRenderer:Li,attributeType:{uri:"crosswalks",name:"crosswalks",type:"Nested",attributes:Object.values(m.G39)}}},cs=Yi.filter((e=>{let{modes:t}=e;return t.includes(Xo.COLUMNS)})).map((e=>ls({},(0,d.pick)(["id","label","hideable"],e),ss[e.id]))),us=(0,d.pipe)((0,d.split)("/"),d.last),ps=e=>(0,d.when)(d.identity,(0,d.pipe)(d.values,(0,d.chain)((0,d.chain)((0,d.cond)([[(0,d.path)(["value","uri"]),(0,d.path)(["value","uri"])],[(0,d.path)(["value","values"]),(0,d.pipe)((0,d.path)(["value","values"]),(0,d.map)((0,d.prop)("uri")))]]))),(0,d.filter)(d.identity)))(e),ds=(e,t,n,r,o,a,l,i)=>{const{object:s,isMainEntity:c,matchRules:u,matchedValues:p}=t;switch(o.id){case"entityId":return(0,m.BTI)(s);case"profile":return{mainEntity:r,showCloseButton:!c,onClose:()=>l(t),showButtons:!c,entity:s,matchRules:u,permission:(0,m.hXd)(e,a,s,r,u),config:a};case"matchRules":return{metadata:e,entity:r,match:t,entitiesMap:n,show:!c&&!!u};case"sources":return s.crosswalks;case"crosswalks":return{crosswalks:s.crosswalks,attributeType:o.attributeType};case"workflowCard":return{entity:r,match:t}}if((0,m.vZp)(o.id)){const e=(0,m.xy8)(o.attributeType),t=(0,d.pipe)((0,d.pathOr)([],[e,o.attributeType.name]),(0,d.when)((0,d.always)(!i),(0,d.filter)(m.OXP)))(s);return{attributeType:o.attributeType,attributeValues:t,matchedValuesUris:ps(p),showNonOv:i}}},ms=i().createContext((()=>{}));ms.displayName="ColumnHandlerContext";const hs=(0,d.pipe)((0,d.split)("."),(0,d.slice)(0,2),(0,d.join)(".")),fs=(0,d.pipe)((0,d.map)((0,d.when)(m.vZp,hs)),d.uniq);let gs;!function(e){e.INSERT_BELOW="below",e.INSERT_ABOVE="above",e.HIDE="hide"}(gs||(gs={}));const bs={[gs.INSERT_BELOW]:q().text("Insert row below"),[gs.INSERT_ABOVE]:q().text("Insert row above"),[gs.HIDE]:q().text("Hide row")},ys=e=>{let{open:t,anchorEl:n,onClick:r,onClose:o,actions:a}=e;return i().createElement(Lt.Popover,{open:t,anchorEl:n,onClose:o},i().createElement(Lt.List,{component:"div"},a.map(((e,t)=>((e,t,n)=>i().createElement(Lt.ListItem,{button:!0,component:"div",key:n,onClick:t},i().createElement(Lt.ListItemText,{primary:bs[e],primaryTypographyProps:{variant:"body2"}})))(e,(e=>()=>{r(e)})(e),t)))))};var vs=n(47458);function ws(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Es=(e,t)=>e.filter(t).map((e=>e.columns?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){ws(e,t,n[t])}))}return e}({},e,{columns:Es(e.columns,t)}):e)),Cs=(0,l.memo)((e=>{let{anchorEl:t,onClose:n,actions:r,id:o,selectedAttributes:a,setSelectedAttributes:s,groupColumnsData:c}=e;const u=(0,l.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Es(e,(e=>!t.some((t=>e.id===t))))}(c,a)),[c,a]),[p,d]=(0,l.useState)(),[m,h]=(0,l.useState)(!1);(0,l.useEffect)((()=>{t&&h(!0)}),[t]);const f=()=>{d(null),h(!1),n()};return i().createElement(i().Fragment,null,i().createElement(ys,{open:m,anchorEl:t,actions:r,onClose:()=>{h(!1),p||n()},onClick:e=>{if(e!==gs.HIDE)d(e),h(!1);else{const e=[...a],t=a.indexOf(o);t>-1&&(e.splice(t,1),s(e),f())}}}),i().createElement(vs.G,{hideCheckBox:!0,anchorEl:p?t:void 0,columnsData:u,selectedColumns:a,onColumnClick:e=>{let{id:t}=e;const n=[...a],r=a.indexOf(o),l=p===gs.INSERT_ABOVE?r:r+1;n.splice(l,0,t),s(n),f()},onClose:f,title:q().text("Add row")}))}));function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Os="1px solid rgba(0,0,0,0.12)",Ss="rgb(245, 245, 245)",Rs=(0,Le.Z)((e=>({container:{overflow:"auto",height:"100%",width:"100%"},comparisonTableWrapper:{display:"flex",alignItems:"flex-start",position:"relative"},collapsedRow:{display:"none"},comparisonTable:{borderSpacing:0,"& tbody tr:hover td, & tbody tr:hover th":{backgroundColor:"rgb(235, 235, 235)"},"table& tbody tr:hover td:nth-child(2)":{backgroundColor:"rgb(215, 228, 239)"},"& td, & th":{borderRight:Os,borderBottom:Os,margin:0,verticalAlign:"top",textAlign:"left",fontSize:"13px",minHeight:"16px",boxSizing:"border-box",wordBreak:"break-word",wordWrap:"break-word",backgroundColor:"white"},"& td":{minWidth:310,maxWidth:310,padding:"16px",overflow:"hidden",height:0},"& td:empty, th:empty":{padding:"0px 16px"},"& th":{minWidth:212,maxWidth:212,padding:"16px"},"& thead tr:first-child th:first-child":{borderBottom:"none",borderTop:"none"},"& td:first-child, th:first-child":{borderLeft:Os,position:"sticky",left:"0",zIndex:2,backgroundColor:Ss,color:e.palette.text.secondary,fontWeight:"normal"},"& td:nth-child(2), th:nth-child(2)":{borderRight:"2px solid rgba(0,0,0,0.12)",position:"sticky",left:"212px",zIndex:2},"& thead tr:first-child td, & thead tr:first-child th":{borderTop:"none",position:"sticky",top:"0",height:141,padding:0,zIndex:2},"& thead tr:nth-child(2) td, & thead tr:nth-child(2) th":{position:"sticky",top:"141px",height:50,padding:"16px",zIndex:2},"& thead tr:nth-child(2) th, & thead tr:nth-child(3) th":{padding:"16px",backgroundColor:Ss},"& thead tr:nth-child(-n+2) td:nth-child(-n+2), & thead tr:nth-child(-n+2) th:nth-child(-n+2)":{zIndex:3},"table& tr td:nth-child(2), th:nth-child(2)":{backgroundColor:"rgb(224, 238, 249)"}},emptyState:{position:"sticky",top:"10vh",display:"flex",width:"100%"}})));function Ps(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){ks(e,t,n[t])}))}return e}function ks(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ts=[gs.INSERT_BELOW,gs.INSERT_ABOVE,gs.HIDE],Ms=e=>{let{className:t,entity:n,metadata:r,config:o,selectedItems:a,setSelectedItems:s,selectedColumns:c,setSelectedColumns:u,entitiesMap:p={},columnsData:h,showNonOv:f=!1}=e;const g=Rs(),[b,y]=(0,l.useState)(null),[v,w]=(0,l.useState)(),[E,C]=(0,l.useState)(),x=(0,l.useMemo)((()=>a.slice(-4)),[a]),O=(0,l.useMemo)((()=>fs(c)),[c]),S=(0,l.useMemo)((()=>((e,t,n)=>n.map((n=>{const r=cs.find((e=>{let{id:t}=e;return t===n}));if(r)return r;if(!(0,m.vZp)(n))return null;const o=(0,m.h2W)(n,t.type),a=(0,m.zeJ)(e,o,t.type),l=(0,m.xy8)(o);return a?{id:`${l}.${us(o)}`,label:a.label,attributeType:a,cellRenderer:Ai,headCellRenderer:(0,m.YkM)(a)?Li:Bi}:null})).filter(d.identity))(r,n,O)),[r,n,O]),R=(0,l.useContext)(ms),P=(0,l.useMemo)((()=>function(e,t,n,r,o,a,l){let i=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return[{object:n,isMainEntity:!0}].concat(r).map((r=>t.reduce(((t,s)=>(t[s.id]=ds(e,r,o,n,s,a,l,i),ls({},t,{isDraggable:!r.isMainEntity,id:r.object.uri}))),{})))}(r,S,n,x,p,o,R,f)),[r,S,x,n,p,o,R,f]),[k,T]=(0,l.useState)({}),M=(0,l.useCallback)((e=>{T((t=>Ps({},t,{[e]:!t[e]})))}),[]),j=(0,l.useMemo)((()=>({expandedMap:k,onExpandType:M})),[M,k]),N=(0,l.useMemo)((()=>({setHoveredId:w,setAnchor:C,hoveredId:v})),[v]),I=(0,l.useCallback)((()=>{w(null),C(null)}),[]),A=(0,l.useMemo)((()=>S.map((0,d.prop)("id"))),[S]),D=(0,l.useCallback)((()=>{y(null)}),[]),Z=(0,l.useMemo)((()=>({hoveredEntity:b,resetHoveredEntity:D})),[b,D]),{isThereAnyTask:B,setWorkflowTaskAvailability:V}=(e=>{const[t,n]=(0,l.useState)({}),r=(0,l.useCallback)(((e,t)=>{n((n=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){xs(e,t,n[t])}))}return e}({},n,{[e]:t})))}),[]);return{isThereAnyTask:(0,d.pipe)((0,d.map)(m.ev7),(0,d.any)((e=>t[e])))(e),setWorkflowTaskAvailability:r}})(x),L=B?void 0:g.collapsedRow,z=(0,l.useMemo)((()=>S.map((e=>L&&"workflowCard"===e.id?Ps({},e,{rowClassName:L}):e))),[S,L]);return i().createElement("div",{className:De()(g.container,t)},i().createElement("div",{className:g.comparisonTableWrapper},i().createElement(zi.Provider,{value:Z},i().createElement(Ti.Provider,{value:j},i().createElement(Di.Provider,{value:N},i().createElement(Ui.Provider,{value:V},i().createElement(Qe.Z,{className:g.comparisonTable,rowsData:z,columnsData:P,theadRowsNumber:2,onMoveRow:(e,t)=>{const n=(0,d.pipe)((0,d.groupBy)((e=>(0,m.vZp)(e)?(0,m.hWO)(e):e)),d.toPairs)(c),r=n.findIndex((t=>{let[n]=t;return n===e})),o=n.findIndex((e=>{let[n]=e;return n===t})),a=n[r];a&&u((0,d.pipe)((0,d.remove)(r,1),(0,d.insert)(o,a),(0,d.chain)((0,d.nth)(1)))(n))},onMoveColumn:(e,t)=>{const n=a.findIndex((t=>{let{object:n}=t;return n.uri===e})),r=a.findIndex((e=>{let{object:n}=e;return n.uri===t})),o=a[n];o&&s((0,d.pipe)((0,d.remove)(n,1),(0,d.insert)(r,o))(a))},setHoveredColumn:e=>{y((null==e?void 0:e.entityId)||null)},resetHoveredColumn:D}))))),!x.length&&i().createElement("div",{className:g.emptyState},i().createElement(Pi.ZP,{LogoRenderer:Pi.B9.SELECT_ATTRIBUTES,variant:Pi.tC.embedded,text:q().text("Select profiles"),secondaryText:q().text("Select one or more profiles to compare it with the current profile")})),i().createElement(Cs,{id:v,anchorEl:E,onClose:I,actions:Ts,selectedAttributes:A,setSelectedAttributes:u,groupColumnsData:h})))},js=(0,Le.Z)({container:{display:"flex",flexDirection:"column"},table:{flex:1}}),Ns=e=>{let{classes:t={},selectedColumns:n,setSelectedColumns:r,selectedItems:o,setSelectedItems:a,config:l,metadata:s,entity:c,entitiesMap:u={},columnsData:p,showNonOv:d}=e;const m=js();return i().createElement("div",{className:De()(t.root,m.container)},i().createElement(Ms,{className:m.table,entity:c,metadata:s,config:l,selectedColumns:n,setSelectedColumns:r,selectedItems:o,setSelectedItems:a,columnsData:p,entitiesMap:u,showNonOv:d}))};function Is(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){As(e,t,n[t])}))}return e}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ds={position:"relative",whiteSpace:"pre",padding:"15px 15px 0 15px","&:last-child":{paddingBottom:"15px"},color:"rgba(0,0,0,0.87)"},Zs={content:'""',position:"absolute",right:0,top:0,width:"40px",height:"100%",background:"linear-gradient(to right, rgba(255, 255, 255, 0.2), #fff 100%)",pointerEvents:"none"},Bs=(e,t)=>({"& > *":{position:"relative"},"&::before":{content:'""',position:"absolute",right:0,top:0,width:"100%",height:"100%",background:e,pointerEvents:"none","div.hoveredRow &":{background:t||"none"}},"& $defaultWrapper::after":{background:`linear-gradient(to right, ${(0,ze.U1)(e,0)}, ${e} 100%)`,"div.hoveredRow &":{background:t&&`linear-gradient(to right, ${(0,ze.U1)(t,0)}, ${t} 100%)`}}}),Vs=(0,Le.Z)((e=>{const t=(0,ze.$n)(e.palette.primary.main,.88),n=(0,ze.$n)(e.palette.primary.main,.82),r=(0,ze.$n)("rgb(140,193,82)",.88),o=(0,ze.$n)("rgb(0, 114, 206)",.88),a={color:e.palette.primary.main,cursor:"pointer",textDecoration:"none"};return{link:a,hidden:{visibility:"hidden"},rowCloseIcon:{color:"rgba(0, 0, 0, 0.54)",margin:"0 24px 0 8px"},headCell:{display:"flex",alignItems:"center",height:"56px",fontSize:"12px",position:"relative",flex:1,overflow:"hidden",color:"rgba(0,0,0,0.87)",backgroundColor:"rgba(0, 0, 0, 0.06)","&::after":Is({},Zs,{width:"30px",backgroundImage:"none"})},firstHeadCell:{paddingLeft:"42px"},headCellWithEntity:{height:"100%",display:"flex",flexDirection:"column"},rowCell:{fontSize:"12px",overflow:"hidden"},rowCellFirstColumn:{height:"100%"},firstEntityCell:{maxHeight:"200px"},entityRowCell:{fontSize:"12px",position:"relative"},entityRowCellSelected:Bs(o),rowCellHighlighted:Bs(r),rowCellSelected:Bs(t,n),defaultWrapper:Is({},Ds,{"&::after":Is({},Zs,{"div.hoveredRow &":{background:"linear-gradient(to right, rgba(238, 238, 238, 0), rgba(238, 238, 238, 1) 100%)"}})}),hoveredDefaultWrapper:Is({},Ds),entityWrapper:{paddingLeft:"12px"},profileWrapper:{height:"100%",display:"flex",alignItems:"center",boxSizing:"border-box",position:"relative"},entityLabel:Is({},a,{fontWeight:500}),commentsContainer:{position:"absolute",right:0,top:0,zIndex:1,height:"100%",display:"flex",alignItems:"center",paddingRight:"15px",backgroundColor:"#fff","&$checked":{backgroundColor:t}},checked:{},matchRulesWrapper:{padding:"8px 15px 8px 10px",display:"flex",flexDirection:"column",boxSizing:"border-box"},blobWrapper:Is({},Ds,{whiteSpace:"pre-wrap",height:"100px",boxSizing:"border-box",overflowY:"auto",overflowX:"hidden"}),imageWrapper:Is({},Ds,{display:"flex","& > img":{height:"64px",width:"64px"}}),referenceWrapper:{display:"flex",alignItems:"center",boxSizing:"border-box",height:"48px"},entityAvatar:{transform:"scale(0.5)",marginLeft:"-10px"},collapseButton:{position:"absolute",left:"40px",zIndex:2},dragIcon:{position:"absolute",left:"-5px",zIndex:2,opacity:.38}}})),Ls=(0,fn.Z)((e=>{const t=Vs();return i().createElement("div",{className:t.headCell},i().createElement(hn.default,e))})),zs=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const r=Vs();return i().createElement("div",{className:r.defaultWrapper},i().createElement(xn.Z,{value:t,dataTypeDefinition:n}))},Hs=(0,Tn.Z)(((e,t)=>{let{onToggleSelect:n,entityToMatch:r}=e,{rowValue:o,value:a}=t;const{rawValue:l}=o;return{onRemove:()=>n(l),isRowRemovable:a!==r,entityToMatch:r}}))((e=>{let{value:t,rowIndex:n,rowValue:r,onRemove:o,entityToMatch:a,isRowSelected:s,hoverRowIndex:c}=e;const u=Vs(),p=(0,l.useContext)(Rn.B),d=t!==a,h=n===c,f=0===n,g=h?u.hoveredDefaultWrapper:u.defaultWrapper,b=t.uri!==a.uri&&!h;return i().createElement(i().Fragment,null,i().createElement("div",{className:De()(g,u.profileWrapper,u.entityWrapper,{[u.firstEntityCell]:f&&!d})},h&&i().createElement(Mn.Z,{className:u.dragIcon}),i().createElement(Pn.Z,{className:u.collapseButton,rowIndex:n,rowValue:r}),i().createElement(ct.Z,{icon:pt.default,size:"XS",className:De()(u.rowCloseIcon,{[u.hidden]:!d}),onClick:o,"data-reltio-id":`reltio-matches-table-${p?p+"-":""}checkbox-${n}`}),i().createElement(kn.Z,{value:(0,m.wwR)(t),className:u.entityLabel},(0,m.idV)(t.label)),b&&i().createElement(un.Z,{className:De()(u.commentsContainer,{[u.checked]:s}),uri:(0,m.E_P)(a.uri,t.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:a.uri,matchEntityUri:t.uri}),allowOnlyOneComment:!0})))})),Fs=(0,Tn.Z)()((0,fn.Z)((e=>{const t=0===e.headIndex,n=Vs();return i().createElement("div",{className:De()(n.headCell,{[n.firstHeadCell]:t})},i().createElement(hn.default,e))}))),Ws=e=>{let{value:t}=e;const n=Vs();if(!t)return null;const{metadata:r,match:o,entitiesMap:a,entity:l,variant:s}=t;return i().createElement("div",{className:n.matchRulesWrapper},i().createElement(ft.Z,{variant:s,metadata:r,entitiesMap:a,match:o,entity:l}))},_s=e=>{let{value:t}=e;const n=Vs();return i().createElement("div",{className:n.blobWrapper,onScroll:T.UW},t)},Us=e=>{let{value:t}=e;const n=Vs(),r=(0,m.efz)({value:t});return r&&i().createElement("div",{className:n.imageWrapper},i().createElement("img",{src:r}))},Gs=e=>{let{value:t}=e;const n=Vs(),r=(0,p.useSelector)(Se.ZP.selectors.getMetadata);return t&&i().createElement("div",{className:De()(n.defaultWrapper,n.referenceWrapper)},i().createElement(Un.Z,{className:n.entityAvatar,entityType:(0,m.nt9)(r,(0,m.CZ8)(t).type)}),i().createElement(kn.Z,{value:(0,m.CZ8)(t).objectURI,className:n.link},(0,m.idV)(t.label)))},qs=e=>{let{value:t}=e;const n=Vs();return i().createElement("div",{className:n.defaultWrapper},i().createElement(as,{value:t.crosswalks}))};function $s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Xs=(0,d.split)("."),Ys=(e,t,n,r)=>n.map((n=>{const o=n.object,a=n.matchRules||[],l=n.matchScore||0,i=(0,m.w80)(e,o.type,a),s={entity:o,metadata:e,match:n,entitiesMap:r,matchScore:l},c=t.filter((e=>{let{modes:t}=e;return!t||t.includes(Xo.TABLE)}));return(0,d.pipe)((0,d.reduce)(((e,t)=>(0,d.assoc)(t.id,((e,t)=>{let{entity:n,metadata:r,match:o,entitiesMap:a,matchScore:l}=t;switch(e.id){case"profile":return n;case"entityId":return(0,m.BTI)(n);case"matchRules":return{metadata:r,match:o,entitiesMap:a,entity:n,variant:"all"};case"score":return l;case"sources":return{crosswalks:n.crosswalks};default:{const[t,...r]=Xs(e.id);return(0,d.pipe)((0,d.prop)(t),(0,m.tT_)(r))(n)}}})(t,s),e)),{}),(0,d.assoc)("matchAttributes",i),(0,d.assoc)("rawValue",n))(c)})),Qs=e=>{if((0,m.vZp)(e)){const[,...t]=Xs(e);return t.length>1?t.slice(0,-1):null}return null},Ks=e=>{switch(e.id){case"profile":return Hs;case"matchRules":return Ws;case"sources":return qs;default:return(e=>{switch(e){case m.oS0.TYPE_BLOB:return _s;case m.oS0.TYPE_IMAGE:return Us;case m.oS0.TYPE_REFERENCE:return Gs;default:return zs}})(e.dataTypeDefinition.type)}};function Js(){return Js=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},Js.apply(this,arguments)}const ec=(0,Tn.Z)(((e,t)=>{let{selected:n}=e,{columnData:r,rowValue:o,cell:a}=t;return{isRowSelected:!!n&&n.includes(o.rawValue),isCellHighlighted:ia(o.matchAttributes,r)&&!a.values.every(m.O27)}}))((e=>{let{rowValue:t,cell:n,CellValueRenderer:r,isRowSelected:o,isCellHighlighted:a,columnIndex:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["rowValue","cell","CellValueRenderer","isRowSelected","isCellHighlighted","columnIndex"]);const c=Vs(),u=0===l;return i().createElement("div",{className:De()({[c.rowCellSelected]:o,[c.rowCellHighlighted]:a,[c.rowCellFirstColumn]:u},c.rowCell)},n.values.map(((e,n)=>i().createElement(r,Js({key:n,value:e,rowValue:t,isRowSelected:o},s)))))})),tc=(0,Le.Z)((e=>({tableContainer:{flex:1,display:"flex",color:"rgba(0,0,0,0.54)",overflow:"hidden",background:e.palette.background.paper},rowActionButtonsWrapper:{height:"100%",display:"flex",alignItems:"center",marginRight:"1px"},rowActionButtons:{backgroundColor:"rgba(238, 238, 238, 1)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},commentsContainer:{paddingLeft:"6px",paddingRight:"15px",backgroundColor:"rgba(238, 238, 238, 1)",borderLeft:"1px solid rgba(0,0,0,0.12)","&$checked":{backgroundColor:(0,ze.$n)(e.palette.primary.main,.82)}},checked:{},actionButton:{marginLeft:"12px","&:last-child":{marginRight:"3px"}},hoveredRowRightContentContainer:{alignItems:"center !important"}})));function nc(){return nc=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},nc.apply(this,arguments)}const rc=e=>{let{entity:t,matches:n,metadata:r,columnsData:o,config:a,filters:s,onFilter:c,sorting:u,onSort:p,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,entitiesMap:y,basicTableRef:v,isComparisonViewShown:w}=e;const E=tc(),[C,x]=(0,l.useState)(n);(0,l.useEffect)((()=>{x(n)}),[n]);const O=(0,l.useCallback)(((e,t)=>{x((0,d.move)(e,t)),_(t)}),[]),S=(0,l.useMemo)((()=>Ys(r,o,C,y)),[C,o,r,y]),R=!!p,P=(0,l.useMemo)((()=>((e,t)=>(0,d.pipe)((0,d.filter)((e=>{let{modes:t}=e;return!t||t.includes(Xo.TABLE)})),(0,d.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$s(e,t,n[t])}))}return e}({sortable:e},t,{resizable:!0,nestedPath:Qs(t.id),headCellRenderer:"profile"===t.id?Fs:Ls,rowCellValueRenderer:Ks(t)}))))(t))(R,o)),[o,R]),k=(0,l.useMemo)((()=>t?Ys(r,o,[{object:t}]):[]),[t,r,o]),{getRowHeight:T,CellRenderer:M}=(0,sn.Z)({rowsData:k,columnsData:P,maxRowValuesCount:3}),j=T(0),N=(0,l.useMemo)((()=>{const e=(e=>t=>n=>{const r=Vs();return i().createElement(Rn.B.Provider,{value:"tableHeader"},i().createElement("div",{className:r.headCellWithEntity},i().createElement(t,n),i().createElement(e,{className:De()(r.entityRowCell,r.entityRowCellSelected),columnId:n.headCellData.id,rowIndex:0})))})(M);return P.map((0,d.evolve)({headCellRenderer:e}))}),[P,M]),I=(0,l.useMemo)((()=>({isAllSelected:h.length>0&&h.length===n.length,entityToMatch:t,selected:h,onToggleSelect:f,onResetSelect:g,onSelectAll:b,isComparisonViewShown:w})),[t,h,f,g,b,n,w]),{getDynamicRowCellHeight:A,changeRowCellHeight:D,clearHeightsCache:Z}=(0,cn.Z)();(0,l.useLayoutEffect)(Z,[n]);const[B,V]=(0,l.useState)(!1),L=(0,l.useCallback)((()=>V(!0)),[]),z=(0,l.useCallback)((()=>V(!1)),[]),[H,F]=(0,l.useState)(!1),[W,_]=(0,l.useState)(null),U=(0,l.useCallback)((e=>{_((t=>B||H?t:e))}),[B,H]),{showDialog:G,openAddRelationDialog:q,AddRelationDialogRenderer:$}=Il(a),X=(0,l.useMemo)((()=>{if(null===W)return null;const e=C[W];if(!e)return null;const n=(0,m.hXd)(r,a,e.object,t,e.matchRules),o=h.includes(e);return i().createElement("div",{className:De()(E.rowActionButtonsWrapper)},i().createElement("div",{className:De()(E.rowActionButtons,{[E.checked]:o})},i().createElement(Hi,{value:{mainEntity:t,entity:e.object,matchRules:e.matchRules,permission:n},openAddRelationDialog:q,onActionsMenuClose:z,onActionsMenuOpen:L,classes:{actionButton:E.actionButton,moreOptions:E.actionButton}})),t&&i().createElement(un.Z,{className:De()(E.commentsContainer,{[E.checked]:o}),uri:(0,m.E_P)(t.uri,e.object.uri),objectType:m.q7e.POTENTIAL_MATCH,relatedObjectUris:(0,m.wp9)(m.q7e.POTENTIAL_MATCH,{entityUri:t.uri,matchEntityUri:e.object.uri}),onChangePopupVisibility:F,allowOnlyOneComment:!0,showAlways:!0}))}),[W,C,h,E,t,a,r,L,z,q]),Y=(0,l.useCallback)((e=>{switch(e.columnData.id){case"profile":return i().createElement(ec,nc({},e,{hoverRowIndex:W,actionsContent:X,tableRef:v}));case"matchRules":return i().createElement(pn.Z,nc({onChangeHeight:D},e),i().createElement(ec,e));default:return i().createElement(ec,e)}}),[D,W,X,v]),Q=(0,l.useCallback)((0,d.either)(A,dn.Z),[A,dn.Z]),K=(0,l.useMemo)((()=>({hoveredRowRightContentContainer:E.hoveredRowRightContentContainer})),[E]);return i().createElement("div",{className:E.tableContainer},i().createElement(mn.Z,{fixFirstColumn:!0,columnsData:N,rowsData:S,context:I,sorting:u,onSort:p,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:100,headRowHeight:56+j,renderRowCell:Y,getRowCellHeight:Q,hoverStateEnabled:!0,hoveredRowRightContent:X,hoverRowIndex:W,onRowHover:U,classes:K,maxRowValuesCount:3,dndRowReorderingEnabled:!0,dndRowReorderingHandler:O,ref:v,hoveredContentPosition:0}),G&&i().createElement($,null))},oc=(0,Le.Z)({comparisonView:{width:"100%",overflow:"auto"}});function ac(){return ac=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},ac.apply(this,arguments)}const lc=e=>{let{config:t,getSavedState:n,saveState:r}=e;const o=(0,p.useSelector)(Se.ZP.selectors.getMetadata),a=(0,p.useSelector)(Se.ZP.selectors.getEntity),{tableViewModeAvailable:s}=t,{isLoaded:c,savedState:u,updateSavedState:h}=(0,hi.w)({getSavedState:n,saveState:r,entityTypeUri:a.type}),f=(0,l.useRef)(),{selectedItems:g,entitiesMap:y,comparisonViewMode:v}=ka(),{toggleSelect:w,setSelectedItems:E,setComparisonViewMode:C}=Ta(),{isGlobalSpinnerActive:x}=Fa(),{uri:S}=a||{};((e,t)=>{const{setSelectedItems:n}=Ta(),r=(0,d.prop)("uri",t),o=(0,d.prop)("dataTenant",t),a=(0,l.useMemo)((()=>({enabled:!!r,entity:t,filter:"",page:0,sorting:{field:"score",order:"desc"},rowsPerPage:3,options:Wl})),[o,r]),{matches:i}=Rl(a);(0,l.useEffect)((()=>{n(i)}),[i,n])})(0,a);const R=(0,l.useMemo)((()=>(0,m.NVY)(S,Object.keys(y))),[S,y]),P=(0,Ar.C)({objectIds:R}),k=oc(),[T,M,j]=(e=>{let{defaultColumnsData:t,additionalColumnsData:n,metadata:r,entityTypeUri:o}=e;return(0,l.useMemo)((()=>{const e=aa(r,o),a=t.concat(n||[]).concat(e),l=(0,m.qhs)(r,o),i=((e,t)=>{const[n,r]=(0,d.pipe)((0,d.reject)(sa),(0,d.partition)(ia(e)))(t);return n.length?[{id:"match",label:q().text("Match attributes"),columns:t.filter(da(n))},{id:"all",label:q().text("All attributes"),columns:t.filter(da(r))}]:t})(l,a);return[a,i,(0,d.pipe)(ma,(0,d.concat)(t),la)(l,e)]}),[t,n,r,o])})({defaultColumnsData:Yi,metadata:o,entityTypeUri:a.type}),[N,I]=(0,l.useState)(j),[A,D]=(0,l.useState)(!1),Z=(0,l.useMemo)((()=>N.map((e=>T.find((0,d.propEq)("id",e)))).filter(d.identity)),[N,T]),B={entity:a,metadata:o,selectedItems:g||[],setSelectedItems:E,config:t,selectedColumns:N,setSelectedColumns:I,entitiesMap:y,columnsData:M,showNonOv:A},V={entity:a,metadata:o,entitiesMap:y,config:t,matches:g,columnsData:Z,onSelectAll:()=>{},onToggleSelect:w,onResetSelect:()=>{},selected:[],isComparisonViewShown:!1};return(0,l.useEffect)((()=>{c&&(f.current=u,null!=u&&u.visibleColumns&&I(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,d.pipe)((0,d.filter)((0,d.propEq)("hideable",!1)),(0,d.map)((0,d.prop)("id"))),n=(0,d.pipe)(d.concat,d.uniq),r=t(Yi);return n(r,e)}(u.visibleColumns)),null!=u&&u.comparisonViewMode&&C(s?u.comparisonViewMode:Xo.COLUMNS),(0,d.has)("showNonOv",u)&&D(u.showNonOv))}),[c]),(0,l.useEffect)((()=>{if(!c)return;const e={comparisonViewMode:v,visibleColumns:N,showNonOv:A};(0,d.equals)(e,f.current)||(h(e),f.current=e)}),[N,v,A]),i().createElement(i().Fragment,null,i().createElement(Ri,{config:t,columnsData:M,selectedColumns:N,onChangeColumns:I,showNonOv:A,onChangeShowNonOv:D}),i().createElement(Dr.h.Provider,{value:P},v===Xo.COLUMNS?i().createElement(b.l,null,i().createElement(ms.Provider,{value:w},c&&i().createElement(Ns,ac({},B,{classes:{root:k.comparisonView}})))):c&&i().createElement(rc,V)),x&&i().createElement(O.Z,null))},ic=(0,Le.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},potentialMatchesWrapper:{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1},potentialMatchesContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}})));var sc=n(81137);function cc(){return cc=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},cc.apply(this,arguments)}const uc=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return i().createElement("svg",cc({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),i().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.25 3H3.75c-.825 0-1.5.675-1.5 1.5v9c0 .825.675 1.5 1.5 1.5h10.5c.825 0 1.5-.675 1.5-1.5v-9c0-.825-.675-1.5-1.5-1.5zm-9 10.5h-1.5v-6h1.5v6zM3.75 6h1.5V4.5h-1.5V6zm6 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6zm7.5 7.5h-3v-6h3v6zm-3-7.5h3V4.5h-3V6z",fill:"#000",fillOpacity:".541"}))},pc=(0,Le.Z)({flexBox:{display:"flex",alignItems:"center"},icon:{display:"flex",alignItems:"center",margin:"0 4px"}}),dc=()=>{const{selectedItems:e,comparisonViewMode:t,limitSelection:n}=ka(),{setComparisonViewMode:r,deleteExtraMatches:o}=Ta(),a=pc(),s=(0,l.useCallback)((()=>{r(Xo.TABLE)}),[r]),c=t===Xo.COLUMNS&&e.length>n,u=q().text("Switch to table view"),p=i().createElement("div",{className:a.flexBox},q().text("Please switch to"),i().createElement("div",{className:a.icon},i().createElement(uc,null)),q().text("Table View to compare more than ${max} profiles",{max:4}));return i().createElement(sc.Z,{open:c,title:u,content:p,onSave:s,onDiscard:o,saveCaption:q().text("Proceed"),discardCaption:q().text("Cancel")})},mc=e=>{let{config:t,getSavedState:n,saveState:r}=e;const o=ic(),a=(0,p.useSelector)(Se.ZP.selectors.getEntity),{SnackbarRenderer:l,showSnackbarMessage:s}=(0,No.D)(),{tableViewModeAvailable:c}=t;return i().createElement(Pa,{tableViewModeAvailable:c},i().createElement(Jo,null,i().createElement(Io.S.Provider,{value:s},i().createElement("div",{className:o.perspectiveView},(null==a?void 0:a.uri)&&i().createElement("div",{className:o.potentialMatchesContainer},i().createElement("div",{className:o.potentialMatchesWrapper},i().createElement(Vo,null),i().createElement(lc,{config:t,getSavedState:n,saveState:r})),i().createElement(mi,{config:t}),i().createElement(l,null),c&&i().createElement(dc,null))))))};var hc=n(39450);const fc=(0,c.createGenerateClassName)({productionPrefix:"potentialMathcesView",disableGlobal:!0}),gc=e=>{let{config:t,store:n,onResize:o=d.identity,saveState:a,getSavedState:h}=e;const f=(0,l.useCallback)((0,m.aYu)(h),[h]),g=(0,l.useCallback)((0,m.DsO)(a,3e3),[a]);return i().createElement(p.Provider,{store:n},i().createElement(hc.m.Provider,{value:t.id},i().createElement(c.StylesProvider,{generateClassName:fc},i().createElement(u.MuiPickersUtilsProvider,{utils:r.Z},i().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>o(Math.floor(e),Math.floor(t))}),t&&(!1!==t.newView?i().createElement(mc,{config:t,saveState:g,getSavedState:f}):i().createElement(jo,{config:t,saveState:a,getSavedState:f})),i().createElement(ye.Z,null)))))};gc.propTypes={config:m.yxQ,store:a().object,onResize:a().func,saveState:a().func,getSavedState:a().func};const bc=gc}}]);
|
|
2
2
|
//# sourceMappingURL=2771.js.map
|