@reltio/remotes 1.4.1078 → 1.4.1081

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/545.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[545],{55234:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),l=n.n(r),i=n(87918),o=n.n(i),a=n(71153),s=n.n(a),c=n(17440),u=n(52730),d=n(35674),p=n(22241),h=n(90436),f=n(15793),E=n(19602),m=n(59952),g=n(33117),b=n(79692);function y(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){v(e,t,n[t])}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const T={input:e=>y({},e,{fontSize:"14px"}),menuPortal:e=>y({},e,{zIndex:1300})},O=(0,b.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 x=e=>{let{entityType:t,selectedAttributes:n,className:i,onChange:a,title:b,disableUnderline:y,menuPlacement:v="bottom"}=e;const x=(0,u.useSelector)(d.ZP.selectors.getMetadata),I=O(),S=(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 l=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:l,level:t});const i=(0,p.EUG)(x,r);return e.concat(i?S(i,t+1,l):[])}),[])}),[x]),N=(0,r.useMemo)((()=>S((null==t?void 0:t.attributes)||[])),[t,S]);return l().createElement("div",{className:s()(I.root,i)},l().createElement(h.Z,{className:I.title,variant:"subtitle1"},b||o().text("Attribute")),l().createElement(f.Z,{value:n,options:N,TextFieldProps:{InputProps:{disableUnderline:y},classes:{root:I.dropDownInput}},components:{DropdownIndicator:m.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["data"]);return l().createElement(E.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:i,innerProps:o}=e;return l().createElement("div",o,l().createElement(g.Z,{checked:n,level:r.level,data:r,label:i,labelInText:i,isFocused:t}))}},onChange:(0,c.pipe)((0,c.defaultTo)([]),a),styles:T,classes:I,menuPlacement:v,menuPortalTarget:document.body}))}},54238:(e,t,n)=>{n.d(t,{Z:()=>U});var r=n(24328),l=n.n(r),i=n(13980),o=n.n(i),a=n(53862);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=>l().createElement("svg",s({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(17440),d=n(22241);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}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 f=e=>e.id===e.groupId,E=(0,u.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),m=(0,u.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),g=(0,u.propOr)(!0,"hideable"),b=(e,t)=>{const n=((e,t)=>e.find((0,u.either)(m(t),E(t))))(e,t);return n?(n.children=b(n.children||[],t),e):e.concat(t)},y=(0,u.curry)(((e,t)=>d.P6Y.strings.search(t.label,e)||(t.children||[]).some(y(e)))),v=(0,u.reduce)(((e,t)=>b(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),T=(0,u.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,u.pipe)((0,u.filter)(y(e)),(0,u.chain)((t=>[{item:p({},t,{filterText:e}),level:n},...t.children?T(e,t.children,n+1):[]])))(t)})),O=(0,u.has)("columns"),x=e=>{let{id:t,label:n,columns:r}=e;return[{id:t,groupId:t,label:n},...r.map((0,u.assoc)("groupId",t))]},I=e=>e.children?(0,u.chain)(I,e.children):[e],S=(e,t)=>{const n=I(t),r=t=>e.includes(t.id);return f(t)?n.every(r):n.some(r)};var N=n(39475),P=n(22311),C=n(63485),D=n(26638),R=n(41008),_=n(33117),w=n(94792),M=n(71153),A=n.n(M);const k=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),L=e=>{let{item:t,onClick:n,checked:r,level:i,style:o,isFocused:a,isGroupItem:s}=e;const c=k();return l().createElement(_.Z,{key:t.id,onClick:n,checked:r,level:i,data:t,label:l().createElement(w.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:o,isFocused:a,hideIcon:s,className:A()({[c.groupItem]:s})})};L.propTypes={item:o().shape({label:o().string,filterText:o().string}),level:o().number,onClick:o().func,checked:o().bool,style:o().object,isGroupItem:o().bool,isFocused:o().bool};const j=L;var Z=n(87918),G=n.n(Z);const H=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:i,title:o,tooltipTitle:a}=e;const s=k(),[p,h]=(0,r.useState)(null),[E,m]=(0,r.useState)(""),b=(0,r.useMemo)((()=>((e,t)=>(0,u.pipe)((0,u.chain)((0,u.when)(O,x)),(0,u.filter)((0,u.either)(f,g)),v,T(t))(e))(t,E)),[t,E]),y=(0,d.fW1)("label")(b)||308,_=(0,r.useMemo)((()=>(0,R.LG)(b)),[b]),w=(0,r.useCallback)((e=>{const t=(0,u.pipe)(I,(0,u.pluck)("id"))(e),r=S(n,e);i(r?(0,u.difference)(n,t):(0,u.uniq)((0,u.concat)(n,t)))}),[n,i]),M=(0,r.useCallback)((e=>{let{item:t}=e;return w(t)}),[w]),{focusIndex:A,handleKeyDown:L}=(0,D.t)({items:_,open,onSelectFocusedItem:M,selectedItems:n}),Z=Math.min(300,32*_.length),H=Math.max(140,Z+108);return l().createElement(l().Fragment,null,l().createElement(N.k,{tooltipTitle:a||G().text("Show/hide columns"),size:"L",icon:c,onClick:e=>h(e.currentTarget)}),l().createElement(P.Z,{className:s.popup,open:!!p,anchorEl:p,onClose:(0,u.pipe)((()=>h(null)),(()=>m(""))),onSearch:m,title:o||G().text("Show/hide columns"),containerWidth:y,containerHeight:H,searchInputOnKeyDown:L},l().createElement(C.Z,{fixedTitle:!1,height:Z,renderItem:(e,t,r)=>{let{item:i,level:o=0}=t;return l().createElement(j,{style:e,item:i,level:o,isFocused:A===r,checked:S(n,i),isGroupItem:f(i),onClick:w})},items:_,getItemSize:()=>32,containerWidth:y,focusIndex:A})))};H.propTypes={columnsData:a.uz,selectedColumns:o().arrayOf(o().string),onChangeColumns:o().func,title:o().string,tooltipTitle:o().string};const U=H},77875:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),l=n.n(r),i=n(17440),o=n(87918),a=n.n(o),s=n(6782),c=n(86619),u=n(90590),d=n(79573);const p=(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%"}}),h=[a().text("minutes"),a().text("hours"),a().text("days"),a().text("weeks"),a().text("months"),a().text("years")],f=e=>{let{interval:[t,n],onChange:r,onFocus:o}=e;const a=p(),f=(0,i.pipe)(d.NA,parseInt,(e=>[e,n]),r),E=(0,i.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return l().createElement("div",{className:a.root},l().createElement(c.Z,{type:"number",value:t||"",onChange:f,inputProps:{min:1,onFocus:o},InputProps:{classes:{root:a.input}},className:a.inputNumber}),l().createElement(u.Z,{label:"",placeholder:(0,s.Z)(n),className:a.inputUnit,value:{value:n,label:(0,s.Z)(n)},options:h.map((e=>({value:e,label:(0,s.Z)(e)}))),onChange:E,TextFieldProps:{inputProps:{onFocus:o},InputProps:{classes:{root:a.input}}}}))}},76368:(e,t,n)=>{n.d(t,{a:()=>C});var r=n(24328),l=n.n(r),i=n(87918),o=n.n(i),a=n(86689),s=n(78223),c=n(39475),u=n(67766),d=n(42767),p=n(22241);const h=(0,n(79692).Z)({container:{display:"flex",alignItems:"center"},link:{whiteSpace:"nowrap",marginRight:"9px"}}),f=(0,s.Z)(a.Z),E=e=>{let{total:t=0,onPrev:n,onNext:r,onSearchResultsClick:i,isPrevDisabled:a,isNextDisabled:s}=e;const E=h();return l().createElement("div",{className:E.container},l().createElement(f,{className:E.link,component:"button",variant:"caption",onClick:i,underline:"none",tooltipTitle:o().text("Go to search results")},(0,p.k7L)(t,1e6)," ",1===t?o().text("Search result"):o().text("Search results")),l().createElement(c.k,{size:"L",icon:u.Z,tooltipTitle:o().text("Go to previous profile"),onClick:n,disabled:a,showForDisabled:!0}),l().createElement(c.k,{size:"L",icon:d.Z,tooltipTitle:o().text("Go to next profile"),onClick:r,disabled:s,showForDisabled:!0}))};var m=n(52730),g=n(35674),b=n(17440),y=n(12212),v=n(29627);function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}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}class x{constructor(e){var t=this;let{data:{query:n,sortField:r,sortOrder:l},tenant:i,searchTenant:o,apiPath:a,dtssPath:s,globalSearchRequestOptions:c}=e;this.query=void 0,this.sortField=void 0,this.sortOrder=void 0,this.tenant=void 0,this.searchTenant=void 0,this.apiPath=void 0,this.dtssPath=void 0,this.globalSearchRequestOptions=void 0,this.isDT=()=>this.tenant!==this.searchTenant,this.getQueryFilter=()=>({rawFilter:this.query}),this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[t.getQueryFilter(),...e],l=T({},t.globalSearchRequestOptions,{sort:t.sortField,order:t.sortOrder,select:"uri,label,type",scoreEnabled:!1},n);return t.isDT()?(0,p.uqV)({filters:r,options:l,customerTenant:t.tenant,dataTenant:t.searchTenant,dtssPath:t.dtssPath}):(0,p.ZOr)(r,l)},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"uri",values:[e]}],{offset:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{offset:t,max:e}),this.requestTotal=()=>{const e=[this.getQueryFilter()],t=this.globalSearchRequestOptions;return(this.isDT()?(0,p.J$m)({filters:e,options:t,customerTenant:this.tenant,dataTenant:this.searchTenant,dtssPath:this.dtssPath}):(0,p.j_Q)(e,t)).then((e=>e.total))},this.query=n,this.sortField=r,this.sortOrder=l,this.tenant=i,this.searchTenant=o,this.apiPath=a,this.dtssPath=s,this.globalSearchRequestOptions=c}}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){S(e,t,n[t])}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class N{constructor(e){var t=this;let{data:n,tenant:r,apiPath:l}=e;this.searchBody=void 0,this.tenant=void 0,this.apiPath=void 0,this.getEntities=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=[{rawFilter:t.searchBody.filter},...e];return(0,p.P2h)({apiPath:t.apiPath,tenant:t.tenant,searchBody:I({},t.searchBody,{filter:e.length?(0,p.Uqd)()(r):t.searchBody.filter}),options:n})},this.checkEntity=e=>this.getEntities([{filter:"equals",fieldName:"id",values:[(0,p.BTI)({uri:e})]}],{from:0,max:1}).then((t=>t&&t.length>0&&t[0].uri===e)),this.requestEntities=(e,t)=>this.getEntities([],{from:t,max:e}),this.requestTotal=()=>(0,p.dED)({apiPath:this.apiPath,tenant:this.tenant,searchBody:this.searchBody}).then((e=>e.count)),this.searchBody=n,this.tenant=r,this.apiPath=l}}const P=(e,t)=>(0,b.pipe)((0,b.map)((0,b.prop)("uri")),(0,b.reject)((e=>t.includes(e))))(e),C=()=>{const{total:e,onPrev:t,onNext:n,onSearchResultsClick:i,isPrevDisabled:o,isNextDisabled:a}=(()=>{const e=(0,v._)(),t=(0,v._)(),n=(0,v._)(),{uri:l,index:i,total:o,tenant:a,cache:s}=(0,m.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},{type:c,data:u}=(0,m.useSelector)(g.ZP.selectors.getSearchProviderData)||{},d=(0,m.useSelector)(g.ZP.selectors.getTenant),h=(0,m.useSelector)(g.ZP.selectors.getApiPath),f=(0,m.useSelector)(g.ZP.selectors.getDtssPath),E=(0,m.useSelector)((e=>g.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]))),b=(0,r.useContext)(y.m),T=(0,m.useDispatch)(),[O,I]=(0,r.useState)(!1),S=(0,r.useMemo)((()=>((e,t)=>{switch(e){case"search":return new x(t);case"graphsearch":return new N(t)}})(c,{data:u,tenant:d,searchTenant:a,apiPath:h,dtssPath:f,globalSearchRequestOptions:E})),[c,u,d,a,h,f,E]),C=(0,r.useCallback)((e=>{T(g.yC.actions.updateSearchNavigationDataFields(e))}),[T]),D=(0,r.useCallback)((e=>{const t=d!==a?(0,p.wwR)({uri:e,dataTenant:a}):e;T(g.ui.actions.openEntity({uri:t,viewId:b,source:"navigation"}))}),[T,b,d,a]),R=(0,r.useCallback)((()=>{T(g.ui.actions.openPerspective({perspectiveId:c,viewId:b}))}),[T,c,b]);(0,r.useEffect)((()=>{i>=o?C({index:o-1}):i<0&&C({index:0})}),[o,i,C]);const _=(0,r.useCallback)(((e,r,l)=>{I(!0),t(S.requestTotal()).then((e=>C({total:e})));const i=l+1;return n(S.requestEntities(15,i)).then((t=>{if(t){if(t.length){const n=P(t,e);if(n.length>0)return C({cache:e.concat(n),uri:n[0],index:i+t.length-n.length}),void D(n[0]);if(l+t.length<r-1)return _(e,r-t.length,l+t.length)}C({index:i})}})).finally((()=>{I(!1)}))}),[S,C,D]),w=(0,r.useCallback)(((e,r)=>{I(!0),t(S.requestTotal()).then((e=>C({total:e})));const l=r-1,i=Math.max(0,r-15),o=15+Math.min(0,r-15);return n(S.requestEntities(o,i)).then((t=>{if(t){if(t.length){const n=P(t,e);if(n.length>0)return C({cache:n.concat(e),uri:n[n.length-1],index:l-(t.length-n.length)}),void D(n[n.length-1]);if(r-t.length>0)return w(e,r-t.length)}C({index:0})}})).finally((()=>{I(!1)}))}),[S,C,D]),M=(0,r.useCallback)(((t,n,r,l)=>{if(n<t.length){const i=t[n];return I(!0),e(S.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),M(e,n,r-1,l)}C({index:l+1,uri:i,cache:t,total:r}),D(i)})).finally((()=>{I(!1)}))}if(!(l>=r-1))return _(t,r,l);C({cache:t,total:r,index:r-1})}),[S,C,D,_]),A=(0,r.useCallback)(((t,n,r,l)=>{if(n>-1){const i=t[n];return I(!0),e(S.checkEntity(i)).then((e=>{if(!e){const e=[...t];return e.splice(n,1),A(e,n-1,r-1,l-1)}C({index:l-1,uri:i,cache:t,total:r}),D(i)})).finally((()=>{I(!1)}))}if(!(l<=0))return w(t,l);C({index:0,cache:t,total:r})}),[S,C,D,w]),k=(0,r.useCallback)((()=>{if(s&&l){const e=s.indexOf(l)-1;A(s,e,o,i)}}),[A,s,l,o,i]),L=(0,r.useCallback)((()=>{if(s&&l){const e=s.indexOf(l)+1;M(s,e,o,i)}}),[M,s,l,o,i]);return{total:o,onPrev:k,onNext:L,onSearchResultsClick:R,isPrevDisabled:O||i<=0,isNextDisabled:O||i>=o-1}})();return(()=>{const{cache:e}=(0,m.useSelector)(g.ZP.selectors.getSearchNavigationData)||{},t=(0,m.useSelector)(g.ZP.selectors.getMode),n=(0,m.useSelector)(g.ZP.selectors.getEntity);return(0,p.uzs)(t)&&(null==e?void 0:e.includes(null==n?void 0:n.uri))})()?l().createElement(E,{total:e,onPrev:t,onNext:n,onSearchResultsClick:i,isPrevDisabled:o,isNextDisabled:a}):null}},15793:(e,t,n)=>{n.d(t,{Z:()=>C});var r=n(24328),l=n.n(r),i=n(13980),o=n.n(i),a=n(17440),s=n(70347);const c=(0,n(4515).Z)(s.ZP);var u=n(49861),d=n(12350),p=n(12231),h=n(21324),f=n(71153),E=n.n(f),m=n(83088);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g.apply(this,arguments)}function b(e){const{innerProps:t,innerRef:n,children:r,isFocused:i,isSelected:o,selectProps:{classes:a},label:s}=e;return l().createElement(p.Z,g({className:E()(a.option,{[a["option--selected"]]:o}),ref:n,selected:i,component:"div"},t),l().createElement(h.Z,{color:"primary",checked:o}),l().createElement(m.C,{value:s},l().createElement("div",{className:a["option--item"]},r)))}b.propTypes={children:o().node,innerProps:o().shape({id:o().string.isRequired,key:o().string,onClick:o().func.isRequired,onMouseMove:o().func.isRequired,onMouseOver:o().func.isRequired,tabIndex:o().number.isRequired}).isRequired,innerRef:o().oneOfType([o().oneOf([null]),o().func,o().shape({current:o().any.isRequired})]),isFocused:o().bool.isRequired,isSelected:o().bool.isRequired,label:o().string,selectProps:o().shape({classes:o().shape({option:o().string})})};const y={Option:b};var v=n(79692),T=n(79573);function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}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){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 S=(0,v.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let N=0;function P(e){const{label:t,creatable:n,getOptions:i,loadingIndicator:o,components:s,classes:p,styles:h,onChange:f,onInputChange:E,menuPlacement:m="auto"}=e,g=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),b=n?c:i?d.Z:u.Z,[v,I]=(0,r.useState)(""),P=S((0,a.omit)(["classes"],e)),C="custom-select-"+N++,D=x({},y,s),R=(0,T.ze)(P,p),_=x({indicatorSeparator:e=>x({},e,{margin:"10px 0"}),loadingIndicator:e=>x({},e,{display:o?e.display:"none"}),loadingMessage:e=>x({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},h),w=t?{inputId:C,TextFieldProps:x({label:t,InputLabelProps:{htmlFor:C,shrink:!(!e.value||!e.value.length)||void 0,className:R.label}},e.TextFieldProps)}:{};return l().createElement(b,O({isMulti:!0,inputId:C,inputValue:v,onChange:function(e,t){f(e,t),"create-option"===t.action&&(I(""),E("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;E(e,{action:n}),"set-value"!==n&&I(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:R,components:D,styles:_,menuPlacement:m,loadOptions:i},w,g))}P.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},P.propTypes={creatable:o().bool,cacheOptions:o().bool,defaultOptions:o().bool,value:o().arrayOf(o().shape({label:o().string.isRequired,value:o().any})),options:o().arrayOf(o().shape({label:o().string.isRequired,value:o().any})),onChange:o().func,onInputChange:o().func,placeholder:o().string,label:o().string,loadingIndicator:o().bool,components:o().shape({ClearIndicator:o().func,Control:o().func,DropdownIndicator:o().func,DownChevron:o().func,CrossIcon:o().func,Group:o().func,GroupHeading:o().func,IndicatorsContainer:o().func,IndicatorSeparator:o().func,Input:o().func,LoadingIndicator:o().func,Menu:o().func,MenuList:o().func,MenuPortal:o().func,LoadingMessage:o().func,NoOptionsMessage:o().func,MultiValue:o().func,MultiValueContainer:o().func,MultiValueLabel:o().func,MultiValueRemove:o().func,Option:o().func,Placeholder:o().func,SelectContainer:o().func,SingleValue:o().func,ValueContainer:o().func}),classes:o().shape({control:o().string,valueContainer:o().string,multiValue:o().string,noOptionsMessage:o().string,singleValue:o().string,placeholder:o().string,menu:o().string,clearIndicator:o().string,dropdownIndicator:o().string,option:o().string,"option--selected":o().string,label:o().string}),styles:o().shape({clearIndicator:o().func,container:o().func,control:o().func,dropdownIndicator:o().func,group:o().func,groupHeading:o().func,indicatorsContainer:o().func,indicatorSeparator:o().func,input:o().func,loadingIndicator:o().func,loadingMessage:o().func,menu:o().func,menuList:o().func,menuPortal:o().func,multiValue:o().func,multiValueLabel:o().func,multiValueRemove:o().func,noOptionsMessage:o().func,option:o().func,placeholder:o().func,singleValue:o().func,valueContainer:o().func}),TextFieldProps:o().object,getOptions:o().func,menuPlacement:o().string,menuPortalTarget:o().object,getOptionValue:o().func,isSearchable:o().bool};const C=P},28101:(e,t,n)=>{n.d(t,{G:()=>h});var r=n(24328),l=n.n(r),i=n(71153),o=n.n(i),a=n(39475),s=n(79692),c=n(41128);const u=(0,s.Z)((e=>({container:{display:"flex",flexDirection:"column",flexShrink:0,width:"64px",paddingTop:"8px",backgroundColor:e.palette.background.paper,boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)"},active:{backgroundColor:(0,c.U1)(e.palette.primary.main,.12),color:e.palette.primary.main,"&:after":{content:'""',position:"absolute",height:"42px",width:"3px",backgroundColor:e.palette.primary.main,left:"-8px",borderRadius:"0 6px 6px 0"}},buttonWrapper:{position:"relative",width:"48px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",margin:"2px 8px",color:e.palette.text.secondary}})));function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}const h=e=>{let{buttonsProps:t,activeIndexId:n,className:r,onButtonClick:i,classes:s={}}=e;const c=u(),{active:h,buttonWrapper:f}=s,E=p(s,["active","buttonWrapper"]);return l().createElement("div",{className:o()(c.container,r)},t.map((e=>{let{id:t}=e,r=p(e,["id"]);return l().createElement(a.k,d({},r,{classes:E,size:"S",key:t,className:o()({[o()(c.active,h)]:n===t},c.buttonWrapper,f),onClick:()=>i(t),"data-reltio-id":`reltio-profile-right-side-button-${t}`}))})))}},15422:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(24328),l=n.n(r),i=n(90436);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}const a=e=>l().createElement("svg",o({width:256,height:256,viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("circle",{cx:128,cy:128,r:128,fill:"#0072CE",fillOpacity:.1}),l().createElement("mask",{id:"AttributesList_svg__a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:256,height:256},l().createElement("circle",{cx:128,cy:128,r:128,fill:"#fff"})),l().createElement("g",{mask:"url(#AttributesList_svg__a)"},l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-16 9h256v247H-16V9z",fill:"url(#AttributesList_svg__b)"}),l().createElement("path",{opacity:.05,fillRule:"evenodd",clipRule:"evenodd",d:"M187.761 56.865l58.639 58.639v148.871H93.383L52 225.083V56.865h135.761z",fill:"url(#AttributesList_svg__c)"}),l().createElement("path",{opacity:.06,fillRule:"evenodd",clipRule:"evenodd",d:"M47 58h202a7 7 0 017 7v157a7 7 0 01-7 7H47a7 7 0 01-7-7V65a7 7 0 017-7z",fill:"#000"}),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50 56h201a5 5 0 015 5v157a5 5 0 01-5 5H50a5 5 0 01-5-5V61a5 5 0 015-5z",fill:"#fff"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 72.635a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 84.635a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 163a3 3 0 013-3H150a3 3 0 110 6h-41.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 175a3 3 0 013-3h64.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M105.376 193a3 3 0 013-3H190a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M105 205a3 3 0 013-3h74.205a3 3 0 110 6H108a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 103a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 115a3 3 0 013-3h64.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:79,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:106,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:120,cy:136,r:6,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:169,r:9,fill:"#B6C7DB"}),l().createElement("circle",{cx:67,cy:199,r:9,fill:"#B6C7DB"}),l().createElement("path",{opacity:.8,fillRule:"evenodd",clipRule:"evenodd",d:"M138.376 133a3 3 0 013-3H223a3 3 0 110 6h-81.624a3 3 0 01-3-3z",fill:"#B6C7DB"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M138 145a3 3 0 013-3h74.205a3 3 0 110 6H141a3 3 0 01-3-3z",fill:"#979797"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M92.514 108v-8h-2v40.365h11.178v-2h-9.178V110h9.178v-2h-9.178z",fill:"#2B98F0"}),l().createElement("path",{opacity:.54,fillRule:"evenodd",clipRule:"evenodd",d:"M95.071 77l-3.535 3.535L88 77h7.071z",fill:"#000"}),l().createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M50 22h186a6 6 0 016 6v18a6 6 0 01-6 6H50a6 6 0 01-6-6V28a6 6 0 016-6z",fill:"#fff"}),l().createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M58 37a6 6 0 016-6h70a6 6 0 110 12H64a6 6 0 01-6-6zm90 0a6 6 0 016-6h10a6 6 0 110 12h-10a6 6 0 01-6-6z",fill:"#979797"})),l().createElement("defs",null,l().createElement("linearGradient",{id:"AttributesList_svg__b",x1:-16,y1:9,x2:-16,y2:256,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopColor:"#FAFAFA",stopOpacity:.01}),l().createElement("stop",{offset:1,stopColor:"#F4F4F4"})),l().createElement("linearGradient",{id:"AttributesList_svg__c",x1:266.117,y1:181.111,x2:154.882,y2:77.681,gradientUnits:"userSpaceOnUse"},l().createElement("stop",{stopOpacity:.01}),l().createElement("stop",{offset:1})))),s=(0,n(79692).Z)((e=>({root:{display:"flex",flex:"1 1 auto",flexWrap:"nowrap",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"auto",height:"100%",minHeight:"350px",boxSizing:"border-box",padding:"40px"},logo:{width:"190px",height:"190px"},textBox:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:400,marginTop:"24px"},text:{color:e.palette.text.primary,fontSize:"20px",fontWeight:500,lineHeight:"23px",textAlign:"center"},secondaryText:{color:e.palette.text.primary,fontSize:"14px",fontWeight:"normal",lineHeight:"16px",letterSpacing:"0.24px",textAlign:"center",paddingTop:"8px"}}))),c=e=>{let{IconRenderer:t=a,text:n,secondaryText:r}=e;const o=s();return l().createElement("div",{className:o.root},l().createElement(t,{className:o.logo}),l().createElement("div",{className:o.textBox},l().createElement(i.Z,{className:o.text},n),r&&l().createElement(i.Z,{className:o.secondaryText},r)))}},79935:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),l=n.n(r);const i=()=>l().createElement("div",{style:{flex:1}})},15791:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(24328),l=n.n(r),i=n(52730),o=n(87918),a=n.n(o),s=n(17440),c=n(71153),u=n.n(c),d=n(90436),p=n(15793),h=n(59952),f=n(22241),E=n(35674),m=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){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 y={input:e=>g({},e,{fontSize:"14px"}),loadingMessage:e=>g({},e,{fontSize:"14px"}),menuPortal:e=>g({},e,{zIndex:1300})},v=(0,m.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"}}),T=e=>{let{selectedUsers:t,onChange:n,className:o,disableUnderline:c}=e;const m=v(),g=e=>({value:e,label:e}),b=e=>e.map(g),T=(0,i.useSelector)(E.ZP.selectors.getTenant),O=(0,i.useSelector)(E.ZP.selectors.getServicesPath),x=(0,r.useRef)();return l().createElement("div",{className:u()(m.root,o)},l().createElement(d.Z,{className:m.title,variant:"subtitle1"},a().text("User")),l().createElement(p.Z,{value:b(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(x.current||(x.current=(0,f.kz_)({tenant:T,servicesPath:O})),x.current.then((0,s.pipe)((0,s.prop)("array"),(0,s.pluck)("username"),(e=>t=>e?t.filter((t=>f.P6Y.strings.search(t,e))):t)(e),b))),TextFieldProps:{InputProps:{disableUnderline:c},className:m.dropDownInput},components:{DropdownIndicator:h.Z},styles:y,classes:m,menuPortalTarget:document.body}))}},20414:(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.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},57312:(e,t,n)=>{n.d(t,{te:()=>c,VV:()=>u,rx:()=>d,_V:()=>p,Xr:()=>h});var r=n(17440),l=n(87918),i=n.n(l),o=n(20414);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const s=(0,r.path)(["data","type"]),c=e=>{const{items:t,label:n}=e,[r]=t||[];return s(r)||n},u=(0,r.pipe)(c,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(o.I))),d=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){a(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),p=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(p).join(", "):(0,r.is)(Object,e)?p("value"in e?e.value:Object.values(e)):e.toString(),h=e=>({[o.I.COMMENT_ADDED]:i().text("Comment added"),[o.I.COMMENT_DELETED]:i().text("Comment deleted"),[o.I.COMMENT_UPDATED]:i().text("Comment updated"),[o.I.ENTITIES_MERGED]:i().text("Profile merged"),[o.I.ENTITIES_MERGED_MANUALLY]:i().text("Profile merged manually"),[o.I.ENTITIES_MERGED_ON_THE_FLY]:i().text("Profile merged on the fly"),[o.I.ENTITIES_SPLITTED]:i().text("Profile un-merged"),[o.I.ENTITY_CHANGED]:i().text("Profile updated"),[o.I.ENTITY_CREATED]:i().text("Profile created"),[o.I.ENTITY_LOST_MERGE]:i().text("Profile lost merge"),[o.I.ENTITY_REMOVED]:i().text("Profile removed"),[o.I.GROUP_CHANGED]:i().text("Group updated"),[o.I.GROUP_CREATED]:i().text("Group created"),[o.I.GROUP_REMOVED]:i().text("Group removed"),[o.I.MODEL_UPDATED]:i().text("Model was updated"),[o.I.NOT_MATCHES_RESET]:i().text("Not matches reset"),[o.I.NOT_MATCHES_SET]:i().text("Not matches set"),[o.I.PERIODIC_TASK_SCHEDULED]:i().text("Periodic task was scheduled"),[o.I.POTENTIAL_MATCHES_FOUND]:i().text("Potential matches found"),[o.I.POTENTIAL_MATCHES_REMOVED]:i().text("Potential matches removed"),[o.I.RELATIONSHIP_CHANGED]:i().text("Relationship updated"),[o.I.RELATIONSHIP_CREATED]:i().text("Relationship created"),[o.I.RELATIONSHIP_REMOVED]:i().text("Relationship removed"),[o.I.USER_LOGIN]:i().text("Logged in"),[o.I.USER_LOGOUT]:i().text("Logged out"),[o.I.USER_PROFILE_VIEW]:i().text("Profile viewed"),[o.I.USER_SEARCH]:i().text("Searched"),[o.I.ANALYTICS_ATTRIBUTES_CHANGED]:i().text("Analytics attribute changed")}[e]||"")},27446:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),l=n.n(r),i=n(95038),o=n.n(i),a=n(87918),s=n.n(a),c=n(17440),u=n(22241),d=n(86619),p=n(48348),h=n(59952),f=n(52346);const E=(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"}}),m=o().localeData().longDateFormat("L"),g=e=>{let{values:t,onChange:n,onFocus:i}=e;const o=m,a=(0,r.useRef)(null),[g,b]=(0,r.useState)(!1),y=E(),v=(0,r.useCallback)((()=>{b((e=>!e)),i()}),[i]),T=()=>{b(!1)};return l().createElement("div",{className:y.root},l().createElement(d.Z,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,c.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,o))).join(" — "),onClick:v,variant:"filled",ref:a,InputProps:{endAdornment:l().createElement(h.Z,{selectProps:{classes:y,menuIsOpen:g},innerProps:{}}),disableUnderline:(0,c.isNil)(t),readOnly:!0,classes:{root:y.inputRoot,input:y.input}},InputLabelProps:{shrink:!1},placeholder:s().text(`${o} — ${o}`)}),l().createElement(p.Z,{variant:"menu",open:g,autoFocus:!1,classes:{paper:y.paper},anchorEl:a.current,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:g,style:{width:"100%"}}},l().createElement(f.Z,{values:t,onCancel:T,onApply:e=>{n(e),b(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},70675:(e,t,n)=>{n.d(t,{Z:()=>ne});var r=n(24328),l=n.n(r),i=n(87918),o=n.n(i),a=n(85256),s=n(90436),c=n(17440),u=n(79935),d=n(36444),p=n(77277),h=n(79784),f=n(40435),E=n(37696),m=n(15791),g=n(55234),b=n(71153),y=n.n(b),v=n(90590),T=n(39034);const O=[T.K.WITHIN,T.K.AGO,T.K.BETWEEN],x=e=>({[T.K.WITHIN]:o().text("Within the last"),[T.K.AGO]:o().text("More than"),[T.K.BETWEEN]:o().text("Date range")}[e]||"");var I=n(77875),S=n(55962),N=n(27446),P=n(79692);const C=(0,P.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),D=[null,null],R=[null,"hours"],_=e=>{let{value:t,onChange:n,className:i}=e;const a=C(),c=e=>e===T.K.WITHIN||e===T.K.AGO,u=e=>e===T.K.BETWEEN,d=u(null==t?void 0:t.type)?t.period:D,p=c(null==t?void 0:t.type)?t.period:R,[h,f]=(0,r.useState)(d),[E,m]=(0,r.useState)(p),g=(null==t?void 0:t.type)||T.K.WITHIN,b=e=>c(e)?E:u(e)?h:void 0,P=e=>{n({type:g,period:e})};return(0,S.D)((()=>{t?c(t.type)?m(t.period):u(t.type)&&f(t.period):(f(D),m(R))}),[t]),l().createElement("div",{className:y()(a.root,i)},l().createElement(s.Z,{className:a.title,variant:"subtitle1"},o().text("Date")),l().createElement("div",{className:a.intervalContainer},l().createElement(v.Z,{label:"",className:a.typeInput,value:{value:g,label:x(g)},options:O.map((e=>({value:e,label:x(e)}))),onChange:e=>{let{value:r}=e;(null==t?void 0:t.type)!==r&&n({period:b(r),type:r})}}),c(g)?l().createElement(I.Z,{interval:E,onChange:P}):l().createElement(N.Z,{values:h,onChange:P})))};var w=n(15793),M=n(59952),A=n(38323);const k=[A.M.UPDATE,A.M.MERGE,A.M.UNMERGE];function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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 Z={input:e=>L({},e,{fontSize:"14px"}),menuPortal:e=>L({},e,{zIndex:1300})},G=(0,P.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"},valueContainer:{overflowY:"auto",height:44},option:{fontSize:"14px",height:"32px"}}),H=e=>{let{selectedHistoryActivityTypes:t,onChange:n,className:r}=e;const i=G(),a=e=>{return{value:e,label:(t=e,{[A.M.UPDATE]:o().text("Update"),[A.M.MERGE]:o().text("Merge"),[A.M.UNMERGE]:o().text("Unmerge")}[t]||"")};var t},u=e=>e.map(a),d=u(k);return l().createElement("div",{className:y()(i.root,r)},l().createElement(s.Z,{className:i.title,variant:"subtitle1"},o().text("Activity")),l().createElement(w.Z,{value:u(t),onChange:(0,c.pipe)((0,c.defaultTo)([]),(0,c.pluck)("value"),n),options:d,TextFieldProps:{classes:{root:i.dropDownInput}},components:{DropdownIndicator:M.Z},styles:Z,classes:i,menuPlacement:"bottom",menuPortalTarget:document.body}))},U=(0,P.Z)({popup:{width:500,height:500,overflowY:"hidden",display:"flex",flexDirection:"column"},filterContainer:{padding:20,height:410,display:"flex",flexDirection:"column"},filterContainerScrollable:{overflowY:"auto"},filterItem:{marginTop:15},filterControls:{display:"flex",padding:"10px 12px 0",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});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 z=e=>{let{className:t,filter:n,onApplyFilter:i,onClearFilter:a,entityType:u}=e;const b=U(),[y,v]=(0,r.useState)(null),T=()=>v(null),[O,x]=(0,r.useState)(n);(0,r.useEffect)((()=>{x(n)}),[n]);const I=(0,c.curry)(((e,t)=>{x((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){F(e,t,n[t])}))}return e}({},n,{[e]:t})))})),{activities:S=[],attributes:N=[],dateRange:P=null,users:C=[]}=O||{};return l().createElement(l().Fragment,null,l().createElement(f.Z,{icon:d.Z,size:"L",onClick:e=>v(e.currentTarget),className:t}),l().createElement(h.ZP,{classes:{paper:b.popup},open:!!y,anchorEl:y,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l().createElement("div",{className:b.filterContainer},l().createElement(s.Z,{variant:"h6"},o().text("Filter")),l().createElement("div",{className:b.filterContainerScrollable},l().createElement(_,{value:P,onChange:I("dateRange"),className:b.filterItem}),l().createElement(m.Z,{selectedUsers:C,onChange:I("users"),className:b.filterItem}),l().createElement(H,{selectedHistoryActivityTypes:S,onChange:I("activities"),className:b.filterItem}),l().createElement(g.Z,{selectedAttributes:N,entityType:u,onChange:I("attributes"),className:b.filterItem,title:o().text("Attribute updated")}))),l().createElement("div",{className:b.filterControls},l().createElement(p.Z,{onClick:a,className:b.clearButton},o().text("Clear all")),l().createElement(p.Z,{onClick:T},o().text("Cancel")),l().createElement(p.Z,{color:"primary",onClick:()=>{P&&(0,E.R)(P)?i(O):i((0,c.dissoc)("dateRange",O)),T()}},o().text("Apply")))))};var B=n(52730),V=n(43054),W=n(35674),Y=n(98538),$=n(12231),q=n(98281),K=n(79573);const X=(0,P.Z)({menuItem:{minHeight:"32px"},menuText:{fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"30px"},checkIcon:{position:"absolute",color:"rgba(0, 0, 0, 0.54)"}}),Q=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=K.ZT}=e;const i=X(),{text:o,selected:a,onClick:c}=n;return l().createElement($.Z,{classes:{root:i.menuItem},onClick:e=>{r(),c(e)},ref:t},a&&l().createElement(q.Z,{className:i.checkIcon}),l().createElement(s.Z,{classes:{root:i.menuText}},o))}));Q.displayName="MenuItemRenderer";const J=Q,ee=()=>{const e=(0,B.useSelector)(W.ZP.selectors.getHistoryMode),t=(0,B.useDispatch)(),n=e=>{t(W.N5.history.actions.setHistoryMode(e))},r=[{text:o().text("Compare to Current view"),selected:e===W.Z9.Current,onClick:()=>n(W.Z9.Current)},{text:o().text("Compare to Previous view"),selected:e===W.Z9.Previous,onClick:()=>n(W.Z9.Previous)}];return l().createElement(Y.Z,{MenuItemRenderer:J,buttonComponent:f.Z,buttonProps:{icon:V.Z,size:"L"},menuId:"history-menu",menuItems:r})},te=(0,P.Z)({root:{display:"flex",flex:1,alignItems:"center"},icon:{margin:4},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"3px 19px"},count:{fontSize:14},filterButton:{marginRight:"-4px"}}),ne=e=>{let{total:t,entityType:n,filter:r,onApplyFilter:i,onClearFilter:d}=e;const p=te();return l().createElement("div",{className:p.root},l().createElement(s.Z,{variant:"h6"},o().text("History")),!(0,c.isNil)(t)&&l().createElement(l().Fragment,null,l().createElement(a.Z,{orientation:"vertical",flexItem:!0,className:p.divider}),l().createElement(s.Z,{variant:"body1",color:"textSecondary",className:p.count},1===t?o().text("${count} contributing profile",{count:t}):o().text("${count} contributing profiles",{count:t}))),l().createElement(u.Z,null),l().createElement(z,{className:p.filterButton,entityType:n,filter:r,onApplyFilter:i,onClearFilter:d}),l().createElement(ee,null))}},95085:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),l=n.n(r),i=n(87918),o=n.n(i),a=n(15422);const s=()=>l().createElement(a.Z,{text:o().text("History in the making"),secondaryText:o().text("When you create an event or perform an activity, it will show up here.")})},32158:(e,t,n)=>{n.d(t,{Z:()=>G});var r=n(24328),l=n.n(r),i=n(52730),o=n(44443),a=n(87918),s=n.n(a),c=n(17440),u=n(71153),d=n.n(u),p=n(22241),h=n(35674),f=n(77277),E=n(90436),m=n(57312),g=n(79692);const b=(0,g.Z)((()=>({historyRow:{position:"relative",padding:"8px 12px 16px",cursor:"pointer"},selected:{background:"rgba(0,0,0,0.05)","&:before":{content:'""',background:"rgba(0,0,0,0.05)",width:"100%",height:"100%",position:"absolute",left:"-100%",top:0}},rowHeader:{display:"flex",position:"relative"},badge:e=>{let{color:t}=e;return{position:"absolute",width:"2px",height:"100%",left:"-9px",pointerEvents:"none",background:t,"&:before":{height:"100%",width:"3px",content:'""',left:"-3px",background:t,position:"absolute",opacity:.06}}},title:{color:"rgba(0,0,0,0.87)",fontSize:"13px",letterSpacing:0,lineHeight:"16px",fontWeight:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&.bold":{fontWeight:500}},date:{marginLeft:"auto",color:"rgba(0,0,0,0.54)",fontSize:"11px",letterSpacing:0,lineHeight:"16px"},user:{color:"rgba(0,0,0,0.38)",fontSize:"12px",letterSpacing:0,lineHeight:"14px"}}))),y=e=>{let{change:t,isCurrent:n,isSelected:r,onClick:i}=e;const{uri:o,type:a,matchGroups:c,user:u,timestamp:h}=t,f=(0,p.GtP)(o),g=b({color:f});return l().createElement("div",{className:d()(g.historyRow,{[g.selected]:r}),onClick:i},l().createElement("div",{className:g.rowHeader},l().createElement("div",{className:g.badge}),l().createElement(E.Z,{className:d()(g.title,{bold:n})},n?s().text("Current view"):(0,m.Xr)(a)),!n&&l().createElement(E.Z,{className:g.date},s().date(h,"L LT"))),c&&l().createElement(E.Z,{className:g.title},s().text("Match rule:")," ",c.join(", ")),l().createElement(E.Z,{className:g.user},u))};var v=n(21256);const T=e=>e===v.b.FAKE_FILTERED_INCOMING||e===v.b.FAKE_FILTERED_OUTGOING,O=e=>{let{x:t,y:n,toX:r,toY:i,color:o,isDashed:a}=e;const s=((e,t,n,r)=>{const l=t>r,i=e<n,o=l?-6:6;return`M${e} ${t} L${i?n-12:n+12} ${t} ${i?`c 6 0 12 ${o} 12`:`c -6 0 -12 ${o} -12`} ${l?-12:12} L${n} ${r}`})(t,n,r,i);return l().createElement("path",{d:s,stroke:o,strokeWidth:2,fill:"none",strokeDasharray:a?"3,3":void 0})};function x(){return x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const I=(0,r.forwardRef)(((e,t)=>{let{x:n,y:r,color:i,isDashed:o,isCollapsed:a,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const d=s?6:3;return l().createElement("g",x({},u,{ref:t}),c&&l().createElement("rect",{id:"line",x:n-d-4,y:r-d-4,width:2*d+8,height:2,fill:i}),l().createElement("circle",{cx:n,cy:r,r:d,fill:o?"#fff":i,stroke:i,strokeDasharray:o?"1,1":void 0,strokeWidth:2}),s&&l().createElement("g",{id:"icon"},l().createElement("rect",{x:n-4,y:r-1,width:8,height:2,fill:"#fff"}),a&&l().createElement("rect",{x:n-1,y:r-4,width:2,height:8,fill:"#fff"})))}));const S=(0,n(78223).Z)(I),N=(0,r.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:n}=e;const{historyLanes:r,rows:i}=t,o=[16],{links:a,rowLines:s,circles:c}=i.reduce(((e,t,a)=>{let{uri:s,height:c,uris:u,type:d,fakeType:h,index:f,timestamp:E,label:m}=t;const g=16*r[s].index+24,b=o[a];o.push(b+c);const y=T(h),x=y?u[0]:s,I=!(null!=u&&u.some((e=>r[e])));e.circles.push(l().createElement(S,{tooltipTitle:m,tooltipPlacement:"top",onMouseOver:n?()=>n(s,E,f):void 0,key:`circle-${x}-${a}`,x:g,y:b,color:(0,p.GtP)(x),isDashed:y,isCollapsed:I,showCollapseIcon:!!u,showLine:h===v.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(l().createElement("rect",{key:`${x}-${f}`,x:g,y:b-8,width:"100%",height:16,fill:(0,p.GtP)(x),opacity:.06}));const N=d===v.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const n=r[t];if(!n)return;const o=i[a].height,s=16*n.index+24,c=N?b-o:b+o;g!==s&&e.links.push(l().createElement(O,{key:`link-${t}-${f}`,x:g,y:b,toX:s,toY:c,isDashed:T(h),color:(0,p.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(r).length+24,d=o[o.length-1]-16;return Object.entries(r).forEach((e=>{let[t,n]=e;const r=16*n.index+24;n.lifeTime.forEach(((e,s)=>{var u;let{start:d,end:h}=e;if((null===(u=i[null==h?void 0:h.index])||void 0===u?void 0:u.type)===v.b.ENTITIES_SPLITTED)return;const f=(null==d?void 0:d.type)===v.b.ENTITIES_SPLITTED?(null==d?void 0:d.index)-1:null==d?void 0:d.index,E=(null==h?void 0:h.type)===v.b.ENTITIES_MERGED_MANUALLY||(null==h?void 0:h.type)===v.b.ENTITIES_MERGED?(null==h?void 0:h.index)+1:null==h?void 0:h.index,m=o[f]||o[o.length-2],g=o[E]||16;if(m<=g)return;const b=(0,p.GtP)(t);!h&&n.index>0&&c.push(l().createElement(I,{key:`initCircle-${t}-${s}`,x:r,y:g,color:b,showLine:!0})),a.unshift(l().createElement("path",{key:`line-${t}-${s}`,d:`M${r} ${m} L${r} ${g}`,stroke:b,strokeWidth:2}))}))})),l().createElement("svg",{className:"chart",width:u,height:d},l().createElement("g",{id:"rowLines"},s),l().createElement("g",{id:"links"},a),l().createElement("g",{id:"circles"},c))}));var P=n(87378);const C=(0,g.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"scroll",overflowY:"hidden"},history:{minWidth:344},buttonContainer:{gridColumnStart:1,gridColumnEnd:3,padding:"8px 16px"},shadow:{boxShadow:"inset -8px 0px 5px -5px rgba(0,0,0,0.1)"}});function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){R(e,t,n[t])}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _=e=>{let{historyData:t,isLoading:n,canLoadMore:a,onLoadMore:u,entityUri:E,historyEvent:m,findPreviousChange:g}=e;const b=C(),v=(0,i.useDispatch)(),T=(0,i.useSelector)(h.ZP.selectors.getIsEditableMode),O=(0,i.useSelector)(h.ZP.selectors.getMetadata),[x,I]=(0,r.useState)({historyLanes:{},rows:[]}),[S,R]=(0,r.useState)(!1),[_,w]=(0,r.useState)(-1);(0,r.useEffect)((()=>{if((0,c.isNil)(m))return void w(0);const e=e=>(null==e?void 0:e.uri)===((null==m?void 0:m.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==m?void 0:m.aStamp),n=-1!==_?t.rows[_]:null,r=t.rows.findIndex((t=>e(t)));w(e(n)?_:r)}),[t.rows,m]);const M=(0,r.useRef)(null),A=(0,r.useCallback)((e=>{if(!(0,c.isNil)(e)){var n;const r=null===(n=t.rows)||void 0===n?void 0:n.map(((t,n)=>{var r;return D({},t,{height:null===(r=e.childNodes[n])||void 0===r?void 0:r.clientHeight})}));I({historyLanes:t.historyLanes,rows:r})}}),[t]),k=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:n}=(null==M?void 0:M.current)||{};R(n<e-t)};return l().createElement("div",{className:b.historyTree},n&&l().createElement(P.Z,null),l().createElement("div",{className:d()(b.graph,{[b.shadow]:S}),onScroll:k,ref:M},l().createElement(N,{onHistoryCircleMouseOver:(e,t,n)=>{if((0,c.isNil)(x.rows[n].label)){const r={time:t,select:"crosswalks"};(0,p.HvW)(e,r).then((e=>{let{crosswalks:t}=e;const r=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,p.s5)(O,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");I((e=>D({},e,{rows:e.rows.map((e=>e.index===n?D({},e,{label:r}):e))})))}))}},graphData:x}),l().createElement(o.Z,{handleWidth:!0,onResize:k})),l().createElement("div",{ref:A,className:b.history},t.rows.map(((e,t)=>{const n=t===_,r=0===t;return l().createElement(y,{key:`row-${t}`,change:e,isCurrent:r,isSelected:n,onClick:()=>((e,t,n,r)=>{if(T){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;v(h.N5.mode.actions.modeUpdated(p.ARY.Viewing))}if(r&&!n||!r&&n)v(h.N5.history.actions.clearHistoryEvent()),w(0);else if(!r&&!n){const n=g(e-1,t.uri||E),r=g(e,t.uri||E),l=null==n?void 0:n.timestamp,i=null==r?void 0:r.timestamp,o=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;v(h.N5.history.actions.setHistoryEvent({aStamp:l,bStamp:i,overrideUri:o})),w(e)}})(t,e,n,r)})}))),a&&l().createElement("div",{className:b.buttonContainer},l().createElement(f.Z,{color:"primary",onClick:()=>u()},s().text("Show more"))))},w=(0,g.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),M=(0,g.Z)({icon:e=>{let{color:t}=e;return{boxSizing:"border-box",borderWidth:2,borderStyle:"solid",borderColor:t,height:12,width:12,borderRadius:30,transition:"opacity 0.3s",margin:4}},active:e=>{let{color:t}=e;return{backgroundColor:t}},inactive:{backgroundColor:"white"},clickable:{cursor:"pointer"}}),A=e=>{let{value:t,isSelected:n=!0,onClick:r}=e;const i=(0,p.GtP)(t),o=M({color:i});return l().createElement("div",{className:d()(o.icon,{[o.inactive]:!n,[o.active]:n,[o.clickable]:!!r}),onClick:r})},k=e=>{let{values:t,selectedValues:n,entityUri:r,onSelectValues:i,className:o}=e;const a=w();return l().createElement("div",{className:d()(a.root,o)},l().createElement(A,{value:r}),(null==t?void 0:t.length)>0&&t.map((e=>l().createElement(A,{key:e,value:e,isSelected:null==n?void 0:n.includes(e),onClick:()=>(e=>{null!=n&&n.includes(e)?i((0,c.without)([e],n)):i([...n||[],e])})(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 j=(e,t)=>e.reduce(((e,n,r)=>{let{start:l,end:i}=n;if(l){const n=t-l.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(n)&&n>0)&&(e.startIndex=r,e.startDistance=n)}if(i){const n=t-i.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(n)&&n<0)&&(e.endIndex=r,e.endDistance=n)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),Z=(0,g.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),G=(0,r.memo)((e=>{let{isLoading:t,historyWithTotal:n,contributorsUris:i,entityUri:o,canLoadMore:a,onLoadMore:s,historyEvent:u}=e;const d=Z(),[p,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(i)}),[i]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:n,selectedUris:l}=e;return(0,r.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},r=[{user:"",timestamp:0,uri:t}],i=(0,c.curry)(((e,n,r)=>{const l=r.uri||t;if(e)if(Array.isArray(e)){if(r.type!==v.b.ENTITY_LOST_MERGE)return null;if(e.includes(l))return r;if(n&&r.uris)return e.some((e=>r.uris.includes(e)))?r:null}else{var i;if(l===e||n&&null!==(i=r.uris)&&void 0!==i&&i.includes(e))return r}return null})),o=(e,t,r)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(i(t,r)))(n),a=t=>(e[t]||l&&!l.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const n=e[e.length-1];!n||n.start&&(n.start.type!==v.b.ENTITY_CREATED||t.type!==v.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):n.start=t},u=(e,t)=>{let n=!0;if(e.length){const r=e[e.length-1];n=!((!r.start||r.start.timestamp<t.timestamp)&&(!r.end||r.end.timestamp>t.timestamp))}n&&e.push({start:null,end:null})},d=(e,t)=>{if(e.length){const n=e[e.length-1];n.start||(n.start=t)}e.push({start:null,end:t})},p=[];return null==n||n.forEach(((n,l)=>{var i;switch(n.type){case v.b.ENTITIES_SPLITTED:if(!o(l,n.uri||t,!1))return;{const e=n.uri,t=n.uris?[n.uris,e]:[e],r=o(l,t,!0);if(r&&(!e||e===r.uri))return}break;case v.b.ENTITY_LOST_MERGE:case v.b.RELATIONSHIP_CREATED:case v.b.RELATIONSHIP_REMOVED:case v.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(i=n.uris)||void 0===i||i.forEach((e=>{a(e)||(c=!0)}));const h=a(n.uri||t);if(!h)return;const f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){L(e,t,n[t])}))}return e}({},n);((t,n)=>{var l,i;switch(n.type){case v.b.ENTITY_CREATED:s(t,n);break;case v.b.ENTITIES_MERGED_ON_THE_FLY:case v.b.ENTITY_CHANGED:u(t,n);break;case v.b.ENTITY_LOST_MERGE:case v.b.ENTITY_REMOVED:d(t,n);break;case v.b.ENTITIES_SPLITTED:u(t,n),null===(l=n.uris)||void 0===l||l.forEach((t=>{const l=e[t];if(!l)return;const i=l.lifeTime.length;i?s(l.lifeTime,n):d(l.lifeTime,n),r.push({uri:t,user:n.user,type:n.type,fakeType:i?v.b.FAKE_UPDATE:v.b.FAKE_NAVIGATE_PROFILE,timestamp:n.timestamp})}));break;case v.b.ENTITIES_MERGED:case v.b.ENTITIES_MERGED_MANUALLY:u(t,n),null===(i=n.uris)||void 0===i||i.forEach((t=>{const r=e[t];r&&d(r.lifeTime,n)}))}})(h.lifeTime,f),c&&p.push(f),r.push(f)})),p.forEach((t=>{t.uris.forEach((l=>{e[l]||n.forEach((n=>{let{uri:i,uris:o,timestamp:a,user:s,type:u}=n;i===l&&(null==o||o.forEach((n=>{const l=e[n];if(!l)return;let i=null;switch(u){case v.b.ENTITIES_MERGED:case v.b.ENTITIES_MERGED_MANUALLY:i=v.b.FAKE_FILTERED_INCOMING;break;case v.b.ENTITIES_SPLITTED:i=v.b.FAKE_FILTERED_OUTGOING;break;default:return}const o={fakeType:i,uri:t.uri,uris:[n],type:u,user:s,timestamp:a},d=j(l.lifeTime,t.timestamp);i===v.b.FAKE_FILTERED_INCOMING?(0,c.isNil)(d.endIndex)||(l.lifeTime[d.endIndex].end=o):(0,c.isNil)(d.startIndex)||(l.lifeTime[d.startIndex].start=o),r.splice(r.indexOf(t),0,o)})))}))}))})),r.forEach(((e,n)=>{e.index=n,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:r},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(i(t,!1)))(r)}}),[t,n,l])})({entityUri:o,historyChanges:null==n?void 0:n.changes,selectedUris:p});return l().createElement("div",{className:d.root},l().createElement(k,{values:i,selectedValues:p,onSelectValues:h,entityUri:o,className:d.borderBottom}),l().createElement(_,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:a,entityUri:o,historyEvent:u,findPreviousChange:E}))}))},75647:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),l=n.n(r),i=n(52730),o=n(35674),a=n(77277),s=n(90436),c=n(17440),u=n(87918),d=n.n(u);const p=(0,n(79692).Z)({root:{display:"flex",alignItems:"flex-start"},slice:{fontWeight:500},cancelButton:{width:"88px",flexShrink:0,marginLeft:"15px"}}),h=()=>{const e=p(),t=(0,i.useSelector)(o.ZP.selectors.getHistoryEvent),n=(0,i.useDispatch)(),r=(0,c.pipe)(o.N5.history.actions.clearHistoryEvent,n);return t?l().createElement("div",{className:e.root},l().createElement(s.Z,{component:"div"},d().text("You are viewing a historic slice:")," ",l().createElement("span",{className:e.slice},d().date(t.aStamp,"llll"))),l().createElement(a.Z,{className:e.cancelButton,variant:"contained",color:"primary",onClick:r},d().text("Cancel"))):null}},85457:(e,t,n)=>{n.d(t,{k:()=>d});var r=n(24328),l=n(22241),i=n(38323),o=n(37696),a=n(29627);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={activities:[i.M.MERGE,i.M.UNMERGE,i.M.UPDATE]},d=e=>{let{entity:t,enabled:n}=e;const[i,c]=(0,r.useState)(u),[d,p]=(0,r.useState)(0),h=(0,r.useMemo)((()=>(0,o.Z)(i)),[i]),[f,E]=(0,r.useState)(null),[m,g]=(0,r.useState)(null),[b,y]=(0,r.useState)(!1),v=(0,a._)(),T=null==t?void 0:t.uri,O={max:32,order:"desc"},x=(0,l.O27)(null==i?void 0:i.attributes)||void 0;(0,r.useEffect)((()=>{T&&n&&(y(!0),v((0,l.kgP)(s({entityUri:T,historicUris:f,filter:h,showAll:x},O))).then(g).catch((e=>{console.warn("Failed to load history data",e),g(null)})).finally((()=>{y(!1)})))}),[h,x,f]),(0,r.useEffect)((()=>{T&&n&&(y(!0),v((0,l.wdF)({entityUri:T})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{y(!1)})),p(0))}),[T,null==t?void 0:t.updatedTime,n]);const I=(0,r.useCallback)((e=>{T&&f&&n&&(y(!0),v((0,l.kgP)(s({entityUri:T,historicUris:f,filter:h,showAll:x,offset:e},O))).then((e=>{g((t=>s({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{y(!1)})))}),[f,h,n]),S=(0,r.useMemo)((()=>32*(d+1)<(null==m?void 0:m.total)),[m,d]),N=(0,r.useCallback)((e=>{p(0),c(e)}),[]),P=(0,r.useCallback)((()=>{N(s({},u))}),[]),C=(0,r.useCallback)((()=>{S&&(I(32*(d+1)),p(d+1))}),[I,d,S]);return{isLoading:b,canLoadMore:S,onLoadMore:C,onApplyFilter:N,onClearFilter:P,historicUris:f,historyWithTotal:m,historyFilter:i}}},69409:(e,t,n)=>{n.d(t,{C:()=>i});var r=n(24328),l=n(22241);const i=e=>{let{isHistoryTabActive:t,entity:n}=e;const[i,o]=(0,r.useState)(!1),a=null==n?void 0:n.uri;(0,r.useEffect)((()=>{t||o(!1)}),[a]),(0,r.useEffect)((()=>{t&&o(!0)}),[t]);const s=a&&!(0,l.ZiX)(a)&&!(0,l.biM)(n);return{isHistoryEnabled:i&&s,isProfilePersisted:s}}},35722:(e,t,n)=>{n.d(t,{a:()=>s});var r=n(24328),l=n(52730),i=n(35674),o=n(22241),a=n(29627);const s=e=>{let{entity:t,historyEvent:n}=e;const[s,c]=(0,r.useState)(!1),u=(0,l.useSelector)(i.ZP.selectors.getHistorySlice),d=(0,l.useDispatch)(),p=(0,a._)(),{aStamp:h,bStamp:f,overrideUri:E}=n||{},m=E||(null==t?void 0:t.uri);return(0,r.useEffect)((()=>{n&&m&&(c(!0),p(Promise.all([(0,o.lrH)(m,h),f&&1!==f?(0,o.lrH)(m,f):Promise.resolve(null)])).then((e=>{let[t,n]=e;d(i.N5.history.actions.setHistorySlice({aEntity:t,bEntity:n}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[h,f,m]),{isLoading:s,historySlice:u}}},21256:(e,t,n)=>{n.d(t,{b:()=>o});var r,l=n(20414);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}!function(e){e.FAKE_NAVIGATE_PROFILE="FAKE_NAVIGATE_PROFILE",e.FAKE_FILTERED_INCOMING="FAKE_FILTERED_INCOMING",e.FAKE_FILTERED_OUTGOING="FAKE_FILTERED_OUTGOING",e.FAKE_UPDATE="FAKE_UPDATE"}(r||(r={}));const o=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}({},l.I,r)},38323:(e,t,n)=>{let r;n.d(t,{M:()=>r}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(r||(r={}))},37696:(e,t,n)=>{n.d(t,{Z:()=>f,R:()=>E});var r=n(95038),l=n.n(r),i=n(17440),o=n(22241),a=n(38323),s=n(20414),c=n(39034);const u=e=>(0,i.pipe)((0,i.map)(e),(0,i.join)(" or ")),d=e=>{const[t,n]=e;return l()().subtract(t,n).valueOf()},p=(0,i.chain)((0,i.cond)([[(0,i.equals)(a.M.MERGE),()=>[s.I.ENTITIES_MERGED,s.I.ENTITIES_MERGED_MANUALLY,s.I.ENTITIES_MERGED_ON_THE_FLY]],[(0,i.equals)(a.M.UNMERGE),()=>[s.I.ENTITIES_SPLITTED]],[(0,i.equals)(a.M.UPDATE),()=>[s.I.ENTITY_CHANGED]]])),h=(0,i.pipe)((0,i.defaultTo)([]),p,(0,i.concat)([s.I.ENTITY_CREATED,s.I.ENTITY_REMOVED,s.I.ENTITY_LOST_MERGE]),u((e=>`equals(type, '${e}')`))),f=(0,i.pipe)((0,i.defaultTo)({}),(0,i.reject)(o.O27),(0,i.evolve)({users:u((e=>`equals(user, '${(0,o.HRH)(e)}')`)),attributes:u((e=>`changes(${(0,o.HRH)(e.value)})`)),dateRange:e=>{let{type:t,period:n}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${d(n)})`;case c.K.AGO:return`lte(timestamp, ${d(n)})`;case c.K.BETWEEN:{const[e,t]=n;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${l()(t).endOf("date").valueOf()})`}default:return""}}}),(0,i.over)((0,i.lensProp)("activities"),h),i.values,(0,i.reject)(o.O27),(0,i.append)("not equals(user, 'collaboration-service')"),(0,i.map)((e=>`(${e})`)),(0,i.join)(" and ")),E=e=>{if(e.type===c.K.AGO||e.type===c.K.WITHIN){const[t,n]=e.period;return"Number"===(0,i.type)(t)&&"String"===(0,i.type)(n)&&t>0}if(e.type===c.K.BETWEEN){const[t,n]=e.period;return t instanceof Date&&n instanceof Date}}},11326:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(24328);const l=e=>{const[t,n]=(0,r.useState)(!1),[l,i]=(0,r.useState)({});return(0,r.useEffect)((()=>{e().then((e=>{i(e||{})})).then((e=>n(!0))).catch((e=>n(!0)))}),[]),{isLoaded:t,savedState:l}}},39034:(e,t,n)=>{let r,l;n.d(t,{K:()=>r,o:()=>l}),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"}(l||(l={}))}}]);