@reltio/remotes 1.4.1351 → 1.4.1353

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/612.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[612],{60894:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(94656);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const i=e=>a().createElement("svg",c({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),m=n(17440),p=n(47458),d=n(87918),h=n.n(d),f=n(85657);const g=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:l,title:o,tooltipTitle:s}=e;const[c,d]=(0,r.useState)(null),g=(0,r.useCallback)((e=>{const t=(0,m.pipe)(f.JJ,(0,m.pluck)("id"))(e),r=(0,f.u)(n,e);l(r?(0,m.difference)(n,t):(0,m.uniq)((0,m.concat)(n,t)))}),[n,l]);return a().createElement(a().Fragment,null,a().createElement(u.k,{tooltipTitle:s||h().text("Show/hide columns"),size:"L",icon:i,onClick:e=>d(e.currentTarget)}),a().createElement(p.G,{onColumnClick:g,anchorEl:c,columnsData:t,onClose:()=>d(null),title:o,selectedColumns:n}))};g.propTypes={columnsData:s.uz,selectedColumns:o().arrayOf(o().string),onChangeColumns:o().func,title:o().string,tooltipTitle:o().string};const v=g},47458:(e,t,n)=>{n.d(t,{G:()=>S});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(17440),c=n(34091),i=n(44890),u=n(97820),m=n(85657),p=n(56656),d=n(54763),h=n(13980),f=n.n(h),g=n(7785),v=n(27239),E=n(71153),b=n.n(E);const y=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),x=e=>{let{item:t,onClick:n,checked:r,level:l,style:o,isFocused:s,isGroupItem:c,hideCheckBox:i}=e;const u=y();return a().createElement(g.Z,{hideCheckBox:i,key:t.id,onClick:n,checked:r,level:l,data:t,label:a().createElement(v.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:o,isFocused:s,hideIcon:c,className:b()({[u.groupItem]:c})})};x.propTypes={item:f().shape({label:f().string,filterText:f().string}),level:f().number,onClick:f().func,checked:f().bool,style:f().object,isGroupItem:f().bool,isFocused:f().bool,hideCheckBox:f().bool};const C=x,S=e=>{let{anchorEl:t,onClose:n,title:l,columnsData:h,onColumnClick:f,selectedColumns:g,hideCheckBox:v}=e;const E=y(),[b,x]=(0,r.useState)(""),S=(0,r.useMemo)((()=>(0,m.eX)(h,b)),[h,b]),O=(0,r.useMemo)((()=>(0,p.LG)(S)),[S]),w=(0,c.fW1)("label")(S)||308,k=(0,r.useCallback)((e=>{let{item:t}=e;return f(t)}),[f]),{focusIndex:M,handleKeyDown:P}=(0,d.t)({items:O,open:!0,onSelectFocusedItem:k,selectedItems:g,onClose:n}),_=(0,r.useCallback)((0,s.pipe)(n,(()=>x(""))),[n]),R=Math.min(300,32*O.length),N=Math.max(140,R+108);return a().createElement(u.Z,{className:E.popup,open:!!t,anchorEl:t,onClose:_,onSearch:x,title:l||o().text("Show/hide columns"),containerWidth:w,containerHeight:N,searchInputOnKeyDown:P},a().createElement(i.Z,{fixedTitle:!1,height:R,renderItem:(e,t,n)=>{let{item:r,level:l=0}=t;return a().createElement(C,{hideCheckBox:v,style:e,item:r,level:l,isFocused:M===n,checked:(0,m.u)(g,r),isGroupItem:(0,m.yf)(r),onClick:v?(0,s.pipe)(f,_):f})},items:O,getItemSize:()=>32,focusIndex:M}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>v,JJ:()=>E,yf:()=>s,u:()=>b});var r=n(17440),a=n(34091);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){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}const s=e=>e.id===e.groupId,c=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),i=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),m=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(i(t),c(t))))(e,t);return n?(n.children=m(n.children||[],t),e):e.concat(t)},p=(0,r.curry)(((e,t)=>a.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),d=(0,r.reduce)(((e,t)=>m(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),h=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(p(e)),(0,r.chain)((t=>[{item:l({},t,{filterText:e}),level:n},...t.children?h(e,t.children,n+1):[]])))(t)})),f=(0,r.has)("columns"),g=e=>{let{id:t,label:n,columns:a}=e;return[{id:t,groupId:t,label:n},...a.map((0,r.assoc)("groupId",t))]},v=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(f,g)),(0,r.filter)((0,r.either)(s,u)),d,h(t))(e),E=e=>e.children?(0,r.chain)(E,e.children):[e],b=(e,t)=>{const n=E(t),r=t=>e.includes(t.id);return s(t)?n.every(r):n.some(r)}},26180:(e,t,n)=>{n.d(t,{ZP:()=>f});var r=n(17440),a=n(31276);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){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}const s="CHANGE_COLUMNS",c="TOGGLE_FILTERS",i="CHANGE_FILTER",u="TOGGLE_SORT",m="CHANGE_PAGE",p="CHANGE_ROWS_PER_PAGE",d={changeColumns:(0,a.zD)(s),toggleFilters:(0,a.zD)(c),changeFilter:(0,a.zD)(i),toggleSort:(0,a.zD)(u),changePage:(0,a.zD)(m),changeRowsPerPage:(0,a.zD)(p)},h=(e,t)=>{const n=(0,r.difference)(e.visibleColumns,t),a=e=>n.includes(e);return(0,r.evolve)({visibleColumns:(0,r.always)(t),sorting:(0,r.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,r.keys)(e).reduce(((e,t)=>a(t)?(0,r.dissoc)(t,e):e),e)},e)},f={reducer:(e,t)=>{switch(t.type){case s:{const n=t.payload;return h(e,n)}case c:{const t=!e.filters;return l({},e,{filters:t?{}:null,page:t?e.page:0})}case i:{const{columnId:n,filter:a}=t.payload;return(0,r.evolve)({filters:a?(0,r.assoc)(n,a):(0,r.dissoc)(n),page:(0,r.always)(0)},e)}case u:{const n=t.payload,o=(0,r.path)(["sorting","field"],e),s=(0,r.path)(["sorting","order"],e);return l({},e,{sorting:{field:n,order:(0,a.Dh)(n===o?s:null)},page:0})}case m:return l({},e,{page:t.payload});case p:return l({},e,{rowsPerPage:t.payload});default:return e}},actions:d,changeVisibleColumns:h}},2014:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(19592);const c=(0,n(79692).Z)((e=>({label:{backgroundColor:"rgba(43,152,240,0.12)",fontSize:"12px",lineHeight:"15px",color:e.palette.text.primary,display:"flex",alignItems:"center",padding:"2px 7px"},container:{display:"flex",alignItems:"center",cursor:"pointer"},expanded:{marginBottom:"8px"}})));function i(){return i=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},i.apply(this,arguments)}const u=(0,r.forwardRef)(((e,t)=>{let{children:n,expanded:r,onExpand:l,className:u}=e,m=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","expanded","onExpand","className"]);const p=c();return a().createElement("div",i({onClick:l,ref:t,className:o()(p.container,u,{[p.expanded]:r})},m),a().createElement(s.Z,{expanded:r}),a().createElement("div",{className:p.label},n))}));u.displayName="MatchRuleBadge";const m=u},22071:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(34091),o=n(74615),s=n(93301),c=n(91044),i=n(87918),u=n.n(i);function m(){return m=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},m.apply(this,arguments)}const p=e=>a().createElement("svg",m({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 20h15.002L21 23l1.27-1.27-20-20.01L1 2.99l6.172 6.175a4.007 4.007 0 002.66 2.662l2.23 2.23A10.754 10.754 0 0011 14c-2.67 0-8 1.34-8 4v2zm8-16a3.987 3.987 0 00-2.795 1.137l5.656 5.659A3.999 3.999 0 0011 4z",fill:"#000",fillOpacity:.54})),d=(0,n(79692).Z)({notMatch:{display:"flex","& svg":{width:"14px",height:"14px"}}}),h=()=>{const e=d();return a().createElement("div",{className:e.notMatch},a().createElement(p,null)," ",u().text("Not a match"))};var f=n(77245);const g=e=>{let{entitiesMap:t,entity:n,match:r,metadata:i,variant:u=f.g.all}=e;if(!r.matchRules&&!r.negativeRules)return null;const m=(0,l.Pcm)(r),p=(0,l.LS0)(i,n.type,(r.matchRules||[]).concat(r.negativeRules||[])),d=p.filter((e=>{let{uri:t}=e;return t!==l.h_8})).length!==p.length,g=!m&&!d,v=d&&u!==f.g.excludeNotMatch;return a().createElement(a().Fragment,null,m?a().createElement(s.Z,{transitiveMatchRules:(0,l.wB1)(i,r,t)}):null,g?a().createElement(c.Z,{variant:u,matchRules:p,Component:o.Z}):null,v?a().createElement(h,null):null)}},41022:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l);const s=e=>{let{isMlMatch:t=!1}=e;return a().createElement(a().Fragment,null,t?o().text("Match IQ"):o().text("Match rules"))}},48636:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r),l=n(41022);const o=(0,n(79692).Z)({title:{fontWeight:500,marginBottom:"9px"},body:{fontWeight:"normal",marginLeft:"16px"},container:{padding:"8px",fontSize:"12px",lineHeight:"14px"},negativeRuleIcon:{position:"relative",marginRight:"4px",top:"1px"}});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=>a().createElement("svg",s({width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M5 0C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10C7.76 10 10 7.76 10 5C10 2.24 7.76 0 5 0ZM7.5 5.5H2.5V4.5H7.5V5.5Z",fill:"white",fillOpacity:"0.54"})),i=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const r=o();return a().createElement("div",{className:r.container},a().createElement("div",{className:r.title},a().createElement(l.Z,{isMlMatch:t})," "),a().createElement("div",{className:r.body},n.map((e=>a().createElement("div",{key:e.uri},"- ",e.negativeRule&&a().createElement(c,{className:r.negativeRuleIcon}),`${e.label}`)))))}},68479:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(41022);const c=(0,n(79692).Z)((e=>({container:{fontSize:"13px",lineHeight:"15px"},title:{color:e.palette.text.secondary,marginBottom:"7px"},labelsContainer:{color:e.palette.text.primary,marginBottom:"8px"},negativeRuleIcon:{position:"relative",marginRight:"4px",top:"1px"}})));function i(){return i=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},i.apply(this,arguments)}const u=e=>a().createElement("svg",i({width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M5 0C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10C7.76 10 10 7.76 10 5C10 2.24 7.76 0 5 0ZM7.5 5.5H2.5V4.5H7.5V5.5Z",fill:"black",fillOpacity:"0.54"})),m=e=>{let{isMlMatch:t,matchRules:n,className:r}=e;const l=c();return a().createElement("div",{"data-reltio-id":"simple-match-rules",className:o()(l.container,r)},a().createElement("div",{className:l.title},a().createElement(s.Z,{isMlMatch:t})),a().createElement("div",{className:l.labelsContainer},n.map((e=>a().createElement("div",{key:e.uri},"- ",e.negativeRule&&a().createElement(u,{className:l.negativeRuleIcon}),`${e.label}`)))))}},74615:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(48636),o=n(68479),s=n(83348),c=n(2014);const i=(0,n(79692).Z)({container:{display:"flex",flexDirection:"column",alignItems:"flex-start"},rulesContainer:{marginLeft:"16px"},icon:{height:"17px",width:"15px",marginRight:"5px"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const m=e=>a().createElement("svg",u({width:192,height:192,viewBox:"0 0 192 192",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"94.582%",y1:"6.451%",x2:"23.195%",y2:"83.323%",id:"MLMatch_svg__b"},a().createElement("stop",{stopColor:"#CDE1FF",offset:"0%"}),a().createElement("stop",{stopColor:"#AFFBF4",offset:"100%"})),a().createElement("linearGradient",{x1:"94.582%",y1:"6.594%",x2:"23.195%",y2:"83.214%",id:"MLMatch_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FDFFFF",offset:"100%"})),a().createElement("linearGradient",{x1:"93.837%",y1:"55.274%",x2:"29.292%",y2:"-20.431%",id:"MLMatch_svg__g"},a().createElement("stop",{stopColor:"#FFFCC7",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#FFF470",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"98.152%",id:"MLMatch_svg__i"},a().createElement("stop",{stopColor:"#83D6FF",offset:"0%"}),a().createElement("stop",{stopColor:"#72B9EF",offset:"100%"})),a().createElement("path",{d:"M1.821 66.003L34.263 9.94C36.633 5.813 45.673.594 51.398.072l64.445-.064c5.06-.241 14.821 5.084 17.888 10.395l31.467 54.503c3.186 5.518 2.765 16.592-.13 22.117l-30.948 53.481c-3.776 5.127-14.165 11.126-19.57 11.328l-62.134.061c-5.51-.264-15.934-5.764-18.758-10.655L1.856 86.155C-.846 81.475-.37 70.648 1.82 66.003z",id:"MLMatch_svg__a"}),a().createElement("path",{d:"M11.109 67.042l28.713-49.618C41.92 13.77 49.931 9.158 55.006 8.7l57.143.005c4.486-.209 13.147 4.516 15.871 9.223l27.954 48.298c2.83 4.89 2.467 14.696-.095 19.586l-27.391 47.334c-3.343 4.537-12.55 9.84-17.342 10.013l-55.094-.004c-4.886-.24-14.134-5.12-16.643-9.454L11.16 84.889c-2.4-4.147-1.989-13.735-.05-17.847z",id:"MLMatch_svg__c"}),a().createElement("path",{d:"M.995 0c26.4.684 47.59 22.234 47.59 48.72 0 26.23-23.795 34.53-23.795 56.987 0 3.703-3.011 6.705-6.725 6.705l-17.07-.001V68.985c6.466-1.238 11.353-6.923 11.353-13.75S7.46 42.722.995 41.485V0z",id:"MLMatch_svg__e"}),a().createElement("path",{d:"M47.353 0l-.087 41.235-.225.003c-7.588.167-13.688 6.37-13.688 13.997 0 7.683 6.19 13.92 13.854 14l-.091 43.265H27.887c-1.894-.56-3.197-1.234-3.91-2.025-.712-.79-1.357-2.275-1.933-4.455l-2.335-10.733c-.354-1.265-.674-2.183-.96-2.753-.286-.57-.784-1.281-1.494-2.134L2.002 70.367c-.846-.949-1.383-1.73-1.61-2.343-.228-.613-.356-1.626-.386-3.038V31.34c-.028-.785.044-1.37.216-1.757.173-.387.566-.848 1.18-1.382L28.368.885c.37-.367.665-.601.885-.704.22-.103.557-.163 1.01-.181h17.09z",id:"MLMatch_svg__h"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("g",{transform:"translate(12 6)"},a().createElement("use",{fill:"url(#MLMatch_svg__b)",xlinkHref:"#MLMatch_svg__a"}),a().createElement("use",{fill:"url(#MLMatch_svg__d)",opacity:.5,xlinkHref:"#MLMatch_svg__c"})),a().createElement("g",{transform:"translate(69.652 30.765)"},a().createElement("rect",{fill:"#363636",x:15.457,y:132.745,width:21.151,height:23.158,rx:10.576}),a().createElement("path",{d:"M48.146 118.763v18.93c0 7.198-5.944 13.035-13.277 13.035h-16.71c-7.333 0-13.278-5.837-13.278-13.036v-18.929a13 13 0 01.023-.763h43.22a13 13 0 01.022.763z",fill:"#717171"}),a().createElement("path",{d:"M41.348 137.2c0 7.199-4.947 13.035-11.048 13.035H16.395c-6.101 0-11.047-5.836-11.047-13.035v-18.965h36V137.2z",fill:"#828282"}),a().createElement("path",{d:"M47.51 138.235a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956z",fill:"#B1B1B1"}),a().createElement("path",{d:"M24.999 138.234v8h-16v-8h16zm0-11v8h-16v-8h16zm0-11v8h-16v-8h16z",fill:"#C5C5C5"}),a().createElement("g",{transform:"translate(27)"},a().createElement("mask",{id:"MLMatch_svg__f",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__e"})),a().createElement("use",{fill:"#FFD44B",xlinkHref:"#MLMatch_svg__e"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFD347",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFDE72",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M11.965 48.645c.17-7.171 7.488-10.693 13.863-6.802 7.245 4.422 4.05 16.311-4.742 16.548l-.268.004h-3.227l-4.608 56.092-5.995-.253 4.413-51.248.185-4.592-10.592.001v-6h10.83l.139-3.585.002-.165zm10.737-1.681c-2.54-1.55-4.64-.58-4.737 1.766l-.005.284-.131 3.38 2.99.001c2.852 0 3.999-3.945 2.011-5.347l-.128-.084z",fill:"#F3BE13",mask:"url(#MLMatch_svg__f)"}),a().createElement("ellipse",{fill:"url(#MLMatch_svg__g)",mask:"url(#MLMatch_svg__f)",cx:-1.89,cy:48.245,rx:36.534,ry:36.667}))),a().createElement("g",{transform:"translate(45.647 30.765)"},a().createElement("mask",{id:"MLMatch_svg__j",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__h"})),a().createElement("use",{fill:"url(#MLMatch_svg__i)",xlinkHref:"#MLMatch_svg__h"}),a().createElement("path",{fill:"#D6FCFA",fillRule:"nonzero",opacity:.5,mask:"url(#MLMatch_svg__j)",d:"M38.24 11.235v6l-3.55-.001-22.207 22.207h-18.13v-6H9.997l22.207-22.206zM25.682 40.779l13.8 13.799H50v6H36.997L21.439 45.021zM53.311 28.235v6h-13.65l-3.935 4.246-4.4-4.08 5.718-6.166zM14.248 52.235l20.52 20.52h3.695v6h-6.18l-20.52-20.52H-.647v-6zM21.353 84.235h8.95L40.4 94.332h16.753v6H37.915L27.817 90.235z"})),a().createElement("circle",{fill:"#008FD8",cx:94,cy:86,r:9})));var p=n(87918),d=n.n(p);const h=(0,s.Z)(c.Z),f=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const s=i(),[c,u]=(0,r.useState)(!1),p=(0,r.useCallback)((()=>u((e=>!e))),[]);return a().createElement("div",{className:s.container},a().createElement(h,{tooltipTitle:a().createElement(l.Z,{matchRules:n,isMlMatch:t}),tooltipPlacement:"bottom-start",onExpand:p,expanded:c},t?a().createElement(a().Fragment,null,a().createElement(m,{className:s.icon}),d().text("Match IQ")):d().text("Rules")),c?a().createElement(o.Z,{className:s.rulesContainer,matchRules:n,isMlMatch:t}):null)}},91044:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(17440),c=n(34091),i=n(77245);const u=(0,n(79692).Z)({container:{display:"flex",flexDirection:"column","& :not(:last-child)":{marginBottom:"2px"}}});function m(){return m=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},m.apply(this,arguments)}const p=e=>{let{matchRules:t,Component:n,variant:r=i.g.all}=e,l=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,["matchRules","Component","variant"]);const o=u(),[p,d]=(0,c.UkJ)(t),{all:h,simple:f,excludeNotMatch:g}=i.g,v=[h,f,g].includes(r)&&!(0,s.isEmpty)(d),E=[h,g].includes(r)&&!(0,s.isEmpty)(p);return a().createElement("div",{className:o.container},v?a().createElement(n,m({matchRules:d},l)):null,E?a().createElement(n,m({isMlMatch:!0,matchRules:p},l)):null)};p.propTypes={matchRules:c.p3$,Component:o().func};const d=p},93301:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(2014),c=n(19592),i=n(68479),u=n(91044),m=n(79692);const p=(0,m.Z)((e=>({label:{fontSize:"13px",lineHeight:"15px",color:e.palette.primary.light},container:{display:"flex",flexDirection:"column"},badge:{display:"flex",marginBottom:"8px",cursor:"pointer"},matchLabels:{marginLeft:"30px"}}))),d=e=>{let{label:t,matchRules:n}=e;const l=p(),[o,s]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>s((e=>!e))),[]);return a().createElement("div",{"data-reltio-id":"transitive-match-rule",className:l.container},a().createElement("div",{onClick:m,className:l.badge},a().createElement(c.Z,{expanded:o}),a().createElement("div",{className:l.label},t)),o?a().createElement(u.Z,{Component:i.Z,matchRules:n,className:l.matchLabels}):null)},h=(0,m.Z)({container:{display:"flex",flexDirection:"column","& :not(:last-child)":{marginBottom:"2px"}}});var f=n(83348),g=n(48636);const v=(0,m.Z)({ruleWrapper:{paddingTop:"8px"},label:{fontWeight:500,fontSize:"12px"}}),E=e=>{let{transitiveMatchRules:t}=e;const n=v();return a().createElement(a().Fragment,null,t.map(((e,t)=>{let{label:r,matchRules:l}=e;return a().createElement("div",{key:t,className:n.ruleWrapper},a().createElement("div",{className:n.label},r),a().createElement(g.Z,{matchRules:l}))})))};function b(){return b=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},b.apply(this,arguments)}const y=(0,f.Z)(s.Z),x=e=>{let{transitiveMatchRules:t}=e;const n=h(),[l,s]=(0,r.useState)(!1),c=(0,r.useCallback)((()=>s((e=>!e))),[]);return a().createElement("div",{className:n.container},a().createElement(y,{tooltipTitle:a().createElement(E,{transitiveMatchRules:t}),tooltipPlacement:"bottom-start",onExpand:c,expanded:l},o().text("Transitive matches")),l?t.map(((e,t)=>a().createElement(d,b({key:t},e)))):null)}},77245:(e,t,n)=>{let r;n.d(t,{g:()=>r}),function(e){e.all="all",e.simple="simple",e.excludeNotMatch="excludeNotMatch"}(r||(r={}))},93428:(e,t,n)=>{n.d(t,{H:()=>d});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l);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=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.955 10.955v-3.5l4.5 4.5-4.5 4.5v-3.5h-6.41l-6-6 1.41-1.41 5.41 5.41h5.59zm-11 7.41l-1.41-1.41 3.41-3.41 1.41 1.41-3.41 3.41z",fill:"#000",fillOpacity:.54}));var i=n(31276),u=n(98808),m=n(84504);function p(){return p=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},p.apply(this,arguments)}const d=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=u.N.iconButton,onMenuClose:l=i.ZT,disabled:s=!1,entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onSuccess:v,onError:E}=e,b=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,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onSuccess","onError"]);const{sendMergeAllRequest:y}=(0,m._)({entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onError:E,onSuccess:v});return a().createElement(u.K,p({className:n,disabled:s,mode:r,label:o().text("Merge"),icon:c,onClick:y,onMenuClose:l,ref:t},b))}));d.displayName="mergeButton"},30885:(e,t,n)=>{n.d(t,{i:()=>d});var r=n(98808),a=n(24328),l=n.n(a);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}const s=e=>l().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 1.5v3.638h-1.247l-11.03 11H2v2h3.55l11.029-11H17V10.5L21.5 6 17 1.5zM8.844 8.785L5.55 5.5H2v2h2.723l2.707 2.7 1.414-1.415zm4.835 4.822l-1.414 1.414 3.488 3.479H17v3.638l4.5-4.5-4.5-4.5V16.5h-.421l-2.9-2.893z",fill:"#000",fillOpacity:.54}));var c=n(31276),i=n(87918),u=n.n(i),m=n(59119);function p(){return p=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},p.apply(this,arguments)}const d=(0,a.forwardRef)(((e,t)=>{let{className:n,mode:a=r.N.iconButton,onMenuClose:o=c.ZT,disabled:i=!1,entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onSuccess:v}=e,E=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,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onSuccess"]);const{sendMarkAsNotMatchRequest:b}=(0,m.m)({entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onSuccess:v});return l().createElement(r.K,p({className:n,disabled:i,mode:a,label:u().text("Not a match"),icon:s,onClick:b,onMenuClose:o,ref:t},E))}));d.displayName="notMatchButton"},17308:(e,t,n)=>{n.d(t,{P:()=>m});var r=n(24328),a=n.n(r),l=n(87685);const o=(0,n(79692).Z)({container:{display:"flex",flexShrink:0,height:"63px",alignItems:"center",borderBottom:"1px solid rgba(0,0,0,0.12)"},icon:{margin:"0 12px"},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"19px 17px"},secondTitle:{fontSize:"14px"}});var s=n(94079),c=n(87918),i=n.n(c),u=n(8818);const m=e=>{let{onClose:t,mainTitle:n,secondTitle:r,content:c,rightContent:m}=e;const p=o();return a().createElement("div",{className:p.container},a().createElement(u.k,{size:"L",icon:l.default,onClick:t,className:p.icon,tooltipTitle:i().text("Close")}),c||a().createElement(a().Fragment,null,a().createElement(s.Typography,{variant:"h6"},n),r&&a().createElement(a().Fragment,null,a().createElement(s.Divider,{orientation:"vertical",flexItem:!0,className:p.divider}),a().createElement(s.Typography,{variant:"body1",color:"textSecondary",className:p.secondTitle},r)),m))}},89140:(e,t,n)=>{n.d(t,{V:()=>k});var r=n(24328),a=n.n(r),l=n(17440),o=n(94079),s=n(94842),c=n(13980),i=n.n(c),u=n(87918),m=n.n(u),p=n(98685),d=n(71153),h=n.n(d),f=n(79692);const g=(0,f.Z)((e=>({comment:{display:"flex",flexDirection:"row",flex:1,marginLeft:"6px"},avatar:{height:"24px",width:"24px",margin:"3px 13px 0 0"},icon:{fill:"#537280",backgroundColor:"#EAEDEE"},firstLine:{display:"flex",flexDirection:"row"},info:{flex:1},author:{flex:1,fontWeight:"500",color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px"},date:{color:"rgba(0, 0, 0, 0.54)",fontSize:"11px",marginRight:"17px",lineHeight:"15px"},text:{color:"rgba(0, 0, 0, 0.6)",fontSize:"13px",wordWrap:"break-word",wordBreak:"break-all",paddingRight:"10px"}}))),v=(0,f.Z)((e=>({circleButton:{maxWidth:"14px",maxHeight:"14px",border:"1px solid rgba(0, 0, 0, 0.3)",fontSize:"13px",color:"rgba(0, 0, 0, 0.6)",position:"absolute",top:"-11px",left:"5px",backgroundColor:"#ffffff","&:hover":{backgroundColor:"#f7f7f7"},"&.focused":{backgroundColor:"#f7f7f7"}},delimiter:{position:"relative",height:"4px",borderTop:"1px solid rgba(0, 0, 0, 0.3)",borderBottom:"1px solid rgba(0, 0, 0, 0.3)",margin:"15px 0 24px 0"}}))),E=(0,f.Z)((e=>({container:{padding:"5px 0",display:"flex",flexDirection:"column"},commentsContainer:{maxHeight:"300px",overflowY:"auto"},title:{margin:"0 0 8px 5px",fontSize:"14px",color:"rgba(0, 0, 0, 0.87)"},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"0 6px",height:"40px",margin:"10px 17px 0 6px",fontSize:"14px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}}))),b=(0,f.Z)((e=>({messageContainer:{borderBottom:"1px solid rgba(0,0,0,0.3)",paddingBottom:"7px",marginBottom:"7px"}}))),y=e=>{let{author:t,classes:n,message:r,time:l}=e;const s=g();return a().createElement("div",{className:s.comment},a().createElement(o.Avatar,{className:s.avatar},a().createElement(p.Z,{className:s.icon})),a().createElement("div",{className:h()(s.info,n.messageContainer)},a().createElement("div",{className:s.firstLine},a().createElement("div",{className:s.author},t),a().createElement("span",{className:s.date},m().date(l,"L LT"))),a().createElement("div",{className:s.text},r)))};y.defaultProps={classes:{}},y.propTypes={classes:i().object,author:i().string,id:i().string,message:i().string,time:i().number};const x=e=>{let{comments:t,onClick:n}=e;const r=v();return a().createElement(a().Fragment,null,a().createElement(y,t[0]),a().createElement("div",{className:r.delimiter},a().createElement(o.IconButton,{className:r.circleButton,onClick:n},t.length-2)),a().createElement(y,t[t.length-1]))};x.propTypes={comments:i().arrayOf(i().shape({author:i().string,id:i().string,message:i().string,time:i().number})),onClick:i().func};const C=e=>{let{comments:t}=e;const n=b();return t.map((e=>{let{author:t,id:r,message:l,time:o}=e;return a().createElement(y,{classes:{messageContainer:n.messageContainer},key:r,author:t,message:l,time:o})}))};C.propTypes={comments:i().arrayOf(i().shape({author:i().string,id:i().string,message:i().string,time:i().number}))};var S=n(43477),O=n(22385);const w=e=>e.target.value,k=e=>{let{processInstanceComments:t,taskId:n,isTaskOpen:c}=e;const i=E(),[u,p]=(0,r.useState)(!1),[d,h]=(0,r.useState)(""),{comments:f,writeComment:g,readOnly:v}=(0,S.W)({processInstanceComments:t,taskId:n,isOpen:c}),b=(0,r.useCallback)((()=>{g(d),h("")}),[d,g]),y=(0,l.pipe)(w,h);return a().createElement("div",{className:i.container},a().createElement("div",{className:i.title}," ",m().text("Comments")," "),a().createElement("div",{className:i.commentsContainer},u||f.length<3?a().createElement(C,{comments:f}):a().createElement(x,{onClick:()=>p(!0),comments:f})),!v&&a().createElement(o.Input,{endAdornment:a().createElement(o.InputAdornment,{position:"end"},a().createElement(O.Z,{icon:s.Z,disabled:0===d.length,onClick:b})),classes:{root:i.filledInputRoot},placeholder:m().text("Write a comment"),value:d,onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),b),onChange:y,disableUnderline:!0}))};k.propTypes={processInstanceComments:i().arrayOf(i().shape({author:i().string,id:i().string,message:i().string,time:i().number})),taskId:i().string}},75813:(e,t,n)=>{n.d(t,{R:()=>s});var r=n(87918),a=n.n(r),l=n(34091),o=n(585);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{errorMessage:t,errorCode:n}=e;n!==l.Xt7.WORKFLOW_IS_NOT_REGISTERED_ERROR&&(console.error(e),o.Z.addError({title:a().text("Error"),message:t||a().text("Something went wrong...")}))}},21380:(e,t,n)=>{n.d(t,{rc:()=>a,Xs:()=>l,tg:()=>o});var r=n(17440);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.find((0,r.startsWith)("changeRequests/"))},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,r.pipe)(a,(0,r.unless)(r.isNil,(0,r.pipe)((0,r.split)("/"),(0,r.nth)(1))))(e)},o=e=>void 0===e||!0===e},5434:(e,t,n)=>{n.d(t,{r:()=>h});var r=n(24328),a=n(17440),l=n(52730),o=n(34091),s=n(59431),c=n(85229),i=n(94150),u=n(75813),m=n(22994),p=n(21380);const d=e=>({label:e,value:e}),h=e=>{let{assignee:t,taskId:n,isOpen:h}=e;const{updateTaskState:f}=(0,r.useContext)(i.O)||{},g=(0,l.useSelector)(s.ZP.selectors.getWorkflowPath),v=(0,l.useSelector)(s.ZP.selectors.getWorkflowEnvironmentUrl),E=(0,l.useSelector)(s.ZP.selectors.getTenant),b=(0,c._)(),y=(0,c._)(),[x,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(),[w,k]=(0,r.useState)(!1),M=(0,m.Z)()("UPDATE_TASK")&&(0,p.tg)(h);(0,r.useEffect)((()=>{C(d(t))}),[t]);const P=(0,r.useCallback)((e=>{if(g&&M&&n){const t=(0,a.filter)((t=>t.value.toLowerCase().includes(e)));return S?Promise.resolve(t(S)):y((0,o.j2$)({taskId:n,workflowPath:g,environment:v,tenant:E})).then((e=>{const{data:n}=e,r=n.sort(((e,t)=>o.P6Y.strings.sort("asc",e,t))).map(d);return O(r),t(r)})).catch(u.R)}}),[g,n,v,E,S,O,M]),_=(0,r.useCallback)((e=>{if(g&&M&&n){const{value:t}=e;k(!0),b((0,o._C4)({taskId:n,workflowPath:g,environment:v,tenant:E,assignee:t})).then((()=>{C(d(t)),null==f||f(n,{assignee:t})})).catch(u.R).finally((()=>{k(!1)}))}}),[g,n,v,E,M]);return{assignee:x,getAssignees:P,updateAssignee:_,updateRequestIsInProgress:w,readOnly:!M}}},22994:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(52730),a=n(59431);const l=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getWorkflowPath),t=(0,r.useSelector)(a.ZP.selectors.getCanUserStartProcessFromQuery),n=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowJobs),l=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowEnvironmentConfigJar),o=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowDefinition),s=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowConfigJar),c=(0,r.useSelector)(a.ZP.selectors.getCanUserViewProcessInstanceSearchQuery),i=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateWorkflowDataTask),u=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateProcessInstance),m=(0,r.useSelector)(a.ZP.selectors.getCanUserReadWorkflowDataTask),p=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowEnvironmentDefinition),d=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowDefinition),h=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsValidateTasks),f=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsUpdateTasks),g=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsTerminateProcessInstance),v=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsSyncBusinessProcessData),E=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobs),b=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowEnvironmentConfigJar),y=(0,r.useSelector)(a.ZP.selectors.getCanUserRegisterConfigEnvironments),x=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowConfigJar);return r=>{if(!e)return!1;switch(r){case"VIEW_PROCESS_DEFINITIONS":return o;case"DEPLOY_GENERIC_PROCESS_DEFINITION":return p;case"VIEW_JOBS":return n;case"START_JOB":return E||v&&g&&f&&h;case"VIEW_CUSTOM_JARS":return s||l;case"UPDATE_PROCESS_INSTANCE":return u;case"VIEW_TASKS":return m;case"REGISTER_TENANT":return y;case"START_PROCESS_INSTANCE":case"START_PROCESS_INSTANCE_SEARCH_QUERY":return t;case"VIEW_PROCESS_INSTANCE_COMMENTS":case"VIEW_PROCESS_INSTANCES":case"VIEW_PROCESS_INSTANCE_COUNT":return c;case"UPDATE_TASK":return i;case"DEPLOY_TENANT_PROCESS_DEFINITION":return d;case"DEPLOY_CUSTOM_JAR":return x&&b}return!1}}},43477:(e,t,n)=>{n.d(t,{W:()=>p});var r=n(24328),a=n(34091),l=n(59431),o=n(52730),s=n(85229),c=n(94150),i=n(75813),u=n(22994),m=n(21380);const p=e=>{let{processInstanceComments:t,taskId:n,isOpen:p}=e;const{updateTaskState:d}=(0,r.useContext)(c.O)||{},h=(0,o.useSelector)(l.ZP.selectors.getWorkflowPath),f=(0,o.useSelector)(l.ZP.selectors.getWorkflowEnvironmentUrl),g=(0,o.useSelector)(l.ZP.selectors.getTenant),v=(0,s._)(),[E,b]=(0,r.useState)([]),[y,x]=(0,r.useState)(!1),C=(0,u.Z)()("UPDATE_TASK")&&(0,m.tg)(p);(0,r.useEffect)((()=>{b(t||[])}),[t]);const S=(0,r.useCallback)((e=>{C&&(x(!0),v((0,a.tZe)({workflowPath:h,environment:f,tenant:g,taskId:n,comment:e}).then((()=>(0,a.yW4)({workflowPath:h,environment:f,tenant:g,taskId:n})))).then((e=>{let{processInstanceComments:t}=e;b(t||[]),null==d||d(n,{processInstanceComments:t})})).catch(i.R).finally((()=>x(!1))))}),[f,n,g,h,v,d,C]);return{comments:E,requestIsInProgress:y,writeComment:S,readOnly:!C}}},97094:(e,t,n)=>{n.d(t,{S:()=>a});var r=n(24328);const a=n.n(r)().createContext((()=>{}));a.displayName="SnackbarContext"},94150:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(24328);const a=n.n(r)().createContext(null);a.displayName="WorkflowTasksContext"},86361:(e,t,n)=>{n.d(t,{o:()=>o});var r=n(24328),a=n(17440);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 o=e=>{let{actions:t,dispatch:n}=e;return(0,r.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[r,o]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},e,{[r]:(0,a.pipe)(o,n)})}),{})),[n,t])}},8159:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(24328);const a=()=>{const e=(0,r.useRef)(!1);return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1}))),e}},59119:(e,t,n)=>{n.d(t,{m:()=>c});var r=n(34091),a=n(52730),l=n(59431),o=n(24328),s=n(8159);const c=e=>{let{entities:t,entity:n,onFinishRequest:c,onStartRequest:i,onSuccess:u}=e;const m=(0,s.X)(),p=(0,a.useSelector)(l.ZP.selectors.getTenant),d=(0,a.useSelector)(l.ZP.selectors.getDtssPath),[h,f]=(0,o.useState)(!1);return{isPending:h,sendMarkAsNotMatchRequest:(0,o.useCallback)((()=>{null==i||i(),f(!0);const e={dtssPath:d,customerTenant:p,entity:n,entities:t};((0,r.biM)(n)?(0,r.bMg)(e):(0,r.fZN)(e)).then((()=>{null==u||u()})).finally((()=>{null==c||c(),m.current&&f(!1)}))}),[d,t,n,m,c,i,u,p])}}},28741:(e,t,n)=>{n.d(t,{s:()=>u});var r=n(24328),a=n(52730),l=n(59431),o=n(34091),s=n(20449),c=n(85229),i=n(17440);const u=e=>{let{enabled:t,entity:n,filter:u,rules:m,onFinishLoading:p,onStartLoading:d,options:h,page:f,rowsPerPage:g,sorting:v,markMatchedValues:E}=e;const{order:b,field:y}=v||{},[x,C]=(0,r.useState)(0),[S,O]=(0,r.useState)([]),[w,k]=(0,r.useState)({}),M=(0,a.useSelector)(l.ZP.selectors.getTenant),P=(0,a.useSelector)(l.ZP.selectors.getDtssPath),_=(0,a.useSelector)(l.ZP.selectors.getDataTenants),{activityFilter:R,globalFilter:N}=(0,a.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},Z="boolean"==typeof h.showInactiveEntities?h.showInactiveEntities?o.YJ7.ALL:o.YJ7.ACTIVE_ONLY:R,T=(0,r.useMemo)((()=>({dtssPath:P,dataTenants:_,entity:n,customerTenant:M,dtssRequest:o.Rgl})),[P,_,n,M]),I=(0,r.useCallback)((0,o.U_T)(T,o.SP6),[T]),j=(0,s.a)(I),L=(0,s.a)(o.bFH),F=(0,i.prop)("uri",n),z=(0,c._)(),D=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t||(0,o.ZiX)(F))return C(0),O([]),void k({});null==d||d(),z((0,o.biM)(n)?L({dtssPath:P,entity:n,customerTenant:M,offset:f*g,max:g,force:e}):j({entityUri:F,offset:f*g,max:g,filter:(0,o.vyX)(N,u)||"",rules:m,sort:y,order:b,force:e,markMatchedValues:E,deep:h.showTransitiveMatches?void 0:1,activeness:Z})).then((e=>{const{response:t,total:n,originalResponse:r}=e;C(n),(0,o.B1H)(r).length>0&&k((0,o.KPC)(r)),O(t)})).finally((()=>{null==p||p()}))}),[N,Z,P,t,F,y,u,m,E,L,j,p,d,h,b,f,g,z,M]);return(0,r.useEffect)((()=>{D()}),[D]),{total:x,matches:S,entitiesMap:w,loadMatches:(0,r.useCallback)((()=>{D(!0)}),[D])}}},84504:(e,t,n)=>{n.d(t,{_:()=>i});var r=n(24328),a=n(52730),l=n(59431),o=n(34091),s=n(31276),c=n(8159);const i=e=>{let{entities:t,entity:n,onFinishRequest:i,onStartRequest:u,onSuccess:m,onError:p=s.ZT}=e;const d=(0,c.X)(),h=(0,a.useSelector)(l.ZP.selectors.getTenant),f=(0,a.useSelector)(l.ZP.selectors.getDtssPath),[g,v]=(0,r.useState)(!1);return{isPending:g,sendMergeAllRequest:(0,r.useCallback)((()=>{null==u||u(),v(!0);const e={dtssPath:f,customerTenant:h,entity:n,entities:t};((0,o.biM)(n)?(0,o.uJQ)(e):(0,o.OxG)(e)).then((()=>{null==m||m()})).catch(p).finally((()=>{null==i||i(),d.current&&v(!1)}))}),[f,t,n,p,i,u,m,h])}}},20449:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(24328),a=n(17440);const l=e=>(0,r.useCallback)((e=>{let t={},n=[];return async r=>{let{max:l,offset:o,force:s}=r,c=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}(r,["max","offset","force"]),i=s;const u=Object.keys(t);if(i=i||!(0,a.equals)(Object.keys(c),u),!i)for(const e of u)i=i||!(0,a.equals)(t[e],c[e]);return i&&(n=await e(c),t=c),{response:n.slice(o,o+l),total:n.length,originalResponse:n}}})(e),[e])},60641:(e,t,n)=>{n.d(t,{w:()=>s});var r=n(24328),a=n(20562);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){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}const s=e=>{let{getSavedState:t,saveState:n,entityTypeUri:o}=e;const[s,c]=(0,r.useState)({}),[i,u]=(0,r.useState)(null),[m,p]=(0,r.useState)(!1);(0,a.D)((()=>{i&&(c(l({},s,i)),u(null))}),[o]);const d=(0,r.useCallback)((e=>{const t={[o]:e};u(t),n(l({},s,t))}),[o,n,s]);return(0,r.useEffect)((()=>{t().then((e=>{c(e||{})})).then((e=>p(!0))).catch((e=>p(!0)))}),[]),{isLoaded:m,savedState:s[o],updateSavedState:d}}},24605:(e,t,n)=>{n.d(t,{D:()=>u});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(94079),c=n(37265);const i=3e5,u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{anchorOrigin:t,showDismiss:n}=e,[l,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),d=(0,r.useCallback)((()=>{u(!1),p("")}),[]),h=(0,r.useCallback)((e=>{u(!0),p(e)}),[]),f=(0,r.useCallback)((()=>a().createElement(s.Portal,{container:document.body},a().createElement(c.Z,{open:l,anchorOrigin:t,autoHideDuration:i,onClose:d,message:m,action:n?a().createElement(s.Button,{color:"primary",onClick:d},o().text("Dismiss")):void 0}))),[l,d,m]);return{SnackbarRenderer:f,showSnackbarMessage:h}}},17554:(e,t,n)=>{n.d(t,{U:()=>s});var r=n(24328),a=n(52730),l=n(34091),o=n(59431);const s=()=>{const[e,t]=(0,r.useState)([]),n=(0,a.useSelector)(o.ZP.selectors.getTenant),s=(0,a.useSelector)(o.ZP.selectors.getServicesPath),c=e=>{console.warn("Users error",e),t([])};return(0,r.useEffect)((()=>{(0,l.kz_)({tenant:n,servicesPath:s}).then((e=>{let{array:n}=e;return t(n)})).catch(c)}),[n,s]),e}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[612],{60894:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(94656);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}const i=e=>a().createElement("svg",c({width:20,height:18,viewBox:"0 0 20 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M16 7.24V6h-4v1.24a8.417 8.417 0 00-2 .768V6H6v6h.29a8.497 8.497 0 00-.15.358l-.29.733.29.733.07.176H2c-1.1 0-2-.9-2-2V2C0 .9.9 0 2 0h14c1.1 0 2 .9 2 2v6.008a8.417 8.417 0 00-2-.768zM4 12V6H2v6h2zm0-8V2H2v2h2zm6 0V2H6v2h4zm6 0V2h-4v2h4zm-2 5a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091A6.451 6.451 0 0014 9zm0 6.818a2.728 2.728 0 010-5.454 2.728 2.728 0 010 5.454zm0-4.363c-.905 0-1.636.73-1.636 1.636 0 .905.73 1.636 1.636 1.636.905 0 1.636-.73 1.636-1.636 0-.906-.73-1.636-1.636-1.636z",fill:"#000",fillRule:"nonzero",stroke:"none",strokeWidth:1,opacity:.54}));var u=n(8818),m=n(17440),p=n(47458),d=n(87918),h=n.n(d),f=n(85657);const g=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:l,title:o,tooltipTitle:s}=e;const[c,d]=(0,r.useState)(null),g=(0,r.useCallback)((e=>{const t=(0,m.pipe)(f.JJ,(0,m.pluck)("id"))(e),r=(0,f.u)(n,e);l(r?(0,m.difference)(n,t):(0,m.uniq)((0,m.concat)(n,t)))}),[n,l]);return a().createElement(a().Fragment,null,a().createElement(u.k,{tooltipTitle:s||h().text("Show/hide columns"),size:"L",icon:i,onClick:e=>d(e.currentTarget)}),a().createElement(p.G,{onColumnClick:g,anchorEl:c,columnsData:t,onClose:()=>d(null),title:o,selectedColumns:n}))};g.propTypes={columnsData:s.uz,selectedColumns:o().arrayOf(o().string),onChangeColumns:o().func,title:o().string,tooltipTitle:o().string};const v=g},47458:(e,t,n)=>{n.d(t,{G:()=>S});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(17440),c=n(90088),i=n(44890),u=n(97820),m=n(85657),p=n(56656),d=n(54763),h=n(13980),f=n.n(h),g=n(7785),v=n(27239),E=n(71153),b=n.n(E);const y=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),x=e=>{let{item:t,onClick:n,checked:r,level:l,style:o,isFocused:s,isGroupItem:c,hideCheckBox:i}=e;const u=y();return a().createElement(g.Z,{hideCheckBox:i,key:t.id,onClick:n,checked:r,level:l,data:t,label:a().createElement(v.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:o,isFocused:s,hideIcon:c,className:b()({[u.groupItem]:c})})};x.propTypes={item:f().shape({label:f().string,filterText:f().string}),level:f().number,onClick:f().func,checked:f().bool,style:f().object,isGroupItem:f().bool,isFocused:f().bool,hideCheckBox:f().bool};const C=x,S=e=>{let{anchorEl:t,onClose:n,title:l,columnsData:h,onColumnClick:f,selectedColumns:g,hideCheckBox:v}=e;const E=y(),[b,x]=(0,r.useState)(""),S=(0,r.useMemo)((()=>(0,m.eX)(h,b)),[h,b]),O=(0,r.useMemo)((()=>(0,p.LG)(S)),[S]),w=(0,c.fW1)("label")(S)||308,k=(0,r.useCallback)((e=>{let{item:t}=e;return f(t)}),[f]),{focusIndex:M,handleKeyDown:P}=(0,d.t)({items:O,open:!0,onSelectFocusedItem:k,selectedItems:g,onClose:n}),_=(0,r.useCallback)((0,s.pipe)(n,(()=>x(""))),[n]),R=Math.min(300,32*O.length),N=Math.max(140,R+108);return a().createElement(u.Z,{className:E.popup,open:!!t,anchorEl:t,onClose:_,onSearch:x,title:l||o().text("Show/hide columns"),containerWidth:w,containerHeight:N,searchInputOnKeyDown:P},a().createElement(i.Z,{fixedTitle:!1,height:R,renderItem:(e,t,n)=>{let{item:r,level:l=0}=t;return a().createElement(C,{hideCheckBox:v,style:e,item:r,level:l,isFocused:M===n,checked:(0,m.u)(g,r),isGroupItem:(0,m.yf)(r),onClick:v?(0,s.pipe)(f,_):f})},items:O,getItemSize:()=>32,focusIndex:M}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>v,JJ:()=>E,yf:()=>s,u:()=>b});var r=n(17440),a=n(90088);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){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}const s=e=>e.id===e.groupId,c=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),i=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),m=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(i(t),c(t))))(e,t);return n?(n.children=m(n.children||[],t),e):e.concat(t)},p=(0,r.curry)(((e,t)=>a.P6Y.strings.search(t.label,e)||(t.children||[]).some(p(e)))),d=(0,r.reduce)(((e,t)=>m(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),h=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(p(e)),(0,r.chain)((t=>[{item:l({},t,{filterText:e}),level:n},...t.children?h(e,t.children,n+1):[]])))(t)})),f=(0,r.has)("columns"),g=e=>{let{id:t,label:n,columns:a}=e;return[{id:t,groupId:t,label:n},...a.map((0,r.assoc)("groupId",t))]},v=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(f,g)),(0,r.filter)((0,r.either)(s,u)),d,h(t))(e),E=e=>e.children?(0,r.chain)(E,e.children):[e],b=(e,t)=>{const n=E(t),r=t=>e.includes(t.id);return s(t)?n.every(r):n.some(r)}},26180:(e,t,n)=>{n.d(t,{ZP:()=>f});var r=n(17440),a=n(31276);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){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}const s="CHANGE_COLUMNS",c="TOGGLE_FILTERS",i="CHANGE_FILTER",u="TOGGLE_SORT",m="CHANGE_PAGE",p="CHANGE_ROWS_PER_PAGE",d={changeColumns:(0,a.zD)(s),toggleFilters:(0,a.zD)(c),changeFilter:(0,a.zD)(i),toggleSort:(0,a.zD)(u),changePage:(0,a.zD)(m),changeRowsPerPage:(0,a.zD)(p)},h=(e,t)=>{const n=(0,r.difference)(e.visibleColumns,t),a=e=>n.includes(e);return(0,r.evolve)({visibleColumns:(0,r.always)(t),sorting:(0,r.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,r.keys)(e).reduce(((e,t)=>a(t)?(0,r.dissoc)(t,e):e),e)},e)},f={reducer:(e,t)=>{switch(t.type){case s:{const n=t.payload;return h(e,n)}case c:{const t=!e.filters;return l({},e,{filters:t?{}:null,page:t?e.page:0})}case i:{const{columnId:n,filter:a}=t.payload;return(0,r.evolve)({filters:a?(0,r.assoc)(n,a):(0,r.dissoc)(n),page:(0,r.always)(0)},e)}case u:{const n=t.payload,o=(0,r.path)(["sorting","field"],e),s=(0,r.path)(["sorting","order"],e);return l({},e,{sorting:{field:n,order:(0,a.Dh)(n===o?s:null)},page:0})}case m:return l({},e,{page:t.payload});case p:return l({},e,{rowsPerPage:t.payload});default:return e}},actions:d,changeVisibleColumns:h}},2014:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(19592);const c=(0,n(79692).Z)((e=>({label:{backgroundColor:"rgba(43,152,240,0.12)",fontSize:"12px",lineHeight:"15px",color:e.palette.text.primary,display:"flex",alignItems:"center",padding:"2px 7px"},container:{display:"flex",alignItems:"center",cursor:"pointer"},expanded:{marginBottom:"8px"}})));function i(){return i=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},i.apply(this,arguments)}const u=(0,r.forwardRef)(((e,t)=>{let{children:n,expanded:r,onExpand:l,className:u}=e,m=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","expanded","onExpand","className"]);const p=c();return a().createElement("div",i({onClick:l,ref:t,className:o()(p.container,u,{[p.expanded]:r})},m),a().createElement(s.Z,{expanded:r}),a().createElement("div",{className:p.label},n))}));u.displayName="MatchRuleBadge";const m=u},22071:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),a=n.n(r),l=n(90088),o=n(74615),s=n(93301),c=n(91044),i=n(87918),u=n.n(i);function m(){return m=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},m.apply(this,arguments)}const p=e=>a().createElement("svg",m({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 20h15.002L21 23l1.27-1.27-20-20.01L1 2.99l6.172 6.175a4.007 4.007 0 002.66 2.662l2.23 2.23A10.754 10.754 0 0011 14c-2.67 0-8 1.34-8 4v2zm8-16a3.987 3.987 0 00-2.795 1.137l5.656 5.659A3.999 3.999 0 0011 4z",fill:"#000",fillOpacity:.54})),d=(0,n(79692).Z)({notMatch:{display:"flex","& svg":{width:"14px",height:"14px"}}}),h=()=>{const e=d();return a().createElement("div",{className:e.notMatch},a().createElement(p,null)," ",u().text("Not a match"))};var f=n(77245);const g=e=>{let{entitiesMap:t,entity:n,match:r,metadata:i,variant:u=f.g.all}=e;if(!r.matchRules&&!r.negativeRules)return null;const m=(0,l.Pcm)(r),p=(0,l.LS0)(i,n.type,(r.matchRules||[]).concat(r.negativeRules||[])),d=p.filter((e=>{let{uri:t}=e;return t!==l.h_8})).length!==p.length,g=!m&&!d,v=d&&u!==f.g.excludeNotMatch;return a().createElement(a().Fragment,null,m?a().createElement(s.Z,{transitiveMatchRules:(0,l.wB1)(i,r,t)}):null,g?a().createElement(c.Z,{variant:u,matchRules:p,Component:o.Z}):null,v?a().createElement(h,null):null)}},41022:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l);const s=e=>{let{isMlMatch:t=!1}=e;return a().createElement(a().Fragment,null,t?o().text("Match IQ"):o().text("Match rules"))}},48636:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r),l=n(41022);const o=(0,n(79692).Z)({title:{fontWeight:500,marginBottom:"9px"},body:{fontWeight:"normal",marginLeft:"16px"},container:{padding:"8px",fontSize:"12px",lineHeight:"14px"},negativeRuleIcon:{position:"relative",marginRight:"4px",top:"1px"}});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=>a().createElement("svg",s({width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M5 0C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10C7.76 10 10 7.76 10 5C10 2.24 7.76 0 5 0ZM7.5 5.5H2.5V4.5H7.5V5.5Z",fill:"white",fillOpacity:"0.54"})),i=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const r=o();return a().createElement("div",{className:r.container},a().createElement("div",{className:r.title},a().createElement(l.Z,{isMlMatch:t})," "),a().createElement("div",{className:r.body},n.map((e=>a().createElement("div",{key:e.uri},"- ",e.negativeRule&&a().createElement(c,{className:r.negativeRuleIcon}),`${e.label}`)))))}},68479:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),l=n(71153),o=n.n(l),s=n(41022);const c=(0,n(79692).Z)((e=>({container:{fontSize:"13px",lineHeight:"15px"},title:{color:e.palette.text.secondary,marginBottom:"7px"},labelsContainer:{color:e.palette.text.primary,marginBottom:"8px"},negativeRuleIcon:{position:"relative",marginRight:"4px",top:"1px"}})));function i(){return i=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},i.apply(this,arguments)}const u=e=>a().createElement("svg",i({width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M5 0C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10C7.76 10 10 7.76 10 5C10 2.24 7.76 0 5 0ZM7.5 5.5H2.5V4.5H7.5V5.5Z",fill:"black",fillOpacity:"0.54"})),m=e=>{let{isMlMatch:t,matchRules:n,className:r}=e;const l=c();return a().createElement("div",{"data-reltio-id":"simple-match-rules",className:o()(l.container,r)},a().createElement("div",{className:l.title},a().createElement(s.Z,{isMlMatch:t})),a().createElement("div",{className:l.labelsContainer},n.map((e=>a().createElement("div",{key:e.uri},"- ",e.negativeRule&&a().createElement(u,{className:l.negativeRuleIcon}),`${e.label}`)))))}},74615:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),a=n.n(r),l=n(48636),o=n(68479),s=n(83348),c=n(2014);const i=(0,n(79692).Z)({container:{display:"flex",flexDirection:"column",alignItems:"flex-start"},rulesContainer:{marginLeft:"16px"},icon:{height:"17px",width:"15px",marginRight:"5px"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const m=e=>a().createElement("svg",u({width:192,height:192,viewBox:"0 0 192 192",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("linearGradient",{x1:"94.582%",y1:"6.451%",x2:"23.195%",y2:"83.323%",id:"MLMatch_svg__b"},a().createElement("stop",{stopColor:"#CDE1FF",offset:"0%"}),a().createElement("stop",{stopColor:"#AFFBF4",offset:"100%"})),a().createElement("linearGradient",{x1:"94.582%",y1:"6.594%",x2:"23.195%",y2:"83.214%",id:"MLMatch_svg__d"},a().createElement("stop",{stopColor:"#FFF",offset:"0%"}),a().createElement("stop",{stopColor:"#FDFFFF",offset:"100%"})),a().createElement("linearGradient",{x1:"93.837%",y1:"55.274%",x2:"29.292%",y2:"-20.431%",id:"MLMatch_svg__g"},a().createElement("stop",{stopColor:"#FFFCC7",stopOpacity:0,offset:"0%"}),a().createElement("stop",{stopColor:"#FFF470",offset:"100%"})),a().createElement("linearGradient",{x1:"50%",y1:"0%",x2:"50%",y2:"98.152%",id:"MLMatch_svg__i"},a().createElement("stop",{stopColor:"#83D6FF",offset:"0%"}),a().createElement("stop",{stopColor:"#72B9EF",offset:"100%"})),a().createElement("path",{d:"M1.821 66.003L34.263 9.94C36.633 5.813 45.673.594 51.398.072l64.445-.064c5.06-.241 14.821 5.084 17.888 10.395l31.467 54.503c3.186 5.518 2.765 16.592-.13 22.117l-30.948 53.481c-3.776 5.127-14.165 11.126-19.57 11.328l-62.134.061c-5.51-.264-15.934-5.764-18.758-10.655L1.856 86.155C-.846 81.475-.37 70.648 1.82 66.003z",id:"MLMatch_svg__a"}),a().createElement("path",{d:"M11.109 67.042l28.713-49.618C41.92 13.77 49.931 9.158 55.006 8.7l57.143.005c4.486-.209 13.147 4.516 15.871 9.223l27.954 48.298c2.83 4.89 2.467 14.696-.095 19.586l-27.391 47.334c-3.343 4.537-12.55 9.84-17.342 10.013l-55.094-.004c-4.886-.24-14.134-5.12-16.643-9.454L11.16 84.889c-2.4-4.147-1.989-13.735-.05-17.847z",id:"MLMatch_svg__c"}),a().createElement("path",{d:"M.995 0c26.4.684 47.59 22.234 47.59 48.72 0 26.23-23.795 34.53-23.795 56.987 0 3.703-3.011 6.705-6.725 6.705l-17.07-.001V68.985c6.466-1.238 11.353-6.923 11.353-13.75S7.46 42.722.995 41.485V0z",id:"MLMatch_svg__e"}),a().createElement("path",{d:"M47.353 0l-.087 41.235-.225.003c-7.588.167-13.688 6.37-13.688 13.997 0 7.683 6.19 13.92 13.854 14l-.091 43.265H27.887c-1.894-.56-3.197-1.234-3.91-2.025-.712-.79-1.357-2.275-1.933-4.455l-2.335-10.733c-.354-1.265-.674-2.183-.96-2.753-.286-.57-.784-1.281-1.494-2.134L2.002 70.367c-.846-.949-1.383-1.73-1.61-2.343-.228-.613-.356-1.626-.386-3.038V31.34c-.028-.785.044-1.37.216-1.757.173-.387.566-.848 1.18-1.382L28.368.885c.37-.367.665-.601.885-.704.22-.103.557-.163 1.01-.181h17.09z",id:"MLMatch_svg__h"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("g",{transform:"translate(12 6)"},a().createElement("use",{fill:"url(#MLMatch_svg__b)",xlinkHref:"#MLMatch_svg__a"}),a().createElement("use",{fill:"url(#MLMatch_svg__d)",opacity:.5,xlinkHref:"#MLMatch_svg__c"})),a().createElement("g",{transform:"translate(69.652 30.765)"},a().createElement("rect",{fill:"#363636",x:15.457,y:132.745,width:21.151,height:23.158,rx:10.576}),a().createElement("path",{d:"M48.146 118.763v18.93c0 7.198-5.944 13.035-13.277 13.035h-16.71c-7.333 0-13.278-5.837-13.278-13.036v-18.929a13 13 0 01.023-.763h43.22a13 13 0 01.022.763z",fill:"#717171"}),a().createElement("path",{d:"M41.348 137.2c0 7.199-4.947 13.035-11.048 13.035H16.395c-6.101 0-11.047-5.836-11.047-13.035v-18.965h36V137.2z",fill:"#828282"}),a().createElement("path",{d:"M47.51 138.235a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956zm0-11a4 4 0 110 8H4.556a4 4 0 110-8h42.956z",fill:"#B1B1B1"}),a().createElement("path",{d:"M24.999 138.234v8h-16v-8h16zm0-11v8h-16v-8h16zm0-11v8h-16v-8h16z",fill:"#C5C5C5"}),a().createElement("g",{transform:"translate(27)"},a().createElement("mask",{id:"MLMatch_svg__f",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__e"})),a().createElement("use",{fill:"#FFD44B",xlinkHref:"#MLMatch_svg__e"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFD347",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M-49 48.729C-49 21.583-27.155 0-.207 0 26.74 0 48.585 21.817 48.585 48.729c0 26.227-23.75 34.525-23.75 56.98a6.708 6.708 0 01-6.713 6.703h-38.208a6.708 6.708 0 01-6.712-6.704C-26.798 85.217-49 75.875-49 48.73z",fill:"#FFDE72",mask:"url(#MLMatch_svg__f)"}),a().createElement("path",{d:"M11.965 48.645c.17-7.171 7.488-10.693 13.863-6.802 7.245 4.422 4.05 16.311-4.742 16.548l-.268.004h-3.227l-4.608 56.092-5.995-.253 4.413-51.248.185-4.592-10.592.001v-6h10.83l.139-3.585.002-.165zm10.737-1.681c-2.54-1.55-4.64-.58-4.737 1.766l-.005.284-.131 3.38 2.99.001c2.852 0 3.999-3.945 2.011-5.347l-.128-.084z",fill:"#F3BE13",mask:"url(#MLMatch_svg__f)"}),a().createElement("ellipse",{fill:"url(#MLMatch_svg__g)",mask:"url(#MLMatch_svg__f)",cx:-1.89,cy:48.245,rx:36.534,ry:36.667}))),a().createElement("g",{transform:"translate(45.647 30.765)"},a().createElement("mask",{id:"MLMatch_svg__j",fill:"#fff"},a().createElement("use",{xlinkHref:"#MLMatch_svg__h"})),a().createElement("use",{fill:"url(#MLMatch_svg__i)",xlinkHref:"#MLMatch_svg__h"}),a().createElement("path",{fill:"#D6FCFA",fillRule:"nonzero",opacity:.5,mask:"url(#MLMatch_svg__j)",d:"M38.24 11.235v6l-3.55-.001-22.207 22.207h-18.13v-6H9.997l22.207-22.206zM25.682 40.779l13.8 13.799H50v6H36.997L21.439 45.021zM53.311 28.235v6h-13.65l-3.935 4.246-4.4-4.08 5.718-6.166zM14.248 52.235l20.52 20.52h3.695v6h-6.18l-20.52-20.52H-.647v-6zM21.353 84.235h8.95L40.4 94.332h16.753v6H37.915L27.817 90.235z"})),a().createElement("circle",{fill:"#008FD8",cx:94,cy:86,r:9})));var p=n(87918),d=n.n(p);const h=(0,s.Z)(c.Z),f=e=>{let{isMlMatch:t=!1,matchRules:n}=e;const s=i(),[c,u]=(0,r.useState)(!1),p=(0,r.useCallback)((()=>u((e=>!e))),[]);return a().createElement("div",{className:s.container},a().createElement(h,{tooltipTitle:a().createElement(l.Z,{matchRules:n,isMlMatch:t}),tooltipPlacement:"bottom-start",onExpand:p,expanded:c},t?a().createElement(a().Fragment,null,a().createElement(m,{className:s.icon}),d().text("Match IQ")):d().text("Rules")),c?a().createElement(o.Z,{className:s.rulesContainer,matchRules:n,isMlMatch:t}):null)}},91044:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(24328),a=n.n(r),l=n(13980),o=n.n(l),s=n(17440),c=n(90088),i=n(77245);const u=(0,n(79692).Z)({container:{display:"flex",flexDirection:"column","& :not(:last-child)":{marginBottom:"2px"}}});function m(){return m=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},m.apply(this,arguments)}const p=e=>{let{matchRules:t,Component:n,variant:r=i.g.all}=e,l=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,["matchRules","Component","variant"]);const o=u(),[p,d]=(0,c.UkJ)(t),{all:h,simple:f,excludeNotMatch:g}=i.g,v=[h,f,g].includes(r)&&!(0,s.isEmpty)(d),E=[h,g].includes(r)&&!(0,s.isEmpty)(p);return a().createElement("div",{className:o.container},v?a().createElement(n,m({matchRules:d},l)):null,E?a().createElement(n,m({isMlMatch:!0,matchRules:p},l)):null)};p.propTypes={matchRules:c.p3$,Component:o().func};const d=p},93301:(e,t,n)=>{n.d(t,{Z:()=>x});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(2014),c=n(19592),i=n(68479),u=n(91044),m=n(79692);const p=(0,m.Z)((e=>({label:{fontSize:"13px",lineHeight:"15px",color:e.palette.primary.light},container:{display:"flex",flexDirection:"column"},badge:{display:"flex",marginBottom:"8px",cursor:"pointer"},matchLabels:{marginLeft:"30px"}}))),d=e=>{let{label:t,matchRules:n}=e;const l=p(),[o,s]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>s((e=>!e))),[]);return a().createElement("div",{"data-reltio-id":"transitive-match-rule",className:l.container},a().createElement("div",{onClick:m,className:l.badge},a().createElement(c.Z,{expanded:o}),a().createElement("div",{className:l.label},t)),o?a().createElement(u.Z,{Component:i.Z,matchRules:n,className:l.matchLabels}):null)},h=(0,m.Z)({container:{display:"flex",flexDirection:"column","& :not(:last-child)":{marginBottom:"2px"}}});var f=n(83348),g=n(48636);const v=(0,m.Z)({ruleWrapper:{paddingTop:"8px"},label:{fontWeight:500,fontSize:"12px"}}),E=e=>{let{transitiveMatchRules:t}=e;const n=v();return a().createElement(a().Fragment,null,t.map(((e,t)=>{let{label:r,matchRules:l}=e;return a().createElement("div",{key:t,className:n.ruleWrapper},a().createElement("div",{className:n.label},r),a().createElement(g.Z,{matchRules:l}))})))};function b(){return b=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},b.apply(this,arguments)}const y=(0,f.Z)(s.Z),x=e=>{let{transitiveMatchRules:t}=e;const n=h(),[l,s]=(0,r.useState)(!1),c=(0,r.useCallback)((()=>s((e=>!e))),[]);return a().createElement("div",{className:n.container},a().createElement(y,{tooltipTitle:a().createElement(E,{transitiveMatchRules:t}),tooltipPlacement:"bottom-start",onExpand:c,expanded:l},o().text("Transitive matches")),l?t.map(((e,t)=>a().createElement(d,b({key:t},e)))):null)}},77245:(e,t,n)=>{let r;n.d(t,{g:()=>r}),function(e){e.all="all",e.simple="simple",e.excludeNotMatch="excludeNotMatch"}(r||(r={}))},93428:(e,t,n)=>{n.d(t,{H:()=>d});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l);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=>a().createElement("svg",s({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.955 10.955v-3.5l4.5 4.5-4.5 4.5v-3.5h-6.41l-6-6 1.41-1.41 5.41 5.41h5.59zm-11 7.41l-1.41-1.41 3.41-3.41 1.41 1.41-3.41 3.41z",fill:"#000",fillOpacity:.54}));var i=n(31276),u=n(98808),m=n(84504);function p(){return p=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},p.apply(this,arguments)}const d=(0,r.forwardRef)(((e,t)=>{let{className:n,mode:r=u.N.iconButton,onMenuClose:l=i.ZT,disabled:s=!1,entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onSuccess:v,onError:E}=e,b=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,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onSuccess","onError"]);const{sendMergeAllRequest:y}=(0,m._)({entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onError:E,onSuccess:v});return a().createElement(u.K,p({className:n,disabled:s,mode:r,label:o().text("Merge"),icon:c,onClick:y,onMenuClose:l,ref:t},b))}));d.displayName="mergeButton"},30885:(e,t,n)=>{n.d(t,{i:()=>d});var r=n(98808),a=n(24328),l=n.n(a);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}const s=e=>l().createElement("svg",o({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 1.5v3.638h-1.247l-11.03 11H2v2h3.55l11.029-11H17V10.5L21.5 6 17 1.5zM8.844 8.785L5.55 5.5H2v2h2.723l2.707 2.7 1.414-1.415zm4.835 4.822l-1.414 1.414 3.488 3.479H17v3.638l4.5-4.5-4.5-4.5V16.5h-.421l-2.9-2.893z",fill:"#000",fillOpacity:.54}));var c=n(31276),i=n(87918),u=n.n(i),m=n(59119);function p(){return p=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},p.apply(this,arguments)}const d=(0,a.forwardRef)(((e,t)=>{let{className:n,mode:a=r.N.iconButton,onMenuClose:o=c.ZT,disabled:i=!1,entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onSuccess:v}=e,E=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,["className","mode","onMenuClose","disabled","entity","entities","onStartRequest","onFinishRequest","onSuccess"]);const{sendMarkAsNotMatchRequest:b}=(0,m.m)({entity:d,entities:h,onStartRequest:f,onFinishRequest:g,onSuccess:v});return l().createElement(r.K,p({className:n,disabled:i,mode:a,label:u().text("Not a match"),icon:s,onClick:b,onMenuClose:o,ref:t},E))}));d.displayName="notMatchButton"},17308:(e,t,n)=>{n.d(t,{P:()=>m});var r=n(24328),a=n.n(r),l=n(87685);const o=(0,n(79692).Z)({container:{display:"flex",flexShrink:0,height:"63px",alignItems:"center",borderBottom:"1px solid rgba(0,0,0,0.12)"},icon:{margin:"0 12px"},divider:{backgroundColor:"rgba(0,0,0,0.12)",margin:"19px 17px"},secondTitle:{fontSize:"14px"}});var s=n(94079),c=n(87918),i=n.n(c),u=n(8818);const m=e=>{let{onClose:t,mainTitle:n,secondTitle:r,content:c,rightContent:m}=e;const p=o();return a().createElement("div",{className:p.container},a().createElement(u.k,{size:"L",icon:l.default,onClick:t,className:p.icon,tooltipTitle:i().text("Close")}),c||a().createElement(a().Fragment,null,a().createElement(s.Typography,{variant:"h6"},n),r&&a().createElement(a().Fragment,null,a().createElement(s.Divider,{orientation:"vertical",flexItem:!0,className:p.divider}),a().createElement(s.Typography,{variant:"body1",color:"textSecondary",className:p.secondTitle},r)),m))}},89140:(e,t,n)=>{n.d(t,{V:()=>k});var r=n(24328),a=n.n(r),l=n(17440),o=n(94079),s=n(94842),c=n(13980),i=n.n(c),u=n(87918),m=n.n(u),p=n(98685),d=n(71153),h=n.n(d),f=n(79692);const g=(0,f.Z)((e=>({comment:{display:"flex",flexDirection:"row",flex:1,marginLeft:"6px"},avatar:{height:"24px",width:"24px",margin:"3px 13px 0 0"},icon:{fill:"#537280",backgroundColor:"#EAEDEE"},firstLine:{display:"flex",flexDirection:"row"},info:{flex:1},author:{flex:1,fontWeight:"500",color:"rgba(0,0,0,0.87)",fontSize:"13px",lineHeight:"15px"},date:{color:"rgba(0, 0, 0, 0.54)",fontSize:"11px",marginRight:"17px",lineHeight:"15px"},text:{color:"rgba(0, 0, 0, 0.6)",fontSize:"13px",wordWrap:"break-word",wordBreak:"break-all",paddingRight:"10px"}}))),v=(0,f.Z)((e=>({circleButton:{maxWidth:"14px",maxHeight:"14px",border:"1px solid rgba(0, 0, 0, 0.3)",fontSize:"13px",color:"rgba(0, 0, 0, 0.6)",position:"absolute",top:"-11px",left:"5px",backgroundColor:"#ffffff","&:hover":{backgroundColor:"#f7f7f7"},"&.focused":{backgroundColor:"#f7f7f7"}},delimiter:{position:"relative",height:"4px",borderTop:"1px solid rgba(0, 0, 0, 0.3)",borderBottom:"1px solid rgba(0, 0, 0, 0.3)",margin:"15px 0 24px 0"}}))),E=(0,f.Z)((e=>({container:{padding:"5px 0",display:"flex",flexDirection:"column"},commentsContainer:{maxHeight:"300px",overflowY:"auto"},title:{margin:"0 0 8px 5px",fontSize:"14px",color:"rgba(0, 0, 0, 0.87)"},filledInputRoot:{backgroundColor:"rgba(0, 0, 0, 0.03)",padding:"0 6px",height:"40px",margin:"10px 17px 0 6px",fontSize:"14px","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}}))),b=(0,f.Z)((e=>({messageContainer:{borderBottom:"1px solid rgba(0,0,0,0.3)",paddingBottom:"7px",marginBottom:"7px"}}))),y=e=>{let{author:t,classes:n,message:r,time:l}=e;const s=g();return a().createElement("div",{className:s.comment},a().createElement(o.Avatar,{className:s.avatar},a().createElement(p.Z,{className:s.icon})),a().createElement("div",{className:h()(s.info,n.messageContainer)},a().createElement("div",{className:s.firstLine},a().createElement("div",{className:s.author},t),a().createElement("span",{className:s.date},m().date(l,"L LT"))),a().createElement("div",{className:s.text},r)))};y.defaultProps={classes:{}},y.propTypes={classes:i().object,author:i().string,id:i().string,message:i().string,time:i().number};const x=e=>{let{comments:t,onClick:n}=e;const r=v();return a().createElement(a().Fragment,null,a().createElement(y,t[0]),a().createElement("div",{className:r.delimiter},a().createElement(o.IconButton,{className:r.circleButton,onClick:n},t.length-2)),a().createElement(y,t[t.length-1]))};x.propTypes={comments:i().arrayOf(i().shape({author:i().string,id:i().string,message:i().string,time:i().number})),onClick:i().func};const C=e=>{let{comments:t}=e;const n=b();return t.map((e=>{let{author:t,id:r,message:l,time:o}=e;return a().createElement(y,{classes:{messageContainer:n.messageContainer},key:r,author:t,message:l,time:o})}))};C.propTypes={comments:i().arrayOf(i().shape({author:i().string,id:i().string,message:i().string,time:i().number}))};var S=n(43477),O=n(22385);const w=e=>e.target.value,k=e=>{let{processInstanceComments:t,taskId:n,isTaskOpen:c}=e;const i=E(),[u,p]=(0,r.useState)(!1),[d,h]=(0,r.useState)(""),{comments:f,writeComment:g,readOnly:v}=(0,S.W)({processInstanceComments:t,taskId:n,isOpen:c}),b=(0,r.useCallback)((()=>{g(d),h("")}),[d,g]),y=(0,l.pipe)(w,h);return a().createElement("div",{className:i.container},a().createElement("div",{className:i.title}," ",m().text("Comments")," "),a().createElement("div",{className:i.commentsContainer},u||f.length<3?a().createElement(C,{comments:f}):a().createElement(x,{onClick:()=>p(!0),comments:f})),!v&&a().createElement(o.Input,{endAdornment:a().createElement(o.InputAdornment,{position:"end"},a().createElement(O.Z,{icon:s.Z,disabled:0===d.length,onClick:b})),classes:{root:i.filledInputRoot},placeholder:m().text("Write a comment"),value:d,onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),b),onChange:y,disableUnderline:!0}))};k.propTypes={processInstanceComments:i().arrayOf(i().shape({author:i().string,id:i().string,message:i().string,time:i().number})),taskId:i().string}},75813:(e,t,n)=>{n.d(t,{R:()=>s});var r=n(87918),a=n.n(r),l=n(90088),o=n(585);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{errorMessage:t,errorCode:n}=e;n!==l.Xt7.WORKFLOW_IS_NOT_REGISTERED_ERROR&&(console.error(e),o.Z.addError({title:a().text("Error"),message:t||a().text("Something went wrong...")}))}},21380:(e,t,n)=>{n.d(t,{rc:()=>a,Xs:()=>l,tg:()=>o});var r=n(17440);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.find((0,r.startsWith)("changeRequests/"))},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,r.pipe)(a,(0,r.unless)(r.isNil,(0,r.pipe)((0,r.split)("/"),(0,r.nth)(1))))(e)},o=e=>void 0===e||!0===e},5434:(e,t,n)=>{n.d(t,{r:()=>h});var r=n(24328),a=n(17440),l=n(52730),o=n(90088),s=n(59431),c=n(85229),i=n(94150),u=n(75813),m=n(22994),p=n(21380);const d=e=>({label:e,value:e}),h=e=>{let{assignee:t,taskId:n,isOpen:h}=e;const{updateTaskState:f}=(0,r.useContext)(i.O)||{},g=(0,l.useSelector)(s.ZP.selectors.getWorkflowPath),v=(0,l.useSelector)(s.ZP.selectors.getWorkflowEnvironmentUrl),E=(0,l.useSelector)(s.ZP.selectors.getTenant),b=(0,c._)(),y=(0,c._)(),[x,C]=(0,r.useState)(null),[S,O]=(0,r.useState)(),[w,k]=(0,r.useState)(!1),M=(0,m.Z)()("UPDATE_TASK")&&(0,p.tg)(h);(0,r.useEffect)((()=>{C(d(t))}),[t]);const P=(0,r.useCallback)((e=>{if(g&&M&&n){const t=(0,a.filter)((t=>t.value.toLowerCase().includes(e)));return S?Promise.resolve(t(S)):y((0,o.j2$)({taskId:n,workflowPath:g,environment:v,tenant:E})).then((e=>{const{data:n}=e,r=n.sort(((e,t)=>o.P6Y.strings.sort("asc",e,t))).map(d);return O(r),t(r)})).catch(u.R)}}),[g,n,v,E,S,O,M]),_=(0,r.useCallback)((e=>{if(g&&M&&n){const{value:t}=e;k(!0),b((0,o._C4)({taskId:n,workflowPath:g,environment:v,tenant:E,assignee:t})).then((()=>{C(d(t)),null==f||f(n,{assignee:t})})).catch(u.R).finally((()=>{k(!1)}))}}),[g,n,v,E,M]);return{assignee:x,getAssignees:P,updateAssignee:_,updateRequestIsInProgress:w,readOnly:!M}}},22994:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(52730),a=n(59431);const l=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getWorkflowPath),t=(0,r.useSelector)(a.ZP.selectors.getCanUserStartProcessFromQuery),n=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowJobs),l=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowEnvironmentConfigJar),o=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowDefinition),s=(0,r.useSelector)(a.ZP.selectors.getCanUserViewWorkflowConfigJar),c=(0,r.useSelector)(a.ZP.selectors.getCanUserViewProcessInstanceSearchQuery),i=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateWorkflowDataTask),u=(0,r.useSelector)(a.ZP.selectors.getCanUserUpdateProcessInstance),m=(0,r.useSelector)(a.ZP.selectors.getCanUserReadWorkflowDataTask),p=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowEnvironmentDefinition),d=(0,r.useSelector)(a.ZP.selectors.getCanUserManageWorkflowDefinition),h=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsValidateTasks),f=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsUpdateTasks),g=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsTerminateProcessInstance),v=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobsSyncBusinessProcessData),E=(0,r.useSelector)(a.ZP.selectors.getCanUserExecuteWorkflowJobs),b=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowEnvironmentConfigJar),y=(0,r.useSelector)(a.ZP.selectors.getCanUserRegisterConfigEnvironments),x=(0,r.useSelector)(a.ZP.selectors.getCanUserCreateWorkflowConfigJar);return r=>{if(!e)return!1;switch(r){case"VIEW_PROCESS_DEFINITIONS":return o;case"DEPLOY_GENERIC_PROCESS_DEFINITION":return p;case"VIEW_JOBS":return n;case"START_JOB":return E||v&&g&&f&&h;case"VIEW_CUSTOM_JARS":return s||l;case"UPDATE_PROCESS_INSTANCE":return u;case"VIEW_TASKS":return m;case"REGISTER_TENANT":return y;case"START_PROCESS_INSTANCE":case"START_PROCESS_INSTANCE_SEARCH_QUERY":return t;case"VIEW_PROCESS_INSTANCE_COMMENTS":case"VIEW_PROCESS_INSTANCES":case"VIEW_PROCESS_INSTANCE_COUNT":return c;case"UPDATE_TASK":return i;case"DEPLOY_TENANT_PROCESS_DEFINITION":return d;case"DEPLOY_CUSTOM_JAR":return x&&b}return!1}}},43477:(e,t,n)=>{n.d(t,{W:()=>p});var r=n(24328),a=n(90088),l=n(59431),o=n(52730),s=n(85229),c=n(94150),i=n(75813),u=n(22994),m=n(21380);const p=e=>{let{processInstanceComments:t,taskId:n,isOpen:p}=e;const{updateTaskState:d}=(0,r.useContext)(c.O)||{},h=(0,o.useSelector)(l.ZP.selectors.getWorkflowPath),f=(0,o.useSelector)(l.ZP.selectors.getWorkflowEnvironmentUrl),g=(0,o.useSelector)(l.ZP.selectors.getTenant),v=(0,s._)(),[E,b]=(0,r.useState)([]),[y,x]=(0,r.useState)(!1),C=(0,u.Z)()("UPDATE_TASK")&&(0,m.tg)(p);(0,r.useEffect)((()=>{b(t||[])}),[t]);const S=(0,r.useCallback)((e=>{C&&(x(!0),v((0,a.tZe)({workflowPath:h,environment:f,tenant:g,taskId:n,comment:e}).then((()=>(0,a.yW4)({workflowPath:h,environment:f,tenant:g,taskId:n})))).then((e=>{let{processInstanceComments:t}=e;b(t||[]),null==d||d(n,{processInstanceComments:t})})).catch(i.R).finally((()=>x(!1))))}),[f,n,g,h,v,d,C]);return{comments:E,requestIsInProgress:y,writeComment:S,readOnly:!C}}},97094:(e,t,n)=>{n.d(t,{S:()=>a});var r=n(24328);const a=n.n(r)().createContext((()=>{}));a.displayName="SnackbarContext"},94150:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(24328);const a=n.n(r)().createContext(null);a.displayName="WorkflowTasksContext"},86361:(e,t,n)=>{n.d(t,{o:()=>o});var r=n(24328),a=n(17440);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 o=e=>{let{actions:t,dispatch:n}=e;return(0,r.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[r,o]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},e,{[r]:(0,a.pipe)(o,n)})}),{})),[n,t])}},8159:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(24328);const a=()=>{const e=(0,r.useRef)(!1);return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1}))),e}},59119:(e,t,n)=>{n.d(t,{m:()=>c});var r=n(90088),a=n(52730),l=n(59431),o=n(24328),s=n(8159);const c=e=>{let{entities:t,entity:n,onFinishRequest:c,onStartRequest:i,onSuccess:u}=e;const m=(0,s.X)(),p=(0,a.useSelector)(l.ZP.selectors.getTenant),d=(0,a.useSelector)(l.ZP.selectors.getDtssPath),[h,f]=(0,o.useState)(!1);return{isPending:h,sendMarkAsNotMatchRequest:(0,o.useCallback)((()=>{null==i||i(),f(!0);const e={dtssPath:d,customerTenant:p,entity:n,entities:t};((0,r.biM)(n)?(0,r.bMg)(e):(0,r.fZN)(e)).then((()=>{null==u||u()})).finally((()=>{null==c||c(),m.current&&f(!1)}))}),[d,t,n,m,c,i,u,p])}}},28741:(e,t,n)=>{n.d(t,{s:()=>u});var r=n(24328),a=n(52730),l=n(59431),o=n(90088),s=n(20449),c=n(85229),i=n(17440);const u=e=>{let{enabled:t,entity:n,filter:u,rules:m,onFinishLoading:p,onStartLoading:d,options:h,page:f,rowsPerPage:g,sorting:v,markMatchedValues:E}=e;const{order:b,field:y}=v||{},[x,C]=(0,r.useState)(0),[S,O]=(0,r.useState)([]),[w,k]=(0,r.useState)({}),M=(0,a.useSelector)(l.ZP.selectors.getTenant),P=(0,a.useSelector)(l.ZP.selectors.getDtssPath),_=(0,a.useSelector)(l.ZP.selectors.getDataTenants),{activityFilter:R,globalFilter:N}=(0,a.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},Z="boolean"==typeof h.showInactiveEntities?h.showInactiveEntities?o.YJ7.ALL:o.YJ7.ACTIVE_ONLY:R,T=(0,r.useMemo)((()=>({dtssPath:P,dataTenants:_,entity:n,customerTenant:M,dtssRequest:o.Rgl})),[P,_,n,M]),I=(0,r.useCallback)((0,o.U_T)(T,o.SP6),[T]),j=(0,s.a)(I),L=(0,s.a)(o.bFH),F=(0,i.prop)("uri",n),z=(0,c._)(),D=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t||(0,o.ZiX)(F))return C(0),O([]),void k({});null==d||d(),z((0,o.biM)(n)?L({dtssPath:P,entity:n,customerTenant:M,offset:f*g,max:g,force:e}):j({entityUri:F,offset:f*g,max:g,filter:(0,o.vyX)(N,u)||"",rules:m,sort:y,order:b,force:e,markMatchedValues:E,deep:h.showTransitiveMatches?void 0:1,activeness:Z})).then((e=>{const{response:t,total:n,originalResponse:r}=e;C(n),(0,o.B1H)(r).length>0&&k((0,o.KPC)(r)),O(t)})).finally((()=>{null==p||p()}))}),[N,Z,P,t,F,y,u,m,E,L,j,p,d,h,b,f,g,z,M]);return(0,r.useEffect)((()=>{D()}),[D]),{total:x,matches:S,entitiesMap:w,loadMatches:(0,r.useCallback)((()=>{D(!0)}),[D])}}},84504:(e,t,n)=>{n.d(t,{_:()=>i});var r=n(24328),a=n(52730),l=n(59431),o=n(90088),s=n(31276),c=n(8159);const i=e=>{let{entities:t,entity:n,onFinishRequest:i,onStartRequest:u,onSuccess:m,onError:p=s.ZT}=e;const d=(0,c.X)(),h=(0,a.useSelector)(l.ZP.selectors.getTenant),f=(0,a.useSelector)(l.ZP.selectors.getDtssPath),[g,v]=(0,r.useState)(!1);return{isPending:g,sendMergeAllRequest:(0,r.useCallback)((()=>{null==u||u(),v(!0);const e={dtssPath:f,customerTenant:h,entity:n,entities:t};((0,o.biM)(n)?(0,o.uJQ)(e):(0,o.OxG)(e)).then((()=>{null==m||m()})).catch(p).finally((()=>{null==i||i(),d.current&&v(!1)}))}),[f,t,n,p,i,u,m,h])}}},20449:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(24328),a=n(17440);const l=e=>(0,r.useCallback)((e=>{let t={},n=[];return async r=>{let{max:l,offset:o,force:s}=r,c=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}(r,["max","offset","force"]),i=s;const u=Object.keys(t);if(i=i||!(0,a.equals)(Object.keys(c),u),!i)for(const e of u)i=i||!(0,a.equals)(t[e],c[e]);return i&&(n=await e(c),t=c),{response:n.slice(o,o+l),total:n.length,originalResponse:n}}})(e),[e])},60641:(e,t,n)=>{n.d(t,{w:()=>s});var r=n(24328),a=n(20562);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){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}const s=e=>{let{getSavedState:t,saveState:n,entityTypeUri:o}=e;const[s,c]=(0,r.useState)({}),[i,u]=(0,r.useState)(null),[m,p]=(0,r.useState)(!1);(0,a.D)((()=>{i&&(c(l({},s,i)),u(null))}),[o]);const d=(0,r.useCallback)((e=>{const t={[o]:e};u(t),n(l({},s,t))}),[o,n,s]);return(0,r.useEffect)((()=>{t().then((e=>{c(e||{})})).then((e=>p(!0))).catch((e=>p(!0)))}),[]),{isLoaded:m,savedState:s[o],updateSavedState:d}}},24605:(e,t,n)=>{n.d(t,{D:()=>u});var r=n(24328),a=n.n(r),l=n(87918),o=n.n(l),s=n(94079),c=n(37265);const i=3e5,u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{anchorOrigin:t,showDismiss:n}=e,[l,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(""),d=(0,r.useCallback)((()=>{u(!1),p("")}),[]),h=(0,r.useCallback)((e=>{u(!0),p(e)}),[]),f=(0,r.useCallback)((()=>a().createElement(s.Portal,{container:document.body},a().createElement(c.Z,{open:l,anchorOrigin:t,autoHideDuration:i,onClose:d,message:m,action:n?a().createElement(s.Button,{color:"primary",onClick:d},o().text("Dismiss")):void 0}))),[l,d,m]);return{SnackbarRenderer:f,showSnackbarMessage:h}}},17554:(e,t,n)=>{n.d(t,{U:()=>s});var r=n(24328),a=n(52730),l=n(90088),o=n(59431);const s=()=>{const[e,t]=(0,r.useState)([]),n=(0,a.useSelector)(o.ZP.selectors.getTenant),s=(0,a.useSelector)(o.ZP.selectors.getServicesPath),c=e=>{console.warn("Users error",e),t([])};return(0,r.useEffect)((()=>{(0,l.kz_)({tenant:n,servicesPath:s}).then((e=>{let{array:n}=e;return t(n)})).catch(c)}),[n,s]),e}}}]);
2
2
  //# sourceMappingURL=612.js.map
package/7937.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[7937],{10159:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),l=r.n(n),i=r(94079);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const 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,r(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:r,secondaryText:n}=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.Typography,{className:o.text},r),n&&l().createElement(i.Typography,{className:o.secondaryText},n)))}},91515:(e,t,r)=>{r.d(t,{Z:()=>ee});var n=r(24328),l=r.n(n),i=r(87918),o=r.n(i),a=r(94079),s=r(17440),c=r(51229),u=r(36444),d=r(22385),p=r(48465),m=r(85451),f=r(27815),E=r(71153),h=r.n(E),y=r(31517),v=r(67885);const g=[v.K.WITHIN,v.K.AGO,v.K.BETWEEN],b=e=>({[v.K.WITHIN]:o().text("Within the last"),[v.K.AGO]:o().text("More than"),[v.K.BETWEEN]:o().text("Date range")}[e]||"");var x=r(39621),T=r(20562),I=r(51843),N=r(79692);const w=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),O=[null,null],C=[null,"hours"],S=e=>{let{value:t,onChange:r,className:i}=e;const s=w(),c=e=>e===v.K.WITHIN||e===v.K.AGO,u=e=>e===v.K.BETWEEN,d=u(null==t?void 0:t.type)?t.period:O,p=c(null==t?void 0:t.type)?t.period:C,[m,f]=(0,n.useState)(d),[E,N]=(0,n.useState)(p),S=(null==t?void 0:t.type)||v.K.WITHIN,R=e=>c(e)?E:u(e)?m:void 0,D=e=>{r({type:S,period:e})};return(0,T.D)((()=>{t?c(t.type)?N(t.period):u(t.type)&&f(t.period):(f(O),N(C))}),[t]),l().createElement("div",{className:h()(s.root,i)},l().createElement(a.Typography,{className:s.title,variant:"subtitle1"},o().text("Date")),l().createElement("div",{className:s.intervalContainer},l().createElement(y.Z,{label:"",className:s.typeInput,value:{value:S,label:b(S)},options:g.map((e=>({value:e,label:b(e)}))),onChange:e=>{let{value:n}=e;(null==t?void 0:t.type)!==n&&r({period:R(n),type:n})}}),c(S)?l().createElement(x.Z,{interval:E,onChange:D}):l().createElement(I.Z,{values:m,onChange:D})))};var R=r(92575),D=r(96808),M=r(65942);const _=[M.M.UPDATE,M.M.MERGE,M.M.UNMERGE];function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){A(e,t,r[t])}))}return e}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L={input:e=>k({},e,{fontSize:"14px"}),menuPortal:e=>k({},e,{zIndex:1300})},P=(0,N.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:r,className:n}=e;const i=P(),c=e=>{return{value:e,label:(t=e,{[M.M.UPDATE]:o().text("Update"),[M.M.MERGE]:o().text("Merge"),[M.M.UNMERGE]:o().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),d=u(_);return l().createElement("div",{className:h()(i.root,n)},l().createElement(a.Typography,{className:i.title,variant:"subtitle1"},o().text("Activity")),l().createElement(R.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),r),options:d,TextFieldProps:{classes:{root:i.dropDownInput}},components:{DropdownIndicator:D.Z},styles:L,classes:i,menuPlacement:"bottom",menuPortalTarget:document.body}))};var G=r(85890);const j=(0,N.Z)({popup:{width:500,minHeight: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",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){U(e,t,r[t])}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const B=e=>{let{className:t,filter:r,onApplyFilter:i,entityType:c}=e;const E=j(),h=(0,n.useRef)(),[y,v]=(0,n.useState)(!1),[g,b]=(0,n.useState)(r),{activities:x=[],attributes:T=[],dateRange:I=null,users:N=[]}=g||{},w=(0,G.FE)(r)?"inherit":"primary";(0,n.useEffect)((()=>{y&&b(r)}),[r,y]);const O=(0,s.curry)(((e,t)=>{b((r=>F({},r,{[e]:t})))})),C=(0,n.useCallback)((()=>{v((e=>!e))}),[]),R=(0,n.useCallback)((()=>{I&&(0,p.R)(I)?i(g):i((0,s.dissoc)("dateRange",g)),C()}),[g,I,i,C]),D=(0,n.useCallback)((()=>{b(F({},G.tO))}),[]);return l().createElement(l().Fragment,null,l().createElement(d.Z,{ref:h,color:w,icon:u.Z,size:"L",onClick:C,className:t}),l().createElement(a.Popover,{classes:{paper:E.popup},open:y,anchorEl:h.current,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l().createElement("div",{className:E.filterContainer},l().createElement(a.Typography,{variant:"h6"},o().text("Filter")),l().createElement("div",{className:E.filterContainerScrollable},l().createElement(S,{value:I,onChange:O("dateRange"),className:E.filterItem}),l().createElement(m.Z,{selectedUsers:N,onChange:O("users"),className:E.filterItem}),l().createElement(H,{selectedHistoryActivityTypes:x,onChange:O("activities"),className:E.filterItem}),l().createElement(f.Z,{selectedAttributes:T,entityType:c,onChange:O("attributes"),className:E.filterItem,title:o().text("Attribute updated")}))),l().createElement("div",{className:E.filterControls},l().createElement(a.Button,{onClick:D,className:E.clearButton},o().text("Clear all")),l().createElement(a.Button,{onClick:C},o().text("Cancel")),l().createElement(a.Button,{color:"primary",onClick:R},o().text("Apply")))))};var Z=r(52730),z=r(43054),$=r(59431),K=r(55847),W=r(98281),Y=r(31276);const V=(0,N.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,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=Y.ZT}=e;const i=V(),{text:o,selected:s,onClick:c}=r;return l().createElement(a.MenuItem,{classes:{root:i.menuItem},onClick:e=>{n(),c(e)},ref:t},s&&l().createElement(W.Z,{className:i.checkIcon}),l().createElement(a.Typography,{classes:{root:i.menuText}},o))}));q.displayName="MenuItemRenderer";const X=q,J=()=>{const e=(0,Z.useSelector)($.ZP.selectors.getHistoryMode),t=(0,Z.useDispatch)(),r=e=>{t($.N5.history.actions.setHistoryMode(e))},n=[{text:o().text("Compare to Current view"),selected:e===$.Z9.Current,onClick:()=>r($.Z9.Current)},{text:o().text("Compare to Previous view"),selected:e===$.Z9.Previous,onClick:()=>r($.Z9.Previous)}];return l().createElement(K.Z,{MenuItemRenderer:X,buttonComponent:d.Z,buttonProps:{icon:z.Z,size:"L"},menuId:"history-menu",menuItems:n})},Q=(0,N.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"}}),ee=e=>{let{total:t,entityType:r,filter:n,onApplyFilter:i}=e;const u=Q();return l().createElement("div",{className:u.root},l().createElement(a.Typography,{variant:"h6"},o().text("History")),!(0,s.isNil)(t)&&l().createElement(l().Fragment,null,l().createElement(a.Divider,{orientation:"vertical",flexItem:!0,className:u.divider}),l().createElement(a.Typography,{variant:"body1",color:"textSecondary",className:u.count},1===t?o().text("${count} contributing profile",{count:t}):o().text("${count} contributing profiles",{count:t}))),l().createElement(c.Z,null),l().createElement(B,{className:u.filterButton,entityType:r,filter:n,onApplyFilter:i}),l().createElement(J,null))}},6674:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),l=r.n(n),i=r(87918),o=r.n(i),a=r(10159);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.")})},54362:(e,t,r)=>{r.d(t,{Z:()=>G});var n=r(24328),l=r.n(n),i=r(52730),o=r(44443),a=r(87918),s=r.n(a),c=r(17440),u=r(71153),d=r.n(u),p=r(34091),m=r(59431),f=r(94079),E=r(34606),h=r(79692);const y=(0,h.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"}}))),v=e=>{let{change:t,isCurrent:r,isSelected:n,onClick:i}=e;const{uri:o,type:a,matchGroups:c,user:u,timestamp:m}=t,h=(0,p.GtP)(o),v=y({color:h});return l().createElement("div",{className:d()(v.historyRow,{[v.selected]:n}),onClick:i},l().createElement("div",{className:v.rowHeader},l().createElement("div",{className:v.badge}),l().createElement(f.Typography,{className:d()(v.title,{bold:r})},r?s().text("Current view"):(0,E.Xr)(a)),!r&&l().createElement(f.Typography,{className:v.date},s().date(m,"L LT"))),c&&l().createElement(f.Typography,{className:v.title},s().text("Match rule:")," ",c.join(", ")),l().createElement(f.Typography,{className:v.user},u))};var g=r(55912);const b=e=>e===g.b.FAKE_FILTERED_INCOMING||e===g.b.FAKE_FILTERED_OUTGOING,x=e=>{let{x:t,y:r,toX:n,toY:i,color:o,isDashed:a}=e;const s=((e,t,r,n)=>{const l=t>n,i=e<r,o=l?-6:6;return`M${e} ${t} L${i?r-12:r+12} ${t} ${i?`c 6 0 12 ${o} 12`:`c -6 0 -12 ${o} -12`} ${l?-12:12} L${r} ${n}`})(t,r,n,i);return l().createElement("path",{d:s,stroke:o,strokeWidth:2,fill:"none",strokeDasharray:a?"3,3":void 0})};function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}const I=(0,n.forwardRef)(((e,t)=>{let{x:r,y:n,color:i,isDashed:o,isCollapsed:a,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const d=s?6:3;return l().createElement("g",T({},u,{ref:t}),c&&l().createElement("rect",{id:"line",x:r-d-4,y:n-d-4,width:2*d+8,height:2,fill:i}),l().createElement("circle",{cx:r,cy:n,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:r-4,y:n-1,width:8,height:2,fill:"#fff"}),a&&l().createElement("rect",{x:r-1,y:n-4,width:2,height:8,fill:"#fff"})))}));const N=(0,r(83348).Z)(I),w=(0,n.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:r}=e;const{historyLanes:n,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:m,index:f,timestamp:E,label:h}=t;const y=16*n[s].index+24,v=o[a];o.push(v+c);const T=b(m),I=T?u[0]:s,w=!(null!=u&&u.some((e=>n[e])));e.circles.push(l().createElement(N,{tooltipTitle:h,tooltipPlacement:"top",onMouseOver:r?()=>r(s,E,f):void 0,key:`circle-${I}-${a}`,x:y,y:v,color:(0,p.GtP)(I),isDashed:T,isCollapsed:w,showCollapseIcon:!!u,showLine:m===g.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(l().createElement("rect",{key:`${I}-${f}`,x:y,y:v-8,width:"100%",height:16,fill:(0,p.GtP)(I),opacity:.06}));const O=d===g.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const r=n[t];if(!r)return;const o=i[a].height,s=16*r.index+24,c=O?v-o:v+o;y!==s&&e.links.push(l().createElement(x,{key:`link-${t}-${f}`,x:y,y:v,toX:s,toY:c,isDashed:b(m),color:(0,p.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(n).length+24,d=o[o.length-1]-16;return Object.entries(n).forEach((e=>{let[t,r]=e;const n=16*r.index+24;r.lifeTime.forEach(((e,s)=>{var u;let{start:d,end:m}=e;if((null===(u=i[null==m?void 0:m.index])||void 0===u?void 0:u.type)===g.b.ENTITIES_SPLITTED)return;const f=(null==d?void 0:d.type)===g.b.ENTITIES_SPLITTED?(null==d?void 0:d.index)-1:null==d?void 0:d.index,E=(null==m?void 0:m.type)===g.b.ENTITIES_MERGED_MANUALLY||(null==m?void 0:m.type)===g.b.ENTITIES_MERGED?(null==m?void 0:m.index)+1:null==m?void 0:m.index,h=o[f]||o[o.length-2],y=o[E]||16;if(h<=y)return;const v=(0,p.GtP)(t);!m&&r.index>0&&c.push(l().createElement(I,{key:`initCircle-${t}-${s}`,x:n,y,color:v,showLine:!0})),a.unshift(l().createElement("path",{key:`line-${t}-${s}`,d:`M${n} ${h} L${n} ${y}`,stroke:v,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 O=r(99136);const C=(0,h.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",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 S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){R(e,t,r[t])}))}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const D=e=>{let{historyData:t,isLoading:r,canLoadMore:a,onLoadMore:u,entityUri:E,historyEvent:h,findPreviousChange:y}=e;const g=C(),b=(0,i.useDispatch)(),x=(0,i.useSelector)(m.ZP.selectors.getIsEditableMode),T=(0,i.useSelector)(m.ZP.selectors.getMetadata),[I,N]=(0,n.useState)({historyLanes:{},rows:[]}),[R,D]=(0,n.useState)(!1),[M,_]=(0,n.useState)(-1);(0,n.useEffect)((()=>{if((0,c.isNil)(h))return void _(0);const e=e=>(null==e?void 0:e.uri)===((null==h?void 0:h.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==h?void 0:h.aStamp),r=-1!==M?t.rows[M]:null,n=t.rows.findIndex((t=>e(t)));_(e(r)?M:n)}),[t.rows,h]);const k=(0,n.useRef)(null),A=(0,n.useCallback)((e=>{if(!(0,c.isNil)(e)){var r;const n=null===(r=t.rows)||void 0===r?void 0:r.map(((t,r)=>{var n;return S({},t,{height:null===(n=e.childNodes[r])||void 0===n?void 0:n.clientHeight})}));N({historyLanes:t.historyLanes,rows:n})}}),[t]),L=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:r}=(null==k?void 0:k.current)||{};D(r<e-t)};return l().createElement("div",{className:g.historyTree},r&&l().createElement(O.Z,null),l().createElement("div",{className:d()(g.graph,{[g.shadow]:R}),onScroll:L,ref:k},l().createElement(w,{onHistoryCircleMouseOver:(e,t,r)=>{if((0,c.isNil)(I.rows[r].label)){const n={time:t,select:"crosswalks"};(0,p.HvW)(e,n).then((e=>{let{crosswalks:t}=e;const n=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,p.s5)(T,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");N((e=>S({},e,{rows:e.rows.map((e=>e.index===r?S({},e,{label:n}):e))})))}))}},graphData:I}),l().createElement(o.Z,{handleWidth:!0,onResize:L})),l().createElement("div",{ref:A,className:g.history},t.rows.map(((e,t)=>{const r=t===M,n=0===t;return l().createElement(v,{key:`row-${t}`,change:e,isCurrent:n,isSelected:r,onClick:()=>((e,t,r,n)=>{if(x){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;b(m.N5.mode.actions.modeUpdated(p.ARY.Viewing))}if(n&&!r||!n&&r)b(m.N5.history.actions.clearHistoryEvent()),_(0);else if(!n&&!r){const r=y(e-1,t.uri||E),n=y(e,t.uri||E),l=null==r?void 0:r.timestamp,i=null==n?void 0:n.timestamp,o=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;b(m.N5.history.actions.setHistoryEvent({aStamp:l,bStamp:i,overrideUri:o})),_(e)}})(t,e,r,n)})}))),a&&l().createElement("div",{className:g.buttonContainer},l().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},M=(0,h.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),_=(0,h.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"}}),k=e=>{let{value:t,isSelected:r=!0,onClick:n}=e;const i=(0,p.GtP)(t),o=_({color:i});return l().createElement("div",{className:d()(o.icon,{[o.inactive]:!r,[o.active]:r,[o.clickable]:!!n}),onClick:n})},A=e=>{let{values:t,selectedValues:r,entityUri:n,onSelectValues:i,className:o}=e;const a=M();return l().createElement("div",{className:d()(a.root,o)},l().createElement(k,{value:n}),(null==t?void 0:t.length)>0&&t.map((e=>l().createElement(k,{key:e,value:e,isSelected:null==r?void 0:r.includes(e),onClick:()=>(e=>{null!=r&&r.includes(e)?i((0,c.without)([e],r)):i([...r||[],e])})(e)}))))};function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const P=(e,t)=>e.reduce(((e,r,n)=>{let{start:l,end:i}=r;if(l){const r=t-l.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(r)&&r>0)&&(e.startIndex=n,e.startDistance=r)}if(i){const r=t-i.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(r)&&r<0)&&(e.endIndex=n,e.endDistance=r)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),H=(0,h.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),G=(0,n.memo)((e=>{let{isLoading:t,historyWithTotal:r,contributorsUris:i,entityUri:o,canLoadMore:a,onLoadMore:s,historyEvent:u}=e;const d=H(),[p,m]=(0,n.useState)(null);(0,n.useEffect)((()=>{m(i)}),[i]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:r,selectedUris:l}=e;return(0,n.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},n=[{user:"",timestamp:0,uri:t}],i=(0,c.curry)(((e,r,n)=>{const l=n.uri||t;if(e)if(Array.isArray(e)){if(n.type!==g.b.ENTITY_LOST_MERGE)return null;if(e.includes(l))return n;if(r&&n.uris)return e.some((e=>n.uris.includes(e)))?n:null}else{var i;if(l===e||r&&null!==(i=n.uris)&&void 0!==i&&i.includes(e))return n}return null})),o=(e,t,n)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(i(t,n)))(r),a=t=>(e[t]||l&&!l.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const r=e[e.length-1];!r||r.start&&(r.start.type!==g.b.ENTITY_CREATED||t.type!==g.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):r.start=t},u=(e,t)=>{let r=!0;if(e.length){const n=e[e.length-1];r=!((!n.start||n.start.timestamp<t.timestamp)&&(!n.end||n.end.timestamp>t.timestamp))}r&&e.push({start:null,end:null})},d=(e,t)=>{if(e.length){const r=e[e.length-1];r.start||(r.start=t)}e.push({start:null,end:t})},p=[];return null==r||r.forEach(((r,l)=>{var i;switch(r.type){case g.b.ENTITIES_SPLITTED:if(!o(l,r.uri||t,!1))return;{const e=r.uri,t=r.uris?[r.uris,e]:[e],n=o(l,t,!0);if(n&&(!e||e===n.uri))return}break;case g.b.ENTITY_LOST_MERGE:case g.b.RELATIONSHIP_CREATED:case g.b.RELATIONSHIP_REMOVED:case g.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(i=r.uris)||void 0===i||i.forEach((e=>{a(e)||(c=!0)}));const m=a(r.uri||t);if(!m)return;const f=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){L(e,t,r[t])}))}return e}({},r);((t,r)=>{var l,i;switch(r.type){case g.b.ENTITY_CREATED:s(t,r);break;case g.b.ENTITIES_MERGED_ON_THE_FLY:case g.b.ENTITY_CHANGED:u(t,r);break;case g.b.ENTITY_LOST_MERGE:case g.b.ENTITY_REMOVED:d(t,r);break;case g.b.ENTITIES_SPLITTED:u(t,r),null===(l=r.uris)||void 0===l||l.forEach((t=>{const l=e[t];if(!l)return;const i=l.lifeTime.length;i?s(l.lifeTime,r):d(l.lifeTime,r),n.push({uri:t,user:r.user,type:r.type,fakeType:i?g.b.FAKE_UPDATE:g.b.FAKE_NAVIGATE_PROFILE,timestamp:r.timestamp})}));break;case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:u(t,r),null===(i=r.uris)||void 0===i||i.forEach((t=>{const n=e[t];n&&d(n.lifeTime,r)}))}})(m.lifeTime,f),c&&p.push(f),n.push(f)})),p.forEach((t=>{t.uris.forEach((l=>{e[l]||r.forEach((r=>{let{uri:i,uris:o,timestamp:a,user:s,type:u}=r;i===l&&(null==o||o.forEach((r=>{const l=e[r];if(!l)return;let i=null;switch(u){case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:i=g.b.FAKE_FILTERED_INCOMING;break;case g.b.ENTITIES_SPLITTED:i=g.b.FAKE_FILTERED_OUTGOING;break;default:return}const o={fakeType:i,uri:t.uri,uris:[r],type:u,user:s,timestamp:a},d=P(l.lifeTime,t.timestamp);i===g.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),n.splice(n.indexOf(t),0,o)})))}))}))})),n.forEach(((e,r)=>{e.index=r,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:n},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(i(t,!1)))(n)}}),[t,r,l])})({entityUri:o,historyChanges:null==r?void 0:r.changes,selectedUris:p});return l().createElement("div",{className:d.root},l().createElement(A,{values:i,selectedValues:p,onSelectValues:m,entityUri:o,className:d.borderBottom}),l().createElement(D,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:a,entityUri:o,historyEvent:u,findPreviousChange:E}))}))},85890:(e,t,r)=>{r.d(t,{tO:()=>d,FE:()=>p,k6:()=>m});var n=r(24328),l=r(34091),i=r(17440),o=r(65942),a=r(48465),s=r(85229);function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){u(e,t,r[t])}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d={activities:[o.M.MERGE,o.M.UNMERGE,o.M.UPDATE]},p=e=>(0,i.pipe)((0,i.evolve)({activities:(0,i.difference)(d.activities)}),(0,i.reject)((0,i.either)(i.isNil,i.isEmpty)),i.isEmpty)(e||{}),m=e=>{let{entity:t,enabled:r}=e;const[i,o]=(0,n.useState)(d),[u,p]=(0,n.useState)(0),m=(0,n.useMemo)((()=>(0,a.Z)(i)),[i]),[f,E]=(0,n.useState)(null),[h,y]=(0,n.useState)(null),[v,g]=(0,n.useState)(!1),b=(0,s._)(),x=null==t?void 0:t.uri,T={max:32,order:"desc"},I=(0,l.O27)(null==i?void 0:i.attributes)||void 0;(0,n.useEffect)((()=>{x&&r&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I},T))).then(y).catch((e=>{console.warn("Failed to load history data",e),y(null)})).finally((()=>{g(!1)})))}),[m,I,f]),(0,n.useEffect)((()=>{x&&r&&(g(!0),b((0,l.wdF)({entityUri:x})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{g(!1)})),p(0))}),[x,null==t?void 0:t.updatedTime,r]);const N=(0,n.useCallback)((e=>{x&&f&&r&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I,offset:e},T))).then((e=>{y((t=>c({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{g(!1)})))}),[f,m,r]),w=(0,n.useMemo)((()=>32*(u+1)<(null==h?void 0:h.total)),[h,u]),O=(0,n.useCallback)((e=>{p(0),o(e)}),[]),C=(0,n.useCallback)((()=>{O(c({},d))}),[]),S=(0,n.useCallback)((()=>{w&&(N(32*(u+1)),p(u+1))}),[N,u,w]);return{isLoading:v,canLoadMore:w,onLoadMore:S,onApplyFilter:O,onClearFilter:C,historicUris:f,historyWithTotal:h,historyFilter:i}}},71820:(e,t,r)=>{r.d(t,{C:()=>i});var n=r(24328),l=r(34091);const i=e=>{let{isHistoryTabActive:t,entity:r}=e;const[i,o]=(0,n.useState)(!1),a=null==r?void 0:r.uri;(0,n.useEffect)((()=>{t||o(!1)}),[a]),(0,n.useEffect)((()=>{t&&o(!0)}),[t]);const s=a&&!(0,l.ZiX)(a)&&!(0,l.biM)(r);return{isHistoryEnabled:i&&s,isProfilePersisted:s}}},57730:(e,t,r)=>{r.d(t,{a:()=>s});var n=r(24328),l=r(52730),i=r(59431),o=r(34091),a=r(85229);const s=e=>{let{entity:t,historyEvent:r}=e;const[s,c]=(0,n.useState)(!1),u=(0,l.useSelector)(i.ZP.selectors.getHistorySlice),d=(0,l.useDispatch)(),p=(0,a._)(),{aStamp:m,bStamp:f,overrideUri:E}=r||{},h=E||(null==t?void 0:t.uri);return(0,n.useEffect)((()=>{r&&h&&(c(!0),p(Promise.all([(0,o.lrH)(h,m),f&&1!==f?(0,o.lrH)(h,f):Promise.resolve(null)])).then((e=>{let[t,r]=e;d(i.N5.history.actions.setHistorySlice({aEntity:t,bEntity:r}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[m,f,h]),{isLoading:s,historySlice:u}}},55912:(e,t,r)=>{r.d(t,{b:()=>o});var n,l=r(31537);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!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"}(n||(n={}));const o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},l.I,n)},65942:(e,t,r)=>{let n;r.d(t,{M:()=>n}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(n||(n={}))},48465:(e,t,r)=>{r.d(t,{Z:()=>f,R:()=>E});var n=r(95038),l=r.n(n),i=r(17440),o=r(34091),a=r(65942),s=r(31537),c=r(67885);const u=e=>(0,i.pipe)((0,i.map)(e),(0,i.join)(" or ")),d=e=>{const[t,r]=e;return l()().subtract(t,r).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]]])),m=(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:r}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${d(r)})`;case c.K.AGO:return`lte(timestamp, ${d(r)})`;case c.K.BETWEEN:{const[e,t]=r;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${l()(t).endOf("date").valueOf()})`}default:return""}}}),(0,i.over)((0,i.lensProp)("activities"),m),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,r]=e.period;return"Number"===(0,i.type)(t)&&"String"===(0,i.type)(r)&&t>0}if(e.type===c.K.BETWEEN){const[t,r]=e.period;return t instanceof Date&&r instanceof Date}}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[7937],{10159:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),l=r.n(n),i=r(94079);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}const 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,r(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:r,secondaryText:n}=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.Typography,{className:o.text},r),n&&l().createElement(i.Typography,{className:o.secondaryText},n)))}},91515:(e,t,r)=>{r.d(t,{Z:()=>ee});var n=r(24328),l=r.n(n),i=r(87918),o=r.n(i),a=r(94079),s=r(17440),c=r(51229),u=r(36444),d=r(22385),p=r(48465),m=r(85451),f=r(27815),E=r(71153),h=r.n(E),y=r(31517),v=r(67885);const g=[v.K.WITHIN,v.K.AGO,v.K.BETWEEN],b=e=>({[v.K.WITHIN]:o().text("Within the last"),[v.K.AGO]:o().text("More than"),[v.K.BETWEEN]:o().text("Date range")}[e]||"");var x=r(39621),T=r(20562),I=r(51843),N=r(79692);const w=(0,N.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},intervalContainer:{display:"flex",justifyContent:"space-between"},typeInput:{width:160,marginRight:10}}),O=[null,null],C=[null,"hours"],S=e=>{let{value:t,onChange:r,className:i}=e;const s=w(),c=e=>e===v.K.WITHIN||e===v.K.AGO,u=e=>e===v.K.BETWEEN,d=u(null==t?void 0:t.type)?t.period:O,p=c(null==t?void 0:t.type)?t.period:C,[m,f]=(0,n.useState)(d),[E,N]=(0,n.useState)(p),S=(null==t?void 0:t.type)||v.K.WITHIN,R=e=>c(e)?E:u(e)?m:void 0,D=e=>{r({type:S,period:e})};return(0,T.D)((()=>{t?c(t.type)?N(t.period):u(t.type)&&f(t.period):(f(O),N(C))}),[t]),l().createElement("div",{className:h()(s.root,i)},l().createElement(a.Typography,{className:s.title,variant:"subtitle1"},o().text("Date")),l().createElement("div",{className:s.intervalContainer},l().createElement(y.Z,{label:"",className:s.typeInput,value:{value:S,label:b(S)},options:g.map((e=>({value:e,label:b(e)}))),onChange:e=>{let{value:n}=e;(null==t?void 0:t.type)!==n&&r({period:R(n),type:n})}}),c(S)?l().createElement(x.Z,{interval:E,onChange:D}):l().createElement(I.Z,{values:m,onChange:D})))};var R=r(92575),D=r(96808),M=r(65942);const _=[M.M.UPDATE,M.M.MERGE,M.M.UNMERGE];function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){A(e,t,r[t])}))}return e}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const L={input:e=>k({},e,{fontSize:"14px"}),menuPortal:e=>k({},e,{zIndex:1300})},P=(0,N.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:r,className:n}=e;const i=P(),c=e=>{return{value:e,label:(t=e,{[M.M.UPDATE]:o().text("Update"),[M.M.MERGE]:o().text("Merge"),[M.M.UNMERGE]:o().text("Unmerge")}[t]||"")};var t},u=e=>e.map(c),d=u(_);return l().createElement("div",{className:h()(i.root,n)},l().createElement(a.Typography,{className:i.title,variant:"subtitle1"},o().text("Activity")),l().createElement(R.Z,{value:u(t),onChange:(0,s.pipe)((0,s.defaultTo)([]),(0,s.pluck)("value"),r),options:d,TextFieldProps:{classes:{root:i.dropDownInput}},components:{DropdownIndicator:D.Z},styles:L,classes:i,menuPlacement:"bottom",menuPortalTarget:document.body}))};var G=r(85890);const j=(0,N.Z)({popup:{width:500,minHeight: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",borderTop:"solid 1px rgba(0, 0, 0, 0.12)"},clearButton:{marginRight:"auto"},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px"}});function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){U(e,t,r[t])}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const B=e=>{let{className:t,filter:r,onApplyFilter:i,entityType:c}=e;const E=j(),h=(0,n.useRef)(),[y,v]=(0,n.useState)(!1),[g,b]=(0,n.useState)(r),{activities:x=[],attributes:T=[],dateRange:I=null,users:N=[]}=g||{},w=(0,G.FE)(r)?"inherit":"primary";(0,n.useEffect)((()=>{y&&b(r)}),[r,y]);const O=(0,s.curry)(((e,t)=>{b((r=>F({},r,{[e]:t})))})),C=(0,n.useCallback)((()=>{v((e=>!e))}),[]),R=(0,n.useCallback)((()=>{I&&(0,p.R)(I)?i(g):i((0,s.dissoc)("dateRange",g)),C()}),[g,I,i,C]),D=(0,n.useCallback)((()=>{b(F({},G.tO))}),[]);return l().createElement(l().Fragment,null,l().createElement(d.Z,{ref:h,color:w,icon:u.Z,size:"L",onClick:C,className:t}),l().createElement(a.Popover,{classes:{paper:E.popup},open:y,anchorEl:h.current,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},l().createElement("div",{className:E.filterContainer},l().createElement(a.Typography,{variant:"h6"},o().text("Filter")),l().createElement("div",{className:E.filterContainerScrollable},l().createElement(S,{value:I,onChange:O("dateRange"),className:E.filterItem}),l().createElement(m.Z,{selectedUsers:N,onChange:O("users"),className:E.filterItem}),l().createElement(H,{selectedHistoryActivityTypes:x,onChange:O("activities"),className:E.filterItem}),l().createElement(f.Z,{selectedAttributes:T,entityType:c,onChange:O("attributes"),className:E.filterItem,title:o().text("Attribute updated")}))),l().createElement("div",{className:E.filterControls},l().createElement(a.Button,{onClick:D,className:E.clearButton},o().text("Clear all")),l().createElement(a.Button,{onClick:C},o().text("Cancel")),l().createElement(a.Button,{color:"primary",onClick:R},o().text("Apply")))))};var Z=r(52730),z=r(43054),$=r(59431),K=r(55847),W=r(98281),Y=r(31276);const V=(0,N.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,n.forwardRef)(((e,t)=>{let{item:r,onMenuClose:n=Y.ZT}=e;const i=V(),{text:o,selected:s,onClick:c}=r;return l().createElement(a.MenuItem,{classes:{root:i.menuItem},onClick:e=>{n(),c(e)},ref:t},s&&l().createElement(W.Z,{className:i.checkIcon}),l().createElement(a.Typography,{classes:{root:i.menuText}},o))}));q.displayName="MenuItemRenderer";const X=q,J=()=>{const e=(0,Z.useSelector)($.ZP.selectors.getHistoryMode),t=(0,Z.useDispatch)(),r=e=>{t($.N5.history.actions.setHistoryMode(e))},n=[{text:o().text("Compare to Current view"),selected:e===$.Z9.Current,onClick:()=>r($.Z9.Current)},{text:o().text("Compare to Previous view"),selected:e===$.Z9.Previous,onClick:()=>r($.Z9.Previous)}];return l().createElement(K.Z,{MenuItemRenderer:X,buttonComponent:d.Z,buttonProps:{icon:z.Z,size:"L"},menuId:"history-menu",menuItems:n})},Q=(0,N.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"}}),ee=e=>{let{total:t,entityType:r,filter:n,onApplyFilter:i}=e;const u=Q();return l().createElement("div",{className:u.root},l().createElement(a.Typography,{variant:"h6"},o().text("History")),!(0,s.isNil)(t)&&l().createElement(l().Fragment,null,l().createElement(a.Divider,{orientation:"vertical",flexItem:!0,className:u.divider}),l().createElement(a.Typography,{variant:"body1",color:"textSecondary",className:u.count},1===t?o().text("${count} contributing profile",{count:t}):o().text("${count} contributing profiles",{count:t}))),l().createElement(c.Z,null),l().createElement(B,{className:u.filterButton,entityType:r,filter:n,onApplyFilter:i}),l().createElement(J,null))}},6674:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),l=r.n(n),i=r(87918),o=r.n(i),a=r(10159);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.")})},54362:(e,t,r)=>{r.d(t,{Z:()=>G});var n=r(24328),l=r.n(n),i=r(52730),o=r(44443),a=r(87918),s=r.n(a),c=r(17440),u=r(71153),d=r.n(u),p=r(90088),m=r(59431),f=r(94079),E=r(34606),h=r(79692);const y=(0,h.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"}}))),v=e=>{let{change:t,isCurrent:r,isSelected:n,onClick:i}=e;const{uri:o,type:a,matchGroups:c,user:u,timestamp:m}=t,h=(0,p.GtP)(o),v=y({color:h});return l().createElement("div",{className:d()(v.historyRow,{[v.selected]:n}),onClick:i},l().createElement("div",{className:v.rowHeader},l().createElement("div",{className:v.badge}),l().createElement(f.Typography,{className:d()(v.title,{bold:r})},r?s().text("Current view"):(0,E.Xr)(a)),!r&&l().createElement(f.Typography,{className:v.date},s().date(m,"L LT"))),c&&l().createElement(f.Typography,{className:v.title},s().text("Match rule:")," ",c.join(", ")),l().createElement(f.Typography,{className:v.user},u))};var g=r(55912);const b=e=>e===g.b.FAKE_FILTERED_INCOMING||e===g.b.FAKE_FILTERED_OUTGOING,x=e=>{let{x:t,y:r,toX:n,toY:i,color:o,isDashed:a}=e;const s=((e,t,r,n)=>{const l=t>n,i=e<r,o=l?-6:6;return`M${e} ${t} L${i?r-12:r+12} ${t} ${i?`c 6 0 12 ${o} 12`:`c -6 0 -12 ${o} -12`} ${l?-12:12} L${r} ${n}`})(t,r,n,i);return l().createElement("path",{d:s,stroke:o,strokeWidth:2,fill:"none",strokeDasharray:a?"3,3":void 0})};function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T.apply(this,arguments)}const I=(0,n.forwardRef)(((e,t)=>{let{x:r,y:n,color:i,isDashed:o,isCollapsed:a,showCollapseIcon:s,showLine:c}=e,u=function(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}(e,["x","y","color","isDashed","isCollapsed","showCollapseIcon","showLine"]);const d=s?6:3;return l().createElement("g",T({},u,{ref:t}),c&&l().createElement("rect",{id:"line",x:r-d-4,y:n-d-4,width:2*d+8,height:2,fill:i}),l().createElement("circle",{cx:r,cy:n,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:r-4,y:n-1,width:8,height:2,fill:"#fff"}),a&&l().createElement("rect",{x:r-1,y:n-4,width:2,height:8,fill:"#fff"})))}));const N=(0,r(83348).Z)(I),w=(0,n.memo)((e=>{let{graphData:t,onHistoryCircleMouseOver:r}=e;const{historyLanes:n,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:m,index:f,timestamp:E,label:h}=t;const y=16*n[s].index+24,v=o[a];o.push(v+c);const T=b(m),I=T?u[0]:s,w=!(null!=u&&u.some((e=>n[e])));e.circles.push(l().createElement(N,{tooltipTitle:h,tooltipPlacement:"top",onMouseOver:r?()=>r(s,E,f):void 0,key:`circle-${I}-${a}`,x:y,y:v,color:(0,p.GtP)(I),isDashed:T,isCollapsed:w,showCollapseIcon:!!u,showLine:m===g.b.FAKE_NAVIGATE_PROFILE})),e.rowLines.push(l().createElement("rect",{key:`${I}-${f}`,x:y,y:v-8,width:"100%",height:16,fill:(0,p.GtP)(I),opacity:.06}));const O=d===g.b.ENTITIES_SPLITTED;return null==u||u.forEach((t=>{const r=n[t];if(!r)return;const o=i[a].height,s=16*r.index+24,c=O?v-o:v+o;y!==s&&e.links.push(l().createElement(x,{key:`link-${t}-${f}`,x:y,y:v,toX:s,toY:c,isDashed:b(m),color:(0,p.GtP)(t)}))})),e}),{links:[],circles:[],rowLines:[]}),u=16*Object.keys(n).length+24,d=o[o.length-1]-16;return Object.entries(n).forEach((e=>{let[t,r]=e;const n=16*r.index+24;r.lifeTime.forEach(((e,s)=>{var u;let{start:d,end:m}=e;if((null===(u=i[null==m?void 0:m.index])||void 0===u?void 0:u.type)===g.b.ENTITIES_SPLITTED)return;const f=(null==d?void 0:d.type)===g.b.ENTITIES_SPLITTED?(null==d?void 0:d.index)-1:null==d?void 0:d.index,E=(null==m?void 0:m.type)===g.b.ENTITIES_MERGED_MANUALLY||(null==m?void 0:m.type)===g.b.ENTITIES_MERGED?(null==m?void 0:m.index)+1:null==m?void 0:m.index,h=o[f]||o[o.length-2],y=o[E]||16;if(h<=y)return;const v=(0,p.GtP)(t);!m&&r.index>0&&c.push(l().createElement(I,{key:`initCircle-${t}-${s}`,x:n,y,color:v,showLine:!0})),a.unshift(l().createElement("path",{key:`line-${t}-${s}`,d:`M${n} ${h} L${n} ${y}`,stroke:v,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 O=r(99136);const C=(0,h.Z)({historyTree:{display:"grid",gridTemplateColumns:"auto 1fr",overflowY:"auto"},graph:{overflowX:"auto",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 S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){R(e,t,r[t])}))}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const D=e=>{let{historyData:t,isLoading:r,canLoadMore:a,onLoadMore:u,entityUri:E,historyEvent:h,findPreviousChange:y}=e;const g=C(),b=(0,i.useDispatch)(),x=(0,i.useSelector)(m.ZP.selectors.getIsEditableMode),T=(0,i.useSelector)(m.ZP.selectors.getMetadata),[I,N]=(0,n.useState)({historyLanes:{},rows:[]}),[R,D]=(0,n.useState)(!1),[M,_]=(0,n.useState)(-1);(0,n.useEffect)((()=>{if((0,c.isNil)(h))return void _(0);const e=e=>(null==e?void 0:e.uri)===((null==h?void 0:h.overrideUri)||E)&&(null==e?void 0:e.timestamp)===(null==h?void 0:h.aStamp),r=-1!==M?t.rows[M]:null,n=t.rows.findIndex((t=>e(t)));_(e(r)?M:n)}),[t.rows,h]);const k=(0,n.useRef)(null),A=(0,n.useCallback)((e=>{if(!(0,c.isNil)(e)){var r;const n=null===(r=t.rows)||void 0===r?void 0:r.map(((t,r)=>{var n;return S({},t,{height:null===(n=e.childNodes[r])||void 0===n?void 0:n.clientHeight})}));N({historyLanes:t.historyLanes,rows:n})}}),[t]),L=()=>{const{scrollWidth:e,clientWidth:t,scrollLeft:r}=(null==k?void 0:k.current)||{};D(r<e-t)};return l().createElement("div",{className:g.historyTree},r&&l().createElement(O.Z,null),l().createElement("div",{className:d()(g.graph,{[g.shadow]:R}),onScroll:L,ref:k},l().createElement(w,{onHistoryCircleMouseOver:(e,t,r)=>{if((0,c.isNil)(I.rows[r].label)){const n={time:t,select:"crosswalks"};(0,p.HvW)(e,n).then((e=>{let{crosswalks:t}=e;const n=t?(0,c.uniqBy)((0,c.prop)("type"),t).map((e=>{const t=(0,p.s5)(T,e.type);return t?t.label:null})).filter(c.identity).join(", "):s().text("No data");N((e=>S({},e,{rows:e.rows.map((e=>e.index===r?S({},e,{label:n}):e))})))}))}},graphData:I}),l().createElement(o.Z,{handleWidth:!0,onResize:L})),l().createElement("div",{ref:A,className:g.history},t.rows.map(((e,t)=>{const r=t===M,n=0===t;return l().createElement(v,{key:`row-${t}`,change:e,isCurrent:n,isSelected:r,onClick:()=>((e,t,r,n)=>{if(x){if(!window.confirm(s().text("Are you sure you want to go in history mode? All your changes will be lost.")))return;b(m.N5.mode.actions.modeUpdated(p.ARY.Viewing))}if(n&&!r||!n&&r)b(m.N5.history.actions.clearHistoryEvent()),_(0);else if(!n&&!r){const r=y(e-1,t.uri||E),n=y(e,t.uri||E),l=null==r?void 0:r.timestamp,i=null==n?void 0:n.timestamp,o=(null==t?void 0:t.uri)===E?null:null==t?void 0:t.uri;b(m.N5.history.actions.setHistoryEvent({aStamp:l,bStamp:i,overrideUri:o})),_(e)}})(t,e,r,n)})}))),a&&l().createElement("div",{className:g.buttonContainer},l().createElement(f.Button,{color:"primary",onClick:()=>u()},s().text("Show more"))))},M=(0,h.Z)({root:{display:"flex",flexWrap:"wrap",padding:"10px 15px"}}),_=(0,h.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"}}),k=e=>{let{value:t,isSelected:r=!0,onClick:n}=e;const i=(0,p.GtP)(t),o=_({color:i});return l().createElement("div",{className:d()(o.icon,{[o.inactive]:!r,[o.active]:r,[o.clickable]:!!n}),onClick:n})},A=e=>{let{values:t,selectedValues:r,entityUri:n,onSelectValues:i,className:o}=e;const a=M();return l().createElement("div",{className:d()(a.root,o)},l().createElement(k,{value:n}),(null==t?void 0:t.length)>0&&t.map((e=>l().createElement(k,{key:e,value:e,isSelected:null==r?void 0:r.includes(e),onClick:()=>(e=>{null!=r&&r.includes(e)?i((0,c.without)([e],r)):i([...r||[],e])})(e)}))))};function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const P=(e,t)=>e.reduce(((e,r,n)=>{let{start:l,end:i}=r;if(l){const r=t-l.timestamp;((0,c.isNil)(e.startDistance)||Math.abs(e.startDistance)>Math.abs(r)&&r>0)&&(e.startIndex=n,e.startDistance=r)}if(i){const r=t-i.timestamp;((0,c.isNil)(e.endDistance)||Math.abs(e.endDistance)>Math.abs(r)&&r<0)&&(e.endIndex=n,e.endDistance=r)}return e}),{startIndex:null,endIndex:null,startDistance:null,endDistance:null}),H=(0,h.Z)({root:{display:"flex",flexDirection:"column",overflow:"hidden",position:"relative",height:"100%"},borderBottom:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"}}),G=(0,n.memo)((e=>{let{isLoading:t,historyWithTotal:r,contributorsUris:i,entityUri:o,canLoadMore:a,onLoadMore:s,historyEvent:u}=e;const d=H(),[p,m]=(0,n.useState)(null);(0,n.useEffect)((()=>{m(i)}),[i]);const{historyData:f,findPreviousChange:E}=(e=>{let{entityUri:t,historyChanges:r,selectedUris:l}=e;return(0,n.useMemo)((()=>{const e={[t]:{index:0,lifeTime:[]}},n=[{user:"",timestamp:0,uri:t}],i=(0,c.curry)(((e,r,n)=>{const l=n.uri||t;if(e)if(Array.isArray(e)){if(n.type!==g.b.ENTITY_LOST_MERGE)return null;if(e.includes(l))return n;if(r&&n.uris)return e.some((e=>n.uris.includes(e)))?n:null}else{var i;if(l===e||r&&null!==(i=n.uris)&&void 0!==i&&i.includes(e))return n}return null})),o=(e,t,n)=>(0,c.pipe)((0,c.drop)(e+1),(0,c.find)(i(t,n)))(r),a=t=>(e[t]||l&&!l.includes(t)||(e[t]={index:Object.keys(e).length,lifeTime:[]}),e[t]),s=(e,t)=>{const r=e[e.length-1];!r||r.start&&(r.start.type!==g.b.ENTITY_CREATED||t.type!==g.b.ENTITIES_SPLITTED)?e.push({start:t,end:null}):r.start=t},u=(e,t)=>{let r=!0;if(e.length){const n=e[e.length-1];r=!((!n.start||n.start.timestamp<t.timestamp)&&(!n.end||n.end.timestamp>t.timestamp))}r&&e.push({start:null,end:null})},d=(e,t)=>{if(e.length){const r=e[e.length-1];r.start||(r.start=t)}e.push({start:null,end:t})},p=[];return null==r||r.forEach(((r,l)=>{var i;switch(r.type){case g.b.ENTITIES_SPLITTED:if(!o(l,r.uri||t,!1))return;{const e=r.uri,t=r.uris?[r.uris,e]:[e],n=o(l,t,!0);if(n&&(!e||e===n.uri))return}break;case g.b.ENTITY_LOST_MERGE:case g.b.RELATIONSHIP_CREATED:case g.b.RELATIONSHIP_REMOVED:case g.b.RELATIONSHIP_CHANGED:return}let c=!1;null===(i=r.uris)||void 0===i||i.forEach((e=>{a(e)||(c=!0)}));const m=a(r.uri||t);if(!m)return;const f=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){L(e,t,r[t])}))}return e}({},r);((t,r)=>{var l,i;switch(r.type){case g.b.ENTITY_CREATED:s(t,r);break;case g.b.ENTITIES_MERGED_ON_THE_FLY:case g.b.ENTITY_CHANGED:u(t,r);break;case g.b.ENTITY_LOST_MERGE:case g.b.ENTITY_REMOVED:d(t,r);break;case g.b.ENTITIES_SPLITTED:u(t,r),null===(l=r.uris)||void 0===l||l.forEach((t=>{const l=e[t];if(!l)return;const i=l.lifeTime.length;i?s(l.lifeTime,r):d(l.lifeTime,r),n.push({uri:t,user:r.user,type:r.type,fakeType:i?g.b.FAKE_UPDATE:g.b.FAKE_NAVIGATE_PROFILE,timestamp:r.timestamp})}));break;case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:u(t,r),null===(i=r.uris)||void 0===i||i.forEach((t=>{const n=e[t];n&&d(n.lifeTime,r)}))}})(m.lifeTime,f),c&&p.push(f),n.push(f)})),p.forEach((t=>{t.uris.forEach((l=>{e[l]||r.forEach((r=>{let{uri:i,uris:o,timestamp:a,user:s,type:u}=r;i===l&&(null==o||o.forEach((r=>{const l=e[r];if(!l)return;let i=null;switch(u){case g.b.ENTITIES_MERGED:case g.b.ENTITIES_MERGED_MANUALLY:i=g.b.FAKE_FILTERED_INCOMING;break;case g.b.ENTITIES_SPLITTED:i=g.b.FAKE_FILTERED_OUTGOING;break;default:return}const o={fakeType:i,uri:t.uri,uris:[r],type:u,user:s,timestamp:a},d=P(l.lifeTime,t.timestamp);i===g.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),n.splice(n.indexOf(t),0,o)})))}))}))})),n.forEach(((e,r)=>{e.index=r,e.uri=e.uri||t})),{historyData:{historyLanes:e,rows:n},findPreviousChange:(e,t)=>(0,c.pipe)((0,c.slice)(e+1,1/0),(0,c.find)(i(t,!1)))(n)}}),[t,r,l])})({entityUri:o,historyChanges:null==r?void 0:r.changes,selectedUris:p});return l().createElement("div",{className:d.root},l().createElement(A,{values:i,selectedValues:p,onSelectValues:m,entityUri:o,className:d.borderBottom}),l().createElement(D,{historyData:f,isLoading:t,onLoadMore:s,canLoadMore:a,entityUri:o,historyEvent:u,findPreviousChange:E}))}))},85890:(e,t,r)=>{r.d(t,{tO:()=>d,FE:()=>p,k6:()=>m});var n=r(24328),l=r(90088),i=r(17440),o=r(65942),a=r(48465),s=r(85229);function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){u(e,t,r[t])}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const d={activities:[o.M.MERGE,o.M.UNMERGE,o.M.UPDATE]},p=e=>(0,i.pipe)((0,i.evolve)({activities:(0,i.difference)(d.activities)}),(0,i.reject)((0,i.either)(i.isNil,i.isEmpty)),i.isEmpty)(e||{}),m=e=>{let{entity:t,enabled:r}=e;const[i,o]=(0,n.useState)(d),[u,p]=(0,n.useState)(0),m=(0,n.useMemo)((()=>(0,a.Z)(i)),[i]),[f,E]=(0,n.useState)(null),[h,y]=(0,n.useState)(null),[v,g]=(0,n.useState)(!1),b=(0,s._)(),x=null==t?void 0:t.uri,T={max:32,order:"desc"},I=(0,l.O27)(null==i?void 0:i.attributes)||void 0;(0,n.useEffect)((()=>{x&&r&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I},T))).then(y).catch((e=>{console.warn("Failed to load history data",e),y(null)})).finally((()=>{g(!1)})))}),[m,I,f]),(0,n.useEffect)((()=>{x&&r&&(g(!0),b((0,l.wdF)({entityUri:x})).then((e=>{E(e)})).catch((e=>{console.warn("Failed to load history data",e),E(null)})).finally((()=>{g(!1)})),p(0))}),[x,null==t?void 0:t.updatedTime,r]);const N=(0,n.useCallback)((e=>{x&&f&&r&&(g(!0),b((0,l.kgP)(c({entityUri:x,historicUris:f,filter:m,showAll:I,offset:e},T))).then((e=>{y((t=>c({},t,{changes:[...null==t?void 0:t.changes,...e.changes]})))})).catch((e=>{console.warn("Failed to load history data",e)})).finally((()=>{g(!1)})))}),[f,m,r]),w=(0,n.useMemo)((()=>32*(u+1)<(null==h?void 0:h.total)),[h,u]),O=(0,n.useCallback)((e=>{p(0),o(e)}),[]),C=(0,n.useCallback)((()=>{O(c({},d))}),[]),S=(0,n.useCallback)((()=>{w&&(N(32*(u+1)),p(u+1))}),[N,u,w]);return{isLoading:v,canLoadMore:w,onLoadMore:S,onApplyFilter:O,onClearFilter:C,historicUris:f,historyWithTotal:h,historyFilter:i}}},71820:(e,t,r)=>{r.d(t,{C:()=>i});var n=r(24328),l=r(90088);const i=e=>{let{isHistoryTabActive:t,entity:r}=e;const[i,o]=(0,n.useState)(!1),a=null==r?void 0:r.uri;(0,n.useEffect)((()=>{t||o(!1)}),[a]),(0,n.useEffect)((()=>{t&&o(!0)}),[t]);const s=a&&!(0,l.ZiX)(a)&&!(0,l.biM)(r);return{isHistoryEnabled:i&&s,isProfilePersisted:s}}},57730:(e,t,r)=>{r.d(t,{a:()=>s});var n=r(24328),l=r(52730),i=r(59431),o=r(90088),a=r(85229);const s=e=>{let{entity:t,historyEvent:r}=e;const[s,c]=(0,n.useState)(!1),u=(0,l.useSelector)(i.ZP.selectors.getHistorySlice),d=(0,l.useDispatch)(),p=(0,a._)(),{aStamp:m,bStamp:f,overrideUri:E}=r||{},h=E||(null==t?void 0:t.uri);return(0,n.useEffect)((()=>{r&&h&&(c(!0),p(Promise.all([(0,o.lrH)(h,m),f&&1!==f?(0,o.lrH)(h,f):Promise.resolve(null)])).then((e=>{let[t,r]=e;d(i.N5.history.actions.setHistorySlice({aEntity:t,bEntity:r}))})).catch((e=>{console.warn("Failed to load entity slice",e)})).finally((()=>{c(!1)})))}),[m,f,h]),{isLoading:s,historySlice:u}}},55912:(e,t,r)=>{r.d(t,{b:()=>o});var n,l=r(31537);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!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"}(n||(n={}));const o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},l.I,n)},65942:(e,t,r)=>{let n;r.d(t,{M:()=>n}),function(e){e.UPDATE="UPDATE",e.MERGE="MERGE",e.UNMERGE="UNMERGE"}(n||(n={}))},48465:(e,t,r)=>{r.d(t,{Z:()=>f,R:()=>E});var n=r(95038),l=r.n(n),i=r(17440),o=r(90088),a=r(65942),s=r(31537),c=r(67885);const u=e=>(0,i.pipe)((0,i.map)(e),(0,i.join)(" or ")),d=e=>{const[t,r]=e;return l()().subtract(t,r).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]]])),m=(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:r}=e;switch(t){case c.K.WITHIN:return`gte(timestamp, ${d(r)})`;case c.K.AGO:return`lte(timestamp, ${d(r)})`;case c.K.BETWEEN:{const[e,t]=r;return`gte(timestamp, ${e.valueOf()}) and lte(timestamp, ${l()(t).endOf("date").valueOf()})`}default:return""}}}),(0,i.over)((0,i.lensProp)("activities"),m),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,r]=e.period;return"Number"===(0,i.type)(t)&&"String"===(0,i.type)(r)&&t>0}if(e.type===c.K.BETWEEN){const[t,r]=e.period;return t instanceof Date&&r instanceof Date}}}}]);
2
2
  //# sourceMappingURL=7937.js.map
package/8051.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8051],{60894:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),l=n.n(r),o=n(13980),c=n.n(o),i=n(94656);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=e=>l().createElement("svg",a({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(8818),p=n(17440),d=n(47458),h=n(87918),m=n.n(h),f=n(85657);const b=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:o,title:c,tooltipTitle:i}=e;const[a,h]=(0,r.useState)(null),b=(0,r.useCallback)((e=>{const t=(0,p.pipe)(f.JJ,(0,p.pluck)("id"))(e),r=(0,f.u)(n,e);o(r?(0,p.difference)(n,t):(0,p.uniq)((0,p.concat)(n,t)))}),[n,o]);return l().createElement(l().Fragment,null,l().createElement(u.k,{tooltipTitle:i||m().text("Show/hide columns"),size:"L",icon:s,onClick:e=>h(e.currentTarget)}),l().createElement(d.G,{onColumnClick:b,anchorEl:a,columnsData:t,onClose:()=>h(null),title:c,selectedColumns:n}))};b.propTypes={columnsData:i.uz,selectedColumns:c().arrayOf(c().string),onChangeColumns:c().func,title:c().string,tooltipTitle:c().string};const g=b},47458:(e,t,n)=>{n.d(t,{G:()=>k});var r=n(24328),l=n.n(r),o=n(87918),c=n.n(o),i=n(17440),a=n(34091),s=n(44890),u=n(97820),p=n(85657),d=n(56656),h=n(54763),m=n(13980),f=n.n(m),b=n(7785),g=n(27239),y=n(71153),v=n.n(y);const O=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),w=e=>{let{item:t,onClick:n,checked:r,level:o,style:c,isFocused:i,isGroupItem:a,hideCheckBox:s}=e;const u=O();return l().createElement(b.Z,{hideCheckBox:s,key:t.id,onClick:n,checked:r,level:o,data:t,label:l().createElement(g.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:c,isFocused:i,hideIcon:a,className:v()({[u.groupItem]:a})})};w.propTypes={item:f().shape({label:f().string,filterText:f().string}),level:f().number,onClick:f().func,checked:f().bool,style:f().object,isGroupItem:f().bool,isFocused:f().bool,hideCheckBox:f().bool};const C=w,k=e=>{let{anchorEl:t,onClose:n,title:o,columnsData:m,onColumnClick:f,selectedColumns:b,hideCheckBox:g}=e;const y=O(),[v,w]=(0,r.useState)(""),k=(0,r.useMemo)((()=>(0,p.eX)(m,v)),[m,v]),E=(0,r.useMemo)((()=>(0,d.LG)(k)),[k]),j=(0,a.fW1)("label")(k)||308,x=(0,r.useCallback)((e=>{let{item:t}=e;return f(t)}),[f]),{focusIndex:I,handleKeyDown:P}=(0,h.t)({items:E,open:!0,onSelectFocusedItem:x,selectedItems:b,onClose:n}),S=(0,r.useCallback)((0,i.pipe)(n,(()=>w(""))),[n]),T=Math.min(300,32*E.length),z=Math.max(140,T+108);return l().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:S,onSearch:w,title:o||c().text("Show/hide columns"),containerWidth:j,containerHeight:z,searchInputOnKeyDown:P},l().createElement(s.Z,{fixedTitle:!1,height:T,renderItem:(e,t,n)=>{let{item:r,level:o=0}=t;return l().createElement(C,{hideCheckBox:g,style:e,item:r,level:o,isFocused:I===n,checked:(0,p.u)(b,r),isGroupItem:(0,p.yf)(r),onClick:g?(0,i.pipe)(f,S):f})},items:E,getItemSize:()=>32,focusIndex:I}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>g,JJ:()=>y,yf:()=>i,u:()=>v});var r=n(17440),l=n(34091);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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 i=e=>e.id===e.groupId,a=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),s=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),p=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(s(t),a(t))))(e,t);return n?(n.children=p(n.children||[],t),e):e.concat(t)},d=(0,r.curry)(((e,t)=>l.P6Y.strings.search(t.label,e)||(t.children||[]).some(d(e)))),h=(0,r.reduce)(((e,t)=>p(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(d(e)),(0,r.chain)((t=>[{item:o({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),f=(0,r.has)("columns"),b=e=>{let{id:t,label:n,columns:l}=e;return[{id:t,groupId:t,label:n},...l.map((0,r.assoc)("groupId",t))]},g=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(f,b)),(0,r.filter)((0,r.either)(i,u)),h,m(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return i(t)?n.every(r):n.some(r)}},1876:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),l=n.n(r),o=n(13980),c=n.n(o),i=n(87918),a=n.n(i),s=n(94079),u=n(87685);function p(){return p=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},p.apply(this,arguments)}const d=e=>l().createElement("svg",p({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),h=(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"}}))),m=e=>{let{enabled:t,onClick:n}=e;const r=h();return l().createElement(s.Tooltip,{title:t?a().text("Clear all filters"):a().text("Filter")},l().createElement(s.IconButton,{onClick:n,classes:{root:r.button}},t?l().createElement(l().Fragment,null,l().createElement(d,{className:r["filterIcon--enabled"]}),l().createElement(u.default,{color:"primary",className:r.closeIcon})):l().createElement(d,null)))};m.propTypes={enabled:c().bool,onClick:c().func};const f=m},26180:(e,t,n)=>{n.d(t,{ZP:()=>f});var r=n(17440),l=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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 i="CHANGE_COLUMNS",a="TOGGLE_FILTERS",s="CHANGE_FILTER",u="TOGGLE_SORT",p="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",h={changeColumns:(0,l.zD)(i),toggleFilters:(0,l.zD)(a),changeFilter:(0,l.zD)(s),toggleSort:(0,l.zD)(u),changePage:(0,l.zD)(p),changeRowsPerPage:(0,l.zD)(d)},m=(e,t)=>{const n=(0,r.difference)(e.visibleColumns,t),l=e=>n.includes(e);return(0,r.evolve)({visibleColumns:(0,r.always)(t),sorting:(0,r.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,r.keys)(e).reduce(((e,t)=>l(t)?(0,r.dissoc)(t,e):e),e)},e)},f={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return m(e,n)}case a:{const t=!e.filters;return o({},e,{filters:t?{}:null,page:t?e.page:0})}case s:{const{columnId:n,filter:l}=t.payload;return(0,r.evolve)({filters:l?(0,r.assoc)(n,l):(0,r.dissoc)(n),page:(0,r.always)(0)},e)}case u:{const n=t.payload,c=(0,r.path)(["sorting","field"],e),i=(0,r.path)(["sorting","order"],e);return o({},e,{sorting:{field:n,order:(0,l.Dh)(n===c?i:null)},page:0})}case p:return o({},e,{page:t.payload});case d:return o({},e,{rowsPerPage:t.payload});default:return e}},actions:h,changeVisibleColumns:m}},10237:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(27556),l=n(13980),o=n.n(l),c=n(24328),i=n.n(c);function a(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}const u=(0,n(79692).Z)((e=>({"basic-view__paper":a({display:"flex",flexDirection:"column"},e.basicView)})));function p(){return p=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},p.apply(this,arguments)}const d=(0,c.forwardRef)(((e,t)=>{let{children:n,className:l}=e,o=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["children","className"]);const c=u();return i().createElement(r.Z,p({ref:t,className:l,classes:{root:c["basic-view__paper"]}},o),n)}));d.displayName="BasicView",d.propTypes={children:o().node,className:o().string};const h=d},51229:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),l=n.n(r);const o=()=>l().createElement("div",{style:{flex:1}})},30553:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(13980),l=n.n(r),o=n(24328),c=n.n(o);const i=e=>{let{height:t,margin:n}=e;return c().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:l().number,margin:l().number};const a=i},86361:(e,t,n)=>{n.d(t,{o:()=>c});var r=n(24328),l=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 c=e=>{let{actions:t,dispatch:n}=e;return(0,r.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[r,c]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}({},e,{[r]:(0,l.pipe)(c,n)})}),{})),[n,t])}}}]);
1
+ "use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[8051],{60894:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(24328),l=n.n(r),o=n(13980),c=n.n(o),i=n(94656);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}const s=e=>l().createElement("svg",a({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(8818),p=n(17440),d=n(47458),h=n(87918),m=n.n(h),f=n(85657);const b=e=>{let{columnsData:t,selectedColumns:n,onChangeColumns:o,title:c,tooltipTitle:i}=e;const[a,h]=(0,r.useState)(null),b=(0,r.useCallback)((e=>{const t=(0,p.pipe)(f.JJ,(0,p.pluck)("id"))(e),r=(0,f.u)(n,e);o(r?(0,p.difference)(n,t):(0,p.uniq)((0,p.concat)(n,t)))}),[n,o]);return l().createElement(l().Fragment,null,l().createElement(u.k,{tooltipTitle:i||m().text("Show/hide columns"),size:"L",icon:s,onClick:e=>h(e.currentTarget)}),l().createElement(d.G,{onColumnClick:b,anchorEl:a,columnsData:t,onClose:()=>h(null),title:c,selectedColumns:n}))};b.propTypes={columnsData:i.uz,selectedColumns:c().arrayOf(c().string),onChangeColumns:c().func,title:c().string,tooltipTitle:c().string};const g=b},47458:(e,t,n)=>{n.d(t,{G:()=>k});var r=n(24328),l=n.n(r),o=n(87918),c=n.n(o),i=n(17440),a=n(90088),s=n(44890),u=n(97820),p=n(85657),d=n(56656),h=n(54763),m=n(13980),f=n.n(m),b=n(7785),g=n(27239),y=n(71153),v=n.n(y);const O=(0,n(79692).Z)({popup:{minWidth:"200px"},groupItem:{backgroundColor:"rgba(0,0,0,0.04)"}}),w=e=>{let{item:t,onClick:n,checked:r,level:o,style:c,isFocused:i,isGroupItem:a,hideCheckBox:s}=e;const u=O();return l().createElement(b.Z,{hideCheckBox:s,key:t.id,onClick:n,checked:r,level:o,data:t,label:l().createElement(g.Z,{text:t.label,highlight:t.filterText}),labelInText:t.label,style:c,isFocused:i,hideIcon:a,className:v()({[u.groupItem]:a})})};w.propTypes={item:f().shape({label:f().string,filterText:f().string}),level:f().number,onClick:f().func,checked:f().bool,style:f().object,isGroupItem:f().bool,isFocused:f().bool,hideCheckBox:f().bool};const C=w,k=e=>{let{anchorEl:t,onClose:n,title:o,columnsData:m,onColumnClick:f,selectedColumns:b,hideCheckBox:g}=e;const y=O(),[v,w]=(0,r.useState)(""),k=(0,r.useMemo)((()=>(0,p.eX)(m,v)),[m,v]),E=(0,r.useMemo)((()=>(0,d.LG)(k)),[k]),j=(0,a.fW1)("label")(k)||308,x=(0,r.useCallback)((e=>{let{item:t}=e;return f(t)}),[f]),{focusIndex:I,handleKeyDown:P}=(0,h.t)({items:E,open:!0,onSelectFocusedItem:x,selectedItems:b,onClose:n}),S=(0,r.useCallback)((0,i.pipe)(n,(()=>w(""))),[n]),T=Math.min(300,32*E.length),z=Math.max(140,T+108);return l().createElement(u.Z,{className:y.popup,open:!!t,anchorEl:t,onClose:S,onSearch:w,title:o||c().text("Show/hide columns"),containerWidth:j,containerHeight:z,searchInputOnKeyDown:P},l().createElement(s.Z,{fixedTitle:!1,height:T,renderItem:(e,t,n)=>{let{item:r,level:o=0}=t;return l().createElement(C,{hideCheckBox:g,style:e,item:r,level:o,isFocused:I===n,checked:(0,p.u)(b,r),isGroupItem:(0,p.yf)(r),onClick:g?(0,i.pipe)(f,S):f})},items:E,getItemSize:()=>32,focusIndex:I}))}},85657:(e,t,n)=>{n.d(t,{eX:()=>g,JJ:()=>y,yf:()=>i,u:()=>v});var r=n(17440),l=n(90088);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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 i=e=>e.id===e.groupId,a=(0,r.curry)(((e,t)=>{let{id:n,groupId:r}=e;return t.groupId===r&&(n===t.id||n.startsWith(`${t.id}.`))})),s=(0,r.curry)(((e,t)=>{let{groupId:n}=e;return n===t.id})),u=(0,r.propOr)(!0,"hideable"),p=(e,t)=>{const n=((e,t)=>e.find((0,r.either)(s(t),a(t))))(e,t);return n?(n.children=p(n.children||[],t),e):e.concat(t)},d=(0,r.curry)(((e,t)=>l.P6Y.strings.search(t.label,e)||(t.children||[]).some(d(e)))),h=(0,r.reduce)(((e,t)=>p(e,{id:t.id,groupId:t.groupId,label:t.label,attrType:t.dataTypeDefinition})),[]),m=(0,r.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(0,r.pipe)((0,r.filter)(d(e)),(0,r.chain)((t=>[{item:o({},t,{filterText:e}),level:n},...t.children?m(e,t.children,n+1):[]])))(t)})),f=(0,r.has)("columns"),b=e=>{let{id:t,label:n,columns:l}=e;return[{id:t,groupId:t,label:n},...l.map((0,r.assoc)("groupId",t))]},g=(e,t)=>(0,r.pipe)((0,r.chain)((0,r.when)(f,b)),(0,r.filter)((0,r.either)(i,u)),h,m(t))(e),y=e=>e.children?(0,r.chain)(y,e.children):[e],v=(e,t)=>{const n=y(t),r=t=>e.includes(t.id);return i(t)?n.every(r):n.some(r)}},1876:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(24328),l=n.n(r),o=n(13980),c=n.n(o),i=n(87918),a=n.n(i),s=n(94079),u=n(87685);function p(){return p=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},p.apply(this,arguments)}const d=e=>l().createElement("svg",p({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),l().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),h=(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"}}))),m=e=>{let{enabled:t,onClick:n}=e;const r=h();return l().createElement(s.Tooltip,{title:t?a().text("Clear all filters"):a().text("Filter")},l().createElement(s.IconButton,{onClick:n,classes:{root:r.button}},t?l().createElement(l().Fragment,null,l().createElement(d,{className:r["filterIcon--enabled"]}),l().createElement(u.default,{color:"primary",className:r.closeIcon})):l().createElement(d,null)))};m.propTypes={enabled:c().bool,onClick:c().func};const f=m},26180:(e,t,n)=>{n.d(t,{ZP:()=>f});var r=n(17440),l=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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 i="CHANGE_COLUMNS",a="TOGGLE_FILTERS",s="CHANGE_FILTER",u="TOGGLE_SORT",p="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",h={changeColumns:(0,l.zD)(i),toggleFilters:(0,l.zD)(a),changeFilter:(0,l.zD)(s),toggleSort:(0,l.zD)(u),changePage:(0,l.zD)(p),changeRowsPerPage:(0,l.zD)(d)},m=(e,t)=>{const n=(0,r.difference)(e.visibleColumns,t),l=e=>n.includes(e);return(0,r.evolve)({visibleColumns:(0,r.always)(t),sorting:(0,r.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,r.keys)(e).reduce(((e,t)=>l(t)?(0,r.dissoc)(t,e):e),e)},e)},f={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return m(e,n)}case a:{const t=!e.filters;return o({},e,{filters:t?{}:null,page:t?e.page:0})}case s:{const{columnId:n,filter:l}=t.payload;return(0,r.evolve)({filters:l?(0,r.assoc)(n,l):(0,r.dissoc)(n),page:(0,r.always)(0)},e)}case u:{const n=t.payload,c=(0,r.path)(["sorting","field"],e),i=(0,r.path)(["sorting","order"],e);return o({},e,{sorting:{field:n,order:(0,l.Dh)(n===c?i:null)},page:0})}case p:return o({},e,{page:t.payload});case d:return o({},e,{rowsPerPage:t.payload});default:return e}},actions:h,changeVisibleColumns:m}},10237:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(27556),l=n(13980),o=n.n(l),c=n(24328),i=n.n(c);function a(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}const u=(0,n(79692).Z)((e=>({"basic-view__paper":a({display:"flex",flexDirection:"column"},e.basicView)})));function p(){return p=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},p.apply(this,arguments)}const d=(0,c.forwardRef)(((e,t)=>{let{children:n,className:l}=e,o=function(e,t){if(null==e)return{};var n,r,l=function(e,t){if(null==e)return{};var n,r,l={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}(e,["children","className"]);const c=u();return i().createElement(r.Z,p({ref:t,className:l,classes:{root:c["basic-view__paper"]}},o),n)}));d.displayName="BasicView",d.propTypes={children:o().node,className:o().string};const h=d},51229:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),l=n.n(r);const o=()=>l().createElement("div",{style:{flex:1}})},30553:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(13980),l=n.n(r),o=n(24328),c=n.n(o);const i=e=>{let{height:t,margin:n}=e;return c().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:l().number,margin:l().number};const a=i},86361:(e,t,n)=>{n.d(t,{o:()=>c});var r=n(24328),l=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 c=e=>{let{actions:t,dispatch:n}=e;return(0,r.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[r,c]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}({},e,{[r]:(0,l.pipe)(c,n)})}),{})),[n,t])}}}]);
2
2
  //# sourceMappingURL=8051.js.map