@reltio/remotes 1.4.1719 → 1.4.1721

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.
Files changed (87) hide show
  1. package/1088.js +1 -1
  2. package/1148.js +1 -1
  3. package/1215.js +1 -1
  4. package/1334.js +1 -1
  5. package/1425.js +1 -1
  6. package/1550.js +1 -1
  7. package/1664.js +1 -1
  8. package/1707.js +1 -1
  9. package/1840.js +1 -1
  10. package/1840.js.map +1 -1
  11. package/2066.js +1 -1
  12. package/2345.js +1 -1
  13. package/2383.js +1 -1
  14. package/2400.js +1 -1
  15. package/2617.js +1 -1
  16. package/2857.js +1 -1
  17. package/2966.js +1 -1
  18. package/3004.js +1 -1
  19. package/3042.js +1 -1
  20. package/3096.js +1 -1
  21. package/3144.js +1 -1
  22. package/3191.js +1 -1
  23. package/3209.js +1 -1
  24. package/3348.js +1 -1
  25. package/3381.js +1 -1
  26. package/3383.js +1 -1
  27. package/3463.js +1 -1
  28. package/3469.js +1 -1
  29. package/3538.js +1 -1
  30. package/3639.js +1 -1
  31. package/3785.js +1 -1
  32. package/393.js +1 -1
  33. package/4038.js +1 -1
  34. package/4143.js +1 -1
  35. package/415.js +1 -1
  36. package/4212.js +1 -1
  37. package/4444.js +1 -1
  38. package/4481.js +1 -1
  39. package/4787.js +1 -1
  40. package/4838.js +1 -1
  41. package/4969.js +1 -1
  42. package/50.js +1 -1
  43. package/5039.js +1 -1
  44. package/5039.js.map +1 -1
  45. package/5177.js +1 -1
  46. package/5201.js +1 -1
  47. package/5292.js +1 -1
  48. package/5383.js +1 -1
  49. package/5738.js +1 -1
  50. package/5769.js +1 -1
  51. package/6287.js +1 -1
  52. package/6422.js +1 -1
  53. package/6506.js +1 -1
  54. package/6578.js +1 -1
  55. package/658.js +1 -1
  56. package/6799.js +1 -1
  57. package/6844.js +1 -1
  58. package/6903.js +1 -1
  59. package/7074.js +1 -1
  60. package/7119.js +1 -1
  61. package/7237.js +1 -1
  62. package/7340.js +1 -1
  63. package/735.js +1 -1
  64. package/7407.js +1 -1
  65. package/7422.js +1 -1
  66. package/7468.js +1 -1
  67. package/7626.js +1 -1
  68. package/7719.js +1 -1
  69. package/7744.js +1 -1
  70. package/7896.js +1 -1
  71. package/820.js +1 -1
  72. package/8207.js +1 -1
  73. package/8216.js +1 -1
  74. package/829.js +1 -1
  75. package/8741.js +1 -1
  76. package/8786.js +1 -1
  77. package/9016.js +1 -1
  78. package/9032.js +1 -1
  79. package/9050.js +1 -1
  80. package/9109.js +1 -1
  81. package/9283.js +1 -1
  82. package/9328.js +1 -1
  83. package/9387.js +1 -1
  84. package/9719.js +1 -1
  85. package/main.js +1 -1
  86. package/package.json +1 -1
  87. package/remoteEntry.js +1 -1
