@reltio/remotes 1.4.1132 → 1.4.1135
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/{604.css → 1196.css} +0 -0
- package/1196.js +1 -0
- package/1920.js +1 -1
- package/{9819.css → 1957.css} +0 -0
- package/1957.js +1 -0
- package/2454.js +1 -1
- package/2590.js +1 -0
- package/2864.js +1 -1
- package/2899.js +1 -1
- package/350.js +1 -0
- package/3745.js +1 -0
- package/5884.js +1 -1
- package/597.js +1 -0
- package/6186.js +1 -0
- package/6244.js +1 -0
- package/6250.js +1 -0
- package/6719.js +1 -0
- package/6940.js +1 -0
- package/6971.js +1 -0
- package/7638.js +1 -1
- package/79.js +1 -0
- package/7990.js +1 -1
- package/8387.js +1 -1
- package/8421.js +1 -0
- package/8442.js +1 -1
- package/8988.js +1 -0
- package/9290.js +1 -0
- package/9838.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1607.js +0 -1
- package/2507.js +0 -1
- package/2623.js +0 -2
- package/2623.js.LICENSE.txt +0 -8
- package/2725.js +0 -1
- package/3029.js +0 -1
- package/3553.js +0 -1
- package/3923.js +0 -1
- package/4126.js +0 -1
- package/5276.js +0 -1
- package/604.js +0 -1
- package/6705.js +0 -1
- package/737.js +0 -1
- package/9306.js +0 -1
- package/9609.js +0 -1
- package/9819.js +0 -1
package/6250.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6250],{27815:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o),i=n(71153),c=n.n(i),s=n(17440),u=n(52730),p=n(87638),d=n(99493),f=n(94079),m=n(92575),E=n(37285),h=n(96808),g=n(7785),O=n(79692);function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){y(e,t,n[t])}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const v={input:e=>b({},e,{fontSize:"14px"}),menuPortal:e=>b({},e,{zIndex:1300})},T=(0,O.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"},noOptionsMessage:{fontSize:"14px"}});const I=e=>{let{entityType:t,selectedAttributes:n,className:o,onChange:i,title:O,disableUnderline:b,menuPlacement:y="bottom"}=e;const I=(0,u.useSelector)(p.ZP.selectors.getMetadata),x=T(),R=(0,r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.reduce(((e,r)=>{if(r.hidden)return e;const a=`${n&&n+" / "}${r.label}`;e.push({label:r.label,value:r.uri,attrType:r,chipLabel:a,level:t});const o=(0,d.EUG)(I,r);return e.concat(o?R(o,t+1,a):[])}),[])}),[I]),P=(0,r.useMemo)((()=>R((null==t?void 0:t.attributes)||[])),[t,R]);return a().createElement("div",{className:c()(x.root,o)},a().createElement(f.Typography,{className:x.title,variant:"subtitle1"},O||l().text("Attribute")),a().createElement(m.Z,{value:n,options:P,TextFieldProps:{InputProps:{disableUnderline:b},classes:{root:x.dropDownInput}},components:{DropdownIndicator:h.Z,MultiValue:e=>{let{data:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(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)&&(a[n]=e[n])}return a}(e,["data"]);return a().createElement(E.Z,n,t.chipLabel)},Option:e=>{let{isFocused:t,isSelected:n,data:r,label:o,innerProps:l}=e;return a().createElement("div",l,a().createElement(g.Z,{checked:n,level:r.level,data:r,label:o,labelInText:o,isFocused:t}))}},onChange:(0,s.pipe)((0,s.defaultTo)([]),i),styles:v,classes:x,menuPlacement:y,menuPortalTarget:document.body}))}},58662:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(13980),a=n.n(r),o=n(24328),l=n.n(o),i=n(71153),c=n.n(i),s=n(94079),u=n(87918),p=n.n(u),d=n(31276),f=n(17440);const m=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:r,page:a,onChangePage:i,rowsPerPage:u,onChangeRowsPerPage:h,basicTableRef:g,labelRowsPerPage:O}=e;const b=m(),y=(0,o.useCallback)((()=>{(0,f.pathOr)(f.identity,["current","resetScrollbarPosition"],g)()}),[g]),v=(0,o.useCallback)((e=>{i(e),y()}),[i,y]),T=(0,o.useCallback)((e=>{i(0),h(e),y()}),[i,h,y]);return l().createElement(s.TablePagination,{classes:E({},t,{root:c()(b.pagination,t.root),select:c()(b.select,t.select),caption:b.caption,selectRoot:b.selectRoot,actions:b.actions}),component:"div",labelRowsPerPage:O||p().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:r}=e;return p().text("${fromRow}-${toRow} of ${countRows}",{fromRow:p().number(t,"0,0"),toRow:p().number(n,"0,0"),countRows:p().number(r,"0,0")})},count:n,rowsPerPageOptions:r,page:a,onChangePage:(0,f.pipe)((0,f.nthArg)(1),v),rowsPerPage:u,onChangeRowsPerPage:(0,f.pipe)(d.NA,T)})};g.propTypes={classes:a().object,rowsPerPageOptions:a().arrayOf(a().number),count:a().number,page:a().number,onChangePage:a().func,rowsPerPage:a().number,onChangeRowsPerPage:a().func,basicTableRef:a().shape({current:a().object}),labelRowsPerPage:a().string};const O=l().memo(g)},10237:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(27556),a=n(13980),o=n.n(a),l=n(24328),i=n.n(l);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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":c({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,l.forwardRef)(((e,t)=>{let{children:n,className:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(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)&&(a[n]=e[n])}return a}(e,["children","className"]);const l=u();return i().createElement(r.Z,p({ref:t,className:a,classes:{root:l["basic-view__paper"]}},o),n)}));d.displayName="BasicView",d.propTypes={children:o().node,className:o().string};const f=d},92778:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(24328),a=n.n(r),o=n(15223),l=n(94079);const i=(0,n(79692).Z)({toolbar:{minHeight:"48px",padding:"8px 24px",lineHeight:"28px"},title:{fontSize:"18px",fontWeight:"normal",lineHeight:"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}});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 s=e=>{let{title:t,children:n=null,classes:r={}}=e,s=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(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)&&(a[n]=e[n])}return a}(e,["title","children","classes"]);const u=i();return a().createElement(o.Z,c({className:r.root,classes:{root:u.toolbar}},s),a().createElement(l.Typography,{className:r.title,classes:{root:u.title},variant:"h6"},t),n)}},58241:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(8818),c=n(38016);const s=(0,n(79692).Z)({collapseButton:{cursor:"pointer"},expandLess:{transform:"rotate( -180deg )"}});function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const p=e=>{let{isOpen:t=!1,tooltipTitle:n}=e,r=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(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)&&(a[n]=e[n])}return a}(e,["isOpen","tooltipTitle"]);const o=s(),p={icon:c.Z,className:o.collapseButton,iconClassName:l()({[o.expandLess]:t})},d={tooltipTitle:n};return a().createElement(i.k,u({},p,d,r))}},39621:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),o=n(17440),l=n(87918),i=n.n(l),c=n(6782),s=n(94079),u=n(31517),p=n(31276);const d=(0,n(79692).Z)({root:{display:"flex",flex:1},input:{height:"100%",paddingLeft:"12px",paddingRight:"8px",fontSize:"14px"},inputNumber:{minWidth:"60px",marginRight:10,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.03)"},inputUnit:{width:"100%"}}),f=[i().text("minutes"),i().text("hours"),i().text("days"),i().text("weeks"),i().text("months"),i().text("years")],m=e=>{let{interval:[t,n],onChange:r,onFocus:l}=e;const i=d(),m=(0,o.pipe)(p.NA,parseInt,(e=>[e,n]),r),E=(0,o.pipe)((e=>{let{value:n}=e;return[t,n]}),r);return a().createElement("div",{className:i.root},a().createElement(s.TextField,{type:"number",value:t||"",onChange:m,inputProps:{min:1,onFocus:l},InputProps:{classes:{root:i.input}},className:i.inputNumber}),a().createElement(u.Z,{label:"",placeholder:(0,c.Z)(n),className:i.inputUnit,value:{value:n,label:(0,c.Z)(n)},options:f.map((e=>({value:e,label:(0,c.Z)(e)}))),onChange:E,TextFieldProps:{inputProps:{onFocus:l},InputProps:{classes:{root:i.input}}}}))}},37699:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(87918),c=n.n(i),s=n(58697),u=n.n(s),p=n(17440),d=n(23147),f=n(94079),m=n(22385),E=n(99493),h=n(43305),g=n(8459);const O=(0,n(79692).Z)((e=>({container:{display:"flex",flexDirection:"column",minHeight:"182px"},header:{display:"flex",paddingLeft:"10px",backgroundColor:"#FFFFFF"},title:{marginLeft:"10px",color:e.palette.text.primary,fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},dateRangeContainer:{display:"flex",flexGrow:1,whiteSpace:"nowrap",cursor:"default",paddingTop:"8px"},dateInput:{margin:"0 7px"},actionButtons:{display:"flex",justifyContent:"flex-end",height:"48px",margin:"0px 8px"},button:{width:"96px"}}))),b=(e,t)=>(0,p.pathOr)(null,[t],e),y=(0,r.forwardRef)(((e,t)=>{let{onCancel:n,onApply:o,values:l,type:i}=e;const s=O(),p=(0,r.useRef)(u()()),y=(0,r.useRef)(u()()),[v,T]=(0,r.useState)(null),[I,x]=(0,r.useState)(null);a().useEffect((()=>{T(b(l,0)),x(b(l,1))}),[l]);const R=i===E.oS0.TYPE_TIMESTAMP?h.Z:g.Z,P=i===E.oS0.TYPE_TIMESTAMP?c().text("Pick date and time"):c().text("Pick date");return a().createElement("div",{className:s.container,ref:t,onKeyDown:e=>"Tab"===e.key&&e.stopPropagation()},a().createElement(f.Toolbar,{disableGutters:!0,classes:{root:s.header}},a().createElement(m.Z,{size:"L",icon:d.Z,onClick:n}),a().createElement(f.Typography,{className:s.title},P)),a().createElement("div",{className:s.dateRangeContainer},a().createElement(R,{id:p.current,label:"From",variant:"filled",value:v,onChange:e=>{T(e)},className:s.dateInput,margin:"dense"}),a().createElement(R,{id:y.current,label:"To",variant:"filled",value:I,onChange:e=>{x(e)},className:s.dateInput,margin:"dense"})),a().createElement("div",{className:s.actionButtons},a().createElement(f.Button,{color:"primary",onClick:()=>{o(v&&I&&v>I?[I,v]:[v,I])},className:s.button},c().text("Update"))))}));y.propTypes={onCancel:l().func.isRequired,onApply:l().func.isRequired,values:l().arrayOf(l().instanceOf(Date)),type:l().string},y.displayName="DateRangePicker";const v=y},55847:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(24328),a=n.n(r),o=n(71153),l=n.n(o),i=n(17440),c=n(94079),s=n(48348),u=n(20562),p=n(83348),d=n(79692),f=n(41128);const m=(0,d.Z)((e=>({buttonRoot:{"&$selected":{color:e.palette.action.active,backgroundColor:(0,f.U1)(e.palette.action.active,.12),"&:hover":{backgroundColor:(0,f.U1)(e.palette.action.active,.15)}}},selected:{},paper:{minWidth:"112px"},menuItem:{minHeight:"32px"},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0}}))),E=(0,p.Z)(c.MenuItem),h=(0,r.forwardRef)(((e,t)=>{let{item:n,onMenuClose:r=i.identity}=e;const o=m(),{disabled:l,text:s,tooltip:u,onClick:p,id:d=""}=n;return a().createElement(E,{tooltipTitle:u,showForDisabled:!0,classes:{root:o.menuItem},onClick:e=>{r(e),p(e)},disabled:l,ref:t,"data-modal":!0,"data-reltio-id":`reltio-search-menu-item${d}`},a().createElement(c.Typography,{classes:{root:o.menuText}},s))}));h.displayName="MenuItemRenderer";const g=h;function O(){return O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(this,arguments)}function b(e){let{className:t,menuId:n,buttonComponent:o=c.Button,buttonContent:p,menuItems:d=[],buttonProps:f={},popoverProps:E={},onMenuOpen:h=i.identity,onMenuClose:b=i.identity,MenuItemRenderer:y=g}=e;const v=o,T=m(),I=(0,r.useRef)(),[x,R]=(0,r.useState)(!1);(0,u.D)((()=>{x?h():b()}),[x]);const P=(0,r.useCallback)((e=>{null==e||e.stopPropagation(),R((e=>!e))}),[]);return a().createElement(a().Fragment,null,a().createElement(v,O({ref:I,className:l()(T.buttonRoot,{[T.selected]:x},t),onClick:P,"aria-pressed":x,"aria-controls":x?n:void 0,"aria-haspopup":"true"},f),p),a().createElement(s.Z,O({id:n,variant:"menu",open:x,autoFocus:!1,classes:{paper:T.paper},anchorEl:I.current,onClose:P,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:x}},E),d.map(((e,t)=>a().createElement(y,{item:e,key:t,onMenuClose:P})))))}b.displayName="DropDownMenuButton";const y=b},6230:(e,t,n)=>{n.d(t,{J:()=>s});var r=n(24328),a=n.n(r),o=n(87918),l=n.n(o),i=n(15689);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 s=e=>a().createElement(i.Z,c({message:l().text("No data available")},e))},92575:(e,t,n)=>{n.d(t,{Z:()=>S});var r=n(24328),a=n.n(r),o=n(13980),l=n.n(o),i=n(17440),c=n(70347);const s=(0,n(5407).Z)(c.ZP);var u=n(5190),p=n(18461),d=n(94079),f=n(71153),m=n.n(f),E=n(88611);function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function g(e){const{innerProps:t,innerRef:n,children:r,isFocused:o,isSelected:l,selectProps:{classes:i},label:c}=e;return a().createElement(d.MenuItem,h({className:m()(i.option,{[i["option--selected"]]:l}),ref:n,selected:o,component:"div"},t),a().createElement(d.Checkbox,{color:"primary",checked:l}),a().createElement(E.C,{value:c},a().createElement("div",{className:i["option--item"]},r)))}g.propTypes={children:l().node,innerProps:l().shape({id:l().string.isRequired,key:l().string,onClick:l().func.isRequired,onMouseMove:l().func.isRequired,onMouseOver:l().func.isRequired,tabIndex:l().number.isRequired}).isRequired,innerRef:l().oneOfType([l().oneOf([null]),l().func,l().shape({current:l().any.isRequired})]),isFocused:l().bool.isRequired,isSelected:l().bool.isRequired,label:l().string,selectProps:l().shape({classes:l().shape({option:l().string})})};const O={Option:g};var b=n(79692),y=n(31276);function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){I(e,t,n[t])}))}return e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const x=(0,b.Z)((e=>({label:{top:6,left:16},placeholder:e=>({display:!e.placeholder||e.label?"none":void 0}),"option--selected":{fontWeight:400},clearIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)},dropdownIndicator:{padding:e.spacing(1),margin:e.spacing(.25,.5)}})));let R=0;function P(e){const{label:t,creatable:n,getOptions:o,loadingIndicator:l,components:c,classes:d,styles:f,onChange:m,onInputChange:E,menuPlacement:h="auto"}=e,g=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(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)&&(a[n]=e[n])}return a}(e,["label","creatable","getOptions","loadingIndicator","components","classes","styles","onChange","onInputChange","menuPlacement"]),b=n?s:o?p.Z:u.Z,[I,P]=(0,r.useState)(""),S=x((0,i.omit)(["classes"],e)),C="custom-select-"+R++,M=T({},O,c),N=(0,y.ze)(S,d),_=T({indicatorSeparator:e=>T({},e,{margin:"10px 0"}),loadingIndicator:e=>T({},e,{display:l?e.display:"none"}),loadingMessage:e=>T({},e,{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif'})},f),D=t?{inputId:C,TextFieldProps:T({label:t,InputLabelProps:{htmlFor:C,shrink:!(!e.value||!e.value.length)||void 0,className:N.label}},e.TextFieldProps)}:{};return a().createElement(b,v({isMulti:!0,inputId:C,inputValue:I,onChange:function(e,t){m(e,t),"create-option"===t.action&&(P(""),E("",{action:"input-change"}))},onInputChange:function(e,t){let{action:n}=t;E(e,{action:n}),"set-value"!==n&&P(e)},closeMenuOnSelect:!1,hideSelectedOptions:!1,classes:N,components:M,styles:_,menuPlacement:h,loadOptions:o},D,g))}P.defaultProps={creatable:!1,cacheOptions:!0,components:{},classes:{},placeholder:"",loadingIndicator:!1,onInputChange:()=>{},onChange:()=>{}},P.propTypes={creatable:l().bool,cacheOptions:l().bool,defaultOptions:l().bool,value:l().arrayOf(l().shape({label:l().string.isRequired,value:l().any})),options:l().arrayOf(l().shape({label:l().string.isRequired,value:l().any})),onChange:l().func,onInputChange:l().func,placeholder:l().string,label:l().string,loadingIndicator:l().bool,components:l().shape({ClearIndicator:l().func,Control:l().func,DropdownIndicator:l().func,DownChevron:l().func,CrossIcon:l().func,Group:l().func,GroupHeading:l().func,IndicatorsContainer:l().func,IndicatorSeparator:l().func,Input:l().func,LoadingIndicator:l().func,Menu:l().func,MenuList:l().func,MenuPortal:l().func,LoadingMessage:l().func,NoOptionsMessage:l().func,MultiValue:l().func,MultiValueContainer:l().func,MultiValueLabel:l().func,MultiValueRemove:l().func,Option:l().func,Placeholder:l().func,SelectContainer:l().func,SingleValue:l().func,ValueContainer:l().func}),classes:l().shape({control:l().string,valueContainer:l().string,multiValue:l().string,noOptionsMessage:l().string,singleValue:l().string,placeholder:l().string,menu:l().string,clearIndicator:l().string,dropdownIndicator:l().string,option:l().string,"option--selected":l().string,label:l().string}),styles:l().shape({clearIndicator:l().func,container:l().func,control:l().func,dropdownIndicator:l().func,group:l().func,groupHeading:l().func,indicatorsContainer:l().func,indicatorSeparator:l().func,input:l().func,loadingIndicator:l().func,loadingMessage:l().func,menu:l().func,menuList:l().func,menuPortal:l().func,multiValue:l().func,multiValueLabel:l().func,multiValueRemove:l().func,noOptionsMessage:l().func,option:l().func,placeholder:l().func,singleValue:l().func,valueContainer:l().func}),TextFieldProps:l().object,getOptions:l().func,menuPlacement:l().string,menuPortalTarget:l().object,getOptionValue:l().func,isSearchable:l().bool};const S=P},51229:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(24328),a=n.n(r);const o=()=>a().createElement("div",{style:{flex:1}})},85451:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(24328),a=n.n(r),o=n(52730),l=n(87918),i=n.n(l),c=n(17440),s=n(71153),u=n.n(s),p=n(94079),d=n(92575),f=n(96808),m=n(99493),E=n(87638),h=n(79692);function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){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 b={input:e=>g({},e,{fontSize:"14px"}),loadingMessage:e=>g({},e,{fontSize:"14px"}),menuPortal:e=>g({},e,{zIndex:1300})},y=(0,h.Z)({root:{flex:1},title:{paddingBottom:"10px",paddingLeft:"5px",fontSize:"14px"},dropDownInput:{width:"100%",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.03)",borderTop:"4px"},option:{fontSize:"14px",height:"32px"}}),v=e=>{let{selectedUsers:t,onChange:n,className:l,disableUnderline:s}=e;const h=y(),g=e=>({value:e,label:e}),O=e=>e.map(g),v=(0,o.useSelector)(E.ZP.selectors.getTenant),T=(0,o.useSelector)(E.ZP.selectors.getServicesPath),I=(0,r.useRef)();return a().createElement("div",{className:u()(h.root,l)},a().createElement(p.Typography,{className:h.title,variant:"subtitle1"},i().text("User")),a().createElement(d.Z,{value:O(t),onChange:(0,c.pipe)((0,c.defaultTo)([]),(0,c.pluck)("value"),n),defaultOptions:!0,getOptions:e=>(I.current||(I.current=(0,m.kz_)({tenant:v,servicesPath:T})),I.current.then((0,c.pipe)((0,c.prop)("array"),(0,c.pluck)("username"),(e=>t=>e?t.filter((t=>m.P6Y.strings.search(t,e))):t)(e),O))),TextFieldProps:{InputProps:{disableUnderline:s},className:h.dropDownInput},components:{DropdownIndicator:f.Z},styles:b,classes:h,menuPortalTarget:document.body}))}},63072:(e,t,n)=>{n.d(t,{b:()=>l});var r=n(24328),a=n(99493),o=n(56764);const l=e=>{let{filter:t,max:n,offset:l,entityUri:i}=e;return(0,r.useCallback)((async()=>{const e=(0,o.U)(t),r=await(0,a.k6v)({filter:e,max:n,offset:l,entityUri:i}),{total:c}=await(0,a.FEC)({filter:e,entityUri:i});return{data:r,total:c}}),[t,n,l,i])}},31537:(e,t,n)=>{let r;n.d(t,{I:()=>r}),function(e){e.MODEL_UPDATED="MODEL_UPDATED",e.ENTITY_REMOVED="ENTITY_REMOVED",e.ENTITY_CREATED="ENTITY_CREATED",e.ENTITY_CHANGED="ENTITY_CHANGED",e.ENTITIES_MERGED="ENTITIES_MERGED",e.ENTITIES_SPLITTED="ENTITIES_SPLITTED",e.ENTITY_LOST_MERGE="ENTITY_LOST_MERGE",e.RELATIONSHIP_CREATED="RELATIONSHIP_CREATED",e.RELATIONSHIP_REMOVED="RELATIONSHIP_REMOVED",e.RELATIONSHIP_CHANGED="RELATIONSHIP_CHANGED",e.POTENTIAL_MATCHES_FOUND="POTENTIAL_MATCHES_FOUND",e.NOT_MATCHES_SET="NOT_MATCHES_SET",e.NOT_MATCHES_RESET="NOT_MATCHES_RESET",e.PERIODIC_TASK_SCHEDULED="PERIODIC_TASK_SCHEDULED",e.ENTITIES_MERGED_MANUALLY="ENTITIES_MERGED_MANUALLY",e.POTENTIAL_MATCHES_REMOVED="POTENTIAL_MATCHES_REMOVED",e.ENTITIES_MERGED_ON_THE_FLY="ENTITIES_MERGED_ON_THE_FLY",e.USER_LOGIN="USER_LOGIN",e.USER_LOGOUT="USER_LOGOUT",e.USER_SEARCH="USER_SEARCH",e.USER_PROFILE_VIEW="USER_PROFILE_VIEW",e.COMMENT_ADDED="COMMENT_ADDED",e.COMMENT_UPDATED="COMMENT_UPDATED",e.COMMENT_DELETED="COMMENT_DELETED",e.ANALYTICS_ATTRIBUTES_CHANGED="ANALYTICS_ATTRIBUTES_CHANGED",e.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE="SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE",e.GROUP_CREATED="GROUP_CREATED",e.GROUP_REMOVED="GROUP_REMOVED",e.GROUP_CHANGED="GROUP_CHANGED"}(r||(r={}))},34606:(e,t,n)=>{n.d(t,{te:()=>s,VV:()=>u,rx:()=>p,_V:()=>d,Xr:()=>f});var r=n(17440),a=n(87918),o=n.n(a),l=n(31537);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c=(0,r.path)(["data","type"]),s=e=>{const{items:t,label:n}=e,[r]=t||[];return c(r)||n},u=(0,r.pipe)(s,(e=>(0,r.pipe)(r.values,(0,r.includes)(e))(l.I))),p=e=>(0,r.pipe)((0,r.propOr)([],"items"),(0,r.groupBy)(c),r.values,(0,r.ifElse)((e=>{let{length:t}=e;return t>1}),(0,r.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},e,{items:t,itemsTotal:t.length}))),(()=>[e])))(e),d=e=>(0,r.isNil)(e)?"":"string"==typeof e?e:Array.isArray(e)?e.map(d).join(", "):(0,r.is)(Object,e)?d("value"in e?e.value:Object.values(e)):e.toString(),f=e=>({[l.I.COMMENT_ADDED]:o().text("Comment added"),[l.I.COMMENT_DELETED]:o().text("Comment deleted"),[l.I.COMMENT_UPDATED]:o().text("Comment updated"),[l.I.ENTITIES_MERGED]:o().text("Profile merged"),[l.I.ENTITIES_MERGED_MANUALLY]:o().text("Profile merged manually"),[l.I.ENTITIES_MERGED_ON_THE_FLY]:o().text("Profile merged on the fly"),[l.I.ENTITIES_SPLITTED]:o().text("Profile un-merged"),[l.I.ENTITY_CHANGED]:o().text("Profile updated"),[l.I.ENTITY_CREATED]:o().text("Profile created"),[l.I.ENTITY_LOST_MERGE]:o().text("Profile lost merge"),[l.I.ENTITY_REMOVED]:o().text("Profile removed"),[l.I.GROUP_CHANGED]:o().text("Group updated"),[l.I.GROUP_CREATED]:o().text("Group created"),[l.I.GROUP_REMOVED]:o().text("Group removed"),[l.I.MODEL_UPDATED]:o().text("Model was updated"),[l.I.NOT_MATCHES_RESET]:o().text("Not matches reset"),[l.I.NOT_MATCHES_SET]:o().text("Not matches set"),[l.I.PERIODIC_TASK_SCHEDULED]:o().text("Periodic task was scheduled"),[l.I.POTENTIAL_MATCHES_FOUND]:o().text("Potential matches found"),[l.I.POTENTIAL_MATCHES_REMOVED]:o().text("Potential matches removed"),[l.I.RELATIONSHIP_CHANGED]:o().text("Relationship updated"),[l.I.RELATIONSHIP_CREATED]:o().text("Relationship created"),[l.I.RELATIONSHIP_REMOVED]:o().text("Relationship removed"),[l.I.USER_LOGIN]:o().text("Logged in"),[l.I.USER_LOGOUT]:o().text("Logged out"),[l.I.USER_PROFILE_VIEW]:o().text("Profile viewed"),[l.I.USER_SEARCH]:o().text("Searched"),[l.I.ANALYTICS_ATTRIBUTES_CHANGED]:o().text("Analytics attribute changed"),[l.I.SFDC_CONNECTOR_SYNCHRONIZATION_ISSUE]:o().text("SFDC connector synchronization issue")}[e]||"")},96808:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(13980),a=n.n(r),o=n(24328),l=n.n(o),i=n(71153),c=n.n(i),s=n(10161),u=n(83543),p=n(22385);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}const f=e=>{const{selectProps:{classes:t,menuIsOpen:n},innerProps:r}=e,a=(0,s.m)();return l().createElement(p.Z,d({},r,{icon:u.Z,className:t.dropdownIndicator,size:"L",iconClassName:c()({[a.expanded]:n})}))};f.propTypes={innerProps:a().object.isRequired,selectProps:a().shape({classes:a().shape({dropdownIndicator:a().string}).isRequired,menuIsOpen:a().bool.isRequired}).isRequired};const m=f},51843:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(24328),a=n.n(r),o=n(95038),l=n.n(o),i=n(87918),c=n.n(i),s=n(17440),u=n(99493),p=n(94079),d=n(96808),f=n(37699);const m=(0,n(79692).Z)({root:{flex:1},dropdownIndicator:{transition:"transform .15s ease"},inputRoot:{fontSize:"14px",height:46},input:{padding:"0 12px 0"},dateOptionLabel:{minWidth:"100px"},paper:{minWidth:"112px"}}),E=l().localeData().longDateFormat("L"),h=e=>{let{values:t,onChange:n,onFocus:o}=e;const l=E,i=(0,r.useRef)(null),[h,g]=(0,r.useState)(!1),O=m(),b=(0,r.useCallback)((()=>{g((e=>!e)),o()}),[o]),y=()=>{g(!1)};return a().createElement("div",{className:O.root},a().createElement(p.TextField,{fullWidth:!0,value:t.map((e=>((e,t)=>(0,s.isNil)(e)?`${t}`:`${(0,u.mB6)({dataTypeDefinition:{type:u.oS0.TYPE_ACTIVENESS_DATE}},e)}`)(e,l))).join(" — "),onClick:b,variant:"filled",ref:i,InputProps:{endAdornment:a().createElement(d.Z,{selectProps:{classes:O,menuIsOpen:h},innerProps:{}}),disableUnderline:(0,s.isNil)(t),readOnly:!0,classes:{root:O.inputRoot,input:O.input}},InputLabelProps:{shrink:!1},placeholder:c().text(`${l} — ${l}`)}),a().createElement(p.Menu,{variant:"menu",open:h,autoFocus:!1,classes:{paper:O.paper},anchorEl:i.current,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},elevation:2,getContentAnchorEl:null,MenuListProps:{autoFocusItem:h,style:{width:"100%"}}},a().createElement(f.Z,{values:t,onCancel:y,onApply:e=>{n(e),g(!1)},type:u.oS0.TYPE_ACTIVENESS_DATE})))}},67885:(e,t,n)=>{let r,a;n.d(t,{K:()=>r,o:()=>a}),function(e){e.WITHIN="within",e.AGO="ago",e.BETWEEN="between"}(r||(r={})),function(e){e.INIT="init",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(a||(a={}))},24489:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var r=n(8598),a=n(36138),o=n(22664),l=n(39450),i=n(585),c=n(24328),s=n.n(c),u=n(52730),p=n(44443),d=n(67885),f=n(6230),m=n(2256),E=n(88234),h=n(10237),g=n(92778),O=n(4094),b=n(93438),y=n(87638),v=n(99493),T=n(87918),I=n.n(T),x=n(17440),R=n(67218),P=n(63072),S=n(94079),C=n(43266);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 N=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(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)&&(a[n]=e[n])}return a}(e,["styles"]);return s().createElement("svg",M({width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),s().createElement("mask",{id:"svg2440373321a",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"88",height:"88"},s().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#fff"})),s().createElement("g",{mask:"url(#svg2440373321a)"},s().createElement("path",{d:"M44 88c24.3 0 44-19.7 44-44S68.3 0 44 0 0 19.7 0 44s19.7 44 44 44z",fill:"#CAC4D5",fillOpacity:".3"}),s().createElement("path",{opacity:".3",fillRule:"evenodd",clipRule:"evenodd",d:"M19.987 6.73l49.449 6.072a.687.687 0 01.596.767l-7.845 63.888a.688.688 0 01-.766.6L7.214 71.4a.688.688 0 01-.599-.763l.408-3.326L19.987 6.73z",fill:"#fff"}),s().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M1.267 25.921l45.86-19.466a.687.687 0 01.9.366l25.15 59.251a.61.61 0 01-.386.84L22.34 82.765a.719.719 0 01-.887-.445l-20.185-56.4z",fill:"#fff"}),s().createElement("path",{d:"M65.631 9.23H11.017a.688.688 0 00-.687.687v64.37c0 .38.307.687.687.687h54.614c.38 0 .688-.308.688-.687V9.917a.688.688 0 00-.688-.688z",fill:"#F9F9F9"}),s().createElement("path",{opacity:".1",fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.95l3.105-1.666 7.31-4.025 8.852 3.472 7.89-5.223 8.036-2.628 8.113 5.193 3.352-10.255v16.967H14.935l-.05-1.835z",fill:"#9C6CF0"}),s().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 32.331l3.105-3.761 7.31 4.31 8.852 1.656 7.89-2.205 8.036 1.827 8.113-12.643 3.352.742V36.36H14.935l-.05-4.029z",fill:"#FA82AA"}),s().createElement("path",{opacity:".2",fillRule:"evenodd",clipRule:"evenodd",d:"M14.885 34.946l3.105.432 7.31 1.01 8.852-5.117 7.89 3.675 8.036 1.839 8.113-1.839 3.352.811v1.028H14.935l-.05-1.839z",fill:"#4DBEE9"}),s().createElement("path",{opacity:".1",fillRule:"evenodd",clipRule:"evenodd",d:"M61.543 35.288l-.05 1.497H14.885v-5.239l3.352-.276 8.114 4.697 8.036-.679 7.889.82 8.852-.616 7.31-1.601 3.105 1.397z",fill:"#4DBEE9"}),s().createElement("path",{d:"M21.036 40.178h-5.09a.636.636 0 000 1.272h5.09a.636.636 0 100-1.272z",fill:"#ACACAC"}),s().createElement("path",{opacity:".3",fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM25.914 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM39.91 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM21.248 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272zM35.245 55.872c.703 0 1.273.57 1.273 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM30.58 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.272 1.272 0 11-2.545 0V57.144c0-.702.57-1.272 1.272-1.272zM44.577 55.872c.702 0 1.272.57 1.272 1.273V69.02a1.273 1.273 0 01-2.545 0V57.144c0-.702.57-1.272 1.273-1.272z",fill:"#BDBDBD"}),s().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.272-1.273zM25.914 62.658c.702 0 1.272.57 1.272 1.273v5.09a1.272 1.272 0 11-2.545 0v-5.09c0-.703.57-1.273 1.273-1.273zM39.91 65.628c.703 0 1.273.57 1.273 1.272v2.121a1.272 1.272 0 11-2.545 0v-2.12c0-.703.57-1.273 1.273-1.273zM21.248 66.477c.702 0 1.272.57 1.272 1.272v1.273a1.273 1.273 0 01-2.545 0v-1.273c0-.703.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),s().createElement("path",{d:"M36.518 65.628a1.272 1.272 0 00-2.545 0v3.393a1.272 1.272 0 102.545 0v-3.393zM31.852 62.234a1.272 1.272 0 10-2.545 0v6.787a1.272 1.272 0 102.545 0v-6.787z",fill:"#4DBEE9"}),s().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.577 60.962c.702 0 1.272.57 1.272 1.272v6.787a1.273 1.273 0 01-2.545 0v-6.787c0-.702.57-1.272 1.273-1.272z",fill:"#4DBEE9"}),s().createElement("path",{d:"M18.915 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#9C6CF0"}),s().createElement("path",{opacity:".5",d:"M34.185 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),s().createElement("path",{opacity:".3",d:"M49.454 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),s().createElement("path",{opacity:".8",d:"M26.55 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#FB6597"}),s().createElement("path",{d:"M41.82 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),s().createElement("path",{opacity:".2",d:"M57.09 18.546a1.909 1.909 0 100-3.817 1.909 1.909 0 000 3.817z",fill:"#4DBEE9"}),s().createElement("path",{opacity:".5",fillRule:"evenodd",clipRule:"evenodd",d:"M16.582 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM31.851 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 110-.849zM47.121 19.818h4.666a.424.424 0 010 .849h-4.666a.424.424 0 010-.849zM24.217 19.818h4.665a.424.424 0 010 .849h-4.665a.424.424 0 010-.849zM39.486 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849zM54.756 19.818h4.666a.424.424 0 110 .849h-4.666a.424.424 0 110-.849z",fill:"#ACACAC"}),s().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.946 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM15.946 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM15.946 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM23.58 43.571h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 010-1.273zM23.58 46.116h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 010-1.273zM23.58 48.661h5.09a.636.636 0 010 1.273h-5.09a.636.636 0 110-1.273zM49.454 43.571h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 46.116h11.028a.636.636 0 010 1.273H49.454a.636.636 0 010-1.273zM49.454 48.661h11.028a.636.636 0 010 1.273H49.454a.636.636 0 110-1.273zM31.215 43.571h15.27a.636.636 0 110 1.273h-15.27a.636.636 0 010-1.273zM31.215 46.116h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM31.215 48.661h15.27a.636.636 0 010 1.273h-15.27a.636.636 0 010-1.273zM15.946 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM23.58 51.206h5.09a.636.636 0 110 1.272h-5.09a.636.636 0 110-1.272zM49.454 51.206h11.028a.636.636 0 010 1.272H49.454a.636.636 0 110-1.272zM31.215 51.206h15.27a.636.636 0 110 1.272h-15.27a.636.636 0 010-1.272z",fill:"#E9E9E9"}),s().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 55.872h5.09a.636.636 0 110 1.273h-5.09a.636.636 0 110-1.273z",fill:"#ACACAC"}),s().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.878 59.69h11.029a.636.636 0 010 1.272H49.878a.636.636 0 110-1.273zM49.878 62.234h11.029a.636.636 0 010 1.273H49.878a.636.636 0 010-1.273zM49.878 64.78h11.029a.636.636 0 010 1.272H49.878a.636.636 0 010-1.273z",fill:"#E9E9E9"}),s().createElement("path",{d:"M54.968 67.324h-5.09a.636.636 0 000 1.273h5.09a.636.636 0 000-1.273z",fill:"#E9E9E9"}),s().createElement("g",{filter:"url(#filter0_d)"},s().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#000"})),s().createElement("path",{d:"M57.406 74.25c9.493 0 17.188-7.695 17.188-17.188 0-9.492-7.695-17.187-17.188-17.187-9.492 0-17.187 7.695-17.187 17.188 0 9.492 7.695 17.187 17.187 17.187z",fill:"#F25252"}),s().createElement("path",{opacity:".15",fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 34.719c12.34 0 22.344 10.003 22.344 22.343S69.746 79.406 57.406 79.406c-12.34 0-22.343-10.003-22.343-22.344 0-12.34 10.003-22.343 22.343-22.343zm-.172 2.406c-10.916 0-19.765 8.85-19.765 19.766 0 10.916 8.85 19.765 19.765 19.765C68.151 76.656 77 67.806 77 56.891c0-10.917-8.85-19.766-19.766-19.766z",fill:"#F25252"}),s().createElement("path",{opacity:".3",fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 38.844c10.062 0 18.219 8.157 18.219 18.218 0 10.062-8.157 18.22-18.219 18.22-10.062 0-18.218-8.158-18.218-18.22 0-10.061 8.156-18.218 18.218-18.218zm0 2.043c-8.933 0-16.175 7.242-16.175 16.175 0 8.934 7.242 16.176 16.175 16.176 8.934 0 16.176-7.242 16.176-16.175 0-8.934-7.242-16.176-16.176-16.176z",fill:"#F25252"}),s().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M57.406 26.469C74.303 26.469 88 40.166 88 57.062c0 16.897-13.697 30.594-30.594 30.594-16.896 0-30.593-13.697-30.593-30.594 0-16.896 13.697-30.593 30.593-30.593zm-.172 3.437c-14.903 0-26.984 12.082-26.984 26.985 0 14.903 12.081 26.984 26.984 26.984 14.903 0 26.985-12.081 26.985-26.984 0-14.903-12.082-26.985-26.985-26.985z",fill:"#F25252"}),s().createElement("path",{d:"M57.406 71.844c8.164 0 14.782-6.618 14.782-14.781 0-8.164-6.618-14.782-14.782-14.782-8.163 0-14.781 6.618-14.781 14.782 0 8.163 6.618 14.78 14.781 14.78z",fill:"#FF6A6A"}),s().createElement("path",{opacity:".05",fillRule:"evenodd",clipRule:"evenodd",d:"M58.298 46.448L75.18 63.331l-9.114 12.078h-2.029l-7.582-7.582 1.006-3.178.837-18.2z",fill:"url(#paint0_linear)"}),s().createElement("g",{filter:"url(#filter1_d)"},s().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#000"})),s().createElement("path",{d:"M57.406 68.063a1.719 1.719 0 100-3.438 1.719 1.719 0 000 3.438z",fill:"#fff"}),s().createElement("g",{filter:"url(#filter2_d)"},s().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#000"})),s().createElement("path",{d:"M57.406 46.063c.95 0 1.719.769 1.719 1.718v12.375a1.719 1.719 0 11-3.438 0V47.781c0-.949.77-1.718 1.72-1.718z",fill:"#fff"})),s().createElement("defs",null,s().createElement("filter",{id:"filter0_d",x:"36.219",y:"37.875",width:"42.375",height:"42.375",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},s().createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),s().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),s().createElement("feOffset",{dy:"2"}),s().createElement("feGaussianBlur",{stdDeviation:"2"}),s().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),s().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),s().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),s().createElement("filter",{id:"filter1_d",x:"51.688",y:"62.625",width:"11.438",height:"11.438",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},s().createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),s().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),s().createElement("feOffset",{dy:"2"}),s().createElement("feGaussianBlur",{stdDeviation:"2"}),s().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),s().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),s().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),s().createElement("filter",{id:"filter2_d",x:"51.688",y:"44.063",width:"11.438",height:"23.813",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},s().createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),s().createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),s().createElement("feOffset",{dy:"2"}),s().createElement("feGaussianBlur",{stdDeviation:"2"}),s().createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),s().createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),s().createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),s().createElement("linearGradient",{id:"paint0_linear",x1:"68.438",y1:"71.571",x2:"60.119",y2:"58.801",gradientUnits:"userSpaceOnUse"},s().createElement("stop",{stopOpacity:"0"}),s().createElement("stop",{offset:"1"}))))};var _=n(79692);const D=(0,_.Z)((e=>({errorContainer:e=>{let{height:t}=e;return{height:t?`${t}px`:"auto",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",color:"rgba(0, 0, 0, 0.54)"}},errorIcon:{height:"88px",width:"88px",marginBottom:"20px",paddingTop:"36px"},refreshButton:{color:e.palette.primary.main,marginTop:"10px"},refreshIcon:{width:"24px",height:"24px"}}))),w=e=>{let{height:t,onRefresh:n,message:r}=e;const a=D({height:t});return s().createElement("div",{className:a.errorContainer},s().createElement(N,{className:a.errorIcon}),s().createElement(S.Typography,null,r),n&&s().createElement(S.Button,{className:a.refreshButton,startIcon:s().createElement(C.Z,{color:"primary",className:a.refreshIcon}),onClick:n},s().createElement(S.Typography,{variant:"button"},I().text("Refresh"))))},A=(0,_.Z)({loader:{width:"100%",top:0,left:0,position:"absolute",borderRadius:"2px"}}),z=()=>{const e=A();return s().createElement(S.LinearProgress,{color:"secondary",className:e.loader})},L=[10,25,50,100],[j]=L,H=(0,_.Z)((()=>({viewContent:{overflow:"hidden",position:"relative",fontFamily:"Roboto, Helvetica, Arial, sans-serif",padding:"4px 17px 24px",display:"flex",flexDirection:"column"},activityLog:{flex:1,overflowY:"auto"},headerRoot:{lineHeight:"23px",minHeight:38,borderBottom:"1px solid rgba(0,0,0,0.12)"},headerTitle:{fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px"},basicView:{top:0,bottom:0,left:0,right:0,display:"flex",alignItems:"stretch",height:"100%"}}))),U=(0,c.memo)((e=>{let{config:t}=e;const[n,r]=(0,c.useState)(0),{exportTypes:a,caption:o}=t,l=H(),i=(0,u.useSelector)(y.ZP.selectors.getMetadata),T=(0,u.useSelector)(y.ZP.selectors.getEntity),S=(0,v.nt9)(i,null==T?void 0:T.type),C=null==T?void 0:T.uri,[M,N]=(0,c.useState)(j),_=(0,c.useMemo)((()=>{return e=j,L.filter((t=>t!==e)).concat(e).sort(x.subtract);var e}),[]),[D,A]=(0,c.useState)({users:[],activities:[],attributes:[],sources:[],dateRange:{type:d.K.WITHIN,period:[4,"months"]}}),{state:U,data:Z,total:F,reload:k}=(e=>{let{filter:t,max:n,offset:r,entityUri:a}=e;const[o,l]=(0,c.useState)([]),[i,s]=(0,c.useState)(0),[u,p]=(0,c.useState)(d.o.INIT),f=(0,R._)(),m=e=>{console.error(e),p(d.o.ERROR),l([]),s(0)},E=(0,P.b)({filter:t,max:n,offset:r,entityUri:a}),h=(0,c.useCallback)((()=>{if(!a)return;p(d.o.LOADING);const e=(0,x.pipe)(E,f,(0,x.andThen)((e=>{let{data:t,total:n}=e;p(d.o.LOADED),l(t),s(n)})),(0,x.otherwise)(m));e()}),[E]),g=()=>{try{h()}catch(e){m(e)}};return(0,c.useEffect)((()=>{g()}),[h]),{state:u,data:o,total:i,reload:g}})({filter:D,max:M,offset:n*M,entityUri:C}),G=(0,c.useCallback)((e=>{A(e),r(0)}),[]);return s().createElement(h.Z,{className:l.basicView},s().createElement(g.Z,{title:o||I().text("Activity Log"),classes:{root:l.headerRoot,title:l.headerTitle}}),s().createElement(O.Z,{className:l.viewContent},s().createElement(b.Z,{value:D,onChange:G,entityType:S,entityUri:C,exportTypes:a}),(()=>{switch(U){case d.o.LOADED:return Z&&0!==Z.length?s().createElement(m.Z,{error:s().createElement(w,{message:I().text("Something went wrong")})},s().createElement("div",{className:l.activityLog},s().createElement(p.Z,{handleHeight:!0},(e=>{let{width:t=0,height:a=0}=e;return s().createElement(E.Z,{width:t,height:a+3,activities:Z,count:F,page:n,onChangePage:r,rowsPerPage:M,onChangeRowsPerPage:N,rowsPerPageOptions:_})})))):s().createElement(f.J,null);case d.o.LOADING:return s().createElement(z,null);case d.o.ERROR:return s().createElement(w,{message:I().text("Error Loading Data"),onRefresh:k});default:return s().createElement("div",null,"Loading...")}})()))})),Z=(0,a.createGenerateClassName)({productionPrefix:"profileActivityLog",disableGlobal:!0}),F=e=>{let{config:t,store:n,onResize:c}=e;return s().createElement(u.Provider,{store:n},s().createElement(l.m.Provider,{value:t.id},s().createElement(a.StylesProvider,{generateClassName:Z},s().createElement(o.MuiPickersUtilsProvider,{utils:r.Z},s().createElement(p.Z,{handleHeight:!0,onResize:(e,t)=>null==c?void 0:c(Math.floor(e),Math.floor(t))}),s().createElement(U,{config:t}),s().createElement(i.Z,null)))))}}}]);
|
package/6719.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6719],{36444:(t,e,n)=>{"use strict";var o=n(14859);e.Z=void 0;var r=o(n(24328)),i=(0,o(n(50175)).default)(r.default.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList");e.Z=i},98357:(t,e,n)=>{var o="Expected a function",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,f=u||p||Function("return this")(),s=Object.prototype.toString,m=Math.max,h=Math.min,d=function(){return f.Date.now()};function v(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==s.call(t)}(t))return NaN;if(v(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=v(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var n=a.test(t);return n||l.test(t)?c(t.slice(2),n?2:8):i.test(t)?NaN:+t}t.exports=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(o);return v(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),function(t,e,n){var r,i,a,l,c,u,p=0,f=!1,s=!1,g=!0;if("function"!=typeof t)throw new TypeError(o);function w(e){var n=r,o=i;return r=i=void 0,p=e,l=t.apply(o,n)}function b(t){return p=t,c=setTimeout(_,e),f?w(t):l}function S(t){var n=t-u;return void 0===u||n>=e||n<0||s&&t-p>=a}function _(){var t=d();if(S(t))return U(t);c=setTimeout(_,function(t){var n=e-(t-u);return s?h(n,a-(t-p)):n}(t))}function U(t){return c=void 0,g&&r?w(t):(r=i=void 0,l)}function W(){var t=d(),n=S(t);if(r=arguments,i=this,u=t,n){if(void 0===c)return b(u);if(s)return c=setTimeout(_,e),w(u)}return void 0===c&&(c=setTimeout(_,e)),l}return e=y(e)||0,v(n)&&(f=!!n.leading,a=(s="maxWait"in n)?m(y(n.maxWait)||0,e):a,g="trailing"in n?!!n.trailing:g),W.cancel=function(){void 0!==c&&clearTimeout(c),p=0,r=u=i=c=void 0},W.flush=function(){return void 0===c?l:U(d())},W}(t,e,{leading:r,maxWait:e,trailing:i})}},9057:function(t,e,n){var o=n(34406);(function(){var e,n,r,i,a,l;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=o&&o.hrtime?(t.exports=function(){return(e()-a)/1e6},n=o.hrtime,i=(e=function(){var t;return 1e9*(t=n())[0]+t[1]})(),l=1e9*o.uptime(),a=i-l):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},23493:(t,e,n)=>{for(var o=n(9057),r="undefined"==typeof window?n.g:window,i=["moz","webkit"],a="AnimationFrame",l=r["request"+a],c=r["cancel"+a]||r["cancelRequest"+a],u=0;!l&&u<i.length;u++)l=r[i[u]+"Request"+a],c=r[i[u]+"Cancel"+a]||r[i[u]+"CancelRequest"+a];if(!l||!c){var p=0,f=0,s=[];l=function(t){if(0===s.length){var e=o(),n=Math.max(0,16.666666666666668-(e-p));p=n+e,setTimeout((function(){var t=s.slice(0);s.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(p)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(n))}return s.push({handle:++f,callback:t,cancelled:!1}),f},c=function(t){for(var e=0;e<s.length;e++)s[e].handle===t&&(s[e].cancelled=!0)}}t.exports=function(t){return l.call(r,t)},t.exports.cancel=function(){c.apply(r,arguments)},t.exports.polyfill=function(t){t||(t=r),t.requestAnimationFrame=l,t.cancelAnimationFrame=c}},46847:(t,e,n)=>{"use strict";function o(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=t&&this.setState(t)}function r(t){this.setState(function(e){var n=this.constructor.getDerivedStateFromProps(t,e);return null!=n?n:null}.bind(this))}function i(t,e){try{var n=this.props,o=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function a(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate)return t;var n=null,a=null,l=null;if("function"==typeof e.componentWillMount?n="componentWillMount":"function"==typeof e.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof e.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof e.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof e.componentWillUpdate?l="componentWillUpdate":"function"==typeof e.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==l){var c=t.displayName||t.name,u="function"==typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+c+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof t.getDerivedStateFromProps&&(e.componentWillMount=o,e.componentWillReceiveProps=r),"function"==typeof e.getSnapshotBeforeUpdate){if("function"!=typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var p=e.componentDidUpdate;e.componentDidUpdate=function(t,e,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;p.call(this,t,e,o)}}return t}n.r(e),n.d(e,{polyfill:()=>a}),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0}}]);
|
package/6940.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6940],{16940:(e,t,n)=>{n.d(t,{_:()=>pa,t:()=>Oa});var r=n(24328),o=n.n(r),a=n(52730),l=n(8598),i=n(17440),s=n(36138),c=n(44443),u=n(22664),p=n(39450),d=n(60115),m=n(585),g=n(99493),f=n(87918),b=n.n(f),h=n(3096),y=n.n(h),v=n(87638),x=n(2804),E=n(7718),w=n(3515),C=n(17554),S=n(61756),P=n(57730),O=n(76536),N=n(26481),k=n(49759),Z=n(94150),T=n(26005),R=n(99136),j=n(21077),D=n(67268),I=n(71153),L=n.n(I),A=n(8962);const M=o().createContext(null);M.displayName="SingleAttributeContext";var U=n(60995),z=n(10237),V=n(58662),F=n(94079),H=n(93416),B=n(75512),W=n(30553),q=n(91181),G=n(32152),$=n(36444),_=n(79692);const Q=(0,_.Z)((()=>({triggerButton:{minWidth:0,color:"rgba(0,0,0,0.54)",width:"36px"},popupContent:{paddingTop:"19px",paddingBottom:"23px",paddingLeft:"23px",paddingRight:"23px",maxWidth:"180px",width:"40%"},checkboxControlRoot:{marginTop:"6px",marginLeft:"-12px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"}}))),X=e=>{let{className:t}=e;const n=Q(),a=(0,r.useRef)(),[l,i]=(0,r.useState)(!1),{showInactive:s,toggleShowInactive:c}=(0,r.useContext)(M),u=()=>i((e=>!e));return o().createElement(o().Fragment,null,o().createElement(F.Button,{ref:a,classes:{root:L()(n.triggerButton,t)},onClick:u},o().createElement($.Z,null)),o().createElement(F.Popover,{open:l,classes:{paper:n.popupContent},anchorEl:a.current,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(F.FormControlLabel,{classes:{root:n.checkboxControlRoot,label:n.checkboxControlLabel},control:o().createElement(F.Checkbox,{className:n.checkboxControlCheckbox,checked:s,onChange:e=>c(e.target.checked)}),label:b().text("Show inactive values")})))},Y=(0,_.Z)((()=>({root:{padding:"0 4px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"},ovIcon:{marginTop:"2px",marginLeft:"5px"}}))),K=e=>{let{caption:t,totalVisibleValues:n,showInactiveValuesMenu:a}=e;const l=Y(),{searchQuery:i,setSearchQuery:s,setPage:c,totalNonVisibleValues:u,nonVisibleValues:p,attributeType:d}=(0,r.useContext)(M);return o().createElement(H.Z,{title:b().text(t),className:l.root},o().createElement(B.Z,{widthToHide:500},o().createElement(W.Z,{height:24,margin:16}),o().createElement(F.Typography,{className:l.totalCaption,variant:"caption"},b().number(n)," ",1===n?b().text("item"):b().text("items"))),o().createElement(q.Z,{nonOvTotal:u,className:l.ovIcon,nonOvValues:p,attributeType:d}),o().createElement(G.i,{query:i,onChange:e=>{s(e),c(0)}}),a&&o().createElement(X,null))};var J=n(65549),ee=n(93140),te=n(76134),ne=n(96698);const re=(0,_.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 -16px 8px",backgroundColor:"rgba(0,0,0,0.12)"},ovFalse:e.inactive}))),oe=g.nIW,ae=(e,t)=>"object"==typeof e?Object.values(e).some((e=>e.some((e=>{let{value:n}=e;return ae(n,t)})))):g.P6Y.strings.search(String(e),t),le=async e=>{let{metadata:t,entity:n,attributeTypeUri:r,defaultMaxValues:o=1/0,offset:a=0,searchQuery:l=""}=e;const s=(0,i.pipe)(g.XtP,(0,i.filter)((e=>{let{value:t}=e;return ae(t,l)})))(t,n,r),c=(0,i.filter)(g.OXP,s);return{[(0,g.xy8)(r)]:{[oe(r)]:c.slice(a,a+o),paging:{[r]:{totalOvValues:c.length,totalValues:s.length}}}}};function ie(){return ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ie.apply(this,arguments)}function se(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){ce(e,t,n[t])}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ue=[],pe=e=>{let{values:t,attributeType:n,parentUri:l,showInactive:s}=e;const c=re(),{uri:u,required:d,cardinality:m,name:f}=n,h=(0,a.useDispatch)(),y=(0,r.useContext)(p.m),x=(0,a.useSelector)(v.ZP.selectors.getEntity),E=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,x.uri)||{})),w=(0,a.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,l,n))),C=(0,a.useSelector)((e=>(0,g.tQX)(l,n,v.ZP.selectors.getProfileErrors(e)))),S=(0,a.useSelector)(v.ZP.selectors.getMode),P=(0,g.xy8)(n),O=(0,i.pipe)((0,i.pathOr)(ue,[P,f]),(0,i.map)((0,i.prop)("uri")))(x),N=(0,i.pathOr)(ue,[P,f],E),k=N.map((0,i.prop)("uri")),Z=(0,g.ZiX)(x.uri),T=(0,r.useRef)((0,g.gjI)({parentUri:l,attributeType:n})),R=(0,g.O27)(N),j=d&&R,D=j?[T.current]:N.filter((0,i.pipe)((0,i.prop)("uri"),g.ZiX)),I=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,h)(e.map((e=>se({},e,{viewId:y}))))),[y,h]),A=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.modifyAttribute,h)(se({},e,{viewId:y}))),[y,h]),M=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,h)(se({},e,{viewId:y}))),[y,h]),U=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,h),[h]),z=(0,r.useCallback)((()=>{const e={parentUri:l,attributeType:n};return I(j&&!(0,g.YkM)(n.type)?[e,e]:[e])}),[I,l,n,j]),V=(0,g.Vg3)({attributeType:n,mode:S}),H={attributeType:n,errors:w,crosswalks:E.crosswalks,mode:S,onAddAttributes:I,onChangeAttribute:A,onDeactivateError:U,showNonOv:s};return o().createElement("div",null,o().createElement(ee.Z,{cardinality:m}),o().createElement(te.Z,{message:C}),V&&o().createElement(F.Button,{color:"primary",onClick:z,className:c.moreButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),D.map(((e,t)=>o().createElement(ne.Z,ie({key:e.uri},H,{attributeValue:e,lazy:j&&!d,showEmptyEditors:Z,ownError:(0,g.ADq)(e,t,u,w),onDeleteAttribute:M})))),D.length>0&&t.length>0&&o().createElement(F.Divider,{className:c.divider}),t.map((e=>{const t=N.find((0,i.propEq)("uri",e.uri)),n=t||e,r=O.includes(n.uri)&&!k.includes(n.uri),a=!r&&t&&!((e,t)=>{const n=(0,i.is)(Object,e.value)||(0,i.is)(Object,t.value)?(0,i.over)((0,i.lensPath)(["value"]),(0,g.vKJ)({valueTransformer:(0,i.unless)(g.OXP,(0,i.omit)(["value"])),deleteEmptyComplex:!0})):i.identity;return(0,i.equals)(n(e),n(t))})(t,e),l=(0,i.cond)([[(0,i.always)(r),(0,i.always)("deleted")],[(0,i.always)(a),(0,i.always)("edited")]])();return o().createElement("div",{key:n.uri,className:L()({[c.ovFalse]:!(0,g.OXP)(n)})},o().createElement(ne.Z,ie({},H,{attributeValue:n,ownError:(0,g.ADq)(n,null,u,w),onDeleteAttribute:M,state:l})))})))};var de=n(81303);const me=(0,_.Z)((e=>({ovFalse:e.inactive}))),ge=e=>{let{values:t,attributeType:n,showInactive:r}=e;const a=me();return o().createElement(o().Fragment,null,t.map((e=>o().createElement("div",{key:e.uri,className:L()({[a.ovFalse]:!(0,g.OXP)(e)})},o().createElement(de.Z,{attributeValue:e,attributeType:n,showNonOv:r})))))},fe=(0,_.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"},pagination:{flexGrow:0,flexShrink:0}}))),be=e=>{let{config:t,className:n}=e;const{caption:l,max:i,showInactiveValuesMenu:s}=t,c=fe(),{values:u,totalVisibleValues:p,page:d,setPage:m,isLoading:g,hasPaging:f,attributeType:h,showInactive:y}=(0,r.useContext)(M),x=(0,a.useSelector)(v.ZP.selectors.getEntityUri),E=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),w=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),C=(0,a.useSelector)(v.ZP.selectors.getPivotingAttributes),S=0!==u.length;return o().createElement(U.J.Provider,{value:C},o().createElement(z.Z,{className:L()(c.root,n)},o().createElement(K,{totalVisibleValues:p,caption:l,showInactiveValuesMenu:s}),o().createElement(F.Box,{className:c.content},(()=>{if(g)return o().createElement(R.Z,null);if(h){if(E&&S){const e={values:u,attributeType:h,showInactive:y};return o().createElement(ge,e)}if(w){const e={values:u,attributeType:h,parentUri:x,showInactive:y};return o().createElement(pe,e)}}return o().createElement(F.Typography,{className:c.noData},b().text("No data"))})()),f&&o().createElement(V.Z,{count:p,page:d,rowsPerPage:i,rowsPerPageOptions:[],onChangePage:m,classes:{root:c.pagination}})))};var he=n(67218),ye=n(20562);function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xe=(e,t,n)=>{const{attributeUri:o,max:l=15}=e,s=(0,a.useSelector)(v.ZP.selectors.getMetadata),[c,u]=(0,r.useState)([]),[p,d]=(0,r.useState)(null),[m,f]=(0,r.useState)(!1),b=(0,he._)(),h=(0,r.useRef)(null),y=(0,a.useDispatch)(),x=(0,a.useSelector)(v.ZP.selectors.getApiPath),E=(0,a.useSelector)(v.ZP.selectors.getTenant),w=n?v.ZP.selectors.getEntityWithDiff:v.ZP.selectors.getEntityWithoutDiff,C=(0,a.useSelector)(w),S=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),P=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),O=(0,a.useSelector)(v.ZP.selectors.getHistoryDiff),N=C.uri,k=oe(o),Z=(0,g.xy8)(o);h.current=(0,g.JQy)(C,N,k);const T=(0,r.useMemo)((()=>(0,g.zeJ)(s,o)),[s,o]),{globalFilter:R}=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),{showInactive:j}=t,D=(0,r.useCallback)((()=>{if(T&&(0,g.Uty)(T)&&!(0,g.ZiX)(N)&&(0,g.YOQ)(o)){f(!0);const{page:e,showInactive:n}=t,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["page","showInactive"]),a=(0,g.biM)(C)||P?le:g.KbL;b(a(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){ve(e,t,n[t])}))}return e}({metadata:s,entity:C,apiPath:x,tenant:E,parentUri:N,defaultMaxValues:l,attributeTypeUri:o,offset:l*e,globalFilter:R,options:n?"":void 0},r))).then((e=>{const t=(0,i.path)([Z],e),n=(0,i.pathOr)([],[k],t);P||y(v.N5.actions.processNextPageOfAttributeValues({parentUri:N,attributeTypeUri:o,attributeTypeName:k,values:n})),u(n.map((e=>{var t;return(null===(t=h.current)||void 0===t?void 0:t.find((0,i.propEq)("uri",e.uri)))||e}))),d((0,i.path)(["paging",o],t))})).finally((()=>{f(!1)}))}else u([]),d(null)}),[x,N,E,o,l,s,t,R,T,P,O]);(0,r.useEffect)((()=>{D()}),[D]),(0,ye.D)((()=>{S&&D()}),[S]);const I=(0,i.partition)(g.OXP),[,L]=I(h.current||[]),A=j?[]:L,M=j?"totalValues":"totalOvValues",U=(0,i.ifElse)((0,i.has)(M),(0,i.prop)(M),(0,i.always)(c.length))(p),z=l<U,V=null!=p&&p.totalValues?p.totalValues-U:A.length;return{values:c,isLoading:m,hasPaging:z,totalVisibleValues:U,attributeType:T,totalNonVisibleValues:V,nonVisibleValues:A}};function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var we=n(37152),Ce=n(31274),Se=n(79026),Pe=n(8818),Oe=n(90324),Ne=n(70595);const ke=o().createContext(null);ke.displayName="RelationsViewStateContext";const Ze=(0,_.Z)((e=>({button:{color:e.palette.text.secondary,width:"36px",minWidth:"36px"},popupContent:{padding:"19px 23px"},checkboxControlLabel:{fontSize:"0.85rem"},checkboxControlCheckbox:{marginRight:"5px"},divider:{backgroundColor:"rgba(0,0,0,0.1)",margin:"19px -23px"},title:{marginBottom:"30px"},sortControls:{display:"flex",alignItems:"center"},sortSelectorRoot:{flex:1,padding:"13px 16px",fontSize:"0.85rem"},sortSelectorMenuItem:{fontSize:"0.85rem"},sortOrderButton:{flexShrink:0,margin:"0 8px 0 7px"}}))),Te=e=>{let{className:t}=e;const n=Ze(),a=(0,r.useRef)(),{showInactive:l,toggleShowInactive:i,sortOrder:s,toggleSortOrder:c,sortOption:u,changeSortOption:p,sortOptions:d}=(0,r.useContext)(ke),[m,f]=(0,r.useState)(!1),h=()=>f((e=>!e)),y=!(0,g.O27)(d),v="asc"===s;return o().createElement(o().Fragment,null,o().createElement(F.Button,{ref:a,classes:{root:L()(n.button,t)},onClick:h},o().createElement($.Z,null)),o().createElement(F.Popover,{open:m,classes:{paper:n.popupContent},anchorEl:a.current,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},o().createElement(F.FormControlLabel,{classes:{label:n.checkboxControlLabel},control:o().createElement(F.Checkbox,{className:n.checkboxControlCheckbox,checked:l||!1,onChange:i}),label:b().text("Show inactive Relationships")}),y&&o().createElement(o().Fragment,null,o().createElement(F.Divider,{className:n.divider}),o().createElement(F.Typography,{className:n.title,variant:"h6"},b().text("Sort by")),o().createElement("div",{className:n.sortControls},o().createElement(Se.Z,{entries:d,TextFieldProps:{variant:"filled"},classes:{root:n.sortSelectorRoot,menuItem:n.sortSelectorMenuItem},fullWidth:!0,disableUnderline:!0,value:u,onChange:p,MenuProps:{getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}}}),o().createElement(Pe.k,{tooltipTitle:v?b().text("Ascending"):b().text("Descending"),icon:v?Oe.Z:Ne.Z,onClick:c,className:n.sortOrderButton,size:"L"})))))};Te.displayName="FilterButton";const Re=Te,je=(0,_.Z)({header:{padding:"0 6px 0 16px"},totalCaption:{lineHeight:"19px",fontSize:"14px",letterSpacing:"0.24px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px",justifyContent:"flex-start",paddingTop:"16px",paddingBottom:"13px"}});var De=n(61932),Ie=n(55847);const Le=o().createContext(null);function Ae(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){Me(e,t,n[t])}))}return e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ue=Math.pow(2,31)-1,ze=(0,_.Z)((()=>({tenant:{backgroundColor:"#0000EE",cursor:"pointer",position:"absolute",top:"8px",left:"22px",width:"10px",height:"10px",color:"white",fontSize:"10px",fontWeight:"bold",userSelect:"text",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},button:{position:"relative"},badge:{fontSize:"10px",height:"14px",minWidth:"14px",width:"14px",fontWeight:"bold",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px",top:"4px"}})));var Ve=n(81137);const Fe=e=>{let{label:t}=e;const n=ze();return o().createElement(F.Badge,{classes:{anchorOriginTopRightRectangle:n.badgePosition,badge:n.badge},badgeContent:t},o().createElement(De.Z,null))},He=()=>{const{tenants:e,selectedTenant:t,onConfirmImport:n,onCancelConfirmation:l,onImportClick:i}=(()=>{var e;const t=(0,a.useSelector)(v.ZP.selectors.getDataTenants),n=(0,a.useDispatch)(),{config:o,reloadRelations:l}=(0,r.useContext)(Le),i=(0,a.useSelector)(v.ZP.selectors.getEntityUri),[s,c]=(0,r.useState)([]),[u,p]=(0,r.useState)(null),d=(0,a.useSelector)(v.ZP.selectors.getDtssPath),m=(0,a.useSelector)(v.ZP.selectors.getTenant),f=[Ae({},o.content,{offset:0,max:null!==(e=o.maxDtssImport)&&void 0!==e?e:Ue})],h=(0,r.useCallback)((()=>{c([]),o.importFromDT&&!(0,g.ZiX)(i)&&Promise.all((t||[]).map((e=>(0,g.QXb)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:e.id}).then((t=>{let{hasNonImportedConnections:n}=t;return Ae({},e,{hasNonImportedConnections:n})}))))).then((e=>e.filter((e=>e.hasNonImportedConnections)))).then(c)}),[i,d,m,o,t]),y=(0,r.useCallback)((()=>{(0,g.MOC)({entityUri:i,content:f,dtssPath:d,customerTenant:m,dataTenant:u.id}).then((()=>{l(),h()})).catch((e=>n(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))))),p(null)}),[i,d,m,o,h,l,u,p]);(0,r.useEffect)((()=>{h()}),[h]);const x=(0,r.useCallback)((()=>p(null)),[]),E=(0,r.useCallback)((e=>p(e)),[]);return{tenants:s,selectedTenant:u,onConfirmImport:y,onCancelConfirmation:x,onImportClick:E}})(),s=ze(),c=1===e.length,u=c?0===e[0].label.indexOf("DT:")?e[0].label[3]:e[0].label[0]:e.length;return o().createElement(o().Fragment,null,!!e.length&&o().createElement(o().Fragment,null,c?o().createElement("div",{className:s.button},o().createElement(Pe.k,{size:"L",icon:De.Z,tooltipTitle:b().text("Import connections from ${label}",{label:e[0].label}),onClick:()=>i(e[0])}),o().createElement("div",{className:L()(s.tenant)},u)):o().createElement(Ie.Z,{menuId:"importDT-table-actions",buttonComponent:Pe.k,buttonProps:{tooltipTitle:b().text("Import connections"),size:"L",icon:()=>o().createElement(Fe,{label:u})},menuItems:e.map((e=>({onClick:()=>{i(e)},text:e.label})))}),o().createElement(Ve.Z,{open:!!t,title:b().text("Confirmation"),content:b().text("Import connections from ${label}?",{label:null==t?void 0:t.label}),discardCaption:b().text("Cancel"),saveCaption:b().text("Import"),onDiscard:l,onSave:n})))},Be=e=>{let{title:t,total:n}=e;const a=je(),{searchQuery:l,changeSearchQuery:i}=(0,r.useContext)(ke);return o().createElement(H.Z,{title:t||"",className:a.header},n>0&&o().createElement(B.Z,{widthToHide:400},o().createElement(W.Z,{height:24,margin:16}),o().createElement(F.Typography,{className:a.totalCaption,variant:"caption"},n>1?b().text("${count} items",{count:n}):b().text("${count} item",{count:n}))),o().createElement(G.i,{query:l,onChange:i}),o().createElement(He,null),o().createElement(Re,null))};var We=n(11013),qe=n(27604),Ge=n(22983),$e=n(31254),_e=n(31039);const Qe=(0,_.Z)((e=>({tooltip:e.tooltip,tooltipContent:{minWidth:"165px",padding:"4px 2px 2px"},label:{fontSize:"11px",lineHeight:"13px",fontWeight:500,margin:0,color:"white"},secondaryLabel:{color:"rgba(255, 255, 255, 0.7)",fontSize:"10px",marginTop:"4px",fontWeight:500,lineHeight:"11px"},progress:{marginTop:"4px",color:"#FFFFFF"}})));function Xe(){return Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}const Ye=e=>{let{label:t,entity:n,children:l}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["label","entity","children"]);const c=Qe(),u=(0,he._)(),p=(0,a.useSelector)(v.ZP.selectors.getTenant),d=(0,a.useSelector)(v.ZP.selectors.getDtssPath),[m,f]=(0,r.useState)(!1),[b,h]=(0,r.useState)(null);(0,r.useEffect)((()=>{h(null)}),[n]);const y=(0,r.useCallback)((()=>{if(null!=n&&n.entityUri&&(0,i.isNil)(b)){const e=(0,i.ifElse)(g.biM,(e=>(0,g.vTU)({entityUri:e.entityUri,dataTenant:e.dataTenant,customerTenant:p,dtssPath:d})),(e=>(0,g.XkT)(e.entityUri)));f(!0),u(e(n)).then((e=>{let{secondaryLabel:t}=e;h(t)})).finally((()=>{f(!1)}))}}),[d,n,p,u,b]),x=o().createElement("div",{className:c.tooltipContent},o().createElement("div",{className:c.label},t),m&&o().createElement(F.CircularProgress,{size:16,classes:{colorPrimary:c.progress}}),b&&o().createElement("div",{className:c.secondaryLabel},b));return o().createElement(F.Tooltip,Xe({onOpen:y,title:x,disableFocusListener:!0,classes:{tooltip:c.tooltip}},s),l)},Ke=(e,t)=>{const{entity:n,relation:r}=e;return{entityType:(0,g.nt9)(t,null==n?void 0:n.entityType),entityLabel:(0,g.idV)(null==n?void 0:n.entityLabel),preparedUri:(0,g.wwR)({uri:null==n?void 0:n.entityUri,dataTenant:null==n?void 0:n.dataTenant}),relationLabel:(null==r?void 0:r.relationLabel)||(0,g.Lmx)(t,null==r?void 0:r.relationType)}};var Je=n(77277);const et=(0,_.Z)((()=>({container:{display:"flex"}})));function tt(){return tt=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},tt.apply(this,arguments)}const nt=e=>{let{acceptRelation:t,ignoreRelation:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["acceptRelation","ignoreRelation"]);const a=et();return o().createElement("div",{className:a.container},o().createElement(Je.Z,tt({onClick:t,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Accept")),o().createElement(Je.Z,tt({onClick:n,variant:"text",color:"primary"},r,{style:{alignSelf:"center"}}),b().text("Ignore")))},rt=(0,_.Z)((e=>({container:{display:"flex",flexDirection:"column",marginBottom:"2px"},row:{display:"flex",alignItems:"center",flexDirection:"row",minHeight:"24px",padding:"0 16px"},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},editButtonsContent:{marginLeft:"auto",flex:"0 0 40px"},editButtons:{padding:0},removed:{color:e.palette.text.secondary,textDecoration:"line-through"},editedLabel:{fontStyle:"italic",color:e.palette.text.secondary,margin:"0 5px"}}))),ot=(0,r.memo)((e=>{let{connection:t,metadata:n,showControls:a,onRemoveRelation:l,onEditRelation:i,onAcceptRelation:s,onIgnoreRelation:c,renderRelationArrowButton:u}=e;const p=rt(),{entity:d,relation:m}=t,f=(0,g.$qe)(t),h=(0,g.xr3)(t),y=(0,g.iJH)(t),{entityType:v,entityLabel:x,preparedUri:E,relationLabel:w}=Ke(t,n),C=(0,g.Fn9)(m)&&(0,g.Fn9)(d),{canRemove:S,canUpdate:P}=(e=>{let{metadata:t,mode:n,connection:r,onRemoveRelation:o,onEditRelation:a}=e;if((n===g.ARY.Editing||n===g.ARY.Suggesting)&&r){const{relation:{relationType:e}}=r,l=(0,g.$qe)(r),i=(0,g.V3K)(t,e);return{canRemove:o&&!l&&(0,g.Edd)(n,i),canUpdate:a&&!l&&(0,g.Z5t)(n,i)}}return{canRemove:!1,canUpdate:!1}})({mode:g.ARY.Editing,onRemoveRelation:l,onEditRelation:i,metadata:n,connection:t}),O=(0,r.useCallback)((()=>l(t.relation.relationUri)),[l,t]),N=(0,r.useCallback)((()=>i(t)),[i,t]),k=(0,r.useCallback)((()=>{s(t)}),[s,t]),Z=(0,r.useCallback)((()=>c(t)),[c,t]),T=(S||P)&&a&&!t.suggested?o().createElement(o().Fragment,null,P&&o().createElement(Pe.k,{icon:qe.Z,size:"XS",onClick:N,tooltipTitle:b().text("Edit")}),S&&o().createElement(Pe.k,{icon:Ge.Z,size:"XS",onClick:O,tooltipTitle:b().text("Remove")})):void 0,R=t.suggested?o().createElement(nt,{acceptRelation:k,ignoreRelation:Z,size:"small",disabled:y}):void 0,j=y?b().text("ignored"):b().text("edited");return o().createElement("div",{className:L()(p.container,{[p.rowInactive]:!C},{[p.removed]:f||y})},o().createElement("div",{className:p.row},u&&u(),o().createElement($e.Z,{className:p.entityAvatar,entityType:v}),o().createElement(_e.Z,{value:E,className:p.entityLabelContainer},o().createElement(Ye,{label:x,entity:d},o().createElement("span",{className:p.entityLabel},x)),(h||y)&&o().createElement(F.Typography,{variant:"caption",className:p.editedLabel},"(",j,")"),w&&o().createElement("span",{className:p.relationLabel},`, ${w}`)),o().createElement("div",{className:p.editButtonsContent},T),R))}));ot.displayName="EditableRelationItem";const at=ot,lt=(e,t)=>{const n=(e,t)=>(t?(0,g.VGB)(t):[]).map((t=>({type:t,direction:e===g.Nsj.IN?g.Nsj.IN:g.Nsj.OUT})));return n(g.Nsj.IN,e).concat(n(g.Nsj.OUT,t))[0]};function it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st=n(98989),ct=n(83543);const ut=(0,_.Z)({arrowIcon:{fontSize:"16px",marginRight:"6px"}}),pt=e=>{let{onClick:t,connection:n,config:r,showSecondLevel:a}=e;const l=ut(),{parentEntityUri:i}=n,{contentSecondLevel:s}=r,c={onClick:t,className:l.arrowIcon};return i||!s||(0,g.xvW)(n)?null:a?o().createElement(ct.Z,c):o().createElement(st.Z,c)},dt=(0,_.Z)({row:{display:"flex",alignItems:"center",width:"100%"},secondLevelContent:{paddingLeft:"24px"}}),mt=e=>{let{config:t,connection:n,children:l}=e;const i=dt(),{showInactive:s}=(0,r.useContext)(ke),{connections:c,showSecondLevel:u,toggleShowSecondLevel:p,loadRelations:d,loading:m,total:f}=(e=>{let{config:t,connection:n,relationActivityFilter:o}=e;const l=(0,a.useDispatch)(),[i,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1),[p,d]=(0,r.useState)(0),{contentSecondLevel:m}=t,{entity:f}=n,b=(0,a.useSelector)((e=>v.ZP.selectors.getConnectionsWithDraftsByViewId(e,t.id,f.entityUri)))||[],{activityFilter:h}=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions)||{},y=(0,r.useCallback)((()=>{const e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){it(e,t,n[t])}))}return e}({},m,{returnObjects:!0,returnDates:!0,activeness:{relation:o||g.Ng6.ALL,entity:h}});u(!0),(0,g.N6e)(f.entityUri,[e]).then((e=>{const{connections:n,total:r}=e[0];n&&l(v.N5.relations.actions.secondLevelRelationsLoaded({connections:n,parentEntityUri:f.entityUri,id:t.id})),d(r),u(!1)}))}),[t.id,m,l,f.entityUri,h,o]),x=(0,r.useCallback)((()=>{i||n.connections||y(),s((e=>!e))}),[y,n.connections,i]);return{connections:b,showSecondLevel:i,toggleShowSecondLevel:x,loadRelations:y,loading:c,total:p}})({config:t,connection:n,relationActivityFilter:s?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY}),b=(0,r.useMemo)((()=>(0,g.Px$)(c)),[c]);return o().createElement(o().Fragment,null,l((()=>o().createElement(pt,{onClick:p,connection:n,config:t,showSecondLevel:u}))),u&&o().createElement(Ce.X.Provider,{value:b},o().createElement("div",{className:i.secondLevelContent},o().createElement(qt,{isLoading:m,config:t,loadRelations:d,connections:c,total:f,parentEntityUri:n.entity.entityUri}))))},gt=(0,_.Z)((e=>({moreButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px",marginLeft:"16px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},divider:{margin:"0 0 8px",backgroundColor:"rgba(0,0,0,0.12)"},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),ft=e=>{let{className:t,connections:n=[],config:l,mode:s,noDataText:c,parentEntityUri:u}=e;const p=(0,a.useSelector)(v.ZP.selectors.getMetadata),d=(0,a.useSelector)((e=>v.ZP.selectors.getRelationToAddByViewId(e,l.id))),m=(0,a.useSelector)((e=>v.ZP.selectors.getRelationsToEditByViewId(e,l.id))),f=(0,a.useSelector)(v.ZP.selectors.getEntity),h=(0,a.useSelector)((e=>v.ZP.selectors.getCheckIfCanAddRelations(e,l.content))),y=(0,a.useDispatch)(),x=gt(),E=(0,r.useCallback)((()=>{const e=(0,g.vlo)({config:l,mode:s,metadata:p,parentEntityUri:u});(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y)(e)}),[l,s,p,y,u]),w=(0,r.useCallback)((e=>{y(v.N5.relations.actions.closeRelationEditor(l.id,e)),y(v.N5.relations.actions.removeRelation(l.id,e));const t=n.find((t=>v.N5.relations.selectors.getRelationUriFromConnection(t)===e)),r=v.N5.relations.selectors.getEntityUriFromConnection(t);(0,g.ZiX)(r)&&y(v.N5.modifiedEntities.actions.entityDeleted(r))}),[l,n,y]),C=l.content,S=lt(C.inRelations,C.outRelations),P=(0,r.useCallback)((e=>{const t=(0,i.pipe)((0,i.omit)(["suggested"]),(0,i.evolve)({relation:{relationType:(0,i.always)(S.type),object:(0,i.evolve)({type:(0,i.always)(S.type),attributes:(0,i.always)(null)})}}))(e);y(v.N5.relations.actions.addRelation(l.id,t))}),[y,l,S]),O=(0,r.useCallback)((e=>{y(v.N5.relations.actions.ignoreRelation(l.id,{relationType:S.type,relationDirection:S.direction,entityUri:e.entity.entityUri,relationUri:e.relation.relationUri}))}),[y,l,S]),[N,k]=(0,i.partition)(g.xvW,n),Z=f&&h,T=0===N.length&&0===k.length,R=e=>{var t,n;const r=m.find((t=>{var n,r;return(null==t||null===(n=t.relation)||void 0===n?void 0:n.relationUri)===(null==e||null===(r=e.relation)||void 0===r?void 0:r.relationUri)})),a=!l.allowOnlyCreateNew||(0,g.xvW)(e),c=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(mt,{config:l,connection:e,key:c},(t=>r?o().createElement(We.Z,{connection:r,config:l,mode:s,metadata:p}):o().createElement(at,{renderRelationArrowButton:t,connection:e,metadata:p,showControls:a,onRemoveRelation:w,onEditRelation:(0,i.pipe)(v.N5.relations.actions.openRelationEditor(l.id),y),onAcceptRelation:P,onIgnoreRelation:O})))},j=Z&&(!d||d&&d.parentEntityUri===u),D=d&&d.parentEntityUri===u;return o().createElement("div",{className:t},j&&o().createElement(F.Button,{color:"primary",onClick:E,className:x.moreButton},o().createElement(J.Z,{classes:{root:x.icon}}),o().createElement("div",{className:x.buttonLabel},b().text("Add"))),D&&o().createElement(We.Z,{connection:d,config:l,mode:s,metadata:p}),N.map(R),N.length>0&&k.length>0&&o().createElement(F.Divider,{className:x.divider}),k.map(R),T&&o().createElement(F.Typography,{className:x.noData},c))};var bt=n(19603),ht=n(94646),yt=n(78101),vt=n(80931);const xt=(0,_.Z)((e=>({attributesList:{paddingLeft:"46px",paddingRight:"16px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0}})));function Et(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){wt(e,t,n[t])}))}return e}function wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ct=e=>{let{connection:t,className:n}=e;const l=xt(),{relation:s}=t,c=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),u=(0,a.useSelector)(v.ZP.selectors.getMetadata),p=(0,r.useMemo)((()=>(0,g.xF8)(u,null==s?void 0:s.relationType)),[null==s?void 0:s.relationType,u]),d=(0,r.useMemo)((()=>Et({attributes:Et({},v.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,g.p2l)((null==t?void 0:t.relation)||{}))),[t]),m=(0,r.useMemo)((()=>(0,g.fyF)(p,d)),[p,d]).filter((e=>{let{values:t}=e;return!(0,g.O27)(t)})).length>0,f=(0,r.useMemo)((()=>(0,g.R$r)(d.attributes)),[d]),{getCommentsCount:h}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{!(0,i.isEmpty)(f)&&h(f)}),[h,f]);const y=(0,r.useMemo)((()=>(0,g.wp9)(g.q7e.RELATION,{entityUri:c,connection:t})),[t,c]);return m?o().createElement(yt.A.Provider,{value:y},o().createElement(vt.Z,{className:L()(l.attributesList,n),entity:d,attrTypes:p})):o().createElement("div",{className:L()(l.attributesList,n)},b().text("No attributes"))};var St=n(86602),Pt=n(82726);const Ot=e=>{let{show:t,onToggle:n,className:r}=e;return o().createElement(Pe.k,{className:r,tooltipTitle:t?b().text("Hide attributes of the relationship"):b().text("Show attributes of the relationship"),tooltipPlacement:"bottom-end",size:"XXS",icon:t?St.Z:Pt.Z,onClick:n})},Nt=(0,_.Z)((e=>({container:{display:"flex",flexDirection:"column",paddingBottom:"2px"},row:{display:"flex",alignItems:"flex-start",flexDirection:"row",minHeight:"16px",padding:"3px 16px 0 "},rowInactive:{background:e.inactiveBackground},entityAvatar:{height:"12px",width:"12px",fontSize:"11px",marginRight:"8px"},entityLabelContainer:{textDecoration:"none",cursor:"pointer",paddingRight:"8px",wordBreak:"break-all"},entityLabel:{color:e.palette.primary.main,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},showDetails:{marginLeft:"auto"},attributesList:{paddingLeft:"46px",marginBottom:"10px",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0},suggestedWrapper:{backgroundColor:e.suggested},commentsContainer:{marginLeft:"auto",alignItems:"center","& + $showDetails":{marginLeft:"4px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"},suggestedLabelWrapper:{marginTop:"6px"},labelWrapper:{display:"flex"}}))),kt=(0,r.memo)((e=>{let{connection:t,renderRelationArrowButton:n,acceptRelation:l,ignoreRelation:s}=e;const c=Nt(),u=t.suggested,{entity:p,relation:d}=t,[m,f]=(0,r.useState)(!1),b=(0,a.useSelector)(v.ZP.selectors.getMetadata),{entityType:h,entityLabel:y,preparedUri:x,relationLabel:E}=Ke(t,b),w=(0,g.Fn9)(d)&&(0,g.Fn9)(p),C=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),S=p&&d&&(0,g.wp9)(g.q7e.RELATION,{entityUri:C,connection:t})||[];return o().createElement("div",{className:L()(c.container,{[c.rowInactive]:!w},{[c.suggestedWrapper]:u})},o().createElement("div",{className:L()(c.row,bt.U)},n&&n(),o().createElement("div",{className:L()(c.labelWrapper,{[c.suggestedLabelWrapper]:u})},o().createElement($e.Z,{className:c.entityAvatar,entityType:h}),o().createElement(_e.Z,{value:x,className:c.entityLabelContainer},o().createElement(Ye,{label:y,entity:p},o().createElement("span",{className:c.entityLabel},y)),E&&o().createElement("span",{className:c.relationLabel},`, ${E}`))),o().createElement("div",{className:c.additionalButtonsWrapper},!(0,i.isEmpty)(S)&&o().createElement(ht.Z,{className:c.commentsContainer,uri:(0,g.gjS)(d),relatedObjectUris:S,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),u&&o().createElement(nt,{size:"small",acceptRelation:l(t),ignoreRelation:s(t)}),!u&&o().createElement(Ot,{show:m,onToggle:()=>{f((e=>!e))},className:c.showDetails}))),m&&o().createElement(Ct,{connection:t}))}));kt.displayName="RelationItem";const Zt=kt;var Tt=n(52691),Rt=n(16208);const jt=e=>e.filter((e=>5===e.value)).length,Dt=e=>e.filter((e=>1===e.value)).length,It=e=>0===e.length?"0%":jt(e)/e.length*100+"%",Lt=e=>0===e.length?"0%":Dt(e)/e.length*100+"%",At=(0,_.Z)((e=>({wrapper:{display:"flex",flexDirection:"column",alignItems:"flex-end"},averageRating:{marginBottom:"7px",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"19px",color:e.palette.text.primary},scale:{display:"flex",marginBottom:"6px",width:"128px",height:"4px"},likesScale:{height:"100%",backgroundColor:"#8CC152"},dislikesScale:{height:"100%",backgroundColor:"rgb(255, 112, 112)"},counts:{display:"flex"},likesCount:{marginRight:"32px"},count:{display:"flex",alignItems:"center",color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},icon:{marginRight:"4px",width:"14px",height:"14px",color:"rgba(0,0,0,0.38)"}}))),Mt=e=>{let{ratings:t,className:n}=e;const r=At();return o().createElement("div",{className:L()(r.wrapper,n)},o().createElement(F.Typography,{className:r.averageRating},(e=>(0,i.pipe)((0,i.pluck)("value"),i.mean,(0,i.defaultTo)(0))(e))(t).toFixed(1)),o().createElement("div",{className:r.scale},o().createElement("div",{className:r.likesScale,style:{width:It(t)}}),o().createElement("div",{className:r.dislikesScale,style:{width:Lt(t)}})),o().createElement("div",{className:r.counts},o().createElement("div",{className:L()(r.likesCount,r.count)},o().createElement(Tt.Z,{className:r.icon}),jt(t)),o().createElement("div",{className:r.count},o().createElement(Rt.Z,{className:r.icon}),Dt(t))))},Ut=(0,_.Z)((e=>({wrapper:{display:"flex"},button:{fontSize:"14px",textTransform:"none",color:e.palette.text.secondary},likeButton:{marginLeft:"-12px",marginRight:"8px"},isActive:{color:e.palette.text.primary}}))),zt=e=>{let{ratings:t,onAgree:n,onDisagree:r}=e;const l=Ut(),i=(0,a.useSelector)(v.ZP.selectors.getUserName),s=t.find((e=>{let{user:t}=e;return t===i})),c=[{text:b().text("Has left the practice"),onClick:()=>r(b().text("Has left the practice"))},{text:b().text("Has moved away"),onClick:()=>r(b().text("Has moved away"))},{text:b().text("Has passed away"),onClick:()=>r(b().text("Has passed away"))},{text:b().text("Has retired"),onClick:()=>r(b().text("Has retired"))},{text:b().text("Other"),onClick:()=>r(b().text("Other"))}];return o().createElement("div",{className:l.wrapper},o().createElement(F.Button,{onClick:n,variant:"text",size:"small",className:L()(l.button,l.likeButton,{[l.isActive]:5===(null==s?void 0:s.value)})},"Agree"),o().createElement(Ie.Z,{buttonProps:{endIcon:o().createElement(ct.Z,null),variant:"text",size:"small",className:L()(l.button,{[l.isActive]:1===(null==s?void 0:s.value)})},buttonContent:1===(null==s?void 0:s.value)?s.comment:"Disagree",menuItems:c,menuId:"disagree-dropdown-menu-button"}))},Vt=(0,_.Z)((e=>({wrapper:{padding:"6px 16px 3px"},entityTypeIcon:{marginRight:"16px"},entityLabel:{color:e.palette.primary.main,fontSize:"14px",letterSpacing:0,lineHeight:"16px"},entityLabelContainer:{textDecoration:"none",wordBreak:"break-all"},relationLabel:{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"},ratings:{marginLeft:"auto"},showDetailsButton:{marginLeft:"16px",marginTop:"18px"},relationAttributes:{paddingLeft:"60px"},suggestedWrapper:{padding:"6px 16px 3px",backgroundColor:e.suggested},commentsContainer:{marginTop:"21px","& + $ratings":{marginLeft:"16px"}},additionalButtonsWrapper:{marginLeft:"auto",display:"flex"}}))),Ft=e=>{let{connection:t,loadRelations:n,renderRelationArrowButton:l,acceptRelation:s,ignoreRelation:c}=e;const u=Vt(),p=t.suggested,[d,m]=(0,r.useState)(!1),{entity:f,relation:b}=t,h=(0,a.useSelector)(v.ZP.selectors.getMetadata),{entityLabel:y,entityType:x,preparedUri:E,relationLabel:w}=Ke(t,h),C=(null==b?void 0:b.ratings)||[],S=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant),P=f&&b&&(0,g.wp9)(g.q7e.RELATION,{entityUri:S,connection:t})||[];return o().createElement("div",{className:L()(u.wrapper,{[u.suggestedWrapper]:p})},o().createElement(F.Box,{display:"flex",minHeight:"62px",className:bt.U},o().createElement(F.Box,{display:"flex",alignItems:"flex-start"},o().createElement(F.Box,{display:"flex",alignItems:"center"},l&&l(),o().createElement($e.Z,{entityType:x,className:u.entityTypeIcon})),o().createElement(F.Box,{display:"flex",flexDirection:"column"},o().createElement(_e.Z,{value:E,className:u.entityLabelContainer},o().createElement(Ye,{label:y,entity:f},o().createElement("span",{className:u.entityLabel},y))),w&&o().createElement("span",{className:u.relationLabel},w),!p&&o().createElement(zt,{ratings:C,onAgree:()=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:"",value:5}).then(n)},onDisagree:e=>{(0,g.Buf)(null==b?void 0:b.relationUri,{comment:e,value:1}).then(n)}}))),o().createElement("div",{className:u.additionalButtonsWrapper},!(0,i.isEmpty)(P)&&o().createElement(ht.Z,{className:u.commentsContainer,uri:(0,g.gjS)(b),relatedObjectUris:P,objectType:g.q7e.RELATION,allowOnlyOneComment:!0}),p&&o().createElement(nt,{acceptRelation:s(t),ignoreRelation:c(t)}),!p&&o().createElement(o().Fragment,null,o().createElement(Mt,{ratings:C,className:u.ratings}),o().createElement(Ot,{show:d,onToggle:()=>{m((e=>!e))},className:u.showDetailsButton})))),d&&o().createElement(Ct,{connection:t,className:u.relationAttributes}))},Ht=e=>{let{className:t,connections:n=[],loadRelations:l,config:i,mainEnityUri:s}=e;const{isComplex:c,content:u}=i,{ignoreRelation:p,acceptRelation:d}=((e,t,n)=>{const r=lt(e.inRelations,e.outRelations),o=(0,a.useDispatch)();return{ignoreRelation:e=>()=>{const{entity:a}=e;(0,g.iiD)(n,{relatedEntityUri:a.entityUri,relationType:r.type,relationDirection:r.direction}).then(t).catch((e=>{o(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))},acceptRelation:e=>()=>{const{entity:a,relation:l}=e,{startDate:i,endDate:s}=l,c=r.direction===g.Nsj.IN,u=c?a.entityUri:n,p=c?n:a.entityUri;(0,g.DsR)({startEntityUri:u,endEntityUri:p,relationType:r.type,attributes:null,startDate:i,endDate:s}).then(t).catch((e=>{o(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong"))))}))}}})(u,l,s),m=(0,r.useMemo)((()=>(0,g.w3p)(n)),[n]),{getCommentsCount:f}=(0,r.useContext)(w.h);return(0,r.useEffect)((()=>{f(m)}),[f,m]),o().createElement("div",{className:t},n.map((e=>{var t,n;const r=`${null==e||null===(t=e.relation)||void 0===t?void 0:t.relationUri}-${null==e||null===(n=e.relation)||void 0===n?void 0:n.direction}`;return o().createElement(mt,{config:i,connection:e,key:r},(t=>c?o().createElement(Ft,{loadRelations:l,connection:e,acceptRelation:d,ignoreRelation:p,renderRelationArrowButton:t}):o().createElement(Zt,{acceptRelation:d,ignoreRelation:p,connection:e,renderRelationArrowButton:t})))})))};Ht.displayName="RelationsList";const Bt=Ht,Wt=(0,_.Z)((e=>({list:{paddingTop:"8px",paddingBottom:"10px",overflow:"auto",flexGrow:1},noData:{fontSize:"13px",color:e.palette.text.secondary,padding:"8px 16px"}}))),qt=e=>{let{isLoading:t,config:n,loadRelations:r,connections:l,total:i,parentEntityUri:s}=e;const c=Wt(),{selectors:u}=v.ZP,p=(0,a.useSelector)(u.getEntity),d=(0,a.useSelector)(u.getMode),m=n["text-empty"]||b().text("No data found");return t?o().createElement(R.Z,null):(0,g.KIu)(d)?o().createElement(ft,{connections:l,className:c.list,key:null==p?void 0:p.uri,config:n,mode:d,noDataText:m,parentEntityUri:s}):i>0?o().createElement(Bt,{config:n,loadRelations:r,connections:l,className:c.list,key:null==p?void 0:p.uri,mainEnityUri:p.uri}):o().createElement(F.Typography,{className:c.noData},m)},Gt=(0,_.Z)({container:{flexGrow:1,display:"flex",flexDirection:"column",minHeight:0},content:{position:"relative",display:"flex",flexGrow:1,flexDirection:"column",minHeight:0},pagination:{height:"52px",flexGrow:0,flexShrink:0}}),$t=e=>{let{config:t,className:n}=e;const l=Gt(),{page:s,setPage:c,rowsPerPage:u,sortOrder:p,sortOption:d,showInactive:m,searchQuery:f,changeSearchQuery:b}=(0,r.useContext)(ke),{selectors:h}=v.ZP,y=(0,a.useSelector)((e=>h.getConnectionsWithDraftsByViewId(e,t.id))),x=(0,a.useSelector)(h.getEntity),E=(0,a.useSelector)((e=>h.getTotalByViewId(e,t.id))),w=(0,a.useSelector)(h.getMode),C=(0,r.useMemo)((()=>({order:p,field:d})),[p,d]);(0,r.useEffect)((()=>{b("")}),[null==x?void 0:x.uri]);const S=(0,r.useMemo)((()=>(e=>{const t=g.wSh.fromFalsy(e).map(g.zHo).map((e=>`containsWordStartingWith(entity.label,${e}) or containsWordStartingWith(relation.label,${e})`)).orSome("");return(new g.MEy).addClause(t).build()})(f)),[f]),{isLoading:P,reload:O}=(0,we.a)({sorting:C,filter:S,page:s,rowsPerPage:u,config:t,entity:x,relationActivityFilter:m?g.Ng6.ALL:g.Ng6.ACTIVE_ONLY,mode:w}),N=(0,r.useMemo)((()=>(0,g.Px$)(y)),[y]),k=(0,r.useMemo)((()=>({reloadRelations:O,config:(0,i.pick)(["content","importFromDT","maxDtssImport"],t)})),[O,t]);return o().createElement(Ce.X.Provider,{value:N},o().createElement(z.Z,{className:n},o().createElement("div",{className:l.container},o().createElement(Le.Provider,{value:k},o().createElement(Be,{title:t.caption,total:E})),o().createElement("div",{className:l.content},o().createElement(qt,{isLoading:P,config:t,loadRelations:O,connections:y,total:E}),E>u&&o().createElement(V.Z,{classes:{root:l.pagination},count:E,rowsPerPageOptions:[],rowsPerPage:u,page:s,onChangePage:c})))))};$t.displayName="RelationsView";const _t=o().createContext(null);_t.displayName="SingleAttributeContext";var Qt=n(86361),Xt=n(26180),Yt=n(31276);function Kt(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){Jt(e,t,n[t])}))}return e}function Jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const en="CHANGE_SEARCH_QUERY",tn=Kt({},Xt.ZP.actions,{changeSearchQuery:(0,Yt.zD)(en)}),nn=(e,t)=>t.type===en?Kt({},e,{searchQuery:t.payload,page:0}):Xt.ZP.reducer(e,t);var rn=n(92332),on=n(67353);const an={textDecoration:"line-through",color:"rgba(0,0,0,.54)"},ln=(0,_.Z)((()=>({tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},rowCell:{fontSize:"13px",overflow:"hidden"},"row-cell--sorted":{color:"rgba(0,0,0,0.87)"},"row-cell__buttons-container":{position:"absolute"},"row-cell__buttons-wrapper":{display:"flex",paddingLeft:"10px","& > button":{marginLeft:"-10px",transform:"scale(0.9)"}},headCell:{display:"flex",alignItems:"center",height:"100%",fontSize:"12px"},"row-cell--removed":{pointerEvents:"none","& > div":an}}))),sn=(0,on.Z)((e=>{const t=ln();return o().createElement("div",{className:t.headCell},o().createElement(rn.default,e))}));var cn=n(64091);function un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pn=(0,i.pipe)((0,i.map)((e=>({id:(0,g.Tde)(e.uri),label:e.label,dataTypeDefinition:(0,g.PFL)(e)}))),(0,i.uniqBy)((0,i.prop)("id"))),dn=(0,i.pipe)(g.DK$,pn),mn=(0,i.pipe)((0,i.split)("."),(0,i.slice)(2,1/0)),gn=e=>{if((0,g.vZp)(e)){const t=mn(e);return t.length>1?t.slice(0,-1):null}return null},fn=(0,i.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){un(e,t,n[t])}))}return e}({},e,{sortable:!0,resizable:!0,nestedPath:gn(e.id),headCellRenderer:sn,rowCellValueRenderer:cn.Z})));var bn=n(99341);function hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yn=n(52016),vn=n(1876),xn=n(60894);const En=(0,_.Z)((()=>({header:{padding:"0 4px 0 16px"}}))),wn=e=>{let{title:t,searchQuery:n,onChangeSearchQuery:r,filtersEnabled:a,onToggleFilters:l,columnsData:i,selectedColumns:s,onChangeColumns:c}=e;const u=En();return o().createElement(H.Z,{title:t,className:u.header},o().createElement(G.i,{query:n,onChange:r}),o().createElement(vn.Z,{enabled:a,onClick:l}),o().createElement(W.Z,{height:24,margin:4}),o().createElement(xn.Z,{columnsData:i,selectedColumns:s,onChangeColumns:c}))};function Cn(){return Cn=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},Cn.apply(this,arguments)}const Sn=(0,n(32528).Z)(((e,t)=>{let{deletedUris:n}=e,{rowValue:{value:r}}=t;return{isRemoved:Boolean(n.find((e=>r.uri===e)))}}))((e=>{let{cell:t,CellValueRenderer:n,isRemoved:r,isSorted:a}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["cell","CellValueRenderer","isRemoved","isSorted"]);const i=ln();return o().createElement("div",{className:L()({[i["row-cell--sorted"]]:a,[i["row-cell--removed"]]:r},i.rowCell)},t.values.map(((e,t)=>o().createElement(n,Cn({key:t,value:e},l)))))}));var Pn=n(85709);const On=e=>{let{onEdit:t,onRemove:n}=e;return o().createElement(o().Fragment,null,t&&o().createElement(Pe.k,{tooltipTitle:b().text("Edit"),icon:qe.Z,size:"L",onClick:t}),n&&o().createElement(Pe.k,{tooltipTitle:b().text("Remove"),icon:Ge.Z,size:"L",onClick:n}))};function Nn(){return Nn=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},Nn.apply(this,arguments)}const kn=e=>{let{columnsData:t,values:n,sorting:l,onSort:s,filters:c,onFilter:u,config:p,onEdit:d,onDeleteAttribute:m,deletedUris:f}=e;const b=(0,r.useMemo)((()=>((e,t)=>e.map((e=>(0,i.pipe)((0,i.reduce)(((t,n)=>{let{id:r}=n;return(0,i.assoc)(r,((e,t)=>((e,t)=>(0,i.pipe)((0,i.path)(["value"]),(0,g.tT_)(e))(t))(mn(e),t))(r,e),t)}),{}),(0,i.assoc)("value",e))(t))))(n,t)),[n,t]),h=(0,r.useMemo)((()=>fn(t)),[t]),y=ln(),x=(0,a.useSelector)(v.ZP.selectors.getMode),E=(0,g.KIu)(x),w=(0,a.useSelector)(v.ZP.selectors.getMetadata),C=(0,a.useSelector)(v.ZP.selectors.getEntityUri),S=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,C)||{})),{attributeType:P}=(0,r.useContext)(_t),O=(0,r.useCallback)((e=>o().createElement(Sn,Nn({},e,{isSorted:!!l&&l.field===e.columnData.id}))),[l]),[N,k]=(0,r.useState)(null),{canUpdate:Z,canDelete:T}=(0,yn.l)(),R=(0,r.useMemo)((()=>"number"!=typeof N||!E||f.includes((0,i.pipe)((0,i.path)([N]),(0,i.prop)("uri"))(n))),[N,f,n,E]),j="number"==typeof N&&(D=(0,i.path)([N],n),T(p)&&(0,g.xv5)({attributeType:P,mode:x,attributeValue:D,metadata:w,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,D)}));var D;const I="number"==typeof N&&(e=>Z(p)&&(0,g.yv0)({attributeType:P,mode:x,attributeValue:e,isReltioCrosswalk:(0,g.KVV)(S.crosswalks,e)}))((0,i.path)([N],n)),L=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);I&&d(e)}),[d,N,n,I]),A=(0,r.useCallback)((()=>{const e=(0,i.path)([N],n);if(!j)return;const t={parentUri:C,attributeType:P,uri:e.uri,value:e};m(t),k(null)}),[N,n,m,j,P,C]),M=R||!j&&!I?void 0:o().createElement(On,{onEdit:I?L:void 0,onRemove:j?A:void 0}),U=(0,r.useMemo)((()=>({deletedUris:f})),[f]);return o().createElement("div",{className:y.tableContainer},o().createElement(Pn.Z,{columnsData:h,rowsData:b,sorting:l,onSort:s,filters:c,onFilter:u,hoverStateEnabled:!0,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:56,renderRowCell:O,onRowHover:k,hoverRowIndex:N,hoveredRowRightContent:M,context:U,classes:{hoveredRowRightContentWrapper:y["row-cell__buttons-wrapper"],hoveredRowRightContentContainer:y["row-cell__buttons-container"]}}))},Zn=(0,_.Z)((()=>({actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}})));function Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Rn=e=>{let{onChangeAttribute:t,onCancel:n,onApply:l,onDeleteAttribute:s,hasChanges:c,attributeValue:u}=e;const d=Zn(),m=(0,a.useSelector)(v.ZP.selectors.getEntityUri),{attributeType:f}=(0,r.useContext)(_t),h=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,m)||{})),y=(0,a.useSelector)(v.ZP.selectors.getMode),x=(0,a.useDispatch)(),E=(0,r.useContext)(p.m),w=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.addAttributes,x)(e.map((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Tn(e,t,n[t])}))}return e}({},e,{viewId:E}))))),[E,x]),C=(0,g.ZiX)(m),S=(0,a.useSelector)((e=>v.ZP.selectors.getActiveErrorsForAttributesPager(e,m,f))),P=(0,r.useCallback)((0,i.pipe)(v.N5.errors.actions.errorDeactivated,x),[x]);return o().createElement(o().Fragment,null,o().createElement(ne.Z,{expanded:!0,attributeValue:u,showEmptyEditors:C,onDeleteAttribute:s,onDeactivateError:P,onChangeAttribute:t,onAddAttributes:w,mode:y,crosswalks:h.crosswalks,errors:S,attributeType:f,ownError:(0,g.ADq)(u,null,f.uri,S)}),o().createElement("div",{className:d.actionButtons},o().createElement(F.Button,{onClick:()=>{n(u)}},b().text("Cancel")),o().createElement(F.Button,{color:"primary",disabled:!c,onClick:()=>{l(u)}},b().text("Apply"))))},jn=(0,_.Z)((()=>({root:{display:"flex",flexDirection:"column"},content:{position:"relative",padding:"4px 16px 9px",flex:1,overflow:"auto"},noData:{fontSize:"13px",paddingLeft:"20px",color:"rgba(0,0,0,0.54)"},tableContainer:{height:"477px",display:"flex",fontFamily:"Roboto",color:"rgba(0,0,0,0.54)"},header:{padding:"0 4px 0 16px"},addButton:{padding:"9px 16px 9px 12px",backgroundColor:"rgba(98, 2, 238, 0)",marginBottom:"4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{padding:"4px 16px"}})));function Dn(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){In(e,t,n[t])}))}return e}function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ln=[],An=e=>{let{config:t,className:n}=e;const{caption:l,max:s}=t,c=jn(),{values:u,page:d,setPage:m,isLoading:f,searchQuery:h,setSearchQuery:y,visibleColumns:x,onFilter:E,onSort:w,onToggleFilters:C,onChangeColumns:S,filters:P,sorting:O,totalVisibleValues:N,hasPaging:k,attributeType:Z,showTable:T}=(0,r.useContext)(_t),j=(0,r.useMemo)((()=>dn(Z)),[Z]),{checkHasChanges:D,onChangeAttribute:I,onDeleteAttribute:A,onAdd:M,onCancel:U,onApply:B,onStartEditing:W,modifiedValues:q,editingValues:G,deletedUris:$}=(()=>{const[e,t]=(0,r.useState)(),[n,o]=(0,r.useState)([]),l=(0,a.useSelector)(v.ZP.selectors.getMode);(0,r.useEffect)((()=>{o([]),t(null)}),[l]);const s=(0,a.useDispatch)(),c=(0,r.useContext)(p.m),{attributeType:u,values:d}=(0,r.useContext)(_t),m=(0,a.useSelector)(v.ZP.selectors.getEntityUri),f=(0,a.useSelector)(v.ZP.selectors.getMetadata),b=(0,r.useCallback)((e=>{(0,i.pipe)(v.N5.actions.modifyAttribute,s)(Dn({},e,{viewId:c}))}),[c,s]),h=(0,r.useCallback)((e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(Dn({},e,{viewId:c}))),[c,s]),y=(0,r.useCallback)((()=>{const e=(0,g.gjI)({parentUri:m,attributeType:u});t(e.uri),b(Dn({},e,{value:(0,g.GPx)({attributeTypes:u.attributes,parentUri:e.uri,mode:l,metadata:f}),attributeType:u}))}),[m,u]),x=(0,r.useCallback)((e=>{o((t=>t.find((0,i.propEq)("uri",e.uri))?t:[...t,e]))}),[o]),E=(0,r.useCallback)((e=>{const r=n.find((0,i.propEq)("uri",e.uri));if(r){const t=Dn({},e,{value:r,attributeType:u,uri:e.uri});o((e=>(0,i.without)([r],e))),b(t)}else{const n={value:e,attributeType:u,uri:e.uri};t(null),h(n)}}),[h,b,o,n]),w=(0,r.useCallback)((e=>{t(null),o((t=>{const n=t.find((0,i.propEq)("uri",e.uri));return n?(0,i.without)([n],t):t}))}),[o,t]),C=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,m)||{})),S=(0,g.KIu)(l),P=(0,g.xy8)(u),O=(0,i.pathOr)(Ln,[P,null==u?void 0:u.name],C),N=(0,r.useMemo)((()=>[...O.filter((0,i.pipe)((0,i.prop)("uri"),(0,i.both)(g.ZiX,(0,i.pipe)((0,i.equals)(e),i.not)))),...(0,i.map)((e=>O.find((0,i.propEq)("uri",e.uri))||e))(d)].map((e=>{var t;return null!==(t=n.find((0,i.propEq)("uri",e.uri)))&&void 0!==t?t:e}))),[O,n,e,d]),k=(0,r.useMemo)((()=>S?(0,i.pipe)((0,i.map)((0,i.prop)("uri")),(0,i.filter)((e=>!O.find((0,i.propEq)("uri",e)))))(d):[]),[O,d]),Z=O.filter((t=>{let{uri:r}=t;return r===e||n.find((0,i.propEq)("uri",r))}));return{checkHasChanges:e=>n.find((0,i.propEq)("uri",e.uri))!==e,onChangeAttribute:b,onDeleteAttribute:h,onAdd:y,onCancel:E,onApply:w,onStartEditing:x,modifiedValues:N,editingValues:Z,deletedUris:k}})(),_=(0,a.useSelector)(v.ZP.selectors.getMode),Q=(0,g.KIu)(_),X=Q?q:u,{canCreate:Y}=(0,yn.l)(),K=Y(t)&&Z&&(0,g.Vg3)({attributeType:Z,mode:_})&&!G.length,ee=(0,r.useMemo)((()=>x.map((e=>j.find((0,i.propEq)("id",e))))),[x,j]);return o().createElement(z.Z,{className:L()(c.root,n)},T?o().createElement(o().Fragment,null,o().createElement(wn,{title:l,total:N,columnsData:j,selectedColumns:x,onChangeColumns:S,searchQuery:h,onChangeSearchQuery:y,filtersEnabled:!!P,onToggleFilters:C}),o().createElement("div",{style:{position:"relative"}},Q&&o().createElement("div",{className:c.editor},K&&o().createElement(F.Button,{color:"primary",onClick:M,className:c.addButton},o().createElement(J.Z,{classes:{root:c.icon}}),o().createElement("div",{className:c.buttonLabel},b().text("Add"))),G.map((e=>o().createElement(Rn,{key:e.uri,attributeValue:e,onChangeAttribute:I,onDeleteAttribute:A,onCancel:U,onApply:B,hasChanges:D(e)})))),o().createElement(kn,{columnsData:ee,config:t,values:X,filters:P,onFilter:E,sorting:O,onSort:w,onEdit:W,onDeleteAttribute:A,deletedUris:$}),k&&o().createElement(V.Z,{count:N,rowsPerPageOptions:[],rowsPerPage:s,page:d,onChangePage:m}),f&&o().createElement(R.Z,null))):o().createElement(o().Fragment,null,o().createElement(H.Z,{title:l,className:c.header}),o().createElement(F.Typography,{className:c.noData},b().text("No data"))))};var Mn=n(58600);let Un=0;const zn=()=>Un++,Vn=e=>{const t={children:[],nodeId:zn()};if(e.parentPaths)for(let n=0;n<e.parentPaths.length;n++){const r=e.parentPaths[n];let o=t;for(let t=r.length-1;t>=0;t--){const a=r[t],l=e.entities[a.entityUri],i=t===r.length-1,s={entity:l,children:[],nodeId:zn(),expanded:!0,rootIndex:i?n+1:void 0};i&&(s.root=i),o.children.push(s),o=s}}return t.children},Fn=(0,_.Z)((e=>({container:{fontSize:"13px",display:"flex",paddingTop:"6px",position:"relative"},title:{flexGrow:1,minHeight:"15px",color:e.palette.secondary.main,lineHeight:"15px"},link:{cursor:"pointer",color:e.palette.secondary.main,lineHeight:"15px"},selected:{fontWeight:"bold"},wrapper:{width:"100%"},avatar:{height:"16px",width:"16px",marginRight:"8px",marginLeft:"8px"},header:{padding:"0 4px 0 16px"},treeContainer:{flexGrow:1,display:"flex",flexDirection:"column",height:"100%",minHeight:"372px",maxHeight:"507px",overflow:"auto"},tree:{flexGrow:1,height:0},buttonsContainer:{flexShrink:0,marginLeft:"auto","& > * + *":{marginLeft:"-4px"}},button:{padding:"8px"}})));var Hn=n(1242);const Bn=o().createContext(null);var Wn=n(55400);const qn=e=>{e.target.src=Hn},Gn=e=>{let{node:t}=e;const n=Fn(),l=(0,a.useDispatch)(),i=t.entity.uri,s=(0,a.useSelector)(v.ZP.selectors.getAbsoluteImagePath),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,r.useContext)(Bn),p=(0,a.useSelector)(v.ZP.selectors.getUIPath),{uri:d}=(0,a.useSelector)(v.ZP.selectors.getEntity),m=(0,g.ChB)({uiPath:p,uri:i}),f=i===d,b=(0,r.useCallback)((()=>{l(v.ui.actions.openEntity({uri:i,viewId:u.id}))}),[l,u,i]),{entity:{label:h},nodeId:y}=t,x=(0,g.nt9)(c,t.entity.type)||{},E=(0,g.VD3)(c,x,"typeGraphIcon"),w=E&&(0,g.vPL)(s,E);return o().createElement("div",{className:n.wrapper,"data-node-id":y},o().createElement("div",{className:n.container},o().createElement(F.Avatar,{className:L()(n.avatar),src:w||Hn,onError:qn}),o().createElement("span",{className:L()(n.link,{[n.selected]:f})},o().createElement(Wn.Z,{to:m,onClick:b},h))))},$n=((0,r.memo)(Gn),e=>{let{node:t}=e;return t.nodeId}),_n=(0,_.Z)((()=>({lineBlock:{height:"100%",position:"relative",display:"inline-block"},lineChildren:{height:"100%",position:"absolute",display:"inline-block"},rootIndex:{display:"flex",alignItems:"center",color:"rgba(0,0,0,0.54)",height:"100%"},verticalLine:{width:"1px",left:"50%",top:0,height:"50%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},horizontalLineRight:{height:"1px",top:"14px",left:"50%",width:"24%",position:"absolute",backgroundColor:"rgba(0,122,193,0.3)"},node:{minWidth:"100%",position:"relative",textAlign:"left",padding:"0 24px 0 18px",boxSizing:"border-box",whiteSpace:"normal","&:hover":{backgroundColor:"rgba(0,0,0,0.06)"}},nodeContent:{position:"absolute",top:0,bottom:0,paddingLeft:"18px",boxSizing:"border-box"},row:{display:"flex"},rowContents:{position:"relative",borderLeft:"none",paddingLeft:"4px",flex:"1 1 auto",width:0,display:"flex",verticalAlign:"middle",boxSizing:"border-box"},buttonWrapper:{display:"flex",paddingTop:"13px",width:"12px",cursor:"pointer"},collapsedButton:{transform:"rotate(-90deg)"},expandedButton:{transform:"rotate(0deg)"},button:{transition:"transform .15s ease",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid rgba(0, 0, 0, 0.54)"},rowTitle:{flex:"1 1 auto",width:0,paddingRight:"11px"}})));function Qn(){return Qn=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},Qn.apply(this,arguments)}function Xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(){return Yn=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},Yn.apply(this,arguments)}const Kn={nodeContentRenderer:e=>{const t=(0,i.omit)(["connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","draggedNode","isSearchMatch","isSearchFocus","buttons","didDrop","children","treeId","isOver","parentNode","rowDirection"],e),{scaffoldBlockPxWidth:n,toggleChildrenVisibility:r,node:a,title:l,path:s,treeIndex:c,style:u}=t,p=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","node","title","path","treeIndex","style"]),d=l,m=r&&!a.root&&a.children&&a.children.length>0,g=_n();return o().createElement("div",Yn({style:{height:"100%"}},p,{key:a.nodeId}),m&&a.expanded&&o().createElement("div",{style:{width:n-2},className:g.lineChildren}),o().createElement("div",{className:g.row,style:u},o().createElement("div",{className:g.rowContents},m&&o().createElement("div",{className:g.buttonWrapper,onClick:()=>{r({node:a,path:s,treeIndex:c})}},o().createElement("div",{"aria-label":a.expanded?"Collapse":"Expand",className:L()(g.button,a.expanded?g.expandedButton:g.collapsedButton)})),o().createElement("div",{className:g.rowTitle},"function"==typeof d?d({node:a,path:s,treeIndex:c}):d))))},treeNodeRenderer:e=>{const t=(0,i.omit)(["listIndex","swapFrom","swapLength","swapDepth","draggedNode","getPrevRow","connectDropTarget","isOver","canDrop","treeIndex","treeId","path","rowDirection"],e),{children:n,scaffoldBlockPxWidth:r,lowerSiblingCounts:a,node:l}=t,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["children","scaffoldBlockPxWidth","lowerSiblingCounts","node"]),c=_n(),u=a.length,p=[];a.forEach(((e,t)=>{p.push(o().createElement("div",{key:`pre_${1+t}`,style:{width:r},className:c.lineBlock},l.root&&o().createElement("div",{className:c.rootIndex},l.rootIndex,"."),t===u-1&&0!==t&&o().createElement(o().Fragment,null,o().createElement("div",{className:c.verticalLine}),o().createElement("div",{className:c.horizontalLineRight}))))}));const d=l.root?r-4:0,m=r*u-d,g={left:m,width:`calc(100% - ${m}px`},f=`${m+250}px`,b=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){Xn(e,t,n[t])}))}return e}({},s.style,{width:f});return o().createElement("div",Qn({},s,{className:c.node,style:b}),p,o().createElement("div",{className:c.nodeContent,style:g},n))},scaffoldBlockPxWidth:16,rowHeight:28,slideRegionSize:50};function Jn(){return Jn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jn.apply(this,arguments)}const er=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Jn({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},n),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",fillOpacity:".54"},o().createElement("path",{d:"M14.5 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm4 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm-17 1a1.5 1.5 0 110-3 1.5 1.5 0 010 3zM4 4a2 2 0 110-4 2 2 0 010 4zm1 16a2 2 0 110-4 2 2 0 010 4zm4.5-6a4.5 4.5 0 110-9 4.5 4.5 0 010 9zm0-2a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm6 5a1.5 1.5 0 110-3 1.5 1.5 0 010 3z",fill:"#000"})))},tr=e=>{let{title:t,onGraphOpen:n}=e;const r=Fn();return o().createElement(H.Z,{title:t,className:r.header},o().createElement("div",{className:r.buttonsContainer},o().createElement(Pe.k,{className:r.button,tooltipTitle:b().text("Show Graph"),icon:er,onClick:n,size:"L"})))};var nr=n(33165),rr=n(59601);const or=(0,_.Z)((()=>({root:{position:"relative"},bodyWrapper:{paddingTop:"21px"}})));function ar(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){lr(e,t,n[t])}))}return e}function lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ir=n(14940);const sr=(0,_.Z)({resizableHandleContainer:{position:"relative",width:"100%",height:"inherit"},resizableHandleVisibilityArea:{position:"absolute",top:0,left:0,width:"100%",height:"24px",zIndex:11,"&:hover $resizableHandle":{visibility:"visible"},".react-grid-item.static &:hover $resizableHandle":{visibility:"hidden"}},resizableHandle:{position:"absolute",width:"100%",display:"flex",justifyContent:"center",top:"-3px",zIndex:11,cursor:"move",visibility:"hidden"},dragIcon:{transform:"translateX(-50%) rotate(90deg)",color:"rgba(0, 0, 0, 0.3)"}}),cr=e=>{const t=t=>{const n=sr();return o().createElement("div",{className:n.resizableHandleContainer},o().createElement("div",{className:n.resizableHandleVisibilityArea},o().createElement("div",{className:L()("viewDraggableHandle",n.resizableHandle)},o().createElement(ir.Z,{className:n.dragIcon}))),o().createElement(e,t))};return t.displayName="WithResizableHandle",t},ur=(0,_.Z)({stubView:{padding:"20px"},fullHeight:{height:"100%"},component:{boxSizing:"border-box",overflow:"auto",boxShadow:"none",borderRadius:"unset"}});var pr=n(29103),dr=n(83911),mr=n(79485),gr=n(22385);const fr=(0,i.pipe)((0,i.path)(["point","lat"]),(0,i.both)((0,i.gt)(90),(0,i.lt)(-90))),br=(0,_.Z)((()=>({root:{height:"100%",display:"flex",flexDirection:"column"},fullHeight:{height:"100%"},fullscreenBtn:{position:"absolute",right:"5px",top:"5px",zIndex:100}})));var hr=n(13074),yr=n(24338);const vr=(0,_.Z)((e=>({caption:{color:e.palette.text.secondary,fontSize:"13px"}}))),xr=vr,Er=e=>{let{totalImages:t}=e;const n=xr(),r=t>1?b().text("photos"):b().text("photo");return o().createElement(F.Typography,{variant:"caption",className:n.caption},`${t} ${r}`)};function wr(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){Cr(e,t,n[t])}))}return e}function Cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Sr=e=>{let{config:t,attributeType:n,paging:r,requestNextPageOfAttributeValues:l}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getEntity),u=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,c.uri)||{})),p=(0,i.pathOr)([],["attributes",n.name],u),d=t.id;return o().createElement(o().Fragment,null,o().createElement(yr.Z,{attributeValues:p,attributeType:n,onDeleteAttribute:e=>(0,i.pipe)(v.N5.actions.removeAttribute,s)(wr({},e,{viewId:d})),parentUri:u.uri,onChangeAttribute:e=>(0,i.pipe)(v.N5.actions.modifyAttribute,s)(wr({},e,{viewId:d})),imageSize:Nr,paging:r,requestNextPageOfAttributeValues:l}),o().createElement(Er,{totalImages:p.length}))},Pr=(0,_.Z)((e=>({container:{padding:"8px 16px"},noData:{fontSize:"13px",color:e.palette.text.secondary}}))),Or=Pr,Nr={imageMargin:4,imageWidth:162,imageHeight:162};var kr=n(28741);const Zr=(0,_.Z)((e=>({root:{display:"flex",flexDirection:"column"},matchesContainer:{position:"relative"},footer:{display:"flex",alignItems:"end",flexGrow:1,justifyContent:"flex-start",borderTop:"1px solid rgba(0,0,0, 0.12)",padding:"8px 16px",color:e.palette.primary.main,fontSize:"13px",letterSpacing:"0",lineHeight:"15px"},noData:{paddingLeft:"16px",paddingBottom:"16px",fontSize:"13px",color:"rgba(0,0,0,0.54)"}})));var Tr=n(49734),Rr=n(98808),jr=n(93428),Dr=n(30885);function Ir(){return Ir=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},Ir.apply(this,arguments)}const Lr=e=>{let{config:t,match:n,onStartRequest:l,onFinishRequest:i}=e;const s=(0,a.useDispatch)(),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,a.useSelector)(v.ZP.selectors.getEntity),{canMerge:d,canMark:m}=(0,g.hXd)(c,t,n.object,u,n.matchRules),f=(0,r.useMemo)((()=>[n.object]),[n.object]),b={entity:u,entities:f,mode:Rr.N.iconButton,onStartRequest:l},h=(0,r.useContext)(p.m),y=(0,r.useCallback)((()=>{i(),s(v.N5.entity.actions.loadEntity({viewId:h,uri:u.uri}))}),[s,u.uri,i,h]);return o().createElement(o().Fragment,null,d&&o().createElement(jr.H,Ir({},b,{onFinishRequest:y})),m&&o().createElement(Dr.i,Ir({},b,{onFinishRequest:i})))},Ar=e=>{let{config:t,entitiesMap:n,match:r,onFinishRequest:l,onStartRequest:i}=e;const s=(0,a.useSelector)(v.ZP.selectors.getMetadata),c=(0,a.useSelector)(v.ZP.selectors.getEntity);return o().createElement(Tr.M,{match:r,entity:c,entitiesMap:n,metadata:s,className:bt.U},o().createElement(ht.Z,{uri:(0,g.E_P)(c.uri,r.object.uri),relatedObjectUris:(0,g.wp9)(g.q7e.POTENTIAL_MATCH,{entityUri:c.uri,matchEntityUri:r.object.uri}),objectType:g.q7e.POTENTIAL_MATCH}),o().createElement(Lr,{match:r,config:t,onStartRequest:i,onFinishRequest:l}))},Mr={showTransitiveMatches:!0,showInactiveEntities:!1},Ur={order:"asc",field:"score"};var zr;!function(e){e[e.Loading=0]="Loading",e[e.NoData=1]="NoData",e[e.Loaded=2]="Loaded"}(zr||(zr={}));const Vr=cr((e=>{let{className:t}=e;const n=ur();return o().createElement(z.Z,{className:L()(n.stubView,"viewDraggableHandle",t)},"NOT IMPLEMENTED")})),Fr=cr((e=>{let{className:t,config:n}=e;return o().createElement(A.Z,{className:t,caption:n.caption,excludeUris:n.excludeUris,includeUris:n.includeUris,attributesCount:n.attributesCount,pinnedAttributes:n.pinnedAttributes})})),Hr=cr((e=>{let{className:t,config:n}=e;const a=(e=>{const[t,n]=(0,r.useState)(""),[o,a]=(0,r.useState)(0),[l,i]=(0,r.useState)(!1),s=(0,r.useMemo)((()=>({page:o,searchQuery:t,showInactive:l})),[o,t,l]),c=xe(e,s,!0),u=(0,r.useCallback)((()=>{a(0),i((e=>!e))}),[]);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){Ee(e,t,n[t])}))}return e}({setSearchQuery:n,searchQuery:t,setPage:a,page:o,toggleShowInactive:u,showInactive:l},c)})(n);return o().createElement(M.Provider,{value:a},o().createElement(be,{config:n,className:t}))})),Br=cr((e=>{let{config:t,className:n}=e;const l=(e=>{var t;const{attributeUri:n}=e,o=(0,a.useSelector)(v.ZP.selectors.getMetadata),l=(0,r.useMemo)((()=>(0,g.zeJ)(o,n)),[o,n]),s=(0,r.useMemo)((()=>dn(l)),[l]),c=(0,r.useMemo)((()=>({searchQuery:"",filters:null,sorting:void 0,visibleColumns:s.filter((0,i.pipe)((0,i.prop)("dataTypeDefinition"),g.YkM,i.not)).map((e=>{let{id:t}=e;return t})).slice(0,5),page:0})),[s]),[u,p]=(0,r.useReducer)(nn,c),{searchQuery:d,filters:m,sorting:f,page:b}=u,h=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),y=(0,r.useMemo)((()=>{const e=((e,t)=>g.wSh.fromNull(t).map((t=>Object.entries(t).map((t=>{let[n,r]=t;const o=e.find((0,i.propEq)("id",n));return(0,bn.su)(o,r)})))).orSome([]))(s,m);return e.length?e:null}),[m,s]),x=(0,r.useMemo)((()=>(0,i.reject)(i.isNil,{filters:y,page:b,sorting:f,searchQuery:d})),[y,b,f,d]),{changeSearchQuery:E,changePage:w,toggleSort:C,changeFilter:S,toggleFilters:P,changeColumns:O}=(0,Qt.o)({actions:tn,dispatch:p}),N=xe(e,x,!1);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){hn(e,t,n[t])}))}return e}({},u,{setSearchQuery:E,setPage:w,onSort:C,onFilter:S,onToggleFilters:P,onChangeColumns:O,showTable:Boolean(((null==N||null===(t=N.values)||void 0===t?void 0:t.length)||y||d||h)&&l&&!l.hidden)},N)})(t);return o().createElement(_t.Provider,{value:l},t&&o().createElement(An,{config:t,className:n}))})),Wr=cr((e=>{let{config:t,className:n}=e;const a=(e=>{var t;const n=(0,r.useMemo)((()=>Object.entries(e.sortOptions||{}).map((e=>{let[t,n]=e;return{value:t,label:n}}))),[e.sortOptions]),o=e.max||15,[a,l]=(0,r.useState)(0),[i,s]=(0,r.useState)(e.sortOrder||"asc"),[c,u]=(0,r.useState)(null===(t=n[0])||void 0===t?void 0:t.value),[p,d]=(0,r.useState)(""),[m,g]=(0,r.useState)(!1),f=(0,r.useCallback)((()=>{l(0),g((e=>!e))}),[]),b=(0,r.useCallback)((()=>{l(0),s((e=>"asc"===e?"desc":"asc"))}),[]),h=(0,r.useCallback)((e=>{l(0),u(e)}),[]);return{searchQuery:p,changeSearchQuery:(0,r.useCallback)((e=>{l(0),d(e)}),[]),sortOrder:i,toggleSortOrder:b,sortOption:c,changeSortOption:h,sortOptions:n,page:a,setPage:l,rowsPerPage:o,showInactive:m,toggleShowInactive:f}})(t);return o().createElement(ke.Provider,{value:a},o().createElement($t,{config:t,className:n}))})),qr=cr((e=>{let{config:t,className:n}=e;const a=(0,r.useRef)(),[l,s]=(0,r.useState)(null),{height:c,width:u,tooltip:p}=t,{html:d,visible:m,tooltip:g,customStyles:f,onClosePopup:b,message:h}=(0,nr.E)(t),y=or(),v=g||p;if((0,r.useEffect)((()=>{a.current&&d&&(a.current.innerHTML="",d.childNodes.forEach((e=>{a.current.appendChild(e)})),s(a.current))}),[d]),!m)return null;const x=(0,i.reject)(i.isNil,{width:u,height:c}),E=o().createElement("div",{ref:a,style:ar({},x,f),className:L()(y.root,n)});return o().createElement("div",{className:y.bodyWrapper},v?o().createElement(F.Tooltip,{title:v},E):E,o().createElement(rr.Z,{placement:"bottom",anchorEl:l,open:!!h,onClose:b},h))})),Gr=cr((e=>{let{config:t,className:n}=e;const l=(0,a.useSelector)(v.ZP.selectors.getEntityUri),{treeData:i,setTreeData:s}=((e,t)=>{const n=(0,he._)(),[o,a]=(0,r.useState)([]);return(0,r.useEffect)((()=>((0,g.ZiX)(e)||n((0,g.RFJ)({uri:e,graphUri:t})).then(Vn).then(a).catch((e=>{console.warn(e)})),()=>{a([])})),[e,t,n]),{treeData:o,setTreeData:a}})(l,t.graph.type),c=Fn(),u=(0,a.useDispatch)(),{id:p,graph:d}=t,m=(0,r.useCallback)((()=>{u(v.ui.actions.openGraph({viewId:p,graphType:d.type}))}),[u,p,d]),f=(0,r.useCallback)((e=>({title:o().createElement(Gn,{node:e.node})})),[]);return o().createElement(z.Z,{className:n},o().createElement(tr,{onGraphOpen:m,title:t.caption}),o().createElement(Bn.Provider,{value:t},o().createElement("div",{className:c.treeContainer},o().createElement("div",{className:c.tree},o().createElement(Mn.ZP,{isVirtualized:!1,treeData:i,canDrag:!1,theme:Kn,generateNodeProps:f,onChange:s,getNodeKey:$n})))))})),$r=cr((e=>{let{config:t,className:n}=e;const l=Zr(),s=(0,a.useSelector)(v.ZP.selectors.getEntity),c=(0,g.wwR)(s),[u,d]=(0,r.useState)(!1),m=(0,r.useCallback)((()=>{d(!0)}),[]),f=(0,r.useCallback)((()=>{d(!1)}),[]),{matches:h,entitiesMap:y,loadMatches:x,total:E}=(0,kr.s)({enabled:!!c,entity:s,options:Mr,filter:"",page:0,sorting:Ur,rowsPerPage:3,onStartLoading:m,onFinishLoading:f}),C=(0,r.useCallback)((()=>{x()}),[x]),S=(0,a.useDispatch)(),P=(0,r.useContext)(p.m),O=(0,r.useCallback)((()=>{S(v.ui.actions.openPerspective({perspectiveId:"potentialMatches",viewId:P}))}),[S,P]),N=(0,r.useMemo)((()=>(0,g.NVY)(c,(0,i.map)(g.ev7,h))),[c,h]),{getCommentsCount:k}=(0,r.useContext)(w.h);(0,r.useEffect)((()=>{k(N)}),[k,N]);const Z=E>3&&!(0,i.isEmpty)(h),T=u?zr.Loading:(0,i.isEmpty)(h)?zr.NoData:zr.Loaded;return o().createElement(Ce.X.Provider,{value:y},o().createElement(z.Z,{className:L()(l.root,n)},o().createElement(H.Z,{title:t.caption}),o().createElement("div",{className:l.matchesContainer},T===zr.Loading&&o().createElement(R.Z,null),T===zr.NoData&&o().createElement(F.Typography,{className:l.noData},b().text("No matches found")),T===zr.Loaded&&h.map((e=>o().createElement(Ar,{config:t,entitiesMap:y,match:e,onFinishRequest:C,onStartRequest:m,key:e.object.uri})))),Z&&o().createElement(o().Fragment,null,o().createElement("div",{className:l.footer},o().createElement(F.Link,{component:"button",variant:"caption",onClick:O,underline:"none"},b().text("See all"))))))})),_r=(0,r.lazy)((()=>n.e(6596).then(n.bind(n,46596)).then((e=>({default:cr(e.HierarchyTreeView)}))))),Qr=(0,r.lazy)((()=>n.e(4361).then(n.bind(n,14361)).then((e=>({default:cr(e.RelationshipsTableView)}))))),Xr=cr((e=>{let{config:t,isFullscreen:n,onToggleFullscreen:l,className:i}=e;const s=br(),c=(0,a.useSelector)(v.ZP.selectors.getMetadata),u=(0,a.useSelector)(v.ZP.selectors.getEntity),p=(0,a.useSelector)(v.ZP.selectors.getGoogleMapKey),{markers:d,loading:m}=((e,t,n)=>{const[o,a]=(0,r.useState)([]),[l,i]=(0,r.useState)(!0),s=(0,he._)();return(0,r.useEffect)((()=>{i(!0),s((0,g.DBr)(t,[e],n)).then((e=>{a(e.filter(fr))})).catch((()=>{a([])})).finally((()=>{i(!1)}))}),[e,t,n,s]),{markers:o,loading:l}})(u,c,p),f=(0,r.useMemo)((()=>o().createElement("div",{className:s.fullHeight},o().createElement(R.Z,null))),[s]),b=(0,r.useMemo)((()=>({lat:0,lng:0})),[]);return p&&o().createElement(z.Z,{className:L()(s.root,i)},m&&o().createElement(R.Z,null),o().createElement(gr.Z,{size:"S",icon:n?dr.Z:pr.Z,onClick:()=>l(t.id),className:s.fullscreenBtn}),o().createElement(mr.Z,{loadingElement:f,defaultZoom:1,defaultCenter:b,markers:d,mapContainerClassName:s.fullHeight,mapKey:p}))})),Yr=cr((e=>{let{config:t,className:n}=e;const{attributeUri:l}=t,s=Or(),c=(0,a.useDispatch)(),u=(0,a.useSelector)(v.ZP.selectors.getMode),p=(0,a.useSelector)(v.ZP.selectors.getEntityWithDiff),d=(0,a.useSelector)(v.ZP.selectors.getMetadata),m=(0,g.zeJ)(d,l),f=(0,i.pathOr)([],["attributes",null==m?void 0:m.name],p),h=(0,i.path)(["attributes","paging",l],p),y=f.length,x=t["text-empty"]||b().text("No data found"),E=(0,r.useCallback)((e=>c(v.N5.actions.requestNextPageOfAttributeValues(e))),[c]);return o().createElement(z.Z,{className:n},o().createElement(H.Z,{title:t.caption}),o().createElement("div",{className:s.container},(()=>{if(m){if((0,g.KIu)(u)){const e={attributeType:m,config:t,paging:h,requestNextPageOfAttributeValues:E};return o().createElement(Sr,e)}if(y>0){const e={attributeValues:f,attributeType:m,imageSize:Nr,paging:h,parentUri:p.uri,requestNextPageOfAttributeValues:E};return o().createElement(o().Fragment,null,o().createElement(hr.Z,e),o().createElement(Er,{totalImages:y}))}}return o().createElement(F.Typography,{className:s.noData},x)})()))}));class Kr{}Kr.ViewTypes=g.ZIY,Kr.getComponentBy=(e,t)=>{let{store:n,config:r,className:a,isFullscreen:l,onToggleFullscreen:i}=t;switch(r[e]){case Kr.ViewTypes.HierarchyTree:return o().createElement(_r,{config:r,store:n,className:a});case Kr.ViewTypes.HierarchyPaths:return o().createElement(Gr,{config:r,className:a});case Kr.ViewTypes.RelationsTable:return o().createElement(Qr,{config:r,store:n,className:a});case Kr.ViewTypes.Relations:return o().createElement(Wr,{config:r,className:a});case Kr.ViewTypes.Attributes:return o().createElement(Fr,{className:a,config:r});case Kr.ViewTypes.SingleAttributeView:return o().createElement(Hr,{config:r,className:a});case Kr.ViewTypes.TableAttributeView:return o().createElement(Br,{config:r,className:a});case Kr.ViewTypes.MapView:return o().createElement(Xr,{config:r,isFullscreen:l,onToggleFullscreen:i,className:a});case Kr.ViewTypes.CustomView:return o().createElement(qr,{config:r,className:a});case Kr.ViewTypes.ImageAttributeView:return o().createElement(Yr,{config:r,className:a});case Kr.ViewTypes.PotentialMatchesView:return o().createElement($r,{config:r,className:a})}},Kr.getComponent=e=>Kr.getComponentBy("class",e)||Kr.getComponentBy("react-class",e)||o().createElement(Vr,{className:e.className});const Jr=Kr,eo=()=>null,to=(0,r.memo)((e=>{let{config:t,store:n,isFullscreen:a,isAutosize:l,onToggleFullscreen:i}=e;const s=ur();return o().createElement(r.Suspense,{fallback:o().createElement(eo,null)},Jr.getComponent({config:t,store:n,className:L()(s.component,{[s.fullHeight]:!l}),isFullscreen:a,onToggleFullscreen:i}))}));to.displayName="ViewComponent";const no=(0,_.Z)((e=>({item:e.basicView,fixedSizeContainer:{height:"100%"}})));function ro(){return ro=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},ro.apply(this,arguments)}const oo=["onConfigChanged","onRemove"],ao=e=>{let{layoutItemConfig:t,views:n,className:l,children:s,style:c,isFullscreen:u,onToggleFullscreen:p,AutosizeComponent:d}=e,m=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["layoutItemConfig","views","className","children","style","isFullscreen","onToggleFullscreen","AutosizeComponent"]);const g=n.find((e=>{let{id:n}=e;return t.i===n})),f=no(),{store:b}=(0,r.useContext)(a.ReactReduxContext);if(!g)return null;const h=g.class===Jr.ViewTypes.CustomView;return o().createElement("div",ro({},(0,i.omit)(oo,m),{style:c,className:L()(l,{[f.item]:!h})}),o().createElement("div",{className:L()({[f.fixedSizeContainer]:!d})},d,o().createElement(to,{store:b,config:g,isFullscreen:u,onToggleFullscreen:p,isAutosize:Boolean(d)})),s)},lo=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a}=e;return o().createElement(D.Z,{LayoutItem:ao,views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:".viewDraggableHandle"})};var io=n(57304),so=n(3409),co=n(93873),uo=n(22860),po=n(72753),mo=n(43576);function go(){return go=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(this,arguments)}const fo=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",go({width:"19",height:"17",viewBox:"0 0 19 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z",id:"svg1467685497a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",{transform:"translate(-4 -2.5)"},o().createElement("mask",{id:"svg1467685497b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg1467685497a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg1467685497b)",d:"M0 0h24v24H0z"}))))},bo=(0,_.Z)({editingButtons:{display:"flex","& button + button":{width:"88px",marginLeft:"8px"}},searchResults:{width:"150px",height:"25px",backgroundColor:"#ccc"},comments:{display:"flex",justifyContent:"flex-end",marginTop:"10px"}}),ho=e=>o().createElement(F.SvgIcon,e,o().createElement(fo,null)),yo=(e,t,n,r,o)=>e.filter((e=>{let{value:a,permission:l}=e;return!(n&&!(0,g.KIu)(a))&&!!(r&&o||!(0,g.fnZ)(a))&&(0,g.uGe)(l,t)})),vo=e=>{let{className:t}=e;const n=bo(),l=(0,a.useDispatch)(),i=(0,a.useSelector)(v.ZP.selectors.getCanUserStartProcessFromQuery),s=(0,a.useSelector)(v.ZP.selectors.getEntityWithoutDiff),c=(0,a.useSelector)((e=>v.ZP.selectors.getModifiedEntity(e,s.uri))),u=(0,a.useSelector)(v.ZP.selectors.getMetadata),p=(0,a.useSelector)(v.ZP.selectors.isWorkflowEnabled),d=(0,a.useSelector)(v.ZP.selectors.getMode),m=(0,a.useSelector)(v.ZP.selectors.getIsEditableMode),f=(0,a.useSelector)(v.ZP.selectors.getIsViewMode),h=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),y=(0,a.useSelector)(v.ZP.selectors.getProfileOperation)===g.OXy.Saving,x=null==s?void 0:s.type,E=(0,r.useMemo)((()=>[{label:b().text("Editing"),value:g.fO_.EDITING,description:b().text("Edit profile directly"),icon:mo.Z,permission:"UPDATE"},{label:b().text("Suggesting"),value:g.fO_.SUGGESTING,description:b().text("Suggest changes and initiate a workflow review"),icon:ho,permission:"INITIATE_CHANGE_REQUEST"},{label:b().text("Viewing"),value:g.fO_.VIEWING,description:b().text("Suggest changes and initiate a workflow review"),icon:po.Z,permission:"READ"}]),[]),w=(0,r.useMemo)((()=>[{label:b().text("Delete"),value:"Delete",description:b().text("Permanently delete profile"),icon:Ge.Z,onClick:()=>{window.confirm(b().text("Are you sure you want to delete this?"))&&l(v.N5.entity.actions.entityRemoveRequested({entityUri:s.uri}))},permission:"DELETE"}]),[l,s.uri]),C=(0,r.useMemo)((()=>(0,g.nt9)(u,x)||{}),[u,x]),S=!h&&!(0,g.biM)(s)&&!(e=>(0,g.uGe)(g.BDP.READ,e)&&!(0,g.uGe)(g.BDP.UPDATE,e)&&!(0,g.uGe)(g.BDP.DELETE,e)&&!(0,g.uGe)(g.BDP.INITIATE_CHANGE_REQUEST,e))(C),P=(0,g.ZiX)(null==s?void 0:s.uri),O=(0,r.useMemo)((()=>yo(E,C,P,p,i)),[E,C,p,i,P]),N=(0,r.useMemo)((()=>yo(w,C,P,p,i)),[w,C,p,i,P]),k=(0,r.useCallback)((e=>{l(v.N5.mode.actions.modeUpdated(e))}),[l]),Z=(0,r.useCallback)((()=>{l(v.N5.mode.actions.modeCancelEditing())}),[l]),T=(0,r.useCallback)((()=>{l(v.N5.actions.saveProfile())}),[l]);return o().createElement(io.Z,{className:L()(t,bt.U),entity:m&&c?c:s},o().createElement(F.Box,{display:"flex",alignItems:"center"},o().createElement(F.Box,{mr:3},m&&o().createElement(F.Box,{className:n.editingButtons},o().createElement(F.Button,{variant:"outlined",onClick:Z,"data-reltio-id":"reltio-profile-cancel-editing",disabled:y},b().text("Cancel")),o().createElement(F.Button,{variant:"contained",color:"primary","data-reltio-id":"reltio-profile-save-profile",onClick:T,disabled:y},(0,g.fnZ)(d)?b().text("Suggest"):b().text("Save"))),h&&f?o().createElement(so.Z,null):f&&o().createElement(co.a,null)),S&&o().createElement(uo.T,{optionsGroup:O,buttonsGroup:N,value:d,onChange:k,disabled:y})),o().createElement(F.Box,{className:n.comments},o().createElement(ht.Z,{uri:s.uri,relatedObjectUris:(0,g.wp9)(g.q7e.ENTITY,{entityUri:s.uri}),objectType:g.q7e.ENTITY})))};var xo=n(71820),Eo=n(85890),wo=n(26789),Co=n(54362),So=n(6674),Po=n(91515),Oo=n(52043),No=n(17308),ko=n(39827),Zo=n(80147),To=n(76569);const Ro=(0,_.Z)({wrapper:{display:"flex",overflow:"hidden",marginLeft:"auto",flexShrink:0},badge:{fontSize:"12px",height:"18px",minWidth:"18px",backgroundColor:"#FF4081",color:"#FFF"},badgePosition:{right:"5px"}}),jo=()=>{const{total:e}=(0,r.useContext)(Z.O),t=Ro();return o().createElement(F.Badge,{badgeContent:e,classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(To.Z,null))};var Do=n(26313),Io=n(9371),Lo=n(4426);const Ao=(0,_.Z)({wrapper:{overflow:"auto",paddingRight:"12px"},showMoreLink:{display:"flex",margin:"16px"},showMoreIcon:{fontSize:"1rem"}}),Mo=()=>{const e=Ao(),{getComments:t,comments:n,pageToken:l}=(0,r.useContext)(w.h),i=(0,a.useSelector)(v.ZP.selectors.getEntityUriWithDataTenant);(0,r.useEffect)((()=>{t(i)}),[t,i]);const s=(0,Do.Q)(n);return o().createElement(Ce.X.Provider,{value:s},o().createElement(F.Box,{className:e.wrapper},n.map((e=>{const{objectId:t,relatedObjectUris:n,objectType:r,commentId:a}=e;return o().createElement(Io.J,{key:a,uri:t,relatedObjectUris:n,objectType:r,comment:e})})),l&&o().createElement(F.Link,{component:"button",variant:"caption",className:e.showMoreLink,onClick:()=>{t(i,l)},underline:"none"},o().createElement(Lo.Z,{className:e.showMoreIcon}),b().text("Show more"))))};var Uo=n(34120);const zo=(0,_.Z)({wrapper:{overflow:"auto",position:"relative",height:"100%"}}),Vo=()=>{const e=zo(),{tasks:t,loading:n}=(0,r.useContext)(Z.O);return o().createElement("div",{className:e.wrapper},n&&o().createElement(R.Z,null),t&&t.map((e=>o().createElement(Uo.s,{key:e.taskId,task:e}))))};function Fo(){return Fo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fo.apply(this,arguments)}const Ho=e=>{let{styles:t={}}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["styles"]);return o().createElement("svg",Fo({width:"20",height:"20",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},n),o().createElement("defs",null,o().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"svg2697213709a"})),o().createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},o().createElement("g",null,o().createElement("g",{transform:"translate(-2 -2)"},o().createElement("mask",{id:"svg2697213709b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg2697213709a"})),o().createElement("path",{fillOpacity:".54",fill:"#000",mask:"url(#svg2697213709b)",d:"M0 0h24v24H0z"})))))},Bo=()=>{const{commentsMap:e}=(0,r.useContext)(w.h),t=Ro();return o().createElement(F.Badge,{badgeContent:(0,g.mdt)(e),classes:{anchorOriginTopRightRectangle:t.badgePosition,badge:t.badge}},o().createElement(Ho,null))};var Wo=n(10159);const qo=()=>o().createElement(Wo.Z,{text:b().text("Ready to go with the flow?"),secondaryText:b().text("Suggest a change or submit a match review, and we’ll kick off a workflow task to get things going.")}),Go=()=>o().createElement(Wo.Z,{text:b().text("Care to join the conversation?"),secondaryText:b().text("Leave comments for team members anywhere in the Profile page, and we’ll record it here.")});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)}let _o;!function(e){e[e.Workflow=0]="Workflow",e[e.Collaboration=1]="Collaboration",e[e.History=2]="History"}(_o||(_o={}));const Qo=e=>{if(e)return 1===e?b().text("${total} item",{total:e}):b().text("${total} items",{total:e})},Xo=()=>{var e,t,n;const l=Ro(),s=(0,a.useSelector)(v.ZP.selectors.isWorkflowSideViewEnabled),c=(0,a.useSelector)(v.ZP.selectors.isWorkflowEnabled),u=(0,a.useSelector)(v.ZP.selectors.isCollaborationSideViewEnabled),p=(0,a.useSelector)(v.ZP.selectors.isCollaborationEnabled),d=(0,a.useSelector)(v.ZP.selectors.getHistoryEvent),m=(0,a.useSelector)(v.ZP.selectors.getMetadata),f=(0,a.useSelector)(v.ZP.selectors.getEntity),h=(0,r.useContext)(Z.O),y=(0,r.useContext)(w.h),[x,E]=(0,r.useState)(null),C=(0,r.useCallback)((e=>{E((t=>t===e?null:e))}),[]),S=(0,r.useCallback)((()=>{E(null)}),[]),P=null!==x,O=x===_o.History,{isHistoryEnabled:N,isProfilePersisted:k}=(0,xo.C)({isHistoryTabActive:O,entity:f}),{historyFilter:T,onApplyFilter:R,onClearFilter:j,isLoading:D,historicUris:I,historyWithTotal:L,canLoadMore:A,onLoadMore:M}=(0,Eo.k)({entity:f,enabled:N}),U=s&&c&&!(0,g.ZiX)(null==f?void 0:f.uri),z=u&&p,V=(0,g.mdt)(null==y?void 0:y.commentsMap),F=[{buttonProps:{id:_o.Workflow,icon:jo,tooltipTitle:b().text("Workflow")},content:null!=h&&h.total?o().createElement(Vo,null):o().createElement(qo,null),headerProps:{mainTitle:b().text("Workflow"),secondTitle:Qo(null==h?void 0:h.total),rightContent:o().createElement(wo.G,null)},hidden:!U},{buttonProps:{id:_o.Collaboration,icon:Bo,tooltipTitle:b().text("Collaboration")},content:V?o().createElement(Mo,null):o().createElement(Go,null),headerProps:{mainTitle:b().text("Collaboration"),secondTitle:Qo(V)},hidden:!z},{buttonProps:{id:_o.History,icon:Zo.Z,tooltipTitle:b().text("History")},content:k?o().createElement(Co.Z,{isLoading:D,historyWithTotal:L,contributorsUris:I,entityUri:null==f?void 0:f.uri,historyEvent:d,onLoadMore:M,canLoadMore:A}):o().createElement(So.Z,null),headerProps:{content:o().createElement(Po.Z,{total:k?((null==I?void 0:I.length)||0)+1:void 0,entityType:(0,g.nt9)(m,null==f?void 0:f.type),filter:T,onApplyFilter:R,onClearFilter:j})}}],H=(0,i.reject)((0,i.propEq)("hidden",!0))(F);return(0,r.useEffect)((()=>{var e;null!==(e=F[x])&&void 0!==e&&e.hidden&&S()}),[x,F,S,H]),o().createElement("div",{className:l.wrapper},o().createElement(Oo.h,{open:P,width:480},!(null!==(e=F[x])&&void 0!==e&&e.hidden)&&o().createElement(o().Fragment,null,o().createElement(No.P,$o({},null===(t=F[x])||void 0===t?void 0:t.headerProps,{onClose:S})),null===(n=F[x])||void 0===n?void 0:n.content)),o().createElement(ko.G,{buttonsProps:(0,i.pipe)((0,i.reject)((0,i.propEq)("hidden",!0)),(0,i.pluck)("buttonProps"))(F),onButtonClick:C,activeIndexId:x}))};var Yo=n(39781),Ko=n(16715);const Jo="48px",ea="1px solid rgba(0, 0, 0, .125)",ta=(0,_.Z)((e=>({accordion:{borderTop:ea,borderBottom:ea,fontSize:"13px",boxShadow:"none","&:not(:first-child)":{borderTop:0},"&:before":{display:"none"},"&$accordionExpanded":{margin:"auto"}},accordionExpanded:{},accordionSummary:{display:"flex",alignItems:"center",height:Jo,minHeight:Jo,"&$accordionSummaryExpanded":{height:Jo,minHeight:Jo}},accordionSummaryHeading:{flex:1,fontSize:e.typography.pxToRem(13),fontWeight:e.typography.fontWeightRegular},accordionSummaryExpanded:{},accordionSummaryContent:{display:"flex",alignItems:"center"},accordionDetails:{maxHeight:"21vh",overflow:"auto",paddingTop:0,paddingBottom:0,"& ul":{paddingLeft:"23px",marginTop:"3px"},"& li":{paddingLeft:"9px",paddingBottom:"8px"}},parents:{color:e.palette.text.primary},errorsAccordion:{backgroundColor:"#FFF4F6",borderColor:"#FFB8B3"},errorsAccordionDetails:{color:"#DD2C00"},warningsAccordion:{backgroundColor:"#FFF9ED",borderColor:"#FFDD91"},warningsAccordionDetails:{color:"#CC7500"},icon:{marginRight:"8px"},errorIcon:{fill:"#FF1744"},warningIcon:{fill:"#F9A825"}}))),na=ta;var ra=n(38016);const oa=(0,r.memo)((e=>{let{panels:t,expandedPanelId:n,onToggle:r,ErrorComponent:a}=e;const l=na();return t.length>0?o().createElement("div",null,t.map((e=>{let{id:t,icon:i,title:s,items:c,accordionClassName:u,accordionDetailsClassName:p}=e;return o().createElement(F.Accordion,{key:t,square:!0,expanded:n===t,onChange:r(t),className:u,classes:{root:l.accordion,expanded:l.accordionExpanded}},o().createElement(F.AccordionSummary,{classes:{root:l.accordionSummary,expanded:l.accordionSummaryExpanded,content:l.accordionSummaryContent},expandIcon:o().createElement(ra.Z,null)},i,o().createElement(F.Typography,{className:l.accordionSummaryHeading},s)),o().createElement(F.AccordionDetails,{className:L()(l.accordionDetails,p)},o().createElement("ul",null,c.map(((e,t)=>o().createElement(a,{key:t,error:e}))))))}))):null}));oa.displayName="ErrorsPanel";const aa=(0,i.omit)(["deactivated","path"]),la=(0,r.memo)((e=>{let{error:t}=e;const n=na(),r=((e,t)=>{let{type:n,source:r,message:o,attributeTypeUri:a="",attributeType:l}=t;if(n===g.NIO.missed&&r===g.zHr.local){const t=l||(0,g.zeJ)(e,a);return t?b().text("${attribute} is required",{attribute:t.label}):o}return o})((0,a.useSelector)(v.ZP.selectors.getMetadata),t),l=(e=>{let{path:t,uri:n}=e;return null==t?void 0:t.slice(0,n?t.length-1:t.length).filter((e=>{let{type:t}=e;return[g.HAc.attributeValue,g.HAc.relationConnection].includes(t)})).map((e=>{let{label:t}=e;return t})).filter(i.identity).join(" / ")})(t);return o().createElement("li",null,o().createElement("span",null,r),l&&o().createElement(o().Fragment,null,o().createElement("br",null),o().createElement("span",{className:n.parents},l)))}));la.displayName="Error";const ia=()=>{const e=na(),t=(e=>{const t=(0,r.useRef)(e);return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length===t.length&&(0,i.equals)(e.map(aa),t.map(aa))}(e,t.current)||(t.current=e),t.current})((0,a.useSelector)(v.ZP.selectors.getProfileErrors)),[n,l]=(0,r.useMemo)((()=>(0,i.partition)(g.IT0,t)),[t]),[s,c]=(0,r.useState)(null),u=(0,r.useMemo)((()=>[{id:"errors",title:b().text("${number} ${errors}",{number:n.length,errors:1===n.length?b().text("error"):b().text("errors")}),icon:o().createElement(Yo.Z,{className:L()(e.icon,e.errorIcon)}),items:n,accordionClassName:e.errorsAccordion,accordionDetailsClassName:e.errorsAccordionDetails},{id:"warnings",title:b().text("${number} ${warnings}",{number:l.length,warnings:1===l.length?b().text("warning"):b().text("warnings")}),icon:o().createElement(Ko.Z,{className:L()(e.icon,e.warningIcon)}),items:l,accordionClassName:e.warningsAccordion,accordionDetailsClassName:e.warningsAccordionDetails}].filter((e=>{let{items:t}=e;return t.length>0}))),[n,l,e]);(0,r.useEffect)((()=>{c("errors")}),[n]);const p=(0,r.useCallback)((e=>(t,n)=>{c(n?e:null)}),[]);return u.length>0?o().createElement(oa,{panels:u,expandedPanelId:s,onToggle:p,ErrorComponent:la}):null},sa=(0,_.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflowX:"hidden",overflowY:"auto",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},scrollWrapper:{flexGrow:1,overflowY:"auto"},emptyState:{backgroundColor:"#FAFAFA",height:"100%"},profileWrapper:e=>{let{maxWidth:t}=e;return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,maxWidth:t?`${t}px`:"100%"}},profileContainer:{display:"flex",overflow:"hidden",flexGrow:1},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}))),ca=(0,r.memo)((e=>{let{config:t,saveState:n,getSavedState:l}=e;const i=sa({maxWidth:null==t?void 0:t.maxWidth}),s=(0,a.useDispatch)(),c=(0,r.useRef)(),u=(0,r.useCallback)((0,g.DsO)(n,5e3),[n]),{isLoaded:p,savedState:d}=(0,x.a)(l),[m,f]=(0,r.useState)([]),[h,D]=(0,r.useState)([]),I=(0,r.useMemo)((()=>y()(t)),[t]),L=(0,a.useSelector)(v.ZP.selectors.getEntity),A=(0,a.useSelector)(v.ZP.selectors.getIsHistoryModeEnabled),M=(0,r.useMemo)((()=>(0,g.dvH)(L)),[L]),U=(0,E.C)({objectIds:M}),z=(0,r.useContext)(w.h),V=(0,C.U)(),F=(0,S.v)(null==t?void 0:t.workflow),H=(0,a.useSelector)(v.ZP.selectors.getHistoryEvent);(0,P.a)({entity:L,historyEvent:H});const B=(0,O.u)();(0,r.useEffect)((()=>{if(p){const e=I!==d.configHash,{views:n,layout:r}=(0,g.Mfk)({views:e||!d.views?t.views:d.views,layout:e?t.layout:d.layout});D(n),f(r)}}),[p]),(0,r.useEffect)((()=>{s(v.N5.views.actions.profileViewsSet(h))}),[s,h]),(0,r.useEffect)((()=>{t.sidePanelViews&&s(v.N5.sidePanelViews.actions.sidePanelViewsLoaded(t.sidePanelViews))}),[t]),(0,r.useEffect)((()=>{c.current&&(c.current.scrollTop=0)}),[null==L?void 0:L.uri]),(()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(v.ZP.selectors.getValidateReadMode),n=(0,a.useSelector)(v.ZP.selectors.getEntity)||{},{uri:o,updatedTime:l}=n,i=(0,g.biM)(n),s=(0,a.useSelector)(v.ZP.selectors.getMode),c=(0,a.useSelector)(v.ZP.selectors.getProfileViews),u=c&&c.length>0,p=(0,r.useCallback)((0,g.DsO)((t=>{t&&e(v.N5.actions.validateProfile())}),500),[e]);(0,r.useEffect)((()=>{const e=t&&!i&&o&&!(0,g.ZiX)(o)&&s===g.ARY.Viewing&&u;p(e)}),[p,i,t,l,o,s,u])})();const W=(0,r.useCallback)((e=>{u({layout:e,views:h,configHash:I}),f(e)}),[u,I,h]);return o().createElement(N.j.Provider,{value:!0},o().createElement(k.s.Provider,{value:V},o().createElement(w.h.Provider,{value:A?z:U},o().createElement(Z.O.Provider,{value:F},o().createElement(T.m.Provider,{value:B},o().createElement("div",{className:i.perspectiveView},(!p||!(null!=L&&L.uri))&&o().createElement(R.Z,null),p&&null!=L&&L.uri?o().createElement("div",{className:i.profileContainer},o().createElement("div",{className:i.profileWrapper},o().createElement(vo,null),!A&&o().createElement(ia,null),o().createElement("div",{ref:c,className:i.scrollWrapper},o().createElement(lo,{layout:m,onLayoutChanged:W,views:h}))),o().createElement(Xo,null)):o().createElement("div",{className:i.emptyState},o().createElement(j.ZP,{LogoRenderer:j.B9.NO_DATA,text:b().text("No data to display."),variant:j.tC.embedded}))))))))}));ca.displayName="ProfilePerspectiveView";const ua=(0,s.createGenerateClassName)({productionPrefix:"profilePerspective",disableGlobal:!0}),pa=e=>{let{config:t,store:n,onResize:f=i.identity,saveState:b,getSavedState:h,qxSandboxApi:y}=e;const v=(0,r.useCallback)((0,g.aYu)(h),[h]),x=(0,r.useMemo)((()=>(0,g.Vr9)(t)),[t]);return o().createElement(a.Provider,{store:n},o().createElement(p.m.Provider,{value:x.id},o().createElement(d.Y.Provider,{value:y},o().createElement(s.StylesProvider,{generateClassName:ua},o().createElement(u.MuiPickersUtilsProvider,{utils:l.Z},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>f(Math.floor(e),Math.floor(t))}),x&&o().createElement(ca,{config:x,saveState:b,getSavedState:v}),o().createElement(m.Z,{showErrorFromStore:!0}))))))};var da=n(82842),ma=n(51229),ga=n(91131);const fa=(0,_.Z)((e=>({titleContainer:{overflow:"hidden",fontSize:"16px",fontWeight:"normal",whiteSpace:"nowrap",textOverflow:"ellipsis",alignItems:"center",display:"flex",minHeight:"48px",color:e.palette.text.secondary},link:{fontSize:"16px",fontWeight:"normal"},icon:{height:"18px",color:e.palette.text.secondary},totalCaption:{lineHeight:"inherit",fontSize:"14px",color:"rgba(0,0,0,0.6)",flexShrink:0,marginRight:"5px"},totalNumber:{fontSize:"16px",color:"rgba(0,0,0,0.87)",marginRight:"5px",fontWeight:500}}))),ba=e=>{let{total:t=0}=e;const n=fa(),l=(0,a.useDispatch)(),i=(0,r.useContext)(p.m),s=(0,r.useCallback)((()=>{l(v.ui.actions.openPerspective({perspectiveId:"profile",viewId:i}))}),[l,i]);return o().createElement(H.Z,{title:""},o().createElement("div",{className:n.titleContainer},o().createElement(F.Link,{component:"button",variant:"caption",className:n.link,onClick:s,underline:"none"},b().text("Profile")),o().createElement(ga.Z,{className:n.icon}),b().text("Tags")),o().createElement(ma.Z,null),o().createElement(F.Typography,{className:n.totalCaption,variant:"caption"},o().createElement("span",{className:n.totalNumber},b().number(t,"0,0")),b().text("total profiles")))};var ha=n(20404);const ya=(0,_.Z)((e=>({toolbar:{display:"flex",flexShrink:0,background:"white",borderBottom:"1px solid rgba(0,0,0,0.1)",boxSizing:"border-box",paddingLeft:"16px"},avatar:{color:"rgba(0, 0, 0, 0.38)",marginRight:"12px"},label:{fontSize:"20px",letterSpacing:"0.25px",lineHeight:"1.2",fontWeight:500,color:e.palette.text.primary,wordBreak:"break-word"}}))),va=e=>{let{label:t}=e;const n=ya();return o().createElement(F.Toolbar,{className:n.toolbar},o().createElement(ha.Z,{className:n.avatar}),o().createElement(F.Typography,{variant:"h6",className:n.label},t))};function xa(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){Ea(e,t,n[t])}))}return e}function Ea(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wa=(0,_.Z)((e=>({perspectiveView:{position:"absolute",top:0,left:0,right:0,bottom:0,fontFamily:"Roboto, Helvetica, Arial, sans-serif",overflow:"hidden",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.default},tagsContainer:{display:"flex"},fullHeight:{flexGrow:1,height:0},tagsView:{margin:"16px",width:"100%",paddingTop:"4px"},listContainer:{flex:1,display:"flex",overflow:"hidden",position:"relative",flexDirection:"column",minHeight:"4px"},entitiesList:{overflowY:"auto",flexGrow:1},pagination:{flexGrow:0}}))),Ca=[25,50,100],Sa=(0,r.memo)((e=>{let{tag:t,entityUri:n}=e;const l=wa(),[s,c]=(0,r.useState)(Ca[0]),[u,p]=(0,r.useState)(0),d=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions);(0,r.useEffect)((()=>{p(0)}),[t,n,d]);const{isLoading:m,total:f,entities:h}=(e=>{let{tag:t,entityUri:n,page:o=0,rowsPerPage:l=50}=e;const s=(0,a.useDispatch)(),c=(0,he._)(),u=(0,he._)(),[p,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(0),[h,y]=(0,r.useState)([]),{requestEntities:x,requestTotal:E}=(e=>{let{entityUri:t,tag:n}=e;const o=(0,a.useSelector)(v.ZP.selectors.getGlobalSearchRequestOptions),l=(0,a.useSelector)(v.ZP.selectors.getTenant),s=(0,a.useSelector)(v.ZP.selectors.getDtssPath),c=(0,r.useMemo)((()=>(0,g.Do$)(t)),[t]),u=(0,r.useMemo)((()=>[{filter:"equals",fieldName:"tags",values:[n]}]),[n]),p=!!c,d=(0,r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=xa({select:"uri,label,type,secondaryLabel,defaultProfilePicValue,startDate,endDate"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return p?(0,g.uqV)({filters:e,options:t,customerTenant:l,dataTenant:c,dtssPath:s}).then((0,i.map)((0,i.assoc)("dataTenant",c))):(0,g.ZOr)(e,t)}),[p,c,l,s]);return{requestEntities:(0,r.useCallback)(((e,t)=>d(u,xa({offset:t,max:e},o))),[u,o,d]),requestTotal:(0,r.useCallback)((()=>{const e=o;return(p?(0,g.J$m)({filters:u,options:e,customerTenant:l,dataTenant:c,dtssPath:s}):(0,g.j_Q)(u,e)).then((e=>e.total))}),[u,o,p,c,l,s])}})({entityUri:n,tag:t}),w=(0,r.useCallback)((e=>{s(v.ui.actions.errorSet((0,g.xU7)(e,b().text("Something went wrong")))),f(0)}),[s]);return(0,r.useEffect)((()=>{c(E()).then(f).catch(w)}),[E,c,w]),(0,r.useEffect)((()=>{d(!0),u(x(l,o*l)).then(y).catch(w).finally((()=>d(!1)))}),[o,l,x,u,w]),{isLoading:p,total:m,entities:h}})({tag:t,entityUri:n,page:u,rowsPerPage:s}),y=(0,r.useRef)(null);(0,r.useEffect)((()=>{y.current&&(y.current.scrollTop=0)}),[h]);const x=f>Ca[0];return o().createElement("div",{className:l.perspectiveView},o().createElement(va,{label:t}),o().createElement("div",{className:L()(l.tagsContainer,{[l.fullHeight]:x})},o().createElement(z.Z,{className:l.tagsView},o().createElement(ba,{total:f}),o().createElement("div",{className:l.listContainer},m&&o().createElement(R.Z,null),f>0&&o().createElement("div",{className:l.entitiesList,ref:y},o().createElement(da.Z,{entities:h})),x&&o().createElement("div",{className:l.pagination},o().createElement(V.Z,{count:f,rowsPerPageOptions:Ca,rowsPerPage:s,page:u,onChangePage:p,onChangeRowsPerPage:c}))))))}));Sa.displayName="TagPerspectiveView";const Pa=(0,s.createGenerateClassName)({productionPrefix:"tagPerspective",disableGlobal:!0}),Oa=e=>{let{config:t,tag:n,entityUri:r,store:l,onResize:u=i.identity}=e;return o().createElement(a.Provider,{store:l},o().createElement(p.m.Provider,{value:t.id},o().createElement(s.StylesProvider,{generateClassName:Pa},o().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>u(Math.floor(e),Math.floor(t))}),t&&o().createElement(Sa,{tag:n,entityUri:r}),o().createElement(m.Z,{showErrorFromStore:!0}))))}},1242:(e,t,n)=>{e.exports=n.p+"5271a9e7b6651c852e93.png"}}]);
|
package/6971.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[6971],{8598:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(95038),r=n.n(a);const o=function(){function e(e){var t=void 0===e?{}:e,n=t.locale,a=t.instance,o=t.moment;this.yearFormat="YYYY",this.yearMonthFormat="MMMM YYYY",this.dateTime12hFormat="MMMM Do hh:mm a",this.dateTime24hFormat="MMMM Do HH:mm",this.time12hFormat="hh:mm A",this.time24hFormat="HH:mm",this.dateFormat="MMMM Do",this.moment=a||o||r(),this.locale=n}return e.prototype.parse=function(e,t){return""===e?null:this.moment(e,t,!0)},e.prototype.date=function(e){if(null===e)return null;var t=this.moment(e);return t.locale(this.locale),t},e.prototype.isValid=function(e){return this.moment(e).isValid()},e.prototype.isNull=function(e){return null===e},e.prototype.getDiff=function(e,t){return e.diff(t)},e.prototype.isAfter=function(e,t){return e.isAfter(t)},e.prototype.isBefore=function(e,t){return e.isBefore(t)},e.prototype.isAfterDay=function(e,t){return e.isAfter(t,"day")},e.prototype.isBeforeDay=function(e,t){return e.isBefore(t,"day")},e.prototype.isBeforeYear=function(e,t){return e.isBefore(t,"year")},e.prototype.isAfterYear=function(e,t){return e.isAfter(t,"year")},e.prototype.startOfDay=function(e){return e.clone().startOf("day")},e.prototype.endOfDay=function(e){return e.clone().endOf("day")},e.prototype.format=function(e,t){return e.locale(this.locale),e.format(t)},e.prototype.formatNumber=function(e){return e},e.prototype.getHours=function(e){return e.get("hours")},e.prototype.addDays=function(e,t){return t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days")},e.prototype.setHours=function(e,t){return e.clone().hours(t)},e.prototype.getMinutes=function(e){return e.get("minutes")},e.prototype.setMinutes=function(e,t){return e.clone().minutes(t)},e.prototype.getSeconds=function(e){return e.get("seconds")},e.prototype.setSeconds=function(e,t){return e.clone().seconds(t)},e.prototype.getMonth=function(e){return e.get("month")},e.prototype.isSameDay=function(e,t){return e.isSame(t,"day")},e.prototype.isSameMonth=function(e,t){return e.isSame(t,"month")},e.prototype.isSameYear=function(e,t){return e.isSame(t,"year")},e.prototype.isSameHour=function(e,t){return e.isSame(t,"hour")},e.prototype.setMonth=function(e,t){return e.clone().month(t)},e.prototype.getMeridiemText=function(e){return"am"===e?"AM":"PM"},e.prototype.startOfMonth=function(e){return e.clone().startOf("month")},e.prototype.endOfMonth=function(e){return e.clone().endOf("month")},e.prototype.getNextMonth=function(e){return e.clone().add(1,"month")},e.prototype.getPreviousMonth=function(e){return e.clone().subtract(1,"month")},e.prototype.getMonthArray=function(e){for(var t=[e.clone().startOf("year")];t.length<12;){var n=t[t.length-1];t.push(this.getNextMonth(n))}return t},e.prototype.getYear=function(e){return e.get("year")},e.prototype.setYear=function(e,t){return e.clone().set("year",t)},e.prototype.mergeDateAndTime=function(e,t){return this.setMinutes(this.setHours(e,this.getHours(t)),this.getMinutes(t))},e.prototype.getWeekdays=function(){return this.moment.weekdaysShort(!0)},e.prototype.isEqual=function(e,t){return null===e&&null===t||this.moment(e).isSame(t)},e.prototype.getWeekArray=function(e){for(var t=e.clone().startOf("month").startOf("week"),n=e.clone().endOf("month").endOf("week"),a=0,r=t,o=[];r.isBefore(n);){var l=Math.floor(a/7);o[l]=o[l]||[],o[l].push(r),r=r.clone().add(1,"day"),a+=1}return o},e.prototype.getYearRange=function(e,t){for(var n=this.moment(e).startOf("year"),a=this.moment(t).endOf("year"),r=[],o=n;o.isBefore(a);)r.push(o),o=o.clone().add(1,"year");return r},e.prototype.getCalendarHeaderText=function(e){return this.format(e,this.yearMonthFormat)},e.prototype.getYearText=function(e){return this.format(e,"YYYY")},e.prototype.getDatePickerHeaderText=function(e){return this.format(e,"ddd, MMM D")},e.prototype.getDateTimePickerHeaderText=function(e){return this.format(e,"MMM D")},e.prototype.getMonthText=function(e){return this.format(e,"MMMM")},e.prototype.getDayText=function(e){return this.format(e,"D")},e.prototype.getHourText=function(e,t){return this.format(e,t?"hh":"HH")},e.prototype.getMinuteText=function(e){return this.format(e,"mm")},e.prototype.getSecondText=function(e){return this.format(e,"ss")},e}()},27604:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=o},99144:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");t.Z=o},67766:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");t.Z=o},42767:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");t.Z=o},72753:(e,t,n)=>{var a=n(14859);t.Z=void 0;var r=a(n(24328)),o=(0,a(n(50175)).default)(r.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");t.Z=o},48852:(e,t,n)=>{n.d(t,{l:()=>l});var a=n(24328),r=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 a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(this,arguments)}const l=(e,t,n)=>{if(e&&t){const l=(0,a.memo)(n);return l.displayName=n.name,n=>r().createElement(e.Consumer,null,(e=>r().createElement(l,o({},n,t(e,n)))))}return n}},32528:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(13688),r=n(48852);const o=e=>t=>(0,r.l)(a.X,e,t)},1876:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(24328),r=n.n(a),o=n(13980),l=n.n(o),i=n(87918),s=n.n(i),c=n(94079),p=n(87685);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=e=>r().createElement("svg",u({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),r().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),m=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),f=e=>{let{enabled:t,onClick:n}=e;const a=m();return r().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},r().createElement(c.IconButton,{onClick:n,classes:{root:a.button}},t?r().createElement(r().Fragment,null,r().createElement(d,{className:a["filterIcon--enabled"]}),r().createElement(p.default,{color:"primary",className:a.closeIcon})):r().createElement(d,null)))};f.propTypes={enabled:l().bool,onClick:l().func};const y=f},58662:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(13980),r=n.n(a),o=n(24328),l=n.n(o),i=n(71153),s=n.n(i),c=n(94079),p=n(87918),u=n.n(p),d=n(31276),m=n(17440);const f=(0,n(79692).Z)({pagination:{display:"flex",alignItems:"center",justifyContent:"flex-end",height:"56px",borderTop:"1px solid rgba(0,0,0,0.12)",boxShadow:"none"},caption:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px"},selectRoot:{marginLeft:"5px",marginRight:"36px"},select:{color:"rgba(0,0,0,0.6)",fontSize:"12px",lineHeight:"16px",textAlign:"right"},actions:{marginLeft:"32px"}});function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){b(e,t,n[t])}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=e=>{let{classes:t={},count:n,rowsPerPageOptions:a,page:r,onChangePage:i,rowsPerPage:p,onChangeRowsPerPage:b,basicTableRef:g,labelRowsPerPage:h}=e;const v=f(),x=(0,o.useCallback)((()=>{(0,m.pathOr)(m.identity,["current","resetScrollbarPosition"],g)()}),[g]),E=(0,o.useCallback)((e=>{i(e),x()}),[i,x]),C=(0,o.useCallback)((e=>{i(0),b(e),x()}),[i,b,x]);return l().createElement(c.TablePagination,{classes:y({},t,{root:s()(v.pagination,t.root),select:s()(v.select,t.select),caption:v.caption,selectRoot:v.selectRoot,actions:v.actions}),component:"div",labelRowsPerPage:h||u().text("Rows per page:"),labelDisplayedRows:e=>{let{from:t,to:n,count:a}=e;return u().text("${fromRow}-${toRow} of ${countRows}",{fromRow:u().number(t,"0,0"),toRow:u().number(n,"0,0"),countRows:u().number(a,"0,0")})},count:n,rowsPerPageOptions:a,page:r,onChangePage:(0,m.pipe)((0,m.nthArg)(1),E),rowsPerPage:p,onChangeRowsPerPage:(0,m.pipe)(d.NA,C)})};g.propTypes={classes:r().object,rowsPerPageOptions:r().arrayOf(r().number),count:r().number,page:r().number,onChangePage:r().func,rowsPerPage:r().number,onChangeRowsPerPage:r().func,basicTableRef:r().shape({current:r().object}),labelRowsPerPage:r().string};const h=l().memo(g)},26180:(e,t,n)=>{n.d(t,{ZP:()=>y});var a=n(17440),r=n(31276);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){l(e,t,n[t])}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i="CHANGE_COLUMNS",s="TOGGLE_FILTERS",c="CHANGE_FILTER",p="TOGGLE_SORT",u="CHANGE_PAGE",d="CHANGE_ROWS_PER_PAGE",m={changeColumns:(0,r.zD)(i),toggleFilters:(0,r.zD)(s),changeFilter:(0,r.zD)(c),toggleSort:(0,r.zD)(p),changePage:(0,r.zD)(u),changeRowsPerPage:(0,r.zD)(d)},f=(e,t)=>{const n=(0,a.difference)(e.visibleColumns,t),r=e=>n.includes(e);return(0,a.evolve)({visibleColumns:(0,a.always)(t),sorting:(0,a.when)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(e.field)}),(()=>{const[e]=t;return{field:e,order:"asc"}})),filters:e=>(0,a.keys)(e).reduce(((e,t)=>r(t)?(0,a.dissoc)(t,e):e),e)},e)},y={reducer:(e,t)=>{switch(t.type){case i:{const n=t.payload;return f(e,n)}case s:{const t=!e.filters;return o({},e,{filters:t?{}:null,page:t?e.page:0})}case c:{const{columnId:n,filter:r}=t.payload;return(0,a.evolve)({filters:r?(0,a.assoc)(n,r):(0,a.dissoc)(n),page:(0,a.always)(0)},e)}case p:{const n=t.payload,l=(0,a.path)(["sorting","field"],e),i=(0,a.path)(["sorting","order"],e);return o({},e,{sorting:{field:n,order:(0,r.Dh)(n===l?i:null)},page:0})}case u:return o({},e,{page:t.payload});case d:return o({},e,{rowsPerPage:t.payload});default:return e}},actions:m,changeVisibleColumns:f}},10237:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(27556),r=n(13980),o=n.n(r),l=n(24328),i=n.n(l);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=(0,n(79692).Z)((e=>({"basic-view__paper":s({display:"flex",flexDirection:"column"},e.basicView)})));function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}const d=(0,l.forwardRef)(((e,t)=>{let{children:n,className:r}=e,o=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["children","className"]);const l=p();return i().createElement(a.Z,u({ref:t,className:r,classes:{root:l["basic-view__paper"]}},o),n)}));d.displayName="BasicView",d.propTypes={children:o().node,className:o().string};const m=d},81137:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(24328),r=n.n(a),o=n(87918),l=n.n(o),i=n(94079);const s=(0,n(79692).Z)({paper:{minHeight:"180px"},title:{padding:"16px 16px 10px 16px",fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px"},content:{padding:"0 16px"},contentText:{marginBottom:0,fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px"},actionButtons:{display:"flex",paddingTop:"4px",fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px","& > div":{marginLeft:"auto"}},discardButton:{marginRight:"8px"}}),c=e=>{let{open:t,title:n,content:a,onCancel:o,cancelCaption:c=l().text("Cancel"),onDiscard:p,discardCaption:u="",onSave:d,saveCaption:m=l().text("Save"),disabledSave:f=!1}=e;const y=s();return r().createElement(i.Dialog,{open:t,onClose:o,classes:{paperScrollPaper:y.paper}},r().createElement(i.DialogTitle,{classes:{root:y.title}},n),r().createElement(i.DialogContent,{classes:{root:y.content}},r().createElement(i.DialogContentText,{classes:{root:y.contentText}},a)),r().createElement(i.DialogActions,{className:y.actionButtons,disableSpacing:!0},o&&r().createElement(i.Button,{onClick:o},c),r().createElement("div",null,p&&r().createElement(i.Button,{onClick:p,classes:{root:y.discardButton}},u),r().createElement(i.Button,{onClick:d,color:"primary",disabled:f,autoFocus:!0},m))))}},68439:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(24328),r=n.n(a),o=n(52730),l=n(71153),i=n.n(l),s=n(94079),c=n(99493),p=n(87638);const u=(0,n(79692).Z)({"entityType-small":{padding:"1px 4px",fontSize:"10px",lineHeight:"normal",display:"inline-flex",marginRight:"12px",borderRadius:"2px"},"entityType-medium":{padding:"2px 8px 3px",borderRadius:"2px",fontSize:"13px",fontWeight:500,lineHeight:"15px",display:"inline-flex",marginRight:"16px"}}),d=e=>{let{entity:t,className:n,size:a="small"}=e;const l=u(),d=(0,o.useSelector)(p.ZP.selectors.getMetadata),m=t.type,f=(0,c.nt9)(d,m)||{},y=(0,c.VD3)(d,f,"typeColor")||c.rSc.palette.primary.main;return r().createElement(s.Typography,{style:{backgroundColor:y,color:c.P6Y.Colors.getColor(y)?"#FFFFFF":"#212121"},className:i()(l[`entityType-${a}`],n),component:"div"},(0,c.jFi)(d,t))}},57304:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(24328),r=n.n(a),o=n(13980),l=n.n(o),i=n(71153),s=n.n(i),c=n(52730),p=n(17440),u=n(94079),d=n(87918),m=n.n(d),f=n(99493),y=n(87638),b=n(53180),g=n(68439);const h=(0,n(79692).Z)((e=>({profileBandWrapper:{flexShrink:0},profileBand:{display:"flex",padding:"16px 12px 16px 16px",alignItems:"flex-start",backgroundColor:"#fff",boxShadow:"inset 0 -1px 0 0 rgba(0,114,206,0.06), inset 0 1px 0 0 rgba(0,114,206,0.06);","&:after":{content:'""',minHeight:"inherit",fontSize:0}},inactive:{background:e.inactiveBackground},profileIcon:{marginRight:"12px"},imageProfileIcon:{width:"48px",height:"48px"},profileInfo:{display:"flex",flexDirection:"column",flex:"1 1 50%"},badge:{},label:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary,wordBreak:"break-word","&+ $specialInfo":{marginTop:"4px"}},secondaryLabel:{display:"inline-flex",color:e.palette.text.primary,marginTop:"2px",lineHeight:"16px",fontSize:"14px",fontWeight:400,"&+ $businessCard":{marginLeft:"12px"}},businessCard:{color:e.palette.text.secondary,display:"inline-flex",fontSize:"14px",marginTop:"4px",lineHeight:"1.2"},specialInfo:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",width:"100%",marginTop:"8px"},entityType:{display:"flex",flexWrap:"wrap"},entityId:{fontSize:"13px",color:e.palette.text.secondary,whiteSpace:"nowrap",cursor:"pointer","&:hover":{textDecoration:"underline"}}}))),v=e=>{let{className:t,entity:n,children:o,classes:l}=e;const i=h({classes:l}),d=(0,c.useSelector)(y.ZP.selectors.getMetadata),v=(0,a.useCallback)((()=>{navigator.clipboard.writeText((0,f.BTI)(n))}),[n]);if((0,p.isNil)(n))return null;const x=(0,f.idV)(n.label),E=n.secondaryLabel,C=(0,f.ptG)(d,n),w=(0,f.Fn9)(n),S=n.uri,T=(0,f.BTI)(n);return r().createElement("div",{className:s()(i.profileBandWrapper,t)},r().createElement("div",{className:s()(i.profileBand,{[i.inactive]:!w}),"data-entity-uri":S},r().createElement(b.Z,{key:n.uri,entity:n,avatarClassName:i.profileIcon,imageClassName:i.imageProfileIcon}),r().createElement("div",{className:i.profileInfo},r().createElement("div",null,r().createElement(u.Typography,{variant:"h6",className:i.label},x),E&&r().createElement(u.Typography,{variant:"subtitle2",className:i.secondaryLabel},E),C&&r().createElement(u.Typography,{variant:"subtitle1",className:i.businessCard},C)),r().createElement("div",{className:i.specialInfo},r().createElement("div",{className:i.entityType},r().createElement(g.Z,{entity:n,size:"medium",className:i.badge}),!(0,f.ZiX)(S)&&r().createElement(u.Tooltip,{title:m().text("Copy to clipboard")},r().createElement(u.Typography,{display:"inline",variant:"body2",className:i.entityId,onClick:v},m().text("Entity ID"),": ",T))))),o&&r().createElement("div",null,o)))};v.propTypes={className:l().string,entity:l().object,children:l().node,classes:l().object};const x=v},30553:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(13980),r=n.n(a),o=n(24328),l=n.n(o);const i=e=>{let{height:t,margin:n}=e;return l().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};i.propTypes={height:r().number,margin:r().number};const s=i},86361:(e,t,n)=>{n.d(t,{o:()=>l});var a=n(24328),r=n(17440);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>{let{actions:t,dispatch:n}=e;return(0,a.useMemo)((()=>Object.entries(t).reduce(((e,t)=>{let[a,l]=t;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){o(e,t,n[t])}))}return e}({},e,{[a]:(0,r.pipe)(l,n)})}),{})),[n,t])}},7718:(e,t,n)=>{n.d(t,{C:()=>d});var a=n(24328),r=n(52730),o=n(17440),l=n(99493),i=n(87638);function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){c(e,t,n[t])}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=[],u=e=>console.error("Collaboration error",e),d=e=>{let{objectIds:t=p,objectTypes:n,enabled:c=!0}=e;const d=(0,r.useSelector)(i.ZP.selectors.getEntity),m=(0,r.useSelector)(i.ZP.selectors.getTenant),f=(0,r.useSelector)(i.ZP.selectors.getCollaborationPath),y=(0,r.useSelector)(i.ZP.selectors.isCollaborationEnabled)&&c,[b,g]=(0,a.useState)(null),[h,v]=(0,a.useState)([]),[x,E]=(0,a.useState)(null),[C,w]=(0,a.useState)(null),[S,T]=(0,a.useState)(!1),[O,P]=(0,a.useState)(!1),k=(0,a.useCallback)((e=>{E((t=>s({},t,e)))}),[]),D=null==d?void 0:d.uri,R=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(y&&D&&!(0,l.ZiX)(D)){const n=e=>{console.warn("Collaboration error",e),E(null)};(0,o.pipe)(l.$oF,(0,o.andThen)((0,o.map)((0,o.props)(["objectId","comments"]))),(0,o.andThen)(o.fromPairs),(0,o.andThen)(t?E:k),(0,o.otherwise)(n))({uris:e,tenant:m,collaborationPath:f})}else E(null)}),[k,f,D,y,m]);(0,a.useEffect)((()=>{R(t,!0)}),[t,R]);const N=(0,a.useCallback)(((e,t)=>{(0,l.liG)({collaborationPath:f,tenant:m,relatedObjectUri:e,pageToken:t}).then((e=>{let{items:n,nextPageToken:a}=e;v((e=>t?(0,o.uniqBy)((0,o.prop)("commentId"),[...e,...n]):n)),g(a)})).catch(u)}),[f,m]),j=(0,a.useCallback)((e=>{P(!0),(0,l.d7q)({collaborationPath:f,tenant:m,commentId:e}).then(w).catch(u).finally((()=>P(!1)))}),[f,m]),Z=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:o}=e;T(!0);const i={objectId:r,content:t,relatedObjectUris:o,objectType:a,visibility:"public",namedUsers:n,permanentLink:""};return(0,l.Yrx)({collaborationPath:f,tenant:m,data:i}).then((e=>{let[t]=e;return((e,t)=>{w(e),E((n=>s({},n,{[t]:[...n[t]||[],{commentId:e.commentId,replies:0,status:"open"}]}))),v((t=>[e,...t]))})(t,r)})).catch(u).finally((()=>T(!1)))}),[f,m]),M=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,objectType:a,uri:r,relatedObjectUris:i,commentId:c,replies:p}=e;T(!0);const d={objectId:r,content:t,relatedObjectUris:i,objectType:a,visibility:"public",namedUsers:n,permanentLink:"",commentId:c,replies:p};return(0,l.uAg)({collaborationPath:f,tenant:m,data:d}).then((e=>(e=>{w(e),v((0,o.map)((0,o.when)((0,o.propEq)("commentId",e.commentId),(0,o.always)(e))))})(s({},e,{replies:p})))).catch(u).finally((()=>T(!1)))}),[f,m]),I=(0,a.useCallback)((e=>{let{uri:t,commentId:n}=e;T(!0),(0,l.YFy)({collaborationPath:f,tenant:m,commentId:n}).then((()=>((e,t)=>{w(null),E((n=>{const a=n[t]||[];return s({},n,{[t]:a.filter((t=>t.commentId!==e))})})),v((t=>t.filter((t=>t.commentId!==e))))})(n,t))).catch(u).finally((()=>T(!1)))}),[f,m]),A=(0,a.useCallback)(((e,t,n)=>{const a="resolve"===e.action?"resolved":"open";w("resolved"===a?e=>{if(e)return null}:t=>{if(t)return s({},t,{replies:[...t.replies,e]})}),E((e=>s({},e,{[t]:(e[t]||[]).map((e=>e.commentId===n?s({},e,{status:a,replies:e.replies+1}):e))}))),v((t=>t.map((t=>t.commentId===n?s({},t,{status:a,replies:[...t.replies,e]}):t))))}),[]),F=(0,a.useCallback)((e=>{let{content:t,namedUsers:n,commentId:a,action:r,uri:o}=e;T(!0);const i={content:t,action:r,namedUsers:n};return(0,l.PP2)({collaborationPath:f,tenant:m,commentId:a,data:i}).then((e=>{let[t]=e;return A(t,o,a)})).catch(u).finally((()=>T(!1)))}),[f,m,A]),L=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;F({content:"",namedUsers:[],commentId:t,action:"resolve",uri:n})}),[F]),U=(0,a.useCallback)((e=>{let{commentId:t,uri:n}=e;F({content:"",namedUsers:[],commentId:t,action:"reopen",uri:n})}),[F]);return{clearCurrentComment:(0,a.useCallback)((()=>{w(null)}),[]),comments:h,commentsMap:x,createComment:Z,createReply:F,currentComment:C,deleteComment:I,editComment:M,getComment:j,getComments:N,getCommentsCount:R,loading:O,objectTypes:n,pageToken:b,reOpenThread:U,resolveThread:L,sending:S}}},37152:(e,t,n)=>{n.d(t,{a:()=>m});var a=n(24328),r=n(52730),o=n(17440),l=n(87638),i=n(99493),s=n(67218),c=n(30634);function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=(0,o.when)(o.identity,(0,o.pipe)(i.VGB,o.length,(0,o.times)((e=>e+1)))),m=e=>{let{sorting:t,filter:n,page:u,rowsPerPage:m,config:f,entity:y,relationActivityFilter:b,mode:g}=e;const[h,v]=(0,a.useState)(!1),x=(0,r.useDispatch)(),E=(0,r.useSelector)(l.ZP.selectors.getTenant),C=(0,r.useSelector)(l.ZP.selectors.getDtssPath),{activityFilter:w,globalFilter:S}=(0,r.useSelector)(l.ZP.selectors.getGlobalSearchRequestOptions)||{},T=(0,s._)(),O=f.suggested,P=(0,a.useCallback)((()=>{if(null!=y&&y.uri){const e=p({},f.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:b||i.Ng6.ALL,entity:w},max:m,offset:u*m,filter:(0,i.vyX)(S,n)||void 0,suggested:d(O)}),a=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(i.VGB,(t=>t.map(((t,n)=>p({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(O)),r=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),i.ZiX),()=>Promise.resolve([{total:0}])],[i.biM,e=>(0,i.n_1)({entityUri:e.uri,configs:a,customerTenant:E,dataTenant:e.dataTenant,dtssPath:C})],[o.T,e=>(0,i.N6e)(e.uri,a)]]);v(!0),T(r(y)).then((e=>{let[{connections:t,total:n}]=e;x(l.N5.relations.actions.relationsLoaded({id:f.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[w,f,x,C,null==y?void 0:y.uri,null==y?void 0:y.dataTenant,n,S,u,b,m,T,t,E]),k=(0,a.useRef)(!1);k.current=!1,(0,a.useEffect)((()=>{k.current=!0,P()}),[P]);const D=(0,c.D)(g);return(0,a.useEffect)((()=>{g!==i.ARY.Viewing||k.current||D===g||(k.current=!0,P())}),[P,g,D]),{isLoading:h,reload:P}}},17554:(e,t,n)=>{n.d(t,{U:()=>i});var a=n(24328),r=n(52730),o=n(99493),l=n(87638);const i=()=>{const[e,t]=(0,a.useState)([]),n=(0,r.useSelector)(l.ZP.selectors.getTenant),i=(0,r.useSelector)(l.ZP.selectors.getServicesPath),s=e=>{console.warn("Users error",e),t([])};return(0,a.useEffect)((()=>{(0,o.kz_)({tenant:n,servicesPath:i}).then((e=>{let{array:n}=e;return t(n)})).catch(s)}),[n,i]),e}},55451:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ht});var a=n(24328),r=n.n(a),o=n(52730),l=n(8598),i=n(36138),s=n(44443),c=n(22664),p=n(39450),u=n(585),d=n(17440),m=n(87638),f=n(99493),y=n(17554),b=n(20562),g=n(37152),h=n(7718),v=n(49759),x=n(3515),E=n(31274),C=n(57304),w=n(93873),S=n(99136),T=n(58662);function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){P(e,t,n[t])}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const k={relationsTable:{},attributesTable:{}};var D=n(26180),R=n(31276),N=n(86361),j=n(87918),Z=n.n(j);const M="relation.type",I="relation.attributes",A=[{id:"entity.label",get label(){return Z().text("Profile")},dataTypeDefinition:{type:f.oS0.TYPE_STRING},hideable:!1,filterable:!1,initialWidth:280,autoResize:!1},{id:M,get label(){return Z().text("Type")}},{id:"relation.label",get label(){return Z().text("Directional Label")},filterable:!1,dataTypeDefinition:{type:f.oS0.TYPE_STRING}},{id:"relation.activeness.startDate",get label(){return Z().text("Start Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:"relation.activeness.endDate",get label(){return Z().text("End Date")},dataTypeDefinition:{type:f.oS0.TYPE_ACTIVENESS_DATE}},{id:I,get label(){return Z().text("Attributes")},sortable:!1,filterable:!1,maxAttrsToShow:7}],F=(0,d.pluck)("id",A),L=[M,I],U=[20,50,100],z=(0,d.pipe)(f.Tde,(0,d.concat)("relation.")),B=(0,d.pipe)((0,d.map)((e=>({id:z(e.uri),label:e.label,dataTypeDefinition:(0,f.PFL)(e)}))),(0,d.uniqBy)((0,d.prop)("id")));function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){W(e,t,n[t])}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const H="CHANGE_RELATION_TYPE",V="APPLY_SAVED_STATE",Y="SAVE_CURRENT_STATE",G=_({},D.ZP.actions,{changeRelationType:(0,R.zD)(H),applySavedState:(0,R.zD)(V),saveCurrentState:(0,R.zD)(Y)}),$=(0,d.assoc)("page",0),q=e=>(0,d.pipe)((0,d.prop)("visibleColumns"),(0,d.ifElse)((0,d.always)(e.currentRelationType),(0,d.without)(L),(0,d.concat)(L)),(0,d.intersection)(F))(e),X=e=>(0,d.path)(["visibleColumnsForRelationTypes",`${e.currentRelationType}`],e),K=e=>{const t=(0,d.either)(X,q)(e);return D.ZP.changeVisibleColumns(e,t)},J=e=>{const{currentRelationType:t,visibleColumns:n}=e;return(0,d.evolve)({visibleColumnsForRelationTypes:(0,d.assoc)(`${t}`,n)},e)},Q=(0,d.pipe)(J,(0,d.pick)(["currentRelationType","visibleColumnsForRelationTypes","filters","sorting"]));var ee=n(99341),te=n(94079),ne=n(92778),ae=n(30553),re=n(51229),oe=n(1876),le=n(60894),ie=n(79026),se=n(79692);const ce=(0,se.Z)({select:{fontSize:"13px",color:"rgba(0,0,0,.6)",paddingLeft:"15px","&&":{paddingRight:"35px"}},selectMenu:{"& li":{fontSize:"13px",height:"32px"}},textField:{maxWidth:"100%"}}),pe=e=>{let{value:t,onChange:n,relationTypes:o,className:l}=e;const i=ce(),s=(0,a.useMemo)((()=>(0,d.pipe)((0,d.map)((e=>{let{label:t,uri:n}=e;return{label:t,value:n}})),(0,d.concat)([{value:"",label:Z().text("All types")}]))(o)),[o]);return r().createElement("div",{className:l},r().createElement(ie.Z,{displayEmpty:!0,disableUnderline:!0,classes:{select:i.select},TextFieldProps:{classes:{root:i.textField}},MenuProps:{classes:{list:i.selectMenu}},value:t||"",entries:s,onChange:e=>n(e||null)}))},ue=(0,se.Z)((e=>({header:{height:"56px",boxSizing:"border-box",paddingRight:"10px"},title:{fontSize:"16px"},total:{fontSize:"14px",color:e.palette.text.secondary,flexShrink:0,marginRight:"5px"},relationTypeSelector:{margin:"0px 10px 0 30px",overflow:"hidden"}}))),de=(0,a.memo)((e=>{let{total:t,filteringEnabled:n,onToggleFilters:a,columnsData:o,selectedColumns:l,currentRelationType:i,onRelationTypeChange:s,relationTypes:c,onChangeColumns:p}=e;const u=ue();return r().createElement(ne.Z,{title:Z().text("Relationships"),classes:{root:u.header,title:u.title}},c.length>0&&r().createElement(pe,{className:u.relationTypeSelector,value:i,onChange:s,relationTypes:c}),r().createElement(ae.Z,{height:28,margin:20}),r().createElement(te.Typography,{variant:"caption",className:u.total},1===t?Z().text("${count} record",{count:t}):Z().text("${count} records",{count:t})),r().createElement(re.Z,null),r().createElement(oe.Z,{enabled:n,onClick:a}),r().createElement(ae.Z,{height:28,margin:8}),r().createElement(le.Z,{columnsData:o,selectedColumns:l,onChangeColumns:p}))}));var me=n(74402),fe=n(97946),ye=n(85709),be=n(25461),ge=n(92332),he=n(67353);const ve=(0,se.Z)((e=>({headCell:{display:"flex",alignItems:"center",height:"100%",width:"100%",fontSize:"12px",color:e.palette.text.secondary,background:"linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #FFFFFF"},rowCell:{fontSize:"13px",overflow:"hidden",overflowWrap:"break-word"},inactiveRowCell:{opacity:.6},defaultWrapper:{padding:"15px 25px 0 25px","&:last-child":{paddingBottom:"15px"}},entityCell:{display:"flex",alignItems:"flex-start",padding:"15px"},entityAvatar:{transform:"scale(0.5)",margin:"-10px 0 -10px -10px"},inactiveEntityAvatar:{overflow:"initial","&:after":{content:'""',position:"absolute",backgroundColor:"rgb(209, 206, 206)",border:"1px solid rgba(0, 0, 0, 1)",borderRadius:"2px",width:"12px",right:0,bottom:0,height:"12px"},"& > img":{borderRadius:"50%",overflow:"hidden"}},entityLabel:{color:e.palette.primary.main,textDecoration:"none",fontWeight:500},attributesWrapper:{padding:"15px 25px 10px 25px",color:"rgba(0,0,0,0.87)"},commentsContainer:{marginLeft:"auto"}}))),xe=(0,he.Z)((e=>{const t=ve();return r().createElement("div",{className:t.headCell},r().createElement(ge.default,e))}));var Ee=n(71153),Ce=n.n(Ee),we=n(19603),Se=n(31254),Te=n(31039),Oe=n(94646);const Pe=e=>{let{value:{entity:t,entityType:n,relation:a},isInactiveRelation:l}=e;const i=ve(),s=(0,o.useSelector)(m.ZP.selectors.getEntityUri);return r().createElement("div",{className:Ce()(i.entityCell,we.U)},r().createElement(Se.Z,{className:Ce()(i.entityAvatar,{[i.inactiveEntityAvatar]:l}),entityType:n}),r().createElement(Te.Z,{value:(0,f.wwR)({uri:t.entityUri,dataTenant:t.dataTenant}),className:i.entityLabel},(0,f.idV)(t.entityLabel)),r().createElement("div",{className:i.commentsContainer,onClick:e=>e.stopPropagation()},r().createElement(Oe.Z,{uri:a.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:s,connection:{relation:a,entity:t}}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})))};var ke=n(80931);const De=e=>{let{columnData:t,value:{attributes:n,attributeTypes:a}}=e;const o=ve();return r().createElement("div",{className:o.attributesWrapper,onClick:e=>e.stopPropagation()},r().createElement(ke.Z,{max:t.maxAttrsToShow,entity:{attributes:n},attrTypes:a,drawLines:!1}))};var Re=n(72768);const Ne=e=>{let{value:t,columnData:{dataTypeDefinition:n}}=e;const a=ve();return r().createElement("div",{className:a.defaultWrapper},r().createElement(Re.Z,{value:t,dataTypeDefinition:n}))};function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=(0,d.pipe)((0,d.split)("."),(0,d.slice)(2,1/0)),Me=e=>{if(e.startsWith("relation.attributes")){const t=Ze(e);return t.length>1?t.slice(0,-1):null}return null},Ie=e=>{switch(e){case"entity.label":return Pe;case"relation.attributes":return De;default:return Ne}},Ae=(0,d.map)((e=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){je(e,t,n[t])}))}return e}({sortable:!0,resizable:!0},e,{headCellRenderer:xe,nestedPath:Me(e.id),rowCellValueRenderer:Ie(e.id)}))),Fe=(0,d.cond)([[(0,d.pathEq)(["columnData","id"],"relation.attributes"),e=>{let{columnData:t,cell:n}=e;const a=(0,d.pipe)((0,d.path)(["values",0,"attributes"]),d.values,d.length)(n);return a>t.maxAttrsToShow?26*t.maxAttrsToShow+49:26*a+25}],[d.T,be.Z]]);function Le(){return Le=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Le.apply(this,arguments)}const Ue=e=>{let{cell:t,CellValueRenderer:n}=e,a=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["cell","CellValueRenderer"]);const o=ve();return r().createElement("div",{className:Ce()(o.rowCell,{[o.inactiveRowCell]:a.isInactiveRelation})},t.values.map(((e,t)=>r().createElement(n,Le({key:t,value:e},a)))))};var ze=n(22983),Be=n(43054),_e=n(55847),We=n(22385),He=n(81137),Ve=n(83348);const Ye=(0,se.Z)((e=>({menuItem:{minHeight:"32px",color:e.palette.text.secondary},menuText:{color:e.palette.text.primary,fontSize:"13px",lineHeight:"15px",letterSpacing:0,marginLeft:"16px"},buttons:{display:"flex",alignItems:"center",paddingRight:"5px"}}))),Ge=(0,Ve.Z)(te.MenuItem),$e=(0,a.forwardRef)(((e,t)=>{let{item:n,onMenuClose:a=R.ZT}=e;const o=Ye(),{icon:l,disabled:i,text:s,tooltip:c,onClick:p}=n;return r().createElement(Ge,{tooltipTitle:c,showForDisabled:!0,classes:{root:o.menuItem},onClick:e=>{a(),p(e)},disabled:i,ref:t},l,r().createElement(te.Typography,{classes:{root:o.menuText}},s))}));$e.displayName="MenuItemRenderer";const qe=$e,Xe=e=>{let{disableDelete:t,connection:{entity:n,relation:l},onMenuOpen:i=R.ZT,onMenuClose:s=R.ZT,onDelete:c}=e;const p=Ye(),u=(0,o.useSelector)(m.ZP.selectors.getMetadata),y=(0,d.pipe)((0,d.prop)("relationType"),(0,f.V3K)(u),(0,f.uGe)(f.BDP.DELETE))(l),b=!t&&y,[g,h]=(0,a.useState)(!1),v=()=>h(!1),x=[{disabled:!b,text:Z().text("Delete"),icon:r().createElement(ze.Z,null),tooltip:b?null:Z().text("You don't have permissions to delete"),onClick:()=>h(!0)}],E=(0,a.useCallback)((()=>{g||s()}),[g,s]);return r().createElement("div",{className:p.buttons},r().createElement(_e.Z,{MenuItemRenderer:qe,menuId:"relationships-table-actions",buttonComponent:We.Z,buttonProps:{icon:Be.Z,size:"S"},menuItems:x,onMenuOpen:i,onMenuClose:E}),r().createElement(He.Z,{open:g,title:Z().text('Do you want to delete relationship "${label}"?',{label:(C=(0,f.idV)(n.entityLabel),C.length>17?`${C.substring(0,17)}...`:C)}),content:Z().text("This relationship will be removed and all the values in the relationship will be permanently deleted. Are you sure you want to delete this relationship?"),onSave:(0,d.pipe)(v,s,c),onDiscard:(0,d.pipe)(v,s),saveCaption:Z().text("Delete"),discardCaption:Z().text("Cancel")}));var C},Ke=(0,se.Z)({tableContainer:{flex:1,overflow:"hidden",display:"flex",zIndex:0},hoveredRowRightContentWrapper:{width:"100%",pointerEvents:"none!important"},menuButtonContainer:{position:"absolute",top:"calc(50% - 12px)",right:0,pointerEvents:"all"},tooltipAnchor:{width:"100%",height:"1px"}});function Je(){return Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Je.apply(this,arguments)}const Qe=(0,a.memo)((e=>{let{metadata:t,connections:n,columnsData:o,sorting:l,onSort:i,filters:s,onFilter:c,onRowClick:p,tableRef:u,onDelete:m,readOnly:y}=e;const b=Ke(),g=(0,a.useMemo)((()=>((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.reduce)(((t,a)=>{let{id:r}=a;return(0,d.assoc)(r,((e,t,n)=>{let{entity:a,relation:r}=t;switch(n){case"entity.label":return{entity:a,entityType:(0,f.nt9)(e,a.entityType),relation:r};case"relation.type":return r.relationType;case"relation.label":return r.relationLabel;case"relation.activeness.startDate":return r.startDate;case"relation.activeness.endDate":return r.endDate;case"relation.attributes":return{attributes:r.object.attributes,attributeTypes:(0,f.V3K)(e,r.relationType).attributes};default:return((e,t)=>(0,d.pipe)((0,d.path)(["object","attributes"]),(0,f.tT_)(e))(t))(Ze(n),r)}})(e,n,r),t)}),{}),(0,d.assoc)("rawValue",n))(t))))(t,o,n)),[t,n,o]),h=(0,a.useMemo)((()=>Ae(o)),[o]),{getDynamicRowCellHeight:v,changeRowCellHeight:x}=(0,me.Z)(),E=(0,a.useCallback)((0,d.either)(v,Fe),[v,Fe]),[C,w]=(0,a.useState)(null),S=(0,a.useCallback)((e=>{const t=!(0,f.Fn9)(e.rowValue.rawValue.relation);return r().createElement(fe.Z,Je({onChangeHeight:x},e),r().createElement(Ue,Je({},e,{isInactiveRelation:t})))}),[x]),[T,O]=(0,a.useState)(!1),P=(0,a.useCallback)((()=>O(!0)),[]),k=(0,a.useCallback)((()=>{w(null),O(!1)}),[]),D=(0,a.useCallback)((e=>w((t=>T?t:e))),[T]),R=(0,a.useMemo)((()=>{const e=null!=C?g[C].rawValue:null,t=!(0,f.Fn9)(null==e?void 0:e.relation);return e&&r().createElement(r().Fragment,null,r().createElement(te.Tooltip,{key:e.relation.relationUri,open:t,title:Z().text("Inactive")},r().createElement("div",{className:b.tooltipAnchor})),r().createElement("div",{className:b.menuButtonContainer},r().createElement(Xe,{disableDelete:y,connection:e,onMenuOpen:P,onMenuClose:k,onDelete:()=>m(e.relation.relationUri)})))}),[m,g,C]);return r().createElement("div",{className:b.tableContainer},r().createElement(ye.Z,{fixFirstColumn:!0,columnsData:h,rowsData:g,sorting:l,onSort:i,filters:s,onFilter:c,defaultColumnWidth:250,defaultColumnMinWidth:200,headRowHeight:48,getRowCellHeight:E,renderRowCell:S,onRowClick:p,ref:u,hoverStateEnabled:!0,hoverRowIndex:C,onRowHover:D,hoveredRowRightContent:R,classes:{hoveredRowRightContentWrapper:b.hoveredRowRightContentWrapper}}))}));var et=n(67218),tt=n(85965),nt=n(39417),at=n(10237),rt=n(63149),ot=n(48017),lt=n(96955),it=n(66095),st=n(20982),ct=n(99144),pt=n(65549),ut=n(52017),dt=n(90186);const mt=(0,se.Z)((()=>({tableRow:{"& + &":{marginTop:"4px"},margin:"auto",maxWidth:"448px"}})));function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yt=(0,a.memo)((e=>{let{readOnly:t,relation:n,metadata:o,selectedAttributeTypes:l,onDeleteCrosswalk:i,onEditCrosswalk:s}=e;const c=mt(),p=(0,f.V3K)(o,n.type),u=(0,a.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,d.pipe)((0,d.propOr)([],"crosswalks"),(0,d.map)((0,d.assoc)("ownerType","entity")),(0,dt.o)(e.type,t))(e)}(n,l)),[n,l]),[m,y]=(0,a.useState)([]),b=(0,a.useCallback)((e=>{i({entityUri:n.uri,crosswalkId:e})}),[i,n.uri]),g=(0,a.useCallback)((e=>{s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){ft(e,t,n[t])}))}return e}({entityUri:n.uri},e))}),[s,n.uri]);return r().createElement("div",null,u.map((e=>{let{source:n,crosswalksByTypes:a}=e;return r().createElement("div",{key:n,className:c.tableRow},r().createElement(ut.Z,{source:n,crosswalksByTypes:a,expanded:m.includes(n),disableEditCrosswalk:!(0,f.Zm0)(p)||t,disableDeleteCrosswalk:!(0,f.a14)(p)||t,onEdit:g,onDelete:b,onToggleExpanded:()=>{y((0,d.ifElse)((0,d.includes)(n),(0,d.without)([n]),(0,d.append)(n)))}}))})))}));var bt=n(79769);const gt=(0,se.Z)((e=>({header:{display:"flex",flexDirection:"row",alignItems:"center",padding:"20px 12px",borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},title:{fontWeight:500,fontSize:"20px",lineHeight:"23px",letterSpacing:"0.25px",color:e.palette.text.primary,marginLeft:"12px"},hint:{color:e.palette.text.secondary,display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"flex-start",margin:"4px 14px 10px"},hintText:{marginLeft:"8px",fontSize:"12px",lineHeight:"16px"},buttons:{display:"flex",padding:"8px 6px 4px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"},editor:{paddingLeft:25,margin:"auto",maxWidth:"448px",boxSizing:"border-box",marginBottom:"4px"},tableContainer:{overflowY:"auto",overflowX:"hidden",paddingLeft:"16px",paddingRight:"6px"}}))),ht=(0,Ve.Z)(te.Button),vt=(0,a.memo)((e=>{let{className:t,readOnly:n,relation:l,selectedAttributeTypes:i,onAddCrosswalk:s,onDeleteCrosswalk:c,onEditCrosswalk:p}=e;const u=gt(),d=(0,o.useSelector)(m.ZP.selectors.getMetadata),y=(0,f.V3K)(d,l.type),[b,g]=(0,a.useState)(!1),h=(0,f.mkC)(y)&&!n;return r().createElement("div",{className:t},r().createElement("div",{className:u.header},r().createElement("span",{className:u.title},Z().text("Legend"))),r().createElement("div",{className:u.buttons},r().createElement(ht,{color:"primary",showForDisabled:!0,disabled:!h,tooltipTitle:h?null:Z().text("You don't have permissions to add crosswalk"),onClick:()=>g(!0)},r().createElement(pt.Z,{className:u.icon}),r().createElement("div",{className:u.buttonLabel},Z().text("Crosswalk")))),r().createElement("div",{className:u.hint},r().createElement(ct.Z,{className:u.icon}),r().createElement("span",{className:u.hintText},Z().text("You can drag a crosswalk to add values to attributes swimlanes"))),r().createElement("div",{className:u.tableContainer},b&&r().createElement(bt.Z,{className:u.editor,onAdd:e=>s({entity:l,crosswalk:e}),onClose:()=>g(!1)}),r().createElement(yt,{readOnly:n,metadata:d,relation:l,selectedAttributeTypes:i,onDeleteCrosswalk:c,onEditCrosswalk:p})))}));var xt=n(88611),Et=n(23147),Ct=n(94111),wt=n(68439);const St=(0,se.Z)((e=>({entityInfo:{flex:"0 1 auto",overflow:"hidden",minWidth:"100px"},entityLabelContainer:{display:"flex",alignItems:"center",overflow:"hidden"},entityLabel:{lineHeight:"1.2",letterSpacing:"0.25px",color:e.palette.text.primary},infoIcon:{fontSize:"16px",color:e.palette.text.secondary,marginLeft:"5px"},profileBand:{margin:"-10px",maxWidth:"500px"},entityTypeBadge:{marginTop:"7px"}}))),Tt=e=>{let{entity:t}=e;const n=St(),a=(0,f.idV)(t.label);return r().createElement("div",{className:n.entityInfo},r().createElement("div",{className:n.entityLabelContainer},r().createElement(xt.C,{value:a},r().createElement(te.Typography,{variant:"h6",className:n.entityLabel,noWrap:!0},a)),r().createElement(Ct.Z,{title:r().createElement(C.Z,{className:n.profileBand,entity:t}),placement:"right"},r().createElement(ct.Z,{className:n.infoIcon}))),r().createElement(wt.Z,{className:n.entityTypeBadge,entity:t,size:"medium"}))},Ot=(0,se.Z)((e=>({root:{flexShrink:0,overflow:"hidden",width:"110px"},label:{color:e.palette.text.secondary,fontSize:"13px"}}))),Pt=e=>{let{relation:t}=e;const n=Ot(),{direction:a,relationLabel:o}=t;return r().createElement("div",{className:n.root},r().createElement(xt.C,{value:o},r().createElement(te.Typography,{variant:"subtitle2",className:n.label,align:"center",noWrap:!0},o)),r().createElement("svg",{width:"110",height:"12",fill:"black",fillOpacity:"0.3"},"out"===a&&r().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 0 9, 0 3, 94 3"}),"bidirectional"===a&&r().createElement("polygon",{points:"94 0, 110 6, 94 12, 94 9, 16 9, 16 12, 0 6, 16 0, 16 3, 94 3"}),"in"===a&&r().createElement("polygon",{points:"16 12, 0 6, 16 0, 16 3, 110 3, 110 9, 16 9"})))};var kt=n(8459),Dt=n(27604);const Rt=(0,se.Z)((()=>({root:{"&:hover $editButton":{visibility:"visible"}},editButton:{visibility:"hidden",marginLeft:"4px",marginBottom:"4px"},paper:{width:"150px",border:"3px solid rgba(0, 0, 0, 0.3)",borderRadius:"4px",boxSizing:"border-box",overflow:"hidden"}}))),Nt=e=>{let{value:t=null,onChange:n,readOnly:o}=e;const l=Rt(),i=(0,a.useRef)(),[s,c]=(0,a.useState)(!1),p=()=>c(!1),[u,d]=(0,a.useState)(t),m=()=>{u!==t&&n(u),p()};return r().createElement("span",{ref:i,className:l.root},t&&(0,f.p6d)(t),r().createElement(We.Z,{disabled:o,icon:Dt.Z,size:"XXS",className:l.editButton,onClick:()=>c(!0)}),r().createElement(te.Popover,{classes:{paper:l.paper},open:s,anchorEl:i.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:14,horizontal:20},onKeyUp:e=>{"Enter"===e.key?m():"Escape"===e.key&&p()},onBackdropClick:m},r().createElement(kt.Z,{InputProps:{autoFocus:!0,disableUnderline:!0,fullWidth:!0},size:"small",hiddenLabel:!0,label:void 0,value:u&&new Date(u),onChange:e=>d(e&&e.valueOf())})))},jt=(0,se.Z)((e=>({relationBand:{flexShrink:0,boxShadow:"inset 0px -1px 0px rgba(0,0,0,0.06)",padding:"16px 19px"},inactiveRelationBand:{opacity:.6,background:"rgba(185, 188, 197, 0.18)"},toolbar:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"10px"},mainInfo:{display:"flex",gap:"16px",marginLeft:"40px"},detailsInfo:{display:"flex",gap:"34px",marginLeft:"40px",marginTop:"17px",color:e.palette.text.secondary,fontSize:"13px"},detailTitle:{color:e.palette.text.primary,flexShrink:0,marginRight:"4px"},directionalLabel:{display:"flex",overflow:"hidden","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},relationDate:{flexShrink:0},commentsContainer:{marginRight:"18px"}})));function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),a.forEach((function(t){Mt(e,t,n[t])}))}return e}function Mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const It=(0,a.memo)((e=>{let{readOnly:t,entity:n,connection:a,onNavigateBack:o,onDelete:l,onChangeActivenessDate:i}=e;const s=!(0,f.Fn9)(a.relation),c=jt();return r().createElement("div",{className:Ce()(c.relationBand,we.U,{[c.inactiveRelationBand]:s})},r().createElement("div",{className:c.toolbar},r().createElement(We.Z,{icon:Et.Z,size:"S",onClick:()=>o()}),r().createElement(te.Typography,{variant:"subtitle2",display:"inline"},Z().text("Back to relationships")),r().createElement(re.Z,null),r().createElement("div",{className:c.commentsContainer},r().createElement(Oe.Z,{uri:a.relation.relationUri,relatedObjectUris:(0,f.wp9)(f.q7e.RELATION,{entityUri:null==n?void 0:n.uri,connection:a}),objectType:f.q7e.RELATION,allowOnlyOneComment:!0})),r().createElement(Xe,{connection:a,onDelete:l,disableDelete:t})),r().createElement("div",{className:c.mainInfo},r().createElement(Tt,{entity:n}),r().createElement(Pt,{relation:a.relation}),r().createElement(Tt,{entity:Zt({},a.entity.object,{dataTenant:a.entity.dataTenant})})),r().createElement("div",{className:c.detailsInfo},r().createElement("div",{className:c.directionalLabel},r().createElement("span",{className:c.detailTitle},Z().text("Directional label:")),r().createElement(xt.C,{value:a.relation.relationLabel},r().createElement("span",null,a.relation.relationLabel))),r().createElement("div",{className:c.relationDate},r().createElement("span",{className:c.detailTitle},Z().text("Start date:")),r().createElement(Nt,{value:a.relation.startDate,onChange:e=>i("startDate",e),readOnly:t})),r().createElement("div",{className:c.relationDate},r().createElement("span",{className:c.detailTitle},Z().text("End date:")),r().createElement(Nt,{value:a.relation.endDate,onChange:e=>i("endDate",e),readOnly:t}))))})),At=e=>{console.error(e),u.Z.addError({title:Z().text("Error"),message:(0,f.xU7)(e,Z().text("Something went wrong"))})};var Ft=n(58651),Lt=n(13896);const Ut=(0,se.Z)({detailsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},locked:{pointerEvents:"none"},resizablePanesWrapper:{flexGrow:1},pane:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",overflow:"hidden"}}),zt=(0,a.memo)((e=>{let{entity:t,connection:n,visibleColumns:o,onClose:l,onDeleteConnection:i,onChangeConnection:s,onChangeVisibleColumns:c,readOnly:p}=e;const u=Ut(),m=(()=>{const[e,t]=(0,a.useState)([]),n=(0,a.useRef)([]),r=(0,a.useCallback)((0,f.DsO)((()=>{t([...n.current])}),50),[]),o=(0,a.useCallback)((e=>{n.current=e,r(e)}),[r]),l=(0,a.useCallback)(((e,t)=>{e&&o(t?[e]:[])}),[o]),[i,s]=(0,a.useState)([]),c=(0,a.useCallback)((e=>{e&&s((t=>{return n=[e],a=t,(0,d.concat)(n.filter((e=>!(0,d.any)((0,f.aFF)(e),a))),a.filter((e=>!(0,d.any)((0,f.aFF)(e),n))));var n,a}))}),[]);return{highlightedCrosswalks:(0,a.useMemo)((()=>[...e,...i]),[e,i]),focusedCrosswalks:i,toggleCrosswalkFocus:c,setCrosswalkHighlighted:l}})(),[y,b]=(0,a.useState)(-480),g=(0,a.useCallback)((e=>{let{percentageSize:t}=e;return b(t)}),[]),[h,v]=(0,a.useState)(),[x,E]=(0,a.useState)(!1),C=n.relation.relationUri,w=(0,et._)(),S=(0,a.useCallback)((()=>E(!0)),[]),T=(0,a.useCallback)((()=>E(!1)),[]),O=(0,a.useCallback)((0,d.pipe)(i,S),[]),[P,k]=(0,a.useMemo)((()=>{const e=e=>{e.errorCode===f.Xt7.CROSSWALK_NOT_FOUND?(At(e),t()):e.errorCode===f.Xt7.OBJECT_NOT_FOUND?l(e):(At(e),T())},t=()=>{w((0,f._vs)(C)).then((e=>{s((0,d.assocPath)(["relation","object"],e,n)),T()})).catch(e)};return[e,t]}),[n,T,s,l]),{modifiedEntity:D,crosswalksMap:R,newlyCreatedAttributes:N,onPinAttribute:j,onIgnoreAttribute:Z,onAddAttribute:M,onEditAttribute:I,onDeleteAttribute:A}=(0,tt.Q)({entity:n.relation.object,onModify:k,onError:P,onLoad:S}),{addCrosswalk:F,deleteCrosswalk:L,editCrosswalk:U}=(0,nt.P)({onSuccess:k,onError:P,onLoad:S}),z=(0,a.useCallback)(((e,t)=>{S(),(t?(0,f.rj2)({entityUri:C,attributeName:e,value:t}).then((()=>s((0,d.assocPath)(["relation",e],t,n)))):(0,f.X78)({entityUri:C,attributeName:e}).then((()=>s((0,d.dissocPath)(["relation",e],n))))).then(T).catch(P)}),[n,S,T,P]);return r().createElement(at.Z,{className:u.detailsView},r().createElement(rt.hR,m,r().createElement(Lt.DndProvider,{backend:Ft.default},r().createElement(ot.Z,null),r().createElement(lt.Z,{className:Ce()(u.resizablePanesWrapper,{[u.locked]:x}),orientation:"vertical",size:y,minSize:600,maxSize:-480,allowResize:!0,onChange:g},r().createElement("div",{className:u.pane},r().createElement(It,{readOnly:p,entity:t,connection:n,onNavigateBack:l,onDelete:O,onChangeActivenessDate:z}),r().createElement(it.R,{attributeUris:N},r().createElement(st.Z,{readOnly:p,entity:D,crosswalksMap:R,isLoading:x,onPin:j,onIgnore:Z,onEdit:I,onAdd:M,onDelete:A,selectedAttributeTypes:h,onSelectAttributeTypes:v,visibleColumns:o,onChangeVisibleColumns:c}))),r().createElement(vt,{readOnly:p,className:u.pane,relation:n.relation.object,selectedAttributeTypes:h,onAddCrosswalk:F,onDeleteCrosswalk:L,onEditCrosswalk:U})))))})),Bt=(0,se.Z)({relationshipsView:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"hidden",overflowY:"auto",fontFamily:"Roboto, Helvetica, Arial, sans-serif",display:"flex",flexDirection:"column"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},pane:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",position:"relative"}}),_t=(0,o.connect)(((e,t)=>{let{config:{id:n}}=t;return{entity:m.ZP.selectors.getEntity(e),metadata:m.ZP.selectors.getMetadata(e),connections:m.ZP.selectors.getConnectionsByViewId(e,n),total:m.ZP.selectors.getTotalByViewId(e,n)}}))((e=>{let{config:t,entity:n,metadata:o,connections:l,total:i,saveState:s,getSavedState:c,dispatch:p}=e;const u=Bt(),P=(0,a.useRef)(),R=(0,y.U)(),j=(0,f.biM)(n),{type:Z}=n||{},[{visibleColumns:M,filters:I,page:z,rowsPerPage:W,sorting:q,currentRelationType:te,stateToSave:ne,entityTypeOfAppliedSavedState:ae},{changeColumns:re,toggleFilters:oe,changeFilter:le,changePage:ie,changeRowsPerPage:se,toggleSort:ce,changeRelationType:pe,saveCurrentState:ue,applySavedState:me}]=(e=>{let{defaultColumns:t,defaultSorting:n,defaultRowsPerPage:r}=e;const o={visibleColumns:t,filters:null,sorting:n,page:0,rowsPerPage:r,currentRelationType:null,stateToSave:null,visibleColumnsForRelationTypes:{},entityTypeOfAppliedSavedState:null},[l,i]=(0,a.useReducer)(((e,t)=>{switch(t.type){case H:{const n=t.payload;return(0,d.pipe)(J,(0,d.assoc)("currentRelationType",n),K,$)(e)}case V:{const{savedState:n,entityTypeUri:a}=t.payload;return _({},e,n,{visibleColumns:n?X(n):e.visibleColumns,entityTypeOfAppliedSavedState:a})}case Y:return _({},e,{stateToSave:Q(e)});default:return D.ZP.reducer(e,t)}}),o);return[l,(0,N.o)({actions:G,dispatch:i})]})({defaultColumns:F,defaultRowsPerPage:U[0],defaultSorting:{field:F[0],order:"asc"}}),fe=ae===Z,{isLoading:ye,relationsTableSavedState:be,attributesTableSavedState:ge,updateRelationsTableSavedState:he,updateAttributesTableSavedState:ve}=(e=>{var t;let{getSavedState:n,saveState:r,entityTypeUri:o}=e;const[l,i]=(0,a.useState)(k),[s,c]=(0,a.useState)(null);(0,b.D)((()=>{s&&(i(O({},l,{relationsTable:s})),c(null))}),[o]);const[p,u]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{n().then((e=>{i(e||k)})).then((e=>u(!1))).catch((e=>u(!1)))}),[]),{isLoading:p,relationsTableSavedState:null===(t=l.relationsTable)||void 0===t?void 0:t[o],attributesTableSavedState:l.attributesTable,updateRelationsTableSavedState:e=>{const t=O({},l.relationsTable,{[o]:e});c(t),r(O({},l,{relationsTable:t}))},updateAttributesTableSavedState:e=>{r(O({},l,{attributesTable:e}))}}})({getSavedState:c,saveState:s,entityTypeUri:Z}),[xe,Ee]=(0,a.useState)();(0,a.useEffect)((()=>{ye||me({savedState:be,entityTypeUri:Z})}),[ye,Z]),(0,a.useEffect)((()=>{ye||Ee(null==ge?void 0:ge.visibleColumns)}),[ye]),(0,b.D)((()=>{fe&&he(ne)}),[ne]),(0,b.D)((()=>{ie(0)}),[n]);const[Ce,we]=(0,a.useState)(),Se=(0,a.useCallback)((()=>{we(null)}),[]),Te=(0,a.useMemo)((()=>{const e=(0,f.io3)(o,Z);return o.relationTypes.filter((0,d.both)((0,f.uGe)(f.BDP.READ),(t=>{let{startObject:n,endObject:a}=t;return e.some((0,d.either)((0,d.equals)(n.objectTypeURI),(0,d.equals)(a.objectTypeURI)))})))}),[o,Z]),Oe=(0,a.useMemo)((()=>((e,t)=>t?(0,d.pipe)((0,d.find)((e=>e.uri===t)),f.DK$,B,(0,d.concat)(A),(0,d.reject)((e=>{let{id:t}=e;return L.includes(t)})))(e):(e=>{return t=(0,d.assoc)("dataTypeDefinition",(e=>({type:f.oS0.TYPE_SELECT,options:e.map((e=>{let{uri:t,label:n}=e;return{value:t,label:n}}))}))(e)),e=>(0,d.adjust)(e.findIndex((0,d.propEq)("id","relation.type")),t,e);var t})(e)(A))(Te,te)),[Te,te]),Pe=(0,a.useMemo)((()=>M.map((e=>Oe.find((0,d.propEq)("id",e)))).filter(d.identity)),[M,Oe]),ke=(0,a.useMemo)((()=>{const e=(0,d.pipe)((0,d.when)((0,d.always)(te),(0,d.filter)((0,d.propEq)("uri",te))),(0,d.map)((0,d.prop)("uri")))(Te);return{id:t.id,content:{inRelations:e,outRelations:e}}}),[t.id,te,Te]),De=(0,a.useMemo)((()=>((e,t)=>{const n=(0,ee.Tz)(t,e);return(new f.MEy).addClause(n).build()})(I,Pe)),[I,Pe]),{isLoading:Re,reload:Ne}=(0,g.a)({page:z,rowsPerPage:W,config:ke,entity:fe?n:null,filter:De,mode:f.ARY.Viewing,sorting:q}),je=!fe||Re,Ze=(0,a.useCallback)((0,d.pipe)(ce,ue),[ce,ue]),Me=(0,a.useCallback)((0,d.pipe)(le,ue),[le,ue]),Ie=(0,a.useCallback)((0,d.pipe)(oe,ue),[oe,ue]),Ae=(0,a.useCallback)((0,d.pipe)(re,ue),[re,ue]),Fe=(0,a.useCallback)((0,d.pipe)(pe,ue),[pe,ue]),Le=(0,a.useCallback)((e=>{Ee(e),ve({visibleColumns:e})}),[ve]),Ue=null==l?void 0:l[Ce],ze=(0,a.useCallback)((e=>{p(m.N5.relations.actions.relationsLoaded({id:t.id,connections:(0,d.update)(Ce,e,l),total:i}))}),[Ue]),[Be,_e]=(0,a.useMemo)((()=>[(0,f.w3p)(l),[f.q7e.RELATION]]),[l]),We=(0,h.C)({objectIds:Be,objectTypes:_e,enabled:!j}),He=(0,a.useMemo)((()=>(0,f.Px$)(l)),[l]),Ve=(0,a.useCallback)((e=>{At(e),e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Ne()}),[Ne]),Ye=(0,a.useCallback)((e=>{(0,d.pipe)(f.VGk,(0,d.andThen)(Ne),(0,d.otherwise)(Ve))(e)}),[Ne,Ve]),Ge=(0,a.useCallback)((()=>{(0,d.pipe)(f.VGk,(0,d.andThen)((0,d.pipe)(Se,Ne)),(0,d.otherwise)((e=>{e.errorCode===f.Xt7.OBJECT_NOT_FOUND&&Se(),Ve(e)})))(Ue.relation.relationUri)}),[Ue,Ne,Se,Ve]),$e=(0,a.useCallback)((e=>{e&&Ve(e),Se()}),[Ve,Se]);return r().createElement(v.s.Provider,{value:R},r().createElement(x.h.Provider,{value:We},r().createElement(E.X.Provider,{value:He},r().createElement("div",{className:u.relationshipsView},r().createElement(C.Z,{entity:n},r().createElement(w.a,null)),r().createElement(de,{total:i,filteringEnabled:!!I,onToggleFilters:Ie,columnsData:Oe,selectedColumns:M,onChangeColumns:Ae,relationTypes:Te,currentRelationType:te,onRelationTypeChange:Fe}),r().createElement("div",{className:u.pane},je&&r().createElement(S.Z,null),r().createElement(Qe,{readOnly:j,metadata:o,connections:l,columnsData:Pe,sorting:q,onSort:Ze,filters:I,onFilter:Me,onRowClick:we,tableRef:P,onDelete:Ye}),r().createElement(T.Z,{count:i,rowsPerPageOptions:U,page:z,onChangePage:ie,rowsPerPage:W,onChangeRowsPerPage:se,basicTableRef:P})),Ue&&r().createElement(zt,{readOnly:j,entity:n,visibleColumns:xe,onChangeVisibleColumns:Le,connection:Ue,onClose:$e,onDeleteConnection:Ge,onChangeConnection:ze})))))})),Wt=(0,i.createGenerateClassName)({productionPrefix:"relationshipsPerspective",disableGlobal:!0}),Ht=e=>{let{config:t,store:n,onResize:d,saveState:m,getSavedState:y}=e;const b=(0,a.useCallback)((0,f.aYu)(y),[y]);return r().createElement(o.Provider,{store:n},r().createElement(p.m.Provider,{value:t.id},r().createElement(i.StylesProvider,{generateClassName:Wt},r().createElement(c.MuiPickersUtilsProvider,{utils:l.Z},r().createElement(s.Z,{handleHeight:!0,onResize:(e,t)=>null==d?void 0:d(Math.floor(e),Math.floor(t))}),t&&r().createElement(_t,{config:t,saveState:m,getSavedState:b}),r().createElement(u.Z,null)))))}},46847:(e,t,n)=>{function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,i=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==i){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==i?"\n "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var p=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;p.call(this,e,t,a)}}return e}n.r(t),n.d(t,{polyfill:()=>l}),a.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0}}]);
|