@reltio/remotes 1.4.1174 → 1.4.1177

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/6710.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6710],{30739:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),l=n(50166),o=n(44443),i=n(81403);const s=(0,n(79692).Z)({item:{overflow:"hidden"}});function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const m=(0,a.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:m,children:u,itemKey:d,showNotMeasuredItems:E,listRef:h}=e;const v=s(),g=(0,a.useRef)({}),[f,y]=(0,a.useState)({}),T=(0,a.useCallback)((0,i.DsO)((()=>{y(c({},g.current))})),[]),b=(0,a.useCallback)(((e,t)=>d?d(t,e):t),[d]),x=(0,a.useRef)(),I=h||x;I.current&&I.current.resetAfterIndex(0,!1);const O=(0,a.useMemo)((()=>e=>{let{data:t,index:n,style:a}=e;const l=b(t,n);return r().createElement("div",{style:a,className:v.item},r().createElement("div",{style:E?void 0:{visibility:l in f?void 0:"hidden"}},r().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[l]!==t&&(((e,t)=>{g.current=c({},g.current,{[e]:t})})(l,t),T())}}),u({data:t,index:n})))}),[u,E,b,T,!E&&f]);return r().createElement(l.VariableSizeList,{ref:I,width:t,height:n,itemCount:m.length,itemData:m,itemSize:e=>f[(e=>b(m,e))(e)]||p,itemKey:d},O)}))},4094:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),r=n.n(a),l=n(71153),o=n.n(l);const i=(0,n(79692).Z)({"basic-view-content":{flex:"1 1 auto",padding:"0 24px 24px","&:first-child":{paddingTop:"24px"}}});function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s.apply(this,arguments)}const c=e=>{let{children:t,className:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=i();return r().createElement("div",s({className:o()(l["basic-view-content"],n)},a),t)}},2256:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(24328),r=n.n(a);class l extends r().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},88234:(e,t,n)=>{n.d(t,{Z:()=>Ge});var a=n(94079),r=n(24328),l=n.n(r),o=n(58662),i=n(87918),s=n.n(i),c=n(30739),p=n(17440),m=n(95038),u=n.n(m);const d=(0,p.pipe)((0,p.groupBy)((e=>{let{timestamp:t}=e;return u()(t).startOf("day")})),p.toPairs,(0,p.map)((e=>{let[t,n]=e;return{timestamp:u()(t).valueOf(),collapsed:!1,children:n}}))),E=(0,p.addIndex)(p.chain)(((e,t)=>{let{children:n,collapsed:a,timestamp:r}=e;const l={collapsed:a,timestamp:r,index:t};return a?[l]:[l,...n]})),h=(0,p.has)("collapsed"),v=(e,t)=>{const n=t[e];return"uri"in n?n.uri:`${n.index}`};var g=n(34606),f=n(51229),y=n(58241),T=n(81403),b=n(79692);const x=(0,b.Z)({groupItem:{display:"flex",height:"40px",alignItems:"center",paddingTop:"10px",boxSizing:"border-box"},groupIcon:{marginLeft:"-5px",marginRight:"22px",width:"10px",height:"10px",background:"white",border:"2px solid #D8D8D8",borderRadius:"50%",boxSizing:"border-box",flexShrink:0},groupTitle:{fontWeight:500}}),I=e=>{let{item:{index:t,timestamp:n,collapsed:r},onToggle:o}=e;const i=x();return l().createElement("div",{className:i.groupItem},l().createElement("div",{className:i.groupIcon}),l().createElement(a.Typography,{className:i.groupTitle,variant:"subtitle1"},(0,T.zkt)(n)?s().text("Today"):s().date(n,"LL")),l().createElement(f.Z,null),l().createElement(y.Z,{isOpen:!r,onClick:()=>o(t)}))};var O=n(31537);const N=(0,b.Z)((e=>({activityTitle:{display:"block",fontWeight:500,fontSize:13,lineHeight:"15px",color:e.palette.text.primary,marginBottom:8,marginRight:70},activityType:{flexShrink:0,marginRight:8,whiteSpace:"nowrap"}}))),w=e=>{let{type:t,children:n}=e;const a=N();return l().createElement("span",{className:a.activityTitle},l().createElement("span",{className:a.activityType},(0,g.Xr)(t)),n)},C=e=>{let{type:t}=e;return l().createElement(w,{type:t})};var S=n(52730),R=n(59431);const D=(0,b.Z)((e=>({link:{color:"#0072CE",textDecoration:"none",fontWeight:400,cursor:"pointer"},objectLabel:{color:e.palette.text.secondary,lineHeight:"15px",fontWeight:400},relationUri:{color:e.palette.text.primary,fontWeight:400}}))),_=e=>{var t,n;let{data:a,type:r}=e;const o=D(),i=(0,S.useSelector)(R.ZP.selectors.getMetadata),s=(0,T.T6O)(i,null===(t=a.items)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.objectType);return l().createElement(w,{type:r},l().createElement("span",{className:o.objectLabel},(0,T.idV)(s)))},P=3,A=(0,r.createContext)(null),L=e=>{let{children:t}=e;const[n,a]=(0,r.useState)([]);return l().createElement(A.Provider,{value:{expandedItems:n,addExpandedItems:e=>{n.includes(e)||a((t=>[...t,e]))}}},t)},M=e=>{let{itemsId:t,items:n=[],limit:a=P}=e;const{expandedItems:l,addExpandedItems:o}=(0,r.useContext)(A),i=(0,r.useCallback)((()=>o(t)),[t]),s=l.includes(t),c=n.slice(0,s?n.length:a);return{onExpand:i,itemsToShow:c,collapsedItemsCount:n.length-c.length}};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},H.apply(this,arguments)}const j=e=>{let{itemsCount:t,itemsLabel:n}=e,r=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},l=Object.keys(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)n=l[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["itemsCount","itemsLabel"]);return l().createElement(a.Link,H({component:"button",variant:"caption"},r,{underline:"none"}),l().createElement("span",null,s().text("${itemsCount} more",{itemsCount:t})," ",n))},U=e=>{let{RecordComponent:t,items:n,activityUri:a}=e;const{onExpand:r,itemsToShow:o,collapsedItemsCount:i}=M({itemsId:a,items:n});return l().createElement(l().Fragment,null,o.map((e=>l().createElement(t,{key:e.id,item:e}))),i?l().createElement(j,{itemsCount:i,itemsLabel:1===i?s().text("record"):s().text("records"),onClick:r}):null)};var k=n(71153),Z=n.n(k),V=n(31039);const z=(0,b.Z)((e=>({link:{fontSize:13,lineHeight:"15px",color:"#0072CE",textDecoration:"none",fontWeight:400,"&.removed":{pointerEvents:"none",color:e.palette.text.secondary}}}))),G=e=>{let{item:t}=e;const n=z(),{objectLabel:a,objectUri:r,data:o}=t,i=(null==o?void 0:o.type)===O.I.ENTITY_REMOVED;return l().createElement(V.Z,{className:Z()(n.link,{removed:i}),value:r},(0,T.idV)(a))},W=(0,b.Z)((e=>({field:{fontSize:12,lineHeight:"20px",color:e.palette.text.primary,marginTop:4,display:"block"},fieldName:{color:e.palette.text.secondary,marginRight:8},link:{color:"#0072CE",textDecoration:"none",fontWeight:400}}))),B=(0,b.Z)((e=>({arrow:{margin:"0 8px",fontSize:12,color:e.palette.text.primary},chip:{height:20,width:53,fontSize:10,fontWeight:500,lineHeight:"16px",marginLeft:9,flexShrink:0,textTransform:"capitalize","& span":{padding:0},"&.edited":{color:"#6973C2",borderColor:"#6973C2"},"&.added":{color:"#75C378",borderColor:"#75C378"},"&.deleted":{color:"#F97061",borderColor:"#F97061"}},expandLabel:{fontSize:12},andLabel:{color:e.palette.text.secondary}}))),F=e=>{let{item:{id:t,data:n}}=e;const a=W(),r=B(),o=(null==n?void 0:n.potentialMatches)||(null==n?void 0:n.newUri),{onExpand:i,collapsedItemsCount:c,itemsToShow:p}=M({itemsId:t,items:o.split(",")}),m=null==n?void 0:n.type;return l().createElement("div",{className:a.field},l().createElement("span",{className:a.fieldName},(e=>({[O.I.POTENTIAL_MATCHES_FOUND]:s().text("Matches found"),[O.I.POTENTIAL_MATCHES_REMOVED]:s().text("Matches removed"),[O.I.NOT_MATCHES_SET]:s().text("Were set"),[O.I.NOT_MATCHES_RESET]:s().text("Were reset"),[O.I.ENTITIES_MERGED_MANUALLY]:s().text("Merged with"),[O.I.ENTITIES_SPLITTED]:s().text("Un-merged with")}[e]||""))(m),":"),p.map(((e,t)=>l().createElement(V.Z,{key:t,value:e,className:a.link},(0,T.idV)(n[e])))).reduce(((e,t)=>[e,", ",t])),c?l().createElement(l().Fragment,null,l().createElement("span",{className:r.andLabel}," ",s().text("and")," "),l().createElement(j,{itemsCount:c,itemsLabel:1===c?s().text("match"):s().text("matches"),onClick:i,className:r.expandLabel})):null)},K=(0,b.Z)((e=>({record:{background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",boxSizing:"border-box",borderRadius:"3px",padding:"7px 14px",marginBottom:8,position:"relative","&:hover $restoreIcon":{visibility:"visible"}},label:{color:e.palette.text.primary,fontSize:12,lineHeight:"16px"},description:{marginRight:8,flexShrink:0},restoreIcon:{visibility:"hidden",color:e.palette.text.secondary,position:"absolute",right:4,top:3,cursor:"pointer"},moreLabel:{marginTop:4}}))),$=e=>{let{item:t}=e;const n=K(),{potentialMatches:a,newUri:r}=t.data;return a||r?l().createElement("div",{className:n.record},l().createElement("span",{className:n.label},l().createElement(G,{item:t})),l().createElement(F,{item:t})):null},Y=e=>{let{type:t,data:n}=e;const{itemsTotal:a,items:r,uri:o}=n,i=1===a&&!(r[0].data.potentialMatches||r[0].data.newUri);return l().createElement("div",null,l().createElement(w,{type:t},i&&l().createElement(G,{item:r[0]})),!i&&l().createElement(U,{activityUri:o,items:r,RecordComponent:$}))},q=e=>{let{type:t,data:n}=e;return l().createElement("div",null,l().createElement(w,{type:t}),l().createElement(U,{activityUri:n.uri,items:n.items,RecordComponent:$}))};var X=n(42668),J=n(27597),Q=n(99601);const ee=e=>{var t,n;let{delta:r}=e;const o=B(),i=W(),s=(0,S.useSelector)(R.ZP.selectors.getMetadata),c=(0,T.zeJ)(s,r.attributeType),p=null===(t=r.newValue)||void 0===t?void 0:t.value,m=null===(n=r.oldValue)||void 0===n?void 0:n.value,u=m||p,d=Q.w[r.type];return l().createElement("div",{className:i.field},l().createElement("span",{className:i.fieldName},(null==c?void 0:c.label)||(null==c?void 0:c.name),":"),l().createElement("span",null,u&&(0,g._V)(u),p&&m&&l().createElement(l().Fragment,null,l().createElement(J.Z,{className:o.arrow}),(0,g._V)(p))),d&&l().createElement(a.Chip,{variant:"outlined",label:d,className:Z()(o.chip,d)}))},te=e=>{let{updates:t,recordId:n}=e;const a=K(),{onExpand:r,collapsedItemsCount:o,itemsToShow:i}=M({itemsId:n,items:t});return l().createElement(l().Fragment,null,i.map(((e,t)=>l().createElement(ee,{key:t,delta:e}))),o?l().createElement(j,{itemsCount:o,itemsLabel:1===o?s().text("update"):s().text("updates"),onClick:r,className:a.moreLabel}):null)},ne=e=>{var t;let{item:n}=e;const r=K(),o=(0,S.useDispatch)(),i=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta,c=(0,p.path)(["data","type"])(n)===O.I.ENTITY_CHANGED;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!i&&l().createElement("span",{className:r.description},s().text("Profile changed")),l().createElement(G,{item:n})),c&&l().createElement(X.Z,{className:r.restoreIcon,onClick:()=>{(0,T.fAQ)(n.objectUri,n.timestamp).then((e=>{if(-1!==e){const t={aStamp:n.timestamp,bStamp:e};o(R.ui.actions.openHistoryEvent({entityUri:n.objectUri,historyEvent:t}))}})).catch((e=>console.error(e)))}}),l().createElement(te,{updates:i,recordId:n.id}))},ae=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(G,{item:a.items[0]})),!r&&l().createElement(U,{activityUri:a.uri,items:a.items,RecordComponent:ne}))},re=(0,b.Z)((e=>({relationship:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,overflow:"hidden"},link:{color:"#0072CE",textDecoration:"none",fontWeight:400},delimiter:{margin:"0 8px"}}))),le=e=>{let{item:t}=e;const n=re(),{startObjectLabel:a,startObjectUri:r,endObjectLabel:o,endObjectUri:i}=t;return l().createElement("span",{className:n.relationship},l().createElement(V.Z,{className:n.link,value:r},(0,T.idV)(a)),l().createElement("span",{className:n.delimiter},s().text("to")),l().createElement(V.Z,{className:n.link,value:i},(0,T.idV)(o)))},oe=e=>{var t;let{item:n}=e;const r=K(),o=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta;return l().createElement("div",{className:r.record},l().createElement(a.Typography,{className:r.label},!o&&l().createElement("span",{className:r.description},s().text("Relationship updated")),l().createElement(le,{item:n})),l().createElement(te,{updates:o,recordId:n.id}))},ie=e=>{var t;let{type:n,data:a}=e;const r=1===a.itemsTotal&&!(null!==(t=a.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(w,{type:n},r&&l().createElement(le,{item:a.items[0]})),!r&&l().createElement(U,{activityUri:a.uri,items:a.items,RecordComponent:oe}))};var se=n(31276),ce=n(41188);const pe=e=>{let{data:t,type:n}=e;const a=D(),o=(0,S.useDispatch)(),i=(0,r.useMemo)((()=>{const e=(0,se.Rx)(t.description);return"2.0"===e.version?e.activity.uiState:e}),[t.description]),c=(0,p.pipe)((0,p.always)(i),R.ui.actions.openSearch,o),m=(0,ce.v)(i);return l().createElement(w,{type:n},l().createElement("span",{className:a.link,onClick:c},m||s().text("all profiles")))},me=e=>{let{type:t,data:n}=e;const a=D(),r=(0,se.Rx)(n.description),o=n.itemsTotal;return l().createElement(w,{type:t},r&&l().createElement(V.Z,{className:a.link,value:r.uri},(0,T.idV)(r.label)),o>1&&l().createElement("span",{className:a.objectLabel},s().text("(${itemsTotal} records)",{itemsTotal:o})))},ue=e=>{let{type:t,data:n}=e;const a=D(),r=(0,se.Rx)(n.description),o=n.itemsTotal,i=n.items[0].objectUri;return l().createElement(w,{type:t},l().createElement(l().Fragment,null,(0,T.bC9)(i)?l().createElement("span",{className:a.relationUri},i):l().createElement(G,{item:n.items[0]}),r&&l().createElement("div",{className:a.objectLabel},r.label)),o>1&&l().createElement("div",{className:a.objectLabel},s().text("(${itemsTotal} records)",{itemsTotal:o})))};function de(){return de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},de.apply(this,arguments)}const Ee=e=>l().createElement("svg",de({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M17.4 13.08h-4.32v4.32h-2.16v-4.32H6.6v-2.16h4.32V6.6h2.16v4.32h4.32v2.16z",fill:"#fff"}));var he=n(12147);function ve(){return ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ve.apply(this,arguments)}const ge=e=>l().createElement("svg",ve({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M16.35 6h-8.7C6.74 6 6 6.804 6 7.793v5.788c0 .986.737 1.79 1.644 1.793V18l3.472-2.626h5.234c.91 0 1.65-.805 1.65-1.793V7.793C18 6.804 17.26 6 16.35 6zm-1.562 6.726H9.212v-.765h5.576v.765zm0-1.63H9.212v-.765h5.576v.764zm0-1.631H9.212V8.7h5.576v.764z",fill:"#fff"}));function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fe.apply(this,arguments)}const ye=e=>l().createElement("svg",fe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.6 15.15v2.25h2.25l6.636-6.636-2.25-2.25L6.6 15.15zm10.626-6.126a.598.598 0 000-.846l-1.404-1.404a.598.598 0 00-.846 0l-1.098 1.098 2.25 2.25 1.098-1.098z",fill:"#fff"}));function Te(){return Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Te.apply(this,arguments)}const be=e=>l().createElement("svg",Te({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M15.6 6H9c-.662 0-1.2.539-1.2 1.2V9H9V7.2h6.6v9.6H9V15H7.8v1.8c0 .662.538 1.2 1.2 1.2h6.6c.662 0 1.2-.538 1.2-1.2V7.2c0-.661-.538-1.2-1.2-1.2z",fill:"#fff"}),l().createElement("path",{d:"M10.975 13.976l.85.848 2.823-2.83-2.824-2.819-.848.85 1.378 1.375H7.2v1.2h5.15l-1.375 1.376z",fill:"#fff"}));function xe(){return xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},xe.apply(this,arguments)}const Ie=e=>l().createElement("svg",xe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M7.4 6H14c.662 0 1.2.539 1.2 1.2V9H14V7.2H7.4v9.6H14V15h1.2v1.8c0 .662-.538 1.2-1.2 1.2H7.4c-.662 0-1.2-.538-1.2-1.2V7.2c0-.661.538-1.2 1.2-1.2z"}),l().createElement("path",{d:"M15.127 13.976l.85.848 2.823-2.83-2.824-2.819-.849.85 1.379 1.375h-5.154v1.2H16.5l-1.374 1.376z"}));function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Oe.apply(this,arguments)}const Ne=e=>l().createElement("svg",Oe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.764 11.152V9.659l2.334 2.217-2.334 2.217v-1.444H13.12c-1.023 0-1.333.314-1.918 1.632-.797 1.796-1.514 2.52-3.3 2.52h-1.69v-1.495h1.69c1.036 0 1.35-.319 1.937-1.639.348-.784.68-1.363 1.09-1.766-.41-.403-.742-.982-1.09-1.766-.586-1.32-.901-1.64-1.938-1.64H6.213V7H7.9c1.787 0 2.504.725 3.301 2.52.585 1.318.895 1.633 1.918 1.633h2.644z",fill:"#fff"}));function we(){return we=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},we.apply(this,arguments)}const Ce=e=>l().createElement("svg",we({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 15.6V7.2H8.4V6h8.4c.66 0 1.2.54 1.2 1.2v8.4h-1.2zM7.2 18c-.66 0-1.2-.54-1.2-1.2V9.6c0-.66.54-1.2 1.2-1.2h7.2c.66 0 1.2.54 1.2 1.2v7.2c0 .66-.54 1.2-1.2 1.2H7.2zm4.937-2.8l.663-.663-1.337-1.337 1.337-1.337-.663-.663-1.337 1.337L9.463 11.2l-.663.663 1.337 1.337L8.8 14.537l.663.663 1.337-1.337 1.337 1.337z",fill:"#fff"}));function Se(){return Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Se.apply(this,arguments)}const Re=e=>l().createElement("svg",Se({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 7.2v8.4H18V7.2c0-.66-.54-1.2-1.2-1.2H8.4v1.2h8.4zM6 16.8c0 .66.54 1.2 1.2 1.2h7.2c.66 0 1.2-.54 1.2-1.2V9.6c0-.66-.54-1.2-1.2-1.2H7.2c-.66 0-1.2.54-1.2 1.2v7.2z",fill:"#fff"}));function De(){return De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},De.apply(this,arguments)}const _e=e=>l().createElement("svg",De({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M11.727 5c1.66 0 3 1.376 3 3.08 0 1.704-1.34 3.08-3 3.08s-3-1.376-3-3.08c0-1.704 1.34-3.08 3-3.08zM12 19c-2.5 0-4.71-1.365-6-3.435.03-2.122 4-3.285 6-3.285 1.99 0 5.97 1.163 6 3.285C16.71 17.635 14.5 19 12 19z",fill:"#fff"}));function Pe(){return Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pe.apply(this,arguments)}const Ae=e=>l().createElement("svg",Pe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.125 7.583h2.042V8.75H8V7.583h2.042L10.625 7h2.917l.583.583zM9.75 17.5a1.17 1.17 0 01-1.167-1.167v-7h7v7a1.17 1.17 0 01-1.166 1.167H9.75z",fill:"#fff"}));function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}const Me=e=>l().createElement("svg",Le({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.432 13.358h-.568l-.197-.196a4.627 4.627 0 001.121-3.023 4.65 4.65 0 10-4.649 4.65 4.628 4.628 0 003.022-1.12l.198.195v.567L16.933 18 18 16.934l-3.568-3.576zm-4.293 0a3.218 3.218 0 11.152-.004l-.152.004z",fill:"#fff"}));function He(){return He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},He.apply(this,arguments)}const je=e=>l().createElement("svg",He({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.134 7.718L17.8 5.5V7h-1.604c-1.786 0-2.503.725-3.3 2.52-.585 1.318-.895 1.633-1.918 1.633H8.301v1.495h2.677c1.023 0 1.333.314 1.918 1.632.797 1.796 1.514 2.52 3.3 2.52h1.69v-1.495h-1.69c-1.036 0-1.35-.319-1.937-1.639-.348-.784-.68-1.363-1.09-1.766.41-.403.742-.982 1.09-1.766.586-1.32.901-1.639 1.938-1.639H17.8v1.44l2.334-2.217z",fill:"#fff"}));class Ue{}Ue.getComponent=e=>{let{type:t,data:n}=e;switch(t){case O.I.COMMENT_ADDED:case O.I.COMMENT_DELETED:case O.I.COMMENT_UPDATED:return l().createElement(C,{data:n,type:t});case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITIES_SPLITTED:case O.I.ENTITY_LOST_MERGE:return l().createElement(Y,{data:n,type:t});case O.I.POTENTIAL_MATCHES_FOUND:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.NOT_MATCHES_SET:case O.I.NOT_MATCHES_RESET:return l().createElement(q,{data:n,type:t});case O.I.ENTITY_CHANGED:case O.I.ENTITY_CREATED:case O.I.ENTITY_REMOVED:case O.I.ANALYTICS_ATTRIBUTES_CHANGED:return l().createElement(ae,{data:n,type:t});case O.I.RELATIONSHIP_CHANGED:case O.I.RELATIONSHIP_CREATED:case O.I.RELATIONSHIP_REMOVED:return l().createElement(ie,{data:n,type:t});case O.I.USER_SEARCH:return l().createElement(pe,{data:n,type:t});case O.I.GROUP_CHANGED:case O.I.GROUP_CREATED:case O.I.GROUP_REMOVED:return l().createElement(_,{data:n,type:t});case O.I.USER_LOGIN:case O.I.USER_LOGOUT:case O.I.MODEL_UPDATED:case O.I.PERIODIC_TASK_SCHEDULED:case O.I.USER_PROFILE_VIEW:return l().createElement(me,{data:n,type:t});case O.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:return l().createElement(ue,{data:n,type:t});default:return l().createElement("div",null,t," NOT IMPLEMENTED")}},Ue.getIcon=e=>{switch(e){case O.I.USER_LOGIN:return l().createElement(be,null);case O.I.USER_LOGOUT:return l().createElement(Ie,null);case O.I.USER_PROFILE_VIEW:return l().createElement(_e,null);case O.I.PERIODIC_TASK_SCHEDULED:return l().createElement(he.Z,null);case O.I.ENTITIES_SPLITTED:return l().createElement(je,null);case O.I.ENTITIES_MERGED_MANUALLY:case O.I.ENTITIES_MERGED_ON_THE_FLY:case O.I.ENTITY_LOST_MERGE:return l().createElement(Ne,null);case O.I.ENTITY_CREATED:case O.I.RELATIONSHIP_CREATED:case O.I.GROUP_CREATED:return l().createElement(Ee,null);case O.I.ENTITY_REMOVED:case O.I.RELATIONSHIP_REMOVED:case O.I.POTENTIAL_MATCHES_REMOVED:case O.I.GROUP_REMOVED:return l().createElement(Ae,null);case O.I.USER_SEARCH:return l().createElement(Me,null);case O.I.POTENTIAL_MATCHES_FOUND:return l().createElement(Re,null);case O.I.NOT_MATCHES_RESET:case O.I.NOT_MATCHES_SET:return l().createElement(Ce,null);case O.I.COMMENT_ADDED:case O.I.COMMENT_UPDATED:case O.I.COMMENT_DELETED:return l().createElement(ge,null);case O.I.ENTITY_CHANGED:case O.I.MODEL_UPDATED:case O.I.RELATIONSHIP_CHANGED:case O.I.GROUP_CHANGED:default:return l().createElement(ye,null)}};const ke=Ue,Ze=(0,b.Z)((e=>({activityItem:{display:"flex",minHeight:"40px",padding:"10px 0 5px 0",boxSizing:"border-box"},activityIcon:{marginLeft:"-13px",marginRight:"15px",width:"24px",height:"24px",background:"#4896DF",borderRadius:"50%",border:"1px solid white",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{fill:"white",fontSize:"14px"}},activityInfo:{flex:1,overflow:"hidden",position:"relative"},activityUser:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},activityEvent:{marginTop:"5px"},date:{position:"absolute",right:0,marginTop:"5px",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,marginLeft:"auto",flexShrink:0,paddingLeft:8}}))),Ve=e=>{let{item:t}=e;const n=Ze(),r=(0,g.te)(t),o=(0,p.pipe)(g.rx,(0,p.filter)(g.VV))(t);return l().createElement("div",{className:n.activityItem},l().createElement("div",{className:n.activityIcon},ke.getIcon(r)),l().createElement("div",{className:n.activityInfo},l().createElement(a.Typography,{className:n.activityUser},t.user),l().createElement("span",{className:n.date},s().date(t.timestamp,"LT")),o.map(((e,t)=>l().createElement("div",{key:t,className:n.activityEvent},ke.getComponent({type:(0,g.te)(e),data:e}))))))},ze=(0,b.Z)({rowDivider:{marginLeft:"28px"},listRow:{paddingLeft:"12px","&::before":{content:'""',width:"2px",position:"absolute",height:"100%",top:0,left:"11px",backgroundColor:"#D8D8D8",zIndex:"-1"},overflow:"hidden"},firstRow:{"&$listRow::before":{height:"calc(100% - 20px)",top:"20px"}},lastRow:{"&$listRow::before":{height:"20px"}},singleRow:{"&$listRow::before":{display:"none"}}}),Ge=e=>{let{width:t,height:n,activities:i,count:m,page:u,onChangePage:f,rowsPerPage:y,onChangeRowsPerPage:T,rowsPerPageOptions:b}=e;const x=ze(),[O,N]=(0,r.useState)([]),w=e=>{N((0,p.adjust)(e,(0,p.evolve)({collapsed:p.not})))};(0,r.useEffect)((()=>{(0,p.pipe)((0,p.filter)(g.VV),d,N)(i)}),[i]);const C=(0,r.useMemo)((()=>E(O)),[O]),S=(0,r.useCallback)((e=>{let{data:t,index:n}=e;const r=t[n];return l().createElement("div",{className:Z()(x.listRow,{[x.singleRow]:1===t.length,[x.firstRow]:0===n,[x.lastRow]:n===t.length-1})},h(r)?l().createElement(I,{item:r,onToggle:w}):l().createElement(l().Fragment,null,l().createElement(Ve,{item:r}),l().createElement(a.Divider,{className:x.rowDivider,light:!0,variant:"inset"})))}),[]);return l().createElement(l().Fragment,null,l().createElement(L,null,l().createElement(c.Z,{width:t,height:n-60,data:C,defaultItemSize:40,itemKey:v},S)),l().createElement(o.Z,{count:m,onChangePage:f,page:u,rowsPerPage:y,onChangeRowsPerPage:T,rowsPerPageOptions:b,labelRowsPerPage:s().text("Events per page:")}))}},34359:(e,t,n)=>{n.d(t,{Z:()=>Q});var a=n(24328),r=n.n(a),l=n(52730),o=n(87918),i=n.n(o),s=n(94079),c=n(36444),p=n(17440),m=n(81403),u=n(67885),d=n(34606),E=n(8818),h=n(79692);const v=(0,h.Z)((()=>({header:{width:"auto",display:"flex",alignItems:"center"},label:{paddingLeft:"7px",fontSize:"14px"},icon:{margin:"4px"},buttonsWrapper:{marginLeft:"auto",display:"flex"}}))),g=e=>{let{children:t,onToggle:n,filters:a}=e;const l=v(),o=(e=>{const t=(0,p.curry)(((e,t,n)=>n.length<=1?n[0]:`${n[0]} + ${n.length-1} ${2===n.length?e:t}`)),n=(0,p.pipe)((0,p.map)(d.Xr),t(i().text("activity"),i().text("activities")))(e.activities),a=t(i().text("user"),i().text("users"),e.users),r=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),(0,p.sortBy)(p.identity),t(i().text("type"),i().text("types")))(e.entityTypes),l=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),(0,p.sortBy)(p.identity),t(i().text("attribute"),i().text("attributes")))(e.attributes),o=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),t(i().text("source"),i().text("sources")))(e.sources);return(0,p.pipe)((0,p.reject)(p.isNil),(0,p.join)(" | "))([n,r,l,o,(e=>{const t=e=>`${(0,m.mB6)({dataTypeDefinition:{type:m.oS0.TYPE_ACTIVENESS_DATE}},e)}`;switch(e.type){case u.K.WITHIN:return i().text("Within ${amount} ${unit}",{amount:e.period[0],unit:e.period[1]});case u.K.AGO:return i().text("More than ${amount} ${unit} ago",{amount:e.period[0],unit:e.period[1]});case u.K.BETWEEN:return i().text("${startDate} to ${endDate}",{startDate:t(e.period[0]),endDate:t(e.period[1])});default:return null}})(e.dateRange),a])})(a);return r().createElement("div",{className:l.header},r().createElement(s.Typography,{variant:"body2",className:l.label},i().text("Filter:")),r().createElement(s.Tooltip,{title:o},r().createElement(s.Typography,{variant:"body2",className:l.label,color:"textSecondary",display:"block",noWrap:!0},o)),r().createElement("div",{className:l.buttonsWrapper},t,r().createElement(E.k,{icon:c.Z,size:"L",onClick:n,tooltipTitle:i().text("Filter"),className:l.icon})))};var f=n(59431),y=n(31537);const T=[y.I.ENTITY_CREATED,y.I.ENTITY_CHANGED,y.I.ENTITIES_MERGED,y.I.ENTITIES_SPLITTED,y.I.ENTITY_LOST_MERGE,y.I.RELATIONSHIP_CREATED,y.I.RELATIONSHIP_REMOVED,y.I.RELATIONSHIP_CHANGED,y.I.POTENTIAL_MATCHES_FOUND,y.I.POTENTIAL_MATCHES_REMOVED,y.I.NOT_MATCHES_SET,y.I.NOT_MATCHES_RESET,y.I.ENTITIES_MERGED_MANUALLY,y.I.ENTITIES_MERGED_ON_THE_FLY],b=[y.I.GROUP_CREATED,y.I.GROUP_REMOVED,y.I.GROUP_CHANGED],x=(e,t)=>t?T:(0,p.pipe)(Object.keys,(0,p.filter)((t=>(0,p.has)("groupTypes",e)&&!(0,p.isEmpty)(e.groupTypes)||!(0,p.includes)(t,b))))(y.I);var I=n(71153),O=n.n(I),N=n(92575),w=n(96808);function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const S={input:e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){C(e,t,n[t])}))}return e}({},e,{fontSize:"14px"})},R=(0,h.Z)({container:{padding:"12px 7px 0px",borderBottom:"solid 1px rgba(0, 0, 0, 0.12)"},labels:{fontSize:"14px"},filterSubtitle:{paddingBottom:"10px",paddingLeft:"5px"},agoLabel:{minWidth:"30px",textAlign:"end",margin:"auto"},dateOption:{display:"flex",marginRight:"30px"},dateOptionAgo:{display:"flex",marginBottom:"10px"},dateOptionWithin:{display:"flex",marginRight:"30px",marginBottom:"10px"},dateOptionLabel:{minWidth:"100px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},filterControls:{display:"flex",paddingTop:"30px",marginBottom:8},clearButton:{marginRight:"auto"},selectorWrapper:{marginBottom:"12px"},option:{fontSize:"14px",height:"32px"},selectorsGroup:{display:"flex",flexDirection:"column"},selectorHint:{fontSize:12,lineHeight:"16px",color:"rgba(0,0,0,0.54)"},divider:{marginBottom:12}}),D=e=>{let{activityTypes:t,selectedActivityTypes:n,onChange:a}=e;const l=R(),o=e=>({value:e,label:(0,d.Xr)(e)}),c=e=>e.map(o),m=n.length>1&&n.includes(y.I.ENTITY_CHANGED),u=(0,p.pipe)((0,p.sortBy)((e=>(0,d.Xr)(e))),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:O()(l.filterSubtitle,l.labels),variant:"subtitle1"},i().text("Activity")),r().createElement(N.Z,{value:c(n),onChange:(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("value"),a),options:u,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:w.Z},styles:S,classes:l,menuPlacement:"bottom"}),m&&r().createElement("span",{className:l.selectorHint},i().text("One at a time! Select a single Activity and any of its filters -OR- multiple Activities with no filters.")))};var _=n(85451),P=n(39621),A=n(31276),L=n(51843),M=n(20562);function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const j=[null,null],U=[null,"minutes"],k=e=>{let{value:t,onChange:n}=e;const l=R(),o=e=>(null==t?void 0:t.type)===e?t.period:e===u.K.WITHIN||e===u.K.AGO?U:e===u.K.BETWEEN?j:void 0,[c,m]=(0,a.useState)(o(u.K.BETWEEN)),[d,E]=(0,a.useState)(o(u.K.WITHIN)),[h,v]=(0,a.useState)(o(u.K.AGO)),g=e=>e===u.K.WITHIN?d:e===u.K.AGO?h:e===u.K.BETWEEN?c:void 0,f=e=>{(null==t?void 0:t.type)!==e&&n({period:g(e),type:e})},y=e=>{n(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){H(e,t,n[t])}))}return e}({},t,{period:e}))};return(0,M.D)((()=>{t?t.type===u.K.WITHIN?E(t.period):t.type===u.K.AGO?v(t.period):t.type===u.K.BETWEEN&&m(t.period):(m(j),E(U),v(U))}),[t]),r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:O()(l.filterSubtitle,l.labels),variant:"subtitle1"},i().text("Date")),r().createElement(s.RadioGroup,{value:(null==t?void 0:t.type)||null,onChange:(0,p.pipe)(A.NA,f)},r().createElement("div",{className:l.dateOptionWithin},r().createElement(s.FormControlLabel,{value:u.K.WITHIN,control:r().createElement(s.Radio,null),label:i().text("Within the last"),classes:{label:O()(l.dateOptionLabel,l.labels)}}),r().createElement(P.Z,{interval:d,onChange:y,onFocus:()=>f(u.K.WITHIN)})),r().createElement("div",{className:l.dateOptionAgo},r().createElement(s.FormControlLabel,{value:u.K.AGO,control:r().createElement(s.Radio,null),label:i().text("More than"),classes:{label:O()(l.dateOptionLabel,l.labels)}}),r().createElement(P.Z,{interval:h,onChange:y,onFocus:()=>f(u.K.AGO)}),r().createElement(s.Typography,{className:O()(l.agoLabel,l.labels),variant:"subtitle1"},i().text("Ago"))),r().createElement("div",{className:l.dateOption},r().createElement(s.FormControlLabel,{value:u.K.BETWEEN,control:r().createElement(s.Radio,null),label:i().text("Date range"),classes:{label:O()(l.dateOptionLabel,l.labels)}}),r().createElement(L.Z,{values:c,onChange:y,onFocus:()=>f(u.K.BETWEEN)}))))};var Z=n(27815);const V=e=>{let{entityTypes:t,selectedEntityTypes:n,onChange:a}=e;const l=R(),o=e=>({value:e.uri,label:e.label,entityType:e}),c=e=>e.map(o),m=(0,p.pipe)((0,p.sortBy)((e=>e.label)),c)(t);return r().createElement("div",{className:l.selectorWrapper},r().createElement(s.Typography,{className:O()(l.filterSubtitle,l.labels),variant:"subtitle1"},i().text("Type")),r().createElement(N.Z,{value:c(n),onChange:(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("entityType"),a),options:m,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:w.Z},styles:S,classes:l,menuPlacement:"bottom"}))},z=e=>{let{selectedSources:t,onChange:n}=e;const a=R(),o=(0,l.useSelector)(f.ZP.selectors.getMetadata),c=(0,p.sortBy)((e=>e.label))(o.sources);return r().createElement("div",{className:a.selectorWrapper},r().createElement(s.Typography,{className:O()(a.filterSubtitle,a.labels),variant:"subtitle1"},i().text("Source")),r().createElement(N.Z,{value:t,onChange:(0,p.pipe)((0,p.defaultTo)([]),n),options:c,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:a.dropDownInput}},components:{DropdownIndicator:w.Z},styles:S,classes:a,getOptionValue:(0,p.prop)("abbreviation"),menuPlacement:"bottom"}))},G=e=>{let{filter:t,entityType:n,onPropChange:a}=e;const o=R(),i=(0,l.useSelector)(f.ZP.selectors.getMetadata),{attributes:s=[],sources:c=[],entityTypes:u=[]}=t||{},d=(0,m.Ug0)(i,(0,p.map)((0,p.prop)("uri"),u)),E=n||(0,m.nt9)(i,d);return r().createElement("div",{className:o.selectorsGroup},!n&&r().createElement(V,{entityTypes:i.entityTypes,selectedEntityTypes:u,onChange:a("entityTypes")}),r().createElement(Z.Z,{selectedAttributes:s,entityType:E,onChange:a("attributes"),className:o.selectorWrapper,disableUnderline:!0}),r().createElement(z,{selectedSources:c,onChange:a("sources")}))},W=e=>{let{value:t,open:n,entityType:o,onApply:c,onCancel:m,onClear:u}=e;const d=R(),E=(0,l.useSelector)(f.ZP.selectors.getMetadata),[h,v]=(0,a.useState)(t),g=(0,p.curry)(((e,t)=>{v((0,p.pipe)((0,p.when)((0,p.always)("entityTypes"===e),(0,p.assoc)("attributes",[])),(0,p.when)((0,p.always)("activities"===e),(0,p.mergeLeft)({attributes:[],entityTypes:[],sources:[]})),(0,p.assoc)(e,t)))}));(0,M.D)((()=>{v(t)}),[t]);const{activities:T=[],dateRange:b=null,users:I=[]}=h||{},O=1===T.length&&T.includes(y.I.ENTITY_CHANGED);return n?r().createElement("div",{className:d.container},r().createElement(D,{activityTypes:x(E,o),selectedActivityTypes:T,onChange:g("activities")}),O&&r().createElement(G,{filter:h,entityType:o,onPropChange:g}),r().createElement(s.Divider,{light:!0,className:d.divider}),r().createElement(k,{value:b,onChange:g("dateRange")}),r().createElement(s.Divider,{light:!0,className:d.divider}),r().createElement(_.Z,{selectedUsers:I,onChange:g("users"),disableUnderline:!0}),r().createElement("div",{className:d.filterControls},r().createElement(s.Button,{onClick:(0,p.pipe)((()=>v(null)),u),className:d.clearButton},i().text("Clear all")),r().createElement(s.Button,{onClick:m},i().text("Cancel")),r().createElement(s.Button,{color:"primary",onClick:()=>c(h)},i().text("Apply")))):null};var B=n(28113),F=n(585),K=n(55847),$=n(56764);const Y=(0,h.Z)((e=>({snackbar:{maxWidth:500},icon:{margin:"4px"},exportButton:{color:e.palette.primary.main}}))),q=e=>{let{filters:t,exportTypes:n=[]}=e;const o=Y(),c=(0,l.useDispatch)(),[p,u]=(0,a.useState)(!1),d=(0,l.useSelector)(f.ZP.selectors.getExportPath),h=(0,l.useSelector)(f.ZP.selectors.getTenant),v=(0,a.useCallback)((e=>{const n={filter:(0,$.U)(t),fileFormat:e};(0,m.CrF)({exportPath:d,tenant:h,options:n}).then((()=>u(!0))).catch(g)}),[t,h,d]),g=e=>{console.error(e),F.Z.addError({title:i().text("Error"),message:(0,m.xU7)(e,i().text("Can't export activities"))})},y=(0,a.useCallback)((()=>{c(f.ui.actions.openConsoleApp("Export"))}),[c]),T=(0,a.useMemo)((()=>n.map((e=>({text:e.toUpperCase(),onClick:()=>v(e)})))),[n,v]);return r().createElement(r().Fragment,null,T.length?r().createElement(K.Z,{buttonComponent:E.k,buttonProps:{icon:B.Z,tooltipTitle:i().text("Export"),size:"L",className:o.icon},menuItems:T,menuId:"export-menu"}):r().createElement(E.k,{icon:B.Z,size:"L",onClick:()=>v(),tooltipTitle:i().text("Export"),className:o.icon}),r().createElement(s.Portal,{container:document.body},r().createElement(s.Snackbar,{open:p,autoHideDuration:5e3,className:o.snackbar,onClose:()=>u(!1),message:i().text("Export operation is currently in progress. You will receive an email notification once completed. Go to Export Application to view the status."),action:r().createElement(s.Button,{className:o.exportButton,onClick:y},i().text("Export application"))})))};function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){J(e,t,n[t])}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Q=e=>{let{value:t,entityType:n,entityUri:o,onChange:i,exportTypes:s}=e;const c=(0,a.useRef)(t),p=(0,l.useSelector)(f.ZP.selectors.getCanUserMakeActivitiesExport),[m,u]=(0,a.useState)(!1);return r().createElement(r().Fragment,null,r().createElement(g,{onToggle:()=>u((e=>!e)),filters:t},p&&r().createElement(q,{filters:X({},t,{entityUri:o}),exportTypes:s})),r().createElement(W,{value:t,open:m,entityType:n,onApply:e=>{(0,$.R)(e.dateRange)?i(e):i(c.current)},onCancel:()=>u(!1),onClear:()=>i(X({},c.current))}))}},99601:(e,t,n)=>{let a;n.d(t,{w:()=>a}),function(e){e.ATTRIBUTE_CHANGED="edited",e.ATTRIBUTE_ADDED="added",e.ATTRIBUTE_REMOVED="deleted"}(a||(a={}))},56764:(e,t,n)=>{n.d(t,{U:()=>f,R:()=>y});var a=n(17440),r=n(95038),l=n.n(r),o=n(67885),i=n(81403);const s=e=>t=>t.map(e).join(" or "),c=e=>`equals(user, '${(0,i.HRH)(e)}')`,p=e=>e.startsWith("USER_")||e.startsWith("COMMENT_")||e.startsWith("SFDC_")?`startsWith(label, '${e}')`:`equals(items.data.type, ${e})`,m=e=>`equals(items.delta.sources, '${e.abbreviation}')`,u=e=>`equals(items.objectType, '${e.uri}')`,d=e=>`equals(items.delta.attributeType, '${e.value}')`,E=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},h=e=>{let{type:t,period:n}=e;switch(t){case o.K.WITHIN:return`gte(timestamp, ${E(n)})`;case o.K.AGO:return`lte(timestamp, ${E(n)})`;case o.K.BETWEEN:{const[e,t]=n;return`range(timestamp, ${e.valueOf()}, ${l()(t).endOf("date").valueOf()})`}default:return""}},v=e=>[`equals(items.objectUri, '${e}')`,`equals(items.startObjectUri, '${e}')`,`equals(items.endObjectUri, '${e}')`].join(" or "),g=(0,a.cond)([[(0,a.equals)("users"),()=>s(c)],[(0,a.equals)("activities"),()=>s(p)],[(0,a.equals)("sources"),()=>s(m)],[(0,a.equals)("attributes"),()=>s(d)],[(0,a.equals)("entityTypes"),()=>s(u)],[(0,a.equals)("dateRange"),()=>h],[(0,a.equals)("entityUri"),()=>v]]),f=(0,a.pipe)((0,a.defaultTo)({}),(0,a.reject)(i.O27),a.toPairs,(0,a.map)((e=>{let[t,n]=e;return g(t)(n)})),(0,a.reject)(i.O27),(0,a.map)((e=>`(${e})`)),(0,a.join)(" and ")),y=e=>{if(e.type===o.K.AGO||e.type===o.K.WITHIN){const[t,n]=e.period;return"Number"===(0,a.type)(t)&&"String"===(0,a.type)(n)&&t>0}if(e.type===o.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}},41188:(e,t,n)=>{n.d(t,{v:()=>s});var a=n(24328),r=n(52730),l=n(59431),o=n(81403),i=n(17440);const s=e=>{const t=(0,r.useSelector)(l.ZP.selectors.getMetadata),n=(0,r.useSelector)(l.ZP.selectors.getDataTenants),s=(0,r.useSelector)(l.ZP.selectors.getAttributePresentations),c=(0,r.useSelector)(l.ZP.selectors.getLookups),{map:p}=e,m=(0,o.CL1)(e),u=(0,o.hM2)(t,n,!0,e),d=(0,o.mxe)(u,c),E=(0,r.useDispatch)();return(0,a.useEffect)((()=>{d.length>0&&(0,i.pipe)((0,i.chain)((e=>{let{type:t,codeValues:n}=e;return n.map((e=>({type:t,codeValue:e})))})),o.hK$,(0,i.andThen)((0,i.pipe)(l.N5.lookups.actions.lookupsListResolved,E)))(d)}),[e]),(0,o.ZxB)(t,s,c,u,m,p)}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6710],{27815:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),i=n(71153),s=n.n(i),c=n(17440),p=n(52730),u=n(59431),E=n(56306),m=n(94079),d=n(92575),T=n(37285),h=n(96808),g=n(7785),f=n(79692);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){I(e,t,n[t])}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y={input:e=>v({},e,{fontSize:"14px"}),menuPortal:e=>v({},e,{zIndex:1300})},b=(0,f.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const O=e=>{let{entityType:t,selectedAttributes:n,className:l,onChange:i,title:f,disableUnderline:v,menuPlacement:I="bottom"}=e;const O=(0,p.useSelector)(u.ZP.selectors.getMetadata),x=b(),N=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const a=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:a,level:t});const l=(0,E.EUG)(O,r);return e.concat(l?N(l,t+1,a):[])}),[])}),[O]),S=(0,r.useMemo)((()=>N((null==t?void 0:t.attributes)||[])),[t,N]);return a().createElement("div",{className:s()(x.root,l)},a().createElement(m.Typography,{className:x.title,variant:"subtitle1"},f||o().text("Attribute")),a().createElement(d.Z,{value:n,options:S,TextFieldProps:{InputProps:{disableUnderline:v},classes:{root:x.dropDownInput}},components:{DropdownIndicator:h.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["data"]);return a().createElement(T.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:l,innerProps:o}=e;return a().createElement("div",o,a().createElement(g.Z,{checked:n,level:r.level,data:r,label:l,labelInText:l,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),i),styles:y,classes:x,menuPlacement:I,menuPortalTarget:document.body}))}},30739:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(24328),a=n.n(r),l=n(50166),o=n(44443),i=n(56306);const s=(0,n(79692).Z)({item:{overflow:"hidden"}});function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,r.memo)((e=>{let{width:t=0,height:n=0,defaultItemSize:p,data:u,children:E,itemKey:m,showNotMeasuredItems:d,listRef:T}=e;const h=s(),g=(0,r.useRef)({}),[f,v]=(0,r.useState)({}),I=(0,r.useCallback)((0,i.DsO)((()=>{v(c({},g.current))})),[]),y=(0,r.useCallback)(((e,t)=>m?m(t,e):t),[m]),b=(0,r.useRef)(),O=T||b;O.current&&O.current.resetAfterIndex(0,!1);const x=(0,r.useMemo)((()=>e=>{let{data:t,index:n,style:r}=e;const l=y(t,n);return a().createElement("div",{style:r,className:h.item},a().createElement("div",{style:d?void 0:{visibility:l in f?void 0:"hidden"}},a().createElement(o.Z,{handleHeight:!0,onResize:(e,t)=>{g.current[l]!==t&&(((e,t)=>{g.current=c({},g.current,{[e]:t})})(l,t),I())}}),E({data:t,index:n})))}),[E,d,y,I,!d&&f]);return a().createElement(l.VariableSizeList,{ref:O,width:t,height:n,itemCount:u.length,itemData:u,itemSize:e=>f[(e=>y(u,e))(e)]||p,itemKey:m},x)}))},4094:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l);const i=(0,n(79692).Z)({"basic-view-content":{flex:"1 1 auto",padding:"0 24px 24px","&:first-child":{paddingTop:"24px"}}});function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}const c=e=>{let{children:t,className:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","className"]);const l=i();return a().createElement("div",s({className:o()(l["basic-view-content"],n)},r),t)}},39621:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(17440),o=n(87918),i=n.n(o),s=n(6782),c=n(94079),p=n(31517),u=n(31276);const E=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),m=[i().text("minutes"),i().text("hours"),i().text("days"),i().text("weeks"),i().text("months"),i().text("years")],d=e=>{let{interval:[t,n],onChange:r,onFocus:o}=e;const i=E(),d=(0,l.pipe)(u.NA,parseInt,(e=>[e,n]),r),T=(0,l.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return a().createElement("div",{className:i.root},a().createElement(c.TextField,{type:"number",value:t||"",onChange:d,inputProps:{min:1,onFocus:o},InputProps:{classes:{root:i.input}},className:i.inputNumber}),a().createElement(p.Z,{label:"",placeholder:(0,s.Z)(n),className:i.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:m.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:T,TextFieldProps:{inputProps:{onFocus:o},InputProps:{classes:{root:i.input}}}}))}},2256:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(24328),a=n.n(r);class l extends a().Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e}),console.error(e)}render(){const{children:e,error:t}=this.props;return this.state.error?t:e}}},85451:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(24328),a=n.n(r),l=n(52730),o=n(87918),i=n.n(o),s=n(17440),c=n(71153),p=n.n(c),u=n(94079),E=n(92575),m=n(96808),d=n(56306),T=n(59431),h=n(79692);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){f(e,t,n[t])}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v={input:e=>g({},e,{fontSize:"14px"}),loadingMessage:e=>g({},e,{fontSize:"14px"}),menuPortal:e=>g({},e,{zIndex:1300})},I=(0,h.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),y=e=>{let{selectedUsers:t,onChange:n,className:o,disableUnderline:c}=e;const h=I(),g=e=>({value:e,label:e}),f=e=>e.map(g),y=(0,l.useSelector)(T.ZP.selectors.getTenant),b=(0,l.useSelector)(T.ZP.selectors.getServicesPath),O=(0,r.useRef)();return a().createElement("div",{className:p()(h.root,o)},a().createElement(u.Typography,{className:h.title,variant:"subtitle1"},i().text("User")),a().createElement(E.Z,{value:f(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(O.current||(O.current=(0,d.kz_)({tenant:y,servicesPath:b})),O.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>d.P6Y.strings.search(t,e))):t)(e),f))),TextFieldProps:{InputProps:{disableUnderline:c},className:h.dropDownInput},components:{DropdownIndicator:m.Z},styles:v,classes:h,menuPortalTarget:document.body}))}},88234:(e,t,n)=>{n.d(t,{Z:()=>ze});var r=n(94079),a=n(24328),l=n.n(a),o=n(58662),i=n(87918),s=n.n(i),c=n(30739),p=n(17440),u=n(95038),E=n.n(u);const m=(0,p.pipe)((0,p.groupBy)((e=>{let{timestamp:t}=e;return E()(t).startOf("day")})),p.toPairs,(0,p.map)((e=>{let[t,n]=e;return{timestamp:E()(t).valueOf(),collapsed:!1,children:n}}))),d=(0,p.addIndex)(p.chain)(((e,t)=>{let{children:n,collapsed:r,timestamp:a}=e;const l={collapsed:r,timestamp:a,index:t};return r?[l]:[l,...n]})),T=(0,p.has)("collapsed"),h=(e,t)=>{const n=t[e];return"uri"in n?n.uri:`${n.index}`};var g=n(34606),f=n(51229),v=n(58241),I=n(56306),y=n(79692);const b=(0,y.Z)({groupItem:{display:"flex",height:"40px",alignItems:"center",paddingTop:"10px",boxSizing:"border-box"},groupIcon:{marginLeft:"-5px",marginRight:"22px",width:"10px",height:"10px",background:"white",border:"2px solid #D8D8D8",borderRadius:"50%",boxSizing:"border-box",flexShrink:0},groupTitle:{fontWeight:500}}),O=e=>{let{item:{index:t,timestamp:n,collapsed:a},onToggle:o}=e;const i=b();return l().createElement("div",{className:i.groupItem},l().createElement("div",{className:i.groupIcon}),l().createElement(r.Typography,{className:i.groupTitle,variant:"subtitle1"},(0,I.zkt)(n)?s().text("Today"):s().date(n,"LL")),l().createElement(f.Z,null),l().createElement(v.Z,{isOpen:!a,onClick:()=>o(t)}))};var x=n(31537);const N=(0,y.Z)((e=>({activityTitle:{display:"block",fontWeight:500,fontSize:13,lineHeight:"15px",color:e.palette.text.primary,marginBottom:8,marginRight:70},activityType:{flexShrink:0,marginRight:8,whiteSpace:"nowrap"}}))),S=e=>{let{type:t,children:n}=e;const r=N();return l().createElement("span",{className:r.activityTitle},l().createElement("span",{className:r.activityType},(0,g.Xr)(t)),n)},_=e=>{let{type:t}=e;return l().createElement(S,{type:t})};var C=n(52730),D=n(59431);const R=(0,y.Z)((e=>({link:{color:"#0072CE",textDecoration:"none",fontWeight:400,cursor:"pointer"},objectLabel:{color:e.palette.text.secondary,lineHeight:"15px",fontWeight:400},relationUri:{color:e.palette.text.primary,fontWeight:400}}))),w=e=>{var t,n;let{data:r,type:a}=e;const o=R(),i=(0,C.useSelector)(D.ZP.selectors.getMetadata),s=(0,I.T6O)(i,null===(t=r.items)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.objectType);return l().createElement(S,{type:a},l().createElement("span",{className:o.objectLabel},(0,I.idV)(s)))},P=3,A=(0,a.createContext)(null),M=e=>{let{children:t}=e;const[n,r]=(0,a.useState)([]);return l().createElement(A.Provider,{value:{expandedItems:n,addExpandedItems:e=>{n.includes(e)||r((t=>[...t,e]))}}},t)},L=e=>{let{itemsId:t,items:n=[],limit:r=P}=e;const{expandedItems:l,addExpandedItems:o}=(0,a.useContext)(A),i=(0,a.useCallback)((()=>o(t)),[t]),s=l.includes(t),c=n.slice(0,s?n.length:r);return{onExpand:i,itemsToShow:c,collapsedItemsCount:n.length-c.length}};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(this,arguments)}const U=e=>{let{itemsCount:t,itemsLabel:n}=e,a=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["itemsCount","itemsLabel"]);return l().createElement(r.Link,H({component:"button",variant:"caption"},a,{underline:"none"}),l().createElement("span",null,s().text("${itemsCount} more",{itemsCount:t})," ",n))},j=e=>{let{RecordComponent:t,items:n,activityUri:r}=e;const{onExpand:a,itemsToShow:o,collapsedItemsCount:i}=L({itemsId:r,items:n});return l().createElement(l().Fragment,null,o.map((e=>l().createElement(t,{key:e.id,item:e}))),i?l().createElement(U,{itemsCount:i,itemsLabel:1===i?s().text("record"):s().text("records"),onClick:a}):null)};var G=n(71153),k=n.n(G),Z=n(31039);const V=(0,y.Z)((e=>({link:{fontSize:13,lineHeight:"15px",color:"#0072CE",textDecoration:"none",fontWeight:400,"&.removed":{pointerEvents:"none",color:e.palette.text.secondary}}}))),z=e=>{let{item:t}=e;const n=V(),{objectLabel:r,objectUri:a,data:o}=t,i=(null==o?void 0:o.type)===x.I.ENTITY_REMOVED;return l().createElement(Z.Z,{className:k()(n.link,{removed:i}),value:a},(0,I.idV)(r))},F=(0,y.Z)((e=>({field:{fontSize:12,lineHeight:"20px",color:e.palette.text.primary,marginTop:4,display:"block"},fieldName:{color:e.palette.text.secondary,marginRight:8},link:{color:"#0072CE",textDecoration:"none",fontWeight:400}}))),W=(0,y.Z)((e=>({arrow:{margin:"0 8px",fontSize:12,color:e.palette.text.primary},chip:{height:20,width:53,fontSize:10,fontWeight:500,lineHeight:"16px",marginLeft:9,flexShrink:0,textTransform:"capitalize","& span":{padding:0},"&.edited":{color:"#6973C2",borderColor:"#6973C2"},"&.added":{color:"#75C378",borderColor:"#75C378"},"&.deleted":{color:"#F97061",borderColor:"#F97061"}},expandLabel:{fontSize:12},andLabel:{color:e.palette.text.secondary}}))),B=e=>{let{item:{id:t,data:n}}=e;const r=F(),a=W(),o=(null==n?void 0:n.potentialMatches)||(null==n?void 0:n.newUri),{onExpand:i,collapsedItemsCount:c,itemsToShow:p}=L({itemsId:t,items:o.split(",")}),u=null==n?void 0:n.type;return l().createElement("div",{className:r.field},l().createElement("span",{className:r.fieldName},(e=>({[x.I.POTENTIAL_MATCHES_FOUND]:s().text("Matches found"),[x.I.POTENTIAL_MATCHES_REMOVED]:s().text("Matches removed"),[x.I.NOT_MATCHES_SET]:s().text("Were set"),[x.I.NOT_MATCHES_RESET]:s().text("Were reset"),[x.I.ENTITIES_MERGED_MANUALLY]:s().text("Merged with"),[x.I.ENTITIES_SPLITTED]:s().text("Un-merged with")}[e]||""))(u),":"),p.map(((e,t)=>l().createElement(Z.Z,{key:t,value:e,className:r.link},(0,I.idV)(n[e])))).reduce(((e,t)=>[e,", ",t])),c?l().createElement(l().Fragment,null,l().createElement("span",{className:a.andLabel}," ",s().text("and")," "),l().createElement(U,{itemsCount:c,itemsLabel:1===c?s().text("match"):s().text("matches"),onClick:i,className:a.expandLabel})):null)},Y=(0,y.Z)((e=>({record:{background:"rgba(0, 0, 0, 0.03)",border:"1px solid rgba(0, 0, 0, 0.03)",boxSizing:"border-box",borderRadius:"3px",padding:"7px 14px",marginBottom:8,position:"relative","&:hover $restoreIcon":{visibility:"visible"}},label:{color:e.palette.text.primary,fontSize:12,lineHeight:"16px"},description:{marginRight:8,flexShrink:0},restoreIcon:{visibility:"hidden",color:e.palette.text.secondary,position:"absolute",right:4,top:3,cursor:"pointer"},moreLabel:{marginTop:4}}))),$=e=>{let{item:t}=e;const n=Y(),{potentialMatches:r,newUri:a}=t.data;return r||a?l().createElement("div",{className:n.record},l().createElement("span",{className:n.label},l().createElement(z,{item:t})),l().createElement(B,{item:t})):null},K=e=>{let{type:t,data:n}=e;const{itemsTotal:r,items:a,uri:o}=n,i=1===r&&!(a[0].data.potentialMatches||a[0].data.newUri);return l().createElement("div",null,l().createElement(S,{type:t},i&&l().createElement(z,{item:a[0]})),!i&&l().createElement(j,{activityUri:o,items:a,RecordComponent:$}))},q=e=>{let{type:t,data:n}=e;return l().createElement("div",null,l().createElement(S,{type:t}),l().createElement(j,{activityUri:n.uri,items:n.items,RecordComponent:$}))};var X=n(42668),J=n(27597),Q=n(99601);const ee=e=>{var t,n;let{delta:a}=e;const o=W(),i=F(),s=(0,C.useSelector)(D.ZP.selectors.getMetadata),c=(0,I.zeJ)(s,a.attributeType),p=null===(t=a.newValue)||void 0===t?void 0:t.value,u=null===(n=a.oldValue)||void 0===n?void 0:n.value,E=u||p,m=Q.w[a.type];return l().createElement("div",{className:i.field},l().createElement("span",{className:i.fieldName},(null==c?void 0:c.label)||(null==c?void 0:c.name),":"),l().createElement("span",null,E&&(0,g._V)(E),p&&u&&l().createElement(l().Fragment,null,l().createElement(J.Z,{className:o.arrow}),(0,g._V)(p))),m&&l().createElement(r.Chip,{variant:"outlined",label:m,className:k()(o.chip,m)}))},te=e=>{let{updates:t,recordId:n}=e;const r=Y(),{onExpand:a,collapsedItemsCount:o,itemsToShow:i}=L({itemsId:n,items:t});return l().createElement(l().Fragment,null,i.map(((e,t)=>l().createElement(ee,{key:t,delta:e}))),o?l().createElement(U,{itemsCount:o,itemsLabel:1===o?s().text("update"):s().text("updates"),onClick:a,className:r.moreLabel}):null)},ne=e=>{var t;let{item:n}=e;const a=Y(),o=(0,C.useDispatch)(),i=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta,c=(0,p.path)(["data","type"])(n)===x.I.ENTITY_CHANGED;return l().createElement("div",{className:a.record},l().createElement(r.Typography,{className:a.label},!i&&l().createElement("span",{className:a.description},s().text("Profile changed")),l().createElement(z,{item:n})),c&&l().createElement(X.Z,{className:a.restoreIcon,onClick:()=>{(0,I.fAQ)(n.objectUri,n.timestamp).then((e=>{if(-1!==e){const t={aStamp:n.timestamp,bStamp:e};o(D.ui.actions.openHistoryEvent({entityUri:n.objectUri,historyEvent:t}))}})).catch((e=>console.error(e)))}}),l().createElement(te,{updates:i,recordId:n.id}))},re=e=>{var t;let{type:n,data:r}=e;const a=1===r.itemsTotal&&!(null!==(t=r.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(S,{type:n},a&&l().createElement(z,{item:r.items[0]})),!a&&l().createElement(j,{activityUri:r.uri,items:r.items,RecordComponent:ne}))},ae=(0,y.Z)((e=>({relationship:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,overflow:"hidden"},link:{color:"#0072CE",textDecoration:"none",fontWeight:400},delimiter:{margin:"0 8px"}}))),le=e=>{let{item:t}=e;const n=ae(),{startObjectLabel:r,startObjectUri:a,endObjectLabel:o,endObjectUri:i}=t;return l().createElement("span",{className:n.relationship},l().createElement(Z.Z,{className:n.link,value:a},(0,I.idV)(r)),l().createElement("span",{className:n.delimiter},s().text("to")),l().createElement(Z.Z,{className:n.link,value:i},(0,I.idV)(o)))},oe=e=>{var t;let{item:n}=e;const a=Y(),o=null===(t=n.deltaCollection)||void 0===t?void 0:t.delta;return l().createElement("div",{className:a.record},l().createElement(r.Typography,{className:a.label},!o&&l().createElement("span",{className:a.description},s().text("Relationship updated")),l().createElement(le,{item:n})),l().createElement(te,{updates:o,recordId:n.id}))},ie=e=>{var t;let{type:n,data:r}=e;const a=1===r.itemsTotal&&!(null!==(t=r.items[0].deltaCollection)&&void 0!==t&&t.delta);return l().createElement("div",null,l().createElement(S,{type:n},a&&l().createElement(le,{item:r.items[0]})),!a&&l().createElement(j,{activityUri:r.uri,items:r.items,RecordComponent:oe}))};var se=n(31276),ce=n(41188);const pe=e=>{let{data:t,type:n}=e;const r=R(),o=(0,C.useDispatch)(),i=(0,a.useMemo)((()=>{const e=(0,se.Rx)(t.description);return"2.0"===e.version?e.activity.uiState:e}),[t.description]),c=(0,p.pipe)((0,p.always)(i),D.ui.actions.openSearch,o),u=(0,ce.v)(i);return l().createElement(S,{type:n},l().createElement("span",{className:r.link,onClick:c},u||s().text("all profiles")))},ue=e=>{let{type:t,data:n}=e;const r=R(),a=(0,se.Rx)(n.description),o=n.itemsTotal;return l().createElement(S,{type:t},a&&l().createElement(Z.Z,{className:r.link,value:a.uri},(0,I.idV)(a.label)),o>1&&l().createElement("span",{className:r.objectLabel},s().text("(${itemsTotal} records)",{itemsTotal:o})))},Ee=e=>{let{type:t,data:n}=e;const r=R(),a=(0,se.Rx)(n.description),o=n.itemsTotal,i=n.items[0].objectUri;return l().createElement(S,{type:t},l().createElement(l().Fragment,null,(0,I.bC9)(i)?l().createElement("span",{className:r.relationUri},i):l().createElement(z,{item:n.items[0]}),a&&l().createElement("div",{className:r.objectLabel},a.label)),o>1&&l().createElement("div",{className:r.objectLabel},s().text("(${itemsTotal} records)",{itemsTotal:o})))};function me(){return me=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},me.apply(this,arguments)}const de=e=>l().createElement("svg",me({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M17.4 13.08h-4.32v4.32h-2.16v-4.32H6.6v-2.16h4.32V6.6h2.16v4.32h4.32v2.16z",fill:"#fff"}));var Te=n(12147);function he(){return he=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},he.apply(this,arguments)}const ge=e=>l().createElement("svg",he({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M16.35 6h-8.7C6.74 6 6 6.804 6 7.793v5.788c0 .986.737 1.79 1.644 1.793V18l3.472-2.626h5.234c.91 0 1.65-.805 1.65-1.793V7.793C18 6.804 17.26 6 16.35 6zm-1.562 6.726H9.212v-.765h5.576v.765zm0-1.63H9.212v-.765h5.576v.764zm0-1.631H9.212V8.7h5.576v.764z",fill:"#fff"}));function fe(){return fe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fe.apply(this,arguments)}const ve=e=>l().createElement("svg",fe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.6 15.15v2.25h2.25l6.636-6.636-2.25-2.25L6.6 15.15zm10.626-6.126a.598.598 0 000-.846l-1.404-1.404a.598.598 0 00-.846 0l-1.098 1.098 2.25 2.25 1.098-1.098z",fill:"#fff"}));function Ie(){return Ie=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},Ie.apply(this,arguments)}const ye=e=>l().createElement("svg",Ie({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M15.6 6H9c-.662 0-1.2.539-1.2 1.2V9H9V7.2h6.6v9.6H9V15H7.8v1.8c0 .662.538 1.2 1.2 1.2h6.6c.662 0 1.2-.538 1.2-1.2V7.2c0-.661-.538-1.2-1.2-1.2z",fill:"#fff"}),l().createElement("path",{d:"M10.975 13.976l.85.848 2.823-2.83-2.824-2.819-.848.85 1.378 1.375H7.2v1.2h5.15l-1.375 1.376z",fill:"#fff"}));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 Oe=e=>l().createElement("svg",be({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M7.4 6H14c.662 0 1.2.539 1.2 1.2V9H14V7.2H7.4v9.6H14V15h1.2v1.8c0 .662-.538 1.2-1.2 1.2H7.4c-.662 0-1.2-.538-1.2-1.2V7.2c0-.661.538-1.2 1.2-1.2z"}),l().createElement("path",{d:"M15.127 13.976l.85.848 2.823-2.83-2.824-2.819-.849.85 1.379 1.375h-5.154v1.2H16.5l-1.374 1.376z"}));function xe(){return xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(this,arguments)}const Ne=e=>l().createElement("svg",xe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.764 11.152V9.659l2.334 2.217-2.334 2.217v-1.444H13.12c-1.023 0-1.333.314-1.918 1.632-.797 1.796-1.514 2.52-3.3 2.52h-1.69v-1.495h1.69c1.036 0 1.35-.319 1.937-1.639.348-.784.68-1.363 1.09-1.766-.41-.403-.742-.982-1.09-1.766-.586-1.32-.901-1.64-1.938-1.64H6.213V7H7.9c1.787 0 2.504.725 3.301 2.52.585 1.318.895 1.633 1.918 1.633h2.644z",fill:"#fff"}));function Se(){return Se=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},Se.apply(this,arguments)}const _e=e=>l().createElement("svg",Se({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 15.6V7.2H8.4V6h8.4c.66 0 1.2.54 1.2 1.2v8.4h-1.2zM7.2 18c-.66 0-1.2-.54-1.2-1.2V9.6c0-.66.54-1.2 1.2-1.2h7.2c.66 0 1.2.54 1.2 1.2v7.2c0 .66-.54 1.2-1.2 1.2H7.2zm4.937-2.8l.663-.663-1.337-1.337 1.337-1.337-.663-.663-1.337 1.337L9.463 11.2l-.663.663 1.337 1.337L8.8 14.537l.663.663 1.337-1.337 1.337 1.337z",fill:"#fff"}));function Ce(){return Ce=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},Ce.apply(this,arguments)}const De=e=>l().createElement("svg",Ce({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8 7.2v8.4H18V7.2c0-.66-.54-1.2-1.2-1.2H8.4v1.2h8.4zM6 16.8c0 .66.54 1.2 1.2 1.2h7.2c.66 0 1.2-.54 1.2-1.2V9.6c0-.66-.54-1.2-1.2-1.2H7.2c-.66 0-1.2.54-1.2 1.2v7.2z",fill:"#fff"}));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 we=e=>l().createElement("svg",Re({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M11.727 5c1.66 0 3 1.376 3 3.08 0 1.704-1.34 3.08-3 3.08s-3-1.376-3-3.08c0-1.704 1.34-3.08 3-3.08zM12 19c-2.5 0-4.71-1.365-6-3.435.03-2.122 4-3.285 6-3.285 1.99 0 5.97 1.163 6 3.285C16.71 17.635 14.5 19 12 19z",fill:"#fff"}));function Pe(){return Pe=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},Pe.apply(this,arguments)}const Ae=e=>l().createElement("svg",Pe({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.125 7.583h2.042V8.75H8V7.583h2.042L10.625 7h2.917l.583.583zM9.75 17.5a1.17 1.17 0 01-1.167-1.167v-7h7v7a1.17 1.17 0 01-1.166 1.167H9.75z",fill:"#fff"}));function Me(){return Me=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},Me.apply(this,arguments)}const Le=e=>l().createElement("svg",Me({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.432 13.358h-.568l-.197-.196a4.627 4.627 0 001.121-3.023 4.65 4.65 0 10-4.649 4.65 4.628 4.628 0 003.022-1.12l.198.195v.567L16.933 18 18 16.934l-3.568-3.576zm-4.293 0a3.218 3.218 0 11.152-.004l-.152.004z",fill:"#fff"}));function He(){return He=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},He.apply(this,arguments)}const Ue=e=>l().createElement("svg",He({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.134 7.718L17.8 5.5V7h-1.604c-1.786 0-2.503.725-3.3 2.52-.585 1.318-.895 1.633-1.918 1.633H8.301v1.495h2.677c1.023 0 1.333.314 1.918 1.632.797 1.796 1.514 2.52 3.3 2.52h1.69v-1.495h-1.69c-1.036 0-1.35-.319-1.937-1.639-.348-.784-.68-1.363-1.09-1.766.41-.403.742-.982 1.09-1.766.586-1.32.901-1.639 1.938-1.639H17.8v1.44l2.334-2.217z",fill:"#fff"}));class je{}je.getComponent=e=>{let{type:t,data:n}=e;switch(t){case x.I.COMMENT_ADDED:case x.I.COMMENT_DELETED:case x.I.COMMENT_UPDATED:return l().createElement(_,{data:n,type:t});case x.I.ENTITIES_MERGED_MANUALLY:case x.I.ENTITIES_MERGED_ON_THE_FLY:case x.I.ENTITIES_SPLITTED:case x.I.ENTITY_LOST_MERGE:return l().createElement(K,{data:n,type:t});case x.I.POTENTIAL_MATCHES_FOUND:case x.I.POTENTIAL_MATCHES_REMOVED:case x.I.NOT_MATCHES_SET:case x.I.NOT_MATCHES_RESET:return l().createElement(q,{data:n,type:t});case x.I.ENTITY_CHANGED:case x.I.ENTITY_CREATED:case x.I.ENTITY_REMOVED:case x.I.ANALYTICS_ATTRIBUTES_CHANGED:return l().createElement(re,{data:n,type:t});case x.I.RELATIONSHIP_CHANGED:case x.I.RELATIONSHIP_CREATED:case x.I.RELATIONSHIP_REMOVED:return l().createElement(ie,{data:n,type:t});case x.I.USER_SEARCH:return l().createElement(pe,{data:n,type:t});case x.I.GROUP_CHANGED:case x.I.GROUP_CREATED:case x.I.GROUP_REMOVED:return l().createElement(w,{data:n,type:t});case x.I.USER_LOGIN:case x.I.USER_LOGOUT:case x.I.MODEL_UPDATED:case x.I.PERIODIC_TASK_SCHEDULED:case x.I.USER_PROFILE_VIEW:return l().createElement(ue,{data:n,type:t});case x.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE:return l().createElement(Ee,{data:n,type:t});default:return l().createElement("div",null,t," NOT IMPLEMENTED")}},je.getIcon=e=>{switch(e){case x.I.USER_LOGIN:return l().createElement(ye,null);case x.I.USER_LOGOUT:return l().createElement(Oe,null);case x.I.USER_PROFILE_VIEW:return l().createElement(we,null);case x.I.PERIODIC_TASK_SCHEDULED:return l().createElement(Te.Z,null);case x.I.ENTITIES_SPLITTED:return l().createElement(Ue,null);case x.I.ENTITIES_MERGED_MANUALLY:case x.I.ENTITIES_MERGED_ON_THE_FLY:case x.I.ENTITY_LOST_MERGE:return l().createElement(Ne,null);case x.I.ENTITY_CREATED:case x.I.RELATIONSHIP_CREATED:case x.I.GROUP_CREATED:return l().createElement(de,null);case x.I.ENTITY_REMOVED:case x.I.RELATIONSHIP_REMOVED:case x.I.POTENTIAL_MATCHES_REMOVED:case x.I.GROUP_REMOVED:return l().createElement(Ae,null);case x.I.USER_SEARCH:return l().createElement(Le,null);case x.I.POTENTIAL_MATCHES_FOUND:return l().createElement(De,null);case x.I.NOT_MATCHES_RESET:case x.I.NOT_MATCHES_SET:return l().createElement(_e,null);case x.I.COMMENT_ADDED:case x.I.COMMENT_UPDATED:case x.I.COMMENT_DELETED:return l().createElement(ge,null);case x.I.ENTITY_CHANGED:case x.I.MODEL_UPDATED:case x.I.RELATIONSHIP_CHANGED:case x.I.GROUP_CHANGED:default:return l().createElement(ve,null)}};const Ge=je,ke=(0,y.Z)((e=>({activityItem:{display:"flex",minHeight:"40px",padding:"10px 0 5px 0",boxSizing:"border-box"},activityIcon:{marginLeft:"-13px",marginRight:"15px",width:"24px",height:"24px",background:"#4896DF",borderRadius:"50%",border:"1px solid white",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& svg":{fill:"white",fontSize:"14px"}},activityInfo:{flex:1,overflow:"hidden",position:"relative"},activityUser:{fontSize:13,lineHeight:"15px",color:e.palette.text.secondary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},activityEvent:{marginTop:"5px"},date:{position:"absolute",right:0,marginTop:"5px",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,marginLeft:"auto",flexShrink:0,paddingLeft:8}}))),Ze=e=>{let{item:t}=e;const n=ke(),a=(0,g.te)(t),o=(0,p.pipe)(g.rx,(0,p.filter)(g.VV))(t);return l().createElement("div",{className:n.activityItem},l().createElement("div",{className:n.activityIcon},Ge.getIcon(a)),l().createElement("div",{className:n.activityInfo},l().createElement(r.Typography,{className:n.activityUser},t.user),l().createElement("span",{className:n.date},s().date(t.timestamp,"LT")),o.map(((e,t)=>l().createElement("div",{key:t,className:n.activityEvent},Ge.getComponent({type:(0,g.te)(e),data:e}))))))},Ve=(0,y.Z)({rowDivider:{marginLeft:"28px"},listRow:{paddingLeft:"12px","&::before":{content:'""',width:"2px",position:"absolute",height:"100%",top:0,left:"11px",backgroundColor:"#D8D8D8",zIndex:"-1"},overflow:"hidden"},firstRow:{"&$listRow::before":{height:"calc(100% - 20px)",top:"20px"}},lastRow:{"&$listRow::before":{height:"20px"}},singleRow:{"&$listRow::before":{display:"none"}}}),ze=e=>{let{width:t,height:n,activities:i,count:u,page:E,onChangePage:f,rowsPerPage:v,onChangeRowsPerPage:I,rowsPerPageOptions:y}=e;const b=Ve(),[x,N]=(0,a.useState)([]),S=e=>{N((0,p.adjust)(e,(0,p.evolve)({collapsed:p.not})))};(0,a.useEffect)((()=>{(0,p.pipe)((0,p.filter)(g.VV),m,N)(i)}),[i]);const _=(0,a.useMemo)((()=>d(x)),[x]),C=(0,a.useCallback)((e=>{let{data:t,index:n}=e;const a=t[n];return l().createElement("div",{className:k()(b.listRow,{[b.singleRow]:1===t.length,[b.firstRow]:0===n,[b.lastRow]:n===t.length-1})},T(a)?l().createElement(O,{item:a,onToggle:S}):l().createElement(l().Fragment,null,l().createElement(Ze,{item:a}),l().createElement(r.Divider,{className:b.rowDivider,light:!0,variant:"inset"})))}),[]);return l().createElement(l().Fragment,null,l().createElement(M,null,l().createElement(c.Z,{width:t,height:n-60,data:_,defaultItemSize:40,itemKey:h},C)),l().createElement(o.Z,{count:u,onChangePage:f,page:E,rowsPerPage:v,onChangeRowsPerPage:I,rowsPerPageOptions:y,labelRowsPerPage:s().text("Events per page:")}))}},34359:(e,t,n)=>{n.d(t,{Z:()=>Q});var r=n(24328),a=n.n(r),l=n(52730),o=n(87918),i=n.n(o),s=n(94079),c=n(36444),p=n(17440),u=n(56306),E=n(67885),m=n(34606),d=n(8818),T=n(79692);const h=(0,T.Z)((()=>({header:{width:"auto",display:"flex",alignItems:"center"},label:{paddingLeft:"7px",fontSize:"14px"},icon:{margin:"4px"},buttonsWrapper:{marginLeft:"auto",display:"flex"}}))),g=e=>{let{children:t,onToggle:n,filters:r}=e;const l=h(),o=(e=>{const t=(0,p.curry)(((e,t,n)=>n.length<=1?n[0]:`${n[0]} + ${n.length-1} ${2===n.length?e:t}`)),n=(0,p.pipe)((0,p.map)(m.Xr),t(i().text("activity"),i().text("activities")))(e.activities),r=t(i().text("user"),i().text("users"),e.users),a=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),(0,p.sortBy)(p.identity),t(i().text("type"),i().text("types")))(e.entityTypes),l=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),(0,p.sortBy)(p.identity),t(i().text("attribute"),i().text("attributes")))(e.attributes),o=(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("label"),t(i().text("source"),i().text("sources")))(e.sources);return(0,p.pipe)((0,p.reject)(p.isNil),(0,p.join)(" | "))([n,a,l,o,(e=>{const t=e=>`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`;switch(e.type){case E.K.WITHIN:return i().text("Within ${amount} ${unit}",{amount:e.period[0],unit:e.period[1]});case E.K.AGO:return i().text("More than ${amount} ${unit} ago",{amount:e.period[0],unit:e.period[1]});case E.K.BETWEEN:return i().text("${startDate} to ${endDate}",{startDate:t(e.period[0]),endDate:t(e.period[1])});default:return null}})(e.dateRange),r])})(r);return a().createElement("div",{className:l.header},a().createElement(s.Typography,{variant:"body2",className:l.label},i().text("Filter:")),a().createElement(s.Tooltip,{title:o},a().createElement(s.Typography,{variant:"body2",className:l.label,color:"textSecondary",display:"block",noWrap:!0},o)),a().createElement("div",{className:l.buttonsWrapper},t,a().createElement(d.k,{icon:c.Z,size:"L",onClick:n,tooltipTitle:i().text("Filter"),className:l.icon})))};var f=n(59431),v=n(31537);const I=[v.I.ENTITY_CREATED,v.I.ENTITY_CHANGED,v.I.ENTITIES_MERGED,v.I.ENTITIES_SPLITTED,v.I.ENTITY_LOST_MERGE,v.I.RELATIONSHIP_CREATED,v.I.RELATIONSHIP_REMOVED,v.I.RELATIONSHIP_CHANGED,v.I.POTENTIAL_MATCHES_FOUND,v.I.POTENTIAL_MATCHES_REMOVED,v.I.NOT_MATCHES_SET,v.I.NOT_MATCHES_RESET,v.I.ENTITIES_MERGED_MANUALLY,v.I.ENTITIES_MERGED_ON_THE_FLY],y=[v.I.GROUP_CREATED,v.I.GROUP_REMOVED,v.I.GROUP_CHANGED],b=(e,t)=>t?I:(0,p.pipe)(Object.keys,(0,p.filter)((t=>(0,p.has)("groupTypes",e)&&!(0,p.isEmpty)(e.groupTypes)||!(0,p.includes)(t,y))))(v.I);var O=n(71153),x=n.n(O),N=n(92575),S=n(96808);function _(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={input: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){_(e,t,n[t])}))}return e}({},e,{fontSize:"14px"})},D=(0,T.Z)({container:{padding:"12px 7px 0px",borderBottom:"solid 1px rgba(0, 0, 0, 0.12)"},labels:{fontSize:"14px"},filterSubtitle:{paddingBottom:"10px",paddingLeft:"5px"},agoLabel:{minWidth:"30px",textAlign:"end",margin:"auto"},dateOption:{display:"flex",marginRight:"30px"},dateOptionAgo:{display:"flex",marginBottom:"10px"},dateOptionWithin:{display:"flex",marginRight:"30px",marginBottom:"10px"},dateOptionLabel:{minWidth:"100px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},filterControls:{display:"flex",paddingTop:"30px",marginBottom:8},clearButton:{marginRight:"auto"},selectorWrapper:{marginBottom:"12px"},option:{fontSize:"14px",height:"32px"},selectorsGroup:{display:"flex",flexDirection:"column"},selectorHint:{fontSize:12,lineHeight:"16px",color:"rgba(0,0,0,0.54)"},divider:{marginBottom:12}}),R=e=>{let{activityTypes:t,selectedActivityTypes:n,onChange:r}=e;const l=D(),o=e=>({value:e,label:(0,m.Xr)(e)}),c=e=>e.map(o),u=n.length>1&&n.includes(v.I.ENTITY_CHANGED),E=(0,p.pipe)((0,p.sortBy)((e=>(0,m.Xr)(e))),c)(t);return a().createElement("div",{className:l.selectorWrapper},a().createElement(s.Typography,{className:x()(l.filterSubtitle,l.labels),variant:"subtitle1"},i().text("Activity")),a().createElement(N.Z,{value:c(n),onChange:(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("value"),r),options:E,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:S.Z},styles:C,classes:l,menuPlacement:"bottom"}),u&&a().createElement("span",{className:l.selectorHint},i().text("One at a time! Select a single Activity and any of its filters -OR- multiple Activities with no filters.")))};var w=n(85451),P=n(39621),A=n(31276),M=n(51843),L=n(20562);function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const U=[null,null],j=[null,"minutes"],G=e=>{let{value:t,onChange:n}=e;const l=D(),o=e=>(null==t?void 0:t.type)===e?t.period:e===E.K.WITHIN||e===E.K.AGO?j:e===E.K.BETWEEN?U:void 0,[c,u]=(0,r.useState)(o(E.K.BETWEEN)),[m,d]=(0,r.useState)(o(E.K.WITHIN)),[T,h]=(0,r.useState)(o(E.K.AGO)),g=e=>e===E.K.WITHIN?m:e===E.K.AGO?T:e===E.K.BETWEEN?c:void 0,f=e=>{(null==t?void 0:t.type)!==e&&n({period:g(e),type:e})},v=e=>{n(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}({},t,{period:e}))};return(0,L.D)((()=>{t?t.type===E.K.WITHIN?d(t.period):t.type===E.K.AGO?h(t.period):t.type===E.K.BETWEEN&&u(t.period):(u(U),d(j),h(j))}),[t]),a().createElement("div",{className:l.selectorWrapper},a().createElement(s.Typography,{className:x()(l.filterSubtitle,l.labels),variant:"subtitle1"},i().text("Date")),a().createElement(s.RadioGroup,{value:(null==t?void 0:t.type)||null,onChange:(0,p.pipe)(A.NA,f)},a().createElement("div",{className:l.dateOptionWithin},a().createElement(s.FormControlLabel,{value:E.K.WITHIN,control:a().createElement(s.Radio,null),label:i().text("Within the last"),classes:{label:x()(l.dateOptionLabel,l.labels)}}),a().createElement(P.Z,{interval:m,onChange:v,onFocus:()=>f(E.K.WITHIN)})),a().createElement("div",{className:l.dateOptionAgo},a().createElement(s.FormControlLabel,{value:E.K.AGO,control:a().createElement(s.Radio,null),label:i().text("More than"),classes:{label:x()(l.dateOptionLabel,l.labels)}}),a().createElement(P.Z,{interval:T,onChange:v,onFocus:()=>f(E.K.AGO)}),a().createElement(s.Typography,{className:x()(l.agoLabel,l.labels),variant:"subtitle1"},i().text("Ago"))),a().createElement("div",{className:l.dateOption},a().createElement(s.FormControlLabel,{value:E.K.BETWEEN,control:a().createElement(s.Radio,null),label:i().text("Date range"),classes:{label:x()(l.dateOptionLabel,l.labels)}}),a().createElement(M.Z,{values:c,onChange:v,onFocus:()=>f(E.K.BETWEEN)}))))};var k=n(27815);const Z=e=>{let{entityTypes:t,selectedEntityTypes:n,onChange:r}=e;const l=D(),o=e=>({value:e.uri,label:e.label,entityType:e}),c=e=>e.map(o),u=(0,p.pipe)((0,p.sortBy)((e=>e.label)),c)(t);return a().createElement("div",{className:l.selectorWrapper},a().createElement(s.Typography,{className:x()(l.filterSubtitle,l.labels),variant:"subtitle1"},i().text("Type")),a().createElement(N.Z,{value:c(n),onChange:(0,p.pipe)((0,p.defaultTo)([]),(0,p.pluck)("entityType"),r),options:u,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:l.dropDownInput}},components:{DropdownIndicator:S.Z},styles:C,classes:l,menuPlacement:"bottom"}))},V=e=>{let{selectedSources:t,onChange:n}=e;const r=D(),o=(0,l.useSelector)(f.ZP.selectors.getMetadata),c=(0,p.sortBy)((e=>e.label))(o.sources);return a().createElement("div",{className:r.selectorWrapper},a().createElement(s.Typography,{className:x()(r.filterSubtitle,r.labels),variant:"subtitle1"},i().text("Source")),a().createElement(N.Z,{value:t,onChange:(0,p.pipe)((0,p.defaultTo)([]),n),options:c,TextFieldProps:{InputProps:{disableUnderline:!0},classes:{root:r.dropDownInput}},components:{DropdownIndicator:S.Z},styles:C,classes:r,getOptionValue:(0,p.prop)("abbreviation"),menuPlacement:"bottom"}))},z=e=>{let{filter:t,entityType:n,onPropChange:r}=e;const o=D(),i=(0,l.useSelector)(f.ZP.selectors.getMetadata),{attributes:s=[],sources:c=[],entityTypes:E=[]}=t||{},m=(0,u.Ug0)(i,(0,p.map)((0,p.prop)("uri"),E)),d=n||(0,u.nt9)(i,m);return a().createElement("div",{className:o.selectorsGroup},!n&&a().createElement(Z,{entityTypes:i.entityTypes,selectedEntityTypes:E,onChange:r("entityTypes")}),a().createElement(k.Z,{selectedAttributes:s,entityType:d,onChange:r("attributes"),className:o.selectorWrapper,disableUnderline:!0}),a().createElement(V,{selectedSources:c,onChange:r("sources")}))},F=e=>{let{value:t,open:n,entityType:o,onApply:c,onCancel:u,onClear:E}=e;const m=D(),d=(0,l.useSelector)(f.ZP.selectors.getMetadata),[T,h]=(0,r.useState)(t),g=(0,p.curry)(((e,t)=>{h((0,p.pipe)((0,p.when)((0,p.always)("entityTypes"===e),(0,p.assoc)("attributes",[])),(0,p.when)((0,p.always)("activities"===e),(0,p.mergeLeft)({attributes:[],entityTypes:[],sources:[]})),(0,p.assoc)(e,t)))}));(0,L.D)((()=>{h(t)}),[t]);const{activities:I=[],dateRange:y=null,users:O=[]}=T||{},x=1===I.length&&I.includes(v.I.ENTITY_CHANGED);return n?a().createElement("div",{className:m.container},a().createElement(R,{activityTypes:b(d,o),selectedActivityTypes:I,onChange:g("activities")}),x&&a().createElement(z,{filter:T,entityType:o,onPropChange:g}),a().createElement(s.Divider,{light:!0,className:m.divider}),a().createElement(G,{value:y,onChange:g("dateRange")}),a().createElement(s.Divider,{light:!0,className:m.divider}),a().createElement(w.Z,{selectedUsers:O,onChange:g("users"),disableUnderline:!0}),a().createElement("div",{className:m.filterControls},a().createElement(s.Button,{onClick:(0,p.pipe)((()=>h(null)),E),className:m.clearButton},i().text("Clear all")),a().createElement(s.Button,{onClick:u},i().text("Cancel")),a().createElement(s.Button,{color:"primary",onClick:()=>c(T)},i().text("Apply")))):null};var W=n(28113),B=n(585),Y=n(55847),$=n(56764);const K=(0,T.Z)((e=>({snackbar:{maxWidth:500},icon:{margin:"4px"},exportButton:{color:e.palette.primary.main}}))),q=e=>{let{filters:t,exportTypes:n=[]}=e;const o=K(),c=(0,l.useDispatch)(),[p,E]=(0,r.useState)(!1),m=(0,l.useSelector)(f.ZP.selectors.getExportPath),T=(0,l.useSelector)(f.ZP.selectors.getTenant),h=(0,r.useCallback)((e=>{const n={filter:(0,$.U)(t),fileFormat:e};(0,u.CrF)({exportPath:m,tenant:T,options:n}).then((()=>E(!0))).catch(g)}),[t,T,m]),g=e=>{console.error(e),B.Z.addError({title:i().text("Error"),message:(0,u.xU7)(e,i().text("Can't export activities"))})},v=(0,r.useCallback)((()=>{c(f.ui.actions.openConsoleApp("Export"))}),[c]),I=(0,r.useMemo)((()=>n.map((e=>({text:e.toUpperCase(),onClick:()=>h(e)})))),[n,h]);return a().createElement(a().Fragment,null,I.length?a().createElement(Y.Z,{buttonComponent:d.k,buttonProps:{icon:W.Z,tooltipTitle:i().text("Export"),size:"L",className:o.icon},menuItems:I,menuId:"export-menu"}):a().createElement(d.k,{icon:W.Z,size:"L",onClick:()=>h(),tooltipTitle:i().text("Export"),className:o.icon}),a().createElement(s.Portal,{container:document.body},a().createElement(s.Snackbar,{open:p,autoHideDuration:5e3,className:o.snackbar,onClose:()=>E(!1),message:i().text("Export operation is currently in progress. You will receive an email notification once completed. Go to Export Application to view the status."),action:a().createElement(s.Button,{className:o.exportButton,onClick:v},i().text("Export application"))})))};function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){J(e,t,n[t])}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Q=e=>{let{value:t,entityType:n,entityUri:o,onChange:i,exportTypes:s}=e;const c=(0,r.useRef)(t),p=(0,l.useSelector)(f.ZP.selectors.getCanUserMakeActivitiesExport),[u,E]=(0,r.useState)(!1);return a().createElement(a().Fragment,null,a().createElement(g,{onToggle:()=>E((e=>!e)),filters:t},p&&a().createElement(q,{filters:X({},t,{entityUri:o}),exportTypes:s})),a().createElement(F,{value:t,open:u,entityType:n,onApply:e=>{(0,$.R)(e.dateRange)?i(e):i(c.current)},onCancel:()=>E(!1),onClear:()=>i(X({},c.current))}))}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},99601:(e,t,n)=>{let r;n.d(t,{w:()=>r}),function(e){e.ATTRIBUTE_CHANGED="edited",e.ATTRIBUTE_ADDED="added",e.ATTRIBUTE_REMOVED="deleted"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>p,rx:()=>u,_V:()=>E,Xr:()=>m});var r=n(17440),a=n(87918),l=n.n(a),o=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},p=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(o.I))),u=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(s),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.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){i(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),E=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(E).join(", "):(0,r.is)(Object,e)?E("value"in e?e.value:Object.values(e)):e.toString(),m=e=>({[o.I.COMMENT_ADDED]:l().text("Comment added"),[o.I.COMMENT_DELETED]:l().text("Comment deleted"),[o.I.COMMENT_UPDATED]:l().text("Comment updated"),[o.I.ENTITIES_MERGED]:l().text("Profile merged"),[o.I.ENTITIES_MERGED_MANUALLY]:l().text("Profile merged manually"),[o.I.ENTITIES_MERGED_ON_THE_FLY]:l().text("Profile merged on the fly"),[o.I.ENTITIES_SPLITTED]:l().text("Profile un-merged"),[o.I.ENTITY_CHANGED]:l().text("Profile updated"),[o.I.ENTITY_CREATED]:l().text("Profile created"),[o.I.ENTITY_LOST_MERGE]:l().text("Profile lost merge"),[o.I.ENTITY_REMOVED]:l().text("Profile removed"),[o.I.GROUP_CHANGED]:l().text("Group updated"),[o.I.GROUP_CREATED]:l().text("Group created"),[o.I.GROUP_REMOVED]:l().text("Group removed"),[o.I.MODEL_UPDATED]:l().text("Model was updated"),[o.I.NOT_MATCHES_RESET]:l().text("Not matches reset"),[o.I.NOT_MATCHES_SET]:l().text("Not matches set"),[o.I.PERIODIC_TASK_SCHEDULED]:l().text("Periodic task was scheduled"),[o.I.POTENTIAL_MATCHES_FOUND]:l().text("Potential matches found"),[o.I.POTENTIAL_MATCHES_REMOVED]:l().text("Potential matches removed"),[o.I.RELATIONSHIP_CHANGED]:l().text("Relationship updated"),[o.I.RELATIONSHIP_CREATED]:l().text("Relationship created"),[o.I.RELATIONSHIP_REMOVED]:l().text("Relationship removed"),[o.I.USER_LOGIN]:l().text("Logged in"),[o.I.USER_LOGOUT]:l().text("Logged out"),[o.I.USER_PROFILE_VIEW]:l().text("Profile viewed"),[o.I.USER_SEARCH]:l().text("Searched"),[o.I.ANALYTICS_ATTRIBUTES_CHANGED]:l().text("Analytics attribute changed"),[o.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:l().text("SFDC connector synchronization issue")}[e]||"")},56764:(e,t,n)=>{n.d(t,{U:()=>f,R:()=>v});var r=n(17440),a=n(95038),l=n.n(a),o=n(67885),i=n(56306);const s=e=>t=>t.map(e).join(" or "),c=e=>`equals(user, '${(0,i.HRH)(e)}')`,p=e=>e.startsWith("USER_")||e.startsWith("COMMENT_")||e.startsWith("SFDC_")?`startsWith(label, '${e}')`:`equals(items.data.type, ${e})`,u=e=>`equals(items.delta.sources, '${e.abbreviation}')`,E=e=>`equals(items.objectType, '${e.uri}')`,m=e=>`equals(items.delta.attributeType, '${e.value}')`,d=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},T=e=>{let{type:t,period:n}=e;switch(t){case o.K.WITHIN:return`gte(timestamp, ${d(n)})`;case o.K.AGO:return`lte(timestamp, ${d(n)})`;case o.K.BETWEEN:{const[e,t]=n;return`range(timestamp, ${e.valueOf()}, ${l()(t).endOf("date").valueOf()})`}default:return""}},h=e=>[`equals(items.objectUri, '${e}')`,`equals(items.startObjectUri, '${e}')`,`equals(items.endObjectUri, '${e}')`].join(" or "),g=(0,r.cond)([[(0,r.equals)("users"),()=>s(c)],[(0,r.equals)("activities"),()=>s(p)],[(0,r.equals)("sources"),()=>s(u)],[(0,r.equals)("attributes"),()=>s(m)],[(0,r.equals)("entityTypes"),()=>s(E)],[(0,r.equals)("dateRange"),()=>T],[(0,r.equals)("entityUri"),()=>h]]),f=(0,r.pipe)((0,r.defaultTo)({}),(0,r.reject)(i.O27),r.toPairs,(0,r.map)((e=>{let[t,n]=e;return g(t)(n)})),(0,r.reject)(i.O27),(0,r.map)((e=>`(${e})`)),(0,r.join)(" and ")),v=e=>{if(e.type===o.K.AGO||e.type===o.K.WITHIN){const[t,n]=e.period;return"Number"===(0,r.type)(t)&&"String"===(0,r.type)(n)&&t>0}if(e.type===o.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}},51843:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),l=n(95038),o=n.n(l),i=n(87918),s=n.n(i),c=n(17440),p=n(56306),u=n(94079),E=n(96808),m=n(37699);const d=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),T=o().localeData().longDateFormat("L"),h=e=>{let{values:t,onChange:n,onFocus:l}=e;const o=T,i=(0,r.useRef)(null),[h,g]=(0,r.useState)(!1),f=d(),v=(0,r.useCallback)((()=>{g((e=>!e)),l()}),[l]),I=()=>{g(!1)};return a().createElement("div",{className:f.root},a().createElement(u.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,p.mB6)({dataTypeDefinition:{type:p.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,o))).join(" — "),onClick:v,variant:"filled",ref:i,InputProps:{endAdornment:a().createElement(E.Z,{selectProps:{classes:f,menuIsOpen:h},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:f.inputRoot,input:f.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${o} — ${o}`)}),a().createElement(u.Menu,{variant:"menu",open:h,autoFocus:!1,classes:{paper:f.paper},anchorEl:i.current,onClose:I,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:h,style:{width:"100%"}}},a().createElement(m.Z,{values:t,onCancel:I,onApply:e=>{n(e),g(!1)},type:p.oS0.TYPE_ACTIVENESS_DATE})))}},41188:(e,t,n)=>{n.d(t,{v:()=>s});var r=n(24328),a=n(52730),l=n(59431),o=n(56306),i=n(17440);const s=e=>{const t=(0,a.useSelector)(l.ZP.selectors.getMetadata),n=(0,a.useSelector)(l.ZP.selectors.getDataTenants),s=(0,a.useSelector)(l.ZP.selectors.getAttributePresentations),c=(0,a.useSelector)(l.ZP.selectors.getLookups),{map:p}=e,u=(0,o.CL1)(e),E=(0,o.hM2)(t,n,!0,e),m=(0,o.mxe)(E,c),d=(0,a.useDispatch)();return(0,r.useEffect)((()=>{m.length>0&&(0,i.pipe)((0,i.chain)((e=>{let{type:t,codeValues:n}=e;return n.map((e=>({type:t,codeValue:e})))})),o.hK$,(0,i.andThen)((0,i.pipe)(l.N5.lookups.actions.lookupsListResolved,d)))(m)}),[e]),(0,o.ZxB)(t,s,c,E,u,p)}},67885:(e,t,n)=>{let r,a;n.d(t,{K:()=>r,o:()=>a}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(a||(a={}))}}]);
package/6971.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6971],{8598:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(95038),r=n.n(a);const o=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,a=t.instance,o=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=a||o||r(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),a=0,r=t,o=[];r.isBefore(n);){var l=Math.floor(a/7);o[l]=o[l]||[],o[l].push(r),r=r.clone().add(1,"day"),a+=1}return o},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),a=this.moment(t).endOf("year"),r=[],o=n;o.isBefore(a);)r.push(o),o=o.clone().add(1,"year");return r},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},27604:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=o},99144:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=o},67766:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");t.Z=o},42767:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=o},72753:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=o},32528:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(13688),r=n(48852);const o=e=>t=>(0,r.l)(a.X,e,t)},1876:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(24328),r=n.n(a),o=n(13980),l=n.n(o),i=n(87918),s=n.n(i),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=e=>r().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const a=m();return r().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},r().createElement(c.IconButton,{onClick:n,classes:{root:a.button}},t?r().createElement(r().Fragment,null,r().createElement(d,{className:a["filterIcon--enabled"]}),r().createElement(p.default,{color:"primary",className:a.closeIcon})):r().createElement(d,null)))};f.propTypes={enabled:l().bool,onClick:l().func};const y=f},58662:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(13980),r=n.n(a),o=n(24328),l=n.n(o),i=n(71153),s=n.n(i),c=n(94079),p=n(87918),u=n.n(p),d=n(31276),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:a,page:r,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:b,basicTableRef:g,labelRowsPerPage:h}=e;const v=f(),x=(0,o.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],g)()}),[g]),E=(0,o.useCallback)((e=>{i(e),x()}),[i,x]),C=(0,o.useCallback)((e=>{i(0),b(e),x()}),[i,b,x]);return l().createElement(c.TablePagination,{classes:y({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:h||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(a,"0,0")})},count:n,rowsPerPageOptions:a,page:r,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};g.propTypes={classes:r().object,rowsPerPageOptions:r().arrayOf(r().number),count:r().number,page:r().number,onChangePage:r().func,rowsPerPage:r().number,onChangeRowsPerPage:r().func,basicTableRef:r().shape({current:r().object}),labelRowsPerPage:r().string};const h=l().memo(g)},26180:(e,t,n)=>{n.d(t,{ZP:()=>y});var a=n(17440),r=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i="CHANGE_COLUMNS",s="TOGGLE_FILTERS",c="CHANGE_FILTER",p="TOGGLE_SORT",u="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",m={changeColumns:(0,r.zD)(i),toggleFilters:(0,r.zD)(s),changeFilter:(0,r.zD)(c),toggleSort:(0,r.zD)(p),changePage:(0,r.zD)(u),changeRowsPerPage:(0,r.zD)(d)},f=(e,t)=>{const n=(0,a.difference)(e.visibleColumns,t),r=e=>n.includes(e);return(0,a.evolve)({visibleColumns:(0,a.always)(t),sorting:(0,a.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,a.keys)(e).reduce(((e,t)=>r(t)?(0,a.dissoc)(t,e):e),e)},e)},y={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return f(e,n)}case s:{const t=!e.filters;return o({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:r}=t.payload;return(0,a.evolve)({filters:r?(0,a.assoc)(n,r):(0,a.dissoc)(n),page:(0,a.always)(0)},e)}case p:{const n=t.payload,l=(0,a.path)(["sorting","field"],e),i=(0,a.path)(["sorting","order"],e);return o({},e,{sorting:{field:n,order:(0,r.Dh)(n===l?i:null)},page:0})}case u:return o({},e,{page:t.payload});case d:return o({},e,{rowsPerPage:t.payload});default:return e}},actions:m,changeVisibleColumns:f}},10237:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(27556),r=n(13980),o=n.n(r),l=n(24328),i=n.n(l);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=(0,l.forwardRef)(((e,t)=>{let{children:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=p();return i().createElement(a.Z,u({ref:t,className:r,classes:{root:l["basic-view__paper"]}},o),n)}));d.displayName="BasicView",d.propTypes={children:o().node,className:o().string};const m=d},81137:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),r=n.n(a),o=n(87918),l=n.n(o),i=n(94079);const s=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),c=e=>{let{open:t,title:n,content:a,onCancel:o,cancelCaption:c=l().text("Cancel"),onDiscard:p,discardCaption:u="",onSave:d,saveCaption:m=l().text("Save"),disabledSave:f=!1}=e;const y=s();return r().createElement(i.Dialog,{open:t,onClose:o,classes:{paperScrollPaper:y.paper}},r().createElement(i.DialogTitle,{classes:{root:y.title}},n),r().createElement(i.DialogContent,{classes:{root:y.content}},r().createElement(i.DialogContentText,{classes:{root:y.contentText}},a)),r().createElement(i.DialogActions,{className:y.actionButtons,disableSpacing:!0},o&&r().createElement(i.Button,{onClick:o},c),r().createElement("div",null,p&&r().createElement(i.Button,{onClick:p,classes:{root:y.discardButton}},u),r().createElement(i.Button,{onClick:d,color:"primary",disabled:f,autoFocus:!0},m))))}},68439:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),o=n(52730),l=n(71153),i=n.n(l),s=n(94079),c=n(81403),p=n(59431),u=n(88611);const d=(0,n(79692).Z)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px"}}),m=e=>{let{entity:t,className:n,size:a="small"}=e;const l=d(),m=(0,o.useSelector)(p.ZP.selectors.getMetadata),f=t.type,y=(0,c.nt9)(m,f)||{},b=(0,c.VD3)(m,y,"typeColor")||c.rSc.palette.primary.main,g=(0,c.jFi)(m,t);return r().createElement(u.C,{value:g,placement:"top"},r().createElement(s.Typography,{style:{backgroundColor:b,color:c.P6Y.Colors.getColor(b)?"#FFFFFF":"#212121"},className:i()(l[`entityType-${a}`],l["entityType-overflow"],n),component:"div"},g))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),r=n.n(a),o=n(13980),l=n.n(o),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(94079),d=n(87918),m=n.n(d),f=n(81403),y=n(59431),b=n(53180),g=n(68439);const h=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:o,classes:l}=e;const i=h({classes:l}),d=(0,c.useSelector)(y.ZP.selectors.getMetadata),v=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const x=(0,f.idV)(n.label),E=n.secondaryLabel,C=(0,f.ptG)(d,n),w=(0,f.Fn9)(n),S=n.uri,T=(0,f.BTI)(n);return r().createElement("div",{className:s()(i.profileBandWrapper,t)},r().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":S},r().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),r().createElement("div",{className:i.profileInfo},r().createElement("div",null,r().createElement(u.Typography,{variant:"h6",className:i.label},x),E&&r().createElement(u.Typography,{variant:"subtitle2",className:i.secondaryLabel},E),C&&r().createElement(u.Typography,{variant:"subtitle1",className:i.businessCard},C)),r().createElement("div",{className:i.specialInfo},r().createElement("div",{className:i.entityType},r().createElement(g.Z,{entity:n,size:"medium",className:i.badge}),!(0,f.ZiX)(S)&&r().createElement(u.Tooltip,{title:m().text("Copy to clipboard")},r().createElement(u.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",T))))),o&&r().createElement("div",null,o)))};v.propTypes={className:l().string,entity:l().object,children:l().node,classes:l().object};const x=v},30553:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(13980),r=n.n(a),o=n(24328),l=n.n(o);const i=e=>{let{height:t,margin:n}=e;return l().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};i.propTypes={height:r().number,margin:r().number};const s=i},86361:(e,t,n)=>{n.d(t,{o:()=>l});var a=n(24328),r=n(17440);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{actions:t,dispatch:n}=e;return(0,a.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[a,l]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){o(e,t,n[t])}))}return e}({},e,{[a]:(0,r.pipe)(l,n)})}),{})),[n,t])}},7718:(e,t,n)=>{n.d(t,{C:()=>f});var a=n(24328),r=n(52730),o=n(17440),l=n(81403),i=n(59431);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(e,t)=>t.filter((t=>t.replyId!==e)),u=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),a=[...e.replies];return a[n]=t,a},d=[],m=e=>console.error("Collaboration error",e),f=e=>{let{objectIds:t=d,objectTypes:n,enabled:c=!0}=e;const f=(0,r.useSelector)(i.ZP.selectors.getEntity),y=(0,r.useSelector)(i.ZP.selectors.getTenant),b=(0,r.useSelector)(i.ZP.selectors.getCollaborationPath),g=(0,r.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[h,v]=(0,a.useState)(null),[x,E]=(0,a.useState)([]),[C,w]=(0,a.useState)(null),[S,T]=(0,a.useState)(null),[O,P]=(0,a.useState)(!1),[k,D]=(0,a.useState)(!1),R=(0,a.useCallback)((e=>{w((t=>s({},t,e)))}),[]),N=null==f?void 0:f.uri,j=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(g&&N&&!(0,l.ZiX)(N)){const n=e=>{console.warn("Collaboration error",e),w(null)};(0,o.pipe)(l.$oF,(0,o.andThen)((0,o.map)((0,o.props)(["objectId","comments"]))),(0,o.andThen)(o.fromPairs),(0,o.andThen)(t?w:R),(0,o.otherwise)(n))({uris:e,tenant:y,collaborationPath:b})}else w(null)}),[R,b,N,g,y]);(0,a.useEffect)((()=>{j(t,!0)}),[t,j]);const Z=(0,a.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:b,tenant:y,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;E((e=>t?(0,o.uniqBy)((0,o.prop)("commentId"),[...e,...n]):n)),v(a)})).catch(m)}),[b,y]),I=(0,a.useCallback)((e=>{D(!0),(0,l.d7q)({collaborationPath:b,tenant:y,commentId:e}).then(T).catch(m).finally((()=>D(!1)))}),[b,y]),M=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:o}=e;P(!0);const i={objectId:r,content:t,relatedObjectUris:o,objectType:a,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:b,tenant:y,data:i}).then((e=>{let[t]=e;return((e,t)=>{T(e),w((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),E((t=>[e,...t]))})(t,r)})).catch(m).finally((()=>P(!1)))}),[b,y]),A=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:i,commentId:c,replies:p}=e;P(!0);const u={objectId:r,content:t,relatedObjectUris:i,objectType:a,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:p};return(0,l.uAg)({collaborationPath:b,tenant:y,data:u}).then((e=>(e=>{T(e),E((0,o.map)((0,o.when)((0,o.propEq)("commentId",e.commentId),(0,o.always)(e))))})(s({},e,{replies:p})))).catch(m).finally((()=>P(!1)))}),[b,y]),F=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;P(!0),(0,l.YFy)({collaborationPath:b,tenant:y,commentId:n}).then((()=>((e,t)=>{T(null),w((n=>{const a=n[t]||[];return s({},n,{[t]:a.filter((t=>t.commentId!==e))})})),E((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(m).finally((()=>P(!1)))}),[b,y]),U=(0,a.useCallback)(((e,t,n,a)=>{const r="resolve"===e.action?"resolved":"open",{replyId:o}=e;T("resolved"===r?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:a?p(o,t.replies):[...t.replies,e]})}),w((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:r,replies:a?e.replies-1:e.replies+1}):e))}))),E((t=>t.map((t=>t.commentId===n?s({},t,{status:r,replies:a?p(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),L=(0,a.useCallback)((e=>{let{uri:t,commentId:n,reply:a}=e;P(!0),(0,l.Mfr)({collaborationPath:b,tenant:y,commentId:n,replyId:a.replyId}).then((()=>U(a,t,n,!0))).catch(m).finally((()=>P(!1)))}),[b,U,y]),z=(0,a.useCallback)(((e,t)=>{T((t=>{if(t)return s({},t,{replies:u(t,e)})})),E((n=>n.map((n=>n.commentId===t?s({},n,{replies:u(n,e)}):n))))}),[]),B=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,replyId:r}=e;P(!0);const o={content:t,namedUsers:n};return(0,l.ufV)({collaborationPath:b,tenant:y,commentId:a,replyId:r,data:o}).then((e=>z(e,a))).catch(m).finally((()=>P(!1)))}),[b,y,z]),_=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:r,uri:o}=e;P(!0);const i={content:t,action:r,namedUsers:n};return(0,l.PP2)({collaborationPath:b,tenant:y,commentId:a,data:i}).then((e=>{let[t]=e;return U(t,o,a)})).catch(m).finally((()=>P(!1)))}),[b,y,U]),W=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;_({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[_]),H=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;_({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[_]);return{clearCurrentComment:(0,a.useCallback)((()=>{T(null)}),[]),comments:x,commentsMap:C,createComment:M,createReply:_,currentComment:S,deleteComment:F,editComment:A,getComment:I,getComments:Z,getCommentsCount:j,loading:k,objectTypes:n,pageToken:h,reOpenThread:H,resolveThread:W,sending:O,deleteReply:L,editReply:B}}},37152:(e,t,n)=>{n.d(t,{a:()=>m});var a=n(24328),r=n(52730),o=n(17440),l=n(59431),i=n(81403),s=n(67218),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(i.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:f,entity:y,relationActivityFilter:b,mode:g}=e;const[h,v]=(0,a.useState)(!1),x=(0,r.useDispatch)(),E=(0,r.useSelector)(l.ZP.selectors.getTenant),C=(0,r.useSelector)(l.ZP.selectors.getDtssPath),{activityFilter:w,globalFilter:S}=(0,r.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,s._)(),O=f.suggested,P=(0,a.useCallback)((()=>{if(null!=y&&y.uri){const e=p({},f.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:b||i.Ng6.ALL,entity:w},max:m,offset:u*m,filter:(0,i.vyX)(S,n)||void 0,suggested:d(O)}),a=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(i.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(O)),r=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),i.ZiX),()=>Promise.resolve([{total:0}])],[i.biM,e=>(0,i.n_1)({entityUri:e.uri,configs:a,customerTenant:E,dataTenant:e.dataTenant,dtssPath:C})],[o.T,e=>(0,i.N6e)(e.uri,a)]]);v(!0),T(r(y)).then((e=>{let[{connections:t,total:n}]=e;x(l.N5.relations.actions.relationsLoaded({id:f.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[w,f,x,C,null==y?void 0:y.uri,null==y?void 0:y.dataTenant,n,S,u,b,m,T,t,E]),k=(0,a.useRef)(!1);k.current=!1,(0,a.useEffect)((()=>{k.current=!0,P()}),[P]);const D=(0,c.D)(g);return(0,a.useEffect)((()=>{g!==i.ARY.Viewing||k.current||D===g||(k.current=!0,P())}),[P,g,D]),{isLoading:h,reload:P}}},17554:(e,t,n)=>{n.d(t,{U:()=>i});var a=n(24328),r=n(52730),o=n(81403),l=n(59431);const i=()=>{const[e,t]=(0,a.useState)([]),n=(0,r.useSelector)(l.ZP.selectors.getTenant),i=(0,r.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,a.useEffect)((()=>{(0,o.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}},55451:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ht});var a=n(24328),r=n.n(a),o=n(52730),l=n(8598),i=n(36138),s=n(44443),c=n(22664),p=n(39450),u=n(585),d=n(17440),m=n(59431),f=n(81403),y=n(17554),b=n(20562),g=n(37152),h=n(7718),v=n(49759),x=n(3515),E=n(31274),C=n(57304),w=n(93873),S=n(99136),T=n(58662);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={relationsTable:{},attributesTable:{}};var D=n(26180),R=n(31276),N=n(86361),j=n(87918),Z=n.n(j);const I="relation.type",M="relation.attributes",A=[{id:"entity.label",get label(){return Z().text("Profile")},dataTypeDefinition:{type:f.oS0.TYPE_STRING},hideable:!1,filterable:!1,initialWidth:280,autoResize:!1},{id:I,get label(){return Z().text("Type")}},{id:"relation.label",get label(){return Z().text("Directional Label")},filterable:!1,dataTypeDefinition:{type:f.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return Z().text("Start Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:"relation.activeness.endDate",get label(){return Z().text("End Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:M,get label(){return Z().text("Attributes")},sortable:!1,filterable:!1,maxAttrsToShow:7}],F=(0,d.pluck)("id",A),U=[I,M],L=[20,50,100],z=(0,d.pipe)(f.Tde,(0,d.concat)("relation.")),B=(0,d.pipe)((0,d.map)((e=>({id:z(e.uri),label:e.label,dataTypeDefinition:(0,f.PFL)(e)}))),(0,d.uniqBy)((0,d.prop)("id")));function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){W(e,t,n[t])}))}return e}function W(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="CHANGE_RELATION_TYPE",V="APPLY_SAVED_STATE",Y="SAVE_CURRENT_STATE",G=_({},D.ZP.actions,{changeRelationType:(0,R.zD)(H),applySavedState:(0,R.zD)(V),saveCurrentState:(0,R.zD)(Y)}),$=(0,d.assoc)("page",0),q=e=>(0,d.pipe)((0,d.prop)("visibleColumns"),(0,d.ifElse)((0,d.always)(e.currentRelationType),(0,d.without)(U),(0,d.concat)(U)),(0,d.intersection)(F))(e),X=e=>(0,d.path)(["visibleColumnsForRelationTypes",`${e.currentRelationType}`],e),K=e=>{const t=(0,d.either)(X,q)(e);return D.ZP.changeVisibleColumns(e,t)},J=e=>{const{currentRelationType:t,visibleColumns:n}=e;return(0,d.evolve)({visibleColumnsForRelationTypes:(0,d.assoc)(`${t}`,n)},e)},Q=(0,d.pipe)(J,(0,d.pick)(["currentRelationType","visibleColumnsForRelationTypes","filters","sorting"]));var ee=n(99341),te=n(94079),ne=n(92778),ae=n(30553),re=n(51229),oe=n(1876),le=n(60894),ie=n(79026),se=n(79692);const ce=(0,se.Z)({select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}}),pe=e=>{let{value:t,onChange:n,relationTypes:o,className:l}=e;const i=ce(),s=(0,a.useMemo)((()=>(0,d.pipe)((0,d.map)((e=>{let{label:t,uri:n}=e;return{label:t,value:n}})),(0,d.concat)([{value:"",label:Z().text("All types")}]))(o)),[o]);return r().createElement("div",{className:l},r().createElement(ie.Z,{displayEmpty:!0,disableUnderline:!0,classes:{select:i.select},TextFieldProps:{classes:{root:i.textField}},MenuProps:{classes:{list:i.selectMenu}},value:t||"",entries:s,onChange:e=>n(e||null)}))},ue=(0,se.Z)((e=>({header:{height:"56px",boxSizing:"border-box",paddingRight:"10px"},title:{fontSize:"16px"},total:{fontSize:"14px",color:e.palette.text.secondary,flexShrink:0,marginRight:"5px"},relationTypeSelector:{margin:"0px 10px 0 30px",overflow:"hidden"}}))),de=(0,a.memo)((e=>{let{total:t,filteringEnabled:n,onToggleFilters:a,columnsData:o,selectedColumns:l,currentRelationType:i,onRelationTypeChange:s,relationTypes:c,onChangeColumns:p}=e;const u=ue();return r().createElement(ne.Z,{title:Z().text("Relationships"),classes:{root:u.header,title:u.title}},c.length>0&&r().createElement(pe,{className:u.relationTypeSelector,value:i,onChange:s,relationTypes:c}),r().createElement(ae.Z,{height:28,margin:20}),r().createElement(te.Typography,{variant:"caption",className:u.total},1===t?Z().text("${count} record",{count:t}):Z().text("${count} records",{count:t})),r().createElement(re.Z,null),r().createElement(oe.Z,{enabled:n,onClick:a}),r().createElement(ae.Z,{height:28,margin:8}),r().createElement(le.Z,{columnsData:o,selectedColumns:l,onChangeColumns:p}))}));var me=n(74402),fe=n(97946),ye=n(85709),be=n(25461),ge=n(92332),he=n(67353);const ve=(0,se.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",width:"100%",fontSize:"12px",color:e.palette.text.secondary,background:"linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #FFFFFF"},rowCell:{fontSize:"13px",overflow:"hidden",overflowWrap:"break-word"},inactiveRowCell:{opacity:.6},defaultWrapper:{padding:"15px 25px 0 25px","&:last-child":{paddingBottom:"15px"}},entityCell:{display:"flex",alignItems:"flex-start",padding:"15px"},entityAvatar:{transform:"scale(0.5)",margin:"-10px 0 -10px -10px"},inactiveEntityAvatar:{overflow:"initial","&:after":{content:'""',position:"absolute",backgroundColor:"rgb(209, 206, 206)",border:"1px solid rgba(0, 0, 0, 1)",borderRadius:"2px",width:"12px",right:0,bottom:0,height:"12px"},"& > img":{borderRadius:"50%",overflow:"hidden"}},entityLabel:{color:e.palette.primary.main,textDecoration:"none",fontWeight:500},attributesWrapper:{padding:"15px 25px 10px 25px",color:"rgba(0,0,0,0.87)"},commentsContainer:{marginLeft:"auto"}}))),xe=(0,he.Z)((e=>{const t=ve();return r().createElement("div",{className:t.headCell},r().createElement(ge.default,e))}));var Ee=n(71153),Ce=n.n(Ee),we=n(19603),Se=n(31254),Te=n(31039),Oe=n(94646);const Pe=e=>{let{value:{entity:t,entityType:n,relation:a},isInactiveRelation:l}=e;const i=ve(),s=(0,o.useSelector)(m.ZP.selectors.getEntityUri);return r().createElement("div",{className:Ce()(i.entityCell,we.U)},r().createElement(Se.Z,{className:Ce()(i.entityAvatar,{[i.inactiveEntityAvatar]:l}),entityType:n}),r().createElement(Te.Z,{value:(0,f.wwR)({uri:t.entityUri,dataTenant:t.dataTenant}),className:i.entityLabel},(0,f.idV)(t.entityLabel)),r().createElement("div",{className:i.commentsContainer,onClick:e=>e.stopPropagation()},r().createElement(Oe.Z,{uri:a.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:s,connection:{relation:a,entity:t}}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})))};var ke=n(80931);const De=e=>{let{columnData:t,value:{attributes:n,attributeTypes:a}}=e;const o=ve();return r().createElement("div",{className:o.attributesWrapper,onClick:e=>e.stopPropagation()},r().createElement(ke.Z,{max:t.maxAttrsToShow,entity:{attributes:n},attrTypes:a,drawLines:!1}))};var Re=n(72768);const Ne=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const a=ve();return r().createElement("div",{className:a.defaultWrapper},r().createElement(Re.Z,{value:t,dataTypeDefinition:n}))};function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=(0,d.pipe)((0,d.split)("."),(0,d.slice)(2,1/0)),Ie=e=>{if(e.startsWith("relation.attributes")){const t=Ze(e);return t.length>1?t.slice(0,-1):null}return null},Me=e=>{switch(e){case"entity.label":return Pe;case"relation.attributes":return De;default:return Ne}},Ae=(0,d.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){je(e,t,n[t])}))}return e}({sortable:!0,resizable:!0},e,{headCellRenderer:xe,nestedPath:Ie(e.id),rowCellValueRenderer:Me(e.id)}))),Fe=(0,d.cond)([[(0,d.pathEq)(["columnData","id"],"relation.attributes"),e=>{let{columnData:t,cell:n}=e;const a=(0,d.pipe)((0,d.path)(["values",0,"attributes"]),d.values,d.length)(n);return a>t.maxAttrsToShow?26*t.maxAttrsToShow+49:26*a+25}],[d.T,be.Z]]);function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ue.apply(this,arguments)}const Le=e=>{let{cell:t,CellValueRenderer:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["cell","CellValueRenderer"]);const o=ve();return r().createElement("div",{className:Ce()(o.rowCell,{[o.inactiveRowCell]:a.isInactiveRelation})},t.values.map(((e,t)=>r().createElement(n,Ue({key:t,value:e},a)))))};var ze=n(22983),Be=n(43054),_e=n(55847),We=n(22385),He=n(81137),Ve=n(83348);const Ye=(0,se.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},buttons:{display:"flex",alignItems:"center",paddingRight:"5px"}}))),Ge=(0,Ve.Z)(te.MenuItem),$e=(0,a.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=R.ZT}=e;const o=Ye(),{icon:l,disabled:i,text:s,tooltip:c,onClick:p}=n;return r().createElement(Ge,{tooltipTitle:c,showForDisabled:!0,classes:{root:o.menuItem},onClick:e=>{a(),p(e)},disabled:i,ref:t},l,r().createElement(te.Typography,{classes:{root:o.menuText}},s))}));$e.displayName="MenuItemRenderer";const qe=$e,Xe=e=>{let{disableDelete:t,connection:{entity:n,relation:l},onMenuOpen:i=R.ZT,onMenuClose:s=R.ZT,onDelete:c}=e;const p=Ye(),u=(0,o.useSelector)(m.ZP.selectors.getMetadata),y=(0,d.pipe)((0,d.prop)("relationType"),(0,f.V3K)(u),(0,f.uGe)(f.BDP.DELETE))(l),b=!t&&y,[g,h]=(0,a.useState)(!1),v=()=>h(!1),x=[{disabled:!b,text:Z().text("Delete"),icon:r().createElement(ze.Z,null),tooltip:b?null:Z().text("You don't have permissions to delete"),onClick:()=>h(!0)}],E=(0,a.useCallback)((()=>{g||s()}),[g,s]);return r().createElement("div",{className:p.buttons},r().createElement(_e.Z,{MenuItemRenderer:qe,menuId:"relationships-table-actions",buttonComponent:We.Z,buttonProps:{icon:Be.Z,size:"S"},menuItems:x,onMenuOpen:i,onMenuClose:E}),r().createElement(He.Z,{open:g,title:Z().text('Do you want to delete relationship "${label}"?',{label:(C=(0,f.idV)(n.entityLabel),C.length>17?`${C.substring(0,17)}...`:C)}),content:Z().text("This relationship will be removed and all the values in the relationship will be permanently deleted. Are you sure you want to delete this relationship?"),onSave:(0,d.pipe)(v,s,c),onDiscard:(0,d.pipe)(v,s),saveCaption:Z().text("Delete"),discardCaption:Z().text("Cancel")}));var C},Ke=(0,se.Z)({tableContainer:{flex:1,overflow:"hidden",display:"flex",zIndex:0},hoveredRowRightContentWrapper:{width:"100%",pointerEvents:"none!important"},menuButtonContainer:{position:"absolute",top:"calc(50% - 12px)",right:0,pointerEvents:"all"},tooltipAnchor:{width:"100%",height:"1px"}});function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Je.apply(this,arguments)}const Qe=(0,a.memo)((e=>{let{metadata:t,connections:n,columnsData:o,sorting:l,onSort:i,filters:s,onFilter:c,onRowClick:p,tableRef:u,onDelete:m,readOnly:y}=e;const b=Ke(),g=(0,a.useMemo)((()=>((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.reduce)(((t,a)=>{let{id:r}=a;return(0,d.assoc)(r,((e,t,n)=>{let{entity:a,relation:r}=t;switch(n){case"entity.label":return{entity:a,entityType:(0,f.nt9)(e,a.entityType),relation:r};case"relation.type":return r.relationType;case"relation.label":return r.relationLabel;case"relation.activeness.startDate":return r.startDate;case"relation.activeness.endDate":return r.endDate;case"relation.attributes":return{attributes:r.object.attributes,attributeTypes:(0,f.V3K)(e,r.relationType).attributes};default:return((e,t)=>(0,d.pipe)((0,d.path)(["object","attributes"]),(0,f.tT_)(e))(t))(Ze(n),r)}})(e,n,r),t)}),{}),(0,d.assoc)("rawValue",n))(t))))(t,o,n)),[t,n,o]),h=(0,a.useMemo)((()=>Ae(o)),[o]),{getDynamicRowCellHeight:v,changeRowCellHeight:x}=(0,me.Z)(),E=(0,a.useCallback)((0,d.either)(v,Fe),[v,Fe]),[C,w]=(0,a.useState)(null),S=(0,a.useCallback)((e=>{const t=!(0,f.Fn9)(e.rowValue.rawValue.relation);return r().createElement(fe.Z,Je({onChangeHeight:x},e),r().createElement(Le,Je({},e,{isInactiveRelation:t})))}),[x]),[T,O]=(0,a.useState)(!1),P=(0,a.useCallback)((()=>O(!0)),[]),k=(0,a.useCallback)((()=>{w(null),O(!1)}),[]),D=(0,a.useCallback)((e=>w((t=>T?t:e))),[T]),R=(0,a.useMemo)((()=>{const e=null!=C?g[C].rawValue:null,t=!(0,f.Fn9)(null==e?void 0:e.relation);return e&&r().createElement(r().Fragment,null,r().createElement(te.Tooltip,{key:e.relation.relationUri,open:t,title:Z().text("Inactive")},r().createElement("div",{className:b.tooltipAnchor})),r().createElement("div",{className:b.menuButtonContainer},r().createElement(Xe,{disableDelete:y,connection:e,onMenuOpen:P,onMenuClose:k,onDelete:()=>m(e.relation.relationUri)})))}),[m,g,C]);return r().createElement("div",{className:b.tableContainer},r().createElement(ye.Z,{fixFirstColumn:!0,columnsData:h,rowsData:g,sorting:l,onSort:i,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:48,getRowCellHeight:E,renderRowCell:S,onRowClick:p,ref:u,hoverStateEnabled:!0,hoverRowIndex:C,onRowHover:D,hoveredRowRightContent:R,classes:{hoveredRowRightContentWrapper:b.hoveredRowRightContentWrapper}}))}));var et=n(67218),tt=n(85965),nt=n(39417),at=n(10237),rt=n(63149),ot=n(48017),lt=n(96955),it=n(66095),st=n(20982),ct=n(99144),pt=n(65549),ut=n(52017),dt=n(90186);const mt=(0,se.Z)((()=>({tableRow:{"& + &":{marginTop:"4px"},margin:"auto",maxWidth:"448px"}})));function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yt=(0,a.memo)((e=>{let{readOnly:t,relation:n,metadata:o,selectedAttributeTypes:l,onDeleteCrosswalk:i,onEditCrosswalk:s}=e;const c=mt(),p=(0,f.V3K)(o,n.type),u=(0,a.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,d.pipe)((0,d.propOr)([],"crosswalks"),(0,d.map)((0,d.assoc)("ownerType","entity")),(0,dt.o)(e.type,t))(e)}(n,l)),[n,l]),[m,y]=(0,a.useState)([]),b=(0,a.useCallback)((e=>{i({entityUri:n.uri,crosswalkId:e})}),[i,n.uri]),g=(0,a.useCallback)((e=>{s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ft(e,t,n[t])}))}return e}({entityUri:n.uri},e))}),[s,n.uri]);return r().createElement("div",null,u.map((e=>{let{source:n,crosswalksByTypes:a}=e;return r().createElement("div",{key:n,className:c.tableRow},r().createElement(ut.Z,{source:n,crosswalksByTypes:a,expanded:m.includes(n),disableEditCrosswalk:!(0,f.Zm0)(p)||t,disableDeleteCrosswalk:!(0,f.a14)(p)||t,onEdit:g,onDelete:b,onToggleExpanded:()=>{y((0,d.ifElse)((0,d.includes)(n),(0,d.without)([n]),(0,d.append)(n)))}}))})))}));var bt=n(79769);const gt=(0,se.Z)((e=>({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"20px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},title:{fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary,marginLeft:"12px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"4px 14px 10px"},hintText:{marginLeft:"8px",fontSize:"12px",lineHeight:"16px"},buttons:{display:"flex",padding:"8px 6px 4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{paddingLeft:25,margin:"auto",maxWidth:"448px",boxSizing:"border-box",marginBottom:"4px"},tableContainer:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"}}))),ht=(0,Ve.Z)(te.Button),vt=(0,a.memo)((e=>{let{className:t,readOnly:n,relation:l,selectedAttributeTypes:i,onAddCrosswalk:s,onDeleteCrosswalk:c,onEditCrosswalk:p}=e;const u=gt(),d=(0,o.useSelector)(m.ZP.selectors.getMetadata),y=(0,f.V3K)(d,l.type),[b,g]=(0,a.useState)(!1),h=(0,f.mkC)(y)&&!n;return r().createElement("div",{className:t},r().createElement("div",{className:u.header},r().createElement("span",{className:u.title},Z().text("Legend"))),r().createElement("div",{className:u.buttons},r().createElement(ht,{color:"primary",showForDisabled:!0,disabled:!h,tooltipTitle:h?null:Z().text("You don't have permissions to add crosswalk"),onClick:()=>g(!0)},r().createElement(pt.Z,{className:u.icon}),r().createElement("div",{className:u.buttonLabel},Z().text("Crosswalk")))),r().createElement("div",{className:u.hint},r().createElement(ct.Z,{className:u.icon}),r().createElement("span",{className:u.hintText},Z().text("You can drag a crosswalk to add values to attributes swimlanes"))),r().createElement("div",{className:u.tableContainer},b&&r().createElement(bt.Z,{className:u.editor,onAdd:e=>s({entity:l,crosswalk:e}),onClose:()=>g(!1)}),r().createElement(yt,{readOnly:n,metadata:d,relation:l,selectedAttributeTypes:i,onDeleteCrosswalk:c,onEditCrosswalk:p})))}));var xt=n(88611),Et=n(23147),Ct=n(94111),wt=n(68439);const St=(0,se.Z)((e=>({entityInfo:{flex:"0 1 auto",overflow:"hidden",minWidth:"100px"},entityLabelContainer:{display:"flex",alignItems:"center",overflow:"hidden"},entityLabel:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary},infoIcon:{fontSize:"16px",color:e.palette.text.secondary,marginLeft:"5px"},profileBand:{margin:"-10px",maxWidth:"500px"},entityTypeBadge:{marginTop:"7px"}}))),Tt=e=>{let{entity:t}=e;const n=St(),a=(0,f.idV)(t.label);return r().createElement("div",{className:n.entityInfo},r().createElement("div",{className:n.entityLabelContainer},r().createElement(xt.C,{value:a},r().createElement(te.Typography,{variant:"h6",className:n.entityLabel,noWrap:!0},a)),r().createElement(Ct.Z,{title:r().createElement(C.Z,{className:n.profileBand,entity:t}),placement:"right"},r().createElement(ct.Z,{className:n.infoIcon}))),r().createElement(wt.Z,{className:n.entityTypeBadge,entity:t,size:"medium"}))},Ot=(0,se.Z)((e=>({root:{flexShrink:0,overflow:"hidden",width:"110px"},label:{color:e.palette.text.secondary,fontSize:"13px"}}))),Pt=e=>{let{relation:t}=e;const n=Ot(),{direction:a,relationLabel:o}=t;return r().createElement("div",{className:n.root},r().createElement(xt.C,{value:o},r().createElement(te.Typography,{variant:"subtitle2",className:n.label,align:"center",noWrap:!0},o)),r().createElement("svg",{width:"110",height:"12",fill:"black",fillOpacity:"0.3"},"out"===a&&r().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 0 9, 0 3, 94 3"}),"bidirectional"===a&&r().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 16 9, 16 12, 0 6, 16 0, 16 3, 94 3"}),"in"===a&&r().createElement("polygon",{points:"16 12, 0 6, 16 0, 16 3, 110 3, 110 9, 16 9"})))};var kt=n(8459),Dt=n(27604);const Rt=(0,se.Z)((()=>({root:{"&:hover $editButton":{visibility:"visible"}},editButton:{visibility:"hidden",marginLeft:"4px",marginBottom:"4px"},paper:{width:"150px",border:"3px solid rgba(0, 0, 0, 0.3)",borderRadius:"4px",boxSizing:"border-box",overflow:"hidden"}}))),Nt=e=>{let{value:t=null,onChange:n,readOnly:o}=e;const l=Rt(),i=(0,a.useRef)(),[s,c]=(0,a.useState)(!1),p=()=>c(!1),[u,d]=(0,a.useState)(t),m=()=>{u!==t&&n(u),p()};return r().createElement("span",{ref:i,className:l.root},t&&(0,f.p6d)(t),r().createElement(We.Z,{disabled:o,icon:Dt.Z,size:"XXS",className:l.editButton,onClick:()=>c(!0)}),r().createElement(te.Popover,{classes:{paper:l.paper},open:s,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:14,horizontal:20},onKeyUp:e=>{"Enter"===e.key?m():"Escape"===e.key&&p()},onBackdropClick:m},r().createElement(kt.Z,{InputProps:{autoFocus:!0,disableUnderline:!0,fullWidth:!0},size:"small",hiddenLabel:!0,label:void 0,value:u&&new Date(u),onChange:e=>d(e&&e.valueOf())})))},jt=(0,se.Z)((e=>({relationBand:{flexShrink:0,boxShadow:"inset 0px -1px 0px rgba(0,0,0,0.06)",padding:"16px 19px"},inactiveRelationBand:{opacity:.6,background:"rgba(185, 188, 197, 0.18)"},toolbar:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"10px"},mainInfo:{display:"flex",gap:"16px",marginLeft:"40px"},detailsInfo:{display:"flex",gap:"34px",marginLeft:"40px",marginTop:"17px",color:e.palette.text.secondary,fontSize:"13px"},detailTitle:{color:e.palette.text.primary,flexShrink:0,marginRight:"4px"},directionalLabel:{display:"flex",overflow:"hidden","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},relationDate:{flexShrink:0},commentsContainer:{marginRight:"18px"}})));function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){It(e,t,n[t])}))}return e}function It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mt=(0,a.memo)((e=>{let{readOnly:t,entity:n,connection:a,onNavigateBack:o,onDelete:l,onChangeActivenessDate:i}=e;const s=!(0,f.Fn9)(a.relation),c=jt();return r().createElement("div",{className:Ce()(c.relationBand,we.U,{[c.inactiveRelationBand]:s})},r().createElement("div",{className:c.toolbar},r().createElement(We.Z,{icon:Et.Z,size:"S",onClick:()=>o()}),r().createElement(te.Typography,{variant:"subtitle2",display:"inline"},Z().text("Back to relationships")),r().createElement(re.Z,null),r().createElement("div",{className:c.commentsContainer},r().createElement(Oe.Z,{uri:a.relation.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:null==n?void 0:n.uri,connection:a}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})),r().createElement(Xe,{connection:a,onDelete:l,disableDelete:t})),r().createElement("div",{className:c.mainInfo},r().createElement(Tt,{entity:n}),r().createElement(Pt,{relation:a.relation}),r().createElement(Tt,{entity:Zt({},a.entity.object,{dataTenant:a.entity.dataTenant})})),r().createElement("div",{className:c.detailsInfo},r().createElement("div",{className:c.directionalLabel},r().createElement("span",{className:c.detailTitle},Z().text("Directional label:")),r().createElement(xt.C,{value:a.relation.relationLabel},r().createElement("span",null,a.relation.relationLabel))),r().createElement("div",{className:c.relationDate},r().createElement("span",{className:c.detailTitle},Z().text("Start date:")),r().createElement(Nt,{value:a.relation.startDate,onChange:e=>i("startDate",e),readOnly:t})),r().createElement("div",{className:c.relationDate},r().createElement("span",{className:c.detailTitle},Z().text("End date:")),r().createElement(Nt,{value:a.relation.endDate,onChange:e=>i("endDate",e),readOnly:t}))))})),At=e=>{console.error(e),u.Z.addError({title:Z().text("Error"),message:(0,f.xU7)(e,Z().text("Something went wrong"))})};var Ft=n(58651),Ut=n(13896);const Lt=(0,se.Z)({detailsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},locked:{pointerEvents:"none"},resizablePanesWrapper:{flexGrow:1},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}),zt=(0,a.memo)((e=>{let{entity:t,connection:n,visibleColumns:o,onClose:l,onDeleteConnection:i,onChangeConnection:s,onChangeVisibleColumns:c,readOnly:p}=e;const u=Lt(),m=(()=>{const[e,t]=(0,a.useState)([]),n=(0,a.useRef)([]),r=(0,a.useCallback)((0,f.DsO)((()=>{t([...n.current])}),50),[]),o=(0,a.useCallback)((e=>{n.current=e,r(e)}),[r]),l=(0,a.useCallback)(((e,t)=>{e&&o(t?[e]:[])}),[o]),[i,s]=(0,a.useState)([]),c=(0,a.useCallback)((e=>{e&&s((t=>{return n=[e],a=t,(0,d.concat)(n.filter((e=>!(0,d.any)((0,f.aFF)(e),a))),a.filter((e=>!(0,d.any)((0,f.aFF)(e),n))));var n,a}))}),[]);return{highlightedCrosswalks:(0,a.useMemo)((()=>[...e,...i]),[e,i]),focusedCrosswalks:i,toggleCrosswalkFocus:c,setCrosswalkHighlighted:l}})(),[y,b]=(0,a.useState)(-480),g=(0,a.useCallback)((e=>{let{percentageSize:t}=e;return b(t)}),[]),[h,v]=(0,a.useState)(),[x,E]=(0,a.useState)(!1),C=n.relation.relationUri,w=(0,et._)(),S=(0,a.useCallback)((()=>E(!0)),[]),T=(0,a.useCallback)((()=>E(!1)),[]),O=(0,a.useCallback)((0,d.pipe)(i,S),[]),[P,k]=(0,a.useMemo)((()=>{const e=e=>{e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND?(At(e),t()):e.errorCode===f.Xt7.OBJECT_NOT_FOUND?l(e):(At(e),T())},t=()=>{w((0,f._vs)(C)).then((e=>{s((0,d.assocPath)(["relation","object"],e,n)),T()})).catch(e)};return[e,t]}),[n,T,s,l]),{modifiedEntity:D,crosswalksMap:R,newlyCreatedAttributes:N,onPinAttribute:j,onIgnoreAttribute:Z,onAddAttribute:I,onEditAttribute:M,onDeleteAttribute:A}=(0,tt.Q)({entity:n.relation.object,onModify:k,onError:P,onLoad:S}),{addCrosswalk:F,deleteCrosswalk:U,editCrosswalk:L}=(0,nt.P)({onSuccess:k,onError:P,onLoad:S}),z=(0,a.useCallback)(((e,t)=>{S(),(t?(0,f.rj2)({entityUri:C,attributeName:e,value:t}).then((()=>s((0,d.assocPath)(["relation",e],t,n)))):(0,f.X78)({entityUri:C,attributeName:e}).then((()=>s((0,d.dissocPath)(["relation",e],n))))).then(T).catch(P)}),[n,S,T,P]);return r().createElement(at.Z,{className:u.detailsView},r().createElement(rt.hR,m,r().createElement(Ut.DndProvider,{backend:Ft.default},r().createElement(ot.Z,null),r().createElement(lt.Z,{className:Ce()(u.resizablePanesWrapper,{[u.locked]:x}),orientation:"vertical",size:y,minSize:600,maxSize:-480,allowResize:!0,onChange:g},r().createElement("div",{className:u.pane},r().createElement(Mt,{readOnly:p,entity:t,connection:n,onNavigateBack:l,onDelete:O,onChangeActivenessDate:z}),r().createElement(it.R,{attributeUris:N},r().createElement(st.Z,{readOnly:p,entity:D,crosswalksMap:R,isLoading:x,onPin:j,onIgnore:Z,onEdit:M,onAdd:I,onDelete:A,selectedAttributeTypes:h,onSelectAttributeTypes:v,visibleColumns:o,onChangeVisibleColumns:c}))),r().createElement(vt,{readOnly:p,className:u.pane,relation:n.relation.object,selectedAttributeTypes:h,onAddCrosswalk:F,onDeleteCrosswalk:U,onEditCrosswalk:L})))))})),Bt=(0,se.Z)({relationshipsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},pane:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}}),_t=(0,o.connect)(((e,t)=>{let{config:{id:n}}=t;return{entity:m.ZP.selectors.getEntity(e),metadata:m.ZP.selectors.getMetadata(e),connections:m.ZP.selectors.getConnectionsByViewId(e,n),total:m.ZP.selectors.getTotalByViewId(e,n)}}))((e=>{let{config:t,entity:n,metadata:o,connections:l,total:i,saveState:s,getSavedState:c,dispatch:p}=e;const u=Bt(),P=(0,a.useRef)(),R=(0,y.U)(),j=(0,f.biM)(n),{type:Z}=n||{},[{visibleColumns:I,filters:M,page:z,rowsPerPage:W,sorting:q,currentRelationType:te,stateToSave:ne,entityTypeOfAppliedSavedState:ae},{changeColumns:re,toggleFilters:oe,changeFilter:le,changePage:ie,changeRowsPerPage:se,toggleSort:ce,changeRelationType:pe,saveCurrentState:ue,applySavedState:me}]=(e=>{let{defaultColumns:t,defaultSorting:n,defaultRowsPerPage:r}=e;const o={visibleColumns:t,filters:null,sorting:n,page:0,rowsPerPage:r,currentRelationType:null,stateToSave:null,visibleColumnsForRelationTypes:{},entityTypeOfAppliedSavedState:null},[l,i]=(0,a.useReducer)(((e,t)=>{switch(t.type){case H:{const n=t.payload;return(0,d.pipe)(J,(0,d.assoc)("currentRelationType",n),K,$)(e)}case V:{const{savedState:n,entityTypeUri:a}=t.payload;return _({},e,n,{visibleColumns:n?X(n):e.visibleColumns,entityTypeOfAppliedSavedState:a})}case Y:return _({},e,{stateToSave:Q(e)});default:return D.ZP.reducer(e,t)}}),o);return[l,(0,N.o)({actions:G,dispatch:i})]})({defaultColumns:F,defaultRowsPerPage:L[0],defaultSorting:{field:F[0],order:"asc"}}),fe=ae===Z,{isLoading:ye,relationsTableSavedState:be,attributesTableSavedState:ge,updateRelationsTableSavedState:he,updateAttributesTableSavedState:ve}=(e=>{var t;let{getSavedState:n,saveState:r,entityTypeUri:o}=e;const[l,i]=(0,a.useState)(k),[s,c]=(0,a.useState)(null);(0,b.D)((()=>{s&&(i(O({},l,{relationsTable:s})),c(null))}),[o]);const[p,u]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{n().then((e=>{i(e||k)})).then((e=>u(!1))).catch((e=>u(!1)))}),[]),{isLoading:p,relationsTableSavedState:null===(t=l.relationsTable)||void 0===t?void 0:t[o],attributesTableSavedState:l.attributesTable,updateRelationsTableSavedState:e=>{const t=O({},l.relationsTable,{[o]:e});c(t),r(O({},l,{relationsTable:t}))},updateAttributesTableSavedState:e=>{r(O({},l,{attributesTable:e}))}}})({getSavedState:c,saveState:s,entityTypeUri:Z}),[xe,Ee]=(0,a.useState)();(0,a.useEffect)((()=>{ye||me({savedState:be,entityTypeUri:Z})}),[ye,Z]),(0,a.useEffect)((()=>{ye||Ee(null==ge?void 0:ge.visibleColumns)}),[ye]),(0,b.D)((()=>{fe&&he(ne)}),[ne]),(0,b.D)((()=>{ie(0)}),[n]);const[Ce,we]=(0,a.useState)(),Se=(0,a.useCallback)((()=>{we(null)}),[]),Te=(0,a.useMemo)((()=>{const e=(0,f.io3)(o,Z);return o.relationTypes.filter((0,d.both)((0,f.uGe)(f.BDP.READ),(t=>{let{startObject:n,endObject:a}=t;return e.some((0,d.either)((0,d.equals)(n.objectTypeURI),(0,d.equals)(a.objectTypeURI)))})))}),[o,Z]),Oe=(0,a.useMemo)((()=>((e,t)=>t?(0,d.pipe)((0,d.find)((e=>e.uri===t)),f.DK$,B,(0,d.concat)(A),(0,d.reject)((e=>{let{id:t}=e;return U.includes(t)})))(e):(e=>{return t=(0,d.assoc)("dataTypeDefinition",(e=>({type:f.oS0.TYPE_SELECT,options:e.map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))}))(e)),e=>(0,d.adjust)(e.findIndex((0,d.propEq)("id","relation.type")),t,e);var t})(e)(A))(Te,te)),[Te,te]),Pe=(0,a.useMemo)((()=>I.map((e=>Oe.find((0,d.propEq)("id",e)))).filter(d.identity)),[I,Oe]),ke=(0,a.useMemo)((()=>{const e=(0,d.pipe)((0,d.when)((0,d.always)(te),(0,d.filter)((0,d.propEq)("uri",te))),(0,d.map)((0,d.prop)("uri")))(Te);return{id:t.id,content:{inRelations:e,outRelations:e}}}),[t.id,te,Te]),De=(0,a.useMemo)((()=>((e,t)=>{const n=(0,ee.Tz)(t,e);return(new f.MEy).addClause(n).build()})(M,Pe)),[M,Pe]),{isLoading:Re,reload:Ne}=(0,g.a)({page:z,rowsPerPage:W,config:ke,entity:fe?n:null,filter:De,mode:f.ARY.Viewing,sorting:q}),je=!fe||Re,Ze=(0,a.useCallback)((0,d.pipe)(ce,ue),[ce,ue]),Ie=(0,a.useCallback)((0,d.pipe)(le,ue),[le,ue]),Me=(0,a.useCallback)((0,d.pipe)(oe,ue),[oe,ue]),Ae=(0,a.useCallback)((0,d.pipe)(re,ue),[re,ue]),Fe=(0,a.useCallback)((0,d.pipe)(pe,ue),[pe,ue]),Ue=(0,a.useCallback)((e=>{Ee(e),ve({visibleColumns:e})}),[ve]),Le=null==l?void 0:l[Ce],ze=(0,a.useCallback)((e=>{p(m.N5.relations.actions.relationsLoaded({id:t.id,connections:(0,d.update)(Ce,e,l),total:i}))}),[Le]),[Be,_e]=(0,a.useMemo)((()=>[(0,f.w3p)(l),[f.q7e.RELATION]]),[l]),We=(0,h.C)({objectIds:Be,objectTypes:_e,enabled:!j}),He=(0,a.useMemo)((()=>(0,f.Px$)(l)),[l]),Ve=(0,a.useCallback)((e=>{At(e),e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Ne()}),[Ne]),Ye=(0,a.useCallback)((e=>{(0,d.pipe)(f.VGk,(0,d.andThen)(Ne),(0,d.otherwise)(Ve))(e)}),[Ne,Ve]),Ge=(0,a.useCallback)((()=>{(0,d.pipe)(f.VGk,(0,d.andThen)((0,d.pipe)(Se,Ne)),(0,d.otherwise)((e=>{e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Se(),Ve(e)})))(Le.relation.relationUri)}),[Le,Ne,Se,Ve]),$e=(0,a.useCallback)((e=>{e&&Ve(e),Se()}),[Ve,Se]);return r().createElement(v.s.Provider,{value:R},r().createElement(x.h.Provider,{value:We},r().createElement(E.X.Provider,{value:He},r().createElement("div",{className:u.relationshipsView},r().createElement(C.Z,{entity:n},r().createElement(w.a,null)),r().createElement(de,{total:i,filteringEnabled:!!M,onToggleFilters:Me,columnsData:Oe,selectedColumns:I,onChangeColumns:Ae,relationTypes:Te,currentRelationType:te,onRelationTypeChange:Fe}),r().createElement("div",{className:u.pane},je&&r().createElement(S.Z,null),r().createElement(Qe,{readOnly:j,metadata:o,connections:l,columnsData:Pe,sorting:q,onSort:Ze,filters:M,onFilter:Ie,onRowClick:we,tableRef:P,onDelete:Ye}),r().createElement(T.Z,{count:i,rowsPerPageOptions:L,page:z,onChangePage:ie,rowsPerPage:W,onChangeRowsPerPage:se,basicTableRef:P})),Le&&r().createElement(zt,{readOnly:j,entity:n,visibleColumns:xe,onChangeVisibleColumns:Ue,connection:Le,onClose:$e,onDeleteConnection:Ge,onChangeConnection:ze})))))})),Wt=(0,i.createGenerateClassName)({productionPrefix:"relationshipsPerspective",disableGlobal:!0}),Ht=e=>{let{config:t,store:n,onResize:d,saveState:m,getSavedState:y}=e;const b=(0,a.useCallback)((0,f.aYu)(y),[y]);return r().createElement(o.Provider,{store:n},r().createElement(p.m.Provider,{value:t.id},r().createElement(i.StylesProvider,{generateClassName:Wt},r().createElement(c.MuiPickersUtilsProvider,{utils:l.Z},r().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==d?void 0:d(Math.floor(e),Math.floor(t))}),t&&r().createElement(_t,{config:t,saveState:m,getSavedState:b}),r().createElement(u.Z,null)))))}},46847:(e,t,n)=>{function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,i=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==i){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var p=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;p.call(this,e,t,a)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),a.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6971],{8598:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(95038),r=n.n(a);const o=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,a=t.instance,o=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=a||o||r(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),a=0,r=t,o=[];r.isBefore(n);){var l=Math.floor(a/7);o[l]=o[l]||[],o[l].push(r),r=r.clone().add(1,"day"),a+=1}return o},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),a=this.moment(t).endOf("year"),r=[],o=n;o.isBefore(a);)r.push(o),o=o.clone().add(1,"year");return r},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},27604:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=o},99144:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=o},67766:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");t.Z=o},42767:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=o},72753:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=o},32528:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(13688),r=n(48852);const o=e=>t=>(0,r.l)(a.X,e,t)},1876:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(24328),r=n.n(a),o=n(13980),l=n.n(o),i=n(87918),s=n.n(i),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=e=>r().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const a=m();return r().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},r().createElement(c.IconButton,{onClick:n,classes:{root:a.button}},t?r().createElement(r().Fragment,null,r().createElement(d,{className:a["filterIcon--enabled"]}),r().createElement(p.default,{color:"primary",className:a.closeIcon})):r().createElement(d,null)))};f.propTypes={enabled:l().bool,onClick:l().func};const y=f},58662:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(13980),r=n.n(a),o=n(24328),l=n.n(o),i=n(71153),s=n.n(i),c=n(94079),p=n(87918),u=n.n(p),d=n(31276),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:a,page:r,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:b,basicTableRef:g,labelRowsPerPage:h}=e;const v=f(),x=(0,o.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],g)()}),[g]),E=(0,o.useCallback)((e=>{i(e),x()}),[i,x]),C=(0,o.useCallback)((e=>{i(0),b(e),x()}),[i,b,x]);return l().createElement(c.TablePagination,{classes:y({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:h||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(a,"0,0")})},count:n,rowsPerPageOptions:a,page:r,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};g.propTypes={classes:r().object,rowsPerPageOptions:r().arrayOf(r().number),count:r().number,page:r().number,onChangePage:r().func,rowsPerPage:r().number,onChangeRowsPerPage:r().func,basicTableRef:r().shape({current:r().object}),labelRowsPerPage:r().string};const h=l().memo(g)},26180:(e,t,n)=>{n.d(t,{ZP:()=>y});var a=n(17440),r=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i="CHANGE_COLUMNS",s="TOGGLE_FILTERS",c="CHANGE_FILTER",p="TOGGLE_SORT",u="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",m={changeColumns:(0,r.zD)(i),toggleFilters:(0,r.zD)(s),changeFilter:(0,r.zD)(c),toggleSort:(0,r.zD)(p),changePage:(0,r.zD)(u),changeRowsPerPage:(0,r.zD)(d)},f=(e,t)=>{const n=(0,a.difference)(e.visibleColumns,t),r=e=>n.includes(e);return(0,a.evolve)({visibleColumns:(0,a.always)(t),sorting:(0,a.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,a.keys)(e).reduce(((e,t)=>r(t)?(0,a.dissoc)(t,e):e),e)},e)},y={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return f(e,n)}case s:{const t=!e.filters;return o({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:r}=t.payload;return(0,a.evolve)({filters:r?(0,a.assoc)(n,r):(0,a.dissoc)(n),page:(0,a.always)(0)},e)}case p:{const n=t.payload,l=(0,a.path)(["sorting","field"],e),i=(0,a.path)(["sorting","order"],e);return o({},e,{sorting:{field:n,order:(0,r.Dh)(n===l?i:null)},page:0})}case u:return o({},e,{page:t.payload});case d:return o({},e,{rowsPerPage:t.payload});default:return e}},actions:m,changeVisibleColumns:f}},10237:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(27556),r=n(13980),o=n.n(r),l=n(24328),i=n.n(l);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=(0,l.forwardRef)(((e,t)=>{let{children:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=p();return i().createElement(a.Z,u({ref:t,className:r,classes:{root:l["basic-view__paper"]}},o),n)}));d.displayName="BasicView",d.propTypes={children:o().node,className:o().string};const m=d},81137:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),r=n.n(a),o=n(87918),l=n.n(o),i=n(94079);const s=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),c=e=>{let{open:t,title:n,content:a,onCancel:o,cancelCaption:c=l().text("Cancel"),onDiscard:p,discardCaption:u="",onSave:d,saveCaption:m=l().text("Save"),disabledSave:f=!1}=e;const y=s();return r().createElement(i.Dialog,{open:t,onClose:o,classes:{paperScrollPaper:y.paper}},r().createElement(i.DialogTitle,{classes:{root:y.title}},n),r().createElement(i.DialogContent,{classes:{root:y.content}},r().createElement(i.DialogContentText,{classes:{root:y.contentText}},a)),r().createElement(i.DialogActions,{className:y.actionButtons,disableSpacing:!0},o&&r().createElement(i.Button,{onClick:o},c),r().createElement("div",null,p&&r().createElement(i.Button,{onClick:p,classes:{root:y.discardButton}},u),r().createElement(i.Button,{onClick:d,color:"primary",disabled:f,autoFocus:!0},m))))}},68439:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(24328),r=n.n(a),o=n(52730),l=n(71153),i=n.n(l),s=n(94079),c=n(56306),p=n(59431),u=n(88611);const d=(0,n(79692).Z)({"entityType-overflow":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",marginRight:"16px"}}),m=e=>{let{entity:t,className:n,size:a="small"}=e;const l=d(),m=(0,o.useSelector)(p.ZP.selectors.getMetadata),f=t.type,y=(0,c.nt9)(m,f)||{},b=(0,c.VD3)(m,y,"typeColor")||c.rSc.palette.primary.main,g=(0,c.jFi)(m,t);return r().createElement(u.C,{value:g,placement:"top"},r().createElement(s.Typography,{style:{backgroundColor:b,color:c.P6Y.Colors.getColor(b)?"#FFFFFF":"#212121"},className:i()(l[`entityType-${a}`],l["entityType-overflow"],n),component:"div"},g))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),r=n.n(a),o=n(13980),l=n.n(o),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(94079),d=n(87918),m=n.n(d),f=n(56306),y=n(59431),b=n(53180),g=n(68439);const h=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:o,classes:l}=e;const i=h({classes:l}),d=(0,c.useSelector)(y.ZP.selectors.getMetadata),v=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const x=(0,f.idV)(n.label),E=n.secondaryLabel,C=(0,f.ptG)(d,n),w=(0,f.Fn9)(n),S=n.uri,T=(0,f.BTI)(n);return r().createElement("div",{className:s()(i.profileBandWrapper,t)},r().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":S},r().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),r().createElement("div",{className:i.profileInfo},r().createElement("div",null,r().createElement(u.Typography,{variant:"h6",className:i.label},x),E&&r().createElement(u.Typography,{variant:"subtitle2",className:i.secondaryLabel},E),C&&r().createElement(u.Typography,{variant:"subtitle1",className:i.businessCard},C)),r().createElement("div",{className:i.specialInfo},r().createElement("div",{className:i.entityType},r().createElement(g.Z,{entity:n,size:"medium",className:i.badge}),!(0,f.ZiX)(S)&&r().createElement(u.Tooltip,{title:m().text("Copy to clipboard")},r().createElement(u.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",T))))),o&&r().createElement("div",null,o)))};v.propTypes={className:l().string,entity:l().object,children:l().node,classes:l().object};const x=v},30553:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(13980),r=n.n(a),o=n(24328),l=n.n(o);const i=e=>{let{height:t,margin:n}=e;return l().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};i.propTypes={height:r().number,margin:r().number};const s=i},86361:(e,t,n)=>{n.d(t,{o:()=>l});var a=n(24328),r=n(17440);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{actions:t,dispatch:n}=e;return(0,a.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[a,l]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){o(e,t,n[t])}))}return e}({},e,{[a]:(0,r.pipe)(l,n)})}),{})),[n,t])}},7718:(e,t,n)=>{n.d(t,{C:()=>f});var a=n(24328),r=n(52730),o=n(17440),l=n(56306),i=n(59431);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(e,t)=>t.filter((t=>t.replyId!==e)),u=(e,t)=>{const n=e.replies.findIndex((e=>{let{replyId:n}=e;return n===t.replyId})),a=[...e.replies];return a[n]=t,a},d=[],m=e=>console.error("Collaboration error",e),f=e=>{let{objectIds:t=d,objectTypes:n,enabled:c=!0}=e;const f=(0,r.useSelector)(i.ZP.selectors.getEntity),y=(0,r.useSelector)(i.ZP.selectors.getTenant),b=(0,r.useSelector)(i.ZP.selectors.getCollaborationPath),g=(0,r.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[h,v]=(0,a.useState)(null),[x,E]=(0,a.useState)([]),[C,w]=(0,a.useState)(null),[S,T]=(0,a.useState)(null),[O,P]=(0,a.useState)(!1),[k,D]=(0,a.useState)(!1),R=(0,a.useCallback)((e=>{w((t=>s({},t,e)))}),[]),N=null==f?void 0:f.uri,j=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(g&&N&&!(0,l.ZiX)(N)){const n=e=>{console.warn("Collaboration error",e),w(null)};(0,o.pipe)(l.$oF,(0,o.andThen)((0,o.map)((0,o.props)(["objectId","comments"]))),(0,o.andThen)(o.fromPairs),(0,o.andThen)(t?w:R),(0,o.otherwise)(n))({uris:e,tenant:y,collaborationPath:b})}else w(null)}),[R,b,N,g,y]);(0,a.useEffect)((()=>{j(t,!0)}),[t,j]);const Z=(0,a.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:b,tenant:y,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;E((e=>t?(0,o.uniqBy)((0,o.prop)("commentId"),[...e,...n]):n)),v(a)})).catch(m)}),[b,y]),I=(0,a.useCallback)((e=>{D(!0),(0,l.d7q)({collaborationPath:b,tenant:y,commentId:e}).then(T).catch(m).finally((()=>D(!1)))}),[b,y]),M=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:o}=e;P(!0);const i={objectId:r,content:t,relatedObjectUris:o,objectType:a,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:b,tenant:y,data:i}).then((e=>{let[t]=e;return((e,t)=>{T(e),w((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),E((t=>[e,...t]))})(t,r)})).catch(m).finally((()=>P(!1)))}),[b,y]),A=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:i,commentId:c,replies:p}=e;P(!0);const u={objectId:r,content:t,relatedObjectUris:i,objectType:a,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:p};return(0,l.uAg)({collaborationPath:b,tenant:y,data:u}).then((e=>(e=>{T(e),E((0,o.map)((0,o.when)((0,o.propEq)("commentId",e.commentId),(0,o.always)(e))))})(s({},e,{replies:p})))).catch(m).finally((()=>P(!1)))}),[b,y]),F=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;P(!0),(0,l.YFy)({collaborationPath:b,tenant:y,commentId:n}).then((()=>((e,t)=>{T(null),w((n=>{const a=n[t]||[];return s({},n,{[t]:a.filter((t=>t.commentId!==e))})})),E((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(m).finally((()=>P(!1)))}),[b,y]),U=(0,a.useCallback)(((e,t,n,a)=>{const r="resolve"===e.action?"resolved":"open",{replyId:o}=e;T("resolved"===r?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:a?p(o,t.replies):[...t.replies,e]})}),w((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:r,replies:a?e.replies-1:e.replies+1}):e))}))),E((t=>t.map((t=>t.commentId===n?s({},t,{status:r,replies:a?p(e.replyId,t.replies):[...t.replies,e]}):t))))}),[]),L=(0,a.useCallback)((e=>{let{uri:t,commentId:n,reply:a}=e;P(!0),(0,l.Mfr)({collaborationPath:b,tenant:y,commentId:n,replyId:a.replyId}).then((()=>U(a,t,n,!0))).catch(m).finally((()=>P(!1)))}),[b,U,y]),z=(0,a.useCallback)(((e,t)=>{T((t=>{if(t)return s({},t,{replies:u(t,e)})})),E((n=>n.map((n=>n.commentId===t?s({},n,{replies:u(n,e)}):n))))}),[]),B=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,replyId:r}=e;P(!0);const o={content:t,namedUsers:n};return(0,l.ufV)({collaborationPath:b,tenant:y,commentId:a,replyId:r,data:o}).then((e=>z(e,a))).catch(m).finally((()=>P(!1)))}),[b,y,z]),_=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:r,uri:o}=e;P(!0);const i={content:t,action:r,namedUsers:n};return(0,l.PP2)({collaborationPath:b,tenant:y,commentId:a,data:i}).then((e=>{let[t]=e;return U(t,o,a)})).catch(m).finally((()=>P(!1)))}),[b,y,U]),W=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;_({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[_]),H=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;_({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[_]);return{clearCurrentComment:(0,a.useCallback)((()=>{T(null)}),[]),comments:x,commentsMap:C,createComment:M,createReply:_,currentComment:S,deleteComment:F,editComment:A,getComment:I,getComments:Z,getCommentsCount:j,loading:k,objectTypes:n,pageToken:h,reOpenThread:H,resolveThread:W,sending:O,deleteReply:L,editReply:B}}},37152:(e,t,n)=>{n.d(t,{a:()=>m});var a=n(24328),r=n(52730),o=n(17440),l=n(59431),i=n(56306),s=n(67218),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(i.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:f,entity:y,relationActivityFilter:b,mode:g}=e;const[h,v]=(0,a.useState)(!1),x=(0,r.useDispatch)(),E=(0,r.useSelector)(l.ZP.selectors.getTenant),C=(0,r.useSelector)(l.ZP.selectors.getDtssPath),{activityFilter:w,globalFilter:S}=(0,r.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,s._)(),O=f.suggested,P=(0,a.useCallback)((()=>{if(null!=y&&y.uri){const e=p({},f.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:b||i.Ng6.ALL,entity:w},max:m,offset:u*m,filter:(0,i.vyX)(S,n)||void 0,suggested:d(O)}),a=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(i.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(O)),r=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),i.ZiX),()=>Promise.resolve([{total:0}])],[i.biM,e=>(0,i.n_1)({entityUri:e.uri,configs:a,customerTenant:E,dataTenant:e.dataTenant,dtssPath:C})],[o.T,e=>(0,i.N6e)(e.uri,a)]]);v(!0),T(r(y)).then((e=>{let[{connections:t,total:n}]=e;x(l.N5.relations.actions.relationsLoaded({id:f.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[w,f,x,C,null==y?void 0:y.uri,null==y?void 0:y.dataTenant,n,S,u,b,m,T,t,E]),k=(0,a.useRef)(!1);k.current=!1,(0,a.useEffect)((()=>{k.current=!0,P()}),[P]);const D=(0,c.D)(g);return(0,a.useEffect)((()=>{g!==i.ARY.Viewing||k.current||D===g||(k.current=!0,P())}),[P,g,D]),{isLoading:h,reload:P}}},17554:(e,t,n)=>{n.d(t,{U:()=>i});var a=n(24328),r=n(52730),o=n(56306),l=n(59431);const i=()=>{const[e,t]=(0,a.useState)([]),n=(0,r.useSelector)(l.ZP.selectors.getTenant),i=(0,r.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,a.useEffect)((()=>{(0,o.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}},55451:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ht});var a=n(24328),r=n.n(a),o=n(52730),l=n(8598),i=n(36138),s=n(44443),c=n(22664),p=n(39450),u=n(585),d=n(17440),m=n(59431),f=n(56306),y=n(17554),b=n(20562),g=n(37152),h=n(7718),v=n(49759),x=n(3515),E=n(31274),C=n(57304),w=n(93873),S=n(99136),T=n(58662);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={relationsTable:{},attributesTable:{}};var D=n(26180),R=n(31276),N=n(86361),j=n(87918),Z=n.n(j);const I="relation.type",M="relation.attributes",A=[{id:"entity.label",get label(){return Z().text("Profile")},dataTypeDefinition:{type:f.oS0.TYPE_STRING},hideable:!1,filterable:!1,initialWidth:280,autoResize:!1},{id:I,get label(){return Z().text("Type")}},{id:"relation.label",get label(){return Z().text("Directional Label")},filterable:!1,dataTypeDefinition:{type:f.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return Z().text("Start Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:"relation.activeness.endDate",get label(){return Z().text("End Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:M,get label(){return Z().text("Attributes")},sortable:!1,filterable:!1,maxAttrsToShow:7}],F=(0,d.pluck)("id",A),U=[I,M],L=[20,50,100],z=(0,d.pipe)(f.Tde,(0,d.concat)("relation.")),B=(0,d.pipe)((0,d.map)((e=>({id:z(e.uri),label:e.label,dataTypeDefinition:(0,f.PFL)(e)}))),(0,d.uniqBy)((0,d.prop)("id")));function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){W(e,t,n[t])}))}return e}function W(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="CHANGE_RELATION_TYPE",V="APPLY_SAVED_STATE",Y="SAVE_CURRENT_STATE",G=_({},D.ZP.actions,{changeRelationType:(0,R.zD)(H),applySavedState:(0,R.zD)(V),saveCurrentState:(0,R.zD)(Y)}),$=(0,d.assoc)("page",0),q=e=>(0,d.pipe)((0,d.prop)("visibleColumns"),(0,d.ifElse)((0,d.always)(e.currentRelationType),(0,d.without)(U),(0,d.concat)(U)),(0,d.intersection)(F))(e),X=e=>(0,d.path)(["visibleColumnsForRelationTypes",`${e.currentRelationType}`],e),K=e=>{const t=(0,d.either)(X,q)(e);return D.ZP.changeVisibleColumns(e,t)},J=e=>{const{currentRelationType:t,visibleColumns:n}=e;return(0,d.evolve)({visibleColumnsForRelationTypes:(0,d.assoc)(`${t}`,n)},e)},Q=(0,d.pipe)(J,(0,d.pick)(["currentRelationType","visibleColumnsForRelationTypes","filters","sorting"]));var ee=n(99341),te=n(94079),ne=n(92778),ae=n(30553),re=n(51229),oe=n(1876),le=n(60894),ie=n(79026),se=n(79692);const ce=(0,se.Z)({select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}}),pe=e=>{let{value:t,onChange:n,relationTypes:o,className:l}=e;const i=ce(),s=(0,a.useMemo)((()=>(0,d.pipe)((0,d.map)((e=>{let{label:t,uri:n}=e;return{label:t,value:n}})),(0,d.concat)([{value:"",label:Z().text("All types")}]))(o)),[o]);return r().createElement("div",{className:l},r().createElement(ie.Z,{displayEmpty:!0,disableUnderline:!0,classes:{select:i.select},TextFieldProps:{classes:{root:i.textField}},MenuProps:{classes:{list:i.selectMenu}},value:t||"",entries:s,onChange:e=>n(e||null)}))},ue=(0,se.Z)((e=>({header:{height:"56px",boxSizing:"border-box",paddingRight:"10px"},title:{fontSize:"16px"},total:{fontSize:"14px",color:e.palette.text.secondary,flexShrink:0,marginRight:"5px"},relationTypeSelector:{margin:"0px 10px 0 30px",overflow:"hidden"}}))),de=(0,a.memo)((e=>{let{total:t,filteringEnabled:n,onToggleFilters:a,columnsData:o,selectedColumns:l,currentRelationType:i,onRelationTypeChange:s,relationTypes:c,onChangeColumns:p}=e;const u=ue();return r().createElement(ne.Z,{title:Z().text("Relationships"),classes:{root:u.header,title:u.title}},c.length>0&&r().createElement(pe,{className:u.relationTypeSelector,value:i,onChange:s,relationTypes:c}),r().createElement(ae.Z,{height:28,margin:20}),r().createElement(te.Typography,{variant:"caption",className:u.total},1===t?Z().text("${count} record",{count:t}):Z().text("${count} records",{count:t})),r().createElement(re.Z,null),r().createElement(oe.Z,{enabled:n,onClick:a}),r().createElement(ae.Z,{height:28,margin:8}),r().createElement(le.Z,{columnsData:o,selectedColumns:l,onChangeColumns:p}))}));var me=n(74402),fe=n(97946),ye=n(85709),be=n(25461),ge=n(92332),he=n(67353);const ve=(0,se.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",width:"100%",fontSize:"12px",color:e.palette.text.secondary,background:"linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #FFFFFF"},rowCell:{fontSize:"13px",overflow:"hidden",overflowWrap:"break-word"},inactiveRowCell:{opacity:.6},defaultWrapper:{padding:"15px 25px 0 25px","&:last-child":{paddingBottom:"15px"}},entityCell:{display:"flex",alignItems:"flex-start",padding:"15px"},entityAvatar:{transform:"scale(0.5)",margin:"-10px 0 -10px -10px"},inactiveEntityAvatar:{overflow:"initial","&:after":{content:'""',position:"absolute",backgroundColor:"rgb(209, 206, 206)",border:"1px solid rgba(0, 0, 0, 1)",borderRadius:"2px",width:"12px",right:0,bottom:0,height:"12px"},"& > img":{borderRadius:"50%",overflow:"hidden"}},entityLabel:{color:e.palette.primary.main,textDecoration:"none",fontWeight:500},attributesWrapper:{padding:"15px 25px 10px 25px",color:"rgba(0,0,0,0.87)"},commentsContainer:{marginLeft:"auto"}}))),xe=(0,he.Z)((e=>{const t=ve();return r().createElement("div",{className:t.headCell},r().createElement(ge.default,e))}));var Ee=n(71153),Ce=n.n(Ee),we=n(19603),Se=n(31254),Te=n(31039),Oe=n(94646);const Pe=e=>{let{value:{entity:t,entityType:n,relation:a},isInactiveRelation:l}=e;const i=ve(),s=(0,o.useSelector)(m.ZP.selectors.getEntityUri);return r().createElement("div",{className:Ce()(i.entityCell,we.U)},r().createElement(Se.Z,{className:Ce()(i.entityAvatar,{[i.inactiveEntityAvatar]:l}),entityType:n}),r().createElement(Te.Z,{value:(0,f.wwR)({uri:t.entityUri,dataTenant:t.dataTenant}),className:i.entityLabel},(0,f.idV)(t.entityLabel)),r().createElement("div",{className:i.commentsContainer,onClick:e=>e.stopPropagation()},r().createElement(Oe.Z,{uri:a.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:s,connection:{relation:a,entity:t}}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})))};var ke=n(80931);const De=e=>{let{columnData:t,value:{attributes:n,attributeTypes:a}}=e;const o=ve();return r().createElement("div",{className:o.attributesWrapper,onClick:e=>e.stopPropagation()},r().createElement(ke.Z,{max:t.maxAttrsToShow,entity:{attributes:n},attrTypes:a,drawLines:!1}))};var Re=n(72768);const Ne=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const a=ve();return r().createElement("div",{className:a.defaultWrapper},r().createElement(Re.Z,{value:t,dataTypeDefinition:n}))};function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=(0,d.pipe)((0,d.split)("."),(0,d.slice)(2,1/0)),Ie=e=>{if(e.startsWith("relation.attributes")){const t=Ze(e);return t.length>1?t.slice(0,-1):null}return null},Me=e=>{switch(e){case"entity.label":return Pe;case"relation.attributes":return De;default:return Ne}},Ae=(0,d.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){je(e,t,n[t])}))}return e}({sortable:!0,resizable:!0},e,{headCellRenderer:xe,nestedPath:Ie(e.id),rowCellValueRenderer:Me(e.id)}))),Fe=(0,d.cond)([[(0,d.pathEq)(["columnData","id"],"relation.attributes"),e=>{let{columnData:t,cell:n}=e;const a=(0,d.pipe)((0,d.path)(["values",0,"attributes"]),d.values,d.length)(n);return a>t.maxAttrsToShow?26*t.maxAttrsToShow+49:26*a+25}],[d.T,be.Z]]);function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ue.apply(this,arguments)}const Le=e=>{let{cell:t,CellValueRenderer:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["cell","CellValueRenderer"]);const o=ve();return r().createElement("div",{className:Ce()(o.rowCell,{[o.inactiveRowCell]:a.isInactiveRelation})},t.values.map(((e,t)=>r().createElement(n,Ue({key:t,value:e},a)))))};var ze=n(22983),Be=n(43054),_e=n(55847),We=n(22385),He=n(81137),Ve=n(83348);const Ye=(0,se.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},buttons:{display:"flex",alignItems:"center",paddingRight:"5px"}}))),Ge=(0,Ve.Z)(te.MenuItem),$e=(0,a.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=R.ZT}=e;const o=Ye(),{icon:l,disabled:i,text:s,tooltip:c,onClick:p}=n;return r().createElement(Ge,{tooltipTitle:c,showForDisabled:!0,classes:{root:o.menuItem},onClick:e=>{a(),p(e)},disabled:i,ref:t},l,r().createElement(te.Typography,{classes:{root:o.menuText}},s))}));$e.displayName="MenuItemRenderer";const qe=$e,Xe=e=>{let{disableDelete:t,connection:{entity:n,relation:l},onMenuOpen:i=R.ZT,onMenuClose:s=R.ZT,onDelete:c}=e;const p=Ye(),u=(0,o.useSelector)(m.ZP.selectors.getMetadata),y=(0,d.pipe)((0,d.prop)("relationType"),(0,f.V3K)(u),(0,f.uGe)(f.BDP.DELETE))(l),b=!t&&y,[g,h]=(0,a.useState)(!1),v=()=>h(!1),x=[{disabled:!b,text:Z().text("Delete"),icon:r().createElement(ze.Z,null),tooltip:b?null:Z().text("You don't have permissions to delete"),onClick:()=>h(!0)}],E=(0,a.useCallback)((()=>{g||s()}),[g,s]);return r().createElement("div",{className:p.buttons},r().createElement(_e.Z,{MenuItemRenderer:qe,menuId:"relationships-table-actions",buttonComponent:We.Z,buttonProps:{icon:Be.Z,size:"S"},menuItems:x,onMenuOpen:i,onMenuClose:E}),r().createElement(He.Z,{open:g,title:Z().text('Do you want to delete relationship "${label}"?',{label:(C=(0,f.idV)(n.entityLabel),C.length>17?`${C.substring(0,17)}...`:C)}),content:Z().text("This relationship will be removed and all the values in the relationship will be permanently deleted. Are you sure you want to delete this relationship?"),onSave:(0,d.pipe)(v,s,c),onDiscard:(0,d.pipe)(v,s),saveCaption:Z().text("Delete"),discardCaption:Z().text("Cancel")}));var C},Ke=(0,se.Z)({tableContainer:{flex:1,overflow:"hidden",display:"flex",zIndex:0},hoveredRowRightContentWrapper:{width:"100%",pointerEvents:"none!important"},menuButtonContainer:{position:"absolute",top:"calc(50% - 12px)",right:0,pointerEvents:"all"},tooltipAnchor:{width:"100%",height:"1px"}});function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Je.apply(this,arguments)}const Qe=(0,a.memo)((e=>{let{metadata:t,connections:n,columnsData:o,sorting:l,onSort:i,filters:s,onFilter:c,onRowClick:p,tableRef:u,onDelete:m,readOnly:y}=e;const b=Ke(),g=(0,a.useMemo)((()=>((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.reduce)(((t,a)=>{let{id:r}=a;return(0,d.assoc)(r,((e,t,n)=>{let{entity:a,relation:r}=t;switch(n){case"entity.label":return{entity:a,entityType:(0,f.nt9)(e,a.entityType),relation:r};case"relation.type":return r.relationType;case"relation.label":return r.relationLabel;case"relation.activeness.startDate":return r.startDate;case"relation.activeness.endDate":return r.endDate;case"relation.attributes":return{attributes:r.object.attributes,attributeTypes:(0,f.V3K)(e,r.relationType).attributes};default:return((e,t)=>(0,d.pipe)((0,d.path)(["object","attributes"]),(0,f.tT_)(e))(t))(Ze(n),r)}})(e,n,r),t)}),{}),(0,d.assoc)("rawValue",n))(t))))(t,o,n)),[t,n,o]),h=(0,a.useMemo)((()=>Ae(o)),[o]),{getDynamicRowCellHeight:v,changeRowCellHeight:x}=(0,me.Z)(),E=(0,a.useCallback)((0,d.either)(v,Fe),[v,Fe]),[C,w]=(0,a.useState)(null),S=(0,a.useCallback)((e=>{const t=!(0,f.Fn9)(e.rowValue.rawValue.relation);return r().createElement(fe.Z,Je({onChangeHeight:x},e),r().createElement(Le,Je({},e,{isInactiveRelation:t})))}),[x]),[T,O]=(0,a.useState)(!1),P=(0,a.useCallback)((()=>O(!0)),[]),k=(0,a.useCallback)((()=>{w(null),O(!1)}),[]),D=(0,a.useCallback)((e=>w((t=>T?t:e))),[T]),R=(0,a.useMemo)((()=>{const e=null!=C?g[C].rawValue:null,t=!(0,f.Fn9)(null==e?void 0:e.relation);return e&&r().createElement(r().Fragment,null,r().createElement(te.Tooltip,{key:e.relation.relationUri,open:t,title:Z().text("Inactive")},r().createElement("div",{className:b.tooltipAnchor})),r().createElement("div",{className:b.menuButtonContainer},r().createElement(Xe,{disableDelete:y,connection:e,onMenuOpen:P,onMenuClose:k,onDelete:()=>m(e.relation.relationUri)})))}),[m,g,C]);return r().createElement("div",{className:b.tableContainer},r().createElement(ye.Z,{fixFirstColumn:!0,columnsData:h,rowsData:g,sorting:l,onSort:i,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:48,getRowCellHeight:E,renderRowCell:S,onRowClick:p,ref:u,hoverStateEnabled:!0,hoverRowIndex:C,onRowHover:D,hoveredRowRightContent:R,classes:{hoveredRowRightContentWrapper:b.hoveredRowRightContentWrapper}}))}));var et=n(67218),tt=n(85965),nt=n(39417),at=n(10237),rt=n(63149),ot=n(48017),lt=n(96955),it=n(66095),st=n(20982),ct=n(99144),pt=n(65549),ut=n(52017),dt=n(90186);const mt=(0,se.Z)((()=>({tableRow:{"& + &":{marginTop:"4px"},margin:"auto",maxWidth:"448px"}})));function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yt=(0,a.memo)((e=>{let{readOnly:t,relation:n,metadata:o,selectedAttributeTypes:l,onDeleteCrosswalk:i,onEditCrosswalk:s}=e;const c=mt(),p=(0,f.V3K)(o,n.type),u=(0,a.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,d.pipe)((0,d.propOr)([],"crosswalks"),(0,d.map)((0,d.assoc)("ownerType","entity")),(0,dt.o)(e.type,t))(e)}(n,l)),[n,l]),[m,y]=(0,a.useState)([]),b=(0,a.useCallback)((e=>{i({entityUri:n.uri,crosswalkId:e})}),[i,n.uri]),g=(0,a.useCallback)((e=>{s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ft(e,t,n[t])}))}return e}({entityUri:n.uri},e))}),[s,n.uri]);return r().createElement("div",null,u.map((e=>{let{source:n,crosswalksByTypes:a}=e;return r().createElement("div",{key:n,className:c.tableRow},r().createElement(ut.Z,{source:n,crosswalksByTypes:a,expanded:m.includes(n),disableEditCrosswalk:!(0,f.Zm0)(p)||t,disableDeleteCrosswalk:!(0,f.a14)(p)||t,onEdit:g,onDelete:b,onToggleExpanded:()=>{y((0,d.ifElse)((0,d.includes)(n),(0,d.without)([n]),(0,d.append)(n)))}}))})))}));var bt=n(79769);const gt=(0,se.Z)((e=>({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"20px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},title:{fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary,marginLeft:"12px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"4px 14px 10px"},hintText:{marginLeft:"8px",fontSize:"12px",lineHeight:"16px"},buttons:{display:"flex",padding:"8px 6px 4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{paddingLeft:25,margin:"auto",maxWidth:"448px",boxSizing:"border-box",marginBottom:"4px"},tableContainer:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"}}))),ht=(0,Ve.Z)(te.Button),vt=(0,a.memo)((e=>{let{className:t,readOnly:n,relation:l,selectedAttributeTypes:i,onAddCrosswalk:s,onDeleteCrosswalk:c,onEditCrosswalk:p}=e;const u=gt(),d=(0,o.useSelector)(m.ZP.selectors.getMetadata),y=(0,f.V3K)(d,l.type),[b,g]=(0,a.useState)(!1),h=(0,f.mkC)(y)&&!n;return r().createElement("div",{className:t},r().createElement("div",{className:u.header},r().createElement("span",{className:u.title},Z().text("Legend"))),r().createElement("div",{className:u.buttons},r().createElement(ht,{color:"primary",showForDisabled:!0,disabled:!h,tooltipTitle:h?null:Z().text("You don't have permissions to add crosswalk"),onClick:()=>g(!0)},r().createElement(pt.Z,{className:u.icon}),r().createElement("div",{className:u.buttonLabel},Z().text("Crosswalk")))),r().createElement("div",{className:u.hint},r().createElement(ct.Z,{className:u.icon}),r().createElement("span",{className:u.hintText},Z().text("You can drag a crosswalk to add values to attributes swimlanes"))),r().createElement("div",{className:u.tableContainer},b&&r().createElement(bt.Z,{className:u.editor,onAdd:e=>s({entity:l,crosswalk:e}),onClose:()=>g(!1)}),r().createElement(yt,{readOnly:n,metadata:d,relation:l,selectedAttributeTypes:i,onDeleteCrosswalk:c,onEditCrosswalk:p})))}));var xt=n(88611),Et=n(23147),Ct=n(94111),wt=n(68439);const St=(0,se.Z)((e=>({entityInfo:{flex:"0 1 auto",overflow:"hidden",minWidth:"100px"},entityLabelContainer:{display:"flex",alignItems:"center",overflow:"hidden"},entityLabel:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary},infoIcon:{fontSize:"16px",color:e.palette.text.secondary,marginLeft:"5px"},profileBand:{margin:"-10px",maxWidth:"500px"},entityTypeBadge:{marginTop:"7px"}}))),Tt=e=>{let{entity:t}=e;const n=St(),a=(0,f.idV)(t.label);return r().createElement("div",{className:n.entityInfo},r().createElement("div",{className:n.entityLabelContainer},r().createElement(xt.C,{value:a},r().createElement(te.Typography,{variant:"h6",className:n.entityLabel,noWrap:!0},a)),r().createElement(Ct.Z,{title:r().createElement(C.Z,{className:n.profileBand,entity:t}),placement:"right"},r().createElement(ct.Z,{className:n.infoIcon}))),r().createElement(wt.Z,{className:n.entityTypeBadge,entity:t,size:"medium"}))},Ot=(0,se.Z)((e=>({root:{flexShrink:0,overflow:"hidden",width:"110px"},label:{color:e.palette.text.secondary,fontSize:"13px"}}))),Pt=e=>{let{relation:t}=e;const n=Ot(),{direction:a,relationLabel:o}=t;return r().createElement("div",{className:n.root},r().createElement(xt.C,{value:o},r().createElement(te.Typography,{variant:"subtitle2",className:n.label,align:"center",noWrap:!0},o)),r().createElement("svg",{width:"110",height:"12",fill:"black",fillOpacity:"0.3"},"out"===a&&r().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 0 9, 0 3, 94 3"}),"bidirectional"===a&&r().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 16 9, 16 12, 0 6, 16 0, 16 3, 94 3"}),"in"===a&&r().createElement("polygon",{points:"16 12, 0 6, 16 0, 16 3, 110 3, 110 9, 16 9"})))};var kt=n(8459),Dt=n(27604);const Rt=(0,se.Z)((()=>({root:{"&:hover $editButton":{visibility:"visible"}},editButton:{visibility:"hidden",marginLeft:"4px",marginBottom:"4px"},paper:{width:"150px",border:"3px solid rgba(0, 0, 0, 0.3)",borderRadius:"4px",boxSizing:"border-box",overflow:"hidden"}}))),Nt=e=>{let{value:t=null,onChange:n,readOnly:o}=e;const l=Rt(),i=(0,a.useRef)(),[s,c]=(0,a.useState)(!1),p=()=>c(!1),[u,d]=(0,a.useState)(t),m=()=>{u!==t&&n(u),p()};return r().createElement("span",{ref:i,className:l.root},t&&(0,f.p6d)(t),r().createElement(We.Z,{disabled:o,icon:Dt.Z,size:"XXS",className:l.editButton,onClick:()=>c(!0)}),r().createElement(te.Popover,{classes:{paper:l.paper},open:s,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:14,horizontal:20},onKeyUp:e=>{"Enter"===e.key?m():"Escape"===e.key&&p()},onBackdropClick:m},r().createElement(kt.Z,{InputProps:{autoFocus:!0,disableUnderline:!0,fullWidth:!0},size:"small",hiddenLabel:!0,label:void 0,value:u&&new Date(u),onChange:e=>d(e&&e.valueOf())})))},jt=(0,se.Z)((e=>({relationBand:{flexShrink:0,boxShadow:"inset 0px -1px 0px rgba(0,0,0,0.06)",padding:"16px 19px"},inactiveRelationBand:{opacity:.6,background:"rgba(185, 188, 197, 0.18)"},toolbar:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"10px"},mainInfo:{display:"flex",gap:"16px",marginLeft:"40px"},detailsInfo:{display:"flex",gap:"34px",marginLeft:"40px",marginTop:"17px",color:e.palette.text.secondary,fontSize:"13px"},detailTitle:{color:e.palette.text.primary,flexShrink:0,marginRight:"4px"},directionalLabel:{display:"flex",overflow:"hidden","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},relationDate:{flexShrink:0},commentsContainer:{marginRight:"18px"}})));function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){It(e,t,n[t])}))}return e}function It(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Mt=(0,a.memo)((e=>{let{readOnly:t,entity:n,connection:a,onNavigateBack:o,onDelete:l,onChangeActivenessDate:i}=e;const s=!(0,f.Fn9)(a.relation),c=jt();return r().createElement("div",{className:Ce()(c.relationBand,we.U,{[c.inactiveRelationBand]:s})},r().createElement("div",{className:c.toolbar},r().createElement(We.Z,{icon:Et.Z,size:"S",onClick:()=>o()}),r().createElement(te.Typography,{variant:"subtitle2",display:"inline"},Z().text("Back to relationships")),r().createElement(re.Z,null),r().createElement("div",{className:c.commentsContainer},r().createElement(Oe.Z,{uri:a.relation.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:null==n?void 0:n.uri,connection:a}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})),r().createElement(Xe,{connection:a,onDelete:l,disableDelete:t})),r().createElement("div",{className:c.mainInfo},r().createElement(Tt,{entity:n}),r().createElement(Pt,{relation:a.relation}),r().createElement(Tt,{entity:Zt({},a.entity.object,{dataTenant:a.entity.dataTenant})})),r().createElement("div",{className:c.detailsInfo},r().createElement("div",{className:c.directionalLabel},r().createElement("span",{className:c.detailTitle},Z().text("Directional label:")),r().createElement(xt.C,{value:a.relation.relationLabel},r().createElement("span",null,a.relation.relationLabel))),r().createElement("div",{className:c.relationDate},r().createElement("span",{className:c.detailTitle},Z().text("Start date:")),r().createElement(Nt,{value:a.relation.startDate,onChange:e=>i("startDate",e),readOnly:t})),r().createElement("div",{className:c.relationDate},r().createElement("span",{className:c.detailTitle},Z().text("End date:")),r().createElement(Nt,{value:a.relation.endDate,onChange:e=>i("endDate",e),readOnly:t}))))})),At=e=>{console.error(e),u.Z.addError({title:Z().text("Error"),message:(0,f.xU7)(e,Z().text("Something went wrong"))})};var Ft=n(58651),Ut=n(13896);const Lt=(0,se.Z)({detailsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},locked:{pointerEvents:"none"},resizablePanesWrapper:{flexGrow:1},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}),zt=(0,a.memo)((e=>{let{entity:t,connection:n,visibleColumns:o,onClose:l,onDeleteConnection:i,onChangeConnection:s,onChangeVisibleColumns:c,readOnly:p}=e;const u=Lt(),m=(()=>{const[e,t]=(0,a.useState)([]),n=(0,a.useRef)([]),r=(0,a.useCallback)((0,f.DsO)((()=>{t([...n.current])}),50),[]),o=(0,a.useCallback)((e=>{n.current=e,r(e)}),[r]),l=(0,a.useCallback)(((e,t)=>{e&&o(t?[e]:[])}),[o]),[i,s]=(0,a.useState)([]),c=(0,a.useCallback)((e=>{e&&s((t=>{return n=[e],a=t,(0,d.concat)(n.filter((e=>!(0,d.any)((0,f.aFF)(e),a))),a.filter((e=>!(0,d.any)((0,f.aFF)(e),n))));var n,a}))}),[]);return{highlightedCrosswalks:(0,a.useMemo)((()=>[...e,...i]),[e,i]),focusedCrosswalks:i,toggleCrosswalkFocus:c,setCrosswalkHighlighted:l}})(),[y,b]=(0,a.useState)(-480),g=(0,a.useCallback)((e=>{let{percentageSize:t}=e;return b(t)}),[]),[h,v]=(0,a.useState)(),[x,E]=(0,a.useState)(!1),C=n.relation.relationUri,w=(0,et._)(),S=(0,a.useCallback)((()=>E(!0)),[]),T=(0,a.useCallback)((()=>E(!1)),[]),O=(0,a.useCallback)((0,d.pipe)(i,S),[]),[P,k]=(0,a.useMemo)((()=>{const e=e=>{e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND?(At(e),t()):e.errorCode===f.Xt7.OBJECT_NOT_FOUND?l(e):(At(e),T())},t=()=>{w((0,f._vs)(C)).then((e=>{s((0,d.assocPath)(["relation","object"],e,n)),T()})).catch(e)};return[e,t]}),[n,T,s,l]),{modifiedEntity:D,crosswalksMap:R,newlyCreatedAttributes:N,onPinAttribute:j,onIgnoreAttribute:Z,onAddAttribute:I,onEditAttribute:M,onDeleteAttribute:A}=(0,tt.Q)({entity:n.relation.object,onModify:k,onError:P,onLoad:S}),{addCrosswalk:F,deleteCrosswalk:U,editCrosswalk:L}=(0,nt.P)({onSuccess:k,onError:P,onLoad:S}),z=(0,a.useCallback)(((e,t)=>{S(),(t?(0,f.rj2)({entityUri:C,attributeName:e,value:t}).then((()=>s((0,d.assocPath)(["relation",e],t,n)))):(0,f.X78)({entityUri:C,attributeName:e}).then((()=>s((0,d.dissocPath)(["relation",e],n))))).then(T).catch(P)}),[n,S,T,P]);return r().createElement(at.Z,{className:u.detailsView},r().createElement(rt.hR,m,r().createElement(Ut.DndProvider,{backend:Ft.default},r().createElement(ot.Z,null),r().createElement(lt.Z,{className:Ce()(u.resizablePanesWrapper,{[u.locked]:x}),orientation:"vertical",size:y,minSize:600,maxSize:-480,allowResize:!0,onChange:g},r().createElement("div",{className:u.pane},r().createElement(Mt,{readOnly:p,entity:t,connection:n,onNavigateBack:l,onDelete:O,onChangeActivenessDate:z}),r().createElement(it.R,{attributeUris:N},r().createElement(st.Z,{readOnly:p,entity:D,crosswalksMap:R,isLoading:x,onPin:j,onIgnore:Z,onEdit:M,onAdd:I,onDelete:A,selectedAttributeTypes:h,onSelectAttributeTypes:v,visibleColumns:o,onChangeVisibleColumns:c}))),r().createElement(vt,{readOnly:p,className:u.pane,relation:n.relation.object,selectedAttributeTypes:h,onAddCrosswalk:F,onDeleteCrosswalk:U,onEditCrosswalk:L})))))})),Bt=(0,se.Z)({relationshipsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},pane:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}}),_t=(0,o.connect)(((e,t)=>{let{config:{id:n}}=t;return{entity:m.ZP.selectors.getEntity(e),metadata:m.ZP.selectors.getMetadata(e),connections:m.ZP.selectors.getConnectionsByViewId(e,n),total:m.ZP.selectors.getTotalByViewId(e,n)}}))((e=>{let{config:t,entity:n,metadata:o,connections:l,total:i,saveState:s,getSavedState:c,dispatch:p}=e;const u=Bt(),P=(0,a.useRef)(),R=(0,y.U)(),j=(0,f.biM)(n),{type:Z}=n||{},[{visibleColumns:I,filters:M,page:z,rowsPerPage:W,sorting:q,currentRelationType:te,stateToSave:ne,entityTypeOfAppliedSavedState:ae},{changeColumns:re,toggleFilters:oe,changeFilter:le,changePage:ie,changeRowsPerPage:se,toggleSort:ce,changeRelationType:pe,saveCurrentState:ue,applySavedState:me}]=(e=>{let{defaultColumns:t,defaultSorting:n,defaultRowsPerPage:r}=e;const o={visibleColumns:t,filters:null,sorting:n,page:0,rowsPerPage:r,currentRelationType:null,stateToSave:null,visibleColumnsForRelationTypes:{},entityTypeOfAppliedSavedState:null},[l,i]=(0,a.useReducer)(((e,t)=>{switch(t.type){case H:{const n=t.payload;return(0,d.pipe)(J,(0,d.assoc)("currentRelationType",n),K,$)(e)}case V:{const{savedState:n,entityTypeUri:a}=t.payload;return _({},e,n,{visibleColumns:n?X(n):e.visibleColumns,entityTypeOfAppliedSavedState:a})}case Y:return _({},e,{stateToSave:Q(e)});default:return D.ZP.reducer(e,t)}}),o);return[l,(0,N.o)({actions:G,dispatch:i})]})({defaultColumns:F,defaultRowsPerPage:L[0],defaultSorting:{field:F[0],order:"asc"}}),fe=ae===Z,{isLoading:ye,relationsTableSavedState:be,attributesTableSavedState:ge,updateRelationsTableSavedState:he,updateAttributesTableSavedState:ve}=(e=>{var t;let{getSavedState:n,saveState:r,entityTypeUri:o}=e;const[l,i]=(0,a.useState)(k),[s,c]=(0,a.useState)(null);(0,b.D)((()=>{s&&(i(O({},l,{relationsTable:s})),c(null))}),[o]);const[p,u]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{n().then((e=>{i(e||k)})).then((e=>u(!1))).catch((e=>u(!1)))}),[]),{isLoading:p,relationsTableSavedState:null===(t=l.relationsTable)||void 0===t?void 0:t[o],attributesTableSavedState:l.attributesTable,updateRelationsTableSavedState:e=>{const t=O({},l.relationsTable,{[o]:e});c(t),r(O({},l,{relationsTable:t}))},updateAttributesTableSavedState:e=>{r(O({},l,{attributesTable:e}))}}})({getSavedState:c,saveState:s,entityTypeUri:Z}),[xe,Ee]=(0,a.useState)();(0,a.useEffect)((()=>{ye||me({savedState:be,entityTypeUri:Z})}),[ye,Z]),(0,a.useEffect)((()=>{ye||Ee(null==ge?void 0:ge.visibleColumns)}),[ye]),(0,b.D)((()=>{fe&&he(ne)}),[ne]),(0,b.D)((()=>{ie(0)}),[n]);const[Ce,we]=(0,a.useState)(),Se=(0,a.useCallback)((()=>{we(null)}),[]),Te=(0,a.useMemo)((()=>{const e=(0,f.io3)(o,Z);return o.relationTypes.filter((0,d.both)((0,f.uGe)(f.BDP.READ),(t=>{let{startObject:n,endObject:a}=t;return e.some((0,d.either)((0,d.equals)(n.objectTypeURI),(0,d.equals)(a.objectTypeURI)))})))}),[o,Z]),Oe=(0,a.useMemo)((()=>((e,t)=>t?(0,d.pipe)((0,d.find)((e=>e.uri===t)),f.DK$,B,(0,d.concat)(A),(0,d.reject)((e=>{let{id:t}=e;return U.includes(t)})))(e):(e=>{return t=(0,d.assoc)("dataTypeDefinition",(e=>({type:f.oS0.TYPE_SELECT,options:e.map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))}))(e)),e=>(0,d.adjust)(e.findIndex((0,d.propEq)("id","relation.type")),t,e);var t})(e)(A))(Te,te)),[Te,te]),Pe=(0,a.useMemo)((()=>I.map((e=>Oe.find((0,d.propEq)("id",e)))).filter(d.identity)),[I,Oe]),ke=(0,a.useMemo)((()=>{const e=(0,d.pipe)((0,d.when)((0,d.always)(te),(0,d.filter)((0,d.propEq)("uri",te))),(0,d.map)((0,d.prop)("uri")))(Te);return{id:t.id,content:{inRelations:e,outRelations:e}}}),[t.id,te,Te]),De=(0,a.useMemo)((()=>((e,t)=>{const n=(0,ee.Tz)(t,e);return(new f.MEy).addClause(n).build()})(M,Pe)),[M,Pe]),{isLoading:Re,reload:Ne}=(0,g.a)({page:z,rowsPerPage:W,config:ke,entity:fe?n:null,filter:De,mode:f.ARY.Viewing,sorting:q}),je=!fe||Re,Ze=(0,a.useCallback)((0,d.pipe)(ce,ue),[ce,ue]),Ie=(0,a.useCallback)((0,d.pipe)(le,ue),[le,ue]),Me=(0,a.useCallback)((0,d.pipe)(oe,ue),[oe,ue]),Ae=(0,a.useCallback)((0,d.pipe)(re,ue),[re,ue]),Fe=(0,a.useCallback)((0,d.pipe)(pe,ue),[pe,ue]),Ue=(0,a.useCallback)((e=>{Ee(e),ve({visibleColumns:e})}),[ve]),Le=null==l?void 0:l[Ce],ze=(0,a.useCallback)((e=>{p(m.N5.relations.actions.relationsLoaded({id:t.id,connections:(0,d.update)(Ce,e,l),total:i}))}),[Le]),[Be,_e]=(0,a.useMemo)((()=>[(0,f.w3p)(l),[f.q7e.RELATION]]),[l]),We=(0,h.C)({objectIds:Be,objectTypes:_e,enabled:!j}),He=(0,a.useMemo)((()=>(0,f.Px$)(l)),[l]),Ve=(0,a.useCallback)((e=>{At(e),e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Ne()}),[Ne]),Ye=(0,a.useCallback)((e=>{(0,d.pipe)(f.VGk,(0,d.andThen)(Ne),(0,d.otherwise)(Ve))(e)}),[Ne,Ve]),Ge=(0,a.useCallback)((()=>{(0,d.pipe)(f.VGk,(0,d.andThen)((0,d.pipe)(Se,Ne)),(0,d.otherwise)((e=>{e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Se(),Ve(e)})))(Le.relation.relationUri)}),[Le,Ne,Se,Ve]),$e=(0,a.useCallback)((e=>{e&&Ve(e),Se()}),[Ve,Se]);return r().createElement(v.s.Provider,{value:R},r().createElement(x.h.Provider,{value:We},r().createElement(E.X.Provider,{value:He},r().createElement("div",{className:u.relationshipsView},r().createElement(C.Z,{entity:n},r().createElement(w.a,null)),r().createElement(de,{total:i,filteringEnabled:!!M,onToggleFilters:Me,columnsData:Oe,selectedColumns:I,onChangeColumns:Ae,relationTypes:Te,currentRelationType:te,onRelationTypeChange:Fe}),r().createElement("div",{className:u.pane},je&&r().createElement(S.Z,null),r().createElement(Qe,{readOnly:j,metadata:o,connections:l,columnsData:Pe,sorting:q,onSort:Ze,filters:M,onFilter:Ie,onRowClick:we,tableRef:P,onDelete:Ye}),r().createElement(T.Z,{count:i,rowsPerPageOptions:L,page:z,onChangePage:ie,rowsPerPage:W,onChangeRowsPerPage:se,basicTableRef:P})),Le&&r().createElement(zt,{readOnly:j,entity:n,visibleColumns:xe,onChangeVisibleColumns:Ue,connection:Le,onClose:$e,onDeleteConnection:Ge,onChangeConnection:ze})))))})),Wt=(0,i.createGenerateClassName)({productionPrefix:"relationshipsPerspective",disableGlobal:!0}),Ht=e=>{let{config:t,store:n,onResize:d,saveState:m,getSavedState:y}=e;const b=(0,a.useCallback)((0,f.aYu)(y),[y]);return r().createElement(o.Provider,{store:n},r().createElement(p.m.Provider,{value:t.id},r().createElement(i.StylesProvider,{generateClassName:Wt},r().createElement(c.MuiPickersUtilsProvider,{utils:l.Z},r().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==d?void 0:d(Math.floor(e),Math.floor(t))}),t&&r().createElement(_t,{config:t,saveState:m,getSavedState:b}),r().createElement(u.Z,null)))))}},46847:(e,t,n)=>{function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,i=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==i){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var p=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;p.call(this,e,t,a)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),a.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0}}]);