package/829.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a3f2b20-0981-453d-8536-398b1f720b04",e._sentryDebugIdIdentifier="sentry-dbid-6a3f2b20-0981-453d-8536-398b1f720b04")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1720"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[829],{56569:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddCircle");t.Z=i},76981:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"}),"CloudDownload");t.Z=i},711:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");t.Z=i},63655:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},31563:(e,t,r)=>{var n=r(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=i},25296:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(31461),a=r(7896),o=r(24328),i=r(6277),l=r(69075),s=r(13705),c=r(7342),p=r(43853),d=r(8069),u=r(65992),m=r(52322);const h=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],f=(0,u.ZP)(s.Z,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,c.Z)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,c.Z)(r.size)],t[r.color]]}})((({theme:e,ownerState:t})=>{var r,n;return(0,a.Z)({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${d.Z.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48},"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})}),(({theme:e,ownerState:t})=>(0,a.Z)({},"inherit"!==t.color&&"default"!==t.color&&null!=(e.vars||e).palette[t.color]&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}})),(({theme:e})=>({[`&.${d.Z.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),y=o.forwardRef((function(e,t){const r=(0,p.Z)({props:e,name:"MuiFab"}),{children:o,className:s,color:u="default",component:y="button",disabled:g=!1,disableFocusRipple:b=!1,focusVisibleClassName:E,size:T="large",variant:v="circular"}=r,x=(0,n.Z)(r,h),S=(0,a.Z)({},r,{color:u,component:y,disabled:g,disableFocusRipple:b,size:T,variant:v}),O=(e=>{const{color:t,variant:r,classes:n,size:o}=e,i={root:["root",r,`size${(0,c.Z)(o)}`,"inherit"===t?"colorInherit":t]},s=(0,l.Z)(i,d.N,n);return(0,a.Z)({},n,s)})(S);return(0,m.jsx)(f,(0,a.Z)({className:(0,i.default)(O.root,s),component:y,disabled:g,focusRipple:!b,focusVisibleClassName:(0,i.default)(O.focusVisible,E),ownerState:S,ref:t},x,{classes:O,children:o}))}))},8069:(e,t,r)=>{r.d(t,{N:()=>o,Z:()=>i});var n=r(69222),a=r(15672);function o(e){return(0,a.Z)("MuiFab",e)}const i=(0,n.Z)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"])},9366:(e,t,r)=>{r.d(t,{Q:()=>c});var n=r(7896),a=r(95038),o=r.n(a);const i={Y:"year",YY:"year",YYYY:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},l={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},s=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join("\n");class c{constructor({locale:e,formats:t,instance:r}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=i,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasTimezonePlugin=()=>void 0!==this.moment.tz,this.createSystemDate=e=>{const t=this.moment(e).local();return void 0===this.locale?t:t.locale(this.locale)},this.createUTCDate=e=>{const t=this.moment.utc(e);return void 0===this.locale?t:t.locale(this.locale)},this.createTZDate=(e,t)=>{if(!this.hasTimezonePlugin())throw new Error(s);const r="default"===t?this.moment(e):this.moment.tz(e,t);return void 0===this.locale?r:r.locale(this.locale)},this.date=e=>{if(null===e)return null;const t=this.moment(e);return t.locale(this.getCurrentLocaleCode()),t},this.dateWithTimezone=(e,t)=>null===e?null:"UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),this.getTimezone=e=>{var t,r,n;if(e.isUTC())return"UTC";const a=null==(t=e._z)?void 0:t.name;return null!=(r=null!=a?a:null==(n=this.moment.defaultZone)?void 0:n.name)?r:"system"},this.setTimezone=(e,t)=>{var r,n;if("UTC"===t)return e.clone().utc();if("system"===t)return e.clone().local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(s)}const a="default"===t?null!=(r=null==(n=this.moment.defaultZone)?void 0:n.name)?r:"system":t,o=e.clone();return o.tz(a),o},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.moment(e,!0),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.locale?this.moment(e,t,this.locale,!0):this.moment(e,t,!0),this.getCurrentLocaleCode=()=>this.locale||o().locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(o().localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=e=>e.match(/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g).map((e=>{const t=e[0];return"L"===t||";"===t?o().localeData(this.getCurrentLocaleCode()).longDateFormat(e):e})).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.moment(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>{const r=e.clone();return r.locale(this.getCurrentLocaleCode()),r.format(t)},this.formatNumber=e=>e,this.getDiff=(e,t,r)=>e.diff(t,r),this.isEqual=(e,t)=>null===e&&null===t||this.moment(e).isSame(t),this.isSameYear=(e,t)=>e.isSame(t,"year"),this.isSameMonth=(e,t)=>e.isSame(t,"month"),this.isSameDay=(e,t)=>e.isSame(t,"day"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e.isAfter(t),this.isAfterYear=(e,t)=>e.isAfter(t,"year"),this.isAfterDay=(e,t)=>e.isAfter(t,"day"),this.isBefore=(e,t)=>e.isBefore(t),this.isBeforeYear=(e,t)=>e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>e.isBefore(t,"day"),this.isWithinRange=(e,[t,r])=>e.isBetween(t,r,null,"[]"),this.startOfYear=e=>e.clone().startOf("year"),this.startOfMonth=e=>e.clone().startOf("month"),this.startOfWeek=e=>e.clone().startOf("week"),this.startOfDay=e=>e.clone().startOf("day"),this.endOfYear=e=>e.clone().endOf("year"),this.endOfMonth=e=>e.clone().endOf("month"),this.endOfWeek=e=>e.clone().endOf("week"),this.endOfDay=e=>e.clone().endOf("day"),this.addYears=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"years"):e.clone().add(t,"years"),this.addMonths=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"months"):e.clone().add(t,"months"),this.addWeeks=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"weeks"):e.clone().add(t,"weeks"),this.addDays=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days"),this.addHours=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"hours"):e.clone().add(t,"hours"),this.addMinutes=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"minutes"):e.clone().add(t,"minutes"),this.addSeconds=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"seconds"):e.clone().add(t,"seconds"),this.getYear=e=>e.get("year"),this.getMonth=e=>e.get("month"),this.getDate=e=>e.get("date"),this.getHours=e=>e.get("hours"),this.getMinutes=e=>e.get("minutes"),this.getSeconds=e=>e.get("seconds"),this.getMilliseconds=e=>e.get("milliseconds"),this.setYear=(e,t)=>e.clone().year(t),this.setMonth=(e,t)=>e.clone().month(t),this.setDate=(e,t)=>e.clone().date(t),this.setHours=(e,t)=>e.clone().hours(t),this.setMinutes=(e,t)=>e.clone().minutes(t),this.setSeconds=(e,t)=>e.clone().seconds(t),this.setMilliseconds=(e,t)=>e.clone().milliseconds(t),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>e.clone().add(1,"month"),this.getPreviousMonth=e=>e.clone().subtract(1,"month"),this.getMonthArray=e=>{const t=[this.startOfYear(e)];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.mergeDateAndTime=(e,t)=>e.clone().hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>o().weekdaysShort(!0),this.getWeekArray=e=>{const t=this.setLocaleToValue(e),r=t.clone().startOf("month").startOf("week"),n=t.clone().endOf("month").endOf("week");let a=0,o=r;const i=[];for(;o.isBefore(n);){const e=Math.floor(a/7);i[e]=i[e]||[],i[e].push(o),o=o.clone().add(1,"day"),a+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const r=this.moment(e).startOf("year"),n=this.moment(t).endOf("year"),a=[];let o=r;for(;o.isBefore(n);)a.push(o),o=o.clone().add(1,"year");return a},this.getMeridiemText=e=>this.is12HourCycleInCurrentLocale()?o().localeData(this.getCurrentLocaleCode()).meridiem("am"===e?0:13,0,!1):"am"===e?"AM":"PM",this.moment=r||o(),this.locale=e,this.formats=(0,n.Z)({},l,t)}}},85596:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),o=r(13980),i=r.n(o),l=r(98952),s=r(50914),c=r(64651),p=r(65629);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}const u=e=>{let{relation:t={},inRelationTypes:r=[],outRelationTypes:o=[],onChange:i=s.identity,applyFirstByDefault:l=!1,reversedContextLabels:u=!1}=e,m=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:h,fromEditorValue:f,toEditorValue:y}=(0,c.n)({reversedContextLabels:u}),g=(0,n.useMemo)((()=>h(r,o)),[h,r,o]),b=(0,n.useCallback)((0,s.pipe)(f(r,o),i),[f,r,o,i]),E=!!t.relationType;return(0,n.useEffect)((()=>{l&&g.length&&!E&&b(g[0])}),[g,l,b,E]),a().createElement(p.Z,d({value:y(t,g),options:g,onChange:b},m))};u.propTypes={className:i().string,relation:l.bNA,inRelationTypes:i().arrayOf(l.IYE),outRelationTypes:i().arrayOf(l.IYE),applyFirstByDefault:i().bool,reversedContextLabels:i().bool,onChange:i().func};const m=u},37573:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),o=r(71153),i=r.n(o),l=r(98952),s=r(65439),c=r(14596);const p=e=>{let{entity:t,avatarClassName:r,imageClassName:n}=e;const o=(0,c.AH)(),p=(0,c.$H)()||"",d=(0,l.uie)(o,p,t),u=(0,l.vPL)(p,(0,l.XH2)(o,t.type)),m=e=>{e.target.onError=null,e.target.src=(0,l.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(s.Z,{className:i()(r,n),src:d,imgProps:{onError:m}},a().createElement("img",{className:n,src:u,alt:"fallback entity avatar",onError:m}))}},96379:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),o=r(98018),i=r(14596);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}const s=e=>{const t=(0,i.$H)()||"";return a().createElement(o.ZP,l({},e,{storagePath:(r=t,r.endsWith("/")?r:r+"/")}));var r}},87378:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(71153),i=r.n(o),l=r(30750);const s=(0,r(72342).makeStyles)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,zIndex:10,backgroundColor:"rgba(255, 255, 255, 0.37)"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:r=!1,className:n}=e;const o=s();return a().createElement(a().Fragment,null,a().createElement("div",{"data-reltio-id":"reltio-linear-load-indicator",className:i()(o.loadingOverlay,n,{[o.transparent]:t,[o.relativePosition]:r})},a().createElement(l.Z,{color:"primary"})))}},4270:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),o=r(38677),i=r(15894),l=r(71153),s=r.n(l),c=r(78223),p=r(47591);const d=(0,r(72342).makeStyles)((e=>({button:{"&.MuiButtonGroup-grouped":{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",color:"rgba(0,0,0,0.87)",borderColor:"rgba(0,0,0,0.12)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:not(:last-of-type):hover":{borderRightColor:"transparent"},"&$current":{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,p.Fq)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.Fq)(e.palette.primary.main,.24),borderRightColor:"transparent"}}}},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px","& + $title":{marginLeft:"8px"}},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{}}))),u=(0,c.Z)(o.Z),m=e=>{let{className:t,classes:r={},modes:n=[],modeId:o,onChange:l}=e;const c=d();return a().createElement(i.Z,{className:t},n.map((e=>{let{id:t,title:n,tooltipTitle:i,Icon:p,disabled:d}=e;return a().createElement(u,{disabled:d,showForDisabled:d&&!!i,key:String(t),className:s()(c.button,{[c.current]:o===t},r.button),tooltipTitle:i,onClick:(m=t,()=>l(m)),"data-reltio-id":`reltio-search-mode-${t}`},p&&a().createElement(p,{className:c.icon}),n&&a().createElement("div",{className:c.title},n));var m})))}},33662:(e,t,r)=>{r.d(t,{Z:()=>T});var n=r(71153),a=r.n(n),o=r(50914),i=r(24328),l=r.n(i),s=r(2507),c=r.n(s),p=r(24394),d=r(30680),u=r(92679),m=r(31563),h=r(79573),f=r(40435),y=r(15311);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){E(e,t,r[t])}))}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const T=(0,i.memo)((e=>{let{value:t,autofocus:r,onSearch:n=h.ZT,rootRef:s,classes:E={},height:T,placeholder:v=c().text("Search")}=e,x=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const S=(0,y.y)({height:T}),[O,C]=(0,i.useState)(""),R=(0,o.pipe)((0,o.tap)(n),C),w=(0,o.isNil)(t)?O:t;return l().createElement(p.Z,g({startAdornment:l().createElement(d.Z,{position:"start"},l().createElement(m.default,{className:S.icon})),endAdornment:l().createElement(d.Z,{position:"end"},w.length>0&&l().createElement(f.Z,{icon:u.default,className:S.clearButton,onClick:()=>R("")})),autoFocus:r,classes:b({},E,{input:a()(S.input,E.input),root:a()(S.container,E.root)}),placeholder:v,value:w,onChange:(0,o.pipe)(h.NA,R),disableUnderline:!0,ref:s},x))}))},15311:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(72342).makeStyles)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},22311:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),o=r(71153),i=r.n(o),l=r(2507),s=r.n(l),c=r(47019),p=r(54275),d=r(33662);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const m=e=>{let{title:t,className:r,onSearch:n,hideTitle:o,hideSearchInput:l,headerPlacement:m="top",containerWidth:h,containerHeight:f,searchInputOnKeyDown:y,children:g,searchInputRef:b,anchorOrigin:E={vertical:"top",horizontal:"right"},transformOrigin:T={vertical:"top",horizontal:"right"}}=e,v=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const x=(0,p.Z)({containerWidth:h,containerHeight:f}),S=a().createElement(a().Fragment,null,!o&&a().createElement("div",{className:x.header},t),!l&&a().createElement(d.Z,{onSearch:n,autofocus:!0,onKeyDown:y,inputRef:b,classes:{root:x.searchInputContainer},placeholder:s().text("Search & add attributes"),height:40}));return a().createElement(c.ZP,u({anchorOrigin:E,transformOrigin:T},v),a().createElement("div",{className:i()(x.container,r),style:{width:h}},"top"===m&&S,a().createElement("div",{className:x.list},g),"bottom"===m&&S))}},26638:(e,t,r)=>{r.d(t,{t:()=>i});var n=r(24328),a=r(50914),o=r(63485);const i=e=>{let{items:t,open:r,onSelectFocusedItem:i,selectedItems:l,onClose:s}=e;const[c,p]=(0,n.useState)(null),d=(0,n.useRef)(!1),u=(0,n.useCallback)((e=>{let r=null===e?u(-1):e;for(;null!==e&&r<t.length&&(r<=e||r>=0&&(0,o.c)(t[r]));)r+=1;return r!==t.length?r:u(-1)}),[t]),m=(0,n.useCallback)((e=>{let r=null===e?t.length-1:e;for(;null!==e&&r>=0&&(r>=e||(0,o.c)(t[r]));)r-=1;return r<0?t.length-1:r}),[t]),h=(0,n.useCallback)((()=>{if(!(0,a.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&i({item:e.item,groupData:e})}}),[i,t,c]),f=(0,n.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return p(u),e.preventDefault(),!1;case"Up":case"ArrowUp":return p(m),e.preventDefault(),!1;case"Enter":d.current=!0,h();break;case"Tab":s&&s(e);break;default:return}}),[t,u,m,h,s]);return(0,n.useEffect)((()=>{if(d.current){d.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&p(e)}else p(null)}),[t,r,l]),{focusIndex:c,handleKeyDown:f}}},54275:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(72342);const a=(0,n.makeStyles)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:r}=e;return{display:"flex",flexDirection:"column",height:t,width:r,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},63485:(e,t,r)=>{r.d(t,{Z:()=>m,c:()=>d});var n=r(24328),a=r.n(n),o=r(13980),i=r.n(o),l=r(50166),s=r(88267);const c=(0,r(72342).makeStyles)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var p=r(41008);const d=e=>e.titleItemIndex===e.index,u=e=>{let{items:t,getItemSize:r,renderItem:o,renderGroupTitle:i,width:u="100%",height:m,fixedTitle:h=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:y,hideSubtitles:g,focusIndex:b=null,onInnerContainerResize:E}=e;const T=c(),v=(0,n.useRef)(null),x=(0,n.useRef)(null),S=(0,n.useRef)(null),O=(0,n.useRef)([0]),C={topMargin:0},R=(0,n.useMemo)((()=>!g||(t||[]).some((e=>null!==e.titleItemIndex))),[t,g]),w=(0,n.useCallback)((e=>{const n=O.current.length;let a=0;t.slice(n-1,e+1).forEach(((e,t)=>{const o=n+t-1;t>0&&(O.current[o]=O.current[o-1]+a),a=r(o,e.item)}))}),[r,t]),I=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),A=(0,n.useCallback)((e=>t[e]),[t]);(0,n.useEffect)((()=>{requestAnimationFrame((()=>{v.current&&v.current.scrollTo(0)}))}),[t.length]),(0,n.useEffect)((()=>{v.current&&v.current.resetAfterIndex(0),_();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){w(t);const e=I(t);return{offset:O.current[t],titleHeight:r(e,A(e).item)}}})(t);if(e&&e.offset&&v.current){const{titleHeight:t}=e,r=e.offset-t;(r<v.current.state.scrollOffset||r>v.current.state.scrollOffset+m)&&requestAnimationFrame((()=>{v.current&&v.current.scrollTo(r-(m-t)/2)}))}}),[w,A,r,I,m,O,t,v]);const _=()=>{S.current&&x.current&&(S.current.style.width=x.current.offsetWidth+"px")},P=(0,n.useCallback)((e=>{let r=null,n=0;return t.some(((t,a)=>{w(a+10);const o=O.current[a+1];return e>=n&&e<o&&(r={index:a,offset:n,listItem:t}),n=o,r})),r}),[w,O,t]),N=(0,n.useCallback)((e=>r(e,A(e).item)),[A,r]),k=(0,n.useCallback)((e=>{let{index:t,style:r,data:n}=e;const a=A(t);return a.item&&(d(a)&&i(r,a.item)||o(r,a.item,t,n))}),[A,i,o]),{handleOnItemsRendered:L}=(0,p.LW)({items:t,focusIndex:b,listRef:v}),D=(0,n.useCallback)((()=>t.filter((e=>d(e))).map((e=>(e=>a().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},i({height:r(e.index,e.item)},e.item)))(e)))),[r,t,i]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:S,className:T.stickyTitlesWrapper},h&&D()),E&&x.current&&a().createElement(s.Z,{handleHeight:!0,onResize:E,targetDomEl:x.current}),a().createElement(l.VariableSizeList,{ref:v,itemCount:t.length,itemSize:N,width:u,height:m,itemKey:f,innerRef:x,onScroll:e=>{let{scrollOffset:n,scrollDirection:a}=e;if(!h||!R)return;const o=P(n),i=o&&I(o.index);var l;null!==i&&(l=i,S.current&&[...S.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===l.toString()?(e.style.visibility="visible",C.index=l):e.style.visibility="hidden"}))),_();const s=null!==i&&r(i,A(i).item),c=P(n+s+C.topMargin);let p=0;if(c){switch(a){case"forward":c.offset-n>0&&d(c.listItem)&&(p=s-(c.offset-n));break;case"backward":{const e=i>-1&&(u=i,t.findIndex(((e,t)=>d(e)&&u<t))),r=(e=>(w(e),O.current[e]))(e);e>-1&&n<r&&s>=r-n&&(p=s-(r-n))}}(e=>{S.current&&(C.topMargin=-e,S.current.style.top=-e+"px")})(p)}var u},style:y?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:L},k))};u.propTypes={items:i().arrayOf(i().object).isRequired,getItemSize:i().func.isRequired,renderItem:i().func.isRequired,width:i().oneOfType([i().number,i().string]),height:i().number.isRequired,renderGroupTitle:i().func,fixedTitle:i().bool,hideSubtitles:i().bool,itemKey:i().func,disableHorizontalScrollbar:i().bool,focusIndex:i().number,onInnerContainerResize:i().func};const m=u},41008:(e,t,r)=>{r.d(t,{LG:()=>o,LW:()=>i});var n=r(50914),a=r(24328);const o=e=>{const t=e=>(0,n.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let r=null;return t(e).map(((e,t)=>(e&&e.items&&(r=t),{item:e,index:t,titleItemIndex:r})))},i=e=>{let{focusIndex:t,listRef:r,items:n}=e;const o=(0,a.useRef)(null),i=(0,a.useRef)(null),l=(0,a.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:r}=e;o.current=t,i.current=r}),[]);return(0,a.useEffect)((()=>{r.current&&null!==t&&0!==n.length&&(t<Math.max(o.current+3,0)?r.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(i.current-3,n.length-1)&&r.current.scrollToItem(Math.min(t+3,n.length-1),"end"))}),[t,n.length,r]),{handleOnItemsRendered:l}}},65629:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(24328),a=r.n(n),o=r(13980),i=r.n(o),l=r(2507),s=r.n(l),c=r(50914),p=r(71153),d=r.n(p),u=r(95341),m=r(79312);const h=(0,r(72342).makeStyles)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var f=r(96379),y=r(40007);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}const b=e=>{let{innerRef:t,innerProps:r,selectOption:n,data:o}=e;const i=h(),{value:l,label:s,startObject:c,endObject:p}=o,b=c.objectType.label+" ↔ "+p.objectType.label;return a().createElement(u.Z,g({className:i.container,ref:t,key:l,onClick:()=>n({label:s,value:l,startObject:c,endObject:p})},r),a().createElement("div",{className:i.icons},a().createElement(f.Z,{className:i.iconTop,entityType:c.objectType}),a().createElement(f.Z,{className:i.iconBottom,entityType:p.objectType})),a().createElement("div",{className:i.text},a().createElement(y.Z,{value:s},a().createElement(m.Z,{className:d()(i.textItem,i.primaryTextItem)},s)),a().createElement(y.Z,{value:b},a().createElement(m.Z,{color:"textSecondary",className:d()(i.textItem,i.secondaryTextItem)},b))))};b.propTypes={innerRef:i().oneOfType([i().oneOf([null]),i().func,i().shape({current:i().any.isRequired})]),innerProps:i().object.isRequired,selectOption:i().func.isRequired,data:i().shape({value:i().string.isRequired,label:i().string.isRequired,startObject:i().object,endObject:i().object})};const E=b;var T=r(84425);function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v.apply(this,arguments)}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const S=e=>{let{value:t={},options:r=[],onChange:o=c.identity,TextFieldProps:i}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["value","options","onChange","TextFieldProps"]);const p=(0,n.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}({},(0,c.defaultTo)({},i),{"data-reltio-id":"relation-type-selector"})),[i]);return a().createElement(T.Z,v({value:t,options:r,onChange:o,label:s().text("Select relationship type "),components:{Option:E},TextFieldProps:p},l))},O=i().shape({label:i().string.isRequired,value:i().string.isRequired,startObject:i().object,endObject:i().object});S.propTypes={value:O,options:i().arrayOf(O),onChange:i().func};const C=S},64651:(e,t,r)=>{r.d(t,{n:()=>i});var n=r(24328),a=r(98952),o=r(50914);const i=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,n.useCallback)(((e,r)=>{const n={},i=(0,o.pipe)(a.PjQ,(0,o.tap)((e=>n[e]=(0,o.propOr)(0,e,n)+1))),l=(0,o.ascend)((0,o.prop)("label")),s=(0,o.curry)(((e,r)=>{let{uri:n,label:o,startObject:l,endObject:s}=r;const c=e===(t?a.Nsj.OUT:a.Nsj.IN)?l:s;return{label:{directionalLabel:i(c),typeLabel:o},value:`${n},${e}`,startObject:l,endObject:s}}));return e.map(s(a.Nsj.IN)).concat(r.map(s(a.Nsj.OUT))).map((0,o.evolve)({label:e=>{let{directionalLabel:t,typeLabel:r}=e;return t?n[t]>1?`${t} (${r})`:t:r}})).sort(l)}),[t]),fromEditorValue:(0,n.useCallback)(((e,t)=>r=>{const[n,i]=r.value.split(",");return{type:(i===a.Nsj.IN?e:t).find((0,o.propEq)("uri",n)),direction:i}}),[]),toEditorValue:(0,n.useCallback)(((e,t)=>t.find((0,o.propEq)("value",`${e.relationType},${e.direction}`))),[])}}},55524:(e,t,r)=>{r.r(t),r.d(t,{RelationshipSearchView:()=>Ma,actions:()=>Za,constants:()=>za});var n={};r.r(n),r.d(n,{actions:()=>Ua,constants:()=>v,default:()=>ja,parseSearchState:()=>Na.Z,selectors:()=>Da});var a=r(24328),o=r.n(a),i=r(13980),l=r.n(i),s=r(54426),c=r(40855),p=r(41633),d=r(9366),u=r(88267),m=r(79573),h=r(63532),f=r(32479),y=r(71153),g=r.n(y),b=r(52730),E=r(37164),T=r(17640);const v={ADD_GROUPS_BLOCK:"RELATION_SEARCH_ADD_GROUPS_BLOCK",DELETE_GROUPS_BLOCK:"RELATION_SEARCH_DELETE_GROUPS_BLOCK",SET_GROUP_ENTITY_TYPE:"RELATION_SEARCH_SET_GROUP_ENTITY_TYPE",SET_GROUP_RELATION_TYPE_INFO:"RELATION_SEARCH_SET_GROUP_RELATION_TYPE_INFO",SET_GROUP_RELATION_FILTER:"RELATION_SEARCH_SET_GROUP_RELATION_FILTER",ADD_ATTRIBUTE_AFTER:"RELATION_SEARCH_ADD_ATTRIBUTE_AFTER",CHANGE_ATTRIBUTE_DATA:"RELATION_SEARCH_CHANGE_ATTRIBUTE_DATA",TOGGLE_ATTRIBUTE_SELECT:"RELATION_SEARCH_TOGGLE_ATTRIBUTE_SELECT",SET_ATTRIBUTE_OPERATOR:"RELATION_SEARCH_SET_ATTRIBUTE_OPERATOR",DELETE_ATTRIBUTE:"RELATION_SEARCH_DELETE_ATTRIBUTE",DUPLICATE_ATTRIBUTE:"RELATION_SEARCH_DUPLICATE_ATTRIBUTE",SET_FILTER:"RELATION_SEARCH_SET_FILTER",SET_VALUES:"RELATION_SEARCH_SET_VALUES",CLEAR:"RELATION_SEARCH_CLEAR",RUN_SEARCH:"RELATION_SEARCH_RUN_SEARCH",CHANGE_PAGE:"RELATION_SEARCH_CHANGE_PAGE",CHANGE_ROWS_PER_PAGE:"RELATION_SEARCH_CHANGE_ROWS_PER_PAGE",SET_ENTITIES:"RELATION_SEARCH_SET_ENTITIES",SET_TOTAL:"RELATION_SEARCH_SET_TOTAL",UPDATE_CURRENT_ENTITIES:"RELATION_SEARCH_UPDATE_CURRENT_ENTITIES",SAVE_STATE:"RELATION_SEARCH_SAVE_STATE",UPDATE_STATE:"RELATION_SEARCH_UPDATE_STATE",EXPORT_RESULTS:"RELATION_SEARCH_EXPORT_RESULTS"},x="RELATION_SEARCH_UI_SET_LOADING_ENTITY",S="RELATION_SEARCH_UI_SET_LOADING_TOTAL",O="RELATION_SEARCH_UI_SET_CONFIG",C="RELATION_SEARCH_UI_SET_SEARCH_RESULTS_VIEW_MODE",R="RELATION_SEARCH_UI_SET_SEARCH_RESULTS_COLUMNS",w="RELATION_SEARCH_UI_SET_SHOW_SEARCH_RESULTS";var I=r(50914),A=r(2507),_=r.n(A);const P={EXISTS:"exists",NOT_EXISTS:"not"},N={[P.EXISTS]:_().text("Exists"),[P.NOT_EXISTS]:_().text("Missing")},k="table",L="list",D=[25,50,100],U="entityTypeUri",j="relationTypeUri",M="direction",Z="attributes",z="filter",H=e=>{let{relationTypeUri:t,direction:r,id:n}=e;return{[Z]:[],[j]:t,[M]:r,[z]:P.EXISTS,id:(0,I.when)((0,I.pipe)((0,I.startsWith)("relation-"),I.not),(0,I.concat)("relation-"))(n)}},G=e=>{let{entityTypeUri:t,id:r}=e;return{[Z]:[],[U]:t,id:(0,I.when)((0,I.pipe)((0,I.startsWith)("entity-"),I.not),(0,I.concat)("entity-"))(r)}},B=function(){let{entityTypeUri:e,relationTypeUri:t,direction:r,id:n=(0,E.x0)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:(0,E.x0)()};return{id:n,entity:G({entityTypeUri:e,id:n}),relation:H({relationTypeUri:t,direction:r,id:n}),children:[]}},F=(0,I.omit)(["id"],H({id:""})),Y=(0,I.pipe)((0,I.omit)(["id"]),(0,I.equals)(F)),W=(0,I.omit)(["id"],G({id:""})),V=(0,I.pipe)((0,I.omit)(["id"]),(0,I.equals)(W)),{getAttributeData:q,getAttributeObject:X,getEmptyAttributeObject:$}=T,K=(e,t,r,n)=>({type:v.ADD_GROUPS_BLOCK,payload:{block:B({entityTypeUri:t,relationTypeUri:r,direction:n}),parentBlockId:e}}),Q=(e,t)=>({type:v.ADD_ATTRIBUTE_AFTER,payload:{groupId:e,attributeId:t,attribute:$()}}),J=(e,t,r)=>({type:v.ADD_ATTRIBUTE_AFTER,payload:{groupId:e,attributeId:t,attribute:X(r)}}),ee=(e,t,r)=>({type:v.CHANGE_ATTRIBUTE_DATA,payload:{groupId:e,attributeId:t,attributeData:q(r)}}),te=(e,t)=>({type:v.CHANGE_ATTRIBUTE_DATA,payload:{groupId:e,attributeId:t,attributeData:null}}),re=(e,t,r)=>({type:v.TOGGLE_ATTRIBUTE_SELECT,payload:{groupId:e,attributeId:t,selectInfo:r}}),ne=(e,t,r)=>({type:v.SET_ATTRIBUTE_OPERATOR,payload:{groupId:e,attributeId:t,operator:r}}),ae=(e,t)=>({type:v.DELETE_ATTRIBUTE,payload:{groupId:e,attributeId:t}}),oe=(e,t)=>({type:v.DUPLICATE_ATTRIBUTE,payload:{groupId:e,attributeId:t,id:(0,E.x0)()}}),ie=(e,t,r)=>({type:v.SET_FILTER,payload:{groupId:e,attributeId:t,filter:r}}),le=(e,t,r)=>({type:v.SET_VALUES,payload:{groupId:e,attributeId:t,values:r}}),se=()=>({type:v.CLEAR}),ce=()=>({type:v.RUN_SEARCH}),pe=e=>({type:v.CHANGE_PAGE,payload:{pageNumber:e}}),de=e=>({type:v.SET_ENTITIES,payload:e}),ue=()=>({type:v.UPDATE_CURRENT_ENTITIES}),me=e=>({type:R,payload:e}),he=e=>({type:x,payload:e}),fe=e=>({type:S,payload:e}),ye=e=>({type:w,payload:e});var ge=r(28523);const be=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];for(let a of e)if((0,I.path)(a,r)===t)return[...n,...a.slice(0,-1)];if(r.children)for(let a=0;a<r.children.length;a++){const o=be(e,t,r.children[a],[...n,"children",a]);if(o)return o}},Ee=(0,I.curry)(((e,t)=>be([["id"],["entity","id"],["relation","id"]],e,t))),{addAttributeAfter:Te,changeAttributeData:ve,setAttributeOperator:xe,deleteAttribute:Se,duplicateAttribute:Oe,setFilter:Ce,setValues:Re,createGetGroupLens:we,createGetAttributesLens:Ie,createGetAttributeIndex:Ae,createGetAttributeLens:_e,createSetAttributeProp:Pe,createGetAttributeProp:Ne}=T,ke={searchState:{},groupsRoot:null,page:0,rowsPerPage:D[0],entities:[],total:0},Le=["groupsRoot"],De=(0,I.lensPath)(Le),Ue=(0,I.lensProp)("page"),je=(0,I.lensProp)("rowsPerPage"),Me=(0,I.lensProp)("entities"),Ze=(0,I.lensProp)("total"),ze=Ie(we(Le,Ee),Z),He=Ae(ze),Ge=_e(ze),Be=Pe(Ge),Fe=Ne(Ge),Ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ke,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case v.ADD_GROUPS_BLOCK:{const{block:r,parentBlockId:n}=t.payload;if(!n)return null===r?(0,I.set)(De,r,e):(0,I.set)(De,(0,I.omit)(["relation"],r),e);{const t=(0,I.view)(De,e),a=Ee(n,t);if(a){const t=(0,I.lensPath)([...Le,...a,"children"]);return(0,I.over)(t,(0,I.pipe)((0,I.defaultTo)([]),(0,I.concat)(I.__,[r])),e)}}break}case v.DELETE_GROUPS_BLOCK:{const{blockId:r}=t.payload,n=(0,I.view)(De,e),a=Ee(r,n);if(a){if(a.length){const t=Ee(r,n).slice(0,-1),a=(0,I.lensPath)([...Le,...t]);return(0,I.over)(a,(0,I.pipe)((0,I.reject)((0,I.propEq)("id",r))),e)}return(0,I.set)(De,ke.groupsRoot,e)}break}case v.SET_GROUP_ENTITY_TYPE:{const{groupId:r,entityTypeUri:n}=t.payload,a=(0,I.view)(De,e),o=Ee(r,a);if(o){const t=(0,I.lensPath)([...Le,...o]),r=(0,I.over)(t,(0,I.pipe)((0,I.assoc)(U,n),(0,I.assoc)(Z,[])),e);if(!n){const e=o.slice(0,-1),t=(0,I.lensPath)([...Le,...e,"children"]);return(0,I.set)(t,[],r)}return r}return e}case v.SET_GROUP_RELATION_TYPE_INFO:{const{groupId:r,relationTypeUri:n,direction:a}=t.payload,o=(0,I.view)(De,e),i=Ee(r,o);if(i){const t=(0,I.lensPath)([...Le,...i]);return(0,I.over)(t,(0,I.pipe)((0,I.assoc)(j,n),(0,I.assoc)(M,a),(0,I.assoc)(Z,[])),e)}return e}case v.SET_GROUP_RELATION_FILTER:{const{groupId:r,filter:n}=t.payload,a=(0,I.view)(De,e),o=Ee(r,a);if(o){const t=(0,I.lensPath)([...Le,...o]);return(0,I.over)(t,(0,I.assoc)(z,n),e)}return e}case v.ADD_ATTRIBUTE_AFTER:{const{groupId:r,attributeId:n,attribute:a}=t.payload;return Te({state:e,groupId:r,attributeId:n,attribute:a,getAttributesLens:ze,getAttributeIndex:He})}case v.CHANGE_ATTRIBUTE_DATA:{const{groupId:r,attributeId:n,attributeData:a}=t.payload;return ve({state:e,groupId:r,attributeId:n,attributeData:a,setAttributeProp:Be,getAttributeLens:Ge})}case v.SET_ATTRIBUTE_OPERATOR:{const{groupId:r,attributeId:n,operator:a}=t.payload;return xe({state:e,groupId:r,attributeId:n,operator:a,setAttributeProp:Be})}case v.DELETE_ATTRIBUTE:{const{groupId:r,attributeId:n}=t.payload;return Se({state:e,groupId:r,attributeId:n,getAttributesLens:ze})}case v.DUPLICATE_ATTRIBUTE:{const{groupId:r,attributeId:n,id:a}=t.payload;return Oe({state:e,groupId:r,attributeId:n,id:a,getAttributesLens:ze})}case v.SET_FILTER:{const{groupId:r,attributeId:n,filter:a}=t.payload;return Ce({state:e,groupId:r,attributeId:n,filter:a,getAttributeProp:Fe,setAttributeProp:Be})}case v.SET_VALUES:{const{groupId:r,attributeId:n,values:a}=t.payload;return Re({state:e,groupId:r,attributeId:n,values:a,setAttributeProp:Be})}case v.CLEAR:return ke;case v.CHANGE_PAGE:{const{pageNumber:r}=t.payload;return(0,I.set)(Ue,r,e)}case v.CHANGE_ROWS_PER_PAGE:{const{number:r}=t.payload;return(0,I.set)(je,r,e)}case v.SET_ENTITIES:{const r=t.payload;return(0,I.set)(Me,r,e)}case v.SET_TOTAL:{const r=t.payload;return(0,I.set)(Ze,r,e)}case v.UPDATE_STATE:default:return e}return e};var We=r(90503);function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qe(e,t,r[t])}))}return e}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xe={entitiesLoading:!1,totalLoading:!1,config:{},searchResultsViewMode:L,searchResultsColumns:[],showSearchResults:!1,isLoadedSavedState:!1},$e=(0,I.lensProp)("entitiesLoading"),Ke=(0,I.lensProp)("totalLoading"),Qe=(0,I.lensProp)("config"),Je=(0,I.lensProp)("searchResultsViewMode"),et=(0,I.lensProp)("searchResultsColumns"),tt=(0,I.lensProp)("showSearchResults"),rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case x:return(0,I.set)($e,t.payload,e);case S:return(0,I.set)(Ke,t.payload,e);case O:return(0,I.set)(Qe,t.payload,e);case C:return(0,I.set)(Je,t.payload,e);case R:return(0,I.set)(et,t.payload,e);case w:return(0,I.set)(tt,t.payload,e);case v.RUN_SEARCH:return(0,I.set)(tt,!0,e);case v.ADD_GROUPS_BLOCK:if(!t.payload.parentBlockId)return(0,I.set)(et,(0,We.oX)(),e);break;case v.CLEAR:return Ve({},Xe,{config:e.config,searchResultsViewMode:e.searchResultsViewMode,showSearchResults:!1,isLoadedSavedState:!0});case v.UPDATE_STATE:{const{showSearchResults:r=Xe.showSearchResults,searchResultsViewMode:n=Xe.searchResultsViewMode}=t.payload||{};return Ve({},Xe,{config:e.config,showSearchResults:r,searchResultsViewMode:n,isLoadedSavedState:!0})}}return e};var nt=r(45738),at=r(98952),ot=r(1794),it=r(71403),lt=r(85383),st=r(82349);function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pt=(e,t)=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ct(e,t,r[t])}))}return e}({},t,mt(e)),dt=(0,I.allPass)([(0,I.complement)(at.O27),(0,I.has)("type"),(0,I.cond)([[(0,I.pipe)((0,I.prop)("type"),at.$NE),(0,I.has)("direction")],[I.T,I.T]])]),ut=(0,I.anyPass)([dt,(0,I.allPass)([(0,I.complement)(at.O27),(0,I.has)("logicalOperator"),(0,I.has)("operands"),(0,I.pipe)((0,I.prop)("operands"),(0,I.all)(dt))])]),mt=e=>{let{entity:t,relation:r,children:n=[]}=e;const a=(0,I.reject)(at.O27,{type:t.entityTypeUri,filter:(0,st.Jk)([{attributes:t.attributes||[]}],[],!0),operands:n.map(mt).filter(ut)});let o=r?(0,I.reject)(at.O27,{type:r.relationTypeUri,direction:(r.direction||"").toUpperCase(),filter:(0,st.Jk)([{attributes:r.attributes||[]}],[],!0),operands:r.relationTypeUri?[a].filter(ut):[]}):null;return null!=r&&r.filter&&(null==r?void 0:r.filter)!==P.EXISTS&&(o={logicalOperator:r.filter.toUpperCase(),operands:[o]}),o||a},ht=(e,t,r,n)=>{const a=pt(r);return(0,at.P2h)({apiPath:e,tenant:t,searchBody:a,options:n})},ft=(e,t,r,n)=>{const a=pt(r);return(0,at.dED)({apiPath:e,tenant:t,searchBody:a,options:n})},yt=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const a=gt(e,t,r,n),o=(t.children||[]).map((r=>yt(e,r,"",n.concat({name:t.name,label:t.label}))));return o.length&&(a.children=o,a.notSelectable=!0),a},gt=(e,t,r,n)=>{const a=(0,I.omit)(["children"],t),o=a.label||a.name;return{title:o,pathToTitle:Array.isArray(n)?["",...(0,I.chain)((0,I.prop)("label"),n),o]:["",o],fieldName:r||(0,at.Tde)(a.uri,n),attrType:a}},bt=(e,t)=>t?(0,at.k66)(e,t,(0,I.complement)(at.YkG)).map((t=>yt(e,t))):[],Et=(e,t)=>[{title:"",attributes:(0,I.pipe)((0,I.pick)(["id"]),I.values,(0,I.map)((e=>({title:e.label,fieldName:e.name,attrType:e}))))(at.xPW)},{title:"",attributes:bt(e,(0,at.nt9)(e,t))}],Tt=(e,t)=>[{title:"",attributes:(0,I.pipe)(I.values,(0,I.map)((e=>({title:e.label,fieldName:e.name,attrType:e}))))(at.PY2)},{title:"",attributes:bt(e,(0,at.V3K)(e,t))}],vt=e=>e.reduce(((e,t)=>(0,I.concat)(e,(0,I.concat)([t],vt((0,I.propOr)([],"children",t))))),[]),xt=(0,I.curry)(((e,t)=>e.find((e=>e.fieldName===t.fieldName)))),St=(0,I.curry)(((e,t)=>{const r=t.entityTypeUri?Et(e,t.entityTypeUri):Tt(e,t.relationTypeUri),n=(0,I.pipe)((0,I.chain)((0,I.prop)("attributes")),vt)(r);return(0,I.evolve)({attributes:(0,I.pipe)((0,I.map)((0,I.evolve)({data:xt(n)})),(0,I.reject)((0,I.propSatisfies)(I.isNil,"data")))},t)})),Ot=(0,I.pipe)((0,I.pick)(["id"]),G),Ct=(0,I.pipe)((0,I.pick)(["id"]),H),Rt=(0,I.both)((0,I.propSatisfies)(V,"entity"),(0,I.propSatisfies)(Y,"relation")),wt=(0,I.curry)(((e,t)=>{if(!t)return null;const r=!t.relation,n=function(e){let{entityTypeUri:t=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!(0,at.nt9)(e,t)}(e,t.entity),a=t.relation&&function(e){let{relationTypeUri:t=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!(0,at.V3K)(e,t)}(e,t.relation)||r;return r&&!n?null:(0,I.evolve)({entity:(0,I.ifElse)((0,I.always)((0,I.and)(n,a)),St(e),Ot),relation:(0,I.ifElse)((0,I.always)(a),St(e),Ct),children:(0,I.ifElse)((0,I.always)((0,I.and)(n,a)),(0,I.pipe)((0,I.map)(wt(e)),(0,I.reject)(Rt)),(0,I.always)([]))},t)})),It=e=>e[or].ui.entitiesLoading,At=e=>e[or].ui.totalLoading,_t=e=>e[or].ui.config,Pt=e=>e[or].ui.searchResultsViewMode,Nt=e=>e[or].ui.searchResultsColumns,kt=e=>e[or].ui.showSearchResults,Lt=e=>e[or].ui.isLoadedSavedState,{toggleQueryBuilderAttributeSelect:Dt}=ot;function Ut(e){console.warn(e)}function*jt(){yield(0,lt.gz)(pe(0)),yield(0,lt.rM)(zt)}function*Mt(){const e=yield(0,lt.Ys)(sr),t=yield(0,lt.Ys)(cr),r=yield(0,lt.Ys)(ir),n=yield(0,lt.Ys)(nt.ZP.selectors.getApiPath),a=yield(0,lt.Ys)(nt.ZP.selectors.getTenant),o={max:t,from:t*e,select:yield(0,lt.RE)(Bt)};yield(0,lt.RE)(Zt,pt(r)),yield(0,lt.gz)(he(!0));try{const e=yield(0,lt.RE)(ht,n,a,r,o);yield(0,lt.gz)(de(e))}catch(e){Ut(e),yield(0,lt.gz)(de([]))}yield(0,lt.gz)(he(!1))}function*Zt(e){const t=yield(0,lt.Ys)(nt.ZP.selectors.getSearchProviderData);(0,I.equals)(null==t?void 0:t.data,e)||(yield(0,lt.gz)(nt.yC.actions.setSearchNavigationData(null))),yield(0,lt.gz)(nt.yC.actions.setSearchProviderData({type:"graphsearch",data:e}))}function*zt(){const e=yield(0,lt.Ys)(ir),t=yield(0,lt.Ys)(nt.ZP.selectors.getApiPath),r=yield(0,lt.Ys)(nt.ZP.selectors.getTenant);yield(0,lt.gz)(fe(!0));try{const{count:a}=yield(0,lt.RE)(ft,t,r,e);yield(0,lt.gz)((n=a,{type:v.SET_TOTAL,payload:n}))}catch(e){Ut(e)}var n;yield(0,lt.gz)(fe(!1))}function*Ht(){const e=(yield(0,lt.Ys)(dr)).map((e=>e.uri)),t={select:yield(0,lt.RE)(Bt),searchOptions:"ovOnly"};yield(0,lt.gz)(he(!0));try{const r=yield(0,lt.RE)(at.DnY,e,t);yield(0,lt.gz)(de(r))}catch(e){Ut(e)}yield(0,lt.gz)(he(!1))}function*Gt(){const e=yield(0,lt.Ys)(Nt);return(0,We.vw)(e)}function*Bt(){const e=yield(0,lt.RE)(Gt);return(0,I.pipe)(I.uniq,(0,I.join)(","))([...it.Tv,...e])}function*Ft(e){const{groupId:t,attributeId:r,selectInfo:n}=e.payload,a=yield(0,lt.Ys)(ir),o={addAttributeAfter:J,changeAttribute:ee,clearAttribute:te,deleteAttribute:ae};yield(0,lt.RE)(Dt,{groups:a,findGroupPath:Ee,attributesPropName:"attributes",groupId:t,attributeId:r,selectInfo:n,actions:o})}function*Yt(){const e=yield(0,lt.Ys)(dr);e&&(yield(0,lt.gz)(nt.yC.actions.searchResultsSet(e)))}function*Wt(e){const{consoleExportApp:t}=e.payload||{},r=t.query?`&${t.query}`:null,n=yield(0,lt.Ys)(ir),a=pt(n),o=(0,E.x0)(),i=yield(0,lt.Ys)(nt.ZP.selectors.getServicesPath),l=yield(0,lt.Ys)(nt.ZP.selectors.getTenant),s=yield(0,lt.Ys)(nt.ZP.selectors.getEnvironment);try{yield(0,lt.RE)(at.KAm,i,l,s,o,a),yield(0,lt.gz)(nt.ui.actions.openConsoleApp(t.name,t.path||"graph",`exportId=${o}${r||""}`))}catch(e){console.warn(e),f.Z.addError({title:_().text("Export graph search result error"),message:e.errorMessage})}}function*Vt(e){if(e.payload){const r=yield(0,lt.Ys)(nt.ZP.selectors.getMetadata),n=wt(r,e.payload.groupsRoot),a=function(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).reduce(((t,r)=>{if(r.uri){const n=(0,at.zeJ)(e,r.uri);n&&t.push({id:r.id,label:n.label,attrType:n,size:r.size})}else{const e=(0,We.oX)().find((e=>e.id===r.id));e&&t.push({id:r.id,label:e.label,size:r.size})}return t}),[]);return t.length?t:(0,We.oX)()}(r,e.payload.searchResultsColumns);yield(0,lt.gz)((t=n,{type:v.ADD_GROUPS_BLOCK,payload:{block:t}})),yield(0,lt.gz)(me(a)),e.payload.showSearchResults&&!n&&(yield(0,lt.gz)(ye(!1))),e.payload.showSearchResults&&n&&(yield(0,lt.gz)(ce()))}var t}const qt=[function*(){yield(0,lt.ib)(v.TOGGLE_ATTRIBUTE_SELECT,Ft)},function*(){yield(0,lt.Fm)(v.RUN_SEARCH,jt)},function*(){yield(0,lt.Fm)([v.CHANGE_PAGE,v.CHANGE_ROWS_PER_PAGE],Mt)},function*(){yield(0,lt.Fm)(v.UPDATE_CURRENT_ENTITIES,Ht)},function*(){yield(0,lt.Fm)([v.SET_ENTITIES,C],Yt)},function*(){yield(0,lt.Fm)(v.UPDATE_STATE,Vt)},function*(){yield(0,lt.Fm)(v.EXPORT_RESULTS,Wt)}];var Xt=r(97698);const $t=(0,I.pipe)((0,I.evolve)({attributes:(0,I.map)((0,I.evolve)({data:(0,I.pick)(["fieldName"])}))})),Kt=e=>{if(!e)return null;const t={id:e.id};return e.entity&&(t.entity=$t(e.entity)),e.relation&&(t.relation=$t(e.relation)),e.children&&(t.children=e.children.map((e=>Kt(e)))),t},Qt=(0,Xt.createSelector)((e=>Kt(ir(e))),(e=>Pt(e)),(e=>kt(e)),(e=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>({id:e.id,uri:e.attrType&&e.attrType.uri,size:e.size})))}(Nt(e))),((e,t,r,n)=>({groupsRoot:e,searchResultsViewMode:t,showSearchResults:r,searchResultsColumns:n}))),Jt=[v.ADD_GROUPS_BLOCK,v.DELETE_GROUPS_BLOCK,v.SET_GROUP_ENTITY_TYPE,v.SET_GROUP_RELATION_TYPE_INFO,v.SET_GROUP_RELATION_FILTER,v.ADD_ATTRIBUTE_AFTER,v.CHANGE_ATTRIBUTE_DATA,v.SET_ATTRIBUTE_OPERATOR,v.DELETE_ATTRIBUTE,v.DUPLICATE_ATTRIBUTE,v.SET_FILTER,v.SET_VALUES,v.CLEAR,v.RUN_SEARCH,C,R,w];function*er(){return yield(0,lt.Ys)(Qt)}function*tr(){yield(0,lt.gw)(500);const e=yield(0,lt.RE)(er);yield(0,lt.gz)((e=>({type:v.SAVE_STATE,payload:e}))(e))}function*rr(){yield(0,lt.Fm)(Jt,tr)}function*nr(e){const{uri:t}=e.payload,r=(yield(0,lt.Ys)(dr)).map((0,I.prop)("uri")),n=(yield(0,lt.Ys)(sr))||0,a=(yield(0,lt.Ys)(cr))||D[0],o=r.indexOf(t)+n*a,i=yield(0,lt.Ys)(pr),l=yield(0,lt.Ys)(nt.ZP.selectors.getTenant);yield(0,lt.gz)(nt.yC.actions.setSearchNavigationData({uri:t,index:o,total:i,tenant:l,cache:r}))}const ar=[function*(){yield(0,lt.Fm)(nt.ui.constants.UIActions.OPEN_ENTITY,nr)}],or="relationshipSearch",ir=e=>e[or].search.groupsRoot,lr=(0,I.pipe)(ir,mt,I.isEmpty),sr=e=>e[or].search.page,cr=e=>e[or].search.rowsPerPage,pr=e=>e[or].search.total,dr=e=>e[or].search.entities,ur=(0,I.pipe)(ir,(0,I.path)(["entity","entityTypeUri"]));var mr=r(96379),hr=r(89902),fr=r(72342);const yr=(0,fr.makeStyles)((e=>({container:{display:"flex",flexDirection:"column",maxWidth:"645px","& $disabled":{pointerEvents:"none",opacity:.4}},disabled:{},avatar:{transform:"scale(0.5)",marginLeft:"5px",marginRight:"5px"},item:{display:"flex",flexGrow:1,flexShrink:0,flexDirection:"row",alignItems:"center",height:"32px"},info:{display:"flex",flexGrow:1,position:"relative",minWidth:0,"&:hover":{cursor:"pointer"}},textInfo:{display:"flex",flexGrow:1,lineHeight:"16px",backgroundColor:"transparent",minWidth:0,minHeight:"24px",alignItems:"center",zIndex:2},text:{flexGrow:1,marginLeft:"9px",marginRight:"4px",color:e.palette.text.primary,width:"100%",maxHeight:"32px",wordBreak:"break-word",wordWrap:"break-word",overflow:"hidden"},count:{flexShrink:0,fontSize:"12px",color:e.palette.text.secondary,textAlign:"right",marginRight:"4px"},colorBar:{minHeight:"24px"}}))),gr=e=>{let{entityTypes:t=[],onChange:r=m.ZT,className:n}=e;const a=yr(),i=Math.max(...t.map((e=>e.number)));return o().createElement("div",{className:g()(a.container,n),"data-reltio-id":"list-of-entity-types"},t.map((e=>o().createElement("div",{key:e.value,className:g()(a.item,{[a.disabled]:!e.number}),"data-reltio-id":"entity-type"},o().createElement(mr.Z,{className:a.avatar,entityType:e}),o().createElement("div",{className:a.info,onClick:()=>r(e.value)},o().createElement("div",{className:a.textInfo},o().createElement("div",{className:a.text},e.label),o().createElement("div",{className:a.count},(0,at.k7L)(e.number,5e3))),o().createElement(hr.Z,{className:a.colorBar,width:e.number,maxWidth:i}))))))};gr.propTypes={className:l().string,entityTypes:l().array,onChange:l().func};const br=gr;var Er=r(19701);function Tr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vr=(0,fr.makeStyles)({container:{backgroundColor:"white"},list:{paddingTop:"12px",paddingBottom:"8px"}}),xr=e=>{let{onChange:t=m.ZT}=e;const r=vr(),n=(()=>{const e=(0,Er._)(),[t,r]=(0,a.useState)([]),n=(0,b.useSelector)(nt.ZP.selectors.getMetadata),o=(0,b.useSelector)(nt.ZP.selectors.getGlobalSearchRequestOptions);return(0,a.useEffect)((()=>{const t=(0,I.pipe)((0,I.propOr)([],"entityTypes"),(0,I.filter)(at.oDv))(n),a=[{fieldName:"type",values:t.map((0,I.prop)("uri")),filter:"equals"}],i=e=>t.map((t=>{const r=(0,at.nIW)(t.uri);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Tr(e,t,r[t])}))}return e}({},t,{value:t.uri,number:(0,I.propOr)(0,r,e),label:(0,at.jFi)(n,{type:t.uri})||r})})),l={activityFilter:o.activityFilter,max:101};e((0,at.Yiz)({fieldName:"type",searchParams:a,options:l})).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,I.pipe)((0,I.prop)("type"),i,r)(e)})).catch((e=>{console.warn(e),r([])}))}),[o,n]),t})();return o().createElement("div",{className:r.container},n.length>0&&o().createElement(br,{className:r.list,entityTypes:n,onChange:t}))};xr.propTypes={onChange:l().func};var Sr=r(92679),Or=r(56961),Cr=r(38677),Rr=r(93553),wr=r(39475);const Ir=(0,fr.makeStyles)((e=>({container:{position:"relative","&:hover > $actions":{opacity:1}},groups:{backgroundColor:e.palette.background.paper,padding:"16px"},divider:{margin:"16px 0"},actions:{opacity:"0",transition:"opacity 0.3s",position:"absolute",top:16,right:16,paddingTop:0},addRelationButton:{marginTop:"-10px"}})));var Ar=r(92934),_r=r(51586);const Pr={flex:1,marginLeft:"10px"},Nr=(0,fr.makeStyles)((()=>({container:{},groupControls:{display:"flex",alignItems:"center",marginBottom:"20px",paddingRight:"117px"},entityTypeSelector:{flex:1.69,height:"46px","& $entityTypeSelectorLabel":{fontSize:"14px"}},entityTypeSelectorLabel:{},relationTypeSelector:{flex:1.69},relationFilterSelector:Pr,spacer:Pr}))),kr="46px",Lr=(0,fr.makeStyles)((()=>({row:{marginBottom:"20px","&:hover $actions":{opacity:1}},attributeSelectContainer:{flex:.9},attributeSelect:{width:"100%",height:kr},valuesWrapper:{width:"100%",display:"flex",minHeight:kr,alignItems:"flex-start",boxSizing:"border-box","& $input":{margin:0,borderRadius:"4px",paddingBottom:"4px !important",paddingTop:"2px !important"},"& $root":{borderRadius:"4px 4px 0 0",padding:0,display:"flex",alignItems:"center",margin:0}},input:{},root:{},actions:{opacity:"0",transition:"opacity 0.3s",paddingTop:"13px",width:"88px",height:"24px",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:"0",marginLeft:"8px"},filterSelector:{width:"190px"}})));var Dr=r(12933),Ur=r(53862);const jr=e=>!(e&&e.data),Mr=function(e){let{title:t,pathToTitle:r}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},Zr=e=>{let{rowData:t,rowContext:{entityTypeUri:r,metadata:n,dispatchGroupAction:i},attributeSelectorProps:l={}}=e;const s=Lr(),c=t&&t.id,p=(0,a.useCallback)((e=>{i(re,c,e)}),[c,i]),d=(0,a.useMemo)((()=>Et(n,r)),[n,r]);return o().createElement(Dr.Z,{className:s.attributeSelect,value:t&&t.data,getLabel:Mr,itemsGroups:d,onSelect:p,ungroup:!0,onRestoreFocus:l.onRestoreFocus,onOpenPopup:l.onOpen,disableRestoreFocus:l.disablePopoverRestoreFocus,disableEnforceFocus:l.disablePopoverRestoreFocus,disabled:!r})};Zr.propTypes={rowData:Ur.Xw,rowContext:l().shape({entityTypeUri:l().string,metadata:at.pGS,dispatchGroupAction:l().func}),attributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const zr=(0,a.memo)(Zr);var Hr=r(56569);function Gr(){return Gr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gr.apply(this,arguments)}const Br=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",Gr({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",focusable:"false"},r),o().createElement("defs",null,o().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM8 8v12h12V8H8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"svg3787243505a"})),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:"svg3787243505b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg3787243505a"})),o().createElement("g",{mask:"url(#svg3787243505b)",fill:"#000",fillOpacity:".54"},o().createElement("path",{d:"M0 0h24v24H0z"}))))))},Fr=e=>{let{rowData:t,rowContext:{dispatchGroupAction:r}}=e;const n=Lr(),i=t&&t.id,l=(0,a.useCallback)((()=>r(Q,i)),[i,r]),s=(0,a.useCallback)((()=>r(oe,i)),[i,r]),c=(0,a.useCallback)((()=>r(ae,i)),[i,r]);return o().createElement("div",{className:g()(n.actions)},o().createElement(wr.k,{tooltipTitle:_().text("Add"),icon:Hr.Z,size:"M",onClick:l}),!jr(t)&&o().createElement(wr.k,{tooltipTitle:_().text("Duplicate"),icon:Br,size:"M",onClick:s}),o().createElement(wr.k,{tooltipTitle:_().text("Delete"),icon:Sr.default,size:"M",onClick:c}))};Fr.propTypes={rowData:Ur.Xw,rowContext:l().shape({dispatchGroupAction:l().func})};const Yr=(0,a.memo)(Fr);var Wr=r(15299);const Vr=e=>{let{rowData:t,rowContext:{dispatchGroupAction:r}}=e;const n=Lr(),i=t&&(0,at.wNf)(t.filter),{values:l=[],data:{attrType:s,fieldName:c}={},filter:p,id:d}=t||{},u=s&&(0,at.PFL)(s),m=u&&(0,at.l1V)(u,p),h=(0,a.useCallback)((e=>r(le,d,e)),[r,d]),f=(0,a.useMemo)((()=>({filter:p,fieldName:c,values:l||[]})),[p,c,l]),y=(0,a.useMemo)((()=>({InputProps:{classes:{root:n.input}}})),[n]),g=(0,a.useMemo)((()=>({root:n.root})),[n]);return o().createElement("div",{className:n.valuesWrapper,"data-reltio-id":"attribute-value"},!jr(t)&&i&&o().createElement(Wr.Z,{filter:f,onChange:h,dataTypeDefinition:m,fullWidth:!0,TextFieldProps:y,color:"primary",classes:g,orientation:"horizontal"}))};Vr.propTypes={rowData:Ur.Xw,rowContext:l().shape({dispatchGroupAction:l().func})};const qr=(0,a.memo)(Vr),Xr=l().shape({id:l().string,attributes:l().arrayOf(Ur.Xw),entityTypeUri:l().string}),$r=l().shape({id:l().string,attributes:l().arrayOf(Ur.Xw),relationTypeUri:l().string,direction:l().oneOf(Object.values(at.Nsj)),filter:l().oneOf(Object.values(P))}),Kr=l().shape({id:l().string,entity:Xr,relation:$r,children:l().array});var Qr=r(90590),Jr=r(2633),en=r(7342);const tn=(0,a.memo)((e=>{var t,r;let{className:n,attribute:a,textFieldInputRef:i,isDisabled:l,height:s,onChange:c}=e;const p=(0,I.pipe)(at.XS2,en.Z);return o().createElement(Qr.Z,{label:"",placeholder:_().text("Equals"),className:n,value:l?void 0:{value:a.filter,label:p(a.filter)},options:(null==a||null===(t=a.data)||void 0===t||null===(r=t.filterOptions)||void 0===r?void 0:r.map((e=>({value:e,label:p(e)}))))||[],height:s,onChange:c,isDisabled:l,filterOption:Jr.Z.BY_LABEL,textFieldInputRef:i})})),rn=e=>{var t;let{rowData:r,rowContext:{dispatchGroupAction:n},textFieldInputRef:i}=e;const l=Lr(),s=null==r?void 0:r.id,c=(0,a.useCallback)((e=>n(ie,s,e.value)),[n,s]),p=null==r||null===(t=r.data)||void 0===t?void 0:t.attrType,d=p&&(0,I.assocPath)(["data","filterOptions"],(0,at.Klp)(p,r.data.fieldName),r);return o().createElement(tn,{className:l.filterSelector,attribute:d,textFieldInputRef:i,isDisabled:!p,onChange:c})},nn=(0,fr.makeStyles)((e=>({logicOperatorContainer:{width:"100px",marginRight:"40px",marginLeft:"12px",marginTop:"7px"},logicOperator:{fontSize:"14px",color:e.palette.text.secondary},logicOperatorPlaceholder:{paddingLeft:"16px",paddingTop:"10px"}})));var an=r(1128);const on=(0,fr.makeStyles)((()=>({select:{padding:"6px 16px 7px",width:"100px",boxSizing:"border-box"}}))),ln=e=>{let{className:t,value:r,onChange:n}=e;const a=on();return o().createElement(an.Z,{className:t,classes:a,value:r,entries:at.G8q,onChange:n,disableUnderline:!0})};ln.propTypes={className:l().string,value:l().string,onChange:l().func};const sn=ln,cn=(0,a.memo)((e=>{let{rowData:t,rowContext:{dispatchGroupAction:r}}=e;const n=nn(),i=null==t?void 0:t.id,l=null==t?void 0:t.operator,s=(0,a.useCallback)((e=>r(ne,i,e)),[r,i]);return o().createElement("div",{className:n.logicOperatorContainer},l?o().createElement(sn,{className:n.logicOperator,value:l,onChange:s}):o().createElement("div",{className:g()(n.logicOperator,n.logicOperatorPlaceholder)},_().text("Where")))})),pn=e=>{let{group:{id:t,attributes:r,entityTypeUri:n},entityTypes:i,dispatch:l,disabled:s}=e;const c=Nr(),p=Lr(),d=(0,b.useSelector)(nt.ZP.selectors.getMetadata),u=(0,a.useCallback)((e=>l(((e,t)=>({type:v.SET_GROUP_ENTITY_TYPE,payload:{groupId:e,entityTypeUri:t}}))(t,e[0]))),[t,l]),m=(0,a.useCallback)((function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return l(e(t,...n))}),[t,l]),h=(0,a.useMemo)((()=>n?[n]:[]),[n]),f=(0,a.useMemo)((()=>({root:p.row,logicOperatorContainer:p.logicOperatorContainer,attributeSelectorContainer:p.attributeSelectContainer})),[p]);return(0,a.useEffect)((()=>{n&&!i.find((e=>{let{uri:t}=e;return t===n}))?u([]):n||1!==i.length||u([i[0].uri])}),[u,n,i]),o().createElement("div",{className:c.container},o().createElement("div",{className:c.groupControls},o().createElement(Ar.Q,{classes:{root:c.entityTypeSelector,label:c.entityTypeSelectorLabel},entityTypes:i,selectedEntityTypes:h,single:!0,onChange:u,disabled:s}),o().createElement("div",{className:c.spacer})),o().createElement(_r.Z,{rowClasses:f,rowsData:r,LogicOperatorComponent:cn,AttributeSelectorComponent:zr,ValuesEditorComponent:qr,ActionsComponent:Yr,FilterSelectorComponent:rn,entityTypeUri:n,dispatchGroupAction:m,metadata:d}))};pn.propTypes={group:Xr,entityTypes:l().arrayOf(at.p8l),dispatch:l().func,disabled:l().bool};const dn=(0,a.memo)(pn);var un=r(85596);const mn=e=>{let{rowData:t,rowContext:{relationTypeUri:r,metadata:n,dispatchGroupAction:i},attributeSelectorProps:l={}}=e;const s=Lr(),c=t&&t.id,p=(0,a.useCallback)((e=>{i(re,c,e)}),[c,i]),d=(0,a.useMemo)((()=>Tt(n,r)),[n,r]);return o().createElement(Dr.Z,{className:s.attributeSelect,value:t&&t.data,getLabel:Mr,itemsGroups:d,onSelect:p,ungroup:!0,onRestoreFocus:l.onRestoreFocus,onOpenPopup:l.onOpen,disableRestoreFocus:l.disablePopoverRestoreFocus,disableEnforceFocus:l.disablePopoverRestoreFocus,disabled:!r})};mn.propTypes={rowData:Ur.Xw,rowContext:l().shape({relationTypeUri:l().string,metadata:at.pGS,dispatchGroupAction:l().func}),attributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const hn=(0,a.memo)(mn);function fn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const yn=e=>{let{group:t,parentEntityTypeUri:r,dispatch:n}=e;const i=Nr(),l=Lr(),{id:s,attributes:c,relationTypeUri:p,direction:d,filter:u}=t,m=(0,b.useSelector)(nt.ZP.selectors.getMetadata),h=(0,a.useCallback)((e=>{let{type:t,direction:r}=e;return n(((e,t,r)=>({type:v.SET_GROUP_RELATION_TYPE_INFO,payload:{groupId:e,relationTypeUri:t,direction:r}}))(s,t.uri,r))}),[s,n]),f=(0,a.useCallback)((e=>{let{value:t}=e;return n(((e,t)=>({type:v.SET_GROUP_RELATION_FILTER,payload:{groupId:e,filter:t}}))(s,t))}),[s,n]),y=(0,a.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return n(e(s,...r))}),[s,n]),{inRelations:g=[],outRelations:E=[]}=(0,a.useMemo)((()=>(0,at.UWq)(m,r)),[r,m]);(0,a.useEffect)((()=>{const e=d===at.Nsj.IN?g:E;if(p&&!e.find((e=>{let{uri:t}=e;return t===p})))h({type:{}});else if(!p&&1===g.concat(E).length){const e=1===g.length;h({type:e?g[0]:E[0],direction:e?at.Nsj.IN:at.Nsj.OUT})}}),[h,p,g,E,d]);const T=(0,a.useMemo)((()=>({root:l.row,logicOperatorContainer:l.logicOperatorContainer,attributeSelectorContainer:l.attributeSelectContainer})),[l]),x=(0,a.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fn(e,t,r[t])}))}return e}({},t,{relationType:t.relationTypeUri})),[t]),S=(0,a.useMemo)((()=>[{label:N[P.EXISTS],value:P.EXISTS},{label:N[P.NOT_EXISTS],value:P.NOT_EXISTS}]),[]);return o().createElement("div",{className:i.container},o().createElement("div",{className:i.groupControls},o().createElement(un.Z,{className:i.relationTypeSelector,label:_().text("Relationship type"),reversedContextLabels:!0,relation:x,inRelationTypes:g,outRelationTypes:E,onChange:h}),o().createElement(Qr.Z,{className:i.relationFilterSelector,label:"",options:S,value:S.find((0,I.propEq)("value",u)),onChange:f,TextFieldProps:{"data-reltio-id":"relation-filter"}})),o().createElement(_r.Z,{rowClasses:T,rowsData:c,LogicOperatorComponent:cn,AttributeSelectorComponent:hn,ValuesEditorComponent:qr,ActionsComponent:Yr,FilterSelectorComponent:rn,relationTypeUri:p,dispatchGroupAction:y,metadata:m}))};yn.propTypes={group:$r,parentEntityTypeUri:l().string,dispatch:l().func};const gn=(0,a.memo)(yn),bn="1px solid #6CACE4",En=24,Tn=(0,fr.makeStyles)({decorator:e=>{let{verticalGap:t=En}=e;return{marginLeft:"17px",borderLeft:bn,position:"relative","&:last-child":{borderLeft:"none","&:before":{borderLeft:bn}},"&:before":{top:0,height:t,width:9,borderBottom:bn,content:'""',display:"block",left:"0"},"&:after":{content:'""',position:"absolute",left:9,top:t-2+"px",borderColor:"transparent",borderLeftColor:"#6CACE4",borderStyle:"solid",borderWidth:"2.5px",borderLeftWidth:"5px"}}},plain:{"&$decorator":{"&:before":{width:0},"&:after":{borderStyle:"none"}}},wrapper:{marginLeft:18,marginTop:-8}}),vn=e=>{let{className:t,children:r,plain:n,enabled:a,verticalGap:i}=e;const l=Tn({verticalGap:i});return a?o().createElement("div",{className:g()(l.decorator,{[l.plain]:n},t)},o().createElement("div",{className:l.wrapper},r)):r};vn.propTypes={className:l().string,enabled:l().bool,plain:l().bool,children:l().node,verticalGap:l().number};const xn=vn,Sn=e=>{let{block:{id:t,entity:r,relation:n,children:i},parentEntityTypeUri:l}=e;const s=Ir(),c=(0,b.useDispatch)(),p=(0,b.useSelector)(nt.ZP.selectors.getMetadata),d=(0,a.useCallback)((()=>{return c((e=t,{type:v.DELETE_GROUPS_BLOCK,payload:{blockId:e}}));var e}),[t,c]),u=(0,a.useCallback)((()=>c(K(t))),[t,c]),m=r&&r.entityTypeUri,h=((e,t)=>{const r=(e.entityTypes||[]).filter(at.oDv);if(!t)return r;const{relationTypeUri:n,direction:a}=t,[o,i]=(0,at.j1S)(e,n),l=a===at.Nsj.IN?o:i;return r.filter((t=>{let{uri:r}=t;return(0,at.lhE)(e,l,r)}))})(p,n),f=!(!l||null!=n&&n.relationTypeUri);return o().createElement("div",{className:s.container},o().createElement("div",{className:s.groups},n&&o().createElement(o().Fragment,null,o().createElement(gn,{group:n,parentEntityTypeUri:l,dispatch:c}),o().createElement(Or.Z,{className:s.divider})),o().createElement(dn,{group:r,entityTypes:h,dispatch:c,disabled:f})),o().createElement("div",{className:s.actions},o().createElement(wr.k,{tooltipTitle:_().text("Delete"),tooltipPlacement:"bottom",icon:Sr.default,size:"M",onClick:d})),(i||[]).map((e=>o().createElement(xn,{key:e.id,enabled:!0},o().createElement(Sn,{parentEntityTypeUri:m,block:e})))),m&&o().createElement(xn,{enabled:!0},o().createElement(Cr.Z,{color:"primary",onClick:u,className:s.addRelationButton,"data-reltio-id":"add-relation-button"},o().createElement(Rr.Z,null),o().createElement("div",null,_().text("Add relation")))))};Sn.propTypes={block:Kr,parentEntityTypeUri:l().string};const On=(0,a.memo)(Sn),Cn=(0,fr.makeStyles)((()=>({root:{display:"flex",overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0},mainContent:{width:"100%",background:"white",display:"flex",flexDirection:"column"}})));var Rn=r(79312);function wn(){return wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wn.apply(this,arguments)}const In=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",wn({xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},r),o().createElement("g",null,o().createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),o().createElement("g",null,o().createElement("path",{fillOpacity:".54",d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"})))},An=(0,fr.makeStyles)({container:{marginLeft:"auto"}}),_n=()=>{const e=(0,b.useDispatch)(),t=An(),r=(0,b.useSelector)(nt.ZP.selectors.getCanUserMakeExport),{consoleExportApp:n}=(0,b.useSelector)(_t),i=(0,a.useCallback)((()=>{var t;e((t=n,{type:v.EXPORT_RESULTS,payload:{consoleExportApp:t}}))}),[n,e]);return o().createElement("div",{className:t.container},r&&n&&o().createElement(wr.k,{icon:In,size:"L",onClick:i,tooltipTitle:_().text("Export"),"data-reltio-id":"reltio-relationship-search-actions-menu-export"}))},Pn=(0,fr.makeStyles)((e=>({container:{height:"63px",display:"flex",alignItems:"center",padding:"0 20px",flexShrink:0},captionWrapper:{marginTop:"-2px",flexShrink:"0"},profileText:{paddingLeft:"8px",color:e.palette.text.secondary},profileNumber:{fontWeight:"600"}}))),Nn=()=>{const e=Pn(),t=(0,b.useSelector)(pr);return o().createElement("div",{className:e.container},o().createElement("div",{className:e.captionWrapper},o().createElement(Rn.Z,{component:"span",className:e.profileNumber,"data-reltio-id":"total-search-result"},_().number(t,"0,0")),o().createElement(Rn.Z,{variant:"body2",component:"span",className:e.profileText},_().text("total profiles"))),o().createElement(_n,null))};var kn=r(79002),Ln=r(87378),Dn=r(5050),Un=r(33945);const jn=e=>e===k;var Mn=r(99390);const Zn=(0,fr.makeStyles)((()=>({container:{display:"flex",margin:"0 20px",height:"59px",flexShrink:"0",alignItems:"center"},title:{flexGrow:"1",width:"0"},actionsBar:{display:"flex",flexDirection:"row",alignItems:"center",marginLeft:"13px"},splitter:{height:"32px",marginRight:"16px",marginLeft:"14px"}})));var zn=r(4270);const Hn=(0,fr.makeStyles)((()=>({button:{"&.MuiButtonGroup-grouped":{minWidth:"90px",padding:"8px 12px"}}})));function Gn(){return Gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gn.apply(this,arguments)}function Bn(){return Bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bn.apply(this,arguments)}const Fn=[{id:k,tooltipTitle:_().text("Table view"),title:_().text("Table"),Icon:e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",Gn({width:"25",height:"24",viewBox:"0 0 25 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},r),o().createElement("defs",null,o().createElement("path",{d:"M19 4H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 18H5v-8h2v8zM7 8H5V6h2v2zm6 10H9v-8h4v8zm0-10H9V6h4v2zm6 10h-4v-8h4v8zm0-10h-4V6h4v2z",id:"svg848939849a"})),o().createElement("g",{stroke:"none",strokeWidth:"1"},o().createElement("g",{transform:"translate(.2)"},o().createElement("mask",{id:"svg848939849b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg848939849a"})),o().createElement("g",{mask:"url(#svg848939849b)"},o().createElement("g",null,o().createElement("g",null,o().createElement("path",{d:"M0 0h24v24H0z"})))))))}},{id:L,tooltipTitle:_().text("List view"),title:_().text("List"),Icon:e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",Bn({width:"25",height:"24",viewBox:"0 0 25 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},r),o().createElement("defs",null,o().createElement("path",{d:"M20 15.5v3H9v-3h11zm-14 0a1 1 0 011 1v1a1 1 0 01-1 1H5a1 1 0 01-1-1v-1a1 1 0 011-1h1zm14-5v3H9v-3h11zm-14 0a1 1 0 011 1v1a1 1 0 01-1 1H5a1 1 0 01-1-1v-1a1 1 0 011-1h1zm14-5v3H9v-3h11zm-14 0a1 1 0 011 1v1a1 1 0 01-1 1H5a1 1 0 01-1-1v-1a1 1 0 011-1h1z",id:"svg3472870421a"})),o().createElement("g",{stroke:"none",strokeWidth:"1"},o().createElement("g",{transform:"translate(.2)"},o().createElement("mask",{id:"svg3472870421b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg3472870421a"})),o().createElement("g",{mask:"url(#svg3472870421b)"},o().createElement("path",{d:"M0 0h24v24H0z"})))))}}],Yn=e=>{let{className:t}=e;const r=Hn(),n=(0,b.useDispatch)(),a=(0,b.useSelector)(Pt);return o().createElement(zn.Z,{className:t,classes:{button:r.button},modes:Fn,modeId:a,onChange:e=>{a!==e&&n((e=>({type:C,payload:e}))(e))}})};Yn.propTypes={className:l().string};const Wn=Yn,Vn=()=>{const e=Zn(),t=(0,b.useSelector)(nt.ZP.selectors.getMetadata),r=(0,b.useSelector)(Nt),n=(0,b.useSelector)(ur),i=(0,b.useDispatch)(),l=(0,b.useSelector)(Pt),s=(0,a.useCallback)((e=>{const t=(0,We.tU)(e,r);i(me(e)),t&&i(ue())}),[i,r]);return o().createElement("div",{className:e.container},o().createElement(Rn.Z,{className:e.title},(0,at.jFi)(t,{type:n})," ",_().text("profiles")),o().createElement("div",{className:e.actionsBar},jn(l)&&o().createElement(o().Fragment,null,o().createElement(Mn.Z,{entityTypeUri:n,headColumns:r,onSelectColumns:s}),o().createElement(Or.Z,{orientation:"vertical",className:e.splitter})),o().createElement(Wn,null)))};var qn=r(59863);function Xn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $n=e=>{let{entities:t,basicTableRef:r}=e;const n=(0,b.useDispatch)(),i=(0,b.useSelector)(nt.ZP.selectors.getMetadata),l=(0,b.useSelector)(ur),s=(0,b.useSelector)(Nt),c=(0,a.useMemo)((()=>(0,We.oq)(i,l,s)),[i,l,s]),p=(0,a.useCallback)((e=>{let{what:t,where:r}=e;const a=(0,I.move)(t.columnIndex,r.columnIndex,s);n(me(a))}),[s,n]),d=(0,a.useCallback)((e=>{let{columns:t}=e;const r=(0,We.tU)(t,s);n(me(t)),r&&n(ue())}),[s,n]),u=(0,a.useCallback)((e=>{const t=s.map(((t,r)=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Xn(e,t,r[t])}))}return e}({},t,{size:e[r].size})));n(me(t))}),[s,n]);return o().createElement(qn.Z,{entities:t,entityTypeUri:l,headColumns:s,additionalColumns:c,dndColumnReorderingEnabled:!0,onReorderingColumn:p,onChangeColumnsList:d,onChangeColumnsSize:u,entitiesTableRef:r})};$n.propTypes={entities:l().arrayOf(at.pyR),basicTableRef:l().shape({current:l().object})};const Kn=$n,Qn=(0,fr.makeStyles)((()=>({container:{flexGrow:1,display:"flex",flexDirection:"column",position:"relative",overflow:"hidden"},pagination:{flexGrow:0,height:"52px"},listContainer:{overflowY:"auto",flex:1},tableContainer:{display:"flex",flexDirection:"column",height:"100%"}}))),Jn=()=>{const e=Qn(),t=(0,b.useDispatch)(),r=(0,a.useRef)(),n=(0,b.useSelector)(pr),i=(0,b.useSelector)(Pt),l=jn(i),s=(0,b.useSelector)(dr),c=(0,b.useSelector)(sr),p=(0,b.useSelector)(cr),d=(0,b.useSelector)(It),u=(0,b.useSelector)(At),m=d||u,h=(0,a.useCallback)((e=>t(pe(e))),[t]),f=(0,a.useCallback)((e=>t((e=>({type:v.CHANGE_ROWS_PER_PAGE,payload:{number:e}}))(e))),[t]);(0,a.useEffect)((()=>{r.current&&(r.current.scrollTop=0)}),[s]);const y=(0,a.useRef)(null);return o().createElement("div",{className:e.container},m&&o().createElement(Ln.Z,null),o().createElement(Vn,null),n?o().createElement("div",{className:l?e.tableContainer:e.listContainer,ref:r,"data-reltio-id":"result-container"},l?o().createElement(Kn,{entities:s,basicTableRef:y}):o().createElement(Dn.Z,{entities:s}),n>D[0]&&o().createElement("div",{className:e.pagination},o().createElement(Un.Z,{rowsPerPageOptions:D,count:n,page:c,onChangePage:h,rowsPerPage:p,onChangeRowsPerPage:f,basicTableRef:y}))):(e=>e?null:o().createElement(kn.ZP,{LogoRenderer:kn.B9.SEARCH_RESULTS,text:_().text("No results found."),secondaryText:_().text("Try adjusting your search or filter to find what you're looking for."),variant:kn.tC.embedded}))(m))};var ea=r(25296),ta=r(3954),ra=r(78223),na=r(87086);const aa="1px solid rgba(0, 0, 0, 0.33)",oa=(0,fr.makeStyles)((e=>({drawer:{flex:"0 0 288px"},docked:{flex:"0 0 288px"},drawerPaper:{width:288,display:"flex",flexDirection:"column",position:"relative",borderRight:aa},drawerScrollableArea:{display:"flex",flexDirection:"column",overflow:"auto",height:"100%"},menuIcon:{width:"24px",height:"24px",flexShrink:0,marginRight:"12px"},buttonRoot:{flexShrink:0},buttonExtended:{width:"256px",margin:"8px 16px",padding:"12px",backgroundColor:"rgba(0,0,0,0)",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)","&:hover":{backgroundColor:"rgba(0,0,0,0.1)"}},buttonLabel:{flexGrow:1,textAlign:"left",color:e.palette.text.secondary,fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px"},caption:{lineHeight:"16px",fontSize:"14px",fontWeight:100,color:"rgba(0,0,0, 0.54)",letterSpacing:"normal",display:"flex",padding:"23px 0 11px 16px",flexShrink:0},withBottomBorder:{borderBottom:aa,boxShadow:"0 1px 3px 0 rgba(0,0,0,0.12)"}}))),ia=(0,fr.makeStyles)((()=>({container:{position:"relative",padding:"0 16px"},actions:{position:"absolute",top:0,right:"4px",paddingTop:0}})));var la=r(29522);const sa=(0,fr.makeStyles)((e=>({container:{paddingBottom:"8px"},label:{fontSize:"13px",fontWeight:600,letterSpacing:0,lineHeight:"15px",marginBottom:"2px"},readableQuery:{"& > span":{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"}}}))),ca=e=>{let{label:t,filter:r,attributes:n}=e;const i=sa(),l=(0,b.useSelector)(nt.ZP.selectors.getAttributePresentations),s=(0,b.useSelector)(nt.ZP.selectors.getMetadata),c=(0,a.useMemo)((()=>(0,at.skb)(s,l,{},n)),[s,l,n]);return o().createElement("div",{className:i.container},o().createElement("div",{className:i.label},t,r!==P.EXISTS&&N[r]?` [${N[r]}]`:""),o().createElement("div",null,o().createElement(la.Z,{className:i.readableQuery,readableQuery:c})))};ca.propTypes={label:l().string,filter:l().string,attributes:l().arrayOf(Ur.Xw)};const pa=ca,da=e=>{let{group:t}=e;const{attributes:r,relationTypeUri:n,direction:a,filter:i}=t,l=(0,b.useSelector)(nt.ZP.selectors.getMetadata),s=(0,at.V3K)(l,n),c=a===at.Nsj.OUT?null==s?void 0:s.startObject:null==s?void 0:s.endObject,p=(0,at.PjQ)(c)||(null==s?void 0:s.label);return o().createElement(pa,{label:p,filter:i,attributes:r})};da.propTypes={group:$r};const ua=da,ma=e=>{let{group:t}=e;const{attributes:r,entityTypeUri:n}=t,a=(0,b.useSelector)(nt.ZP.selectors.getMetadata),i=(0,at.jFi)(a,{type:n});return o().createElement(pa,{label:i,attributes:r})};ma.propTypes={group:Xr};const ha=ma,fa=e=>{let{block:{entity:t,relation:r,children:n}}=e;const a=!!r;return o().createElement(o().Fragment,null,r&&r.relationTypeUri&&o().createElement(xn,{enabled:!0,verticalGap:15},o().createElement(ua,{group:r})),t&&t.entityTypeUri&&o().createElement(xn,{enabled:a,verticalGap:15},o().createElement(ha,{group:t}),(n||[]).map((e=>o().createElement(fa,{key:e.id,block:e})))))};fa.propTypes={block:Kr};const ya=(0,a.memo)(fa),ga=()=>{const e=ia(),t=(0,b.useDispatch)(),r=(0,b.useSelector)(ir),n=(0,a.useCallback)((()=>t(se())),[t]);return r&&o().createElement("div",{className:e.container},o().createElement("div",null,o().createElement(ya,{block:r})),o().createElement(wr.k,{className:e.actions,tooltipTitle:_().text("Delete"),tooltipPlacement:"bottom",icon:Sr.default,size:"M",onClick:n}))},ba=(0,ra.Z)(ea.Z),Ea=()=>{const e=(0,b.useDispatch)(),[t,r]=(0,a.useState)(!0),n=(0,a.useRef)(null),i=(0,a.useCallback)((()=>{r(n.current.scrollTop<=0)}),[]),l=(0,a.useCallback)((()=>{e(ye(!1))}),[e]),s=oa();return o().createElement(na.Z,{variant:"persistent",anchor:"left",open:!0,classes:{root:s.drawer,paper:s.drawerPaper,docked:s.docked}},o().createElement(ba,{tooltipTitle:_().text("Graph Search"),tooltipPlacement:"bottom-end",variant:"extended",classes:{root:s.buttonRoot,extended:s.buttonExtended},onClick:l},o().createElement(ta.Z,{color:"primary",className:s.menuIcon}),o().createElement("span",{className:s.buttonLabel},_().text("Graph Search"))),o().createElement(Rn.Z,{variant:"caption",className:g()(s.caption,{[s.withBottomBorder]:!t})},_().text("Search query")),o().createElement("div",{ref:n,className:s.drawerScrollableArea,onScroll:i,"data-reltio-id":"readable-search-query"},o().createElement(ga,null)))},Ta=e=>{let{className:t}=e;const r=Cn();return o().createElement("div",{className:g()(r.root,t)},o().createElement(Ea,null),o().createElement("div",{className:r.mainContent},o().createElement(Nn,null),o().createElement(Or.Z,null),o().createElement(Jn,null)))};Ta.propTypes={className:l().oneOfType([l().string,l().object])};const va=Ta;var xa=r(26482),Sa=r(13961);const Oa=(0,fr.makeStyles)({footer:{boxShadow:"0 -1px 0 0 rgba(0,0,0,0.12)"},actionButtons:{justifyContent:"flex-end",minHeight:"56px",padding:"0 8px"},button:{marginRight:"8px"}}),Ca=e=>{let{className:t}=e;const r=Oa(),n=(0,b.useDispatch)(),a=(0,b.useSelector)(lr);return o().createElement(Sa.Z,{position:"static",color:"transparent",className:g()(r.footer,t)},o().createElement(xa.Z,{className:r.actionButtons},o().createElement(Cr.Z,{onClick:()=>{n(se())},className:r.button},_().text("Cancel")),o().createElement(Cr.Z,{disabled:a,onClick:()=>{n(ce())},color:"primary",variant:"contained","data-reltio-id":"relation-search-button"},_().text("Search"))))};Ca.propTypes={className:l().string};const Ra=(0,fr.makeStyles)((e=>({toolbar:{display:"flex",flexShrink:0,flexDirection:"column",alignItems:"flex-start",minHeight:"72px",paddingLeft:"16px",paddingRight:"16px"},mainArea:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:"8px"},title:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:0,lineHeight:"16px",marginRight:"8px"},clearButton:{}}))),wa=e=>{let{children:t,className:r}=e;const n=Ra(),i=(0,b.useDispatch)(),l=(0,b.useSelector)(ir),s=(0,at.O27)(l),c=(0,a.useCallback)((()=>i(se())),[i]);return o().createElement(xa.Z,{className:g()(n.toolbar,r)},o().createElement("div",{className:n.mainArea},o().createElement(Rn.Z,{className:n.title},_().text("Search for")),o().createElement(Cr.Z,{color:"primary",className:n.clearButton,onClick:c,disabled:s},_().text("clear"))),t)};wa.propTypes={className:l().string,children:l().node};const Ia=(0,fr.makeStyles)({container:{display:"flex",flexDirection:"column",height:"100%",backgroundColor:"#FAFAFA",position:"absolute",top:0,left:0,right:0,bottom:0},header:{marginLeft:"104px",marginRight:"132px"},headerWithBottomBorder:{boxShadow:"0 1px 1px -1px rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px -3px rgba(0,0,0,0.2)",zIndex:1},content:{flex:"1 0 0px",paddingRight:"132px",paddingLeft:"104px",overflow:"auto"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}),Aa=e=>{let{config:t}=e;const r=Ia(),n=(0,b.useDispatch)();(0,a.useEffect)((()=>{n((e=>({type:O,payload:e}))(t))}),[t,n]);const i=(0,a.useRef)(),l=(0,b.useSelector)(ir),s=(0,b.useSelector)(kt),c=(0,b.useSelector)(Lt),[p,d]=(0,a.useState)(!0),u=(0,a.useCallback)((()=>{d(i.current&&i.current.scrollTop<=0)}),[]),m=(0,a.useCallback)((e=>n(K(null,e))),[n]);return c?o().createElement("div",{className:r.container},!s&&o().createElement(wa,{className:g()(r.header,{[r.headerWithBottomBorder]:!p})}),o().createElement("div",{className:r.content,ref:i,onScroll:u},s?o().createElement(va,null):l?o().createElement(On,{block:l}):o().createElement(xr,{onChange:m})),!s&&l&&o().createElement(Ca,null)):null};Aa.propTypes={config:l().object.isRequired,state:l().object};const _a=Aa;var Pa=r(66780),Na=r(97010);const ka=(0,s.Z)({productionPrefix:"relationshipSearch",disableGlobal:!0,seed:"relS"}),La=e=>{let{config:t,onResize:r=m.ZT}=e;return o().createElement(h.m.Provider,{value:t.id},o().createElement(Pa.DynamicModuleLoader,{modules:[{id:or,reducerMap:{[or]:(0,ge.combineReducers)({search:Ye,ui:rt})},sagas:[...qt,rr,...ar],initialActions:[]}]},o().createElement(c.ZP,{generateClassName:ka},o().createElement(p._,{dateAdapter:d.Q},o().createElement(u.Z,{handleHeight:!0,onResize:r}),t&&o().createElement(_a,{config:t}),o().createElement(f.Z,null)))))};La.propTypes={config:l().object,store:l().object,onResize:l().func};const Da={getSearchPage:sr,getSearchRowsPerPage:cr,getTotal:pr},Ua={updateState:e=>({type:v.UPDATE_STATE,payload:e})},ja=La,{default:Ma,actions:Za,constants:za}=n}}]);
1
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a3f2b20-0981-453d-8536-398b1f720b04",e._sentryDebugIdIdentifier="sentry-dbid-6a3f2b20-0981-453d-8536-398b1f720b04")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"1.4.1722"},(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[829],{56569:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"}),"AddCircle");t.Z=i},76981:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"}),"CloudDownload");t.Z=i},711:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");t.Z=i},63655:(e,t,r)=>{var n=r(71600);t.Z=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.Z=i},31563:(e,t,r)=>{var n=r(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(68671)),o=r(52322),i=(0,a.default)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=i},25296:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(31461),a=r(7896),o=r(24328),i=r(6277),l=r(69075),s=r(13705),c=r(7342),p=r(43853),d=r(8069),u=r(65992),m=r(52322);const h=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],f=(0,u.ZP)(s.Z,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,u.FO)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${(0,c.Z)(r.size)}`],"inherit"===r.color&&t.colorInherit,t[(0,c.Z)(r.size)],t[r.color]]}})((({theme:e,ownerState:t})=>{var r,n;return(0,a.Z)({},e.typography.button,{minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${d.Z.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48},"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})}),(({theme:e,ownerState:t})=>(0,a.Z)({},"inherit"!==t.color&&"default"!==t.color&&null!=(e.vars||e).palette[t.color]&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main,"&:hover":{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}})),(({theme:e})=>({[`&.${d.Z.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),y=o.forwardRef((function(e,t){const r=(0,p.Z)({props:e,name:"MuiFab"}),{children:o,className:s,color:u="default",component:y="button",disabled:g=!1,disableFocusRipple:b=!1,focusVisibleClassName:E,size:T="large",variant:v="circular"}=r,x=(0,n.Z)(r,h),S=(0,a.Z)({},r,{color:u,component:y,disabled:g,disableFocusRipple:b,size:T,variant:v}),O=(e=>{const{color:t,variant:r,classes:n,size:o}=e,i={root:["root",r,`size${(0,c.Z)(o)}`,"inherit"===t?"colorInherit":t]},s=(0,l.Z)(i,d.N,n);return(0,a.Z)({},n,s)})(S);return(0,m.jsx)(f,(0,a.Z)({className:(0,i.default)(O.root,s),component:y,disabled:g,focusRipple:!b,focusVisibleClassName:(0,i.default)(O.focusVisible,E),ownerState:S,ref:t},x,{classes:O,children:o}))}))},8069:(e,t,r)=>{r.d(t,{N:()=>o,Z:()=>i});var n=r(69222),a=r(15672);function o(e){return(0,a.Z)("MuiFab",e)}const i=(0,n.Z)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"])},9366:(e,t,r)=>{r.d(t,{Q:()=>c});var n=r(7896),a=r(95038),o=r.n(a);const i={Y:"year",YY:"year",YYYY:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:1},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},d:{sectionType:"weekDay",contentType:"digit",maxLength:1},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},l={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},s=["Missing timezone plugin","To be able to use timezones, you have to pass the default export from `moment-timezone` to the `dateLibInstance` prop of `LocalizationProvider`","Find more information on https://mui.com/x/react-date-pickers/timezone/#moment-and-timezone"].join("\n");class c{constructor({locale:e,formats:t,instance:r}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=i,this.setLocaleToValue=e=>{const t=this.getCurrentLocaleCode();return t===e.locale()?e:e.locale(t)},this.hasTimezonePlugin=()=>void 0!==this.moment.tz,this.createSystemDate=e=>{const t=this.moment(e).local();return void 0===this.locale?t:t.locale(this.locale)},this.createUTCDate=e=>{const t=this.moment.utc(e);return void 0===this.locale?t:t.locale(this.locale)},this.createTZDate=(e,t)=>{if(!this.hasTimezonePlugin())throw new Error(s);const r="default"===t?this.moment(e):this.moment.tz(e,t);return void 0===this.locale?r:r.locale(this.locale)},this.date=e=>{if(null===e)return null;const t=this.moment(e);return t.locale(this.getCurrentLocaleCode()),t},this.dateWithTimezone=(e,t)=>null===e?null:"UTC"===t?this.createUTCDate(e):"system"===t||"default"===t&&!this.hasTimezonePlugin()?this.createSystemDate(e):this.createTZDate(e,t),this.getTimezone=e=>{var t,r,n;if(e.isUTC())return"UTC";const a=null==(t=e._z)?void 0:t.name;return null!=(r=null!=a?a:null==(n=this.moment.defaultZone)?void 0:n.name)?r:"system"},this.setTimezone=(e,t)=>{var r,n;if("UTC"===t)return e.clone().utc();if("system"===t)return e.clone().local();if(!this.hasTimezonePlugin()){if("default"===t)return e;throw new Error(s)}const a="default"===t?null!=(r=null==(n=this.moment.defaultZone)?void 0:n.name)?r:"system":t,o=e.clone();return o.tz(a),o},this.toJsDate=e=>e.toDate(),this.parseISO=e=>this.moment(e,!0),this.toISO=e=>e.toISOString(),this.parse=(e,t)=>""===e?null:this.locale?this.moment(e,t,this.locale,!0):this.moment(e,t,!0),this.getCurrentLocaleCode=()=>this.locale||o().locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(o().localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=e=>e.match(/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g).map((e=>{const t=e[0];return"L"===t||";"===t?o().localeData(this.getCurrentLocaleCode()).longDateFormat(e):e})).join(""),this.getFormatHelperText=e=>this.expandFormat(e).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=e=>null===e,this.isValid=e=>this.moment(e).isValid(),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>{const r=e.clone();return r.locale(this.getCurrentLocaleCode()),r.format(t)},this.formatNumber=e=>e,this.getDiff=(e,t,r)=>e.diff(t,r),this.isEqual=(e,t)=>null===e&&null===t||this.moment(e).isSame(t),this.isSameYear=(e,t)=>e.isSame(t,"year"),this.isSameMonth=(e,t)=>e.isSame(t,"month"),this.isSameDay=(e,t)=>e.isSame(t,"day"),this.isSameHour=(e,t)=>e.isSame(t,"hour"),this.isAfter=(e,t)=>e.isAfter(t),this.isAfterYear=(e,t)=>e.isAfter(t,"year"),this.isAfterDay=(e,t)=>e.isAfter(t,"day"),this.isBefore=(e,t)=>e.isBefore(t),this.isBeforeYear=(e,t)=>e.isBefore(t,"year"),this.isBeforeDay=(e,t)=>e.isBefore(t,"day"),this.isWithinRange=(e,[t,r])=>e.isBetween(t,r,null,"[]"),this.startOfYear=e=>e.clone().startOf("year"),this.startOfMonth=e=>e.clone().startOf("month"),this.startOfWeek=e=>e.clone().startOf("week"),this.startOfDay=e=>e.clone().startOf("day"),this.endOfYear=e=>e.clone().endOf("year"),this.endOfMonth=e=>e.clone().endOf("month"),this.endOfWeek=e=>e.clone().endOf("week"),this.endOfDay=e=>e.clone().endOf("day"),this.addYears=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"years"):e.clone().add(t,"years"),this.addMonths=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"months"):e.clone().add(t,"months"),this.addWeeks=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"weeks"):e.clone().add(t,"weeks"),this.addDays=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"days"):e.clone().add(t,"days"),this.addHours=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"hours"):e.clone().add(t,"hours"),this.addMinutes=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"minutes"):e.clone().add(t,"minutes"),this.addSeconds=(e,t)=>t<0?e.clone().subtract(Math.abs(t),"seconds"):e.clone().add(t,"seconds"),this.getYear=e=>e.get("year"),this.getMonth=e=>e.get("month"),this.getDate=e=>e.get("date"),this.getHours=e=>e.get("hours"),this.getMinutes=e=>e.get("minutes"),this.getSeconds=e=>e.get("seconds"),this.getMilliseconds=e=>e.get("milliseconds"),this.setYear=(e,t)=>e.clone().year(t),this.setMonth=(e,t)=>e.clone().month(t),this.setDate=(e,t)=>e.clone().date(t),this.setHours=(e,t)=>e.clone().hours(t),this.setMinutes=(e,t)=>e.clone().minutes(t),this.setSeconds=(e,t)=>e.clone().seconds(t),this.setMilliseconds=(e,t)=>e.clone().milliseconds(t),this.getDaysInMonth=e=>e.daysInMonth(),this.getNextMonth=e=>e.clone().add(1,"month"),this.getPreviousMonth=e=>e.clone().subtract(1,"month"),this.getMonthArray=e=>{const t=[this.startOfYear(e)];for(;t.length<12;){const e=t[t.length-1];t.push(this.getNextMonth(e))}return t},this.mergeDateAndTime=(e,t)=>e.clone().hour(t.hour()).minute(t.minute()).second(t.second()),this.getWeekdays=()=>o().weekdaysShort(!0),this.getWeekArray=e=>{const t=this.setLocaleToValue(e),r=t.clone().startOf("month").startOf("week"),n=t.clone().endOf("month").endOf("week");let a=0,o=r;const i=[];for(;o.isBefore(n);){const e=Math.floor(a/7);i[e]=i[e]||[],i[e].push(o),o=o.clone().add(1,"day"),a+=1}return i},this.getWeekNumber=e=>e.week(),this.getYearRange=(e,t)=>{const r=this.moment(e).startOf("year"),n=this.moment(t).endOf("year"),a=[];let o=r;for(;o.isBefore(n);)a.push(o),o=o.clone().add(1,"year");return a},this.getMeridiemText=e=>this.is12HourCycleInCurrentLocale()?o().localeData(this.getCurrentLocaleCode()).meridiem("am"===e?0:13,0,!1):"am"===e?"AM":"PM",this.moment=r||o(),this.locale=e,this.formats=(0,n.Z)({},l,t)}}},85596:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),o=r(13980),i=r.n(o),l=r(98952),s=r(50914),c=r(64651),p=r(65629);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d.apply(this,arguments)}const u=e=>{let{relation:t={},inRelationTypes:r=[],outRelationTypes:o=[],onChange:i=s.identity,applyFirstByDefault:l=!1,reversedContextLabels:u=!1}=e,m=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["relation","inRelationTypes","outRelationTypes","onChange","applyFirstByDefault","reversedContextLabels"]);const{getRelationTypesOptions:h,fromEditorValue:f,toEditorValue:y}=(0,c.n)({reversedContextLabels:u}),g=(0,n.useMemo)((()=>h(r,o)),[h,r,o]),b=(0,n.useCallback)((0,s.pipe)(f(r,o),i),[f,r,o,i]),E=!!t.relationType;return(0,n.useEffect)((()=>{l&&g.length&&!E&&b(g[0])}),[g,l,b,E]),a().createElement(p.Z,d({value:y(t,g),options:g,onChange:b},m))};u.propTypes={className:i().string,relation:l.bNA,inRelationTypes:i().arrayOf(l.IYE),outRelationTypes:i().arrayOf(l.IYE),applyFirstByDefault:i().bool,reversedContextLabels:i().bool,onChange:i().func};const m=u},37573:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(24328),a=r.n(n),o=r(71153),i=r.n(o),l=r(98952),s=r(65439),c=r(14596);const p=e=>{let{entity:t,avatarClassName:r,imageClassName:n}=e;const o=(0,c.AH)(),p=(0,c.$H)()||"",d=(0,l.uie)(o,p,t),u=(0,l.vPL)(p,(0,l.XH2)(o,t.type)),m=e=>{e.target.onError=null,e.target.src=(0,l.m5F)('\n<svg width="400px" height="400px" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>Group</title>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="Group" fill-rule="nonzero">\n <rect id="Rectangle" fill="#DFE5E9" x="0" y="0" width="400" height="400"></rect>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M0,387.023257 L0,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 0,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n <path d="M5.68434189e-14,387.023257 L5.68434189e-14,399.918908 L400,399.918908 L400,386.023594 C366.631,377.336524 321.866,364.269931 315.979,359.161654 C308.985,353.083704 270.481,310.508063 270.481,310.508063 L270.481,286.186267 C270.481,286.186267 284.478,266.204006 284.478,261.854473 C284.478,257.515936 285.353,246.219746 291.481,241.011503 C297.61,235.792263 311.607,211.471466 312.481,206.253226 C313.355,201.043983 319.484,188.009379 312.481,185.400259 C305.478,182.801135 307.236,173.244359 308.984,168.026119 C310.733,162.817875 319.484,139.355788 322.981,133.277838 C326.488,127.199888 312.481,108.956041 312.481,108.956041 C312.481,108.956041 294.978,80.2857109 245.975,53.3547939 C196.971,26.4138803 168.967,42.9283105 168.967,42.9283105 L161.964,60.3024507 C161.964,60.3024507 138.341,64.6409874 123.46,77.6765909 C108.589,90.7121943 99.837,106.346921 98.963,115.903698 C98.088,125.460475 103.334,159.339048 105.966,164.557289 C108.589,169.765532 112.96,185.400259 112.96,185.400259 C112.96,185.400259 108.589,183.670842 105.966,188.879085 C103.334,194.097325 112.085,218.419122 112.96,220.159535 C113.834,221.897949 114.718,238.403382 119.963,237.532676 C125.218,236.663969 130.463,251.42799 130.463,251.42799 C130.463,251.42799 143.596,271.41125 144.47,275.759783 C145.344,280.09832 147.967,307.039233 147.967,307.039233 L126.967,331.36103 L102.46,355.682827 C102.459,355.682827 34.042,375.886013 5.68434189e-14,387.023257 Z" id="Path" fill="#B3BCC4"></path>\n </g>\n </g>\n</svg>\n')};return a().createElement(s.Z,{className:i()(r,n),src:d,imgProps:{onError:m}},a().createElement("img",{className:n,src:u,alt:"fallback entity avatar",onError:m}))}},96379:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(24328),a=r.n(n),o=r(98018),i=r(14596);function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}const s=e=>{const t=(0,i.$H)()||"";return a().createElement(o.ZP,l({},e,{storagePath:(r=t,r.endsWith("/")?r:r+"/")}));var r}},87378:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(24328),a=r.n(n),o=r(71153),i=r.n(o),l=r(30750);const s=(0,r(72342).makeStyles)({loadingOverlay:{position:"absolute",width:"100%",height:"100%",top:0,left:0,zIndex:10,backgroundColor:"rgba(255, 255, 255, 0.37)"},transparent:{backgroundColor:"transparent"},relativePosition:{"&$loadingOverlay":{position:"relative"}}}),c=e=>{let{transparent:t=!1,relativePosition:r=!1,className:n}=e;const o=s();return a().createElement(a().Fragment,null,a().createElement("div",{"data-reltio-id":"reltio-linear-load-indicator",className:i()(o.loadingOverlay,n,{[o.transparent]:t,[o.relativePosition]:r})},a().createElement(l.Z,{color:"primary"})))}},4270:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),o=r(38677),i=r(15894),l=r(71153),s=r.n(l),c=r(78223),p=r(47591);const d=(0,r(72342).makeStyles)((e=>({button:{"&.MuiButtonGroup-grouped":{minWidth:"30px",padding:"8px 8px",justifyContent:"start",fill:"rgba(0,0,0,0.54)",textTransform:"none",color:"rgba(0,0,0,0.87)",borderColor:"rgba(0,0,0,0.12)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:not(:last-of-type):hover":{borderRightColor:"transparent"},"&$current":{"& $icon":{color:e.palette.primary.main},backgroundColor:(0,p.Fq)(e.palette.primary.main,.12),fill:e.palette.primary.main,color:e.palette.primary.main,"&:hover":{backgroundColor:(0,p.Fq)(e.palette.primary.main,.24),borderRightColor:"transparent"}}}},icon:{color:"rgba(0,0,0,0.54)",width:"20px",height:"20px","& + $title":{marginLeft:"8px"}},title:{fontSize:"13px",lineHeight:"15px",letterSpacing:0},current:{}}))),u=(0,c.Z)(o.Z),m=e=>{let{className:t,classes:r={},modes:n=[],modeId:o,onChange:l}=e;const c=d();return a().createElement(i.Z,{className:t},n.map((e=>{let{id:t,title:n,tooltipTitle:i,Icon:p,disabled:d}=e;return a().createElement(u,{disabled:d,showForDisabled:d&&!!i,key:String(t),className:s()(c.button,{[c.current]:o===t},r.button),tooltipTitle:i,onClick:(m=t,()=>l(m)),"data-reltio-id":`reltio-search-mode-${t}`},p&&a().createElement(p,{className:c.icon}),n&&a().createElement("div",{className:c.title},n));var m})))}},33662:(e,t,r)=>{r.d(t,{Z:()=>T});var n=r(71153),a=r.n(n),o=r(50914),i=r(24328),l=r.n(i),s=r(2507),c=r.n(s),p=r(24394),d=r(30680),u=r(92679),m=r(31563),h=r(79573),f=r(40435),y=r(15311);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){E(e,t,r[t])}))}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const T=(0,i.memo)((e=>{let{value:t,autofocus:r,onSearch:n=h.ZT,rootRef:s,classes:E={},height:T,placeholder:v=c().text("Search")}=e,x=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["value","autofocus","onSearch","rootRef","classes","height","placeholder"]);const S=(0,y.y)({height:T}),[O,C]=(0,i.useState)(""),R=(0,o.pipe)((0,o.tap)(n),C),w=(0,o.isNil)(t)?O:t;return l().createElement(p.Z,g({startAdornment:l().createElement(d.Z,{position:"start"},l().createElement(m.default,{className:S.icon})),endAdornment:l().createElement(d.Z,{position:"end"},w.length>0&&l().createElement(f.Z,{icon:u.default,className:S.clearButton,onClick:()=>R("")})),autoFocus:r,classes:b({},E,{input:a()(S.input,E.input),root:a()(S.container,E.root)}),placeholder:v,value:w,onChange:(0,o.pipe)(h.NA,R),disableUnderline:!0,ref:s},x))}))},15311:(e,t,r)=>{r.d(t,{y:()=>n});const n=(0,r(72342).makeStyles)((()=>({container:e=>{let{height:t=36}=e;return{height:t,borderRadius:"2px",alignItems:"center",backgroundColor:"rgba(0,0,0,0.03)",minWidth:"100px"}},icon:{opacity:.67,marginLeft:"10px",marginRight:"6px"},input:{fontSize:"13px",width:"100%"},clearButton:{marginRight:"10px"},white:{backgroundColor:"rgb(255, 255, 255)",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.24)"}})))},22311:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(24328),a=r.n(n),o=r(71153),i=r.n(o),l=r(2507),s=r.n(l),c=r(47019),p=r(54275),d=r(33662);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}const m=e=>{let{title:t,className:r,onSearch:n,hideTitle:o,hideSearchInput:l,headerPlacement:m="top",containerWidth:h,containerHeight:f,searchInputOnKeyDown:y,children:g,searchInputRef:b,anchorOrigin:E={vertical:"top",horizontal:"right"},transformOrigin:T={vertical:"top",horizontal:"right"}}=e,v=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["title","className","onSearch","hideTitle","hideSearchInput","headerPlacement","containerWidth","containerHeight","searchInputOnKeyDown","children","searchInputRef","anchorOrigin","transformOrigin"]);const x=(0,p.Z)({containerWidth:h,containerHeight:f}),S=a().createElement(a().Fragment,null,!o&&a().createElement("div",{className:x.header},t),!l&&a().createElement(d.Z,{onSearch:n,autofocus:!0,onKeyDown:y,inputRef:b,classes:{root:x.searchInputContainer},placeholder:s().text("Search & add attributes"),height:40}));return a().createElement(c.ZP,u({anchorOrigin:E,transformOrigin:T},v),a().createElement("div",{className:i()(x.container,r),style:{width:h}},"top"===m&&S,a().createElement("div",{className:x.list},g),"bottom"===m&&S))}},26638:(e,t,r)=>{r.d(t,{t:()=>i});var n=r(24328),a=r(50914),o=r(63485);const i=e=>{let{items:t,open:r,onSelectFocusedItem:i,selectedItems:l,onClose:s}=e;const[c,p]=(0,n.useState)(null),d=(0,n.useRef)(!1),u=(0,n.useCallback)((e=>{let r=null===e?u(-1):e;for(;null!==e&&r<t.length&&(r<=e||r>=0&&(0,o.c)(t[r]));)r+=1;return r!==t.length?r:u(-1)}),[t]),m=(0,n.useCallback)((e=>{let r=null===e?t.length-1:e;for(;null!==e&&r>=0&&(r>=e||(0,o.c)(t[r]));)r-=1;return r<0?t.length-1:r}),[t]),h=(0,n.useCallback)((()=>{if(!(0,a.isNil)(c)){const e=t[c].item;!e.item.notSelectable&&i({item:e.item,groupData:e})}}),[i,t,c]),f=(0,n.useCallback)((e=>{if(0!==t.length)switch(e.key){case"Down":case"ArrowDown":return p(u),e.preventDefault(),!1;case"Up":case"ArrowUp":return p(m),e.preventDefault(),!1;case"Enter":d.current=!0,h();break;case"Tab":s&&s(e);break;default:return}}),[t,u,m,h,s]);return(0,n.useEffect)((()=>{if(d.current){d.current=!1;const e=t.findIndex((e=>e.item.moveTo));e>-1&&p(e)}else p(null)}),[t,r,l]),{focusIndex:c,handleKeyDown:f}}},54275:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(72342);const a=(0,n.makeStyles)((()=>({container:e=>{let{containerHeight:t=553,containerWidth:r}=e;return{display:"flex",flexDirection:"column",height:t,width:r,flexGrow:1}},header:{marginLeft:"16px",marginTop:"16px",marginBottom:"12px",fontSize:"16px",fontWeight:500,letterSpacing:"0.15px",lineHeight:"24px"},searchInputContainer:{margin:"0 16px 12px 16px",flexShrink:"0"},list:{flexGrow:1,height:0,overflow:"hidden",width:"100%",position:"relative","& ul":{paddingBottom:0,paddingTop:0}}})))},63485:(e,t,r)=>{r.d(t,{Z:()=>m,c:()=>d});var n=r(24328),a=r.n(n),o=r(13980),i=r.n(o),l=r(50166),s=r(88267);const c=(0,r(72342).makeStyles)({stickyTitlesWrapper:{position:"absolute",top:0,"& > div":{zIndex:1,position:"absolute",top:0,width:"100%",visibility:"hidden"}}});var p=r(41008);const d=e=>e.titleItemIndex===e.index,u=e=>{let{items:t,getItemSize:r,renderItem:o,renderGroupTitle:i,width:u="100%",height:m,fixedTitle:h=!0,itemKey:f=(e=>e),disableHorizontalScrollbar:y,hideSubtitles:g,focusIndex:b=null,onInnerContainerResize:E}=e;const T=c(),v=(0,n.useRef)(null),x=(0,n.useRef)(null),S=(0,n.useRef)(null),O=(0,n.useRef)([0]),C={topMargin:0},R=(0,n.useMemo)((()=>!g||(t||[]).some((e=>null!==e.titleItemIndex))),[t,g]),w=(0,n.useCallback)((e=>{const n=O.current.length;let a=0;t.slice(n-1,e+1).forEach(((e,t)=>{const o=n+t-1;t>0&&(O.current[o]=O.current[o-1]+a),a=r(o,e.item)}))}),[r,t]),I=(0,n.useCallback)((e=>t[e].titleItemIndex),[t]),A=(0,n.useCallback)((e=>t[e]),[t]);(0,n.useEffect)((()=>{requestAnimationFrame((()=>{v.current&&v.current.scrollTo(0)}))}),[t.length]),(0,n.useEffect)((()=>{v.current&&v.current.resetAfterIndex(0),_();const e=(e=>{const t=e.findIndex((e=>e.item.moveTo));if(t>-1){w(t);const e=I(t);return{offset:O.current[t],titleHeight:r(e,A(e).item)}}})(t);if(e&&e.offset&&v.current){const{titleHeight:t}=e,r=e.offset-t;(r<v.current.state.scrollOffset||r>v.current.state.scrollOffset+m)&&requestAnimationFrame((()=>{v.current&&v.current.scrollTo(r-(m-t)/2)}))}}),[w,A,r,I,m,O,t,v]);const _=()=>{S.current&&x.current&&(S.current.style.width=x.current.offsetWidth+"px")},P=(0,n.useCallback)((e=>{let r=null,n=0;return t.some(((t,a)=>{w(a+10);const o=O.current[a+1];return e>=n&&e<o&&(r={index:a,offset:n,listItem:t}),n=o,r})),r}),[w,O,t]),N=(0,n.useCallback)((e=>r(e,A(e).item)),[A,r]),k=(0,n.useCallback)((e=>{let{index:t,style:r,data:n}=e;const a=A(t);return a.item&&(d(a)&&i(r,a.item)||o(r,a.item,t,n))}),[A,i,o]),{handleOnItemsRendered:L}=(0,p.LW)({items:t,focusIndex:b,listRef:v}),D=(0,n.useCallback)((()=>t.filter((e=>d(e))).map((e=>(e=>a().createElement("div",{className:"stickyTitleItem",style:{visibility:"hidden"},"data-index":e.index,key:e.index},i({height:r(e.index,e.item)},e.item)))(e)))),[r,t,i]);return a().createElement(a().Fragment,null,a().createElement("div",{ref:S,className:T.stickyTitlesWrapper},h&&D()),E&&x.current&&a().createElement(s.Z,{handleHeight:!0,onResize:E,targetDomEl:x.current}),a().createElement(l.VariableSizeList,{ref:v,itemCount:t.length,itemSize:N,width:u,height:m,itemKey:f,innerRef:x,onScroll:e=>{let{scrollOffset:n,scrollDirection:a}=e;if(!h||!R)return;const o=P(n),i=o&&I(o.index);var l;null!==i&&(l=i,S.current&&[...S.current.querySelectorAll(".stickyTitleItem")].forEach((e=>{e.dataset.index===l.toString()?(e.style.visibility="visible",C.index=l):e.style.visibility="hidden"}))),_();const s=null!==i&&r(i,A(i).item),c=P(n+s+C.topMargin);let p=0;if(c){switch(a){case"forward":c.offset-n>0&&d(c.listItem)&&(p=s-(c.offset-n));break;case"backward":{const e=i>-1&&(u=i,t.findIndex(((e,t)=>d(e)&&u<t))),r=(e=>(w(e),O.current[e]))(e);e>-1&&n<r&&s>=r-n&&(p=s-(r-n))}}(e=>{S.current&&(C.topMargin=-e,S.current.style.top=-e+"px")})(p)}var u},style:y?{overflowX:"hidden"}:void 0,overscanCount:5,onItemsRendered:L},k))};u.propTypes={items:i().arrayOf(i().object).isRequired,getItemSize:i().func.isRequired,renderItem:i().func.isRequired,width:i().oneOfType([i().number,i().string]),height:i().number.isRequired,renderGroupTitle:i().func,fixedTitle:i().bool,hideSubtitles:i().bool,itemKey:i().func,disableHorizontalScrollbar:i().bool,focusIndex:i().number,onInnerContainerResize:i().func};const m=u},41008:(e,t,r)=>{r.d(t,{LG:()=>o,LW:()=>i});var n=r(50914),a=r(24328);const o=e=>{const t=e=>(0,n.flatten)(e.map((e=>[e].concat(e.items?t(e.items):[]))));let r=null;return t(e).map(((e,t)=>(e&&e.items&&(r=t),{item:e,index:t,titleItemIndex:r})))},i=e=>{let{focusIndex:t,listRef:r,items:n}=e;const o=(0,a.useRef)(null),i=(0,a.useRef)(null),l=(0,a.useCallback)((e=>{let{visibleStartIndex:t,visibleStopIndex:r}=e;o.current=t,i.current=r}),[]);return(0,a.useEffect)((()=>{r.current&&null!==t&&0!==n.length&&(t<Math.max(o.current+3,0)?r.current.scrollToItem(Math.max(t-3,0),"start"):t>Math.min(i.current-3,n.length-1)&&r.current.scrollToItem(Math.min(t+3,n.length-1),"end"))}),[t,n.length,r]),{handleOnItemsRendered:l}}},65629:(e,t,r)=>{r.d(t,{Z:()=>C});var n=r(24328),a=r.n(n),o=r(13980),i=r.n(o),l=r(2507),s=r.n(l),c=r(50914),p=r(71153),d=r.n(p),u=r(95341),m=r(79312);const h=(0,r(72342).makeStyles)({container:{display:"flex",alignItems:"center",height:"32px",minHeight:"32px",padding:0},text:{display:"flex",width:"calc(100% - 68px)"},textItem:{fontSize:"13px",lineHeight:"15px",marginRight:10},primaryTextItem:{flex:"1 0",flexBasis:0,maxWidth:"50%",overflow:"hidden",textOverflow:"ellipsis"},secondaryTextItem:{flex:"1 0",flexBasis:0,overflow:"hidden",textOverflow:"ellipsis"},icons:{transform:"scale(0.5)",position:"relative",flexShrink:0,width:"68px",bottom:"10px"},iconTop:{position:"absolute",top:0,left:0,zIndex:1},iconBottom:{position:"absolute",top:0,left:26,zIndex:0}});var f=r(96379),y=r(40007);function g(){return g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}const b=e=>{let{innerRef:t,innerProps:r,selectOption:n,data:o}=e;const i=h(),{value:l,label:s,startObject:c,endObject:p}=o,b=c.objectType.label+" ↔ "+p.objectType.label;return a().createElement(u.Z,g({className:i.container,ref:t,key:l,onClick:()=>n({label:s,value:l,startObject:c,endObject:p})},r),a().createElement("div",{className:i.icons},a().createElement(f.Z,{className:i.iconTop,entityType:c.objectType}),a().createElement(f.Z,{className:i.iconBottom,entityType:p.objectType})),a().createElement("div",{className:i.text},a().createElement(y.Z,{value:s},a().createElement(m.Z,{className:d()(i.textItem,i.primaryTextItem)},s)),a().createElement(y.Z,{value:b},a().createElement(m.Z,{color:"textSecondary",className:d()(i.textItem,i.secondaryTextItem)},b))))};b.propTypes={innerRef:i().oneOfType([i().oneOf([null]),i().func,i().shape({current:i().any.isRequired})]),innerProps:i().object.isRequired,selectOption:i().func.isRequired,data:i().shape({value:i().string.isRequired,label:i().string.isRequired,startObject:i().object,endObject:i().object})};const E=b;var T=r(84425);function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v.apply(this,arguments)}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const S=e=>{let{value:t={},options:r=[],onChange:o=c.identity,TextFieldProps:i}=e,l=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["value","options","onChange","TextFieldProps"]);const p=(0,n.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){x(e,t,r[t])}))}return e}({},(0,c.defaultTo)({},i),{"data-reltio-id":"relation-type-selector"})),[i]);return a().createElement(T.Z,v({value:t,options:r,onChange:o,label:s().text("Select relationship type "),components:{Option:E},TextFieldProps:p},l))},O=i().shape({label:i().string.isRequired,value:i().string.isRequired,startObject:i().object,endObject:i().object});S.propTypes={value:O,options:i().arrayOf(O),onChange:i().func};const C=S},64651:(e,t,r)=>{r.d(t,{n:()=>i});var n=r(24328),a=r(98952),o=r(50914);const i=e=>{let{reversedContextLabels:t}=e;return{getRelationTypesOptions:(0,n.useCallback)(((e,r)=>{const n={},i=(0,o.pipe)(a.PjQ,(0,o.tap)((e=>n[e]=(0,o.propOr)(0,e,n)+1))),l=(0,o.ascend)((0,o.prop)("label")),s=(0,o.curry)(((e,r)=>{let{uri:n,label:o,startObject:l,endObject:s}=r;const c=e===(t?a.Nsj.OUT:a.Nsj.IN)?l:s;return{label:{directionalLabel:i(c),typeLabel:o},value:`${n},${e}`,startObject:l,endObject:s}}));return e.map(s(a.Nsj.IN)).concat(r.map(s(a.Nsj.OUT))).map((0,o.evolve)({label:e=>{let{directionalLabel:t,typeLabel:r}=e;return t?n[t]>1?`${t} (${r})`:t:r}})).sort(l)}),[t]),fromEditorValue:(0,n.useCallback)(((e,t)=>r=>{const[n,i]=r.value.split(",");return{type:(i===a.Nsj.IN?e:t).find((0,o.propEq)("uri",n)),direction:i}}),[]),toEditorValue:(0,n.useCallback)(((e,t)=>t.find((0,o.propEq)("value",`${e.relationType},${e.direction}`))),[])}}},55524:(e,t,r)=>{r.r(t),r.d(t,{RelationshipSearchView:()=>Ma,actions:()=>Za,constants:()=>za});var n={};r.r(n),r.d(n,{actions:()=>Ua,constants:()=>v,default:()=>ja,parseSearchState:()=>Na.Z,selectors:()=>Da});var a=r(24328),o=r.n(a),i=r(13980),l=r.n(i),s=r(54426),c=r(40855),p=r(41633),d=r(9366),u=r(88267),m=r(79573),h=r(63532),f=r(32479),y=r(71153),g=r.n(y),b=r(52730),E=r(37164),T=r(17640);const v={ADD_GROUPS_BLOCK:"RELATION_SEARCH_ADD_GROUPS_BLOCK",DELETE_GROUPS_BLOCK:"RELATION_SEARCH_DELETE_GROUPS_BLOCK",SET_GROUP_ENTITY_TYPE:"RELATION_SEARCH_SET_GROUP_ENTITY_TYPE",SET_GROUP_RELATION_TYPE_INFO:"RELATION_SEARCH_SET_GROUP_RELATION_TYPE_INFO",SET_GROUP_RELATION_FILTER:"RELATION_SEARCH_SET_GROUP_RELATION_FILTER",ADD_ATTRIBUTE_AFTER:"RELATION_SEARCH_ADD_ATTRIBUTE_AFTER",CHANGE_ATTRIBUTE_DATA:"RELATION_SEARCH_CHANGE_ATTRIBUTE_DATA",TOGGLE_ATTRIBUTE_SELECT:"RELATION_SEARCH_TOGGLE_ATTRIBUTE_SELECT",SET_ATTRIBUTE_OPERATOR:"RELATION_SEARCH_SET_ATTRIBUTE_OPERATOR",DELETE_ATTRIBUTE:"RELATION_SEARCH_DELETE_ATTRIBUTE",DUPLICATE_ATTRIBUTE:"RELATION_SEARCH_DUPLICATE_ATTRIBUTE",SET_FILTER:"RELATION_SEARCH_SET_FILTER",SET_VALUES:"RELATION_SEARCH_SET_VALUES",CLEAR:"RELATION_SEARCH_CLEAR",RUN_SEARCH:"RELATION_SEARCH_RUN_SEARCH",CHANGE_PAGE:"RELATION_SEARCH_CHANGE_PAGE",CHANGE_ROWS_PER_PAGE:"RELATION_SEARCH_CHANGE_ROWS_PER_PAGE",SET_ENTITIES:"RELATION_SEARCH_SET_ENTITIES",SET_TOTAL:"RELATION_SEARCH_SET_TOTAL",UPDATE_CURRENT_ENTITIES:"RELATION_SEARCH_UPDATE_CURRENT_ENTITIES",SAVE_STATE:"RELATION_SEARCH_SAVE_STATE",UPDATE_STATE:"RELATION_SEARCH_UPDATE_STATE",EXPORT_RESULTS:"RELATION_SEARCH_EXPORT_RESULTS"},x="RELATION_SEARCH_UI_SET_LOADING_ENTITY",S="RELATION_SEARCH_UI_SET_LOADING_TOTAL",O="RELATION_SEARCH_UI_SET_CONFIG",C="RELATION_SEARCH_UI_SET_SEARCH_RESULTS_VIEW_MODE",R="RELATION_SEARCH_UI_SET_SEARCH_RESULTS_COLUMNS",w="RELATION_SEARCH_UI_SET_SHOW_SEARCH_RESULTS";var I=r(50914),A=r(2507),_=r.n(A);const P={EXISTS:"exists",NOT_EXISTS:"not"},N={[P.EXISTS]:_().text("Exists"),[P.NOT_EXISTS]:_().text("Missing")},k="table",L="list",D=[25,50,100],U="entityTypeUri",j="relationTypeUri",M="direction",Z="attributes",z="filter",H=e=>{let{relationTypeUri:t,direction:r,id:n}=e;return{[Z]:[],[j]:t,[M]:r,[z]:P.EXISTS,id:(0,I.when)((0,I.pipe)((0,I.startsWith)("relation-"),I.not),(0,I.concat)("relation-"))(n)}},G=e=>{let{entityTypeUri:t,id:r}=e;return{[Z]:[],[U]:t,id:(0,I.when)((0,I.pipe)((0,I.startsWith)("entity-"),I.not),(0,I.concat)("entity-"))(r)}},B=function(){let{entityTypeUri:e,relationTypeUri:t,direction:r,id:n=(0,E.x0)()}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:(0,E.x0)()};return{id:n,entity:G({entityTypeUri:e,id:n}),relation:H({relationTypeUri:t,direction:r,id:n}),children:[]}},F=(0,I.omit)(["id"],H({id:""})),Y=(0,I.pipe)((0,I.omit)(["id"]),(0,I.equals)(F)),W=(0,I.omit)(["id"],G({id:""})),V=(0,I.pipe)((0,I.omit)(["id"]),(0,I.equals)(W)),{getAttributeData:q,getAttributeObject:X,getEmptyAttributeObject:$}=T,K=(e,t,r,n)=>({type:v.ADD_GROUPS_BLOCK,payload:{block:B({entityTypeUri:t,relationTypeUri:r,direction:n}),parentBlockId:e}}),Q=(e,t)=>({type:v.ADD_ATTRIBUTE_AFTER,payload:{groupId:e,attributeId:t,attribute:$()}}),J=(e,t,r)=>({type:v.ADD_ATTRIBUTE_AFTER,payload:{groupId:e,attributeId:t,attribute:X(r)}}),ee=(e,t,r)=>({type:v.CHANGE_ATTRIBUTE_DATA,payload:{groupId:e,attributeId:t,attributeData:q(r)}}),te=(e,t)=>({type:v.CHANGE_ATTRIBUTE_DATA,payload:{groupId:e,attributeId:t,attributeData:null}}),re=(e,t,r)=>({type:v.TOGGLE_ATTRIBUTE_SELECT,payload:{groupId:e,attributeId:t,selectInfo:r}}),ne=(e,t,r)=>({type:v.SET_ATTRIBUTE_OPERATOR,payload:{groupId:e,attributeId:t,operator:r}}),ae=(e,t)=>({type:v.DELETE_ATTRIBUTE,payload:{groupId:e,attributeId:t}}),oe=(e,t)=>({type:v.DUPLICATE_ATTRIBUTE,payload:{groupId:e,attributeId:t,id:(0,E.x0)()}}),ie=(e,t,r)=>({type:v.SET_FILTER,payload:{groupId:e,attributeId:t,filter:r}}),le=(e,t,r)=>({type:v.SET_VALUES,payload:{groupId:e,attributeId:t,values:r}}),se=()=>({type:v.CLEAR}),ce=()=>({type:v.RUN_SEARCH}),pe=e=>({type:v.CHANGE_PAGE,payload:{pageNumber:e}}),de=e=>({type:v.SET_ENTITIES,payload:e}),ue=()=>({type:v.UPDATE_CURRENT_ENTITIES}),me=e=>({type:R,payload:e}),he=e=>({type:x,payload:e}),fe=e=>({type:S,payload:e}),ye=e=>({type:w,payload:e});var ge=r(28523);const be=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];for(let a of e)if((0,I.path)(a,r)===t)return[...n,...a.slice(0,-1)];if(r.children)for(let a=0;a<r.children.length;a++){const o=be(e,t,r.children[a],[...n,"children",a]);if(o)return o}},Ee=(0,I.curry)(((e,t)=>be([["id"],["entity","id"],["relation","id"]],e,t))),{addAttributeAfter:Te,changeAttributeData:ve,setAttributeOperator:xe,deleteAttribute:Se,duplicateAttribute:Oe,setFilter:Ce,setValues:Re,createGetGroupLens:we,createGetAttributesLens:Ie,createGetAttributeIndex:Ae,createGetAttributeLens:_e,createSetAttributeProp:Pe,createGetAttributeProp:Ne}=T,ke={searchState:{},groupsRoot:null,page:0,rowsPerPage:D[0],entities:[],total:0},Le=["groupsRoot"],De=(0,I.lensPath)(Le),Ue=(0,I.lensProp)("page"),je=(0,I.lensProp)("rowsPerPage"),Me=(0,I.lensProp)("entities"),Ze=(0,I.lensProp)("total"),ze=Ie(we(Le,Ee),Z),He=Ae(ze),Ge=_e(ze),Be=Pe(Ge),Fe=Ne(Ge),Ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ke,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case v.ADD_GROUPS_BLOCK:{const{block:r,parentBlockId:n}=t.payload;if(!n)return null===r?(0,I.set)(De,r,e):(0,I.set)(De,(0,I.omit)(["relation"],r),e);{const t=(0,I.view)(De,e),a=Ee(n,t);if(a){const t=(0,I.lensPath)([...Le,...a,"children"]);return(0,I.over)(t,(0,I.pipe)((0,I.defaultTo)([]),(0,I.concat)(I.__,[r])),e)}}break}case v.DELETE_GROUPS_BLOCK:{const{blockId:r}=t.payload,n=(0,I.view)(De,e),a=Ee(r,n);if(a){if(a.length){const t=Ee(r,n).slice(0,-1),a=(0,I.lensPath)([...Le,...t]);return(0,I.over)(a,(0,I.pipe)((0,I.reject)((0,I.propEq)("id",r))),e)}return(0,I.set)(De,ke.groupsRoot,e)}break}case v.SET_GROUP_ENTITY_TYPE:{const{groupId:r,entityTypeUri:n}=t.payload,a=(0,I.view)(De,e),o=Ee(r,a);if(o){const t=(0,I.lensPath)([...Le,...o]),r=(0,I.over)(t,(0,I.pipe)((0,I.assoc)(U,n),(0,I.assoc)(Z,[])),e);if(!n){const e=o.slice(0,-1),t=(0,I.lensPath)([...Le,...e,"children"]);return(0,I.set)(t,[],r)}return r}return e}case v.SET_GROUP_RELATION_TYPE_INFO:{const{groupId:r,relationTypeUri:n,direction:a}=t.payload,o=(0,I.view)(De,e),i=Ee(r,o);if(i){const t=(0,I.lensPath)([...Le,...i]);return(0,I.over)(t,(0,I.pipe)((0,I.assoc)(j,n),(0,I.assoc)(M,a),(0,I.assoc)(Z,[])),e)}return e}case v.SET_GROUP_RELATION_FILTER:{const{groupId:r,filter:n}=t.payload,a=(0,I.view)(De,e),o=Ee(r,a);if(o){const t=(0,I.lensPath)([...Le,...o]);return(0,I.over)(t,(0,I.assoc)(z,n),e)}return e}case v.ADD_ATTRIBUTE_AFTER:{const{groupId:r,attributeId:n,attribute:a}=t.payload;return Te({state:e,groupId:r,attributeId:n,attribute:a,getAttributesLens:ze,getAttributeIndex:He})}case v.CHANGE_ATTRIBUTE_DATA:{const{groupId:r,attributeId:n,attributeData:a}=t.payload;return ve({state:e,groupId:r,attributeId:n,attributeData:a,setAttributeProp:Be,getAttributeLens:Ge})}case v.SET_ATTRIBUTE_OPERATOR:{const{groupId:r,attributeId:n,operator:a}=t.payload;return xe({state:e,groupId:r,attributeId:n,operator:a,setAttributeProp:Be})}case v.DELETE_ATTRIBUTE:{const{groupId:r,attributeId:n}=t.payload;return Se({state:e,groupId:r,attributeId:n,getAttributesLens:ze})}case v.DUPLICATE_ATTRIBUTE:{const{groupId:r,attributeId:n,id:a}=t.payload;return Oe({state:e,groupId:r,attributeId:n,id:a,getAttributesLens:ze})}case v.SET_FILTER:{const{groupId:r,attributeId:n,filter:a}=t.payload;return Ce({state:e,groupId:r,attributeId:n,filter:a,getAttributeProp:Fe,setAttributeProp:Be})}case v.SET_VALUES:{const{groupId:r,attributeId:n,values:a}=t.payload;return Re({state:e,groupId:r,attributeId:n,values:a,setAttributeProp:Be})}case v.CLEAR:return ke;case v.CHANGE_PAGE:{const{pageNumber:r}=t.payload;return(0,I.set)(Ue,r,e)}case v.CHANGE_ROWS_PER_PAGE:{const{number:r}=t.payload;return(0,I.set)(je,r,e)}case v.SET_ENTITIES:{const r=t.payload;return(0,I.set)(Me,r,e)}case v.SET_TOTAL:{const r=t.payload;return(0,I.set)(Ze,r,e)}case v.UPDATE_STATE:default:return e}return e};var We=r(90503);function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qe(e,t,r[t])}))}return e}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xe={entitiesLoading:!1,totalLoading:!1,config:{},searchResultsViewMode:L,searchResultsColumns:[],showSearchResults:!1,isLoadedSavedState:!1},$e=(0,I.lensProp)("entitiesLoading"),Ke=(0,I.lensProp)("totalLoading"),Qe=(0,I.lensProp)("config"),Je=(0,I.lensProp)("searchResultsViewMode"),et=(0,I.lensProp)("searchResultsColumns"),tt=(0,I.lensProp)("showSearchResults"),rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case x:return(0,I.set)($e,t.payload,e);case S:return(0,I.set)(Ke,t.payload,e);case O:return(0,I.set)(Qe,t.payload,e);case C:return(0,I.set)(Je,t.payload,e);case R:return(0,I.set)(et,t.payload,e);case w:return(0,I.set)(tt,t.payload,e);case v.RUN_SEARCH:return(0,I.set)(tt,!0,e);case v.ADD_GROUPS_BLOCK:if(!t.payload.parentBlockId)return(0,I.set)(et,(0,We.oX)(),e);break;case v.CLEAR:return Ve({},Xe,{config:e.config,searchResultsViewMode:e.searchResultsViewMode,showSearchResults:!1,isLoadedSavedState:!0});case v.UPDATE_STATE:{const{showSearchResults:r=Xe.showSearchResults,searchResultsViewMode:n=Xe.searchResultsViewMode}=t.payload||{};return Ve({},Xe,{config:e.config,showSearchResults:r,searchResultsViewMode:n,isLoadedSavedState:!0})}}return e};var nt=r(45738),at=r(98952),ot=r(1794),it=r(71403),lt=r(85383),st=r(82349);function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pt=(e,t)=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ct(e,t,r[t])}))}return e}({},t,mt(e)),dt=(0,I.allPass)([(0,I.complement)(at.O27),(0,I.has)("type"),(0,I.cond)([[(0,I.pipe)((0,I.prop)("type"),at.$NE),(0,I.has)("direction")],[I.T,I.T]])]),ut=(0,I.anyPass)([dt,(0,I.allPass)([(0,I.complement)(at.O27),(0,I.has)("logicalOperator"),(0,I.has)("operands"),(0,I.pipe)((0,I.prop)("operands"),(0,I.all)(dt))])]),mt=e=>{let{entity:t,relation:r,children:n=[]}=e;const a=(0,I.reject)(at.O27,{type:t.entityTypeUri,filter:(0,st.Jk)([{attributes:t.attributes||[]}],[],!0),operands:n.map(mt).filter(ut)});let o=r?(0,I.reject)(at.O27,{type:r.relationTypeUri,direction:(r.direction||"").toUpperCase(),filter:(0,st.Jk)([{attributes:r.attributes||[]}],[],!0),operands:r.relationTypeUri?[a].filter(ut):[]}):null;return null!=r&&r.filter&&(null==r?void 0:r.filter)!==P.EXISTS&&(o={logicalOperator:r.filter.toUpperCase(),operands:[o]}),o||a},ht=(e,t,r,n)=>{const a=pt(r);return(0,at.P2h)({apiPath:e,tenant:t,searchBody:a,options:n})},ft=(e,t,r,n)=>{const a=pt(r);return(0,at.dED)({apiPath:e,tenant:t,searchBody:a,options:n})},yt=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const a=gt(e,t,r,n),o=(t.children||[]).map((r=>yt(e,r,"",n.concat({name:t.name,label:t.label}))));return o.length&&(a.children=o,a.notSelectable=!0),a},gt=(e,t,r,n)=>{const a=(0,I.omit)(["children"],t),o=a.label||a.name;return{title:o,pathToTitle:Array.isArray(n)?["",...(0,I.chain)((0,I.prop)("label"),n),o]:["",o],fieldName:r||(0,at.Tde)(a.uri,n),attrType:a}},bt=(e,t)=>t?(0,at.k66)(e,t,(0,I.complement)(at.YkG)).map((t=>yt(e,t))):[],Et=(e,t)=>[{title:"",attributes:(0,I.pipe)((0,I.pick)(["id"]),I.values,(0,I.map)((e=>({title:e.label,fieldName:e.name,attrType:e}))))(at.xPW)},{title:"",attributes:bt(e,(0,at.nt9)(e,t))}],Tt=(e,t)=>[{title:"",attributes:(0,I.pipe)(I.values,(0,I.map)((e=>({title:e.label,fieldName:e.name,attrType:e}))))(at.PY2)},{title:"",attributes:bt(e,(0,at.V3K)(e,t))}],vt=e=>e.reduce(((e,t)=>(0,I.concat)(e,(0,I.concat)([t],vt((0,I.propOr)([],"children",t))))),[]),xt=(0,I.curry)(((e,t)=>e.find((e=>e.fieldName===t.fieldName)))),St=(0,I.curry)(((e,t)=>{const r=t.entityTypeUri?Et(e,t.entityTypeUri):Tt(e,t.relationTypeUri),n=(0,I.pipe)((0,I.chain)((0,I.prop)("attributes")),vt)(r);return(0,I.evolve)({attributes:(0,I.pipe)((0,I.map)((0,I.evolve)({data:xt(n)})),(0,I.reject)((0,I.propSatisfies)(I.isNil,"data")))},t)})),Ot=(0,I.pipe)((0,I.pick)(["id"]),G),Ct=(0,I.pipe)((0,I.pick)(["id"]),H),Rt=(0,I.both)((0,I.propSatisfies)(V,"entity"),(0,I.propSatisfies)(Y,"relation")),wt=(0,I.curry)(((e,t)=>{if(!t)return null;const r=!t.relation,n=function(e){let{entityTypeUri:t=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!(0,at.nt9)(e,t)}(e,t.entity),a=t.relation&&function(e){let{relationTypeUri:t=""}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!(0,at.V3K)(e,t)}(e,t.relation)||r;return r&&!n?null:(0,I.evolve)({entity:(0,I.ifElse)((0,I.always)((0,I.and)(n,a)),St(e),Ot),relation:(0,I.ifElse)((0,I.always)(a),St(e),Ct),children:(0,I.ifElse)((0,I.always)((0,I.and)(n,a)),(0,I.pipe)((0,I.map)(wt(e)),(0,I.reject)(Rt)),(0,I.always)([]))},t)})),It=e=>e[or].ui.entitiesLoading,At=e=>e[or].ui.totalLoading,_t=e=>e[or].ui.config,Pt=e=>e[or].ui.searchResultsViewMode,Nt=e=>e[or].ui.searchResultsColumns,kt=e=>e[or].ui.showSearchResults,Lt=e=>e[or].ui.isLoadedSavedState,{toggleQueryBuilderAttributeSelect:Dt}=ot;function Ut(e){console.warn(e)}function*jt(){yield(0,lt.gz)(pe(0)),yield(0,lt.rM)(zt)}function*Mt(){const e=yield(0,lt.Ys)(sr),t=yield(0,lt.Ys)(cr),r=yield(0,lt.Ys)(ir),n=yield(0,lt.Ys)(nt.ZP.selectors.getApiPath),a=yield(0,lt.Ys)(nt.ZP.selectors.getTenant),o={max:t,from:t*e,select:yield(0,lt.RE)(Bt)};yield(0,lt.RE)(Zt,pt(r)),yield(0,lt.gz)(he(!0));try{const e=yield(0,lt.RE)(ht,n,a,r,o);yield(0,lt.gz)(de(e))}catch(e){Ut(e),yield(0,lt.gz)(de([]))}yield(0,lt.gz)(he(!1))}function*Zt(e){const t=yield(0,lt.Ys)(nt.ZP.selectors.getSearchProviderData);(0,I.equals)(null==t?void 0:t.data,e)||(yield(0,lt.gz)(nt.yC.actions.setSearchNavigationData(null))),yield(0,lt.gz)(nt.yC.actions.setSearchProviderData({type:"graphsearch",data:e}))}function*zt(){const e=yield(0,lt.Ys)(ir),t=yield(0,lt.Ys)(nt.ZP.selectors.getApiPath),r=yield(0,lt.Ys)(nt.ZP.selectors.getTenant);yield(0,lt.gz)(fe(!0));try{const{count:a}=yield(0,lt.RE)(ft,t,r,e);yield(0,lt.gz)((n=a,{type:v.SET_TOTAL,payload:n}))}catch(e){Ut(e)}var n;yield(0,lt.gz)(fe(!1))}function*Ht(){const e=(yield(0,lt.Ys)(dr)).map((e=>e.uri)),t={select:yield(0,lt.RE)(Bt),searchOptions:"ovOnly"};yield(0,lt.gz)(he(!0));try{const r=yield(0,lt.RE)(at.DnY,e,t);yield(0,lt.gz)(de(r))}catch(e){Ut(e)}yield(0,lt.gz)(he(!1))}function*Gt(){const e=yield(0,lt.Ys)(Nt);return(0,We.vw)(e)}function*Bt(){const e=yield(0,lt.RE)(Gt);return(0,I.pipe)(I.uniq,(0,I.join)(","))([...it.Tv,...e])}function*Ft(e){const{groupId:t,attributeId:r,selectInfo:n}=e.payload,a=yield(0,lt.Ys)(ir),o={addAttributeAfter:J,changeAttribute:ee,clearAttribute:te,deleteAttribute:ae};yield(0,lt.RE)(Dt,{groups:a,findGroupPath:Ee,attributesPropName:"attributes",groupId:t,attributeId:r,selectInfo:n,actions:o})}function*Yt(){const e=yield(0,lt.Ys)(dr);e&&(yield(0,lt.gz)(nt.yC.actions.searchResultsSet(e)))}function*Wt(e){const{consoleExportApp:t}=e.payload||{},r=t.query?`&${t.query}`:null,n=yield(0,lt.Ys)(ir),a=pt(n),o=(0,E.x0)(),i=yield(0,lt.Ys)(nt.ZP.selectors.getServicesPath),l=yield(0,lt.Ys)(nt.ZP.selectors.getTenant),s=yield(0,lt.Ys)(nt.ZP.selectors.getEnvironment);try{yield(0,lt.RE)(at.KAm,i,l,s,o,a),yield(0,lt.gz)(nt.ui.actions.openConsoleApp(t.name,t.path||"graph",`exportId=${o}${r||""}`))}catch(e){console.warn(e),f.Z.addError({title:_().text("Export graph search result error"),message:e.errorMessage})}}function*Vt(e){if(e.payload){const r=yield(0,lt.Ys)(nt.ZP.selectors.getMetadata),n=wt(r,e.payload.groupsRoot),a=function(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).reduce(((t,r)=>{if(r.uri){const n=(0,at.zeJ)(e,r.uri);n&&t.push({id:r.id,label:n.label,attrType:n,size:r.size})}else{const e=(0,We.oX)().find((e=>e.id===r.id));e&&t.push({id:r.id,label:e.label,size:r.size})}return t}),[]);return t.length?t:(0,We.oX)()}(r,e.payload.searchResultsColumns);yield(0,lt.gz)((t=n,{type:v.ADD_GROUPS_BLOCK,payload:{block:t}})),yield(0,lt.gz)(me(a)),e.payload.showSearchResults&&!n&&(yield(0,lt.gz)(ye(!1))),e.payload.showSearchResults&&n&&(yield(0,lt.gz)(ce()))}var t}const qt=[function*(){yield(0,lt.ib)(v.TOGGLE_ATTRIBUTE_SELECT,Ft)},function*(){yield(0,lt.Fm)(v.RUN_SEARCH,jt)},function*(){yield(0,lt.Fm)([v.CHANGE_PAGE,v.CHANGE_ROWS_PER_PAGE],Mt)},function*(){yield(0,lt.Fm)(v.UPDATE_CURRENT_ENTITIES,Ht)},function*(){yield(0,lt.Fm)([v.SET_ENTITIES,C],Yt)},function*(){yield(0,lt.Fm)(v.UPDATE_STATE,Vt)},function*(){yield(0,lt.Fm)(v.EXPORT_RESULTS,Wt)}];var Xt=r(97698);const $t=(0,I.pipe)((0,I.evolve)({attributes:(0,I.map)((0,I.evolve)({data:(0,I.pick)(["fieldName"])}))})),Kt=e=>{if(!e)return null;const t={id:e.id};return e.entity&&(t.entity=$t(e.entity)),e.relation&&(t.relation=$t(e.relation)),e.children&&(t.children=e.children.map((e=>Kt(e)))),t},Qt=(0,Xt.createSelector)((e=>Kt(ir(e))),(e=>Pt(e)),(e=>kt(e)),(e=>function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>({id:e.id,uri:e.attrType&&e.attrType.uri,size:e.size})))}(Nt(e))),((e,t,r,n)=>({groupsRoot:e,searchResultsViewMode:t,showSearchResults:r,searchResultsColumns:n}))),Jt=[v.ADD_GROUPS_BLOCK,v.DELETE_GROUPS_BLOCK,v.SET_GROUP_ENTITY_TYPE,v.SET_GROUP_RELATION_TYPE_INFO,v.SET_GROUP_RELATION_FILTER,v.ADD_ATTRIBUTE_AFTER,v.CHANGE_ATTRIBUTE_DATA,v.SET_ATTRIBUTE_OPERATOR,v.DELETE_ATTRIBUTE,v.DUPLICATE_ATTRIBUTE,v.SET_FILTER,v.SET_VALUES,v.CLEAR,v.RUN_SEARCH,C,R,w];function*er(){return yield(0,lt.Ys)(Qt)}function*tr(){yield(0,lt.gw)(500);const e=yield(0,lt.RE)(er);yield(0,lt.gz)((e=>({type:v.SAVE_STATE,payload:e}))(e))}function*rr(){yield(0,lt.Fm)(Jt,tr)}function*nr(e){const{uri:t}=e.payload,r=(yield(0,lt.Ys)(dr)).map((0,I.prop)("uri")),n=(yield(0,lt.Ys)(sr))||0,a=(yield(0,lt.Ys)(cr))||D[0],o=r.indexOf(t)+n*a,i=yield(0,lt.Ys)(pr),l=yield(0,lt.Ys)(nt.ZP.selectors.getTenant);yield(0,lt.gz)(nt.yC.actions.setSearchNavigationData({uri:t,index:o,total:i,tenant:l,cache:r}))}const ar=[function*(){yield(0,lt.Fm)(nt.ui.constants.UIActions.OPEN_ENTITY,nr)}],or="relationshipSearch",ir=e=>e[or].search.groupsRoot,lr=(0,I.pipe)(ir,mt,I.isEmpty),sr=e=>e[or].search.page,cr=e=>e[or].search.rowsPerPage,pr=e=>e[or].search.total,dr=e=>e[or].search.entities,ur=(0,I.pipe)(ir,(0,I.path)(["entity","entityTypeUri"]));var mr=r(96379),hr=r(89902),fr=r(72342);const yr=(0,fr.makeStyles)((e=>({container:{display:"flex",flexDirection:"column",maxWidth:"645px","& $disabled":{pointerEvents:"none",opacity:.4}},disabled:{},avatar:{transform:"scale(0.5)",marginLeft:"5px",marginRight:"5px"},item:{display:"flex",flexGrow:1,flexShrink:0,flexDirection:"row",alignItems:"center",height:"32px"},info:{display:"flex",flexGrow:1,position:"relative",minWidth:0,"&:hover":{cursor:"pointer"}},textInfo:{display:"flex",flexGrow:1,lineHeight:"16px",backgroundColor:"transparent",minWidth:0,minHeight:"24px",alignItems:"center",zIndex:2},text:{flexGrow:1,marginLeft:"9px",marginRight:"4px",color:e.palette.text.primary,width:"100%",maxHeight:"32px",wordBreak:"break-word",wordWrap:"break-word",overflow:"hidden"},count:{flexShrink:0,fontSize:"12px",color:e.palette.text.secondary,textAlign:"right",marginRight:"4px"},colorBar:{minHeight:"24px"}}))),gr=e=>{let{entityTypes:t=[],onChange:r=m.ZT,className:n}=e;const a=yr(),i=Math.max(...t.map((e=>e.number)));return o().createElement("div",{className:g()(a.container,n),"data-reltio-id":"list-of-entity-types"},t.map((e=>o().createElement("div",{key:e.value,className:g()(a.item,{[a.disabled]:!e.number}),"data-reltio-id":"entity-type"},o().createElement(mr.Z,{className:a.avatar,entityType:e}),o().createElement("div",{className:a.info,onClick:()=>r(e.value)},o().createElement("div",{className:a.textInfo},o().createElement("div",{className:a.text},e.label),o().createElement("div",{className:a.count},(0,at.k7L)(e.number,5e3))),o().createElement(hr.Z,{className:a.colorBar,width:e.number,maxWidth:i}))))))};gr.propTypes={className:l().string,entityTypes:l().array,onChange:l().func};const br=gr;var Er=r(19701);function Tr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vr=(0,fr.makeStyles)({container:{backgroundColor:"white"},list:{paddingTop:"12px",paddingBottom:"8px"}}),xr=e=>{let{onChange:t=m.ZT}=e;const r=vr(),n=(()=>{const e=(0,Er._)(),[t,r]=(0,a.useState)([]),n=(0,b.useSelector)(nt.ZP.selectors.getMetadata),o=(0,b.useSelector)(nt.ZP.selectors.getGlobalSearchRequestOptions);return(0,a.useEffect)((()=>{const t=(0,I.pipe)((0,I.propOr)([],"entityTypes"),(0,I.filter)(at.oDv))(n),a=[{fieldName:"type",values:t.map((0,I.prop)("uri")),filter:"equals"}],i=e=>t.map((t=>{const r=(0,at.nIW)(t.uri);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Tr(e,t,r[t])}))}return e}({},t,{value:t.uri,number:(0,I.propOr)(0,r,e),label:(0,at.jFi)(n,{type:t.uri})||r})})),l={activityFilter:o.activityFilter,max:101};e((0,at.Yiz)({fieldName:"type",searchParams:a,options:l})).then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,I.pipe)((0,I.prop)("type"),i,r)(e)})).catch((e=>{console.warn(e),r([])}))}),[o,n]),t})();return o().createElement("div",{className:r.container},n.length>0&&o().createElement(br,{className:r.list,entityTypes:n,onChange:t}))};xr.propTypes={onChange:l().func};var Sr=r(92679),Or=r(56961),Cr=r(38677),Rr=r(93553),wr=r(39475);const Ir=(0,fr.makeStyles)((e=>({container:{position:"relative","&:hover > $actions":{opacity:1}},groups:{backgroundColor:e.palette.background.paper,padding:"16px"},divider:{margin:"16px 0"},actions:{opacity:"0",transition:"opacity 0.3s",position:"absolute",top:16,right:16,paddingTop:0},addRelationButton:{marginTop:"-10px"}})));var Ar=r(92934),_r=r(51586);const Pr={flex:1,marginLeft:"10px"},Nr=(0,fr.makeStyles)((()=>({container:{},groupControls:{display:"flex",alignItems:"center",marginBottom:"20px",paddingRight:"117px"},entityTypeSelector:{flex:1.69,height:"46px","& $entityTypeSelectorLabel":{fontSize:"14px"}},entityTypeSelectorLabel:{},relationTypeSelector:{flex:1.69},relationFilterSelector:Pr,spacer:Pr}))),kr="46px",Lr=(0,fr.makeStyles)((()=>({row:{marginBottom:"20px","&:hover $actions":{opacity:1}},attributeSelectContainer:{flex:.9},attributeSelect:{width:"100%",height:kr},valuesWrapper:{width:"100%",display:"flex",minHeight:kr,alignItems:"flex-start",boxSizing:"border-box","& $input":{margin:0,borderRadius:"4px",paddingBottom:"4px !important",paddingTop:"2px !important"},"& $root":{borderRadius:"4px 4px 0 0",padding:0,display:"flex",alignItems:"center",margin:0}},input:{},root:{},actions:{opacity:"0",transition:"opacity 0.3s",paddingTop:"13px",width:"88px",height:"24px",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:"0",marginLeft:"8px"},filterSelector:{width:"190px"}})));var Dr=r(12933),Ur=r(53862);const jr=e=>!(e&&e.data),Mr=function(e){let{title:t,pathToTitle:r}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},Zr=e=>{let{rowData:t,rowContext:{entityTypeUri:r,metadata:n,dispatchGroupAction:i},attributeSelectorProps:l={}}=e;const s=Lr(),c=t&&t.id,p=(0,a.useCallback)((e=>{i(re,c,e)}),[c,i]),d=(0,a.useMemo)((()=>Et(n,r)),[n,r]);return o().createElement(Dr.Z,{className:s.attributeSelect,value:t&&t.data,getLabel:Mr,itemsGroups:d,onSelect:p,ungroup:!0,onRestoreFocus:l.onRestoreFocus,onOpenPopup:l.onOpen,disableRestoreFocus:l.disablePopoverRestoreFocus,disableEnforceFocus:l.disablePopoverRestoreFocus,disabled:!r})};Zr.propTypes={rowData:Ur.Xw,rowContext:l().shape({entityTypeUri:l().string,metadata:at.pGS,dispatchGroupAction:l().func}),attributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const zr=(0,a.memo)(Zr);var Hr=r(56569);function Gr(){return Gr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gr.apply(this,arguments)}const Br=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",Gr({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",focusable:"false"},r),o().createElement("defs",null,o().createElement("path",{d:"M20.222 6C21.21 6 22 6.8 22 7.778v12.444C22 21.2 21.209 22 20.222 22H7.778C6.79 22 6 21.2 6 20.222V7.778C6 6.8 6.791 6 7.778 6h12.444zM8 8v12h12V8H8zM4 18H2V4c0-1.1.9-2 2-2h14v2H4v14z",id:"svg3787243505a"})),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:"svg3787243505b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg3787243505a"})),o().createElement("g",{mask:"url(#svg3787243505b)",fill:"#000",fillOpacity:".54"},o().createElement("path",{d:"M0 0h24v24H0z"}))))))},Fr=e=>{let{rowData:t,rowContext:{dispatchGroupAction:r}}=e;const n=Lr(),i=t&&t.id,l=(0,a.useCallback)((()=>r(Q,i)),[i,r]),s=(0,a.useCallback)((()=>r(oe,i)),[i,r]),c=(0,a.useCallback)((()=>r(ae,i)),[i,r]);return o().createElement("div",{className:g()(n.actions)},o().createElement(wr.k,{tooltipTitle:_().text("Add"),icon:Hr.Z,size:"M",onClick:l}),!jr(t)&&o().createElement(wr.k,{tooltipTitle:_().text("Duplicate"),icon:Br,size:"M",onClick:s}),o().createElement(wr.k,{tooltipTitle:_().text("Delete"),icon:Sr.default,size:"M",onClick:c}))};Fr.propTypes={rowData:Ur.Xw,rowContext:l().shape({dispatchGroupAction:l().func})};const Yr=(0,a.memo)(Fr);var Wr=r(15299);const Vr=e=>{let{rowData:t,rowContext:{dispatchGroupAction:r}}=e;const n=Lr(),i=t&&(0,at.wNf)(t.filter),{values:l=[],data:{attrType:s,fieldName:c}={},filter:p,id:d}=t||{},u=s&&(0,at.PFL)(s),m=u&&(0,at.l1V)(u,p),h=(0,a.useCallback)((e=>r(le,d,e)),[r,d]),f=(0,a.useMemo)((()=>({filter:p,fieldName:c,values:l||[]})),[p,c,l]),y=(0,a.useMemo)((()=>({InputProps:{classes:{root:n.input}}})),[n]),g=(0,a.useMemo)((()=>({root:n.root})),[n]);return o().createElement("div",{className:n.valuesWrapper,"data-reltio-id":"attribute-value"},!jr(t)&&i&&o().createElement(Wr.Z,{filter:f,onChange:h,dataTypeDefinition:m,fullWidth:!0,TextFieldProps:y,color:"primary",classes:g,orientation:"horizontal"}))};Vr.propTypes={rowData:Ur.Xw,rowContext:l().shape({dispatchGroupAction:l().func})};const qr=(0,a.memo)(Vr),Xr=l().shape({id:l().string,attributes:l().arrayOf(Ur.Xw),entityTypeUri:l().string}),$r=l().shape({id:l().string,attributes:l().arrayOf(Ur.Xw),relationTypeUri:l().string,direction:l().oneOf(Object.values(at.Nsj)),filter:l().oneOf(Object.values(P))}),Kr=l().shape({id:l().string,entity:Xr,relation:$r,children:l().array});var Qr=r(90590),Jr=r(2633),en=r(7342);const tn=(0,a.memo)((e=>{var t,r;let{className:n,attribute:a,textFieldInputRef:i,isDisabled:l,height:s,onChange:c}=e;const p=(0,I.pipe)(at.XS2,en.Z);return o().createElement(Qr.Z,{label:"",placeholder:_().text("Equals"),className:n,value:l?void 0:{value:a.filter,label:p(a.filter)},options:(null==a||null===(t=a.data)||void 0===t||null===(r=t.filterOptions)||void 0===r?void 0:r.map((e=>({value:e,label:p(e)}))))||[],height:s,onChange:c,isDisabled:l,filterOption:Jr.Z.BY_LABEL,textFieldInputRef:i})})),rn=e=>{var t;let{rowData:r,rowContext:{dispatchGroupAction:n},textFieldInputRef:i}=e;const l=Lr(),s=null==r?void 0:r.id,c=(0,a.useCallback)((e=>n(ie,s,e.value)),[n,s]),p=null==r||null===(t=r.data)||void 0===t?void 0:t.attrType,d=p&&(0,I.assocPath)(["data","filterOptions"],(0,at.Klp)(p,r.data.fieldName),r);return o().createElement(tn,{className:l.filterSelector,attribute:d,textFieldInputRef:i,isDisabled:!p,onChange:c})},nn=(0,fr.makeStyles)((e=>({logicOperatorContainer:{width:"100px",marginRight:"40px",marginLeft:"12px",marginTop:"7px"},logicOperator:{fontSize:"14px",color:e.palette.text.secondary},logicOperatorPlaceholder:{paddingLeft:"16px",paddingTop:"10px"}})));var an=r(1128);const on=(0,fr.makeStyles)((()=>({select:{padding:"6px 16px 7px",width:"100px",boxSizing:"border-box"}}))),ln=e=>{let{className:t,value:r,onChange:n}=e;const a=on();return o().createElement(an.Z,{className:t,classes:a,value:r,entries:at.G8q,onChange:n,disableUnderline:!0})};ln.propTypes={className:l().string,value:l().string,onChange:l().func};const sn=ln,cn=(0,a.memo)((e=>{let{rowData:t,rowContext:{dispatchGroupAction:r}}=e;const n=nn(),i=null==t?void 0:t.id,l=null==t?void 0:t.operator,s=(0,a.useCallback)((e=>r(ne,i,e)),[r,i]);return o().createElement("div",{className:n.logicOperatorContainer},l?o().createElement(sn,{className:n.logicOperator,value:l,onChange:s}):o().createElement("div",{className:g()(n.logicOperator,n.logicOperatorPlaceholder)},_().text("Where")))})),pn=e=>{let{group:{id:t,attributes:r,entityTypeUri:n},entityTypes:i,dispatch:l,disabled:s}=e;const c=Nr(),p=Lr(),d=(0,b.useSelector)(nt.ZP.selectors.getMetadata),u=(0,a.useCallback)((e=>l(((e,t)=>({type:v.SET_GROUP_ENTITY_TYPE,payload:{groupId:e,entityTypeUri:t}}))(t,e[0]))),[t,l]),m=(0,a.useCallback)((function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return l(e(t,...n))}),[t,l]),h=(0,a.useMemo)((()=>n?[n]:[]),[n]),f=(0,a.useMemo)((()=>({root:p.row,logicOperatorContainer:p.logicOperatorContainer,attributeSelectorContainer:p.attributeSelectContainer})),[p]);return(0,a.useEffect)((()=>{n&&!i.find((e=>{let{uri:t}=e;return t===n}))?u([]):n||1!==i.length||u([i[0].uri])}),[u,n,i]),o().createElement("div",{className:c.container},o().createElement("div",{className:c.groupControls},o().createElement(Ar.Q,{classes:{root:c.entityTypeSelector,label:c.entityTypeSelectorLabel},entityTypes:i,selectedEntityTypes:h,single:!0,onChange:u,disabled:s}),o().createElement("div",{className:c.spacer})),o().createElement(_r.Z,{rowClasses:f,rowsData:r,LogicOperatorComponent:cn,AttributeSelectorComponent:zr,ValuesEditorComponent:qr,ActionsComponent:Yr,FilterSelectorComponent:rn,entityTypeUri:n,dispatchGroupAction:m,metadata:d}))};pn.propTypes={group:Xr,entityTypes:l().arrayOf(at.p8l),dispatch:l().func,disabled:l().bool};const dn=(0,a.memo)(pn);var un=r(85596);const mn=e=>{let{rowData:t,rowContext:{relationTypeUri:r,metadata:n,dispatchGroupAction:i},attributeSelectorProps:l={}}=e;const s=Lr(),c=t&&t.id,p=(0,a.useCallback)((e=>{i(re,c,e)}),[c,i]),d=(0,a.useMemo)((()=>Tt(n,r)),[n,r]);return o().createElement(Dr.Z,{className:s.attributeSelect,value:t&&t.data,getLabel:Mr,itemsGroups:d,onSelect:p,ungroup:!0,onRestoreFocus:l.onRestoreFocus,onOpenPopup:l.onOpen,disableRestoreFocus:l.disablePopoverRestoreFocus,disableEnforceFocus:l.disablePopoverRestoreFocus,disabled:!r})};mn.propTypes={rowData:Ur.Xw,rowContext:l().shape({relationTypeUri:l().string,metadata:at.pGS,dispatchGroupAction:l().func}),attributeSelectorProps:l().shape({onRestoreFocus:l().func,onOpen:l().func,disablePopoverRestoreFocus:l().bool})};const hn=(0,a.memo)(mn);function fn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const yn=e=>{let{group:t,parentEntityTypeUri:r,dispatch:n}=e;const i=Nr(),l=Lr(),{id:s,attributes:c,relationTypeUri:p,direction:d,filter:u}=t,m=(0,b.useSelector)(nt.ZP.selectors.getMetadata),h=(0,a.useCallback)((e=>{let{type:t,direction:r}=e;return n(((e,t,r)=>({type:v.SET_GROUP_RELATION_TYPE_INFO,payload:{groupId:e,relationTypeUri:t,direction:r}}))(s,t.uri,r))}),[s,n]),f=(0,a.useCallback)((e=>{let{value:t}=e;return n(((e,t)=>({type:v.SET_GROUP_RELATION_FILTER,payload:{groupId:e,filter:t}}))(s,t))}),[s,n]),y=(0,a.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];return n(e(s,...r))}),[s,n]),{inRelations:g=[],outRelations:E=[]}=(0,a.useMemo)((()=>(0,at.UWq)(m,r)),[r,m]);(0,a.useEffect)((()=>{const e=d===at.Nsj.IN?g:E;if(p&&!e.find((e=>{let{uri:t}=e;return t===p})))h({type:{}});else if(!p&&1===g.concat(E).length){const e=1===g.length;h({type:e?g[0]:E[0],direction:e?at.Nsj.IN:at.Nsj.OUT})}}),[h,p,g,E,d]);const T=(0,a.useMemo)((()=>({root:l.row,logicOperatorContainer:l.logicOperatorContainer,attributeSelectorContainer:l.attributeSelectContainer})),[l]),x=(0,a.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fn(e,t,r[t])}))}return e}({},t,{relationType:t.relationTypeUri})),[t]),S=(0,a.useMemo)((()=>[{label:N[P.EXISTS],value:P.EXISTS},{label:N[P.NOT_EXISTS],value:P.NOT_EXISTS}]),[]);return o().createElement("div",{className:i.container},o().createElement("div",{className:i.groupControls},o().createElement(un.Z,{className:i.relationTypeSelector,label:_().text("Relationship type"),reversedContextLabels:!0,relation:x,inRelationTypes:g,outRelationTypes:E,onChange:h}),o().createElement(Qr.Z,{className:i.relationFilterSelector,label:"",options:S,value:S.find((0,I.propEq)("value",u)),onChange:f,TextFieldProps:{"data-reltio-id":"relation-filter"}})),o().createElement(_r.Z,{rowClasses:T,rowsData:c,LogicOperatorComponent:cn,AttributeSelectorComponent:hn,ValuesEditorComponent:qr,ActionsComponent:Yr,FilterSelectorComponent:rn,relationTypeUri:p,dispatchGroupAction:y,metadata:m}))};yn.propTypes={group:$r,parentEntityTypeUri:l().string,dispatch:l().func};const gn=(0,a.memo)(yn),bn="1px solid #6CACE4",En=24,Tn=(0,fr.makeStyles)({decorator:e=>{let{verticalGap:t=En}=e;return{marginLeft:"17px",borderLeft:bn,position:"relative","&:last-child":{borderLeft:"none","&:before":{borderLeft:bn}},"&:before":{top:0,height:t,width:9,borderBottom:bn,content:'""',display:"block",left:"0"},"&:after":{content:'""',position:"absolute",left:9,top:t-2+"px",borderColor:"transparent",borderLeftColor:"#6CACE4",borderStyle:"solid",borderWidth:"2.5px",borderLeftWidth:"5px"}}},plain:{"&$decorator":{"&:before":{width:0},"&:after":{borderStyle:"none"}}},wrapper:{marginLeft:18,marginTop:-8}}),vn=e=>{let{className:t,children:r,plain:n,enabled:a,verticalGap:i}=e;const l=Tn({verticalGap:i});return a?o().createElement("div",{className:g()(l.decorator,{[l.plain]:n},t)},o().createElement("div",{className:l.wrapper},r)):r};vn.propTypes={className:l().string,enabled:l().bool,plain:l().bool,children:l().node,verticalGap:l().number};const xn=vn,Sn=e=>{let{block:{id:t,entity:r,relation:n,children:i},parentEntityTypeUri:l}=e;const s=Ir(),c=(0,b.useDispatch)(),p=(0,b.useSelector)(nt.ZP.selectors.getMetadata),d=(0,a.useCallback)((()=>{return c((e=t,{type:v.DELETE_GROUPS_BLOCK,payload:{blockId:e}}));var e}),[t,c]),u=(0,a.useCallback)((()=>c(K(t))),[t,c]),m=r&&r.entityTypeUri,h=((e,t)=>{const r=(e.entityTypes||[]).filter(at.oDv);if(!t)return r;const{relationTypeUri:n,direction:a}=t,[o,i]=(0,at.j1S)(e,n),l=a===at.Nsj.IN?o:i;return r.filter((t=>{let{uri:r}=t;return(0,at.lhE)(e,l,r)}))})(p,n),f=!(!l||null!=n&&n.relationTypeUri);return o().createElement("div",{className:s.container},o().createElement("div",{className:s.groups},n&&o().createElement(o().Fragment,null,o().createElement(gn,{group:n,parentEntityTypeUri:l,dispatch:c}),o().createElement(Or.Z,{className:s.divider})),o().createElement(dn,{group:r,entityTypes:h,dispatch:c,disabled:f})),o().createElement("div",{className:s.actions},o().createElement(wr.k,{tooltipTitle:_().text("Delete"),tooltipPlacement:"bottom",icon:Sr.default,size:"M",onClick:d})),(i||[]).map((e=>o().createElement(xn,{key:e.id,enabled:!0},o().createElement(Sn,{parentEntityTypeUri:m,block:e})))),m&&o().createElement(xn,{enabled:!0},o().createElement(Cr.Z,{color:"primary",onClick:u,className:s.addRelationButton,"data-reltio-id":"add-relation-button"},o().createElement(Rr.Z,null),o().createElement("div",null,_().text("Add relation")))))};Sn.propTypes={block:Kr,parentEntityTypeUri:l().string};const On=(0,a.memo)(Sn),Cn=(0,fr.makeStyles)((()=>({root:{display:"flex",overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0},mainContent:{width:"100%",background:"white",display:"flex",flexDirection:"column"}})));var Rn=r(79312);function wn(){return wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wn.apply(this,arguments)}const In=e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",wn({xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},r),o().createElement("g",null,o().createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),o().createElement("g",null,o().createElement("path",{fillOpacity:".54",d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"})))},An=(0,fr.makeStyles)({container:{marginLeft:"auto"}}),_n=()=>{const e=(0,b.useDispatch)(),t=An(),r=(0,b.useSelector)(nt.ZP.selectors.getCanUserMakeExport),{consoleExportApp:n}=(0,b.useSelector)(_t),i=(0,a.useCallback)((()=>{var t;e((t=n,{type:v.EXPORT_RESULTS,payload:{consoleExportApp:t}}))}),[n,e]);return o().createElement("div",{className:t.container},r&&n&&o().createElement(wr.k,{icon:In,size:"L",onClick:i,tooltipTitle:_().text("Export"),"data-reltio-id":"reltio-relationship-search-actions-menu-export"}))},Pn=(0,fr.makeStyles)((e=>({container:{height:"63px",display:"flex",alignItems:"center",padding:"0 20px",flexShrink:0},captionWrapper:{marginTop:"-2px",flexShrink:"0"},profileText:{paddingLeft:"8px",color:e.palette.text.secondary},profileNumber:{fontWeight:"600"}}))),Nn=()=>{const e=Pn(),t=(0,b.useSelector)(pr);return o().createElement("div",{className:e.container},o().createElement("div",{className:e.captionWrapper},o().createElement(Rn.Z,{component:"span",className:e.profileNumber,"data-reltio-id":"total-search-result"},_().number(t,"0,0")),o().createElement(Rn.Z,{variant:"body2",component:"span",className:e.profileText},_().text("total profiles"))),o().createElement(_n,null))};var kn=r(79002),Ln=r(87378),Dn=r(5050),Un=r(33945);const jn=e=>e===k;var Mn=r(99390);const Zn=(0,fr.makeStyles)((()=>({container:{display:"flex",margin:"0 20px",height:"59px",flexShrink:"0",alignItems:"center"},title:{flexGrow:"1",width:"0"},actionsBar:{display:"flex",flexDirection:"row",alignItems:"center",marginLeft:"13px"},splitter:{height:"32px",marginRight:"16px",marginLeft:"14px"}})));var zn=r(4270);const Hn=(0,fr.makeStyles)((()=>({button:{"&.MuiButtonGroup-grouped":{minWidth:"90px",padding:"8px 12px"}}})));function Gn(){return Gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gn.apply(this,arguments)}function Bn(){return Bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bn.apply(this,arguments)}const Fn=[{id:k,tooltipTitle:_().text("Table view"),title:_().text("Table"),Icon:e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",Gn({width:"25",height:"24",viewBox:"0 0 25 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},r),o().createElement("defs",null,o().createElement("path",{d:"M19 4H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 18H5v-8h2v8zM7 8H5V6h2v2zm6 10H9v-8h4v8zm0-10H9V6h4v2zm6 10h-4v-8h4v8zm0-10h-4V6h4v2z",id:"svg848939849a"})),o().createElement("g",{stroke:"none",strokeWidth:"1"},o().createElement("g",{transform:"translate(.2)"},o().createElement("mask",{id:"svg848939849b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg848939849a"})),o().createElement("g",{mask:"url(#svg848939849b)"},o().createElement("g",null,o().createElement("g",null,o().createElement("path",{d:"M0 0h24v24H0z"})))))))}},{id:L,tooltipTitle:_().text("List view"),title:_().text("List"),Icon:e=>{let{styles:t={}}=e,r=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,["styles"]);return o().createElement("svg",Bn({width:"25",height:"24",viewBox:"0 0 25 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},r),o().createElement("defs",null,o().createElement("path",{d:"M20 15.5v3H9v-3h11zm-14 0a1 1 0 011 1v1a1 1 0 01-1 1H5a1 1 0 01-1-1v-1a1 1 0 011-1h1zm14-5v3H9v-3h11zm-14 0a1 1 0 011 1v1a1 1 0 01-1 1H5a1 1 0 01-1-1v-1a1 1 0 011-1h1zm14-5v3H9v-3h11zm-14 0a1 1 0 011 1v1a1 1 0 01-1 1H5a1 1 0 01-1-1v-1a1 1 0 011-1h1z",id:"svg3472870421a"})),o().createElement("g",{stroke:"none",strokeWidth:"1"},o().createElement("g",{transform:"translate(.2)"},o().createElement("mask",{id:"svg3472870421b",fill:"#fff"},o().createElement("use",{xlinkHref:"#svg3472870421a"})),o().createElement("g",{mask:"url(#svg3472870421b)"},o().createElement("path",{d:"M0 0h24v24H0z"})))))}}],Yn=e=>{let{className:t}=e;const r=Hn(),n=(0,b.useDispatch)(),a=(0,b.useSelector)(Pt);return o().createElement(zn.Z,{className:t,classes:{button:r.button},modes:Fn,modeId:a,onChange:e=>{a!==e&&n((e=>({type:C,payload:e}))(e))}})};Yn.propTypes={className:l().string};const Wn=Yn,Vn=()=>{const e=Zn(),t=(0,b.useSelector)(nt.ZP.selectors.getMetadata),r=(0,b.useSelector)(Nt),n=(0,b.useSelector)(ur),i=(0,b.useDispatch)(),l=(0,b.useSelector)(Pt),s=(0,a.useCallback)((e=>{const t=(0,We.tU)(e,r);i(me(e)),t&&i(ue())}),[i,r]);return o().createElement("div",{className:e.container},o().createElement(Rn.Z,{className:e.title},(0,at.jFi)(t,{type:n})," ",_().text("profiles")),o().createElement("div",{className:e.actionsBar},jn(l)&&o().createElement(o().Fragment,null,o().createElement(Mn.Z,{entityTypeUri:n,headColumns:r,onSelectColumns:s}),o().createElement(Or.Z,{orientation:"vertical",className:e.splitter})),o().createElement(Wn,null)))};var qn=r(59863);function Xn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $n=e=>{let{entities:t,basicTableRef:r}=e;const n=(0,b.useDispatch)(),i=(0,b.useSelector)(nt.ZP.selectors.getMetadata),l=(0,b.useSelector)(ur),s=(0,b.useSelector)(Nt),c=(0,a.useMemo)((()=>(0,We.oq)(i,l,s)),[i,l,s]),p=(0,a.useCallback)((e=>{let{what:t,where:r}=e;const a=(0,I.move)(t.columnIndex,r.columnIndex,s);n(me(a))}),[s,n]),d=(0,a.useCallback)((e=>{let{columns:t}=e;const r=(0,We.tU)(t,s);n(me(t)),r&&n(ue())}),[s,n]),u=(0,a.useCallback)((e=>{const t=s.map(((t,r)=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Xn(e,t,r[t])}))}return e}({},t,{size:e[r].size})));n(me(t))}),[s,n]);return o().createElement(qn.Z,{entities:t,entityTypeUri:l,headColumns:s,additionalColumns:c,dndColumnReorderingEnabled:!0,onReorderingColumn:p,onChangeColumnsList:d,onChangeColumnsSize:u,entitiesTableRef:r})};$n.propTypes={entities:l().arrayOf(at.pyR),basicTableRef:l().shape({current:l().object})};const Kn=$n,Qn=(0,fr.makeStyles)((()=>({container:{flexGrow:1,display:"flex",flexDirection:"column",position:"relative",overflow:"hidden"},pagination:{flexGrow:0,height:"52px"},listContainer:{overflowY:"auto",flex:1},tableContainer:{display:"flex",flexDirection:"column",height:"100%"}}))),Jn=()=>{const e=Qn(),t=(0,b.useDispatch)(),r=(0,a.useRef)(),n=(0,b.useSelector)(pr),i=(0,b.useSelector)(Pt),l=jn(i),s=(0,b.useSelector)(dr),c=(0,b.useSelector)(sr),p=(0,b.useSelector)(cr),d=(0,b.useSelector)(It),u=(0,b.useSelector)(At),m=d||u,h=(0,a.useCallback)((e=>t(pe(e))),[t]),f=(0,a.useCallback)((e=>t((e=>({type:v.CHANGE_ROWS_PER_PAGE,payload:{number:e}}))(e))),[t]);(0,a.useEffect)((()=>{r.current&&(r.current.scrollTop=0)}),[s]);const y=(0,a.useRef)(null);return o().createElement("div",{className:e.container},m&&o().createElement(Ln.Z,null),o().createElement(Vn,null),n?o().createElement("div",{className:l?e.tableContainer:e.listContainer,ref:r,"data-reltio-id":"result-container"},l?o().createElement(Kn,{entities:s,basicTableRef:y}):o().createElement(Dn.Z,{entities:s}),n>D[0]&&o().createElement("div",{className:e.pagination},o().createElement(Un.Z,{rowsPerPageOptions:D,count:n,page:c,onChangePage:h,rowsPerPage:p,onChangeRowsPerPage:f,basicTableRef:y}))):(e=>e?null:o().createElement(kn.ZP,{LogoRenderer:kn.B9.SEARCH_RESULTS,text:_().text("No results found."),secondaryText:_().text("Try adjusting your search or filter to find what you're looking for."),variant:kn.tC.embedded}))(m))};var ea=r(25296),ta=r(3954),ra=r(78223),na=r(87086);const aa="1px solid rgba(0, 0, 0, 0.33)",oa=(0,fr.makeStyles)((e=>({drawer:{flex:"0 0 288px"},docked:{flex:"0 0 288px"},drawerPaper:{width:288,display:"flex",flexDirection:"column",position:"relative",borderRight:aa},drawerScrollableArea:{display:"flex",flexDirection:"column",overflow:"auto",height:"100%"},menuIcon:{width:"24px",height:"24px",flexShrink:0,marginRight:"12px"},buttonRoot:{flexShrink:0},buttonExtended:{width:"256px",margin:"8px 16px",padding:"12px",backgroundColor:"rgba(0,0,0,0)",boxShadow:"0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.2)","&:hover":{backgroundColor:"rgba(0,0,0,0.1)"}},buttonLabel:{flexGrow:1,textAlign:"left",color:e.palette.text.secondary,fontSize:"14px",fontWeight:500,letterSpacing:0,lineHeight:"16px"},caption:{lineHeight:"16px",fontSize:"14px",fontWeight:100,color:"rgba(0,0,0, 0.54)",letterSpacing:"normal",display:"flex",padding:"23px 0 11px 16px",flexShrink:0},withBottomBorder:{borderBottom:aa,boxShadow:"0 1px 3px 0 rgba(0,0,0,0.12)"}}))),ia=(0,fr.makeStyles)((()=>({container:{position:"relative",padding:"0 16px"},actions:{position:"absolute",top:0,right:"4px",paddingTop:0}})));var la=r(29522);const sa=(0,fr.makeStyles)((e=>({container:{paddingBottom:"8px"},label:{fontSize:"13px",fontWeight:600,letterSpacing:0,lineHeight:"15px",marginBottom:"2px"},readableQuery:{"& > span":{color:e.palette.text.secondary,fontSize:"13px",letterSpacing:0,lineHeight:"15px"}}}))),ca=e=>{let{label:t,filter:r,attributes:n}=e;const i=sa(),l=(0,b.useSelector)(nt.ZP.selectors.getAttributePresentations),s=(0,b.useSelector)(nt.ZP.selectors.getMetadata),c=(0,a.useMemo)((()=>(0,at.skb)(s,l,{},n)),[s,l,n]);return o().createElement("div",{className:i.container},o().createElement("div",{className:i.label},t,r!==P.EXISTS&&N[r]?` [${N[r]}]`:""),o().createElement("div",null,o().createElement(la.Z,{className:i.readableQuery,readableQuery:c})))};ca.propTypes={label:l().string,filter:l().string,attributes:l().arrayOf(Ur.Xw)};const pa=ca,da=e=>{let{group:t}=e;const{attributes:r,relationTypeUri:n,direction:a,filter:i}=t,l=(0,b.useSelector)(nt.ZP.selectors.getMetadata),s=(0,at.V3K)(l,n),c=a===at.Nsj.OUT?null==s?void 0:s.startObject:null==s?void 0:s.endObject,p=(0,at.PjQ)(c)||(null==s?void 0:s.label);return o().createElement(pa,{label:p,filter:i,attributes:r})};da.propTypes={group:$r};const ua=da,ma=e=>{let{group:t}=e;const{attributes:r,entityTypeUri:n}=t,a=(0,b.useSelector)(nt.ZP.selectors.getMetadata),i=(0,at.jFi)(a,{type:n});return o().createElement(pa,{label:i,attributes:r})};ma.propTypes={group:Xr};const ha=ma,fa=e=>{let{block:{entity:t,relation:r,children:n}}=e;const a=!!r;return o().createElement(o().Fragment,null,r&&r.relationTypeUri&&o().createElement(xn,{enabled:!0,verticalGap:15},o().createElement(ua,{group:r})),t&&t.entityTypeUri&&o().createElement(xn,{enabled:a,verticalGap:15},o().createElement(ha,{group:t}),(n||[]).map((e=>o().createElement(fa,{key:e.id,block:e})))))};fa.propTypes={block:Kr};const ya=(0,a.memo)(fa),ga=()=>{const e=ia(),t=(0,b.useDispatch)(),r=(0,b.useSelector)(ir),n=(0,a.useCallback)((()=>t(se())),[t]);return r&&o().createElement("div",{className:e.container},o().createElement("div",null,o().createElement(ya,{block:r})),o().createElement(wr.k,{className:e.actions,tooltipTitle:_().text("Delete"),tooltipPlacement:"bottom",icon:Sr.default,size:"M",onClick:n}))},ba=(0,ra.Z)(ea.Z),Ea=()=>{const e=(0,b.useDispatch)(),[t,r]=(0,a.useState)(!0),n=(0,a.useRef)(null),i=(0,a.useCallback)((()=>{r(n.current.scrollTop<=0)}),[]),l=(0,a.useCallback)((()=>{e(ye(!1))}),[e]),s=oa();return o().createElement(na.Z,{variant:"persistent",anchor:"left",open:!0,classes:{root:s.drawer,paper:s.drawerPaper,docked:s.docked}},o().createElement(ba,{tooltipTitle:_().text("Graph Search"),tooltipPlacement:"bottom-end",variant:"extended",classes:{root:s.buttonRoot,extended:s.buttonExtended},onClick:l},o().createElement(ta.Z,{color:"primary",className:s.menuIcon}),o().createElement("span",{className:s.buttonLabel},_().text("Graph Search"))),o().createElement(Rn.Z,{variant:"caption",className:g()(s.caption,{[s.withBottomBorder]:!t})},_().text("Search query")),o().createElement("div",{ref:n,className:s.drawerScrollableArea,onScroll:i,"data-reltio-id":"readable-search-query"},o().createElement(ga,null)))},Ta=e=>{let{className:t}=e;const r=Cn();return o().createElement("div",{className:g()(r.root,t)},o().createElement(Ea,null),o().createElement("div",{className:r.mainContent},o().createElement(Nn,null),o().createElement(Or.Z,null),o().createElement(Jn,null)))};Ta.propTypes={className:l().oneOfType([l().string,l().object])};const va=Ta;var xa=r(26482),Sa=r(13961);const Oa=(0,fr.makeStyles)({footer:{boxShadow:"0 -1px 0 0 rgba(0,0,0,0.12)"},actionButtons:{justifyContent:"flex-end",minHeight:"56px",padding:"0 8px"},button:{marginRight:"8px"}}),Ca=e=>{let{className:t}=e;const r=Oa(),n=(0,b.useDispatch)(),a=(0,b.useSelector)(lr);return o().createElement(Sa.Z,{position:"static",color:"transparent",className:g()(r.footer,t)},o().createElement(xa.Z,{className:r.actionButtons},o().createElement(Cr.Z,{onClick:()=>{n(se())},className:r.button},_().text("Cancel")),o().createElement(Cr.Z,{disabled:a,onClick:()=>{n(ce())},color:"primary",variant:"contained","data-reltio-id":"relation-search-button"},_().text("Search"))))};Ca.propTypes={className:l().string};const Ra=(0,fr.makeStyles)((e=>({toolbar:{display:"flex",flexShrink:0,flexDirection:"column",alignItems:"flex-start",minHeight:"72px",paddingLeft:"16px",paddingRight:"16px"},mainArea:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:"8px"},title:{color:e.palette.text.secondary,fontSize:"14px",letterSpacing:0,lineHeight:"16px",marginRight:"8px"},clearButton:{}}))),wa=e=>{let{children:t,className:r}=e;const n=Ra(),i=(0,b.useDispatch)(),l=(0,b.useSelector)(ir),s=(0,at.O27)(l),c=(0,a.useCallback)((()=>i(se())),[i]);return o().createElement(xa.Z,{className:g()(n.toolbar,r)},o().createElement("div",{className:n.mainArea},o().createElement(Rn.Z,{className:n.title},_().text("Search for")),o().createElement(Cr.Z,{color:"primary",className:n.clearButton,onClick:c,disabled:s},_().text("clear"))),t)};wa.propTypes={className:l().string,children:l().node};const Ia=(0,fr.makeStyles)({container:{display:"flex",flexDirection:"column",height:"100%",backgroundColor:"#FAFAFA",position:"absolute",top:0,left:0,right:0,bottom:0},header:{marginLeft:"104px",marginRight:"132px"},headerWithBottomBorder:{boxShadow:"0 1px 1px -1px rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px -3px rgba(0,0,0,0.2)",zIndex:1},content:{flex:"1 0 0px",paddingRight:"132px",paddingLeft:"104px",overflow:"auto"},"@global div[role=tooltip]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},"@global div[role=presentation]":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}}),Aa=e=>{let{config:t}=e;const r=Ia(),n=(0,b.useDispatch)();(0,a.useEffect)((()=>{n((e=>({type:O,payload:e}))(t))}),[t,n]);const i=(0,a.useRef)(),l=(0,b.useSelector)(ir),s=(0,b.useSelector)(kt),c=(0,b.useSelector)(Lt),[p,d]=(0,a.useState)(!0),u=(0,a.useCallback)((()=>{d(i.current&&i.current.scrollTop<=0)}),[]),m=(0,a.useCallback)((e=>n(K(null,e))),[n]);return c?o().createElement("div",{className:r.container},!s&&o().createElement(wa,{className:g()(r.header,{[r.headerWithBottomBorder]:!p})}),o().createElement("div",{className:r.content,ref:i,onScroll:u},s?o().createElement(va,null):l?o().createElement(On,{block:l}):o().createElement(xr,{onChange:m})),!s&&l&&o().createElement(Ca,null)):null};Aa.propTypes={config:l().object.isRequired,state:l().object};const _a=Aa;var Pa=r(66780),Na=r(97010);const ka=(0,s.Z)({productionPrefix:"relationshipSearch",disableGlobal:!0,seed:"relS"}),La=e=>{let{config:t,onResize:r=m.ZT}=e;return o().createElement(h.m.Provider,{value:t.id},o().createElement(Pa.DynamicModuleLoader,{modules:[{id:or,reducerMap:{[or]:(0,ge.combineReducers)({search:Ye,ui:rt})},sagas:[...qt,rr,...ar],initialActions:[]}]},o().createElement(c.ZP,{generateClassName:ka},o().createElement(p._,{dateAdapter:d.Q},o().createElement(u.Z,{handleHeight:!0,onResize:r}),t&&o().createElement(_a,{config:t}),o().createElement(f.Z,null)))))};La.propTypes={config:l().object,store:l().object,onResize:l().func};const Da={getSearchPage:sr,getSearchRowsPerPage:cr,getTotal:pr},Ua={updateState:e=>({type:v.UPDATE_STATE,payload:e})},ja=La,{default:Ma,actions:Za,constants:za}=n}}]);
2
2
  //# sourceMappingURL=829.js.map