@reltio/remotes 1.4.1328 → 1.4.1330
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/4115.js +1 -1
- package/4115.js.map +1 -1
- package/4843.js +1 -1
- package/5592.js +1 -1
- package/5592.js.map +1 -1
- package/{8174.css → 6838.css} +1 -1
- package/{8174.css.map → 6838.css.map} +1 -1
- package/6838.js +2 -0
- package/6838.js.map +1 -0
- package/8532.js +1 -1
- package/8903.js +1 -1
- package/8903.js.map +1 -1
- package/{7442.js → 9417.js} +2 -2
- package/9417.js.map +1 -0
- package/9431.js +1 -1
- package/9431.js.map +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/remoteEntry.js.map +1 -1
- package/7442.js.map +0 -1
- package/8174.js +0 -2
- package/8174.js.map +0 -1
package/4115.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4115],{1876:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(87918),s=n.n(l),c=n(94079),d=n(87685);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const u=e=>a().createElement("svg",p({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),h=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),g=e=>{let{enabled:t,onClick:n}=e;const r=h();return a().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},a().createElement(c.IconButton,{onClick:n,classes:{root:r.button}},t?a().createElement(a().Fragment,null,a().createElement(u,{className:r["filterIcon--enabled"]}),a().createElement(d.default,{color:"primary",className:r.closeIcon})):a().createElement(u,null)))};g.propTypes={enabled:i().bool,onClick:i().func};const m=g},32152:(e,t,n)=>{"use strict";n.d(t,{i:()=>g});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(17440),s=n(87685),c=n(94079),d=n(21853),p=n(22385),u=n(31276);const h=(0,n(79692).Z)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{flex:"1 0 200px",marginLeft:"70px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),g=e=>{let{query:t,onChange:n}=e;const[o,g]=(0,r.useState)(t),[m,f]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{g(t)}),[t]);const b=h(),y=o&&o.length;return m?a().createElement(c.Input,{className:b.input,value:o,autoFocus:!0,placeholder:i().text("Search"),disableUnderline:!0,onChange:(0,l.pipe)(u.NA,g),startAdornment:a().createElement(c.InputAdornment,{position:"start"},a().createElement(d.default,{className:b.startAdornment})),endAdornment:a().createElement(c.InputAdornment,{position:"end"},y&&a().createElement(p.Z,{size:"S",icon:s.default,onClick:(0,l.pipe)(l.F,f,(0,l.always)(""),(0,l.tap)(n),g)})),onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),(0,l.pipe)((0,l.always)(o),l.trim,n))}):a().createElement(c.IconButton,{className:b.searchButton,onClick:(0,l.pipe)(l.T,f)},a().createElement(d.default,null))}},93416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(92778);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const o=s();return a().createElement(l.Z,{title:n,classes:{root:i()(o.container,t),title:o.title}},r)}},75512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),l=n(44443);const s=()=>i().createElement("div",{style:{display:"none"}}),c=e=>{let{widthToHide:t,children:n}=e;return i().createElement(l.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?i().createElement(i().Fragment,null,n):i().createElement(s,null)}})};c.propTypes={children:a().node,widthToHide:a().number.isRequired};const d=c},81727:(e,t,n)=>{"use strict";n.d(t,{E:()=>h,Z:()=>g});var r=n(24328),a=n.n(r),o=n(94079),i=n(8818),l=n(61932),s=n(27291),c=n(31276),d=n(71153),p=n.n(d);const u=(0,n(79692).Z)({root:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px"},check:{color:"#8CC152"}});let h;!function(e){e[e.INIT=1]="INIT",e[e.PROGRESS=2]="PROGRESS",e[e.SUCCESS=3]="SUCCESS",e[e.DONE=4]="DONE"}(h||(h={}));const g=e=>{let{classes:t={},tooltip:n="",onClick:r=c.ZT,mode:d=h.INIT}=e;const g=u();return a().createElement("div",{className:p()(g.root,t.root)},(()=>{switch(d){case h.INIT:return a().createElement(i.k,{className:t.button,size:"M",tooltipTitle:n,icon:l.Z,onClick:r});case h.PROGRESS:return a().createElement(o.CircularProgress,{className:t.spinner,size:24});case h.SUCCESS:return a().createElement(s.Z,{className:p()(g.check,t.check)});default:return null}})())}},55400:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({link:{textDecoration:"inherit",color:"inherit","&:visited":{textDecoration:"inherit",color:"inherit"}}}),i=e=>{let{to:t,children:n,onClick:r}=e;const i=o();return a().createElement("a",{href:t,onClick:e=>{r&&(r(),e.stopPropagation(),e.preventDefault())},className:i.link},n)}},22860:(e,t,n)=>{"use strict";n.d(t,{T:()=>u});var r=n(24328),a=n.n(r),o=n(17440),i=n(71153),l=n.n(i),s=n(94079);const c=(0,n(79692).Z)((e=>({root:{maxWidth:156,paddingTop:"9px",paddingBottom:"9px"},outlined:{paddingRight:32,paddingLeft:12},arrowIcon:{fontSize:"18px",top:"calc(50% - 9px)",right:"12px",color:e.palette.text.secondary},currentValue:{display:"flex",alignItems:"center"},currentValueIcon:{fontSize:"18px",marginRight:"8px",color:e.palette.text.secondary},currentValueText:{fontSize:"14px",lineHeight:"16px",textTransform:"uppercase",fontWeight:500,color:e.palette.text.primary,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},menuItem:{padding:"9px 12px 7px"},firstMenuItemButton:{borderTop:"1px solid #e4e4e4"},menuItemInner:{display:"flex",alignItems:"flex-start"},menuItemIcon:{fontSize:"18px",color:e.palette.text.secondary,marginRight:"9px"},menuItemLabel:{fontSize:"14px",lineHeight:"16px",fontWeight:500,color:e.palette.text.primary},menuItemDescription:{fontSize:"10px",lineHeight:"16px",color:e.palette.text.secondary}})));function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}const p=e=>"onClick"in e,u=e=>{let{optionsGroup:t,buttonsGroup:n,value:r,onChange:i,disabled:u=!1}=e;const h=c();return a().createElement(s.Select,{classes:{root:h.root,icon:h.arrowIcon,outlined:h.outlined},value:r,onChange:e=>{const{value:n}=e.target;t.some((0,o.propEq)("value",n))&&i(n)},variant:"outlined",renderValue:e=>{const{icon:n,label:r=e}=t.find((0,o.propEq)("value",e))||{};return a().createElement(s.Box,{className:h.currentValue},n&&a().createElement(n,{className:h.currentValueIcon}),a().createElement(s.Tooltip,{title:r},a().createElement(s.Typography,{className:h.currentValueText},r)))},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},getContentAnchorEl:null},disabled:u,"data-reltio-id":"reltio-profile-select-mode"},(e=>{const t=e.findIndex(p);return e.map(((e,n)=>{const{value:r,description:o,icon:i}=e,c={value:r,className:h.menuItem};return p(e)&&(c.onClick=()=>e.onClick(r),c.className=l()(c.className,{[h.firstMenuItemButton]:n===t})),a().createElement(s.MenuItem,d({key:r},c,{"data-reltio-id":`reltio-profile-select-mode-${r}`}),a().createElement(s.Box,{className:h.menuItemInner},a().createElement(i,{className:h.menuItemIcon}),a().createElement(s.Box,null,a().createElement(s.Typography,{className:h.menuItemLabel},r),a().createElement(s.Typography,{className:h.menuItemDescription},o))))}))})([...t,...n]))}},49734:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1,paddingBottom:"8px",paddingTop:"8px"},rulesContainer:{paddingLeft:"52px",marginBottom:"8px"}});var i=n(93517),l=n(22071),s=n(71153),c=n.n(s);const d=e=>{let{children:t,entitiesMap:n,entity:r,match:s,metadata:d,className:p}=e;const u=o();return a().createElement("div",{className:c()(u.root,p)},a().createElement("div",{className:u.profileCardWrapper},a().createElement(i.Z,{entity:s.object,classes:{container:u.profileCardContainer}}),t),a().createElement("div",{className:u.rulesContainer},s.matchRules&&a().createElement(l.Z,{match:s,metadata:d,entitiesMap:n,entity:r})))}},82842:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(52730),a=n(59431),o=n(24328),i=n.n(o),l=n(71153),s=n.n(l),c=n(17440),d=n(70687),p=n(68439),u=n(31039),h=n(53180),g=n(81727);const m=e=>e&&e.scrollIntoView({block:"end",behavior:"smooth"}),f=e=>{e&&clearTimeout(e)},b=(e,t)=>{if(e&&t){const n=e.offsetTop,r=e.offsetTop+e.clientHeight,{clientHeight:a,scrollTop:o}=t;return n>=0&&r>o&&r<o+a}};var y=n(20562),x=n(79692),v=n(41128);const E=(0,x.Z)((e=>({"@keyframes animate":{from:{background:"transparent"},"66%":{background:"#f2e68e"},"100%":{background:"transparent"}},highlighted:{animationName:"$animate",animationDuration:"3s",animationIterationCount:1},item:{display:"flex",minHeight:"40px",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",flexDirection:"row","&:after":{content:"",minHeight:"inherit",fontSize:0},"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},clickable:{cursor:"pointer"},selected:{background:(0,v.U1)(e.palette.primary.main,.12),"&:hover":{background:(0,v.U1)(e.palette.primary.main,.24)}},inactive:{background:e.inactiveBackground,"&:hover":{background:e.inactiveHoverBackground},"&$selected":{background:e.inactiveSelectedBackground,"&:hover":{background:e.inactiveSelectedHoverBackground}}},justImported:{backgroundColor:"#FFFBEB !important"},avatar:{marginLeft:"20px"},image:{height:"32px",width:"32px",marginTop:"8px",marginBottom:"7px"},info:{marginLeft:"20px",flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"center",fontSize:"13px",width:"100%",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word"},label:{fontSize:"13px",lineHeight:"15px",fontWeight:500,color:e.palette.primary.main,marginRight:"17px",textDecoration:"none"},secondaryLabel:{marginRight:"12px"},businessCard:{color:"rgba(0, 0, 0, 0.54)"},secondRow:{display:"flex",marginTop:"2px",alignItems:"center",color:"rgba(0, 0, 0, 0.54)",fontSize:"12px"}}))),w=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{entities:t,metadata:n,entityToHighlight:r,selectedEntityUri:a,onEntityClick:l,onEntityHover:x,entitiesImportStatus:v,entityButtonsRenderer:w}=e;const T=E(),P=(0,o.useRef)(null),I=(0,o.useRef)(null);return(0,y.D)((()=>{if(r){var e;const n=null===(e=P.current)||void 0===e?void 0:e.querySelectorAll(`[data-entity-uri='${r}']`);if(f(I.current),(null==n?void 0:n.length)>0){var t;const e=null===(t=P.current)||void 0===t?void 0:t.parentElement;b(n[0],e)||(m(n[0]),I.current=setTimeout((()=>{b(n[0],e)||m(n[0])}),1e3))}}return()=>{f(I.current)}}),[r]),i().createElement("div",{ref:P},(t||[]).map((e=>{const t=(0,d.idV)(e.label),o=e.secondaryLabel,m=(0,d.ptG)(n,e),f=(0,d.Fn9)(e),b=e.uri,y=(0,d.wwR)(e),E=(0,c.prop)(b,v);return i().createElement("div",{key:b,className:s()(T.item,{[T.clickable]:!!l,[T.selected]:b===a,[T.highlighted]:b===r,[T.inactive]:!f,[T.justImported]:E===g.E.SUCCESS}),onClick:l?()=>l(b):void 0,onMouseEnter:x?()=>x(b):void 0,onMouseLeave:x?()=>x(null):void 0,"data-entity-uri":b},i().createElement(h.Z,{entity:e,avatarClassName:T.avatar,imageClassName:T.image}),i().createElement("div",{className:T.info},i().createElement("div",null,i().createElement(u.Z,{value:y,className:T.label},t),o&&i().createElement("span",{className:T.secondaryLabel},o," "),m&&i().createElement("span",{className:T.businessCard},m)),i().createElement("div",{className:T.secondRow},i().createElement(p.Z,{entity:e}),i().createElement("div",null,(0,d.BTI)(e)))),w&&w(e))})))}))},58600:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>G});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(12335),s=n(17440),c=n(67121),d=n(13896),p=n(46847),u=n(15459),h=n(6521);function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var m=n(79692);const f=(0,m.Z)((()=>({"@global .rst__node":{minWidth:"100%",whiteSpace:"nowrap",position:"relative",textAlign:"left"},"@global .rst__node.rst__rtl":{textAlign:"right"},"@global .rst__nodeContent":{position:"absolute",top:0,bottom:0},"@global .rst__lineBlock, .rst__absoluteLineBlock":{height:"100%",position:"relative",display:"inline-block"},"@global .rst__absoluteLineBlock":{position:"absolute",top:0},"@global .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{position:"absolute",content:"",backgroundColor:"black"},"@global .rst__lineHalfHorizontalRight::before":{height:"1px",top:"50%",right:0,width:"50%"},"@global .rst__rtl.rst__lineHalfHorizontalRight::before":{left:0,right:"initial"},"@global .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{width:"1px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__lineFullVertical::after, .rst__rtl.rst__lineHalfVerticalTop::after, .rst__rtl.rst__lineHalfVerticalBottom::after":{right:"50%",left:"initial"},"@global .rst__lineHalfVerticalTop::after":{height:"50%"},"@global .rst__lineHalfVerticalBottom::after":{top:"auto",bottom:0,height:"50%"},"@global .rst__highlightLineVertical":{zIndex:3},"@global .rst__highlightLineVertical::before":{position:"absolute",content:"",backgroundColor:"#36c2f6",width:"8px",marginLeft:"-4px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__highlightLineVertical::before":{marginLeft:"initial",marginRight:"-4px",left:"initial",right:"50%"},"@keyframes arrow-pulse":{"0%":{transform:"translate(0, 0)",opacity:0},"30%":{transform:"translate(0, 300%)",opacity:1},"70%":{transform:"translate(0, 700%)",opacity:1},"100%":{transform:"translate(0, 1000%)",opacity:0}},"@global .rst__highlightLineVertical::after":{content:"",position:"absolute",height:0,marginLeft:"-4px",left:"50%",top:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid white",animation:"arrow-pulse 1s infinite linear both"},"@global .rst__rtl.rst__highlightLineVertical::after":{marginLeft:"initial",marginRight:"-4px",right:"50%",left:"initial"},"@global .rst__highlightTopLeftCorner::before":{zIndex:3,content:"",position:"absolute",borderTop:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(50% + 4px)",top:"50%",marginTop:"-4px",right:0,width:"calc(50% + 4px)"},"@global .rst__rtl.rst__highlightTopLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:0,right:"initial"},"@global .rst__highlightBottomLeftCorner":{zIndex:3},"@global .rst__highlightBottomLeftCorner::before":{content:"",position:"absolute",borderBottom:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(100% + 4px)",top:0,right:"12px",width:"calc(50% - 8px)"},"@global .rst__rtl.rst__highlightBottomLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:"12px",right:"initial"},"@global .rst__highlightBottomLeftCorner::after":{content:"",position:"absolute",height:0,right:0,top:"100%",marginTop:"-12px",borderTop:"12px solid transparent",borderBottom:"12px solid transparent",borderLeft:"12px solid #36c2f6"},"@global .rst__rtl.rst__highlightBottomLeftCorner::after":{left:0,right:"initial",borderRight:"12px solid #36c2f6",borderLeft:"none"}})));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const y=e=>{let{children:t,listIndex:n,swapFrom:o,swapLength:i,swapDepth:l,scaffoldBlockPxWidth:s,lowerSiblingCounts:c,connectDropTarget:d,isOver:p,draggedNode:u,canDrop:h,treeIndex:m,treeId:y,getPrevRow:x,node:v,path:E,rowDirection:w}=e,T=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]);f();const P="rtl"===w?"rst__rtl":null,I=c.length,O=[];let C;return c.forEach(((e,t)=>{let r="";if(e>0?r=0===n?"rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":t===I-1?"rst__lineHalfHorizontalRight rst__lineFullVertical":"rst__lineFullVertical":0===n?r="rst__lineHalfHorizontalRight":t===I-1&&(r="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),O.push(a().createElement("div",{key:`pre_${1+t}`,style:{width:s},className:g("rst__lineBlock",r,P)})),m!==n&&t===l){let e,r="";r=n===o+i-1?"rst__highlightBottomLeftCorner":m===o?"rst__highlightTopLeftCorner":"rst__highlightLineVertical",e="rtl"===w?{width:s,right:s*t}:{width:s,left:s*t},O.push(a().createElement("div",{key:t,style:e,className:g("rst__absoluteLineBlock",r,P)}))}})),C="rtl"===w?{right:s*I}:{left:s*I},d(a().createElement("div",b({},T,{className:g("rst__node",P)}),O,a().createElement("div",{className:"rst__nodeContent",style:C},r.Children.map(t,(e=>(0,r.cloneElement)(e,{isOver:p,canDrop:h,draggedNode:u}))))))};y.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"},y.propTypes={treeIndex:i().number.isRequired,treeId:i().string.isRequired,swapFrom:i().number,swapDepth:i().number,swapLength:i().number,scaffoldBlockPxWidth:i().number.isRequired,lowerSiblingCounts:i().arrayOf(i().number).isRequired,listIndex:i().number.isRequired,children:i().node.isRequired,connectDropTarget:i().func.isRequired,isOver:i().bool.isRequired,canDrop:i().bool,draggedNode:i().shape({}),getPrevRow:i().func.isRequired,node:i().shape({}).isRequired,path:i().arrayOf(i().oneOfType([i().string,i().number])).isRequired,rowDirection:i().string};const x=y;var v=n(21113);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=e=>{let{scaffoldBlockPxWidth:t,toggleChildrenVisibility:n,connectDragPreview:r,connectDragSource:o,isDragging:i,canDrop:l,canDrag:s,node:c,title:d,subtitle:p,draggedNode:u,path:h,treeIndex:m,isSearchMatch:f,isSearchFocus:b,buttons:y,className:x,style:T,didDrop:P,treeId:I,isOver:O,parentNode:C,rowDirection:D}=e,k=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]);const S=d||c.title,N=p||c.subtitle,R="rtl"===D?"rst__rtl":null;let _;s&&(_="function"==typeof c.children&&c.expanded?a().createElement("div",{className:"rst__loadingHandle"},a().createElement("div",{className:"rst__loadingCircle"},[...new Array(12)].map(((e,t)=>a().createElement("div",{key:t,className:g("rst__loadingCirclePoint",R)}))))):o(a().createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));const L=u&&(0,v.SG)(u,c),M=!P&&i;let j={left:-.5*t};return"rtl"===D&&(j={right:-.5*t}),a().createElement("div",E({style:{height:"100%"}},k),n&&c.children&&(c.children.length>0||"function"==typeof c.children)&&a().createElement("div",null,a().createElement("button",{type:"button","aria-label":c.expanded?"Collapse":"Expand",className:g(c.expanded?"rst__collapseButton":"rst__expandButton",R),style:j,onClick:()=>n({node:c,path:h,treeIndex:m})}),c.expanded&&!i&&a().createElement("div",{style:{width:t},className:g("rst__lineChildren",R)})),a().createElement("div",{className:g("rst__rowWrapper",R)},r(a().createElement("div",{className:g("rst__row",M&&"rst__rowLandingPad",M&&!l&&"rst__rowCancelPad",f&&"rst__rowSearchMatch",b&&"rst__rowSearchFocus",R,x),style:w({opacity:L?.5:1},T)},_,a().createElement("div",{className:g("rst__rowContents",!s&&"rst__rowContentsDragDisabled",R)},a().createElement("div",{className:g("rst__rowLabel",R)},a().createElement("span",{className:g("rst__rowTitle",c.subtitle&&"rst__rowTitleWithSubtitle")},"function"==typeof S?S({node:c,path:h,treeIndex:m}):S),N&&a().createElement("span",{className:"rst__rowSubtitle"},"function"==typeof N?N({node:c,path:h,treeIndex:m}):N)),a().createElement("div",{className:"rst__rowToolbar"},y.map(((e,t)=>a().createElement("div",{key:t,className:"rst__toolbarButton"},e)))))))))};P.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"},P.propTypes={node:i().shape({}).isRequired,title:i().oneOfType([i().func,i().node]),subtitle:i().oneOfType([i().func,i().node]),path:i().arrayOf(i().oneOfType([i().string,i().number])).isRequired,treeIndex:i().number.isRequired,treeId:i().string.isRequired,isSearchMatch:i().bool,isSearchFocus:i().bool,canDrag:i().bool,scaffoldBlockPxWidth:i().number.isRequired,toggleChildrenVisibility:i().func,buttons:i().arrayOf(i().node),className:i().string,style:i().shape({}),connectDragPreview:i().func.isRequired,connectDragSource:i().func.isRequired,parentNode:i().shape({}),isDragging:i().bool.isRequired,didDrop:i().bool.isRequired,draggedNode:i().shape({}),isOver:i().bool.isRequired,canDrop:i().bool,rowDirection:i().string};const I=P;function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class C extends r.Component{render(){const e=this.props,{children:t,connectDropTarget:n,treeId:o,drop:i}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","connectDropTarget","treeId","drop"]);return n(a().createElement("div",null,r.Children.map(t,(e=>(0,r.cloneElement)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}({},l))))))}}C.defaultProps={canDrop:!1,draggedNode:null},C.propTypes={children:i().node.isRequired,connectDropTarget:i().func.isRequired,isOver:i().bool.isRequired,canDrop:i().bool,draggedNode:i().shape({}),treeId:i().string.isRequired,drop:i().func.isRequired};const D=C,k=(0,m.Z)((()=>({"@global .rst__placeholder":{position:"relative",height:"68px",maxWidth:"300px",padding:"10px"},"@global .rst__placeholder, .rst__placeholder > *":{boxSizing:"border-box"},"@global .rst__placeholder::before":{border:"3px dashed #d9d9d9",content:"",position:"absolute",top:"5px",right:"5px",bottom:"5px",left:"5px",zIndex:-1},"@global .rst__placeholderLandingPad, .rst__placeholderCancelPad":{border:"none !important",boxShadow:"none !important",outline:"none !important"},"@global .rst__placeholderLandingPad *, .rst__placeholderCancelPad *":{opacity:"0 !important"},"@global .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before":{backgroundColor:"lightblue",borderColor:"white"},"@global .rst__placeholderCancelPad::before":{backgroundColor:"#e6a8ad"}}))),S=e=>{let{isOver:t,canDrop:n}=e;return k(),a().createElement("div",{className:g("rst__placeholder",n&&"rst__placeholderLandingPad",n&&!t&&"rst__placeholderCancelPad")})};S.defaultProps={isOver:!1,canDrop:!1},S.propTypes={isOver:i().bool,canDrop:i().bool};const N=S,R=e=>{let t=[],n=[],r=null;return a=>{const o=Object.keys(a).sort(),i=o.map((e=>a[e]));return(i.length!==t.length||i.some(((e,n)=>e!==t[n]))||o.some(((e,t)=>e!==n[t])))&&(t=i,n=o,r=e(a)),r}},_=R(v.Lf),L=R(v.Pg),M=R(v.o5);var j=n(65758),A=n(75047);class V{constructor(e){this.hoverHandler=()=>{if(null===this.hoverProps)return;const{dropTargetProps:e,monitor:t,component:n}=this.hoverProps,r=t.getItem();if(!r)return;const a=this.getTargetDepth(e,t,n),o=r.node;(e.node!==this.lastDropTargetNode||a!==this.lastDropTargetDepth)&&(this.lastDropTargetNode=e.node,this.lastDropTargetDepth=a,this.dragHover({node:o,path:r.path,minimumTreeIndex:e.listIndex,depth:a}),this.hoverProps=null)},this.deferredCallHoverHandler=()=>{if(this.shouldSkipMoreFrames)return this.shouldSkipMoreFrames=!1,void(this.rafId=requestAnimationFrame(this.deferredCallHoverHandler));this.rafId=null,this.hoverHandler()},this.treeRef=e,this.resetDragVariables()}get startDrag(){return this.treeRef.startDrag}get dragHover(){return this.treeRef.dragHover}get endDrag(){return this.treeRef.endDrag}get drop(){return this.treeRef.drop}get treeId(){return this.treeRef.treeId}get dndType(){return this.treeRef.dndType}get treeData(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}get getNodeKey(){return this.treeRef.props.getNodeKey}get customCanDrop(){return this.treeRef.props.canDrop}get maxDepth(){return this.treeRef.props.maxDepth}resetDragVariables(){this.lastDropTargetNode=null,this.lastDropTargetDepth=null,this.hoverProps=null,this.lastCanDropResult=null,this.lastCanDropProps=null,this.shouldSkipMoreFrames=!1,this.rafId=null}getTargetDepth(e,t,n){let r=0;const a=e.getPrevRow();if(a){let{path:t}=a;!this.treeRef.canNodeHaveChildren(a.node)&&(t=t.slice(0,t.length-1)),r=Math.min(t.length,e.path.length)}let o,i=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(i=0,n){const r=(0,A.findDOMNode)(n).getBoundingClientRect(),a=t.getSourceClientOffset().x-r.left;o=Math.round(a/e.scaffoldBlockPxWidth)}else o=e.path.length;else{const n="rtl"===e.rowDirection?-1:1;o=Math.round(n*t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth)}let l=Math.min(r,Math.max(0,i+o-1));if(void 0!==this.maxDepth&&null!==this.maxDepth){const e=t.getItem().node,n=(0,v.hh)(e);l=Math.max(0,Math.min(l,this.maxDepth-n-1))}return l}canDrop(e,t){if(!t.isOver())return!1;const n=e.getPrevRow(),r=n?n.path:[],a=n?n.node:{},o=Math.round(t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth),i={nodeId:void 0!==e.node.nodeId?e.node.nodeId:e.node,rowAbove:n,abovePath:r,aboveNodeId:void 0!==a.nodeId?a.nodeId:a,blocksOffset:o};if((0,s.equals)(this.lastCanDropProps,i))return this.lastCanDropResult;this.lastCanDropProps=i;const l=this.getTargetDepth(e,t,null);if(l>=r.length&&"function"==typeof a.children)return this.lastCanDropResult=!1;if("function"==typeof this.customCanDrop){const{node:n}=t.getItem(),r=_({treeData:this.treeData,newNode:n,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:e.listIndex,expandParent:!0});return this.lastCanDropResult=this.customCanDrop({node:n,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:r.path,nextParent:r.parentNode,nextTreeIndex:r.treeIndex})}return this.lastCanDropResult=!0}wrapSource(e){const t={beginDrag:e=>(this.startDrag(e),{node:e.node,parentNode:e.parentNode,path:e.path,treeIndex:e.treeIndex,treeId:e.treeId}),endDrag:(e,t)=>{this.rafId&&cancelAnimationFrame(this.rafId),this.endDrag(t.getDropResult()),this.resetDragVariables()},isDragging:(e,t)=>{const n=t.getItem().node;return e.node===n}};return(0,d.DragSource)(this.dndType,t,(function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging(),didDrop:t.didDrop()}}))(e)}wrapTarget(e){const t={drop:(e,t,n)=>{this.rafId&&cancelAnimationFrame(this.rafId);const r={node:t.getItem().node,path:t.getItem().path,treeIndex:t.getItem().treeIndex,treeId:this.treeId,minimumTreeIndex:e.treeIndex,depth:this.getTargetDepth(e,t,n)};return this.lastDropTargetNode=null,this.drop(r),r},hover:(e,t,n)=>{this.rafId?this.shouldSkipMoreFrames=!0:(this.shouldSkipMoreFrames=!1,this.hoverProps={dropTargetProps:e,monitor:t,component:n},this.rafId=requestAnimationFrame(this.deferredCallHoverHandler))},canDrop:this.canDrop.bind(this)};return(0,d.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}wrapPlaceholder(e){const t={drop:(e,t)=>{const{node:n,path:r,treeIndex:a}=t.getItem(),o={node:n,path:r,treeIndex:a,treeId:this.treeId,minimumTreeIndex:0,depth:0};return this.drop(o),o}};return(0,d.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}}function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(this,arguments)}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){B(e,t,n[t])}))}return e}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Z=1;const z=e=>{const t=F({},e,{style:F({},e.theme.style,e.style),innerStyle:F({},e.theme.innerStyle,e.innerStyle),reactVirtualizedListProps:F({},e.theme.reactVirtualizedListProps,e.reactVirtualizedListProps)}),n={nodeContentRenderer:I,placeholderRenderer:N,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:x};return Object.keys(n).forEach((r=>{null===e[r]&&(t[r]=void 0!==e.theme[r]?e.theme[r]:n[r])})),t};class H extends r.Component{constructor(e){super(e);const{dndType:t,nodeContentRenderer:n,treeNodeRenderer:r,isVirtualized:a,slideRegionSize:o}=z(e);this.dndManager=new V(this),this.treeId=`rst__${Z}`,Z+=1,this.dndType=t||this.treeId,this.nodeContentRenderer=this.dndManager.wrapSource(n),this.treePlaceholderRenderer=this.dndManager.wrapPlaceholder(D),this.treeNodeRenderer=this.dndManager.wrapTarget(r),a&&(this.scrollZoneVirtualList=(c._t||c.ZP)(l.aV),this.vStrength=(0,c.Kx)(o),this.hStrength=(0,c.v7)(o)),this.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,draggingExpandedPaths:[],ignoreOneTreeUpdate:!1,instanceProps:{treeData:this.props.treeData||[],searchQuery:null,searchFocusOffset:null,ignoreTreeChanges:!1}},this.toggleChildrenVisibility=this.toggleChildrenVisibility.bind(this),this.moveNode=this.moveNode.bind(this),this.startDrag=this.startDrag.bind(this),this.dragHover=this.dragHover.bind(this),this.endDrag=this.endDrag.bind(this),this.drop=this.drop.bind(this),this.handleDndMonitorChange=this.handleDndMonitorChange.bind(this)}componentDidMount(){H.loadLazyChildren(this.props);const e=H.search(this.props,this.state,!0,!0,!1);this.setState(e),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}static getDerivedStateFromProps(e,t){const{instanceProps:n}=t,r={};return(0,s.equals)(n.searchQuery,e.searchQuery)?n.searchFocusOffset!==e.searchFocusOffset&&Object.assign(r,H.search(e,t,!0,!0,!0)):Object.assign(r,H.search(e,t,!0,!0,!1)),n.searchQuery=e.searchQuery,n.searchFocusOffset=e.searchFocusOffset,r.instanceProps=n,r}componentDidUpdate(e,t){if(this.state.dragging!==t.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode}),this.state.dragging)if((0,s.equals)(this.props.treeData,e.treeData))this.state.draggingTreeData&&t.draggingTreeData!==this.state.draggingTreeData&&(0,v._p)({treeData:this.state.draggingTreeData,getNodeKey:this.props.getNodeKey,callback:e=>{let{node:t,path:n,lowerSiblingCounts:r,treeIndex:a}=e;t.pending&&t.expanded&&this.props.onLazyLoadChildren({node:t,path:n,lowerSiblingCounts:r,treeIndex:a})}});else{const{treeData:e}=(0,v.ZF)({treeData:this.props.treeData,path:t.draggedPath,getNodeKey:this.props.getNodeKey});this.setState((t=>{let{draggingExpandedPaths:n}=t;return{draggingTreeData:n.reduce(((e,t)=>{let n;try{n=(0,v.Gm)({treeData:e,path:t,newNode:e=>{let{node:t}=e;return F({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey})}catch(t){n=e}return n}),e)}}))}else if(this.props.treeData!==e.treeData){const t=(0,s.equals)(this.props.treeData,e.treeData),{ignoreOneTreeUpdate:n,instanceProps:r}=this.state,a={};t||(n?a.ignoreOneTreeUpdate=!1:(a.searchFocusTreeIndex=null,H.loadLazyChildren(this.props),Object.assign(a,H.search(this.props,this.state,!1,!1,!1))),a.draggingTreeData=null,a.draggedNode=null,a.draggedMinimumTreeIndex=null,a.draggedDepth=null,a.dragging=!1,a.draggingExpandedPaths=[],a.instanceProps=F({},r,{treeData:this.props.treeData}),this.setState(a))}}componentWillUnmount(){this.clearMonitorSubscription()}getRows(e){return L({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:e})}handleDndMonitorChange(){!this.props.dragDropManager.getMonitor().isDragging()&&this.state.draggingTreeData&&this.endDrag()}toggleChildrenVisibility(e){let{node:t,path:n}=e;const{instanceProps:r}=this.state,a=(0,v.Gm)({treeData:r.treeData,path:n,newNode:e=>{let{node:t}=e;return F({},t,{expanded:!t.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(a),this.props.onVisibilityToggle({treeData:a,node:t,expanded:!t.expanded,path:n})}moveNode(e){let{node:t,path:n,treeIndex:r,depth:a,minimumTreeIndex:o}=e;const{treeData:i,treeIndex:l,path:s,parentNode:c}=(0,v.Lf)({treeData:this.state.draggingTreeData,newNode:t,depth:a,minimumTreeIndex:o,expandParent:!0,getNodeKey:this.props.getNodeKey});this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1,draggingExpandedPaths:[]},(()=>{this.props.onChange(i),this.props.onMoveNode({treeData:i,node:t,treeIndex:l,path:s,nextPath:s,nextTreeIndex:l,prevPath:n,prevTreeIndex:r,nextParentNode:c})}))}static search(e,t,n,r,a){const{onChange:o,getNodeKey:i,searchFinishCallback:l,searchQuery:s,searchMethod:c,searchFocusOffset:d,onlyExpandSearchedNodes:p}=e,{instanceProps:u}=t;if(!s&&!c)return l&&l([]),{searchMatches:[]};const h={},{treeData:g,matches:m}=(0,v.sE)({getNodeKey:i,treeData:p?(0,v.Vk)({treeData:u.treeData,expanded:!1}):u.treeData,searchQuery:s,searchMethod:c||j.v2,searchFocusOffset:d,expandAllMatchPaths:r&&!a,expandFocusMatchPaths:!!r});r&&(h.ignoreOneTreeUpdate=!0,o(g)),l&&l(m);let f=null;return n&&null!==d&&d<m.length&&(f=m[d].treeIndex),h.searchMatches=m,h.searchFocusTreeIndex=f,h}startDrag(e){let{path:t}=e;this.setState((e=>{const{treeData:n,node:r,treeIndex:a}=(0,v.ZF)({treeData:e.instanceProps.treeData,path:t,getNodeKey:this.props.getNodeKey});return{draggingTreeData:n,draggedNode:r,draggedDepth:t.length-1,draggedMinimumTreeIndex:a,draggedPath:t,dragging:!0}}))}dragHover(e){let{node:t,depth:n,minimumTreeIndex:r}=e;this.state.draggedDepth===n&&this.state.draggedMinimumTreeIndex===r||this.setState((e=>{let{draggingTreeData:a,instanceProps:o,draggingExpandedPaths:i}=e;const l=a||o.treeData,c=_({treeData:l,newNode:t,depth:n,minimumTreeIndex:r,expandParent:!0,getNodeKey:this.props.getNodeKey}),d=this.getRows(c.treeData)[c.treeIndex].path.slice(0,-1),p=(0,s.pipe)((0,s.when)((0,s.always)((0,s.gt)(d.length,0)),(0,s.append)(d)),(0,s.uniqWith)((0,s.eqBy)(String)))(i);return{draggedNode:t,draggedDepth:n,draggedMinimumTreeIndex:r,draggingTreeData:(0,v.Gm)({treeData:l,path:d,newNode:e=>{let{node:t}=e;return F({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0,draggingExpandedPaths:p}}))}endDrag(e){const{instanceProps:t}=this.state;if(e){if(e.treeId!==this.treeId){const{node:n,path:r,treeIndex:a}=e;let o=this.props.shouldCopyOnOutsideDrop;"function"==typeof o&&(o=o({node:n,prevTreeIndex:a,prevPath:r}));let i=this.state.draggingTreeData||t.treeData;o&&(i=(0,v.Gm)({treeData:t.treeData,path:r,newNode:e=>{let{node:t}=e;return F({},t)},getNodeKey:this.props.getNodeKey})),this.props.onChange(i),this.props.onMoveNode({treeData:i,node:n,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:r,prevTreeIndex:a})}}else(()=>{this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})})()}drop(e){this.moveNode(e)}canNodeHaveChildren(e){const{canNodeHaveChildren:t}=this.props;return!t||t(e)}static loadLazyChildren(e){(0,v._p)({treeData:e.treeData,getNodeKey:e.getNodeKey,callback:t=>{let{node:n,path:r,lowerSiblingCounts:a,treeIndex:o}=t;n.pending&&(n.expanded||e.loadCollapsedLazyChildren)&&e.onLazyLoadChildren({node:n,path:r,lowerSiblingCounts:a,treeIndex:o,done:t=>e.onChange((0,v.Gm)({treeData:e.treeData,path:r,newNode:e=>{let{node:r}=e;return r===n?F({},r,{children:t}):r},getNodeKey:e.getNodeKey}),!0)})}})}renderRow(e,t){let{listIndex:n,style:r,getPrevRow:o,matchKeys:i,swapFrom:l,swapDepth:s,swapLength:c}=t;const{node:d,parentNode:p,path:u,lowerSiblingCounts:h,treeIndex:g}=e,{canDrag:m,generateNodeProps:f,scaffoldBlockPxWidth:b,searchFocusOffset:y,rowDirection:x}=z(this.props),v=this.treeNodeRenderer,E=this.nodeContentRenderer,w=u[u.length-1],T=w in i,P=T&&i[w]===y,I={node:d,parentNode:p,path:u,lowerSiblingCounts:h,treeIndex:g,isSearchMatch:T,isSearchFocus:P},O=f?f(I):{},C="function"!=typeof m?m:m(I),D={treeIndex:g,scaffoldBlockPxWidth:b,node:d,path:u,treeId:this.treeId,rowDirection:x};return a().createElement(v,U({style:r,key:w,listIndex:n,getPrevRow:o,lowerSiblingCounts:h,swapFrom:l,swapLength:c,swapDepth:s},D),a().createElement(E,U({parentNode:p,isSearchMatch:T,isSearchFocus:P,canDrag:C,toggleChildrenVisibility:this.toggleChildrenVisibility},D,O)))}render(){const{dragDropManager:e,style:t,className:n,innerStyle:r,rowHeight:o,isVirtualized:i,placeholderRenderer:s,reactVirtualizedListProps:c,getNodeKey:d,rowDirection:p}=z(this.props),{searchMatches:u,searchFocusTreeIndex:h,draggedNode:m,draggedDepth:f,draggedMinimumTreeIndex:b}=this.state,y=this.state.draggingTreeData||this.props.treeData,x="rtl"===p?"rst__rtl":null;let v,E=null,w=null;if(m&&null!==b){const e=_({treeData:y,newNode:m,depth:f,minimumTreeIndex:b,expandParent:!0,getNodeKey:d}),t=b;E=e.treeIndex,w=1+M({node:m}),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const a=[...e.slice(0,t),...e.slice(t+r)];return[...a.slice(0,n),...e.slice(t,t+r),...a.slice(n)]}(this.getRows(e.treeData),E,t,w)}else v=this.getRows(y);const T={};u.forEach(((e,t)=>{let{path:n}=e;T[n[n.length-1]]=t}));const P=null!==h?{scrollToIndex:h}:{};let I,O=t;if(v.length<1){const e=this.treePlaceholderRenderer,t=s;I=a().createElement(e,{treeId:this.treeId,drop:this.drop},a().createElement(t,null))}else if(i){O=F({height:"100%"},O);const t=this.scrollZoneVirtualList;I=a().createElement(l.qj,null,(n=>{let{height:i,width:l}=n;return a().createElement(t,U({},P,{dragDropManager:e,verticalStrength:this.vStrength,horizontalStrength:this.hStrength,speed:30,scrollToAlignment:"start",className:this.props.classes.rst__virtualScrollOverride,width:l,onScroll:e=>{let{scrollTop:t}=e;this.scrollTop=t},height:i,style:r,rowCount:v.length,estimatedRowSize:"function"!=typeof o?o:void 0,rowHeight:"function"!=typeof o?o:e=>{let{index:t}=e;return o({index:t,treeIndex:t,node:v[t].node,path:v[t].path})},rowRenderer:e=>{let{index:t,style:n}=e;return this.renderRow(v[t],{listIndex:t,style:n,getPrevRow:()=>v[t-1]||null,matchKeys:T,swapFrom:E,swapDepth:f,swapLength:w})}},c))}))}else I=v.map(((e,t)=>this.renderRow(e,{listIndex:t,style:{height:"function"!=typeof o?o:o({index:t,treeIndex:t,node:e.node,path:e.path})},getPrevRow:()=>v[t-1]||null,matchKeys:T,swapFrom:E,swapDepth:f,swapLength:w})));return a().createElement("div",{className:g("rst__tree",n,x),style:O},I)}}H.propTypes={classes:i().object,dragDropManager:i().shape({getMonitor:i().func}).isRequired,treeData:i().arrayOf(i().object).isRequired,style:i().shape({}),className:i().string,innerStyle:i().shape({}),rowHeight:i().oneOfType([i().number,i().func]),slideRegionSize:i().number,reactVirtualizedListProps:i().shape({}),scaffoldBlockPxWidth:i().number,maxDepth:i().number,searchMethod:i().func,searchQuery:i().any,searchFocusOffset:i().number,searchFinishCallback:i().func,generateNodeProps:i().func,isVirtualized:i().bool,treeNodeRenderer:i().func,nodeContentRenderer:i().func,placeholderRenderer:i().func,theme:i().shape({style:i().shape({}),innerStyle:i().shape({}),reactVirtualizedListProps:i().shape({}),scaffoldBlockPxWidth:i().number,slideRegionSize:i().number,rowHeight:i().oneOfType([i().number,i().func]),treeNodeRenderer:i().func,nodeContentRenderer:i().func,placeholderRenderer:i().func}),getNodeKey:i().func,onChange:i().func.isRequired,onMoveNode:i().func,canDrag:i().oneOfType([i().func,i().bool]),canDrop:i().func,canNodeHaveChildren:i().func,shouldCopyOnOutsideDrop:i().oneOfType([i().func,i().bool]),onVisibilityToggle:i().func,dndType:i().string,onDragStateChanged:i().func,onlyExpandSearchedNodes:i().bool,rowDirection:i().string,onLazyLoadChildren:i().func,ignoreTreeChanges:i().bool},H.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:()=>!0,className:"",dndType:null,generateNodeProps:null,getNodeKey:j.TS,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:()=>{},onVisibilityToggle:()=>{},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:()=>{},onlyExpandSearchedNodes:!1,rowDirection:"ltr",onLazyLoadChildren:()=>{},ignoreTreeChanges:!1},(0,p.polyfill)(H);const W=(0,u.Z)((()=>({"@global .ReactVirtualized__Grid__innerScrollContainer":{overflow:"visible !important"},"@global .ReactVirtualized__Grid":{outline:"none"},"@global .ReactVirtualized__List":{},rst__virtualScrollOverride:{overflow:"auto !important"},"@global .rst__rtl .ReactVirtualized__Grid__innerScrollContainer":{direction:"rtl"}})))(H),q=e=>a().createElement(d.DndContext.Consumer,null,(t=>{let{dragDropManager:n}=t;return void 0===n?null:a().createElement(W,U({},e,{dragDropManager:n}))})),G=e=>a().createElement(h.l,null,a().createElement(q,e))},65758:(e,t,n)=>{"use strict";function r(e){let{treeIndex:t}=e;return t}function a(e){return"string"==typeof e?e:null===e||"object"!=typeof e||!e.props||!e.props.children||"string"!=typeof e.props.children&&"object"!=typeof e.props.children?"":"string"==typeof e.props.children?e.props.children:e.props.children.map((e=>a(e))).join("")}function o(e,t,n,r,o){return"function"==typeof n[e]?String(n[e]({node:n,path:r,treeIndex:o})).indexOf(t)>-1:"object"==typeof n[e]?a(n[e]).indexOf(t)>-1:n[e]&&String(n[e]).indexOf(t)>-1}function i(e){let{node:t,path:n,treeIndex:r,searchQuery:a}=e;return o("title",a,t,n,r)||o("subtitle",a,t,n,r)}n.d(t,{TS:()=>r,v2:()=>i,ZP:()=>l});const l={defaultSearchMethod:i,defaultGetNodeKey:r}},21113:(e,t,n)=>{"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){let{targetIndex:t,node:n,currentIndex:r,getNodeKey:a,path:i=[],lowerSiblingCounts:l=[],ignoreCollapsed:s=!0,isPseudoRoot:c=!1}=e;const d=c?[]:[...i,a({node:n,treeIndex:r})];if(r===t)return{node:n,lowerSiblingCounts:l,path:d};if(!n.children||s&&!0!==n.expanded)return{nextIndex:r+1};let p=r+1;const u=n.children.length;for(let e=0;e<u;e+=1){const r=o({ignoreCollapsed:s,getNodeKey:a,targetIndex:t,node:n.children[e],currentIndex:p,lowerSiblingCounts:[...l,u-e-1],path:d});if(r.node)return r;p=r.nextIndex}return{nextIndex:p}}function i(e){let{node:t,ignoreCollapsed:n=!0}=e;return o({getNodeKey:()=>{},ignoreCollapsed:n,node:t,currentIndex:0,targetIndex:-1}).nextIndex-1}function l(e){let{callback:t,getNodeKey:n,ignoreCollapsed:r,isPseudoRoot:a=!1,node:o,parentNode:i=null,currentIndex:s,path:c=[],lowerSiblingCounts:d=[]}=e;const p=a?[]:[...c,n({node:o,treeIndex:s})];if(!a&&!1===t(a?null:{node:o,parentNode:i,path:p,lowerSiblingCounts:d,treeIndex:s}))return!1;if(!o.children||!0!==o.expanded&&r&&!a)return s;let u=s;const h=o.children.length;if("function"!=typeof o.children)for(let e=0;e<h;e+=1)if(u=l({callback:t,getNodeKey:n,ignoreCollapsed:r,node:o.children[e],parentNode:a?null:o,currentIndex:u+1,lowerSiblingCounts:[...d,h-e-1],path:p}),!1===u)return!1;return u}function s(e){let{callback:t,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:o=!1,node:i,parentNode:l=null,currentIndex:c,path:d=[],lowerSiblingCounts:p=[]}=e;const u=r({},i),h=o?[]:[...d,n({node:u,treeIndex:c})],g={node:u,parentNode:l,path:h,lowerSiblingCounts:p,treeIndex:c};if(!u.children||!0!==u.expanded&&a&&!o)return{treeIndex:c,node:t(g)};let m=c;const f=u.children.length;return"function"!=typeof u.children&&(u.children=u.children.map(((e,r)=>{const i=s({callback:t,getNodeKey:n,ignoreCollapsed:a,node:e,parentNode:o?null:u,currentIndex:m+1,lowerSiblingCounts:[...p,f-r-1],path:h});return m=i.treeIndex,i.node}))),{node:t(g),treeIndex:m}}function c(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:a=!0}=e;!t||t.length<1||l({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function d(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:a=!0}=e;return!t||t.length<1?[]:s({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function p(e){let{treeData:t,expanded:n=!0}=e;return d({treeData:t,callback:e=>{let{node:t}=e;return r({},t,{expanded:n})},getNodeKey:e=>{let{treeIndex:t}=e;return t},ignoreCollapsed:!1})}function u(e){let{treeData:t,path:n,newNode:a,getNodeKey:o,ignoreCollapsed:l=!0}=e;const s="RESULT_MISS",c=e=>{let{isPseudoRoot:t=!1,node:d,currentTreeIndex:p,pathIndex:u}=e;if(!t&&o({node:d,treeIndex:p})!==n[u])return s;if(u>=n.length-1)return"function"==typeof a?a({node:d,treeIndex:p}):a;if(!d.children)throw new Error("Path referenced children of node with no children.");let h=p+1;for(let e=0;e<d.children.length;e+=1){const t=c({node:d.children[e],currentTreeIndex:h,pathIndex:u+1});if(t!==s)return r({},d,t?{children:[...d.children.slice(0,e),t,...d.children.slice(e+1)]}:{children:[...d.children.slice(0,e),...d.children.slice(e+1)]});h+=1+i({node:d.children[e],ignoreCollapsed:l})}return s},d=c({node:{children:t},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(d===s)throw new Error("No node found at the given path.");return d.children}function h(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e,o=null,i=null;return{treeData:u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:e=>{let{node:t,treeIndex:n}=e;return o=t,i=n,null}}),node:o,treeIndex:i}}function g(e){let{targetDepth:t,minimumTreeIndex:n,newNode:a,ignoreCollapsed:o,expandParent:l,isPseudoRoot:s=!1,isLastChild:c,node:d,currentIndex:p,currentDepth:u,getNodeKey:h,path:m=[]}=e;const f=e=>s?[]:[...m,h({node:e,treeIndex:p})];if(p>=n-1||c&&(!d.children||!d.children.length)){if("function"==typeof d.children)throw new Error("Cannot add to children defined by a function");{const e=r({},d,l?{expanded:!0}:{},{children:d.children?[a,...d.children]:[a]});return{node:e,nextIndex:p+2,insertedTreeIndex:p+1,parentPath:f(e),parentNode:s?null:e}}}if(u>=t-1){if(!d.children||"function"==typeof d.children||!0!==d.expanded&&o&&!s)return{node:d,nextIndex:p+1};let e=p+1,t=null,l=null;for(let r=0;r<d.children.length;r+=1){if(e>=n){t=e,l=r;break}e+=1+i({node:d.children[r],ignoreCollapsed:o})}if(null===l){if(e<n&&!c)return{node:d,nextIndex:e};t=e,l=d.children.length}const u=r({},d,{children:[...d.children.slice(0,l),a,...d.children.slice(l)]});return{node:u,nextIndex:e,insertedTreeIndex:t,parentPath:f(u),parentNode:s?null:u}}if(!d.children||"function"==typeof d.children||!0!==d.expanded&&o&&!s)return{node:d,nextIndex:p+1};let b=null,y=null,x=null,v=p+1,E=d.children;"function"!=typeof E&&(E=E.map(((e,r)=>{if(null!==b)return e;const i=g({targetDepth:t,minimumTreeIndex:n,newNode:a,ignoreCollapsed:o,expandParent:l,isLastChild:c&&r===E.length-1,node:e,currentIndex:v,currentDepth:u+1,getNodeKey:h,path:[]});return"insertedTreeIndex"in i&&({insertedTreeIndex:b,parentNode:x,parentPath:y}=i),v=i.nextIndex,i.node})));const w=r({},d,{children:E}),T={node:w,nextIndex:v};return null!==b&&(T.insertedTreeIndex=b,T.parentPath=[...f(w),...y],T.parentNode=x),T}function m(e){let{treeData:t,depth:n,minimumTreeIndex:r,newNode:a,getNodeKey:o=(()=>{}),ignoreCollapsed:i=!0,expandParent:l=!1}=e;if(!t&&0===n)return{treeData:[a],treeIndex:0,path:[o({node:a,treeIndex:0})],parentNode:null};const s=g({targetDepth:n,minimumTreeIndex:r,newNode:a,ignoreCollapsed:i,expandParent:l,getNodeKey:o,isPseudoRoot:!0,isLastChild:!0,node:{children:t},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in s))throw new Error("No suitable position found to insert.");const c=s.insertedTreeIndex;return{treeData:s.node.children,treeIndex:c,path:[...s.parentPath,o({node:a,treeIndex:c})],parentNode:s.parentNode}}function f(e){let{treeData:t,getNodeKey:n,ignoreCollapsed:r=!0}=e;if(!t||t.length<1)return[];const a=[];return c({treeData:t,getNodeKey:n,ignoreCollapsed:r,callback:e=>{a.push(e)}}),a}function b(e,t){return!!e.children&&"function"!=typeof e.children&&e.children.some((e=>e===t||b(e,t)))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.children?"function"==typeof e.children?t+1:e.children.reduce(((e,n)=>Math.max(e,y(n,t+1))),t):t}function x(e){let{getNodeKey:t,treeData:n,searchQuery:a,searchMethod:o,searchFocusOffset:i,expandAllMatchPaths:l=!1,expandFocusMatchPaths:s=!0}=e,c=0;const d=e=>{let{isPseudoRoot:n=!1,node:p,currentIndex:u,path:h=[]}=e,g=[],m=!1,f=!1;const b=n?[]:[...h,t({node:p,treeIndex:u})],y=n?null:{path:b,treeIndex:u},x=p.children&&"function"!=typeof p.children&&p.children.length>0;!n&&o(r({},y,{node:p,searchQuery:a}))&&(c===i&&(f=!0),c+=1,m=!0);let v=u;const E=r({},p);return x&&(E.children=E.children.map((e=>{const t=d({node:e,currentIndex:v+1,path:b});return t.node.expanded?v=t.treeIndex:v+=1,(t.matches.length>0||t.hasFocusMatch)&&(g=[...g,...t.matches],t.hasFocusMatch&&(f=!0),(l&&t.matches.length>0||(l||s)&&t.hasFocusMatch)&&(E.expanded=!0)),t.node}))),n||E.expanded||(g=g.map((e=>r({},e,{treeIndex:null})))),m&&(g=[r({},y,{node:E}),...g]),{node:g.length>0?E:p,matches:g,hasFocusMatch:f,treeIndex:v}},p=d({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:p.matches,treeData:p.node.children}}n.d(t,{o5:()=>i,_p:()=>c,Vk:()=>p,Gm:()=>u,ZF:()=>h,Lf:()=>m,Pg:()=>f,SG:()=>b,hh:()=>y,sE:()=>x,ZP:()=>v});const v={find:x,getDepth:y,isDescendant:b,getTreeFromFlatData:function(e){let{flatData:t,getKey:n=(e=>e.id),getParentKey:a=(e=>e.parentId),rootKey:o="0"}=e;if(!t)return[];const i={};if(t.forEach((e=>{const t=a(e);t in i?i[t].push(e):i[t]=[e]})),!(o in i))return[];const l=e=>{const t=n(e);return t in i?r({},e,{children:i[t].map((e=>l(e)))}):r({},e)};return i[o].map((e=>l(e)))},getFlatDataFromTree:f,insertNode:m,addNodeUnderParent:function(e){let{treeData:t,newNode:n,parentKey:a=null,getNodeKey:o,ignoreCollapsed:l=!0,expandParent:s=!1,addAsFirstChild:c=!1}=e;if(null===a)return c?{treeData:[n,...t||[]],treeIndex:0}:{treeData:[...t||[],n],treeIndex:(t||[]).length};let p=null,u=!1;const h=d({treeData:t,getNodeKey:o,ignoreCollapsed:l,callback:e=>{let{node:t,treeIndex:o,path:d}=e;const h=d?d[d.length-1]:null;if(u||h!==a)return t;u=!0;const g=r({},t);if(s&&(g.expanded=!0),!g.children)return p=o+1,r({},g,{children:[n]});if("function"==typeof g.children)throw new Error("Cannot add to children defined by a function");let m=o+1;for(let e=0;e<g.children.length;e+=1)m+=1+i({node:g.children[e],ignoreCollapsed:l});return p=m,r({},g,{children:c?[n,...g.children]:[...g.children,n]})}});if(!u)throw new Error("No node found with the given key.");return{treeData:h,treeIndex:p}},getNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e,o=null;try{u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:e=>{let{node:t,treeIndex:n}=e;return o={node:t,treeIndex:n},t}})}catch(e){}return o},removeNode:h,removeNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e;return u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:null})},changeNodeAtPath:u,toggleExpandedForAll:p,map:d,walk:c,getVisibleNodeInfoAtIndex:function(e){let{treeData:t,index:n,getNodeKey:r}=e;if(!t||t.length<1)return null;const a=o({targetIndex:n,getNodeKey:r,node:{children:t,expanded:!0},currentIndex:-1,path:[],lowerSiblingCounts:[],isPseudoRoot:!0});return a.node?a:null},getVisibleNodeCount:function(e){let{treeData:t}=e;const n=e=>e.children&&!0===e.expanded&&"function"!=typeof e.children?1+e.children.reduce(((e,t)=>e+n(t)),0):1;return t.reduce(((e,t)=>e+n(t)),0)},getDescendantCount:i}},11013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(94079),s=n(87918),c=n.n(s),d=n(71153),p=n.n(d),u=n(17440);const h=(0,n(79692).Z)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}});var g=n(70687),m=n(59431),f=n(7154),b=n(26579),y=n(81077),x=n(91262);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=e=>{let{connection:t,modifiedEntity:n,allModifiedEntities:o,dispatch:i,config:s,mode:d,metadata:E,globalSearchRequestOptions:w,error:T}=e;const{relationUri:P,relationType:I,direction:O}=t.relation,C=t.isNew,D=h(),{inRelations:k=[],outRelations:S=[]}=(0,r.useMemo)((()=>(0,g.ocC)({content:t.parentEntityUri?s.contentSecondLevel:s.content,direction:O,relationType:I,mode:d,metadata:E})),[s,O,I,d,E,t.parentEntityUri]),N=(0,r.useMemo)((()=>(0,g.xF8)(E,I)),[I,E]),R=(0,r.useMemo)((()=>v({attributes:v({},m.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,g.p2l)(t.relation))),[t]),_=(0,r.useRef)(t),L=(0,r.useRef)(n),M=(0,r.useMemo)((()=>(0,g.SAs)(o,n)),[o,n]),j=(0,r.useRef)([]);(0,r.useEffect)((()=>{j.current=(0,u.pipe)((0,u.concat)(M.map((0,u.prop)("uri"))),u.uniq)(j.current)}),[M]);const A=(0,r.useRef)(M),V=(0,g.z7d)(k,S),U=_.current!==t||L.current!==n||(F=A.current,B=M,F.length!==B.length||F.some(((e,t)=>F[t]!==B[t])))||t.isNew&&!(0,g.O27)((0,u.path)(["relation","object","attributes"],t));var F,B;const Z=C?m.N5.relations.actions.addRelation:m.N5.relations.actions.editRelation,z=(0,r.useCallback)((0,u.pipe)(m.N5.relations.actions.setRelationType(s.id,P),i),[s,P,i]),H=(0,r.useCallback)((()=>(0,u.pipe)(m.N5.relations.actions.closeRelationEditor,i)(s.id,P)),[s,P,i]),W=(0,r.useCallback)((e=>{if(n){const t=(0,g.nt9)(E,n.type);return(0,g.wx9)(t,n,e)}return e}),[n,E]),q=(0,r.useCallback)((e=>i(m.N5.modifiedEntities.actions.entityCreated(e))),[i]),G=(0,r.useCallback)((e=>i(m.N5.modifiedEntities.actions.entityDeleted(e))),[i]),K=(0,r.useCallback)((e=>{n&&G(n.uri),i(m.N5.relations.actions.setRelationEntity(s.id,P,e)),T&&i(m.N5.errors.actions.errorDeactivated((0,g.iFp)(T)))}),[s.id,P,i,n,G,T]),Y=(0,r.useCallback)((()=>{const e=(0,g.Bd_)(E,o,t);return i(m.N5.errors.actions.errorsSet(e)),0===e.length}),[t,E,o,i]),$=(0,r.useCallback)((()=>i(m.N5.errors.actions.errorsSet([]))),[i]),Q=(0,r.useCallback)((0,u.pipe)((0,u.always)(t),(0,u.when)(Y,(0,u.pipe)(g.zhn,W,Z(s.id),i,(0,u.always)((0,u.differenceWith)(u.equals,j.current,M.map((0,u.prop)("uri")))),(0,u.forEach)(G),H))),[t,s,i,W,Y,M]),X=(0,r.useCallback)((()=>{const e=L.current;n!==e&&(e?(q(e),n&&n.uri!==e.uri&&G(n.uri)):G(n.uri));const t=A.current;(0,u.differenceWith)(u.equals,j.current,t.map((0,u.prop)("uri"))).forEach(G),t.forEach(q),$(),H()}),[H,q,G,$,n]),J=(0,r.useCallback)((e=>(0,u.pipe)(m.N5.actions.addAttributes,i)(e.map((e=>v({},e,{viewId:s.id}))))),[s.id,i]),ee=(0,r.useCallback)((e=>(0,u.pipe)(m.N5.actions.modifyAttribute,i)(v({},e,{viewId:s.id}))),[s.id,i]),te=(0,r.useCallback)((e=>(0,u.pipe)(m.N5.actions.removeAttribute,i)(v({},e,{viewId:s.id}))),[s.id,i]),ne=(0,r.useCallback)(((e,t)=>{const n=(0,g.nt9)(E,e),r=(0,u.pipe)(g.wcJ,(0,g._kX)(d))(n),a=(0,g.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:E,mode:d});K(a),q(a)}),[q,K,d,E]),re=(0,g.e$p)(T),ae=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=s;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[s,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:D.editor},a().createElement(l.Typography,{className:D.title},C?c().text("Add new item"):c().text("Edit item")),null===V&&a().createElement(f.Z,{className:D.item,relation:t.relation,inRelationTypes:k,outRelationTypes:S,onChange:z}),Boolean(I)&&a().createElement(a().Fragment,null,a().createElement(b.Z,{errorMessage:re},a().createElement(y.Z,{className:p()(D.item,{[D.dense]:re||t.entity&&(0,g.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:ae()||[],max:s.max||20,globalSearchRequestOptions:w,mode:d,onChange:K,onCreate:ne,metadata:E,attributeTypesSelectionStrategy:g.wcJ})),a().createElement(x.Z,{className:D.item,attrTypes:N,entity:R,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:d,parentUri:P,onAddAttributes:J,onChangeAttribute:ee,onDeleteAttribute:te}))),a().createElement("div",{className:D.actionButtons},a().createElement(l.Button,{onClick:X},c().text("Cancel")),a().createElement(l.Button,{color:"primary",disabled:!U,onClick:Q},c().text("Apply"))),a().createElement(l.Divider,null))};w.propTypes={connection:g.Rjq,modifiedEntity:g.pyR,allModifiedEntities:i().object,dispatch:i().func,config:g.PiC,mode:i().string,metadata:g.pGS,globalSearchRequestOptions:i().object,error:g.wfT,parentEntityUri:i().string};const T=w;const P=(0,n(52730).connect)(((e,t)=>{const n=(r=t,m.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(0,g.ZiX)(n);return{modifiedEntity:a?m.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:a?m.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:m.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,g.ATu)(t.connection,m.ZP.selectors.getProfileErrors(e))}}))(T)},67268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),l=n(66244),s=n.n(l),c=n(44443),d=n(17440),p=n(71153),u=n.n(p);function h(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const g=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:i,minHeight:l,maxWidth:s,maxHeight:c,isStatic:d}=e;return{x:t,y:n,w:r,h:a,minW:i,minH:l,maxW:s,maxH:c,i:o,static:d}},m=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:i,minH:l,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:i,minHeight:l,maxWidth:o,maxHeight:s,id:c,isStatic:h(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},f=e=>(e||[]).map(m),b=(0,d.curry)(((e,t)=>(e||[]).find((0,d.propEq)("id",t)))),y=(0,d.curry)(((e,t,n)=>(0,d.mergeAll)([n,(0,d.pick)(e,t)]))),x=(0,d.curry)(((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.prop)("id"),b(t),(0,d.defaultTo)({}),y(e,d.__,n))(n)))));var v=n(79692),E=n(70687);const w=(0,v.Z)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.cssTransforms":{transitionProperty:"transform"},"&.resizing":{zIndex:9,willChange:"width, height",pointerEvents:"none"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"17px",height:"17px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,E.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}}})));function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:l,LayoutItem:p,onRemove:h,onDrop:y,droppingItem:v,isDroppable:E,classes:I}=e;const O=(0,o.useRef)(),C=w(),[D,k]=(0,o.useState)(null),[S,N]=(0,o.useState)(0),{cols:R,rowHeight:_,margin:L}=r,M=(0,o.useMemo)((()=>(e=>(e||[]).map(g))(n)),[n]),j=(0,d.pipe)(f,x(["autosizing"],n),a),A=(0,o.useCallback)((e=>k((t=>t?null:e))),[]),V=null!==D,U=(0,o.useCallback)(((e,t)=>{let o=!1;const i=n.map((n=>{if(n.id===t&&e){const t=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(e,r);if(n.height!==t)return o=!0,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e}({},n,{minHeight:t,maxHeight:t,height:t})}return n}));o&&a(i)}),[n,r,a]);return i().createElement(i().Fragment,null,i().createElement(c.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>N(e)}),i().createElement(s(),{innerRef:O,layout:M,cols:R,draggableHandle:l,autoSize:!0,rowHeight:_,width:S,margin:L,onLayoutChange:j,isResizable:!V,isDraggable:!V,className:u()(I.root,C.gridLayout,{[C.gridFullscreen]:V}),onDrop:(e,t,n)=>{y&&y(f(e),m(t),n)},droppingItem:v,isDroppable:E},M.map((e=>{const r=D===e.i,a=(b(n,e.i)||{}).autosizing?{AutosizeComponent:(o=e.i,i().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>{U(t,o)}}))}:{};var o;return i().createElement(p,T({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:A,onRemove:h,className:u()({fullscreen:r},I.item),isFullscreen:r},a))}))))};I.defaultProps={layoutOptions:{cols:4,rowHeight:30,margin:[15,15]},onConfigChanged:d.identity,onLayoutChanged:d.identity,classes:{}},I.propTypes={views:a().array,layout:a().array,layoutOptions:a().object,onConfigChanged:a().func,onLayoutChanged:a().func,onDrop:a().func,onRemove:a().func,LayoutItem:a().elementType,draggableHandle:a().string,isDroppable:a().bool,droppingItem:a().object,classes:a().shape({root:a().string,item:a().string})};const O=(0,o.memo)(I)},48747:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Z});var r=n(24328),a=n.n(r),o=n(17440),i=n(17871),l=n(75047);const s=e=>{let{children:t,className:n,position:a,map:o}=e;const[i,s]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),s(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{i&&n&&i.classList.add(n)}),[n,i]),i?(0,l.createPortal)(t,i):null};var c=n(87918),d=n.n(c),p=n(94079),u=n(83348),h=n(41039),g=n(97090);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}const f=e=>a().createElement("svg",m({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const y=e=>a().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var x=n(79692);const v=(0,x.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),E=(0,u.Z)(p.Button),w=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:i}=e;const l=v(),s=e=>()=>{o(e)};return a().createElement("div",{className:l.container},t||r?a().createElement(E,{tooltipTitle:d().text("Clear area"),className:l.button,onClick:r?i:s(null)},a().createElement(h.Z,{className:l.icon})):n.map((e=>{const t=(e=>{switch(e){case g.vl.CIRCLE:return f;case g.vl.POLYGON:return y;default:return null}})(e);return a().createElement(E,{tooltipTitle:d().text("Draw area"),key:e,className:l.button,onClick:s(e)},a().createElement(t,{className:l.icon}))})))},T=(0,x.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),P=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=T();return a().createElement(p.FormControlLabel,{classes:{root:r.container,label:r.label},control:a().createElement(p.Checkbox,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:d().text("Search as I move the map")})},I=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),i=r.lat(),l=r.lng(),s=[],c=[];if(!(180===o&&-180===l||-180===o&&180===l)){const e=t.getCenter();s.push([a,e.lng()]),c.push([i,e.lng()])}return[[a,o],...s,[a,l],[i,l],...c,[i,o]]},O=e=>{switch(e){case g.vl.CIRCLE:return window.google.maps.drawing.OverlayType.CIRCLE;case g.vl.POLYGON:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},C=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var D=n(93517),k=n(66130),S=n(70687),N=n(91676);const R=(0,x.Z)({popper:{maxWidth:"263px",minWidth:"150px",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)",backgroundColor:"white",borderRadius:"2px"}});function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}const L=(0,S.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),M=(0,S.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),j=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=R(),c=(0,r.useRef)(),[d,p]=(0,r.useState)(!1),{activeEntityUri:u}=(0,r.useContext)(N.P),h=(0,o.pathEq)(["entity","uri"],u,t),g={lat:t.point.lat,lng:t.point.lng},m=(0,r.useCallback)((0,S.DsO)(p,50),[]),f=(0,r.useCallback)((()=>m(!0)),[m]),b=(0,r.useCallback)((()=>m(!1)),[m]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(k.Z,{anchorEl:c.current,open:d,className:s.popper,modal:!1,placement:"top"},a().createElement(D.Z,{entity:t.entity,onMouseOver:f,onMouseOut:b})),a().createElement(i.Jx,_({icon:{url:d||h?L:M,scaledSize:new google.maps.Size(22,32)},position:g,onClick:y,visible:!1!==t.visible,onMouseOver:f,onMouseOut:b},l)),a().createElement(i.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))})),A=(0,x.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});var V=n(30634);function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){F(e,t,n[t])}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const B=["drawing"],Z=e=>{let{markers:t=[],mapKey:n,defaultZoom:l,defaultCenter:c,loadingElement:d,isSearchOnMapMove:p,isSearchEnabled:u,activeOverlay:h,overlayOptions:m,drawingModes:f=[],markerClusterer:b,markerClustererOptions:y,mapOptions:x,mapContainerClassName:v,onMapBoundsChanged:E,onOverlayUpdated:T,onMarkerClicked:D}=e;const k=A(),{isLoaded:S,loadError:N}=(0,i.Ji)({googleMapsApiKey:n,libraries:B}),R=(0,r.useRef)(null),[_,L]=(0,r.useState)(null),[M,F]=(0,r.useState)(null),[Z,z]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const i=(0,V.D)(t),l=(0,V.D)(n),s=o&&window.google;(0,r.useEffect)((()=>{s&&!a&&t.length&&t!==i?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+g.Pi,e.lng()+g.Pi)),r.extend(new window.google.maps.LatLng(e.lat()-g.Pi,e.lng()-g.Pi))}t.fitBounds(r),n&&C(t,n,r)})(t,o,n):s&&n&&n!==l&&C(o,n)}),[o,t,n])})({markers:t,activeOverlay:h,map:_,isSearchOnMapMove:p});const H=(0,r.useMemo)((()=>U({},g.r,m||{})),[m]),W=(0,r.useMemo)((()=>U({},g.Q3,x||{})),[x]),q=(0,r.useCallback)((e=>{E(e?I(_):null),z(null),clearTimeout(R.current)}),[_,E]),G=(0,r.useCallback)((()=>{clearTimeout(R.current)}),[]),K=(0,r.useCallback)((()=>{p&&E(I(_))}),[p,_,E]),Y=(0,r.useCallback)((()=>{p&&(clearTimeout(R.current),R.current=setTimeout(K,1e3))}),[K,p]),$=(0,r.useCallback)(((e,t)=>{const n=t||M&&{type:g.vl.POLYGON,overlay:M};if(!(0,o.isEmpty)(n)&&"function"==typeof T){const{overlay:e,type:t}=n,r={[g.vl.POLYGON]:()=>e.getPath().getArray().map((e=>[e.lat(),e.lng()])),[g.vl.CIRCLE]:()=>({radius:e.getRadius()/1e3,center:e.getCenter()})},a=r[t]&&r[t]();a&&T({data:a,type:t})}}),[T,M]),Q=(0,r.useCallback)((e=>t=>{$(null,{type:e,overlay:t}),t.setMap(null),z(null)}),[$]),X=(0,r.useCallback)((()=>{T(null)}),[T]),J=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(j,{key:t.id,marker:t,clusterer:e,onClick:D})));return N?null:S?a().createElement(i.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:W,onLoad:L,zoom:l,center:c,onZoomChanged:G,onDragStart:G,onIdle:Y,mapContainerClassName:v},_&&u&&Boolean(f.length)&&a().createElement(s,{className:k.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:_},a().createElement(w,{hasActiveOverlay:!!h,drawingModes:f,drawingMode:Z,onDrawingModeChanged:z,onClearOverlay:X})),_&&u&&a().createElement(s,{className:k.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:_},a().createElement(P,{onChangeIsSearchOnMapMove:q,isSearchOnMapMove:p})),b?(ee=y,a().createElement(i.XL,{options:ee},J)):J(),!O(Z)&&h&&(0,o.propEq)("type",g.vl.POLYGON,h)&&a().createElement(i.mg,{onLoad:F,path:h.path,editable:!0,options:H,onMouseUp:$,onDragEnd:$}),u&&Boolean(f.length)&&a().createElement(i.j_,{onPolygonComplete:Q(g.vl.POLYGON),onCircleComplete:Q(g.vl.CIRCLE),drawingMode:O(Z),options:{drawingControl:!1,circleOptions:H,polygonOptions:H}})):d;var ee}},30553:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o);const l=e=>{let{height:t,margin:n}=e;return i().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};l.propTypes={height:a().number,margin:a().number};const s=l},8962:(e,t,n)=>{"use strict";n.d(t,{Z:()=>N});var r=n(52730),a=n(59431),o=n(24328),i=n.n(o),l=n(70687),s=n(71153),c=n.n(s),d=n(87918),p=n.n(d),u=n(94079),h=n(60995),g=n(10237),m=n(93416),f=n(80931),b=n(8261),y=n(79692);const x=(0,y.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),v=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:d="",excludeUris:y=[],includeUris:v=[],attributesCount:E=16}=e;const w=x(),T=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),P=(0,o.useMemo)((()=>(0,b.U)(s,n.type,v,y)),[y,v,s,n.type]),I=(0,l.fyF)(P,n).filter((e=>{let{values:t}=e;return!(0,l.O27)(t)})).length>0;return I||!(0,l.O27)(d)?i().createElement(h.J.Provider,{value:T},i().createElement(g.Z,{className:t},d&&i().createElement(m.Z,{className:w.header,title:d}),i().createElement(u.Box,{className:c()(w.attributesContainer,{[w.noCaption]:!d})},I?i().createElement(f.Z,{entity:n,attrTypes:P,parentUri:n.uri,drawLines:!1,max:E}):i().createElement(u.Typography,{className:w.noData},p().text("No data found"))))):null}));var E=n(17440),w=n(91262),T=n(39450),P=n(66784);const I=(0,y.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){C(e,t,n[t])}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:d,caption:p="",excludeUris:h=[],includeUris:f=[],pinnedAttributes:y}=e;const x=I(),v=(0,r.useDispatch)(),C=(0,o.useContext)(T.m),D=(0,r.useSelector)(a.ZP.selectors.getUserRoles),k=(0,o.useMemo)((()=>(0,l.mC3)(y,D)),[y,D]),S=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),N=(0,o.useMemo)((()=>(0,b.U)(d,S.type,f,h)),[h,f,d,S.type]),R=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>O({},e,{viewId:C}))))),[C,v]),_=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.modifyAttribute,v)(O({},e,{viewId:C}))),[C,v]),L=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.removeAttribute,v)(O({},e,{viewId:C}))),[C,v]);return i().createElement(g.Z,{className:t},p&&i().createElement(m.Z,{className:x.header,title:p}),i().createElement(u.Box,{className:c()(x.attributesContainer,{[x.noCaption]:!p})},i().createElement(P.c.Provider,{value:k},i().createElement(w.Z,{entity:S,attrTypes:N,parentUri:S.uri,drawLines:!1,mode:s,showEmptyEditors:(0,l.ZiX)(S.uri),crosswalks:S.crosswalks,onAddAttributes:R,onChangeAttribute:_,onDeleteAttribute:L}))))}));var k=n(3185);function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}const N=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=l.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return i().createElement(k.u.Provider,{value:a},(0,l.uzs)(t)?i().createElement(v,S({attributesCount:n,entity:a},o)):i().createElement(D,S({mode:t,pinnedAttributes:r,entity:a},o)))}))},76536:(e,t,n)=>{"use strict";n.d(t,{u:()=>p});var r=n(24328),a=n(52730),o=n(17440),i=n(70687),l=n(59431);const s={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:i.VGB,refRelation:i.VGB}),d=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,p=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(l.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(l.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(l.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(l.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=i.nwO.HistoryManager.createHistoryManager(i.nwO.AttributesDiff).computeEntityHistoryDiff(d(o===l.Z9.Current?c:r),d(n));e(l.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||s}},34120:(e,t,n)=>{"use strict";n.d(t,{s:()=>tt});var r=n(24328),a=n.n(r),o=n(70687),i=n(71153),l=n.n(i),s=n(73272),c=n(87918),d=n.n(c),p=n(94079),u=n(79692);const h=(0,u.Z)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}})));var g=n(58241),m=n(24737),f=n(5434);const b=e=>{let{taskId:t,assignee:n,isTaskOpen:r}=e;const{assignee:o,getAssignees:i,updateAssignee:l,updateRequestIsInProgress:s,readOnly:c}=(0,f.r)({taskId:t,assignee:n,isOpen:r}),p=s||c;return a().createElement(m.Z,{isDisabled:p,getOptions:i,onChange:l,hideSelectedOptions:!1,label:d().text("Assigned to"),value:o,defaultOptions:!0,TextFieldProps:{disabled:p},height:40})};var y=n(17440);const x=(0,u.Z)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}});var v=n(8459),E=n(52730),w=n(59431),T=n(85229),P=n(94150),I=n(75813),O=n(22994),C=n(21380);const D=e=>{let{taskId:t,dueDate:n,isTaskOpen:i,className:s}=e;const c=x(),{updateDueDate:p,updateRequestIsInProgress:u,readOnly:h}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(P.O)||{},l=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),s=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,E.useSelector)(w.ZP.selectors.getTenant),d=(0,T._)(),[p,u]=(0,r.useState)(!1),h=(0,O.Z)()("UPDATE_TASK")&&(0,C.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{l&&h&&n&&e&&t!==e&&(u(!0),d((0,o.KF3)({taskId:n,workflowPath:l,environment:s,tenant:c,dueDate:e})).then((()=>{null==i||i(n,{dueDate:e})})).catch(I.R).finally((()=>{u(!1)})))}),[l,n,s,c,i,d,t,h]),updateRequestIsInProgress:p,readOnly:!h}})({dueDate:n,taskId:t,isOpen:i});return a().createElement(v.Z,{className:l()(c.dueDate,s),disabled:u||h,value:n,label:d().text("Due date"),onChange:(0,y.pipe)((e=>e&&e.getTime()),p),margin:"dense",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}})},k=e=>{let{taskId:t,priority:n,isTaskOpen:i,className:l}=e;const{priorities:s,updatePriority:c,updateRequestIsInProgress:p,readOnly:u}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(P.O)||{},l=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),s=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,E.useSelector)(w.ZP.selectors.getTenant),p=(0,T._)(),[u,h]=(0,r.useState)(!1),g=(0,O.Z)()("UPDATE_TASK")&&(0,C.tg)(a),m=(0,r.useCallback)((e=>{const{value:r}=e;l&&g&&n&&t!==r&&(h(!0),p((0,o.ax9)({taskId:n,workflowPath:l,environment:s,tenant:c,priority:r})).then((()=>{null==i||i(n,{priority:r})})).catch(I.R).finally((()=>{h(!1)})))}),[l,n,s,c,i,p,t,g]);return{priorities:(0,r.useMemo)((()=>[{label:d().text("Low"),value:o.NVC.low},{label:d().text("Medium"),value:o.NVC.medium},{label:d().text("High"),value:o.NVC.high},{label:d().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:m,updateRequestIsInProgress:u,readOnly:!g}})({taskId:t,priority:n,isOpen:i}),h=p||u;return a().createElement(m.Z,{className:l,isDisabled:h,options:s,onChange:c,hideSelectedOptions:!1,label:d().text("Priority"),value:s.find((0,y.propEq)("value",n)),TextFieldProps:{disabled:h},height:40})};var S=n(89140),N=n(43054),R=n(39450),_=n(55847),L=n(22385);const M=e=>{let{taskId:t,possibleActions:n,assignee:i,isTaskOpen:l}=e;const{actions:s,actionRequestIsInProgress:c}=(e=>{let{possibleActions:t,assignee:n,taskId:a,isOpen:i}=e;const{loadWorkflowTasks:l}=(0,r.useContext)(P.O)||{},s=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),c=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),d=(0,E.useSelector)(w.ZP.selectors.getTenant),p=(0,E.useSelector)(w.ZP.selectors.getUserName),u=(0,E.useSelector)(w.ZP.selectors.getEntityUri),[h,g]=(0,r.useState)(!1),m=(0,r.useContext)(R.m),f=(0,E.useDispatch)(),b=(0,r.useCallback)((e=>()=>{s&&a&&(g(!0),(0,o.TZ_)({taskId:a,workflowPath:s,environment:c,tenant:d,action:e}).then((()=>{"Delete"===e?f(w.ui.actions.entityDeletionFinished()):(f(w.N5.entity.actions.loadEntity({viewId:m,uri:u})),null==l||l())})).catch(I.R).finally((()=>{g(!1)})))}),[s,a,c,d,f,u,m,l]);return{actions:(0,r.useMemo)((()=>p===n&&(0,C.tg)(i)?(t||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:b(t)}})):[]),[t,b,p,n,i]),actionRequestIsInProgress:h}})({taskId:t,possibleActions:n,assignee:i,isOpen:l});return s.length>0?a().createElement(_.Z,{buttonComponent:L.Z,buttonProps:{icon:N.Z,size:"L",disabled:c},menuId:"workflow-actions",menuItems:s}):null},j=(0,u.Z)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}}),A=e=>{let{className:t,children:n,plain:r,first:o,last:i,transparent:s,divider:c}=e;const d=j();return a().createElement("div",{className:l()(t,d.decorator)},a().createElement("div",{className:l()(d.lineBlock,{[d.withLinePadding]:o})},!s&&a().createElement(a().Fragment,null,a().createElement("div",{className:d.noLine}),a().createElement("div",{className:l()(d.line,{[d.plain]:r},{[d.last]:i})}))),a().createElement("div",{className:d.content},n,c&&a().createElement(p.Divider,{className:d.rowDivider,light:!0,variant:"inset"})))};let V={};const U=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let F=0;function B(){return B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(this,arguments)}const Z=e=>a().createElement("svg",B({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"}))),z=e=>{let{task:t,children:n,actions:o,Icon:i}=e;const{taskId:c,dueDate:u,priority:m,assignee:f,createdBy:y,createTime:x,displayName:v,processDefinitionDisplayName:E,objectURIs:w,processInstanceComments:T,possibleActions:P,isOpen:I}=t,N=(0,C.Xs)(w),R=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return V[n]||(V[n]=U[F],F++,F>U.length-1&&(F=0)),V[n]})({processDefinitionDisplayName:E}),_=h({color:R}),[L,j]=(0,r.useState)(!1),B=(0,O.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS");return a().createElement("div",{className:_.card},a().createElement("div",{className:l()({[_.withBackground]:L})},a().createElement("div",{className:_.lineWrapper},a().createElement("div",{className:_.line}),i&&a().createElement(i,{className:_.icon}),a().createElement(A,{plain:!0,first:!0,transparent:!L},a().createElement("div",{className:_.mainInfo},a().createElement("div",{className:_.title},a().createElement("div",{className:l()(_.caption,_.flex)},E),a().createElement(s.Z,{className:_.flag}),a().createElement(p.Tooltip,{title:d().text("Due date")},a().createElement("span",{className:_.date},d().date(u,"L"))),a().createElement(g.Z,{isOpen:L,size:"L",onClick:()=>{j(!L)}})),a().createElement("div",{className:_.infoBlock},a().createElement("div",{className:_.flex},N&&a().createElement("div",{className:_.info},d().text("DCR ID"),": ",a().createElement("span",{className:_.infoValue},N)),a().createElement("div",{className:_.info},d().text("Created by"),": ",a().createElement("span",{className:_.infoValue},y)," ",d().text("on")," ",a().createElement("span",{className:_.infoValue},d().date(x,"L"))),a().createElement("div",{className:_.info},d().text("Step"),": ",a().createElement("span",{className:_.infoValue},v)),B&&(null==T?void 0:T.length)>0&&a().createElement("div",{className:_.commentsInfo},a().createElement(Z,{className:_.commentsIcon}),a().createElement("div",{className:_.infoValue},T.length))),o||a().createElement(M,{taskId:c,possibleActions:P,assignee:f,isTaskOpen:I}))))),L&&a().createElement(A,{plain:!0},a().createElement("div",{className:_.controlsBox},a().createElement("div",{className:_.controlsInRow},a().createElement(D,{taskId:c,dueDate:u,isTaskOpen:I}),a().createElement(k,{taskId:c,priority:m,className:_.priority,isTaskOpen:I})),a().createElement(b,{taskId:c,assignee:f,isTaskOpen:I})))),L&&a().createElement(a().Fragment,null,n,B&&a().createElement("div",{className:_.comments},a().createElement(S.V,{taskId:c,processInstanceComments:T,isTaskOpen:I}))))};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(this,arguments)}const W=e=>a().createElement("svg",H({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));let q,G;!function(e){e.ADDED="added",e.EDITED="edited",e.DELETED="deleted",e.PINNED="pinned",e.IGNORED="ignored",e.PIN_DELETED="pin_deleted",e.IGNORE_DELETED="ignore_deleted"}(q||(q={})),function(e){e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.PIN_ATTRIBUTE="PIN_ATTRIBUTE",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e.CREATE_ENTITY="CREATE_ENTITY",e.CREATE_RELATIONSHIP="CREATE_RELATIONSHIP",e.UPDATE_TAGS="UPDATE_TAGS",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.DELETE_RELATIONSHIP="DELETE_RELATIONSHIP"}(G||(G={}));var K=n(8261);const Y=(e,t)=>{switch(e){case G.CREATE_RELATIONSHIP:case G.INSERT_ATTRIBUTE:return q.ADDED;case G.UPDATE_TAGS:case G.UPDATE_ROLES:case G.UPDATE_ATTRIBUTE:return q.EDITED;case G.DELETE_ATTRIBUTE:case G.DELETE_RELATIONSHIP:return q.DELETED;case G.PIN_ATTRIBUTE:return null!=t&&t.pin?q.PIN_DELETED:q.PINNED;case G.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?q.IGNORE_DELETED:q.IGNORED}},$=e=>({[q.ADDED]:d().text("added"),[q.EDITED]:d().text("edited"),[q.DELETED]:d().text("deleted"),[q.PINNED]:d().text("pinned"),[q.PIN_DELETED]:d().text("pin deleted"),[q.IGNORED]:d().text("ignored"),[q.IGNORE_DELETED]:d().text("ignore deleted")}[e]||""),Q=(e,t)=>(0,y.when)((0,y.allPass)([(0,y.pipe)((0,y.prop)("type"),(0,y.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,y.evolve)({type:(0,y.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){J(e,t,n[t])}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ee=(e,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,y.pathOr)([],["value",t.name])(n),i=(0,y.pathOr)([],["value",t.name])(r),l=Math.max(o.length,i.length);return(0,y.times)((e=>[{value:{newValue:o[e],oldValue:i[e],type:a}}]),l)}const n=e[t.name];return n?[n]:[]},te=(0,y.curry)(((e,t,n)=>{const r=(0,K.U)(e,t.type,[],[]);return re(e,r,n)})),ne=(0,y.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),i=(0,o.xF8)(e,t.type);return(0,y.flatten)([X({level:1,label:(0,y.propOr)("","label",a),attributeType:a,attributeValue:X({},t,n)},((e,t)=>{if(t===G.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=Y(t);return e?{operation:e}:{}}return{}})(n,r)),re(e,i,n,2)])})),re=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,y.flatten)(t.map((t=>ee(n,t).map((n=>n.map((n=>ae(e,t,n,r))))))).filter((0,y.complement)(y.isEmpty)))},ae=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return oe(e,t,n,r);case o.oS0.TYPE_REFERENCE:return ie(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,y.is)(Object,n)?n:{newValue:t,type:G.INSERT_ATTRIBUTE}})(t,n);return le(t,e,r)}}},oe=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},re(e,a,n.value,r+1)]},ie=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},re(e,a,n.value,r+1)]},le=(e,t,n)=>{const{newValue:r,oldValue:a,type:o}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===G.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:Y(o,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ce(e,t,n[t])}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const de=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],pe=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),i=a(t),l=a(n);return i&&l?[{type:G.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:i?[{type:G.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:l?[{type:G.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},ue=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,i=a===G.UPDATE_ROLES?(0,o.xqc)(e):y.identity,l=(0,y.difference)(n,r),s=(0,y.difference)(r,n),c=[];return l.length&&c.push({type:G.INSERT_ATTRIBUTE,newValue:{value:l.map(i).join(", ")}}),s.length&&c.push({type:G.DELETE_ATTRIBUTE,oldValue:{value:s.map(i).join(", ")}}),c},he=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,i=t===G.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,i].join("/")}return i})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var i;const n=r[e],o=r[e+1],l=(a[n]||[]).find((0,y.propEq)("id",o)),s=r.length===e+2?t:{},c=l||{id:o,value:s},d=(null===(i=t.refObjectURI)||void 0===i?void 0:i.indexOf(o))>=0&&t.refObjectURI;d&&(c.refObjectURI=d),(0,y.isNil)(l)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},ge=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:i,tags:l,defaultProfilePicValue:s}=t,c=se({},n);return s&&(c.defaultProfilePicValue=[s]),i&&(c[o.xPW.roles.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:i.map((0,o.xqc)(e)).join(", ")}}]),l&&(c[o.xPW.tags.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:l.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},me=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case G.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case G.UPDATE_TAGS:r[o.xPW.tags.name]=ue(e,n);break;case G.UPDATE_ROLES:r[o.xPW.roles.name]=ue(e,n);break;case G.UPDATE_START_DATE:r[o.xPW.startDate.name]=pe(n);break;case G.UPDATE_END_DATE:r[o.xPW.endDate.name]=pe(n);break;case G.CREATE_RELATIONSHIP:case G.CREATE_ENTITY:return se({},r,ge(e,n.newValue));case G.INSERT_ATTRIBUTE:case G.UPDATE_ATTRIBUTE:case G.DELETE_ATTRIBUTE:case G.PIN_ATTRIBUTE:case G.IGNORE_ATTRIBUTE:he(r,n)}return r},fe=(0,u.Z)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),be=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const i=fe();return a().createElement(p.Link,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:i.linkLabel},n?d().text("View less suggestions"):d().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var ye=n(43525);const xe=(0,u.Z)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),ve=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:i}=e;const s=xe(),c=n||r;return a().createElement("div",{className:l()(s.field,i)},a().createElement("span",{className:s.fieldName},t,":"),!(0,y.isNil)(c)&&a().createElement("span",{className:s.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(ye.Z,{className:s.arrow}),r)),o&&a().createElement(p.Chip,{variant:"outlined",label:$(o),className:l()(s.chip,o)}))},Ee=a().createContext(null);Ee.displayName="AttributesChangesContext";var we=n(72768),Te=n(31039);const Pe=(0,u.Z)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),Ie=e=>{let{label:t,level:n,attributeType:i,attributeValue:s,oldValue:c,newValue:d,operation:p}=e;const u=Pe({level:n}),h=(0,E.useSelector)(w.ZP.selectors.getEntityUri),g=(0,r.useContext)(Ee),m=(0,r.useCallback)((()=>{if((0,o.YkG)(i)){const e=(0,y.when)((0,y.anyPass)([(0,y.hasPath)(["value","newValue"]),(0,y.hasPath)(["value","oldValue"])]),(0,y.ifElse)((0,y.hasPath)(["value","newValue"]),(0,y.path)(["value","newValue"]),(0,y.path)(["value","oldValue"])))(s);return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o[t.refObjectURI];return i?(a=n===i.startObjectUri?i.endObjectUri:i.startObjectUri,r=n===i.startObjectUri?i.endObjectLabel:i.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(i,e,h,g)}if("endObject"in i){const{endObjectUri:e,endObjectLabel:t}=s;return{objectUri:e,objectLabel:t}}}),[i,s,h,g]),f=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=m()||{};if(!(0,y.isNil)(e)&&!(0,y.isNil)(t)){var n;const r=!1===(null===(n=g[e])||void 0===n?void 0:n.isExist);return a().createElement(Te.Z,{value:e,className:l()(u.linkContainer,{[u.disabledLink]:r})},a().createElement("span",{className:l()(u.linkLabel,{[u.label]:r})},(0,o.idV)(t)))}return null}),[m,g,u]),b=(0,r.useMemo)((()=>a().createElement("span",null,t,f())),[t,f]),x=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(we.Z,{value:t,dataTypeDefinition:Q(i,t)})}),[i]);return a().createElement(ve,{className:u.change,label:b,oldValue:c&&x(c),newValue:d&&x(d),operation:p})},Oe=(0,u.Z)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ce.apply(this,arguments)}const De=e=>{let{changes:t}=e;const n=Oe();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,y.has)("level",e)?a().createElement(Ie,Ce({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},ke=(0,y.pipe)((0,y.filter)((0,y.has)("operation")),y.length),Se=(0,u.Z)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),Ne=e=>{let{changes:t,objectsInfo:n,entityInfo:i,relationsInfo:l,max:s}=e;const c=Se(),p=(0,E.useSelector)(w.ZP.selectors.getMetadata),[u,h]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,y.pipe)((0,y.pick)([t]),te(e,n)),i=(0,y.curry)(((e,t)=>(0,y.reduce)(((e,n)=>(0,y.concat)(e,n(t))),[],e))),l=(0,y.propOr)([],n.uri)(t).reduce(((t,r)=>me(e,n,r,t)),{}),s=r.map((n=>((e,t,n)=>(0,y.propOr)([],n.uri)(t).reduce(((t,r)=>me(e,n,r,t)),{}))(e,t,n)));return[i([(0,y.pipe)((0,y.omit)(de),te(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],l),(0,y.flatten)(r.map(((n,r)=>{const a=(0,y.path)([n.uri,0,"type"],t);return ne(e,n,s[r],a)})))]})(p,t,i,l)),[p,t,i,l]),g=(0,r.useMemo)((()=>{const e={label:d().text("Relationships")};return h.length>0?(0,y.flatten)([u,e,h]):u}),[u,h]),{isExpanded:m,onToggle:f,itemsToShow:b,collapsedSuggestionsCount:x}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),i=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),l=(0,r.useMemo)((()=>ke(e)),[e]),s=(0,r.useMemo)((()=>ke(i)),[i]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:i,collapsedSuggestionsCount:l-s}}(g,s);return a().createElement(Ee.Provider,{value:n},a().createElement("div",{className:c.container},a().createElement(Te.Z,{className:c.uri,value:(0,o.wwR)(i)},a().createElement("div",{className:c.label},(0,o.idV)(i.label))),a().createElement(De,{changes:b}),x>0&&a().createElement(be,{onClick:f,suggestionsCount:x,isExpanded:m,className:c.showMoreLink})))};function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_e(e,t,n[t])}))}return e}function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Le=(0,y.filter)((0,y.pipe)((0,y.prop)("uri"),o.WgC)),Me=(0,y.filter)((0,y.pipe)((0,y.prop)("uri"),o.bC9)),je=(e,t)=>(0,y.filter)((0,y.allPass)([(0,y.pipe)((0,y.prop)("uri"),o.bC9),(0,y.pipe)((0,y.prop)("startObjectUri"),(0,y.equals)(t))]))(e),Ae=(0,y.curry)(((e,t)=>({entity:t,relations:je(e,t.uri)}))),Ve=(0,y.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Re({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),Ue=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,y.pipe)((0,y.pathOr)([],[a,"relations"]),(0,y.concat)(r),y.uniq)(e);return e[a]={entity:n,relations:o},e};function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Be=e=>{let{task:t}=e;const{objectURIs:n}=t,i=(0,C.rc)(n),{dcr:l,groupedObjects:s}=(e=>{const[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(null),l=(0,T._)(),s=(0,r.useCallback)((e=>(0,y.isEmpty)(e)?Promise.resolve([]):l((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,y.pipe)(y.keys,(0,y.filter)((t=>(0,y.prop)([t],e))),(0,y.map)((e=>Re({},t[e],{uri:e}))))(t))(t,r),o=(0,y.pipe)(Le,(0,y.map)(Ae(a)))(a),l=(0,y.pipe)(Me,(0,y.map)(Ve(r)))(a),[c,d]=(0,y.partition)((0,y.has)("entity"),l),p=d.map((0,y.path)(["relations",0,"startObjectUri"]));s(p).then((e=>{const t=d.map(((t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Fe(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,y.pipe)(y.flatten,(0,y.reduce)(Ue,{}),y.values,n)([o,c,t])})).catch(I.R),i(e)})).catch(I.R)}),[e,s]),{dcr:a,groupedObjects:t}})(i);return a().createElement(z,{task:t,Icon:W},l&&s.map(((e,t)=>a().createElement(A,{key:t,last:t===s.length-1,divider:!0},a().createElement(Ne,{entityInfo:e.entity,relationsInfo:e.relations,changes:l.changes,objectsInfo:l.objectsInfo})))))},Ze=(0,u.Z)({pmCard:{marginLeft:"-15px"}});function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}const He=e=>a().createElement("svg",ze({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var We=n(28741),qe=n(49734);const Ge={showTransitiveMatches:!0,showInactiveEntities:!1},Ke=e=>{let{task:t}=e;const n=Ze(),{objectURIs:r}=t,o=(0,E.useSelector)(w.ZP.selectors.getEntity),i=(0,E.useSelector)(w.ZP.selectors.getMetadata),{matches:l,entitiesMap:s}=(0,We.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:Ge}),c=null==l?void 0:l.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(z,{task:t,Icon:He},c&&a().createElement(A,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(qe.M,{metadata:i,entity:o,match:c,entitiesMap:s}))))};function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}const $e=e=>a().createElement("svg",Ye({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function Qe(){return Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qe.apply(this,arguments)}const Xe=e=>a().createElement("svg",Qe({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class Je{}Je.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(Be,{task:t});case o.Yj_.potentialMatchReview:return a().createElement(Ke,{task:t});case o.Yj_.recommendForDelete:return a().createElement(z,{task:t,Icon:Xe});default:return a().createElement(z,{task:t,Icon:$e})}};const et=Je,tt=e=>{let{task:t}=e;return et.build({task:t})}},26789:(e,t,n)=>{"use strict";n.d(t,{G:()=>v});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(94079),s=n(65549),c=n(22994),d=n(31517),p=n(59431),u=n(70687),h=n(52730),g=n(94150),m=n(75813),f=n(79692);const b=(0,f.Z)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),y=e=>{let{anchorEl:t,onClose:n}=e;const o=b(),[s,c]=(0,r.useState)(""),[f,y]=(0,r.useState)(null),[x,v]=(0,r.useState)(!1),{definitions:E}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,h.useSelector)(p.ZP.selectors.getWorkflowPath),a=(0,h.useSelector)(p.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,h.useSelector)(p.ZP.selectors.getTenant),i=(0,h.useSelector)(p.ZP.selectors.getEntity).type;return(0,r.useEffect)((()=>{(0,u.IU6)({workflowPath:n,environment:a,tenant:o}).then((e=>{let{data:n}=e;return t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,i))}))}),[i,n,a,o]),{definitions:e}})(),{processInstance:w,loading:T}=(()=>{const{loadWorkflowTasks:e}=(0,r.useContext)(g.O),t=(0,h.useSelector)(p.ZP.selectors.getWorkflowPath),n=(0,h.useSelector)(p.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,h.useSelector)(p.ZP.selectors.getTenant),o=(0,h.useSelector)(p.ZP.selectors.getEntity).uri,[i,l]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,i)=>(l(!0),(0,u.$ju)({workflowPath:t,tenant:a,environment:n,processType:i,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,m.R)(e),e})).finally((()=>{l(!1)})))),[o,n,e,a,t]),loading:i}})(),P=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(l.Popover,{open:P,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(l.Typography,{className:o.title},i().text("Add new workflow")),a().createElement(d.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:i().text("Select task type"),value:f,onChange:e=>{y(e)},label:"",options:E.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(l.TextField,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:s,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(l.Button,{disabled:T,className:o.cancelButton,onClick:n},i().text("Cancel")),a().createElement(l.Button,{disabled:T,color:"primary",onClick:()=>{w(s,null==f?void 0:f.value).then((()=>{v(!0),c(""),y(null),n()})).catch((()=>{}))}},i().text("Start")))),a().createElement(l.Portal,{container:document.body},a().createElement(l.Snackbar,{open:x,autoHideDuration:5e3,onClose:()=>{v(!1)},message:i().text("A new workflow has started")})))},x=(0,f.Z)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),v=()=>{const e=x(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),d=o("START_PROCESS_INSTANCE"),p=o("VIEW_PROCESS_DEFINITIONS");return d&&p?a().createElement(a().Fragment,null,a().createElement(l.Button,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(s.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},i().text("Add"))),a().createElement(y,{anchorEl:t,onClose:()=>n(null)})):null}},61756:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(17440),i=n(59431),l=n(70687),s=n(85229),c=n(22994);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},h=(0,s._)(),g=(0,a.useSelector)(i.ZP.selectors.getWorkflowPath),m=(0,a.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(i.ZP.selectors.isWorkflowEnabled),b=(0,a.useSelector)(i.ZP.selectors.getTenant),y=(0,a.useSelector)(i.ZP.selectors.getEntityUri),x=(0,a.useSelector)(i.ZP.selectors.getIsEditableMode),v=(0,c.Z)()("VIEW_TASKS"),E=!(!g||!m)&&f&&v,[w,T]=(0,r.useState)(null),[P,I]=(0,r.useState)(0),[O,C]=(0,r.useState)(!1),D=(0,r.useCallback)((()=>{C(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,l.uT0)({entityUri:y,workflowPath:g,environment:m,tenant:b,filter:{assignee:n,processType:e},includeClosed:!!p})));h(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);T(r),I(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{C(!1)}))}),[y,m,h,b,g,n,p,t]);(0,r.useEffect)((()=>{y&&E&&!(0,l.ZiX)(y)?D():(T(null),I(0))}),[E,y,D,x]);const k=(0,r.useCallback)(((e,t)=>{T((n=>n.map((n=>n.taskId===e?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}({},n,t):n))))}),[]);return{tasks:w,total:P,loading:O,updateTaskState:k,loadWorkflowTasks:D}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},97090:(e,t,n)=>{"use strict";n.d(t,{vl:()=>r,r:()=>a,Q3:()=>o,Pi:()=>i});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o={mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},i=.001},91676:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},47872:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="InterceptHandlersContext"},26481:(e,t,n)=>{"use strict";n.d(t,{j:()=>a});var r=n(24328);const a=n.n(r)().createContext(!1);a.displayName="ProfilePerspectiveViewContext"},60115:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(24328);const a=n.n(r)().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}})},53607:(e,t,n)=>{"use strict";n.d(t,{U:()=>c});var r=n(70687),a=n(26929);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=async(e,t)=>{const{accessToken:n}=await(null==t?void 0:t());return n?o({},e.headers,{Authorization:`Bearer ${n}`}):e.headers},s=(e,t)=>{const{url:n}=e;return n?(!(null==t?void 0:t.some((e=>{var t;const r=null===(t=n.match(/^(https?:\/\/[^:/?#]*).*$/))||void 0===t?void 0:t[1],a=new RegExp("^"+e+"$"),o=e.replace(/\/*$/,"");return o===n||r&&r===o||(null==o?void 0:o.startsWith("/"))&&(null==n?void 0:n.startsWith(o))||e&&a.test(n)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"}},c=e=>{let{name:t,paramObject:n,permissions:i,worker:c,metadata:d,config:p,apiPath:u,servicesPath:h,user:g,workflowPath:m,entity:f,tenant:b,entityUri:y,query:x,openSearch:v,environment:E,getCurrentPerspectiveId:w,showPerspective:T,workflowCheckPermission:P,setEntityUri:I}=e;const O=e=>{e.then((e=>{c.postMessage(o({action:"response",result:{data:e,headers:n.params.headers,status:200}},n.params))})).catch((e=>{c.postMessage(o({action:"response",result:{data:e,headers:n.params.headers,status:0}},n.params))}))},C=(0,a.D)(h)?()=>(0,r.hPi)({servicesPath:h}):()=>Promise.resolve({accessToken:""});switch(t){case r.MVv.API:{const e=(async(e,t,n)=>{const a=s(e,t);if(a)return a;const o=await l(e,n);return await(0,r.SL_)({url:e.url,method:e.method,data:e.data,headers:o,noRequestProcessor:!0})})(n.params,i,C);O(e);break}case r.MVv.WORKFLOW:{const e=(async(e,t,n,a,o)=>{const{url:i}=e,c=s(e,t);if(c)return c;const d=i.includes("http:")||i.includes("https:");if(!n&&!d)return{errorMessage:"Workflow path is not defined"};const p=await l(e,o);return await(0,r.oUH)({url:i,method:e.method||"GET",data:e.data,tenant:a,headers:p,workflowPath:n})})(n.params,i,m,b,C);O(e);break}case r.MVv.WORKFLOW_START_PROCESS_FROM_QUERY:{const e=((e,t,n,a,i)=>{if(!e.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!e.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!n)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const l=s(o({url:"/processInstances/_generateFromQuery"},e),t);return l?new Promise((e=>e(l))):(0,r.FuV)({workflowPath:n,processType:e.processDefinitionId,searchString:e.searchString,tenant:a,environment:i})})(n.params,i,m,b,E);O(e);break}case r.MVv.GET_CONFIGURATION:c.postMessage(o({action:"response",result:d},n.params));break;case r.MVv.GET_UI_CONFIGURATION:{const e=o({},p,{action:o({},p.action)});e.action.permissions&&delete e.action.permissions,c.postMessage(o({action:"response",result:e},n.params));break}case r.MVv.SET_ENTITY_URI:{const e=e=>c.postMessage(o({action:"response",result:e},n.params));I(n.params.entityUri,e);break}case r.MVv.SET_PERSPECTIVE:T(n.params.perspective),c.postMessage(o({action:"response",result:w()},n.params));break;case r.MVv.GET_PERSPECTIVE:w&&c.postMessage(o({action:"response",result:w()},n.params));break;case r.MVv.WORKFLOW_CHECK_PERMISSION:c.postMessage(o({action:"response",result:P(n.params.permission)},n.params));break;case r.MVv.GET_SEARCH_QUERY:c.postMessage(o({action:"response",result:x},n.params));break;case r.MVv.OPEN_SEARCH:v({viewId:p.id,searchState:n.params.searchState||{}});break;case r.MVv.GET_ENTITY_URI:c.postMessage(o({action:"response",result:y},n.params));break;case r.MVv.GET_ENTITY:c.postMessage(o({action:"response",result:f},n.params));break;case r.MVv.GET_API_PATH:c.postMessage(o({action:"response",result:u},n.params));break;case r.MVv.WORKFLOW_GET_WORKFLOW_PATH:c.postMessage(o({action:"response",result:m},n.params));break;case r.MVv.GET_TENANT:c.postMessage(o({action:"response",result:b},n.params));break;case r.MVv.GET_USER:c.postMessage(o({action:"response",result:g},n.params));break;case r.MVv.ALERT:c.postMessage(o({action:"response",result:window.alert(n.params.text)},n.params));break;case r.MVv.CONFIRM:c.postMessage(o({action:"response",result:window.confirm(n.params.text)},n.params));break;case r.MVv.PROMPT:c.postMessage(o({action:"response",result:window.prompt(n.params.text,n.params.defaultText||"")},n.params));break;case r.MVv.OPEN_WINDOW:window.open(n.params.url,"_blank");break;case r.MVv.RELOAD_PAGE:location.reload()}}},26929:(e,t,n)=>{"use strict";n.d(t,{D:()=>l,jm:()=>s,aZ:()=>d,Fx:()=>u,dH:()=>h,R3:()=>g,Yo:()=>m});var r=n(58697),a=n.n(r);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>null==e?void 0:e.includes("/nui"),s=(e,t)=>l(e)?`${e.replace(`${t}/`,"")}worker_api.js`:`${e}worker_api.js`,c=(e,t,n)=>{let r=[];const a=e.getAttribute("ui-actions"),i=e.getAttribute("ui-tooltip"),l=e.getAttribute("id")||e.getAttribute("name");return a&&(a.split(",").forEach((n=>{const a=e=>{var r;const a=e.target,i=r=>{t.postMessage({action:"event",type:"uiAction",data:{type:n,id:l,event:o({},e,{files:r})}})};null!==(r=a.files)&&void 0!==r&&r.length?(e=>{const t=Array.from(e).map((e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=n=>{const r=n.target.result,{lastModified:a,name:o,size:i,type:l}=e;t({lastModified:a,name:o,size:i,type:l,content:r})},r.onerror=e=>{n(e)},r.readAsArrayBuffer(e)}))));return Promise.all(t)})(a.files).then(i):i()};e.addEventListener(n,a),r.push((()=>{e.removeEventListener(n,a)}))})),e.removeAttribute("ui-actions")),i&&n(i),e.childNodes.forEach((e=>{1===e.nodeType&&(r=r.concat(c(e,t,n)))})),r},d=e=>{let{worker:t,setTooltip:n,innerText:r,html:a,setListenersToReset:o,setHtml:i}=e;const l=document.createElement("div");l.innerHTML=a||r,o(c(l,t,n)),i(l)},p=(e,t)=>(e||[]).some((e=>{const n=new RegExp(`^${e}$`);return e.replace(/\/*$/,"")===t||e&&n.test(t)})),u=e=>{let{workerRef:t,setRequestListeners:n}=e;return{processApiRequest:(e,r,o,i,l)=>{const s=a()();n({url:e,method:r,headers:o,noRequestProcessor:!0},l,s),t.current.postMessage({action:"apiRequest",id:s,url:e,method:r,headers:o,data:i})}}},h=e=>{let{workerRef:t,setResponseListeners:n}=e;return{processApiResponse:(e,r,o,i)=>{const l=a()();n(i,l),t.current.postMessage({action:"apiResponse",id:l,url:e,method:r,data:o})}}},g=e=>{let{apiPath:t,reltioPath:n,tenant:r,processApiRequest:i,workerRef:l,setRequestListeners:s}=e;return e=>{let{options:c={},url:d,next:u}=e;const h=d.startsWith("/")&&!d.startsWith(t)?`${n}/api/${r}${d}`:`${n}${d.replace(t,"")}`;if(p(i,h)){const e=a()();s(c,u,e),l.current.postMessage({action:"apiRequest",id:e,url:h,method:c.method,headers:o({},c.headers,{origin:"ui",requestId:e}),data:c.body})}else u(d,c)}},m=e=>{let{reltioPath:t,apiPath:n,processApiResponse:r,workerRef:o,setResponseListeners:i}=e;return e=>{var l;let{url:s,response:c,next:d,options:u,abort:h}=e;if("ui"===(null==u||null===(l=u.headers)||void 0===l?void 0:l.origin))c.json().then((e=>{var t,n;i(d,u.headers.requestId),o.current.postMessage({action:"response",result:{data:e,status:c.status},id:null==u?void 0:u.id,name:null==u||null===(t=u.task)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.name})})).catch((e=>{h(e)}));else{const e=`${t}${s.replace(n,"")}`;if(p(r,e)){const t=a()();c.json().then((n=>{i(d,t),o.current.postMessage({action:"apiResponse",id:t,url:e,method:u.method,data:n})})).catch((e=>{h(e)}))}else d(c)}}}},9757:(e,t,n)=>{"use strict";n.d(t,{E:()=>w});var r=n(24328),a=n(52730),o=n(59431),i=n(70687),l=n(17440),s=n(22994),c=n(24330),d=n.n(c);const p={attributes:{"*":["accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","y","y1","y2","yChannelSelector","z","zoomAndPan","ui-actions","ui-tooltip"],img:["src","srcset","alt","title","loading"],link:["href","rel"],iframe:["src"],a:["href"]},tags:["animate","animateColor","animateMotion","animateTransform","mpath","set","circle","ellipse","line","polygon","polyline","rect","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","feDistantLight","fePointLight","feSpotLight","circle","ellipse","line","path","polygon","polyline","rect","defs","g","svg","symbol","use","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","textPath","text","tref","tspan","altGlyph","textPath","tref","tspan","clipPath","color-profile","cursor","filter","foreignObject","script","style","view","a","link","input","button","iframe","img"]};function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=()=>{const{allowedAttributes:e,allowedTags:t}=d().defaults,{attributes:n,tags:r}=p,a={allowedTags:t.concat(r),allowedAttributes:u({},e,n),allowVulnerableTags:!0};return e=>d()(e,a)};var m=n(97094),f=n(60115),b=n(47872),y=n(53607),x=n(26929);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[c,d]=(0,r.useState)(),[p,u]=(0,r.useState)([]),[h,E]=(0,r.useState)([]),[w,T]=(0,r.useState)(!0),[P,I]=(0,r.useState)(),[O,C]=(0,r.useState)(null),[D,k]=(0,r.useState)({}),S=(0,r.useRef)(),N=(0,r.useRef)({}),R=(0,r.useRef)({}),_=(0,a.useDispatch)(),L=g(),M=(0,a.useSelector)(o.ZP.selectors.getUIPath),j=(0,a.useSelector)(o.ZP.selectors.getTenant),A=(0,x.jm)(M,j),V=(0,r.useContext)(m.S),U=(0,r.useContext)(f.Y),F=(0,r.useContext)(b.p),B=(0,s.Z)(),Z=(0,a.useSelector)(o.ZP.selectors.getMetadata)||{},z=(0,a.useSelector)(o.ZP.selectors.getEntity)||{},H=(0,a.useSelector)(o.ZP.selectors.getApiPath),W=(0,a.useSelector)(o.ZP.selectors.getServicesPath),q=(0,a.useSelector)(o.ZP.selectors.getReltioPath),G=(0,a.useSelector)(o.ZP.selectors.getWorkflowPath),K=(0,a.useSelector)(o.ZP.selectors.getUser),Y=(0,a.useSelector)(o.ZP.selectors.getEntityUri),$=(0,a.useSelector)(o.ZP.selectors.getIsEditableMode),Q=(0,a.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),{type:X,data:J}=(0,a.useSelector)(o.ZP.selectors.getSearchProviderData)||{},ee="search"===X?null==J?void 0:J.query:null,te=!(0,x.D)(W),ne=te?U.interceptors:F,re=e=>_(o.ui.actions.openSearch(e));let ae="",oe="";const ie=e=>{let{task:t,worker:r}=e;if(t)switch(t.action){case i.W0P.SET_HTML:{const e=L(t.params.html);t.params.id?document.getElementById(t.params.id).innerHTML=e:ae!==e&&(ae=e,(0,x.aZ)({worker:r,setTooltip:C,html:e,innerText:ae,setListenersToReset:u,setHtml:d}));break}case i.W0P.SHOW_POPUP:{const e=L(t.params);oe=e,(0,x.aZ)({worker:r,setTooltip:C,html:e,innerText:oe,setListenersToReset:E,setHtml:I});break}case i.W0P.HIDE_POPUP:oe="",I(null);break;case i.W0P.SET_VISIBILITY:"visible"===t.params?(T(!0),(0,x.aZ)({worker:r,setTooltip:C,innerText:ae,setListenersToReset:u,setHtml:d})):T(!1);break;case i.W0P.SET_TOOLTIP:C(t.params);break;case i.W0P.SET_HEIGHT:k((e=>v({},e,{height:t.params})));break;case i.W0P.SET_WIDTH:k((e=>v({},e,{width:t.params})));break;case i.W0P.SET_ENABLED:k((e=>t.params?(0,l.omit)(["pointer-events"],e):v({},e,{"pointer-events":"none"})));break;case i.W0P.LOG:console.log(t.params);break;case i.W0P.MESSAGE:V(t.params);break;case i.W0P.REQUEST:var a,o;if("ui"!==(null===(a=t.params)||void 0===a||null===(o=a.headers)||void 0===o?void 0:o.origin))(0,y.U)(v({name:t.params.name,paramObject:t,permissions:n.action.permissions,worker:r,metadata:Z,config:n,user:K,servicesPath:W,apiPath:te?H:q,tenant:j,workflowPath:G,entity:z,entityUri:Y,environment:Q,query:ee,openSearch:re,workflowCheckPermission:B},U));else{const{headers:e,id:n,url:r,method:a,data:o}=t.params,i=r.replace(q,H);N.current[e.requestId]&&(N.current[e.requestId].next(i,{body:o,id:n,task:t,headers:e,method:a}),N.current=(0,l.omit)([e.requestId],N.current))}break;case i.W0P.RETURN_PROCESSED_API_RESPONSE:case i.W0P.RETURN_PROCESSED_API_REQUEST:{const{id:e,data:n}=t.params;R.current[e]&&(R.current[e].next(n),R.current=(0,l.omit)([e],R.current));break}}},le=(e,t,n)=>{N.current=v({},N.current,{[n]:{options:e,next:t,id:n}})},se=(e,t)=>{R.current=v({},R.current,{[t]:{next:e}})},ce=(0,x.Fx)({workerRef:S,setRequestListeners:le}),de=(0,x.dH)({workerRef:S,setResponseListeners:se}),pe=(0,x.R3)({apiPath:H,reltioPath:q,tenant:j,processApiRequest:null==n||null===(e=n.action)||void 0===e?void 0:e.processApiRequest,workerRef:S,setRequestListeners:le}),ue=(0,x.Yo)({reltioPath:q,apiPath:H,processApiResponse:null==n||null===(t=n.action)||void 0===t?void 0:t.processApiResponse,workerRef:S,setResponseListeners:se}),he=(e,t)=>{var n;null===(n=S.current)||void 0===n||n.postMessage({action:"event",type:e,data:t})};(0,r.useEffect)((()=>{(0,i.O27)(n.action)||n.action.platform===i.X1H.CLASSIC||(S.current=(0,i.QWZ)(A,ie,n),he("updateEntity",z))}),[z,n]),(0,r.useEffect)((()=>{he("editMode",$)}),[$]),(0,r.useEffect)((()=>{he("changeSearchQuery",ee)}),[ee]),(0,r.useEffect)((()=>{he("changeVisibility",w)}),[w]),(0,r.useEffect)((()=>()=>{p.forEach((e=>e()))}),[p]),(0,r.useEffect)((()=>()=>{h.forEach((e=>e()))}),[h,p]);const ge=(0,r.useCallback)((()=>{he("execute",null)}),[n]);return(0,r.useEffect)((()=>{var e,t;if(!(0,i.O27)(ne)&&(null!=n&&null!==(e=n.action)&&void 0!==e&&e.processApiRequest||null!=n&&null!==(t=n.action)&&void 0!==t&&t.processApiResponse)){const{addInternalRequestInterceptor:e,addInternalResponseInterceptor:t,removeInternalRequestInterceptor:o,removeInternalResponseInterceptor:i}=ne;var r,a;return te?(e(null==n||null===(r=n.action)||void 0===r?void 0:r.processApiRequest,ce),t(null==n||null===(a=n.action)||void 0===a?void 0:a.processApiResponse,de),()=>{o(ce),i(de)}):(e(pe),t(ue),()=>{o(pe),i(ue)})}}),[n]),{html:c,visible:w,tooltip:O,customStyles:D,onClick:ge,popup:P}}},26313:(e,t,n)=>{"use strict";n.d(t,{Q:()=>p});var r=n(24328),a=n(17440),o=n(52730),i=n(59431),l=n(70687),s=n(85229);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=e=>{const t=(0,s._)(),n=(0,o.useSelector)(i.ZP.selectors.getEntityUriWithDataTenant),[d,p]=(0,r.useState)({}),u=(0,r.useCallback)((e=>{const n=[{filter:l.j5E.EQUALS,fieldName:"uri",values:e}],r={max:e.length,activeness:l.YJ7.ALL,select:"uri,label,type"};return t((0,l.ZOr)(n,r))}),[t]),h=e=>(0,l.HvW)(e,{options:"uri,label,type"}).then((t=>c({},t,{uri:e}))).catch((()=>({}))),g=(0,r.useCallback)(((e,n)=>t(Promise.all((e||[]).map(h))).then((e=>(0,a.pipe)((0,a.reject)(a.isEmpty),(0,a.concat)(n))(e)))),[t]);return(0,r.useEffect)((()=>{const t=(0,a.pipe)((0,a.reduce)(((e,t)=>{const{objectType:r,relatedObjectUris:a}=t;return"relation"!==r&&"potentialMatch"!==r||(a||[]).forEach((t=>{t!==n&&(0,l.WgC)(t)&&!d[t]&&e.push(t)})),e}),[]),a.uniq)(e||[]);t.length&&u(t).then((e=>{const n=(0,a.pipe)((0,a.map)((0,a.prop)("uri")),(0,a.difference)(t))(e);return g(n,e)})).then((e=>{p((t=>e.reduce(((e,t)=>(e[t.uri]=t,e)),c({},t))))})).catch((()=>{}))}),[u,g,e,n]),d}},52016:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(52730),a=n(59431),o=n(70687),i=n(24328);const l=[],s=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||l;return{canCreate:(0,i.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,i.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,i.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,i.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},37152:(e,t,n)=>{"use strict";n.d(t,{a:()=>h});var r=n(24328),a=n(52730),o=n(17440),i=n(59431),l=n(70687),s=n(85229),c=n(30634);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,o.when)(o.identity,(0,o.pipe)(l.VGB,o.length,(0,o.times)((e=>e+1)))),h=e=>{let{sorting:t,filter:n,page:p,rowsPerPage:h,config:g,entity:m,relationActivityFilter:f,mode:b,searchByOv:y=!1}=e;const[x,v]=(0,r.useState)(!1),E=(0,a.useDispatch)(),w=(0,a.useSelector)(i.ZP.selectors.getTenant),T=(0,a.useSelector)(i.ZP.selectors.getDtssPath),{activityFilter:P,globalFilter:I}=(0,a.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},O=(0,s._)(),C=g.suggested,D=(0,r.useMemo)((()=>({searchByOv:y})),[y]),k=(0,r.useCallback)((()=>{if(null!=m&&m.uri){const e=d({},g.content,{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:f||l.Ng6.ALL,entity:P},max:h,offset:p*h,filter:(0,l.vyX)(I,n)||void 0,suggested:u(C)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(l.VGB,(t=>t.map(((t,n)=>d({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(C)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),l.ZiX),()=>Promise.resolve([{total:0}])],[l.biM,e=>(0,l.n_1)({entityUri:e.uri,configs:r,customerTenant:w,dataTenant:e.dataTenant,dtssPath:T,options:D})],[o.T,e=>(0,l.N6e)(e.uri,r,D)]]);v(!0),O(a(m)).then((e=>{let[{connections:t,total:n}]=e;E(i.N5.relations.actions.relationsLoaded({id:g.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[P,g,E,T,null==m?void 0:m.uri,null==m?void 0:m.dataTenant,n,I,p,f,h,O,t,w,D]),S=(0,r.useRef)(!1);S.current=!1,(0,r.useEffect)((()=>{S.current=!0,k()}),[k]);const N=(0,c.D)(b);return(0,r.useEffect)((()=>{b!==l.ARY.Viewing||S.current||N===b||(S.current=!0,k())}),[k,b,N]),{isLoading:x,reload:k}}},76527:()=>{},96969:()=>{},32232:()=>{},24195:()=>{},73443:()=>{}}]);
|
|
1
|
+
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[4115],{1876:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(87918),s=n.n(l),c=n(94079),d=n(87685);function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}const u=e=>a().createElement("svg",p({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M18 2V0H0v2l7 8v8l4-2v-6z",fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:1})),h=(0,n(79692).Z)((e=>({"filterIcon--enabled":{color:e.palette.primary.main},closeIcon:{position:"absolute",right:"3px",bottom:"3px",transform:"scale(0.5)"},button:{padding:"11px"}}))),g=e=>{let{enabled:t,onClick:n}=e;const r=h();return a().createElement(c.Tooltip,{title:t?s().text("Clear all filters"):s().text("Filter")},a().createElement(c.IconButton,{onClick:n,classes:{root:r.button}},t?a().createElement(a().Fragment,null,a().createElement(u,{className:r["filterIcon--enabled"]}),a().createElement(d.default,{color:"primary",className:r.closeIcon})):a().createElement(u,null)))};g.propTypes={enabled:i().bool,onClick:i().func};const m=g},32152:(e,t,n)=>{"use strict";n.d(t,{i:()=>g});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(17440),s=n(87685),c=n(94079),d=n(21853),p=n(22385),u=n(31276);const h=(0,n(79692).Z)({searchButton:{marginLeft:"auto !important",marginRight:"-4px",padding:"8px"},input:{flex:"1 0 200px",marginLeft:"70px",fontSize:"14px",background:"rgba(0,0,0,0.03) 2px",padding:"4px 0",marginRight:"4px"},startAdornment:{color:"rgba(0,0,0,0.54)",paddingLeft:"8px"}}),g=e=>{let{query:t,onChange:n}=e;const[o,g]=(0,r.useState)(t),[m,f]=(0,r.useState)(!!t);(0,r.useEffect)((()=>{g(t)}),[t]);const b=h(),y=o&&o.length;return m?a().createElement(c.Input,{className:b.input,value:o,autoFocus:!0,placeholder:i().text("Search"),disableUnderline:!0,onChange:(0,l.pipe)(u.NA,g),startAdornment:a().createElement(c.InputAdornment,{position:"start"},a().createElement(d.default,{className:b.startAdornment})),endAdornment:a().createElement(c.InputAdornment,{position:"end"},y&&a().createElement(p.Z,{size:"S",icon:s.default,onClick:(0,l.pipe)(l.F,f,(0,l.always)(""),(0,l.tap)(n),g)})),onKeyPress:(0,l.when)((0,l.propEq)("key","Enter"),(0,l.pipe)((0,l.always)(o),l.trim,n))}):a().createElement(c.IconButton,{className:b.searchButton,onClick:(0,l.pipe)(l.T,f)},a().createElement(d.default,null))}},93416:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(24328),a=n.n(r),o=n(71153),i=n.n(o),l=n(92778);const s=(0,n(79692).Z)({container:{padding:"0 16px",minHeight:"48px"},title:{fontSize:"16px",lineHeight:"19px",paddingTop:"16px",paddingBottom:"13px",justifyContent:"flex-start"}}),c=e=>{let{className:t,title:n,children:r}=e;const o=s();return a().createElement(l.Z,{title:n,classes:{root:i()(o.container,t),title:o.title}},r)}},75512:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),l=n(44443);const s=()=>i().createElement("div",{style:{display:"none"}}),c=e=>{let{widthToHide:t,children:n}=e;return i().createElement(l.Z,{handleWidth:!0,render:e=>{let{width:r}=e;return r>t?i().createElement(i().Fragment,null,n):i().createElement(s,null)}})};c.propTypes={children:a().node,widthToHide:a().number.isRequired};const d=c},81727:(e,t,n)=>{"use strict";n.d(t,{E:()=>h,Z:()=>g});var r=n(24328),a=n.n(r),o=n(94079),i=n(8818),l=n(61932),s=n(27291),c=n(31276),d=n(71153),p=n.n(d);const u=(0,n(79692).Z)({root:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px"},check:{color:"#8CC152"}});let h;!function(e){e[e.INIT=1]="INIT",e[e.PROGRESS=2]="PROGRESS",e[e.SUCCESS=3]="SUCCESS",e[e.DONE=4]="DONE"}(h||(h={}));const g=e=>{let{classes:t={},tooltip:n="",onClick:r=c.ZT,mode:d=h.INIT}=e;const g=u();return a().createElement("div",{className:p()(g.root,t.root)},(()=>{switch(d){case h.INIT:return a().createElement(i.k,{className:t.button,size:"M",tooltipTitle:n,icon:l.Z,onClick:r});case h.PROGRESS:return a().createElement(o.CircularProgress,{className:t.spinner,size:24});case h.SUCCESS:return a().createElement(s.Z,{className:p()(g.check,t.check)});default:return null}})())}},55400:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({link:{textDecoration:"inherit",color:"inherit","&:visited":{textDecoration:"inherit",color:"inherit"}}}),i=e=>{let{to:t,children:n,onClick:r}=e;const i=o();return a().createElement("a",{href:t,onClick:e=>{r&&(r(),e.stopPropagation(),e.preventDefault())},className:i.link},n)}},22860:(e,t,n)=>{"use strict";n.d(t,{T:()=>u});var r=n(24328),a=n.n(r),o=n(17440),i=n(71153),l=n.n(i),s=n(94079);const c=(0,n(79692).Z)((e=>({root:{maxWidth:156,paddingTop:"9px",paddingBottom:"9px"},outlined:{paddingRight:32,paddingLeft:12},arrowIcon:{fontSize:"18px",top:"calc(50% - 9px)",right:"12px",color:e.palette.text.secondary},currentValue:{display:"flex",alignItems:"center"},currentValueIcon:{fontSize:"18px",marginRight:"8px",color:e.palette.text.secondary},currentValueText:{fontSize:"14px",lineHeight:"16px",textTransform:"uppercase",fontWeight:500,color:e.palette.text.primary,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},menuItem:{padding:"9px 12px 7px"},firstMenuItemButton:{borderTop:"1px solid #e4e4e4"},menuItemInner:{display:"flex",alignItems:"flex-start"},menuItemIcon:{fontSize:"18px",color:e.palette.text.secondary,marginRight:"9px"},menuItemLabel:{fontSize:"14px",lineHeight:"16px",fontWeight:500,color:e.palette.text.primary},menuItemDescription:{fontSize:"10px",lineHeight:"16px",color:e.palette.text.secondary}})));function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}const p=e=>"onClick"in e,u=e=>{let{optionsGroup:t,buttonsGroup:n,value:r,onChange:i,disabled:u=!1}=e;const h=c();return a().createElement(s.Select,{classes:{root:h.root,icon:h.arrowIcon,outlined:h.outlined},value:r,onChange:e=>{const{value:n}=e.target;t.some((0,o.propEq)("value",n))&&i(n)},variant:"outlined",renderValue:e=>{const{icon:n,label:r=e}=t.find((0,o.propEq)("value",e))||{};return a().createElement(s.Box,{className:h.currentValue},n&&a().createElement(n,{className:h.currentValueIcon}),a().createElement(s.Tooltip,{title:r},a().createElement(s.Typography,{className:h.currentValueText},r)))},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},getContentAnchorEl:null},disabled:u,"data-reltio-id":"reltio-profile-select-mode"},(e=>{const t=e.findIndex(p);return e.map(((e,n)=>{const{value:r,description:o,icon:i}=e,c={value:r,className:h.menuItem};return p(e)&&(c.onClick=()=>e.onClick(r),c.className=l()(c.className,{[h.firstMenuItemButton]:n===t})),a().createElement(s.MenuItem,d({key:r},c,{"data-reltio-id":`reltio-profile-select-mode-${r}`}),a().createElement(s.Box,{className:h.menuItemInner},a().createElement(i,{className:h.menuItemIcon}),a().createElement(s.Box,null,a().createElement(s.Typography,{className:h.menuItemLabel},r),a().createElement(s.Typography,{className:h.menuItemDescription},o))))}))})([...t,...n]))}},49734:(e,t,n)=>{"use strict";n.d(t,{M:()=>d});var r=n(24328),a=n.n(r);const o=(0,n(79692).Z)({root:{display:"flex",flexDirection:"column",paddingRight:"12px",paddingTop:"8px",paddingBottom:"8px","& + &":{borderTop:"1px solid rgba(0,0,0, 0.12)"}},profileCardWrapper:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},profileCardContainer:{flexGrow:1,paddingBottom:"8px",paddingTop:"8px"},rulesContainer:{paddingLeft:"52px",marginBottom:"8px"}});var i=n(93517),l=n(22071),s=n(71153),c=n.n(s);const d=e=>{let{children:t,entitiesMap:n,entity:r,match:s,metadata:d,className:p}=e;const u=o();return a().createElement("div",{className:c()(u.root,p)},a().createElement("div",{className:u.profileCardWrapper},a().createElement(i.Z,{entity:s.object,classes:{container:u.profileCardContainer}}),t),a().createElement("div",{className:u.rulesContainer},s.matchRules&&a().createElement(l.Z,{match:s,metadata:d,entitiesMap:n,entity:r})))}},82842:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(52730),a=n(59431),o=n(24328),i=n.n(o),l=n(71153),s=n.n(l),c=n(17440),d=n(70687),p=n(68439),u=n(31039),h=n(53180),g=n(81727);const m=e=>e&&e.scrollIntoView({block:"end",behavior:"smooth"}),f=e=>{e&&clearTimeout(e)},b=(e,t)=>{if(e&&t){const n=e.offsetTop,r=e.offsetTop+e.clientHeight,{clientHeight:a,scrollTop:o}=t;return n>=0&&r>o&&r<o+a}};var y=n(20562),x=n(79692),v=n(41128);const E=(0,x.Z)((e=>({"@keyframes animate":{from:{background:"transparent"},"66%":{background:"#f2e68e"},"100%":{background:"transparent"}},highlighted:{animationName:"$animate",animationDuration:"3s",animationIterationCount:1},item:{display:"flex",minHeight:"40px",borderBottom:"1px solid rgba(0, 0, 0, 0.1)",flexDirection:"row","&:after":{content:"",minHeight:"inherit",fontSize:0},"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"}},clickable:{cursor:"pointer"},selected:{background:(0,v.U1)(e.palette.primary.main,.12),"&:hover":{background:(0,v.U1)(e.palette.primary.main,.24)}},inactive:{background:e.inactiveBackground,"&:hover":{background:e.inactiveHoverBackground},"&$selected":{background:e.inactiveSelectedBackground,"&:hover":{background:e.inactiveSelectedHoverBackground}}},justImported:{backgroundColor:"#FFFBEB !important"},avatar:{marginLeft:"20px"},image:{height:"32px",width:"32px",marginTop:"8px",marginBottom:"7px"},info:{marginLeft:"20px",flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"center",fontSize:"13px",width:"100%",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word"},label:{fontSize:"13px",lineHeight:"15px",fontWeight:500,color:e.palette.primary.main,marginRight:"17px",textDecoration:"none"},secondaryLabel:{marginRight:"12px"},businessCard:{color:"rgba(0, 0, 0, 0.54)"},secondRow:{display:"flex",marginTop:"2px",alignItems:"center",color:"rgba(0, 0, 0, 0.54)",fontSize:"12px"}}))),w=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{entities:t,metadata:n,entityToHighlight:r,selectedEntityUri:a,onEntityClick:l,onEntityHover:x,entitiesImportStatus:v,entityButtonsRenderer:w}=e;const T=E(),P=(0,o.useRef)(null),I=(0,o.useRef)(null);return(0,y.D)((()=>{if(r){var e;const n=null===(e=P.current)||void 0===e?void 0:e.querySelectorAll(`[data-entity-uri='${r}']`);if(f(I.current),(null==n?void 0:n.length)>0){var t;const e=null===(t=P.current)||void 0===t?void 0:t.parentElement;b(n[0],e)||(m(n[0]),I.current=setTimeout((()=>{b(n[0],e)||m(n[0])}),1e3))}}return()=>{f(I.current)}}),[r]),i().createElement("div",{ref:P},(t||[]).map((e=>{const t=(0,d.idV)(e.label),o=e.secondaryLabel,m=(0,d.ptG)(n,e),f=(0,d.Fn9)(e),b=e.uri,y=(0,d.wwR)(e),E=(0,c.prop)(b,v);return i().createElement("div",{key:b,className:s()(T.item,{[T.clickable]:!!l,[T.selected]:b===a,[T.highlighted]:b===r,[T.inactive]:!f,[T.justImported]:E===g.E.SUCCESS}),onClick:l?()=>l(b):void 0,onMouseEnter:x?()=>x(b):void 0,onMouseLeave:x?()=>x(null):void 0,"data-entity-uri":b},i().createElement(h.Z,{entity:e,avatarClassName:T.avatar,imageClassName:T.image}),i().createElement("div",{className:T.info},i().createElement("div",null,i().createElement(u.Z,{value:y,className:T.label},t),o&&i().createElement("span",{className:T.secondaryLabel},o," "),m&&i().createElement("span",{className:T.businessCard},m)),i().createElement("div",{className:T.secondRow},i().createElement(p.Z,{entity:e}),i().createElement("div",null,(0,d.BTI)(e)))),w&&w(e))})))}))},58600:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>G});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(12335),s=n(17440),c=n(67121),d=n(13896),p=n(46847),u=n(15459),h=n(6521);function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var m=n(79692);const f=(0,m.Z)((()=>({"@global .rst__node":{minWidth:"100%",whiteSpace:"nowrap",position:"relative",textAlign:"left"},"@global .rst__node.rst__rtl":{textAlign:"right"},"@global .rst__nodeContent":{position:"absolute",top:0,bottom:0},"@global .rst__lineBlock, .rst__absoluteLineBlock":{height:"100%",position:"relative",display:"inline-block"},"@global .rst__absoluteLineBlock":{position:"absolute",top:0},"@global .rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{position:"absolute",content:"",backgroundColor:"black"},"@global .rst__lineHalfHorizontalRight::before":{height:"1px",top:"50%",right:0,width:"50%"},"@global .rst__rtl.rst__lineHalfHorizontalRight::before":{left:0,right:"initial"},"@global .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after":{width:"1px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__lineFullVertical::after, .rst__rtl.rst__lineHalfVerticalTop::after, .rst__rtl.rst__lineHalfVerticalBottom::after":{right:"50%",left:"initial"},"@global .rst__lineHalfVerticalTop::after":{height:"50%"},"@global .rst__lineHalfVerticalBottom::after":{top:"auto",bottom:0,height:"50%"},"@global .rst__highlightLineVertical":{zIndex:3},"@global .rst__highlightLineVertical::before":{position:"absolute",content:"",backgroundColor:"#36c2f6",width:"8px",marginLeft:"-4px",left:"50%",top:0,height:"100%"},"@global .rst__rtl.rst__highlightLineVertical::before":{marginLeft:"initial",marginRight:"-4px",left:"initial",right:"50%"},"@keyframes arrow-pulse":{"0%":{transform:"translate(0, 0)",opacity:0},"30%":{transform:"translate(0, 300%)",opacity:1},"70%":{transform:"translate(0, 700%)",opacity:1},"100%":{transform:"translate(0, 1000%)",opacity:0}},"@global .rst__highlightLineVertical::after":{content:"",position:"absolute",height:0,marginLeft:"-4px",left:"50%",top:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid white",animation:"arrow-pulse 1s infinite linear both"},"@global .rst__rtl.rst__highlightLineVertical::after":{marginLeft:"initial",marginRight:"-4px",right:"50%",left:"initial"},"@global .rst__highlightTopLeftCorner::before":{zIndex:3,content:"",position:"absolute",borderTop:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(50% + 4px)",top:"50%",marginTop:"-4px",right:0,width:"calc(50% + 4px)"},"@global .rst__rtl.rst__highlightTopLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:0,right:"initial"},"@global .rst__highlightBottomLeftCorner":{zIndex:3},"@global .rst__highlightBottomLeftCorner::before":{content:"",position:"absolute",borderBottom:"solid 8px #36c2f6",borderLeft:"solid 8px #36c2f6",boxSizing:"border-box",height:"calc(100% + 4px)",top:0,right:"12px",width:"calc(50% - 8px)"},"@global .rst__rtl.rst__highlightBottomLeftCorner::before":{borderRight:"solid 8px #36c2f6",borderLeft:"none",left:"12px",right:"initial"},"@global .rst__highlightBottomLeftCorner::after":{content:"",position:"absolute",height:0,right:0,top:"100%",marginTop:"-12px",borderTop:"12px solid transparent",borderBottom:"12px solid transparent",borderLeft:"12px solid #36c2f6"},"@global .rst__rtl.rst__highlightBottomLeftCorner::after":{left:0,right:"initial",borderRight:"12px solid #36c2f6",borderLeft:"none"}})));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const y=e=>{let{children:t,listIndex:n,swapFrom:o,swapLength:i,swapDepth:l,scaffoldBlockPxWidth:s,lowerSiblingCounts:c,connectDropTarget:d,isOver:p,draggedNode:u,canDrop:h,treeIndex:m,treeId:y,getPrevRow:x,node:v,path:E,rowDirection:w}=e,T=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]);f();const P="rtl"===w?"rst__rtl":null,I=c.length,O=[];let C;return c.forEach(((e,t)=>{let r="";if(e>0?r=0===n?"rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":t===I-1?"rst__lineHalfHorizontalRight rst__lineFullVertical":"rst__lineFullVertical":0===n?r="rst__lineHalfHorizontalRight":t===I-1&&(r="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),O.push(a().createElement("div",{key:`pre_${1+t}`,style:{width:s},className:g("rst__lineBlock",r,P)})),m!==n&&t===l){let e,r="";r=n===o+i-1?"rst__highlightBottomLeftCorner":m===o?"rst__highlightTopLeftCorner":"rst__highlightLineVertical",e="rtl"===w?{width:s,right:s*t}:{width:s,left:s*t},O.push(a().createElement("div",{key:t,style:e,className:g("rst__absoluteLineBlock",r,P)}))}})),C="rtl"===w?{right:s*I}:{left:s*I},d(a().createElement("div",b({},T,{className:g("rst__node",P)}),O,a().createElement("div",{className:"rst__nodeContent",style:C},r.Children.map(t,(e=>(0,r.cloneElement)(e,{isOver:p,canDrop:h,draggedNode:u}))))))};y.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"},y.propTypes={treeIndex:i().number.isRequired,treeId:i().string.isRequired,swapFrom:i().number,swapDepth:i().number,swapLength:i().number,scaffoldBlockPxWidth:i().number.isRequired,lowerSiblingCounts:i().arrayOf(i().number).isRequired,listIndex:i().number.isRequired,children:i().node.isRequired,connectDropTarget:i().func.isRequired,isOver:i().bool.isRequired,canDrop:i().bool,draggedNode:i().shape({}),getPrevRow:i().func.isRequired,node:i().shape({}).isRequired,path:i().arrayOf(i().oneOfType([i().string,i().number])).isRequired,rowDirection:i().string};const x=y;var v=n(21113);function E(){return E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){T(e,t,n[t])}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=e=>{let{scaffoldBlockPxWidth:t,toggleChildrenVisibility:n,connectDragPreview:r,connectDragSource:o,isDragging:i,canDrop:l,canDrag:s,node:c,title:d,subtitle:p,draggedNode:u,path:h,treeIndex:m,isSearchMatch:f,isSearchFocus:b,buttons:y,className:x,style:T,didDrop:P,treeId:I,isOver:O,parentNode:C,rowDirection:D}=e,k=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]);const S=d||c.title,N=p||c.subtitle,R="rtl"===D?"rst__rtl":null;let _;s&&(_="function"==typeof c.children&&c.expanded?a().createElement("div",{className:"rst__loadingHandle"},a().createElement("div",{className:"rst__loadingCircle"},[...new Array(12)].map(((e,t)=>a().createElement("div",{key:t,className:g("rst__loadingCirclePoint",R)}))))):o(a().createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));const L=u&&(0,v.SG)(u,c),M=!P&&i;let j={left:-.5*t};return"rtl"===D&&(j={right:-.5*t}),a().createElement("div",E({style:{height:"100%"}},k),n&&c.children&&(c.children.length>0||"function"==typeof c.children)&&a().createElement("div",null,a().createElement("button",{type:"button","aria-label":c.expanded?"Collapse":"Expand",className:g(c.expanded?"rst__collapseButton":"rst__expandButton",R),style:j,onClick:()=>n({node:c,path:h,treeIndex:m})}),c.expanded&&!i&&a().createElement("div",{style:{width:t},className:g("rst__lineChildren",R)})),a().createElement("div",{className:g("rst__rowWrapper",R)},r(a().createElement("div",{className:g("rst__row",M&&"rst__rowLandingPad",M&&!l&&"rst__rowCancelPad",f&&"rst__rowSearchMatch",b&&"rst__rowSearchFocus",R,x),style:w({opacity:L?.5:1},T)},_,a().createElement("div",{className:g("rst__rowContents",!s&&"rst__rowContentsDragDisabled",R)},a().createElement("div",{className:g("rst__rowLabel",R)},a().createElement("span",{className:g("rst__rowTitle",c.subtitle&&"rst__rowTitleWithSubtitle")},"function"==typeof S?S({node:c,path:h,treeIndex:m}):S),N&&a().createElement("span",{className:"rst__rowSubtitle"},"function"==typeof N?N({node:c,path:h,treeIndex:m}):N)),a().createElement("div",{className:"rst__rowToolbar"},y.map(((e,t)=>a().createElement("div",{key:t,className:"rst__toolbarButton"},e)))))))))};P.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"},P.propTypes={node:i().shape({}).isRequired,title:i().oneOfType([i().func,i().node]),subtitle:i().oneOfType([i().func,i().node]),path:i().arrayOf(i().oneOfType([i().string,i().number])).isRequired,treeIndex:i().number.isRequired,treeId:i().string.isRequired,isSearchMatch:i().bool,isSearchFocus:i().bool,canDrag:i().bool,scaffoldBlockPxWidth:i().number.isRequired,toggleChildrenVisibility:i().func,buttons:i().arrayOf(i().node),className:i().string,style:i().shape({}),connectDragPreview:i().func.isRequired,connectDragSource:i().func.isRequired,parentNode:i().shape({}),isDragging:i().bool.isRequired,didDrop:i().bool.isRequired,draggedNode:i().shape({}),isOver:i().bool.isRequired,canDrop:i().bool,rowDirection:i().string};const I=P;function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class C extends r.Component{render(){const e=this.props,{children:t,connectDropTarget:n,treeId:o,drop:i}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["children","connectDropTarget","treeId","drop"]);return n(a().createElement("div",null,r.Children.map(t,(e=>(0,r.cloneElement)(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){O(e,t,n[t])}))}return e}({},l))))))}}C.defaultProps={canDrop:!1,draggedNode:null},C.propTypes={children:i().node.isRequired,connectDropTarget:i().func.isRequired,isOver:i().bool.isRequired,canDrop:i().bool,draggedNode:i().shape({}),treeId:i().string.isRequired,drop:i().func.isRequired};const D=C,k=(0,m.Z)((()=>({"@global .rst__placeholder":{position:"relative",height:"68px",maxWidth:"300px",padding:"10px"},"@global .rst__placeholder, .rst__placeholder > *":{boxSizing:"border-box"},"@global .rst__placeholder::before":{border:"3px dashed #d9d9d9",content:"",position:"absolute",top:"5px",right:"5px",bottom:"5px",left:"5px",zIndex:-1},"@global .rst__placeholderLandingPad, .rst__placeholderCancelPad":{border:"none !important",boxShadow:"none !important",outline:"none !important"},"@global .rst__placeholderLandingPad *, .rst__placeholderCancelPad *":{opacity:"0 !important"},"@global .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before":{backgroundColor:"lightblue",borderColor:"white"},"@global .rst__placeholderCancelPad::before":{backgroundColor:"#e6a8ad"}}))),S=e=>{let{isOver:t,canDrop:n}=e;return k(),a().createElement("div",{className:g("rst__placeholder",n&&"rst__placeholderLandingPad",n&&!t&&"rst__placeholderCancelPad")})};S.defaultProps={isOver:!1,canDrop:!1},S.propTypes={isOver:i().bool,canDrop:i().bool};const N=S,R=e=>{let t=[],n=[],r=null;return a=>{const o=Object.keys(a).sort(),i=o.map((e=>a[e]));return(i.length!==t.length||i.some(((e,n)=>e!==t[n]))||o.some(((e,t)=>e!==n[t])))&&(t=i,n=o,r=e(a)),r}},_=R(v.Lf),L=R(v.Pg),M=R(v.o5);var j=n(65758),A=n(75047);class V{constructor(e){this.hoverHandler=()=>{if(null===this.hoverProps)return;const{dropTargetProps:e,monitor:t,component:n}=this.hoverProps,r=t.getItem();if(!r)return;const a=this.getTargetDepth(e,t,n),o=r.node;(e.node!==this.lastDropTargetNode||a!==this.lastDropTargetDepth)&&(this.lastDropTargetNode=e.node,this.lastDropTargetDepth=a,this.dragHover({node:o,path:r.path,minimumTreeIndex:e.listIndex,depth:a}),this.hoverProps=null)},this.deferredCallHoverHandler=()=>{if(this.shouldSkipMoreFrames)return this.shouldSkipMoreFrames=!1,void(this.rafId=requestAnimationFrame(this.deferredCallHoverHandler));this.rafId=null,this.hoverHandler()},this.treeRef=e,this.resetDragVariables()}get startDrag(){return this.treeRef.startDrag}get dragHover(){return this.treeRef.dragHover}get endDrag(){return this.treeRef.endDrag}get drop(){return this.treeRef.drop}get treeId(){return this.treeRef.treeId}get dndType(){return this.treeRef.dndType}get treeData(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}get getNodeKey(){return this.treeRef.props.getNodeKey}get customCanDrop(){return this.treeRef.props.canDrop}get maxDepth(){return this.treeRef.props.maxDepth}resetDragVariables(){this.lastDropTargetNode=null,this.lastDropTargetDepth=null,this.hoverProps=null,this.lastCanDropResult=null,this.lastCanDropProps=null,this.shouldSkipMoreFrames=!1,this.rafId=null}getTargetDepth(e,t,n){let r=0;const a=e.getPrevRow();if(a){let{path:t}=a;!this.treeRef.canNodeHaveChildren(a.node)&&(t=t.slice(0,t.length-1)),r=Math.min(t.length,e.path.length)}let o,i=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(i=0,n){const r=(0,A.findDOMNode)(n).getBoundingClientRect(),a=t.getSourceClientOffset().x-r.left;o=Math.round(a/e.scaffoldBlockPxWidth)}else o=e.path.length;else{const n="rtl"===e.rowDirection?-1:1;o=Math.round(n*t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth)}let l=Math.min(r,Math.max(0,i+o-1));if(void 0!==this.maxDepth&&null!==this.maxDepth){const e=t.getItem().node,n=(0,v.hh)(e);l=Math.max(0,Math.min(l,this.maxDepth-n-1))}return l}canDrop(e,t){if(!t.isOver())return!1;const n=e.getPrevRow(),r=n?n.path:[],a=n?n.node:{},o=Math.round(t.getDifferenceFromInitialOffset().x/e.scaffoldBlockPxWidth),i={nodeId:void 0!==e.node.nodeId?e.node.nodeId:e.node,rowAbove:n,abovePath:r,aboveNodeId:void 0!==a.nodeId?a.nodeId:a,blocksOffset:o};if((0,s.equals)(this.lastCanDropProps,i))return this.lastCanDropResult;this.lastCanDropProps=i;const l=this.getTargetDepth(e,t,null);if(l>=r.length&&"function"==typeof a.children)return this.lastCanDropResult=!1;if("function"==typeof this.customCanDrop){const{node:n}=t.getItem(),r=_({treeData:this.treeData,newNode:n,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:e.listIndex,expandParent:!0});return this.lastCanDropResult=this.customCanDrop({node:n,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:r.path,nextParent:r.parentNode,nextTreeIndex:r.treeIndex})}return this.lastCanDropResult=!0}wrapSource(e){const t={beginDrag:e=>(this.startDrag(e),{node:e.node,parentNode:e.parentNode,path:e.path,treeIndex:e.treeIndex,treeId:e.treeId}),endDrag:(e,t)=>{this.rafId&&cancelAnimationFrame(this.rafId),this.endDrag(t.getDropResult()),this.resetDragVariables()},isDragging:(e,t)=>{const n=t.getItem().node;return e.node===n}};return(0,d.DragSource)(this.dndType,t,(function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging(),didDrop:t.didDrop()}}))(e)}wrapTarget(e){const t={drop:(e,t,n)=>{this.rafId&&cancelAnimationFrame(this.rafId);const r={node:t.getItem().node,path:t.getItem().path,treeIndex:t.getItem().treeIndex,treeId:this.treeId,minimumTreeIndex:e.treeIndex,depth:this.getTargetDepth(e,t,n)};return this.lastDropTargetNode=null,this.drop(r),r},hover:(e,t,n)=>{this.rafId?this.shouldSkipMoreFrames=!0:(this.shouldSkipMoreFrames=!1,this.hoverProps={dropTargetProps:e,monitor:t,component:n},this.rafId=requestAnimationFrame(this.deferredCallHoverHandler))},canDrop:this.canDrop.bind(this)};return(0,d.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}wrapPlaceholder(e){const t={drop:(e,t)=>{const{node:n,path:r,treeIndex:a}=t.getItem(),o={node:n,path:r,treeIndex:a,treeId:this.treeId,minimumTreeIndex:0,depth:0};return this.drop(o),o}};return(0,d.DropTarget)(this.dndType,t,(function(e,t){const n=t.getItem();return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),draggedNode:n?n.node:null}}))(e)}}function U(){return U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U.apply(this,arguments)}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Z(e,t,n[t])}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let B=1;const z=e=>{const t=F({},e,{style:F({},e.theme.style,e.style),innerStyle:F({},e.theme.innerStyle,e.innerStyle),reactVirtualizedListProps:F({},e.theme.reactVirtualizedListProps,e.reactVirtualizedListProps)}),n={nodeContentRenderer:I,placeholderRenderer:N,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:x};return Object.keys(n).forEach((r=>{null===e[r]&&(t[r]=void 0!==e.theme[r]?e.theme[r]:n[r])})),t};class H extends r.Component{constructor(e){super(e);const{dndType:t,nodeContentRenderer:n,treeNodeRenderer:r,isVirtualized:a,slideRegionSize:o}=z(e);this.dndManager=new V(this),this.treeId=`rst__${B}`,B+=1,this.dndType=t||this.treeId,this.nodeContentRenderer=this.dndManager.wrapSource(n),this.treePlaceholderRenderer=this.dndManager.wrapPlaceholder(D),this.treeNodeRenderer=this.dndManager.wrapTarget(r),a&&(this.scrollZoneVirtualList=(c._t||c.ZP)(l.aV),this.vStrength=(0,c.Kx)(o),this.hStrength=(0,c.v7)(o)),this.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,draggingExpandedPaths:[],ignoreOneTreeUpdate:!1,instanceProps:{treeData:this.props.treeData||[],searchQuery:null,searchFocusOffset:null,ignoreTreeChanges:!1}},this.toggleChildrenVisibility=this.toggleChildrenVisibility.bind(this),this.moveNode=this.moveNode.bind(this),this.startDrag=this.startDrag.bind(this),this.dragHover=this.dragHover.bind(this),this.endDrag=this.endDrag.bind(this),this.drop=this.drop.bind(this),this.handleDndMonitorChange=this.handleDndMonitorChange.bind(this)}componentDidMount(){H.loadLazyChildren(this.props);const e=H.search(this.props,this.state,!0,!0,!1);this.setState(e),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}static getDerivedStateFromProps(e,t){const{instanceProps:n}=t,r={};return(0,s.equals)(n.searchQuery,e.searchQuery)?n.searchFocusOffset!==e.searchFocusOffset&&Object.assign(r,H.search(e,t,!0,!0,!0)):Object.assign(r,H.search(e,t,!0,!0,!1)),n.searchQuery=e.searchQuery,n.searchFocusOffset=e.searchFocusOffset,r.instanceProps=n,r}componentDidUpdate(e,t){if(this.state.dragging!==t.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode}),this.state.dragging)if((0,s.equals)(this.props.treeData,e.treeData))this.state.draggingTreeData&&t.draggingTreeData!==this.state.draggingTreeData&&(0,v._p)({treeData:this.state.draggingTreeData,getNodeKey:this.props.getNodeKey,callback:e=>{let{node:t,path:n,lowerSiblingCounts:r,treeIndex:a}=e;t.pending&&t.expanded&&this.props.onLazyLoadChildren({node:t,path:n,lowerSiblingCounts:r,treeIndex:a})}});else{const{treeData:e}=(0,v.ZF)({treeData:this.props.treeData,path:t.draggedPath,getNodeKey:this.props.getNodeKey});this.setState((t=>{let{draggingExpandedPaths:n}=t;return{draggingTreeData:n.reduce(((e,t)=>{let n;try{n=(0,v.Gm)({treeData:e,path:t,newNode:e=>{let{node:t}=e;return F({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey})}catch(t){n=e}return n}),e)}}))}else if(this.props.treeData!==e.treeData){const t=(0,s.equals)(this.props.treeData,e.treeData),{ignoreOneTreeUpdate:n,instanceProps:r}=this.state,a={};t||(n?a.ignoreOneTreeUpdate=!1:(a.searchFocusTreeIndex=null,H.loadLazyChildren(this.props),Object.assign(a,H.search(this.props,this.state,!1,!1,!1))),a.draggingTreeData=null,a.draggedNode=null,a.draggedMinimumTreeIndex=null,a.draggedDepth=null,a.dragging=!1,a.draggingExpandedPaths=[],a.instanceProps=F({},r,{treeData:this.props.treeData}),this.setState(a))}}componentWillUnmount(){this.clearMonitorSubscription()}getRows(e){return L({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:e})}handleDndMonitorChange(){!this.props.dragDropManager.getMonitor().isDragging()&&this.state.draggingTreeData&&this.endDrag()}toggleChildrenVisibility(e){let{node:t,path:n}=e;const{instanceProps:r}=this.state,a=(0,v.Gm)({treeData:r.treeData,path:n,newNode:e=>{let{node:t}=e;return F({},t,{expanded:!t.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(a),this.props.onVisibilityToggle({treeData:a,node:t,expanded:!t.expanded,path:n})}moveNode(e){let{node:t,path:n,treeIndex:r,depth:a,minimumTreeIndex:o}=e;const{treeData:i,treeIndex:l,path:s,parentNode:c}=(0,v.Lf)({treeData:this.state.draggingTreeData,newNode:t,depth:a,minimumTreeIndex:o,expandParent:!0,getNodeKey:this.props.getNodeKey});this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1,draggingExpandedPaths:[]},(()=>{this.props.onChange(i),this.props.onMoveNode({treeData:i,node:t,treeIndex:l,path:s,nextPath:s,nextTreeIndex:l,prevPath:n,prevTreeIndex:r,nextParentNode:c})}))}static search(e,t,n,r,a){const{onChange:o,getNodeKey:i,searchFinishCallback:l,searchQuery:s,searchMethod:c,searchFocusOffset:d,onlyExpandSearchedNodes:p}=e,{instanceProps:u}=t;if(!s&&!c)return l&&l([]),{searchMatches:[]};const h={},{treeData:g,matches:m}=(0,v.sE)({getNodeKey:i,treeData:p?(0,v.Vk)({treeData:u.treeData,expanded:!1}):u.treeData,searchQuery:s,searchMethod:c||j.v2,searchFocusOffset:d,expandAllMatchPaths:r&&!a,expandFocusMatchPaths:!!r});r&&(h.ignoreOneTreeUpdate=!0,o(g)),l&&l(m);let f=null;return n&&null!==d&&d<m.length&&(f=m[d].treeIndex),h.searchMatches=m,h.searchFocusTreeIndex=f,h}startDrag(e){let{path:t}=e;this.setState((e=>{const{treeData:n,node:r,treeIndex:a}=(0,v.ZF)({treeData:e.instanceProps.treeData,path:t,getNodeKey:this.props.getNodeKey});return{draggingTreeData:n,draggedNode:r,draggedDepth:t.length-1,draggedMinimumTreeIndex:a,draggedPath:t,dragging:!0}}))}dragHover(e){let{node:t,depth:n,minimumTreeIndex:r}=e;this.state.draggedDepth===n&&this.state.draggedMinimumTreeIndex===r||this.setState((e=>{let{draggingTreeData:a,instanceProps:o,draggingExpandedPaths:i}=e;const l=a||o.treeData,c=_({treeData:l,newNode:t,depth:n,minimumTreeIndex:r,expandParent:!0,getNodeKey:this.props.getNodeKey}),d=this.getRows(c.treeData)[c.treeIndex].path.slice(0,-1),p=(0,s.pipe)((0,s.when)((0,s.always)((0,s.gt)(d.length,0)),(0,s.append)(d)),(0,s.uniqWith)((0,s.eqBy)(String)))(i);return{draggedNode:t,draggedDepth:n,draggedMinimumTreeIndex:r,draggingTreeData:(0,v.Gm)({treeData:l,path:d,newNode:e=>{let{node:t}=e;return F({},t,{expanded:!0})},getNodeKey:this.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0,draggingExpandedPaths:p}}))}endDrag(e){const{instanceProps:t}=this.state;if(e){if(e.treeId!==this.treeId){const{node:n,path:r,treeIndex:a}=e;let o=this.props.shouldCopyOnOutsideDrop;"function"==typeof o&&(o=o({node:n,prevTreeIndex:a,prevPath:r}));let i=this.state.draggingTreeData||t.treeData;o&&(i=(0,v.Gm)({treeData:t.treeData,path:r,newNode:e=>{let{node:t}=e;return F({},t)},getNodeKey:this.props.getNodeKey})),this.props.onChange(i),this.props.onMoveNode({treeData:i,node:n,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:r,prevTreeIndex:a})}}else(()=>{this.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})})()}drop(e){this.moveNode(e)}canNodeHaveChildren(e){const{canNodeHaveChildren:t}=this.props;return!t||t(e)}static loadLazyChildren(e){(0,v._p)({treeData:e.treeData,getNodeKey:e.getNodeKey,callback:t=>{let{node:n,path:r,lowerSiblingCounts:a,treeIndex:o}=t;n.pending&&(n.expanded||e.loadCollapsedLazyChildren)&&e.onLazyLoadChildren({node:n,path:r,lowerSiblingCounts:a,treeIndex:o,done:t=>e.onChange((0,v.Gm)({treeData:e.treeData,path:r,newNode:e=>{let{node:r}=e;return r===n?F({},r,{children:t}):r},getNodeKey:e.getNodeKey}),!0)})}})}renderRow(e,t){let{listIndex:n,style:r,getPrevRow:o,matchKeys:i,swapFrom:l,swapDepth:s,swapLength:c}=t;const{node:d,parentNode:p,path:u,lowerSiblingCounts:h,treeIndex:g}=e,{canDrag:m,generateNodeProps:f,scaffoldBlockPxWidth:b,searchFocusOffset:y,rowDirection:x}=z(this.props),v=this.treeNodeRenderer,E=this.nodeContentRenderer,w=u[u.length-1],T=w in i,P=T&&i[w]===y,I={node:d,parentNode:p,path:u,lowerSiblingCounts:h,treeIndex:g,isSearchMatch:T,isSearchFocus:P},O=f?f(I):{},C="function"!=typeof m?m:m(I),D={treeIndex:g,scaffoldBlockPxWidth:b,node:d,path:u,treeId:this.treeId,rowDirection:x};return a().createElement(v,U({style:r,key:w,listIndex:n,getPrevRow:o,lowerSiblingCounts:h,swapFrom:l,swapLength:c,swapDepth:s},D),a().createElement(E,U({parentNode:p,isSearchMatch:T,isSearchFocus:P,canDrag:C,toggleChildrenVisibility:this.toggleChildrenVisibility},D,O)))}render(){const{dragDropManager:e,style:t,className:n,innerStyle:r,rowHeight:o,isVirtualized:i,placeholderRenderer:s,reactVirtualizedListProps:c,getNodeKey:d,rowDirection:p}=z(this.props),{searchMatches:u,searchFocusTreeIndex:h,draggedNode:m,draggedDepth:f,draggedMinimumTreeIndex:b}=this.state,y=this.state.draggingTreeData||this.props.treeData,x="rtl"===p?"rst__rtl":null;let v,E=null,w=null;if(m&&null!==b){const e=_({treeData:y,newNode:m,depth:f,minimumTreeIndex:b,expandParent:!0,getNodeKey:d}),t=b;E=e.treeIndex,w=1+M({node:m}),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const a=[...e.slice(0,t),...e.slice(t+r)];return[...a.slice(0,n),...e.slice(t,t+r),...a.slice(n)]}(this.getRows(e.treeData),E,t,w)}else v=this.getRows(y);const T={};u.forEach(((e,t)=>{let{path:n}=e;T[n[n.length-1]]=t}));const P=null!==h?{scrollToIndex:h}:{};let I,O=t;if(v.length<1){const e=this.treePlaceholderRenderer,t=s;I=a().createElement(e,{treeId:this.treeId,drop:this.drop},a().createElement(t,null))}else if(i){O=F({height:"100%"},O);const t=this.scrollZoneVirtualList;I=a().createElement(l.qj,null,(n=>{let{height:i,width:l}=n;return a().createElement(t,U({},P,{dragDropManager:e,verticalStrength:this.vStrength,horizontalStrength:this.hStrength,speed:30,scrollToAlignment:"start",className:this.props.classes.rst__virtualScrollOverride,width:l,onScroll:e=>{let{scrollTop:t}=e;this.scrollTop=t},height:i,style:r,rowCount:v.length,estimatedRowSize:"function"!=typeof o?o:void 0,rowHeight:"function"!=typeof o?o:e=>{let{index:t}=e;return o({index:t,treeIndex:t,node:v[t].node,path:v[t].path})},rowRenderer:e=>{let{index:t,style:n}=e;return this.renderRow(v[t],{listIndex:t,style:n,getPrevRow:()=>v[t-1]||null,matchKeys:T,swapFrom:E,swapDepth:f,swapLength:w})}},c))}))}else I=v.map(((e,t)=>this.renderRow(e,{listIndex:t,style:{height:"function"!=typeof o?o:o({index:t,treeIndex:t,node:e.node,path:e.path})},getPrevRow:()=>v[t-1]||null,matchKeys:T,swapFrom:E,swapDepth:f,swapLength:w})));return a().createElement("div",{className:g("rst__tree",n,x),style:O},I)}}H.propTypes={classes:i().object,dragDropManager:i().shape({getMonitor:i().func}).isRequired,treeData:i().arrayOf(i().object).isRequired,style:i().shape({}),className:i().string,innerStyle:i().shape({}),rowHeight:i().oneOfType([i().number,i().func]),slideRegionSize:i().number,reactVirtualizedListProps:i().shape({}),scaffoldBlockPxWidth:i().number,maxDepth:i().number,searchMethod:i().func,searchQuery:i().any,searchFocusOffset:i().number,searchFinishCallback:i().func,generateNodeProps:i().func,isVirtualized:i().bool,treeNodeRenderer:i().func,nodeContentRenderer:i().func,placeholderRenderer:i().func,theme:i().shape({style:i().shape({}),innerStyle:i().shape({}),reactVirtualizedListProps:i().shape({}),scaffoldBlockPxWidth:i().number,slideRegionSize:i().number,rowHeight:i().oneOfType([i().number,i().func]),treeNodeRenderer:i().func,nodeContentRenderer:i().func,placeholderRenderer:i().func}),getNodeKey:i().func,onChange:i().func.isRequired,onMoveNode:i().func,canDrag:i().oneOfType([i().func,i().bool]),canDrop:i().func,canNodeHaveChildren:i().func,shouldCopyOnOutsideDrop:i().oneOfType([i().func,i().bool]),onVisibilityToggle:i().func,dndType:i().string,onDragStateChanged:i().func,onlyExpandSearchedNodes:i().bool,rowDirection:i().string,onLazyLoadChildren:i().func,ignoreTreeChanges:i().bool},H.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:()=>!0,className:"",dndType:null,generateNodeProps:null,getNodeKey:j.TS,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:()=>{},onVisibilityToggle:()=>{},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:()=>{},onlyExpandSearchedNodes:!1,rowDirection:"ltr",onLazyLoadChildren:()=>{},ignoreTreeChanges:!1},(0,p.polyfill)(H);const W=(0,u.Z)((()=>({"@global .ReactVirtualized__Grid__innerScrollContainer":{overflow:"visible !important"},"@global .ReactVirtualized__Grid":{outline:"none"},"@global .ReactVirtualized__List":{},rst__virtualScrollOverride:{overflow:"auto !important"},"@global .rst__rtl .ReactVirtualized__Grid__innerScrollContainer":{direction:"rtl"}})))(H),q=e=>a().createElement(d.DndContext.Consumer,null,(t=>{let{dragDropManager:n}=t;return void 0===n?null:a().createElement(W,U({},e,{dragDropManager:n}))})),G=e=>a().createElement(h.l,null,a().createElement(q,e))},65758:(e,t,n)=>{"use strict";function r(e){let{treeIndex:t}=e;return t}function a(e){return"string"==typeof e?e:null===e||"object"!=typeof e||!e.props||!e.props.children||"string"!=typeof e.props.children&&"object"!=typeof e.props.children?"":"string"==typeof e.props.children?e.props.children:e.props.children.map((e=>a(e))).join("")}function o(e,t,n,r,o){return"function"==typeof n[e]?String(n[e]({node:n,path:r,treeIndex:o})).indexOf(t)>-1:"object"==typeof n[e]?a(n[e]).indexOf(t)>-1:n[e]&&String(n[e]).indexOf(t)>-1}function i(e){let{node:t,path:n,treeIndex:r,searchQuery:a}=e;return o("title",a,t,n,r)||o("subtitle",a,t,n,r)}n.d(t,{TS:()=>r,v2:()=>i,ZP:()=>l});const l={defaultSearchMethod:i,defaultGetNodeKey:r}},21113:(e,t,n)=>{"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){let{targetIndex:t,node:n,currentIndex:r,getNodeKey:a,path:i=[],lowerSiblingCounts:l=[],ignoreCollapsed:s=!0,isPseudoRoot:c=!1}=e;const d=c?[]:[...i,a({node:n,treeIndex:r})];if(r===t)return{node:n,lowerSiblingCounts:l,path:d};if(!n.children||s&&!0!==n.expanded)return{nextIndex:r+1};let p=r+1;const u=n.children.length;for(let e=0;e<u;e+=1){const r=o({ignoreCollapsed:s,getNodeKey:a,targetIndex:t,node:n.children[e],currentIndex:p,lowerSiblingCounts:[...l,u-e-1],path:d});if(r.node)return r;p=r.nextIndex}return{nextIndex:p}}function i(e){let{node:t,ignoreCollapsed:n=!0}=e;return o({getNodeKey:()=>{},ignoreCollapsed:n,node:t,currentIndex:0,targetIndex:-1}).nextIndex-1}function l(e){let{callback:t,getNodeKey:n,ignoreCollapsed:r,isPseudoRoot:a=!1,node:o,parentNode:i=null,currentIndex:s,path:c=[],lowerSiblingCounts:d=[]}=e;const p=a?[]:[...c,n({node:o,treeIndex:s})];if(!a&&!1===t(a?null:{node:o,parentNode:i,path:p,lowerSiblingCounts:d,treeIndex:s}))return!1;if(!o.children||!0!==o.expanded&&r&&!a)return s;let u=s;const h=o.children.length;if("function"!=typeof o.children)for(let e=0;e<h;e+=1)if(u=l({callback:t,getNodeKey:n,ignoreCollapsed:r,node:o.children[e],parentNode:a?null:o,currentIndex:u+1,lowerSiblingCounts:[...d,h-e-1],path:p}),!1===u)return!1;return u}function s(e){let{callback:t,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:o=!1,node:i,parentNode:l=null,currentIndex:c,path:d=[],lowerSiblingCounts:p=[]}=e;const u=r({},i),h=o?[]:[...d,n({node:u,treeIndex:c})],g={node:u,parentNode:l,path:h,lowerSiblingCounts:p,treeIndex:c};if(!u.children||!0!==u.expanded&&a&&!o)return{treeIndex:c,node:t(g)};let m=c;const f=u.children.length;return"function"!=typeof u.children&&(u.children=u.children.map(((e,r)=>{const i=s({callback:t,getNodeKey:n,ignoreCollapsed:a,node:e,parentNode:o?null:u,currentIndex:m+1,lowerSiblingCounts:[...p,f-r-1],path:h});return m=i.treeIndex,i.node}))),{node:t(g),treeIndex:m}}function c(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:a=!0}=e;!t||t.length<1||l({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function d(e){let{treeData:t,getNodeKey:n,callback:r,ignoreCollapsed:a=!0}=e;return!t||t.length<1?[]:s({callback:r,getNodeKey:n,ignoreCollapsed:a,isPseudoRoot:!0,node:{children:t},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function p(e){let{treeData:t,expanded:n=!0}=e;return d({treeData:t,callback:e=>{let{node:t}=e;return r({},t,{expanded:n})},getNodeKey:e=>{let{treeIndex:t}=e;return t},ignoreCollapsed:!1})}function u(e){let{treeData:t,path:n,newNode:a,getNodeKey:o,ignoreCollapsed:l=!0}=e;const s="RESULT_MISS",c=e=>{let{isPseudoRoot:t=!1,node:d,currentTreeIndex:p,pathIndex:u}=e;if(!t&&o({node:d,treeIndex:p})!==n[u])return s;if(u>=n.length-1)return"function"==typeof a?a({node:d,treeIndex:p}):a;if(!d.children)throw new Error("Path referenced children of node with no children.");let h=p+1;for(let e=0;e<d.children.length;e+=1){const t=c({node:d.children[e],currentTreeIndex:h,pathIndex:u+1});if(t!==s)return r({},d,t?{children:[...d.children.slice(0,e),t,...d.children.slice(e+1)]}:{children:[...d.children.slice(0,e),...d.children.slice(e+1)]});h+=1+i({node:d.children[e],ignoreCollapsed:l})}return s},d=c({node:{children:t},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(d===s)throw new Error("No node found at the given path.");return d.children}function h(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e,o=null,i=null;return{treeData:u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:e=>{let{node:t,treeIndex:n}=e;return o=t,i=n,null}}),node:o,treeIndex:i}}function g(e){let{targetDepth:t,minimumTreeIndex:n,newNode:a,ignoreCollapsed:o,expandParent:l,isPseudoRoot:s=!1,isLastChild:c,node:d,currentIndex:p,currentDepth:u,getNodeKey:h,path:m=[]}=e;const f=e=>s?[]:[...m,h({node:e,treeIndex:p})];if(p>=n-1||c&&(!d.children||!d.children.length)){if("function"==typeof d.children)throw new Error("Cannot add to children defined by a function");{const e=r({},d,l?{expanded:!0}:{},{children:d.children?[a,...d.children]:[a]});return{node:e,nextIndex:p+2,insertedTreeIndex:p+1,parentPath:f(e),parentNode:s?null:e}}}if(u>=t-1){if(!d.children||"function"==typeof d.children||!0!==d.expanded&&o&&!s)return{node:d,nextIndex:p+1};let e=p+1,t=null,l=null;for(let r=0;r<d.children.length;r+=1){if(e>=n){t=e,l=r;break}e+=1+i({node:d.children[r],ignoreCollapsed:o})}if(null===l){if(e<n&&!c)return{node:d,nextIndex:e};t=e,l=d.children.length}const u=r({},d,{children:[...d.children.slice(0,l),a,...d.children.slice(l)]});return{node:u,nextIndex:e,insertedTreeIndex:t,parentPath:f(u),parentNode:s?null:u}}if(!d.children||"function"==typeof d.children||!0!==d.expanded&&o&&!s)return{node:d,nextIndex:p+1};let b=null,y=null,x=null,v=p+1,E=d.children;"function"!=typeof E&&(E=E.map(((e,r)=>{if(null!==b)return e;const i=g({targetDepth:t,minimumTreeIndex:n,newNode:a,ignoreCollapsed:o,expandParent:l,isLastChild:c&&r===E.length-1,node:e,currentIndex:v,currentDepth:u+1,getNodeKey:h,path:[]});return"insertedTreeIndex"in i&&({insertedTreeIndex:b,parentNode:x,parentPath:y}=i),v=i.nextIndex,i.node})));const w=r({},d,{children:E}),T={node:w,nextIndex:v};return null!==b&&(T.insertedTreeIndex=b,T.parentPath=[...f(w),...y],T.parentNode=x),T}function m(e){let{treeData:t,depth:n,minimumTreeIndex:r,newNode:a,getNodeKey:o=(()=>{}),ignoreCollapsed:i=!0,expandParent:l=!1}=e;if(!t&&0===n)return{treeData:[a],treeIndex:0,path:[o({node:a,treeIndex:0})],parentNode:null};const s=g({targetDepth:n,minimumTreeIndex:r,newNode:a,ignoreCollapsed:i,expandParent:l,getNodeKey:o,isPseudoRoot:!0,isLastChild:!0,node:{children:t},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in s))throw new Error("No suitable position found to insert.");const c=s.insertedTreeIndex;return{treeData:s.node.children,treeIndex:c,path:[...s.parentPath,o({node:a,treeIndex:c})],parentNode:s.parentNode}}function f(e){let{treeData:t,getNodeKey:n,ignoreCollapsed:r=!0}=e;if(!t||t.length<1)return[];const a=[];return c({treeData:t,getNodeKey:n,ignoreCollapsed:r,callback:e=>{a.push(e)}}),a}function b(e,t){return!!e.children&&"function"!=typeof e.children&&e.children.some((e=>e===t||b(e,t)))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.children?"function"==typeof e.children?t+1:e.children.reduce(((e,n)=>Math.max(e,y(n,t+1))),t):t}function x(e){let{getNodeKey:t,treeData:n,searchQuery:a,searchMethod:o,searchFocusOffset:i,expandAllMatchPaths:l=!1,expandFocusMatchPaths:s=!0}=e,c=0;const d=e=>{let{isPseudoRoot:n=!1,node:p,currentIndex:u,path:h=[]}=e,g=[],m=!1,f=!1;const b=n?[]:[...h,t({node:p,treeIndex:u})],y=n?null:{path:b,treeIndex:u},x=p.children&&"function"!=typeof p.children&&p.children.length>0;!n&&o(r({},y,{node:p,searchQuery:a}))&&(c===i&&(f=!0),c+=1,m=!0);let v=u;const E=r({},p);return x&&(E.children=E.children.map((e=>{const t=d({node:e,currentIndex:v+1,path:b});return t.node.expanded?v=t.treeIndex:v+=1,(t.matches.length>0||t.hasFocusMatch)&&(g=[...g,...t.matches],t.hasFocusMatch&&(f=!0),(l&&t.matches.length>0||(l||s)&&t.hasFocusMatch)&&(E.expanded=!0)),t.node}))),n||E.expanded||(g=g.map((e=>r({},e,{treeIndex:null})))),m&&(g=[r({},y,{node:E}),...g]),{node:g.length>0?E:p,matches:g,hasFocusMatch:f,treeIndex:v}},p=d({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:p.matches,treeData:p.node.children}}n.d(t,{o5:()=>i,_p:()=>c,Vk:()=>p,Gm:()=>u,ZF:()=>h,Lf:()=>m,Pg:()=>f,SG:()=>b,hh:()=>y,sE:()=>x,ZP:()=>v});const v={find:x,getDepth:y,isDescendant:b,getTreeFromFlatData:function(e){let{flatData:t,getKey:n=(e=>e.id),getParentKey:a=(e=>e.parentId),rootKey:o="0"}=e;if(!t)return[];const i={};if(t.forEach((e=>{const t=a(e);t in i?i[t].push(e):i[t]=[e]})),!(o in i))return[];const l=e=>{const t=n(e);return t in i?r({},e,{children:i[t].map((e=>l(e)))}):r({},e)};return i[o].map((e=>l(e)))},getFlatDataFromTree:f,insertNode:m,addNodeUnderParent:function(e){let{treeData:t,newNode:n,parentKey:a=null,getNodeKey:o,ignoreCollapsed:l=!0,expandParent:s=!1,addAsFirstChild:c=!1}=e;if(null===a)return c?{treeData:[n,...t||[]],treeIndex:0}:{treeData:[...t||[],n],treeIndex:(t||[]).length};let p=null,u=!1;const h=d({treeData:t,getNodeKey:o,ignoreCollapsed:l,callback:e=>{let{node:t,treeIndex:o,path:d}=e;const h=d?d[d.length-1]:null;if(u||h!==a)return t;u=!0;const g=r({},t);if(s&&(g.expanded=!0),!g.children)return p=o+1,r({},g,{children:[n]});if("function"==typeof g.children)throw new Error("Cannot add to children defined by a function");let m=o+1;for(let e=0;e<g.children.length;e+=1)m+=1+i({node:g.children[e],ignoreCollapsed:l});return p=m,r({},g,{children:c?[n,...g.children]:[...g.children,n]})}});if(!u)throw new Error("No node found with the given key.");return{treeData:h,treeIndex:p}},getNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e,o=null;try{u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:e=>{let{node:t,treeIndex:n}=e;return o={node:t,treeIndex:n},t}})}catch(e){}return o},removeNode:h,removeNodeAtPath:function(e){let{treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a=!0}=e;return u({treeData:t,path:n,getNodeKey:r,ignoreCollapsed:a,newNode:null})},changeNodeAtPath:u,toggleExpandedForAll:p,map:d,walk:c,getVisibleNodeInfoAtIndex:function(e){let{treeData:t,index:n,getNodeKey:r}=e;if(!t||t.length<1)return null;const a=o({targetIndex:n,getNodeKey:r,node:{children:t,expanded:!0},currentIndex:-1,path:[],lowerSiblingCounts:[],isPseudoRoot:!0});return a.node?a:null},getVisibleNodeCount:function(e){let{treeData:t}=e;const n=e=>e.children&&!0===e.expanded&&"function"!=typeof e.children?1+e.children.reduce(((e,t)=>e+n(t)),0):1;return t.reduce(((e,t)=>e+n(t)),0)},getDescendantCount:i}},11013:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var r=n(24328),a=n.n(r),o=n(13980),i=n.n(o),l=n(94079),s=n(87918),c=n.n(s),d=n(71153),p=n.n(d),u=n(17440);const h=(0,n(79692).Z)({editor:{display:"flex",flexDirection:"column",padding:"0 24px 5px"},title:{color:"rgba(0, 0, 0, 0.6)",fontSize:"16px",letterSpacing:"0.15px",lineHeight:"24px",margin:"17px 0 24px"},item:{marginBottom:"20px"},dense:{marginBottom:0},actionButtons:{display:"flex",justifyContent:"flex-end",margin:"0 8px 10px","& > button":{fontSize:"14px",lineHeight:"16px",marginLeft:"8px",padding:"10px 8px",backgroundColor:"rgba(98, 2, 238, 0)"}}});var g=n(70687),m=n(59431),f=n(7154),b=n(26579),y=n(81077),x=n(91262);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=e=>{let{connection:t,modifiedEntity:n,allModifiedEntities:o,dispatch:i,config:s,mode:d,metadata:E,globalSearchRequestOptions:w,error:T}=e;const{relationUri:P,relationType:I,direction:O}=t.relation,C=t.isNew,D=h(),{inRelations:k=[],outRelations:S=[]}=(0,r.useMemo)((()=>(0,g.ocC)({content:t.parentEntityUri?s.contentSecondLevel:s.content,direction:O,relationType:I,mode:d,metadata:E})),[s,O,I,d,E,t.parentEntityUri]),N=(0,r.useMemo)((()=>(0,g.xF8)(E,I)),[I,E]),R=(0,r.useMemo)((()=>v({attributes:v({},m.N5.relations.selectors.getRelationAttributesFromConnection(t))},(0,g.p2l)(t.relation))),[t]),_=(0,r.useRef)(t),L=(0,r.useRef)(n),M=(0,r.useMemo)((()=>(0,g.SAs)(o,n)),[o,n]),j=(0,r.useRef)([]);(0,r.useEffect)((()=>{j.current=(0,u.pipe)((0,u.concat)(M.map((0,u.prop)("uri"))),u.uniq)(j.current)}),[M]);const A=(0,r.useRef)(M),V=(0,g.z7d)(k,S),U=_.current!==t||L.current!==n||(F=A.current,Z=M,F.length!==Z.length||F.some(((e,t)=>F[t]!==Z[t])))||t.isNew&&!(0,g.O27)((0,u.path)(["relation","object","attributes"],t));var F,Z;const B=C?m.N5.relations.actions.addRelation:m.N5.relations.actions.editRelation,z=(0,r.useCallback)((0,u.pipe)(m.N5.relations.actions.setRelationType(s.id,P),i),[s,P,i]),H=(0,r.useCallback)((()=>(0,u.pipe)(m.N5.relations.actions.closeRelationEditor,i)(s.id,P)),[s,P,i]),W=(0,r.useCallback)((e=>{if(n){const t=(0,g.nt9)(E,n.type);return(0,g.wx9)(t,n,e)}return e}),[n,E]),q=(0,r.useCallback)((e=>i(m.N5.modifiedEntities.actions.entityCreated(e))),[i]),G=(0,r.useCallback)((e=>i(m.N5.modifiedEntities.actions.entityDeleted(e))),[i]),K=(0,r.useCallback)((e=>{n&&G(n.uri),i(m.N5.relations.actions.setRelationEntity(s.id,P,e)),T&&i(m.N5.errors.actions.errorDeactivated((0,g.iFp)(T)))}),[s.id,P,i,n,G,T]),Y=(0,r.useCallback)((()=>{const e=(0,g.Bd_)(E,o,t);return i(m.N5.errors.actions.errorsSet(e)),0===e.length}),[t,E,o,i]),$=(0,r.useCallback)((()=>i(m.N5.errors.actions.errorsSet([]))),[i]),Q=(0,r.useCallback)((0,u.pipe)((0,u.always)(t),(0,u.when)(Y,(0,u.pipe)(g.zhn,W,B(s.id),i,(0,u.always)((0,u.differenceWith)(u.equals,j.current,M.map((0,u.prop)("uri")))),(0,u.forEach)(G),H))),[t,s,i,W,Y,M]),X=(0,r.useCallback)((()=>{const e=L.current;n!==e&&(e?(q(e),n&&n.uri!==e.uri&&G(n.uri)):G(n.uri));const t=A.current;(0,u.differenceWith)(u.equals,j.current,t.map((0,u.prop)("uri"))).forEach(G),t.forEach(q),$(),H()}),[H,q,G,$,n]),J=(0,r.useCallback)((e=>(0,u.pipe)(m.N5.actions.addAttributes,i)(e.map((e=>v({},e,{viewId:s.id}))))),[s.id,i]),ee=(0,r.useCallback)((e=>(0,u.pipe)(m.N5.actions.modifyAttribute,i)(v({},e,{viewId:s.id}))),[s.id,i]),te=(0,r.useCallback)((e=>(0,u.pipe)(m.N5.actions.removeAttribute,i)(v({},e,{viewId:s.id}))),[s.id,i]),ne=(0,r.useCallback)(((e,t)=>{const n=(0,g.nt9)(E,e),r=(0,u.pipe)(g.wcJ,(0,g._kX)(d))(n),a=(0,g.pBq)({entityTypeUri:e,initValue:t,attributeTypes:r,metadata:E,mode:d});K(a),q(a)}),[q,K,d,E]),re=(0,g.e$p)(T),ae=(0,r.useCallback)((()=>{const{content:e,contentSecondLevel:n}=s;return n&&t.parentEntityUri?n.entityTypes:e.entityTypes}),[s,t.parentEntityUri]);return a().createElement(a().Fragment,null,a().createElement("div",{className:D.editor},a().createElement(l.Typography,{className:D.title},C?c().text("Add new item"):c().text("Edit item")),null===V&&a().createElement(f.Z,{className:D.item,relation:t.relation,inRelationTypes:k,outRelationTypes:S,onChange:z}),Boolean(I)&&a().createElement(a().Fragment,null,a().createElement(b.Z,{errorMessage:re},a().createElement(y.Z,{className:p()(D.item,{[D.dense]:re||t.entity&&(0,g.ZiX)(t.entity.entityUri)}),entity:t.entity||{},entityTypesUris:ae()||[],max:s.max||20,globalSearchRequestOptions:w,mode:d,onChange:K,onCreate:ne,metadata:E,attributeTypesSelectionStrategy:g.wcJ})),a().createElement(x.Z,{className:D.item,attrTypes:N,entity:R,showEmptyEditors:!0,crosswalks:t.crosswalks,mode:d,parentUri:P,onAddAttributes:J,onChangeAttribute:ee,onDeleteAttribute:te}))),a().createElement("div",{className:D.actionButtons},a().createElement(l.Button,{onClick:X},c().text("Cancel")),a().createElement(l.Button,{color:"primary",disabled:!U,onClick:Q},c().text("Apply"))),a().createElement(l.Divider,null))};w.propTypes={connection:g.Rjq,modifiedEntity:g.pyR,allModifiedEntities:i().object,dispatch:i().func,config:g.PiC,mode:i().string,metadata:g.pGS,globalSearchRequestOptions:i().object,error:g.wfT,parentEntityUri:i().string};const T=w;const P=(0,n(52730).connect)(((e,t)=>{const n=(r=t,m.N5.relations.selectors.getEntityUriFromConnection(r.connection));var r;const a=(0,g.ZiX)(n);return{modifiedEntity:a?m.ZP.selectors.getModifiedEntity(e,n):null,allModifiedEntities:a?m.ZP.selectors.getModifiedEntities(e):null,globalSearchRequestOptions:m.ZP.selectors.getGlobalSearchRequestOptions(e,["ovOnly"]),error:(0,g.ATu)(t.connection,m.ZP.selectors.getProfileErrors(e))}}))(T)},67268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o),l=n(66244),s=n.n(l),c=n(44443),d=n(17440),p=n(71153),u=n.n(p);function h(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const g=e=>{let{x:t,y:n,width:r,height:a,id:o,minWidth:i,minHeight:l,maxWidth:s,maxHeight:c,isStatic:d}=e;return{x:t,y:n,w:r,h:a,minW:i,minH:l,maxW:s,maxH:c,i:o,static:d}},m=e=>{let{x:t,y:n,w:r,h:a,maxW:o,minW:i,minH:l,maxH:s,i:c}=e;return{x:t,y:n,width:r,height:a,minWidth:i,minHeight:l,maxWidth:o,maxHeight:s,id:c,isStatic:h(e,["x","y","w","h","maxW","minW","minH","maxH","i"]).static}},f=e=>(e||[]).map(m),b=(0,d.curry)(((e,t)=>(e||[]).find((0,d.propEq)("id",t)))),y=(0,d.curry)(((e,t,n)=>(0,d.mergeAll)([n,(0,d.pick)(e,t)]))),x=(0,d.curry)(((e,t,n)=>(n||[]).map((n=>(0,d.pipe)((0,d.prop)("id"),b(t),(0,d.defaultTo)({}),y(e,d.__,n))(n)))));var v=n(79692),E=n(70687);const w=(0,v.Z)((e=>({gridLayout:{position:"relative",width:"100%","& .react-grid-item":{"&.react-grid-placeholder":{background:"rgba(0, 0, 0, 0.03)",border:"2px dashed rgba(0, 0, 0, 0.3)",borderRadius:"3px",transitionDuration:"100ms",zIndex:7,userSelect:"none","& .react-resizable-handle":{display:"none"}},"&.static .react-resizable-handle":{display:"none"},"&.cssTransforms":{transitionProperty:"transform"},"&.resizing":{zIndex:9,willChange:"width, height",pointerEvents:"none"},"&.react-draggable-dragging":{transition:"none",zIndex:8,willChange:"transform","& .react-resizable-handle":{backgroundImage:"none"}},"& .react-resizable-handle":{position:"absolute",width:"17px",height:"17px",bottom:0,right:0,zIndex:20,backgroundImage:`url('${(0,E.m5F)('<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path stroke="#505050" stroke-opacity=".54" d="M9.5 0v10M0 9.5h9M7.5 4v4M4 7.5h3"/>\n</svg>')}')`,backgroundRepeat:"no-repeat",backgroundOrigin:"content-box",boxSizing:"border-box",cursor:"se-resize"},"&.fullscreen":{visibility:"visible",position:"unset",width:"100% !important",height:"100% !important",transform:"translate(0) !important"}}},gridFullscreen:{height:"100% !important",overflowY:"hidden","& .react-resizable-handle, & .react-grid-item":{visibility:"hidden"}}})));function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const I=e=>{let{views:t,layout:n,layoutOptions:r,onLayoutChanged:a,draggableHandle:l,LayoutItem:p,onRemove:h,onDrop:y,droppingItem:v,isDroppable:E,classes:I}=e;const O=(0,o.useRef)(),C=w(),[D,k]=(0,o.useState)(null),[S,N]=(0,o.useState)(0),{cols:R,rowHeight:_,margin:L}=r,M=(0,o.useMemo)((()=>(e=>(e||[]).map(g))(n)),[n]),j=(0,d.pipe)(f,x(["autosizing"],n),a),A=(0,o.useCallback)((e=>k((t=>t?null:e))),[]),V=null!==D,U=(0,o.useCallback)(((e,t)=>{let o=!1;const i=n.map((n=>{if(n.id===t&&e){const t=((e,t)=>{const{margin:n,rowHeight:r}=t;return Math.ceil((e+n[1])/(r+n[1]))})(e,r);if(n.height!==t)return o=!0,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e}({},n,{minHeight:t,maxHeight:t,height:t})}return n}));o&&a(i)}),[n,r,a]);return i().createElement(i().Fragment,null,i().createElement(c.Z,{refreshMode:"debounce",refreshRate:50,handleWidth:!0,onResize:e=>N(e)}),i().createElement(s(),{innerRef:O,layout:M,cols:R,draggableHandle:l,autoSize:!0,rowHeight:_,width:S,margin:L,onLayoutChange:j,isResizable:!V,isDraggable:!V,className:u()(I.root,C.gridLayout,{[C.gridFullscreen]:V}),onDrop:(e,t,n)=>{y&&y(f(e),m(t),n)},droppingItem:v,isDroppable:E},M.map((e=>{const r=D===e.i,a=(b(n,e.i)||{}).autosizing?{AutosizeComponent:(o=e.i,i().createElement(c.Z,{handleHeight:!0,onResize:(e,t)=>{U(t,o)}}))}:{};var o;return i().createElement(p,T({key:e.i,layoutItemConfig:e,views:t,onToggleFullscreen:A,onRemove:h,className:u()({fullscreen:r},I.item),isFullscreen:r},a))}))))};I.defaultProps={layoutOptions:{cols:4,rowHeight:30,margin:[15,15]},onConfigChanged:d.identity,onLayoutChanged:d.identity,classes:{}},I.propTypes={views:a().array,layout:a().array,layoutOptions:a().object,onConfigChanged:a().func,onLayoutChanged:a().func,onDrop:a().func,onRemove:a().func,LayoutItem:a().elementType,draggableHandle:a().string,isDroppable:a().bool,droppingItem:a().object,classes:a().shape({root:a().string,item:a().string})};const O=(0,o.memo)(I)},48747:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(24328),a=n.n(r),o=n(17440),i=n(17871),l=n(75047);const s=e=>{let{children:t,className:n,position:a,map:o}=e;const[i,s]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=document.createElement("div"),t=o.controls[a].length;return o.controls[a].push(e),s(e),()=>{o.controls[a].removeAt(t)}}),[o,a]),(0,r.useEffect)((()=>{i&&n&&i.classList.add(n)}),[n,i]),i?(0,l.createPortal)(t,i):null};var c=n(87918),d=n.n(c),p=n(94079),u=n(83348),h=n(41039),g=n(97090);function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}const f=e=>a().createElement("svg",m({width:18,height:18,viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("path",{d:"M10.61 8.568A1.666 1.666 0 119.432 7.39l3.656-3.657a6.668 6.668 0 101.179 1.179L10.61 8.568zm-7.503 6.325A8.333 8.333 0 1114.893 3.107 8.333 8.333 0 013.107 14.893z",fill:"#000",stroke:"none",strokeWidth:1,fillRule:"evenodd",opacity:.54}));function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}const y=e=>a().createElement("svg",b({width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M18.29 11.44a1.49 1.49 0 012.12 0l1.15 1.15c.59.58.59 1.53 0 2.12L16.27 20H13v-3.27zM18.174 4c0 1.71-.26 3.285-.932 4.563-.946 1.798-2.609 2.724-4.906 2.46l-.855-.116c-4.382-.544-6.626.53-6.626 3.609 0 1.968 1.105 2.924 3.267 3.304.692.121 1.306.165 2.234.176L11 18v2l-.698-.003c-1.016-.013-1.71-.063-2.526-.206-3.018-.53-4.921-2.176-4.921-5.274 0-4.819 3.71-6.378 9.52-5.505 1.575.237 2.506-.255 3.098-1.38.451-.858.666-2.02.697-3.307L16.174 4h2zM18 13.97l-3.45 3.45v1.03h1.03L19.03 15 18 13.97z",id:"Draw_svg__a"})),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"Draw_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#Draw_svg__a"})),a().createElement("g",{mask:"url(#Draw_svg__b)",fill:"#000",fillOpacity:.54},a().createElement("path",{d:"M0 0h24v24H0z"}))));var x=n(79692);const v=(0,x.Z)({container:{margin:"2px",display:"flex",alignItems:"center"},button:{color:"rgba(0,0,0,0.54)",padding:0,height:"24px",width:"24px",minWidth:0},icon:{width:"20px",height:"20px"}}),E=(0,u.Z)(p.Button),w=e=>{let{drawingMode:t,drawingModes:n=[],hasActiveOverlay:r,onDrawingModeChanged:o,onClearOverlay:i}=e;const l=v(),s=e=>()=>{o(e)};return a().createElement("div",{className:l.container},t||r?a().createElement(E,{tooltipTitle:d().text("Clear area"),className:l.button,onClick:r?i:s(null)},a().createElement(h.Z,{className:l.icon})):n.map((e=>{const t=(e=>{switch(e){case g.vl.CIRCLE:return f;case g.vl.POLYGON:return y;default:return null}})(e);return a().createElement(E,{tooltipTitle:d().text("Draw area"),key:e,className:l.button,onClick:s(e)},a().createElement(t,{className:l.icon}))})))},T=(0,x.Z)({container:{height:"28px",marginRight:"7px",marginLeft:0},label:{fontSize:"11px",alignSelf:"center",lineHeight:"13px",marginLeft:"2px",letterSpacing:0},checkbox:{width:"20px",height:"20px",padding:"5px","& svg":{width:"16px",height:"16px"}}}),P=e=>{let{isSearchOnMapMove:t,onChangeIsSearchOnMapMove:n}=e;const r=T();return a().createElement(p.FormControlLabel,{classes:{root:r.container,label:r.label},control:a().createElement(p.Checkbox,{checked:t,onChange:e=>{n(e.target.checked)},color:"primary",className:r.checkbox}),label:d().text("Search as I move the map")})},I=e=>{const t=e.getBounds(),n=t.getNorthEast(),r=t.getSouthWest(),a=n.lat(),o=n.lng(),i=r.lat(),l=r.lng(),s=[],c=[];if(!(180===o&&-180===l||-180===o&&180===l)){const e=t.getCenter();s.push([a,e.lng()]),c.push([i,e.lng()])}return[[a,o],...s,[a,l],[i,l],...c,[i,o]]},O=e=>{switch(e){case g.vl.CIRCLE:return window.google.maps.drawing.OverlayType.CIRCLE;case g.vl.POLYGON:return window.google.maps.drawing.OverlayType.POLYGON;default:return null}},C=(e,t,n)=>{if(t.path){const r=n||new window.google.maps.LatLngBounds;t.path.forEach((e=>{let{lat:t,lng:n}=e;return r.extend(new window.google.maps.LatLng(t,n))})),e.fitBounds(r)}};var D=n(93517),k=n(66130),S=n(70687),N=n(91676);const R=(0,x.Z)({popper:{maxWidth:"263px",minWidth:"150px",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)",backgroundColor:"white",borderRadius:"2px"}});function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}const L=(0,S.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large (hover)</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large-(hover)" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.32" cx="11" cy="28.5" rx="6" ry="4.66666667"></ellipse>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n <path d="M20,2 L20,20 L14.755,20 L14.6905172,20.0815309 C14.3562717,20.5012516 14.0578656,20.8886742 13.7817711,21.2616986 L13.5786724,21.5390469 C11.92787,23.8181606 11.079024,25.6311217 11.0052669,27.2674145 L11.0052669,27.2674145 L11,27.5 L10.9968324,27.3203844 C10.9285422,25.3781621 9.75347502,23.1598866 7.22124201,20.0010865 L2,20 L2,2 L20,2 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-3)"></path>\n </g>\n</svg>'),M=(0,S.m5F)('<?xml version="1.0" encoding="UTF-8"?>\n<svg width="22px" height="32px" viewBox="0 0 22 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <title>View / Map / Marker / Large</title>\n <defs>\n <radialGradient cx="50%" cy="50.2950175%" fx="50%" fy="50.2950175%" r="49.7049825%" gradientTransform="translate(0.500000,0.502950),scale(0.777778,1.000000),rotate(90.000000),scale(1.000000,1.293560),translate(-0.500000,-0.502950)" id="radialGradient-1">\n <stop stop-color="#000000" offset="0%"></stop>\n <stop stop-color="#000000" stop-opacity="0" offset="100%"></stop>\n </radialGradient>\n <path d="M20,1 C20.5522847,1 21,1.44771525 21,2 L21,20 C21,20.5522847 20.5522847,21 20,21 L15.2374606,21.0021908 C14.9306693,21.3935449 14.6510143,21.7632851 14.3885453,22.1256523 C12.8309725,24.2760522 12,26.0137017 12,27.5 C12,28.0522847 11.5522847,28.5 11,28.5 C10.4477153,28.5 10,28.0522847 10,27.5 C10,25.7886708 8.84033182,23.6810997 6.73798027,21.0014567 L2,21 C1.44771525,21 1,20.5522847 1,20 L1,2 C1,1.44771525 1.44771525,1 2,1 L20,1 Z" id="path-2"></path>\n </defs>\n <g id="View-/-Map-/-Marker-/-Large" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <ellipse id="Oval" fill="url(#radialGradient-1)" opacity="0.12" cx="11" cy="28.5" rx="4.5" ry="3.5"></ellipse>\n <path d="M21,0 C21.5522847,-1.01453063e-16 22,0.44771525 22,1 L22,21 C22,21.5522847 21.5522847,22 21,22 L15.7283832,22.0012846 C15.5422129,22.2445529 15.3664776,22.4802332 15.1984183,22.7122576 C13.7560833,24.7035592 13,26.2846074 13,27.5 L13,27.5 L12.9945143,27.6492623 C12.9181651,28.6841222 12.0543618,29.5 11,29.5 C9.8954305,29.5 9,28.6045695 9,27.5 L9,27.5 L8.99485006,27.3298651 C8.91582184,26.0024976 7.93016704,24.2171459 6.23940611,22.000704 L1,22 C0.44771525,22 6.76353751e-17,21.5522847 0,21 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L21,0 Z" id="Path-3" fill="#FFFFFF"></path>\n <mask id="mask-3" fill="white">\n <use xlink:href="#path-2"></use>\n </mask>\n <use id="Path-2" fill="#FFFFFF" fill-rule="nonzero" xlink:href="#path-2"></use>\n <rect id="Entity-type" fill="#24A8E8" mask="url(#mask-3)" x="0" y="0" width="22" height="32"></rect>\n </g>\n</svg>'),j=(0,r.memo)((e=>{let{marker:t,onClick:n}=e,l=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["marker","onClick"]);const s=R(),c=(0,r.useRef)(),[d,p]=(0,r.useState)(!1),{activeEntityUri:u}=(0,r.useContext)(N.P),h=(0,o.pathEq)(["entity","uri"],u,t),g={lat:t.point.lat,lng:t.point.lng},m=(0,r.useCallback)((0,S.DsO)(p,50),[]),f=(0,r.useCallback)((()=>m(!0)),[m]),b=(0,r.useCallback)((()=>m(!1)),[m]),y=(0,r.useCallback)((()=>n(t)),[n,t]);return a().createElement(a().Fragment,null,a().createElement(k.Z,{anchorEl:c.current,open:d,className:s.popper,modal:!1,placement:"top"},a().createElement(D.Z,{entity:t.entity,onMouseOver:f,onMouseOut:b})),a().createElement(i.Jx,_({icon:{url:d||h?L:M,scaledSize:new google.maps.Size(22,32)},position:g,onClick:y,visible:!1!==t.visible,onMouseOver:f,onMouseOut:b},l)),a().createElement(i.vD,{options:{alignBottom:!0,pane:"mapPane",pixelOffset:new google.maps.Size(0,-40),closeBoxURL:"",enableEventPropagation:!0,disableAutoPan:!0},position:g},a().createElement("span",{ref:c})))})),A=(0,x.Z)({mapControlContainer:{borderRadius:"2px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 3px 0 rgba(0,0,0,0.15)",margin:"10px"}});var V=n(30634);function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){F(e,t,n[t])}))}return e}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=["drawing"],B=e=>{let{markers:t=[],mapKey:n,defaultZoom:l,defaultCenter:c,loadingElement:d,isSearchOnMapMove:p,isSearchEnabled:u,activeOverlay:h,overlayOptions:m,drawingModes:f=[],markerClusterer:b,markerClustererOptions:y,mapOptions:x,mapContainerClassName:v,onMapBoundsChanged:E,onOverlayUpdated:T,onMarkerClicked:D}=e;const k=A(),{isLoaded:S,loadError:N}=(0,i.Ji)({googleMapsApiKey:n,libraries:Z}),R=(0,r.useRef)(null),[_,L]=(0,r.useState)(null),[M,F]=(0,r.useState)(null),[B,z]=(0,r.useState)(null);(e=>{let{markers:t,activeOverlay:n,isSearchOnMapMove:a,map:o}=e;const i=(0,V.D)(t),l=(0,V.D)(n),s=o&&window.google;(0,r.useEffect)((()=>{s&&!a&&t.length&&t!==i?((e,t,n)=>{const r=new window.google.maps.LatLngBounds;if(e.forEach((e=>r.extend(e.point))),1===e.length){const e=r.getCenter();r.extend(new window.google.maps.LatLng(e.lat()+g.Pi,e.lng()+g.Pi)),r.extend(new window.google.maps.LatLng(e.lat()-g.Pi,e.lng()-g.Pi))}t.fitBounds(r),n&&C(t,n,r)})(t,o,n):s&&n&&n!==l&&C(o,n)}),[o,t,n])})({markers:t,activeOverlay:h,map:_,isSearchOnMapMove:p});const H=(0,r.useMemo)((()=>U({},g.r,m||{})),[m]),W=(0,r.useMemo)((()=>U({},g.Q3,x||{})),[x]),q=(0,r.useCallback)((e=>{E(e?I(_):null),z(null),clearTimeout(R.current)}),[_,E]),G=(0,r.useCallback)((()=>{clearTimeout(R.current)}),[]),K=(0,r.useCallback)((()=>{p&&E(I(_))}),[p,_,E]),Y=(0,r.useCallback)((()=>{p&&(clearTimeout(R.current),R.current=setTimeout(K,1e3))}),[K,p]),$=(0,r.useCallback)(((e,t)=>{const n=t||M&&{type:g.vl.POLYGON,overlay:M};if(!(0,o.isEmpty)(n)&&"function"==typeof T){const{overlay:e,type:t}=n,r={[g.vl.POLYGON]:()=>e.getPath().getArray().map((e=>[e.lat(),e.lng()])),[g.vl.CIRCLE]:()=>({radius:e.getRadius()/1e3,center:e.getCenter()})},a=r[t]&&r[t]();a&&T({data:a,type:t})}}),[T,M]),Q=(0,r.useCallback)((e=>t=>{$(null,{type:e,overlay:t}),t.setMap(null),z(null)}),[$]),X=(0,r.useCallback)((()=>{T(null)}),[T]),J=e=>t.filter((0,o.prop)("point")).map((t=>a().createElement(j,{key:t.id,marker:t,clusterer:e,onClick:D})));return N?null:S?a().createElement(i.b6,{mapTypeId:window.google.maps.MapTypeId.ROADMAP,options:W,onLoad:L,zoom:l,center:c,onZoomChanged:G,onDragStart:G,onIdle:Y,mapContainerClassName:v},_&&u&&Boolean(f.length)&&a().createElement(s,{className:k.mapControlContainer,position:window.google.maps.ControlPosition.TOP_RIGHT,map:_},a().createElement(w,{hasActiveOverlay:!!h,drawingModes:f,drawingMode:B,onDrawingModeChanged:z,onClearOverlay:X})),_&&u&&a().createElement(s,{className:k.mapControlContainer,position:window.google.maps.ControlPosition.TOP_CENTER,map:_},a().createElement(P,{onChangeIsSearchOnMapMove:q,isSearchOnMapMove:p})),b?(ee=y,a().createElement(i.XL,{options:ee},J)):J(),!O(B)&&h&&(0,o.propEq)("type",g.vl.POLYGON,h)&&a().createElement(i.mg,{onLoad:F,path:h.path,editable:!0,options:H,onMouseUp:$,onDragEnd:$}),u&&Boolean(f.length)&&a().createElement(i.j_,{onPolygonComplete:Q(g.vl.POLYGON),onCircleComplete:Q(g.vl.CIRCLE),drawingMode:O(B),options:{drawingControl:!1,circleOptions:H,polygonOptions:H}})):d;var ee}},30553:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(13980),a=n.n(r),o=n(24328),i=n.n(o);const l=e=>{let{height:t,margin:n}=e;return i().createElement("div",{style:{width:"1px",height:`${t}px`,borderLeft:"1px solid rgba(0,0,0,0.38)",margin:`0 ${n}px`,flexShrink:"0"}})};l.propTypes={height:a().number,margin:a().number};const s=l},8962:(e,t,n)=>{"use strict";n.d(t,{Z:()=>N});var r=n(52730),a=n(59431),o=n(24328),i=n.n(o),l=n(70687),s=n(71153),c=n.n(s),d=n(87918),p=n.n(d),u=n(94079),h=n(60995),g=n(10237),m=n(93416),f=n(80931),b=n(8261),y=n(79692);const x=(0,y.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"},noData:{fontSize:"13px",color:"rgba(0,0,0,0.54)"}}),v=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},metadata:s,caption:d="",excludeUris:y=[],includeUris:v=[],attributesCount:E=16}=e;const w=x(),T=(0,r.useSelector)(a.ZP.selectors.getPivotingAttributes),P=(0,o.useMemo)((()=>(0,b.U)(s,n.type,v,y)),[y,v,s,n.type]),I=(0,l.fyF)(P,n).filter((e=>{let{values:t}=e;return!(0,l.O27)(t)})).length>0;return I||!(0,l.O27)(d)?i().createElement(h.J.Provider,{value:T},i().createElement(g.Z,{className:t},d&&i().createElement(m.Z,{className:w.header,title:d}),i().createElement(u.Box,{className:c()(w.attributesContainer,{[w.noCaption]:!d})},I?i().createElement(f.Z,{entity:n,attrTypes:P,parentUri:n.uri,drawLines:!1,max:E}):i().createElement(u.Typography,{className:w.noData},p().text("No data found"))))):null}));var E=n(17440),w=n(91262),T=n(39450),P=n(66784);const I=(0,y.Z)({attributesContainer:{padding:"0 16px 16px 16px"},header:{marginBottom:"4px"},noCaption:{paddingTop:"16px"}});function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){C(e,t,n[t])}))}return e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const D=(0,r.connect)((e=>({metadata:a.ZP.selectors.getMetadata(e)})))((e=>{let{className:t,entity:n={},mode:s,metadata:d,caption:p="",excludeUris:h=[],includeUris:f=[],pinnedAttributes:y}=e;const x=I(),v=(0,r.useDispatch)(),C=(0,o.useContext)(T.m),D=(0,r.useSelector)(a.ZP.selectors.getUserRoles),k=(0,o.useMemo)((()=>(0,l.mC3)(y,D)),[y,D]),S=(0,r.useSelector)((e=>a.ZP.selectors.getModifiedEntity(e,n.uri)||{})),N=(0,o.useMemo)((()=>(0,b.U)(d,S.type,f,h)),[h,f,d,S.type]),R=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.addAttributes,v)(e.map((e=>O({},e,{viewId:C}))))),[C,v]),_=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.modifyAttribute,v)(O({},e,{viewId:C}))),[C,v]),L=(0,o.useCallback)((e=>(0,E.pipe)(a.N5.actions.removeAttribute,v)(O({},e,{viewId:C}))),[C,v]);return i().createElement(g.Z,{className:t},p&&i().createElement(m.Z,{className:x.header,title:p}),i().createElement(u.Box,{className:c()(x.attributesContainer,{[x.noCaption]:!p})},i().createElement(P.c.Provider,{value:k},i().createElement(w.Z,{entity:S,attrTypes:N,parentUri:S.uri,drawLines:!1,mode:s,showEmptyEditors:(0,l.ZiX)(S.uri),crosswalks:S.crosswalks,onAddAttributes:R,onChangeAttribute:_,onDeleteAttribute:L}))))}));var k=n(3185);function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}const N=(0,r.connect)(((e,t)=>({entity:t.entity||a.ZP.selectors.getEntityWithDiff(e),mode:t.mode||a.ZP.selectors.getMode(e)})))((e=>{let{mode:t=l.ARY.Viewing,attributesCount:n,pinnedAttributes:r,entity:a}=e,o=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["mode","attributesCount","pinnedAttributes","entity"]);return i().createElement(k.u.Provider,{value:a},(0,l.uzs)(t)?i().createElement(v,S({attributesCount:n,entity:a},o)):i().createElement(D,S({mode:t,pinnedAttributes:r,entity:a},o)))}))},76536:(e,t,n)=>{"use strict";n.d(t,{u:()=>p});var r=n(24328),a=n(52730),o=n(17440),i=n(70687),l=n(59431);const s={appearance:{},attributes:{},roles:[],tags:[]},c=(0,o.evolve)({refEntity:i.VGB,refRelation:i.VGB}),d=e=>e?(0,o.evolve)({attributes:(0,o.map)((0,o.map)(c))})(e):e,p=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(l.ZP.selectors.getHistorySlice),n=(0,a.useSelector)(l.ZP.selectors.getHistoryDiff),o=(0,a.useSelector)(l.ZP.selectors.getHistoryMode),c=(0,a.useSelector)(l.ZP.selectors.getEntity);return(0,r.useEffect)((()=>{if(t){const{aEntity:n,bEntity:r}=t,a=i.nwO.HistoryManager.createHistoryManager(i.nwO.AttributesDiff).computeEntityHistoryDiff(d(o===l.Z9.Current?c:r),d(n));e(l.N5.history.actions.setHistoryDiff(a))}}),[t,o,e,c]),n||s}},34120:(e,t,n)=>{"use strict";n.d(t,{s:()=>tt});var r=n(24328),a=n.n(r),o=n(70687),i=n(71153),l=n.n(i),s=n(73272),c=n(87918),d=n.n(c),p=n(94079),u=n(79692);const h=(0,u.Z)((e=>({card:{borderBottom:"1px solid rgba(0,0,0,0.06)"},withBackground:{backgroundColor:"rgba(0, 0, 0, 0.03)"},lineWrapper:{position:"relative"},icon:{position:"absolute",top:"8px",left:"16px",width:"32px",height:"32px",zIndex:1},line:e=>{let{color:t}=e;return{borderLeft:`3px solid ${t}`,position:"absolute",left:0,top:0,bottom:0}},info:{fontSize:"13px",color:e.palette.text.secondary,wordWrap:"break-word",lineHeight:"15px"},commentsInfo:{display:"flex",alignItems:"center",marginBottom:"-4px",marginTop:"7px"},commentsIcon:{width:"11px",height:"11px",marginLeft:"2px",marginRight:"6px",marginTop:"-2px"},infoValue:{color:e.palette.text.primary},infoBlock:{display:"flex",flexDirection:"row",marginBottom:"5px"},header:{display:"flex",flexDirection:"row",paddingBottom:"12px"},flex:{flex:1},caption:{fontSize:"16px",color:e.palette.text.primary},title:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"-4px"},flag:{height:"13px",width:"13px",marginTop:"-2px",stroke:"#000000",fill:"none",margin:"2px 5px 0 5px"},date:{fontSize:"13px",color:e.palette.text.primary},mainInfo:{display:"flex",flexDirection:"column",flex:1},controlsBox:{marginRight:"16px",marginBottom:"12px",marginTop:"13px"},controlsInRow:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"},priority:{width:"162px"},comments:{marginLeft:"11px"}})));var g=n(58241),m=n(24737),f=n(5434);const b=e=>{let{taskId:t,assignee:n,isTaskOpen:r}=e;const{assignee:o,getAssignees:i,updateAssignee:l,updateRequestIsInProgress:s,readOnly:c}=(0,f.r)({taskId:t,assignee:n,isOpen:r}),p=s||c;return a().createElement(m.Z,{isDisabled:p,getOptions:i,onChange:l,hideSelectedOptions:!1,label:d().text("Assigned to"),value:o,defaultOptions:!0,TextFieldProps:{disabled:p},height:40})};var y=n(17440);const x=(0,u.Z)({dueDate:{marginTop:0,marginBottom:0},dueDateInput:{height:"40px"},inputLabel:{fontSize:"14px"}});var v=n(8459),E=n(52730),w=n(59431),T=n(85229),P=n(94150),I=n(75813),O=n(22994),C=n(21380);const D=e=>{let{taskId:t,dueDate:n,isTaskOpen:i,className:s}=e;const c=x(),{updateDueDate:p,updateRequestIsInProgress:u,readOnly:h}=(e=>{let{dueDate:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(P.O)||{},l=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),s=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,E.useSelector)(w.ZP.selectors.getTenant),d=(0,T._)(),[p,u]=(0,r.useState)(!1),h=(0,O.Z)()("UPDATE_TASK")&&(0,C.tg)(a);return{updateDueDate:(0,r.useCallback)((e=>{l&&h&&n&&e&&t!==e&&(u(!0),d((0,o.KF3)({taskId:n,workflowPath:l,environment:s,tenant:c,dueDate:e})).then((()=>{null==i||i(n,{dueDate:e})})).catch(I.R).finally((()=>{u(!1)})))}),[l,n,s,c,i,d,t,h]),updateRequestIsInProgress:p,readOnly:!h}})({dueDate:n,taskId:t,isOpen:i});return a().createElement(v.Z,{className:l()(c.dueDate,s),disabled:u||h,value:n,label:d().text("Due date"),onChange:(0,y.pipe)((e=>e&&e.getTime()),p),margin:"dense",InputProps:{className:c.dueDateInput},InputLabelProps:{classes:{root:c.inputLabel}}})},k=e=>{let{taskId:t,priority:n,isTaskOpen:i,className:l}=e;const{priorities:s,updatePriority:c,updateRequestIsInProgress:p,readOnly:u}=(e=>{let{priority:t,taskId:n,isOpen:a}=e;const{updateTaskState:i}=(0,r.useContext)(P.O)||{},l=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),s=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),c=(0,E.useSelector)(w.ZP.selectors.getTenant),p=(0,T._)(),[u,h]=(0,r.useState)(!1),g=(0,O.Z)()("UPDATE_TASK")&&(0,C.tg)(a),m=(0,r.useCallback)((e=>{const{value:r}=e;l&&g&&n&&t!==r&&(h(!0),p((0,o.ax9)({taskId:n,workflowPath:l,environment:s,tenant:c,priority:r})).then((()=>{null==i||i(n,{priority:r})})).catch(I.R).finally((()=>{h(!1)})))}),[l,n,s,c,i,p,t,g]);return{priorities:(0,r.useMemo)((()=>[{label:d().text("Low"),value:o.NVC.low},{label:d().text("Medium"),value:o.NVC.medium},{label:d().text("High"),value:o.NVC.high},{label:d().text("Urgent"),value:o.NVC.urgent}]),[]),updatePriority:m,updateRequestIsInProgress:u,readOnly:!g}})({taskId:t,priority:n,isOpen:i}),h=p||u;return a().createElement(m.Z,{className:l,isDisabled:h,options:s,onChange:c,hideSelectedOptions:!1,label:d().text("Priority"),value:s.find((0,y.propEq)("value",n)),TextFieldProps:{disabled:h},height:40})};var S=n(89140),N=n(43054),R=n(39450),_=n(55847),L=n(22385);const M=e=>{let{taskId:t,possibleActions:n,assignee:i,isTaskOpen:l}=e;const{actions:s,actionRequestIsInProgress:c}=(e=>{let{possibleActions:t,assignee:n,taskId:a,isOpen:i}=e;const{loadWorkflowTasks:l}=(0,r.useContext)(P.O)||{},s=(0,E.useSelector)(w.ZP.selectors.getWorkflowPath),c=(0,E.useSelector)(w.ZP.selectors.getWorkflowEnvironmentUrl),d=(0,E.useSelector)(w.ZP.selectors.getTenant),p=(0,E.useSelector)(w.ZP.selectors.getUserName),u=(0,E.useSelector)(w.ZP.selectors.getEntityUri),[h,g]=(0,r.useState)(!1),m=(0,r.useContext)(R.m),f=(0,E.useDispatch)(),b=(0,r.useCallback)((e=>()=>{s&&a&&(g(!0),(0,o.TZ_)({taskId:a,workflowPath:s,environment:c,tenant:d,action:e}).then((()=>{"Delete"===e?f(w.ui.actions.entityDeletionFinished()):(f(w.N5.entity.actions.loadEntity({viewId:m,uri:u})),null==l||l())})).catch(I.R).finally((()=>{g(!1)})))}),[s,a,c,d,f,u,m,l]);return{actions:(0,r.useMemo)((()=>p===n&&(0,C.tg)(i)?(t||[]).map((e=>{let{action:t,label:n}=e;return{text:n,onClick:b(t)}})):[]),[t,b,p,n,i]),actionRequestIsInProgress:h}})({taskId:t,possibleActions:n,assignee:i,isOpen:l});return s.length>0?a().createElement(_.Z,{buttonComponent:L.Z,buttonProps:{icon:N.Z,size:"L",disabled:c},menuId:"workflow-actions",menuItems:s}):null},j=(0,u.Z)({decorator:{display:"flex",alignItems:"stretch"},lineBlock:{width:"56px",flexShrink:0},withLinePadding:{"& $noLine":{height:"10px"},"& $line":{height:"calc(100% - 10px)"}},noLine:{height:"0"},line:{height:"100%",position:"relative",marginLeft:"31px",borderLeft:"2px solid rgba(0,0,0,0.06)","&:before":{position:"absolute",height:6,width:6,borderRadius:"50%",left:-5,top:"15px",background:"#d8d8d8",content:'""',display:"block",border:"1px solid white"},"&$plain":{"&:before":{width:0,border:"none"}},"&$last":{height:"15px"}},content:{flex:1,minWidth:0},plain:{},last:{},rowDivider:{marginLeft:0}}),A=e=>{let{className:t,children:n,plain:r,first:o,last:i,transparent:s,divider:c}=e;const d=j();return a().createElement("div",{className:l()(t,d.decorator)},a().createElement("div",{className:l()(d.lineBlock,{[d.withLinePadding]:o})},!s&&a().createElement(a().Fragment,null,a().createElement("div",{className:d.noLine}),a().createElement("div",{className:l()(d.line,{[d.plain]:r},{[d.last]:i})}))),a().createElement("div",{className:d.content},n,c&&a().createElement(p.Divider,{className:d.rowDivider,light:!0,variant:"inset"})))};let V={};const U=["#DC057B","#5DC003","#FEC92F","#F57F27","#B71137","#056B97","#4499AE","#BD81BE","#5F3577","#A68560","#555962"];let F=0;function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}const B=e=>a().createElement("svg",Z({width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),a().createElement("defs",null,a().createElement("path",{d:"M4 17.17L5.17 16H20V4H4v13.17zM20 2c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h16zm-3 9H7v2h10v-2zm0-4H7v2h10V7z",id:"CollaborationIcon_svg__a"})),a().createElement("g",{transform:"translate(-2 -2)",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("mask",{id:"CollaborationIcon_svg__b",fill:"#fff"},a().createElement("use",{xlinkHref:"#CollaborationIcon_svg__a"})),a().createElement("path",{fillOpacity:.54,fill:"#000",mask:"url(#CollaborationIcon_svg__b)",d:"M0 0h24v24H0z"}))),z=e=>{let{task:t,children:n,actions:o,Icon:i}=e;const{taskId:c,dueDate:u,priority:m,assignee:f,createdBy:y,createTime:x,displayName:v,processDefinitionDisplayName:E,objectURIs:w,processInstanceComments:T,possibleActions:P,isOpen:I}=t,N=(0,C.Xs)(w),R=(e=>{let{processDefinitionDisplayName:t}=e;const n=t;return V[n]||(V[n]=U[F],F++,F>U.length-1&&(F=0)),V[n]})({processDefinitionDisplayName:E}),_=h({color:R}),[L,j]=(0,r.useState)(!1),Z=(0,O.Z)()("VIEW_PROCESS_INSTANCE_COMMENTS");return a().createElement("div",{className:_.card},a().createElement("div",{className:l()({[_.withBackground]:L})},a().createElement("div",{className:_.lineWrapper},a().createElement("div",{className:_.line}),i&&a().createElement(i,{className:_.icon}),a().createElement(A,{plain:!0,first:!0,transparent:!L},a().createElement("div",{className:_.mainInfo},a().createElement("div",{className:_.title},a().createElement("div",{className:l()(_.caption,_.flex)},E),a().createElement(s.Z,{className:_.flag}),a().createElement(p.Tooltip,{title:d().text("Due date")},a().createElement("span",{className:_.date},d().date(u,"L"))),a().createElement(g.Z,{isOpen:L,size:"L",onClick:()=>{j(!L)}})),a().createElement("div",{className:_.infoBlock},a().createElement("div",{className:_.flex},N&&a().createElement("div",{className:_.info},d().text("DCR ID"),": ",a().createElement("span",{className:_.infoValue},N)),a().createElement("div",{className:_.info},d().text("Created by"),": ",a().createElement("span",{className:_.infoValue},y)," ",d().text("on")," ",a().createElement("span",{className:_.infoValue},d().date(x,"L"))),a().createElement("div",{className:_.info},d().text("Step"),": ",a().createElement("span",{className:_.infoValue},v)),Z&&(null==T?void 0:T.length)>0&&a().createElement("div",{className:_.commentsInfo},a().createElement(B,{className:_.commentsIcon}),a().createElement("div",{className:_.infoValue},T.length))),o||a().createElement(M,{taskId:c,possibleActions:P,assignee:f,isTaskOpen:I}))))),L&&a().createElement(A,{plain:!0},a().createElement("div",{className:_.controlsBox},a().createElement("div",{className:_.controlsInRow},a().createElement(D,{taskId:c,dueDate:u,isTaskOpen:I}),a().createElement(k,{taskId:c,priority:m,className:_.priority,isTaskOpen:I})),a().createElement(b,{taskId:c,assignee:f,isTaskOpen:I})))),L&&a().createElement(a().Fragment,null,n,Z&&a().createElement("div",{className:_.comments},a().createElement(S.V,{taskId:c,processInstanceComments:T,isTaskOpen:I}))))};function H(){return H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(this,arguments)}const W=e=>a().createElement("svg",H({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#42A5F5",cx:14,cy:14,r:14}),a().createElement("path",{d:"M16.43 9.87c0 1.59 1.25 2.87 2.79 2.87 1.53 0 2.78-1.28 2.78-2.87C22 8.29 20.75 7 19.22 7c-1.54 0-2.79 1.29-2.79 2.87zm1.4 0c0-.79.62-1.43 1.39-1.43.77 0 1.39.64 1.39 1.43 0 .79-.62 1.44-1.39 1.44-.77 0-1.39-.65-1.39-1.44zm-6.26 8.26c0-1.59-1.25-2.87-2.79-2.87-1.53 0-2.78 1.28-2.78 2.87C6 19.71 7.25 21 8.78 21c1.54 0 2.79-1.29 2.79-2.87zM8.09 9.15v4.31h1.39v-2.87h2.78v2.15l2.78-2.87L12.26 7v2.15H8.09zm11.82 9.7v-4.31h-1.39v2.87h-2.78v-2.15l-2.78 2.87L15.74 21v-2.15h4.17z",fill:"#FFF",opacity:.87})));let q,G;!function(e){e.ADDED="added",e.EDITED="edited",e.DELETED="deleted",e.PINNED="pinned",e.IGNORED="ignored",e.PIN_DELETED="pin_deleted",e.IGNORE_DELETED="ignore_deleted"}(q||(q={})),function(e){e.INSERT_ATTRIBUTE="INSERT_ATTRIBUTE",e.UPDATE_ATTRIBUTE="UPDATE_ATTRIBUTE",e.DELETE_ATTRIBUTE="DELETE_ATTRIBUTE",e.PIN_ATTRIBUTE="PIN_ATTRIBUTE",e.IGNORE_ATTRIBUTE="IGNORE_ATTRIBUTE",e.CREATE_ENTITY="CREATE_ENTITY",e.CREATE_RELATIONSHIP="CREATE_RELATIONSHIP",e.UPDATE_TAGS="UPDATE_TAGS",e.UPDATE_ROLES="UPDATE_ROLES",e.UPDATE_START_DATE="UPDATE_START_DATE",e.UPDATE_END_DATE="UPDATE_END_DATE",e.UPDATE_PROFILE_PIC_BY_URL="UPDATE_PROFILE_PIC_BY_URL",e.UPDATE_PROFILE_PIC_BY_URI="UPDATE_PROFILE_PIC_BY_URI",e.DELETE_RELATIONSHIP="DELETE_RELATIONSHIP"}(G||(G={}));var K=n(8261);const Y=(e,t)=>{switch(e){case G.CREATE_RELATIONSHIP:case G.INSERT_ATTRIBUTE:return q.ADDED;case G.UPDATE_TAGS:case G.UPDATE_ROLES:case G.UPDATE_ATTRIBUTE:return q.EDITED;case G.DELETE_ATTRIBUTE:case G.DELETE_RELATIONSHIP:return q.DELETED;case G.PIN_ATTRIBUTE:return null!=t&&t.pin?q.PIN_DELETED:q.PINNED;case G.IGNORE_ATTRIBUTE:return null!=t&&t.ignored?q.IGNORE_DELETED:q.IGNORED}},$=e=>({[q.ADDED]:d().text("added"),[q.EDITED]:d().text("edited"),[q.DELETED]:d().text("deleted"),[q.PINNED]:d().text("pinned"),[q.PIN_DELETED]:d().text("pin deleted"),[q.IGNORED]:d().text("ignored"),[q.IGNORE_DELETED]:d().text("ignore deleted")}[e]||""),Q=(e,t)=>(0,y.when)((0,y.allPass)([(0,y.pipe)((0,y.prop)("type"),(0,y.equals)(o.oS0.TYPE_STRING)),()=>(0,o.CBv)(t)]),(0,y.evolve)({type:(0,y.always)(o.oS0.TYPE_URL)}))((0,o.PFL)(e));function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){J(e,t,n[t])}))}return e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ee=(e,t)=>{if("newValue"in e||"oldValue"in e){const{newValue:n,oldValue:r,type:a}=e,o=(0,y.pathOr)([],["value",t.name])(n),i=(0,y.pathOr)([],["value",t.name])(r),l=Math.max(o.length,i.length);return(0,y.times)((e=>[{value:{newValue:o[e],oldValue:i[e],type:a}}]),l)}const n=e[t.name];return n?[n]:[]},te=(0,y.curry)(((e,t,n)=>{const r=(0,K.U)(e,t.type,[],[]);return re(e,r,n)})),ne=(0,y.curry)(((e,t,n,r)=>{const a=(0,o.V3K)(e,t.type),i=(0,o.xF8)(e,t.type);return(0,y.flatten)([X({level:1,label:(0,y.propOr)("","label",a),attributeType:a,attributeValue:X({},t,n)},((e,t)=>{if(t===G.CREATE_RELATIONSHIP||(0,o.O27)(e)){const e=Y(t);return e?{operation:e}:{}}return{}})(n,r)),re(e,i,n,2)])})),re=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return(0,y.flatten)(t.map((t=>ee(n,t).map((n=>n.map((n=>ae(e,t,n,r))))))).filter((0,y.complement)(y.isEmpty)))},ae=(e,t,n,r)=>{switch(t.type){case o.oS0.TYPE_NESTED:case o.oS0.TYPE_IMAGE:return oe(e,t,n,r);case o.oS0.TYPE_REFERENCE:return ie(e,t,n,r);default:{const e=((e,t)=>{const n=(0,o.kqr)(e)?t:t.value;return(0,y.is)(Object,n)?n:{newValue:t,type:G.INSERT_ATTRIBUTE}})(t,n);return le(t,e,r)}}},oe=(e,t,n,r)=>{const a=(0,o.EUG)({},t);return[{level:r,label:(0,o.idV)((null==t?void 0:t.label)||(null==t?void 0:t.name)),attributeType:t,attributeValue:n},re(e,a,n.value,r+1)]},ie=(e,t,n,r)=>{const a=(0,o.EUG)(e,t);return[{level:r,label:(null==t?void 0:t.label)||(null==t?void 0:t.name),attributeType:t,attributeValue:n},re(e,a,n.value,r+1)]},le=(e,t,n)=>{const{newValue:r,oldValue:a,type:o}=(e=>{let{newValue:t,oldValue:n,type:r}=e;return r===G.UPDATE_ATTRIBUTE?{type:r,newValue:t,oldValue:n}:{type:r,newValue:n||t}})(t);return{attributeType:e,newValue:r,oldValue:a,operation:Y(o,a),label:(null==e?void 0:e.label)||(null==e?void 0:e.name),level:n}};function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ce(e,t,n[t])}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const de=["defaultProfilePicValue",o.xPW.tags.name,o.xPW.roles.name,o.xPW.startDate.name,o.xPW.endDate.name],pe=e=>{let{newValue:t,oldValue:n}=e;const r=e=>isNaN(e)||(0,o.O27)(e)?e:parseInt(e),a=e=>(null==e?void 0:e.length)&&!(0,o.O27)(e)&&!(0,o.O27)(e[0]),i=a(t),l=a(n);return i&&l?[{type:G.UPDATE_ATTRIBUTE,oldValue:{value:r(n[0])},newValue:{value:r(t[0])}}]:i?[{type:G.INSERT_ATTRIBUTE,newValue:{value:r(t[0])}}]:l?[{type:G.DELETE_ATTRIBUTE,oldValue:{value:r(n[0])}}]:void 0},ue=(e,t)=>{const{newValue:n=[],oldValue:r=[],type:a}=t,i=a===G.UPDATE_ROLES?(0,o.xqc)(e):y.identity,l=(0,y.difference)(n,r),s=(0,y.difference)(r,n),c=[];return l.length&&c.push({type:G.INSERT_ATTRIBUTE,newValue:{value:l.map(i).join(", ")}}),s.length&&c.push({type:G.DELETE_ATTRIBUTE,oldValue:{value:s.map(i).join(", ")}}),c},he=(e,t)=>{const n=(e=>{const{type:t,attributePath:n,refObjectURI:r,refAttributeType:a}=e,i=t===G.INSERT_ATTRIBUTE?(0,o.Zmi)(n):n;if(r){const e=a.split("/attributes/"),t=r.split("/")[1];return[e[1],t,i].join("/")}return i})(t),r=n.split("/");let a=e;for(let e=0;e<r.length-1;e+=2){var i;const n=r[e],o=r[e+1],l=(a[n]||[]).find((0,y.propEq)("id",o)),s=r.length===e+2?t:{},c=l||{id:o,value:s},d=(null===(i=t.refObjectURI)||void 0===i?void 0:i.indexOf(o))>=0&&t.refObjectURI;d&&(c.refObjectURI=d),(0,y.isNil)(l)&&(a[n]=(a[n]||[]).concat(c)),a=c.value}return e},ge=(e,t)=>{const{attributes:n={},startDate:r,endDate:a}=t,{roles:i,tags:l,defaultProfilePicValue:s}=t,c=se({},n);return s&&(c.defaultProfilePicValue=[s]),i&&(c[o.xPW.roles.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:i.map((0,o.xqc)(e)).join(", ")}}]),l&&(c[o.xPW.tags.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:l.join(", ")}}]),r&&(c[o.xPW.startDate.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:r}}]),a&&(c[o.xPW.endDate.name]=[{type:G.INSERT_ATTRIBUTE,newValue:{value:a}}]),c},me=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:a}=n;switch(a){case G.UPDATE_PROFILE_PIC_BY_URL:r.defaultProfilePicValue=[n.newValue];break;case G.UPDATE_TAGS:r[o.xPW.tags.name]=ue(e,n);break;case G.UPDATE_ROLES:r[o.xPW.roles.name]=ue(e,n);break;case G.UPDATE_START_DATE:r[o.xPW.startDate.name]=pe(n);break;case G.UPDATE_END_DATE:r[o.xPW.endDate.name]=pe(n);break;case G.CREATE_RELATIONSHIP:case G.CREATE_ENTITY:return se({},r,ge(e,n.newValue));case G.INSERT_ATTRIBUTE:case G.UPDATE_ATTRIBUTE:case G.DELETE_ATTRIBUTE:case G.PIN_ATTRIBUTE:case G.IGNORE_ATTRIBUTE:he(r,n)}return r},fe=(0,u.Z)((e=>({linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"}}))),be=e=>{let{suggestionsCount:t,isExpanded:n,onClick:r,className:o}=e;const i=fe();return a().createElement(p.Link,{component:"button",variant:"caption",underline:"none",onClick:r,className:o},a().createElement("span",{className:i.linkLabel},n?d().text("View less suggestions"):d().text("View ${suggestionsCount} more suggestions",{suggestionsCount:t})))};var ye=n(43525);const xe=(0,u.Z)((e=>({field:{fontSize:"12px",lineHeight:"20px",color:e.palette.text.primary,marginTop:"6px",overflow:"hidden",wordBreak:"break-word"},fieldName:{color:e.palette.text.secondary,marginRight:"8px"},difference:{marginRight:"8px"},arrow:{margin:"0 4px",fontSize:"12px",color:e.palette.text.primary},chip:{height:"20px",fontSize:"10px",fontWeight:500,lineHeight:"16px",letterSpacing:0,flexShrink:0,textTransform:"capitalize",color:e.palette.primary.main,borderColor:e.palette.primary.main,"&.edited":{color:"#CC7500",borderColor:"#CC7500"},"&.added":{color:"#599E0E",borderColor:"#599E0E"},"&.deleted":{color:"#CF0E26",borderColor:"#CF0E26"}}}))),ve=e=>{let{label:t,oldValue:n,newValue:r,operation:o,className:i}=e;const s=xe(),c=n||r;return a().createElement("div",{className:l()(s.field,i)},a().createElement("span",{className:s.fieldName},t,":"),!(0,y.isNil)(c)&&a().createElement("span",{className:s.difference},c,r&&n&&a().createElement(a().Fragment,null,a().createElement(ye.Z,{className:s.arrow}),r)),o&&a().createElement(p.Chip,{variant:"outlined",label:$(o),className:l()(s.chip,o)}))},Ee=a().createContext(null);Ee.displayName="AttributesChangesContext";var we=n(72768),Te=n(31039);const Pe=(0,u.Z)((e=>({linkContainer:{textDecoration:"none",cursor:"pointer",marginLeft:"4px"},linkLabel:{color:e.palette.primary.main,fontSize:"12px",letterSpacing:0,lineHeight:"16px"},disabledLink:{pointerEvents:"none",cursor:"default"},label:{color:e.palette.text.primary},change:e=>{let{level:t=0}=e;return{marginLeft:16*t+"px"}}}))),Ie=e=>{let{label:t,level:n,attributeType:i,attributeValue:s,oldValue:c,newValue:d,operation:p}=e;const u=Pe({level:n}),h=(0,E.useSelector)(w.ZP.selectors.getEntityUri),g=(0,r.useContext)(Ee),m=(0,r.useCallback)((()=>{if((0,o.YkG)(i)){const e=(0,y.when)((0,y.anyPass)([(0,y.hasPath)(["value","newValue"]),(0,y.hasPath)(["value","oldValue"])]),(0,y.ifElse)((0,y.hasPath)(["value","newValue"]),(0,y.path)(["value","newValue"]),(0,y.path)(["value","oldValue"])))(s);return function(e,t,n){let r,a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o[t.refObjectURI];return i?(a=n===i.startObjectUri?i.endObjectUri:i.startObjectUri,r=n===i.startObjectUri?i.endObjectLabel:i.startObjectLabel):t.refEntity&&(a=t.refEntity.objectURI,r=o[a].label),{objectUri:a,objectLabel:r}}(i,e,h,g)}if("endObject"in i){const{endObjectUri:e,endObjectLabel:t}=s;return{objectUri:e,objectLabel:t}}}),[i,s,h,g]),f=(0,r.useCallback)((()=>{const{objectUri:e,objectLabel:t}=m()||{};if(!(0,y.isNil)(e)&&!(0,y.isNil)(t)){var n;const r=!1===(null===(n=g[e])||void 0===n?void 0:n.isExist);return a().createElement(Te.Z,{value:e,className:l()(u.linkContainer,{[u.disabledLink]:r})},a().createElement("span",{className:l()(u.linkLabel,{[u.label]:r})},(0,o.idV)(t)))}return null}),[m,g,u]),b=(0,r.useMemo)((()=>a().createElement("span",null,t,f())),[t,f]),x=(0,r.useCallback)((e=>{const t=(0,o.kDl)(e);return a().createElement(we.Z,{value:t,dataTypeDefinition:Q(i,t)})}),[i]);return a().createElement(ve,{className:u.change,label:b,oldValue:c&&x(c),newValue:d&&x(d),operation:p})},Oe=(0,u.Z)({title:{fontSize:"12px",letterSpacing:0,lineHeight:"16px",fontWeight:500,marginTop:"8px"}});function Ce(){return Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ce.apply(this,arguments)}const De=e=>{let{changes:t}=e;const n=Oe();return a().createElement(a().Fragment,null,t.map(((e,t)=>(0,y.has)("level",e)?a().createElement(Ie,Ce({},e,{key:t})):a().createElement("div",{className:n.title,key:t},e.label))))},ke=(0,y.pipe)((0,y.filter)((0,y.has)("operation")),y.length),Se=(0,u.Z)((e=>({container:{boxSizing:"border-box",border:"1px solid rgba(0,0,0,0.03)",borderRadius:"3px",backgroundColor:"rgba(0,0,0,0.03)",padding:"10px",margin:"12px 16px 12px 0"},uri:{color:e.palette.primary.main,textDecoration:"none",cursor:"pointer"},label:{fontSize:"12px",letterSpacing:0,lineHeight:"16px"},showMoreLink:{marginTop:"8px"}}))),Ne=e=>{let{changes:t,objectsInfo:n,entityInfo:i,relationsInfo:l,max:s}=e;const c=Se(),p=(0,E.useSelector)(w.ZP.selectors.getMetadata),[u,h]=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=t=>(0,y.pipe)((0,y.pick)([t]),te(e,n)),i=(0,y.curry)(((e,t)=>(0,y.reduce)(((e,n)=>(0,y.concat)(e,n(t))),[],e))),l=(0,y.propOr)([],n.uri)(t).reduce(((t,r)=>me(e,n,r,t)),{}),s=r.map((n=>((e,t,n)=>(0,y.propOr)([],n.uri)(t).reduce(((t,r)=>me(e,n,r,t)),{}))(e,t,n)));return[i([(0,y.pipe)((0,y.omit)(de),te(e,n)),a(o.xPW.roles.name),a(o.xPW.tags.name),a(o.xPW.startDate.name),a(o.xPW.endDate.name)],l),(0,y.flatten)(r.map(((n,r)=>{const a=(0,y.path)([n.uri,0,"type"],t);return ne(e,n,s[r],a)})))]})(p,t,i,l)),[p,t,i,l]),g=(0,r.useMemo)((()=>{const e={label:d().text("Relationships")};return h.length>0?(0,y.flatten)([u,e,h]):u}),[u,h]),{isExpanded:m,onToggle:f,itemsToShow:b,collapsedSuggestionsCount:x}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;const[n,a]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>a((e=>!e))),[]),i=(0,r.useMemo)((()=>e.slice(0,t)),[e,t]),l=(0,r.useMemo)((()=>ke(e)),[e]),s=(0,r.useMemo)((()=>ke(i)),[i]);return{isExpanded:n,onToggle:o,itemsToShow:n?e:i,collapsedSuggestionsCount:l-s}}(g,s);return a().createElement(Ee.Provider,{value:n},a().createElement("div",{className:c.container},a().createElement(Te.Z,{className:c.uri,value:(0,o.wwR)(i)},a().createElement("div",{className:c.label},(0,o.idV)(i.label))),a().createElement(De,{changes:b}),x>0&&a().createElement(be,{onClick:f,suggestionsCount:x,isExpanded:m,className:c.showMoreLink})))};function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_e(e,t,n[t])}))}return e}function _e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Le=(0,y.filter)((0,y.pipe)((0,y.prop)("uri"),o.WgC)),Me=(0,y.filter)((0,y.pipe)((0,y.prop)("uri"),o.bC9)),je=(e,t)=>(0,y.filter)((0,y.allPass)([(0,y.pipe)((0,y.prop)("uri"),o.bC9),(0,y.pipe)((0,y.prop)("startObjectUri"),(0,y.equals)(t))]))(e),Ae=(0,y.curry)(((e,t)=>({entity:t,relations:je(e,t.uri)}))),Ve=(0,y.curry)(((e,t)=>{const n=e[t.startObjectUri],r=[t];return n?{entity:Re({},n,{uri:t.startObjectUri}),relations:r}:{relations:r}})),Ue=(e,t)=>{const{entity:n,relations:r}=t,{uri:a}=n,o=(0,y.pipe)((0,y.pathOr)([],[a,"relations"]),(0,y.concat)(r),y.uniq)(e);return e[a]={entity:n,relations:o},e};function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ze=e=>{let{task:t}=e;const{objectURIs:n}=t,i=(0,C.rc)(n),{dcr:l,groupedObjects:s}=(e=>{const[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(null),l=(0,T._)(),s=(0,r.useCallback)((e=>(0,y.isEmpty)(e)?Promise.resolve([]):l((0,o.DnY)(e,{searchOptions:"ovOnly",defaultMaxValues:1}))),[]);return(0,r.useEffect)((()=>{(0,o.E6I)(e).then((e=>{const{changes:t,objectsInfo:r}=e,a=((e,t)=>(0,y.pipe)(y.keys,(0,y.filter)((t=>(0,y.prop)([t],e))),(0,y.map)((e=>Re({},t[e],{uri:e}))))(t))(t,r),o=(0,y.pipe)(Le,(0,y.map)(Ae(a)))(a),l=(0,y.pipe)(Me,(0,y.map)(Ve(r)))(a),[c,d]=(0,y.partition)((0,y.has)("entity"),l),p=d.map((0,y.path)(["relations",0,"startObjectUri"]));s(p).then((e=>{const t=d.map(((t,n)=>function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Fe(e,t,n[t])}))}return e}({},t,{entity:e[n]})));(0,y.pipe)(y.flatten,(0,y.reduce)(Ue,{}),y.values,n)([o,c,t])})).catch(I.R),i(e)})).catch(I.R)}),[e,s]),{dcr:a,groupedObjects:t}})(i);return a().createElement(z,{task:t,Icon:W},l&&s.map(((e,t)=>a().createElement(A,{key:t,last:t===s.length-1,divider:!0},a().createElement(Ne,{entityInfo:e.entity,relationsInfo:e.relations,changes:l.changes,objectsInfo:l.objectsInfo})))))},Be=(0,u.Z)({pmCard:{marginLeft:"-15px"}});function ze(){return ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}const He=e=>a().createElement("svg",ze({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#1976D2",cx:14,cy:14,r:14}),a().createElement("path",{d:"M22.5 14L18 9.5V13h-3.5L9 7.5 7.5 9l6.04 6H18v3.5l4.5-4.5zm-11.46 1.46L7.5 19 9 20.5l3.54-3.54-1.5-1.5z",fill:"#FFF",opacity:.87})));var We=n(28741),qe=n(49734);const Ge={showTransitiveMatches:!0,showInactiveEntities:!1},Ke=e=>{let{task:t}=e;const n=Be(),{objectURIs:r}=t,o=(0,E.useSelector)(w.ZP.selectors.getEntity),i=(0,E.useSelector)(w.ZP.selectors.getMetadata),{matches:l,entitiesMap:s}=(0,We.s)({enabled:!!o.uri,entity:o,filter:"",rowsPerPage:Number.MAX_SAFE_INTEGER,page:0,options:Ge}),c=null==l?void 0:l.find((e=>{let{object:t}=e;return r.includes(t.uri)}));return a().createElement(z,{task:t,Icon:He},c&&a().createElement(A,{last:!0},a().createElement("div",{className:n.pmCard},a().createElement(qe.M,{metadata:i,entity:o,match:c,entitiesMap:s}))))};function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}const $e=e=>a().createElement("svg",Ye({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a().createElement("circle",{fill:"#205191",cx:14,cy:14,r:14}),a().createElement("path",{d:"M9.667 20.622c-.92 0-1.667-.744-1.667-1.662V8.99c0-.916.747-1.66 1.667-1.66h2.446A1.993 1.993 0 0114 6l.162.006a1.992 1.992 0 011.725 1.323h2.446c.92 0 1.667.745 1.667 1.662v9.97c0 .917-.747 1.661-1.667 1.661zm9-1.33V8.66h-1.334v1.993h-6.666V8.66H9.333v10.634h9.334zM15.86 14.46v1.302h-5.206V14.46h5.206zm1.494-2v1.302h-6.7V12.46h6.7zM14 7.33c.367 0 .667.298.667.664a.668.668 0 01-1.334 0c0-.366.3-.665.667-.665z",fill:"#FFF",opacity:.87})));function Qe(){return Qe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qe.apply(this,arguments)}const Xe=e=>a().createElement("svg",Qe({width:28,height:28,viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg"},e),a().createElement("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",opacity:.87},a().createElement("circle",{fill:"#0D47A1",cx:14,cy:14,r:14}),a().createElement("path",{d:"M8.17 9.824v8.995c0 .886.72 1.606 1.607 1.606h8.352c.192 0 .375-.035.546-.097l1.38 1.382.804-.804-1.32-1.32-1.09-1.089-8.993-8.994-1.092-1.092-1.317-1.317-.803.803L8.17 9.824zm9.316 9.316h-8.03v-8.03l8.03 8.03zM9.777 7.575c-.192 0-.376.033-.55.094L10.42 8.86h.32v.322l1.607 1.606h4.819V8.86h1.284v8.03l1.285 1.286V9.182c0-.887-.72-1.607-1.606-1.607h-2.358a1.931 1.931 0 00-1.818-1.285 1.93 1.93 0 00-1.818 1.285H9.777zm3.533.643c0-.353.29-.643.643-.643.353 0 .642.29.642.643a.644.644 0 01-.642.642.644.644 0 01-.643-.642z",fill:"#FFF"})));class Je{}Je.build=e=>{let{task:t}=e;const{processType:n}=t;switch(n){case o.Yj_.dataChangeRequestReview:return a().createElement(Ze,{task:t});case o.Yj_.potentialMatchReview:return a().createElement(Ke,{task:t});case o.Yj_.recommendForDelete:return a().createElement(z,{task:t,Icon:Xe});default:return a().createElement(z,{task:t,Icon:$e})}};const et=Je,tt=e=>{let{task:t}=e;return et.build({task:t})}},26789:(e,t,n)=>{"use strict";n.d(t,{G:()=>v});var r=n(24328),a=n.n(r),o=n(87918),i=n.n(o),l=n(94079),s=n(65549),c=n(22994),d=n(31517),p=n(59431),u=n(70687),h=n(52730),g=n(94150),m=n(75813),f=n(79692);const b=(0,f.Z)((e=>({popoverPaper:{width:"464px"},title:{fontSize:"20px",fontWeight:500,letterSpacing:"0.25px",lineHeight:"24px",color:e.palette.text.primary,marginBottom:"17px"},content:{display:"flex",flexDirection:"column",padding:"23px 24px 14px 24px"},simpleDropDownSelector:{marginBottom:"20px"},inputRoot:{paddingTop:"0 !important",paddingBottom:"0 !important"},select:{fontSize:"14px"},footer:{display:"flex",justifyContent:"flex-end",padding:"5px 8px 8px",borderTop:"1px solid rgba(0,0,0,0.12)"},cancelButton:{marginRight:"8px"},input:{fontSize:"14px"}}))),y=e=>{let{anchorEl:t,onClose:n}=e;const o=b(),[s,c]=(0,r.useState)(""),[f,y]=(0,r.useState)(null),[x,v]=(0,r.useState)(!1),{definitions:E}=(()=>{const[e,t]=(0,r.useState)([]),n=(0,h.useSelector)(p.ZP.selectors.getWorkflowPath),a=(0,h.useSelector)(p.ZP.selectors.getWorkflowEnvironmentUrl),o=(0,h.useSelector)(p.ZP.selectors.getTenant),i=(0,h.useSelector)(p.ZP.selectors.getEntity).type;return(0,r.useEffect)((()=>{(0,u.IU6)({workflowPath:n,environment:a,tenant:o}).then((e=>{let{data:n}=e;return t(((e,t)=>e.filter((e=>{let{manualStart:n,objectTypes:r}=e;return n&&(!r||(null==r?void 0:r.some((e=>e===t))))})))(n,i))}))}),[i,n,a,o]),{definitions:e}})(),{processInstance:w,loading:T}=(()=>{const{loadWorkflowTasks:e}=(0,r.useContext)(g.O),t=(0,h.useSelector)(p.ZP.selectors.getWorkflowPath),n=(0,h.useSelector)(p.ZP.selectors.getWorkflowEnvironmentUrl),a=(0,h.useSelector)(p.ZP.selectors.getTenant),o=(0,h.useSelector)(p.ZP.selectors.getEntity).uri,[i,l]=(0,r.useState)(!1);return{processInstance:(0,r.useCallback)(((r,i)=>(l(!0),(0,u.$ju)({workflowPath:t,tenant:a,environment:n,processType:i,comment:r,objectURIs:[o]}).then((()=>{e()})).catch((e=>{throw(0,m.R)(e),e})).finally((()=>{l(!1)})))),[o,n,e,a,t]),loading:i}})(),P=Boolean(t);return a().createElement(a().Fragment,null,a().createElement(l.Popover,{open:P,anchorEl:t,onClose:n,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},classes:{paper:o.popoverPaper}},a().createElement("div",{className:o.content},a().createElement(l.Typography,{className:o.title},i().text("Add new workflow")),a().createElement(d.Z,{className:o.simpleDropDownSelector,variant:"filled",height:40,TextFieldProps:{InputProps:{disableUnderline:!0}},placeholder:i().text("Select task type"),value:f,onChange:e=>{y(e)},label:"",options:E.map((e=>({value:e.type,label:e.displayName})))}),a().createElement(l.TextField,{variant:"filled",hiddenLabel:!0,size:"small",placeholder:"Type a comment",InputProps:{disableUnderline:!0,classes:{input:o.input,root:o.inputRoot}},value:s,onChange:e=>{c(e.target.value)},multiline:!0})),a().createElement("div",{className:o.footer},a().createElement(l.Button,{disabled:T,className:o.cancelButton,onClick:n},i().text("Cancel")),a().createElement(l.Button,{disabled:T,color:"primary",onClick:()=>{w(s,null==f?void 0:f.value).then((()=>{v(!0),c(""),y(null),n()})).catch((()=>{}))}},i().text("Start")))),a().createElement(l.Portal,{container:document.body},a().createElement(l.Snackbar,{open:x,autoHideDuration:5e3,onClose:()=>{v(!1)},message:i().text("A new workflow has started")})))},x=(0,f.Z)({button:{padding:"9px 16px 9px 12px",marginLeft:"auto",marginRight:"8px"},buttonLabel:{fontSize:"14px",fontWeight:500,lineHeight:"16px"},icon:{fontSize:"18px",marginRight:"8px"}}),v=()=>{const e=x(),[t,n]=(0,r.useState)(null),o=(0,c.Z)(),d=o("START_PROCESS_INSTANCE"),p=o("VIEW_PROCESS_DEFINITIONS");return d&&p?a().createElement(a().Fragment,null,a().createElement(l.Button,{color:"primary",className:e.button,onClick:e=>n(e.currentTarget)},a().createElement(s.Z,{className:e.icon}),a().createElement("div",{className:e.buttonLabel},i().text("Add"))),a().createElement(y,{anchorEl:t,onClose:()=>n(null)})):null}},61756:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var r=n(24328),a=n(52730),o=n(17440),i=n(59431),l=n(70687),s=n(85229),c=n(22994);function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=e=>{const{processTypes:t,assignee:n,showClosedTasks:p}=e||{},h=(0,s._)(),g=(0,a.useSelector)(i.ZP.selectors.getWorkflowPath),m=(0,a.useSelector)(i.ZP.selectors.getWorkflowEnvironmentUrl),f=(0,a.useSelector)(i.ZP.selectors.isWorkflowEnabled),b=(0,a.useSelector)(i.ZP.selectors.getTenant),y=(0,a.useSelector)(i.ZP.selectors.getEntityUri),x=(0,a.useSelector)(i.ZP.selectors.getIsEditableMode),v=(0,c.Z)()("VIEW_TASKS"),E=!(!g||!m)&&f&&v,[w,T]=(0,r.useState)(null),[P,I]=(0,r.useState)(0),[O,C]=(0,r.useState)(!1),D=(0,r.useCallback)((()=>{C(!0);const e=!Array.isArray(t)||t.includes("*")?null:t,r=(e||[null]).map((e=>(0,l.uT0)({entityUri:y,workflowPath:g,environment:m,tenant:b,filter:{assignee:n,processType:e},includeClosed:!!p})));h(Promise.all(r)).then((t=>{const r=(0,o.pipe)((0,o.map)((0,o.prop)("data")),(0,o.reject)(o.isNil),o.flatten,(0,o.uniqBy)((0,o.prop)("taskId")),(0,o.filter)(u(e,n)))(t);T(r),I(r.length)})).catch((e=>{console.warn("Workflow error",e)})).finally((()=>{C(!1)}))}),[y,m,h,b,g,n,p,t]);(0,r.useEffect)((()=>{y&&E&&!(0,l.ZiX)(y)?D():(T(null),I(0))}),[E,y,D,x]);const k=(0,r.useCallback)(((e,t)=>{T((n=>n.map((n=>n.taskId===e?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}({},n,t):n))))}),[]);return{tasks:w,total:P,loading:O,updateTaskState:k,loadWorkflowTasks:D}},u=(e,t)=>n=>(!e||e.includes(n.processType))&&(!t||t===n.assignee)},97090:(e,t,n)=>{"use strict";n.d(t,{vl:()=>r,r:()=>a,Q3:()=>o,Pi:()=>i});const r={CIRCLE:"circle",POLYGON:"polygon"},a={fillColor:"rgb(242,82,82)",fillOpacity:.1,strokeWeight:2,strokeColor:"#F25252",clickable:!1,editable:!0,zIndex:1},o={mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1},i=.001},91676:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="EntityMarkerContext"},47872:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(24328);const a=n.n(r)().createContext({});a.displayName="InterceptHandlersContext"},26481:(e,t,n)=>{"use strict";n.d(t,{j:()=>a});var r=n(24328);const a=n.n(r)().createContext(!1);a.displayName="ProfilePerspectiveViewContext"},60115:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var r=n(24328);const a=n.n(r)().createContext({getCurrentPerspectiveId:()=>"",setEntityUri:()=>{},showPerspective:()=>{}})},53607:(e,t,n)=>{"use strict";n.d(t,{U:()=>c});var r=n(70687),a=n(26929);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=async(e,t)=>{const{accessToken:n}=await(null==t?void 0:t());return n?o({},e.headers,{Authorization:`Bearer ${n}`}):e.headers},s=(e,t)=>{const{url:n}=e;return n?(!(null==t?void 0:t.some((e=>{var t;const r=null===(t=n.match(/^(https?:\/\/[^:/?#]*).*$/))||void 0===t?void 0:t[1],a=new RegExp("^"+e+"$"),o=e.replace(/\/*$/,"");return o===n||r&&r===o||(null==o?void 0:o.startsWith("/"))&&(null==n?void 0:n.startsWith(o))||e&&a.test(n)})))||0===((null==t?void 0:t.length)||0))&&{errorMessage:"Not enough permissions"}:{errorMessage:"URL is empty"}},c=e=>{let{name:t,paramObject:n,permissions:i,worker:c,metadata:d,config:p,apiPath:u,servicesPath:h,user:g,workflowPath:m,entity:f,tenant:b,entityUri:y,query:x,openSearch:v,environment:E,getCurrentPerspectiveId:w,showPerspective:T,workflowCheckPermission:P,setEntityUri:I}=e;const O=e=>{e.then((e=>{c.postMessage(o({action:"response",result:{data:e,headers:n.params.headers,status:200}},n.params))})).catch((e=>{c.postMessage(o({action:"response",result:{data:e,headers:n.params.headers,status:0}},n.params))}))},C=(0,a.D)(h)?()=>(0,r.hPi)({servicesPath:h}):()=>Promise.resolve({accessToken:""});switch(t){case r.MVv.API:{const e=(async(e,t,n)=>{const a=s(e,t);if(a)return a;const o=await l(e,n);return await(0,r.SL_)({url:e.url,method:e.method,data:e.data,headers:o,noRequestProcessor:!0})})(n.params,i,C);O(e);break}case r.MVv.WORKFLOW:{const e=(async(e,t,n,a,o)=>{const{url:i}=e,c=s(e,t);if(c)return c;const d=i.includes("http:")||i.includes("https:");if(!n&&!d)return{errorMessage:"Workflow path is not defined"};const p=await l(e,o);return await(0,r.oUH)({url:i,method:e.method||"GET",data:e.data,tenant:a,headers:p,workflowPath:n})})(n.params,i,m,b,C);O(e);break}case r.MVv.WORKFLOW_START_PROCESS_FROM_QUERY:{const e=((e,t,n,a,i)=>{if(!e.processDefinitionId)return new Promise((e=>e({errorMessage:"processDefinitionId is empty"})));if(!e.searchString)return new Promise((e=>e({errorMessage:"searchString is empty"})));if(!n)return new Promise((e=>e({errorMessage:"Workflow path is not defined"})));const l=s(o({url:"/processInstances/_generateFromQuery"},e),t);return l?new Promise((e=>e(l))):(0,r.FuV)({workflowPath:n,processType:e.processDefinitionId,searchString:e.searchString,tenant:a,environment:i})})(n.params,i,m,b,E);O(e);break}case r.MVv.GET_CONFIGURATION:c.postMessage(o({action:"response",result:d},n.params));break;case r.MVv.GET_UI_CONFIGURATION:{const e=o({},p,{action:o({},p.action)});e.action.permissions&&delete e.action.permissions,c.postMessage(o({action:"response",result:e},n.params));break}case r.MVv.SET_ENTITY_URI:{const e=e=>c.postMessage(o({action:"response",result:e},n.params));I(n.params.entityUri,e);break}case r.MVv.SET_PERSPECTIVE:T(n.params.perspective),c.postMessage(o({action:"response",result:w()},n.params));break;case r.MVv.GET_PERSPECTIVE:w&&c.postMessage(o({action:"response",result:w()},n.params));break;case r.MVv.WORKFLOW_CHECK_PERMISSION:c.postMessage(o({action:"response",result:P(n.params.permission)},n.params));break;case r.MVv.GET_SEARCH_QUERY:c.postMessage(o({action:"response",result:x},n.params));break;case r.MVv.OPEN_SEARCH:v({viewId:p.id,searchState:n.params.searchState||{}});break;case r.MVv.GET_ENTITY_URI:c.postMessage(o({action:"response",result:y},n.params));break;case r.MVv.GET_ENTITY:c.postMessage(o({action:"response",result:f},n.params));break;case r.MVv.GET_API_PATH:c.postMessage(o({action:"response",result:u},n.params));break;case r.MVv.WORKFLOW_GET_WORKFLOW_PATH:c.postMessage(o({action:"response",result:m},n.params));break;case r.MVv.GET_TENANT:c.postMessage(o({action:"response",result:b},n.params));break;case r.MVv.GET_USER:c.postMessage(o({action:"response",result:g},n.params));break;case r.MVv.ALERT:c.postMessage(o({action:"response",result:window.alert(n.params.text)},n.params));break;case r.MVv.CONFIRM:c.postMessage(o({action:"response",result:window.confirm(n.params.text)},n.params));break;case r.MVv.PROMPT:c.postMessage(o({action:"response",result:window.prompt(n.params.text,n.params.defaultText||"")},n.params));break;case r.MVv.OPEN_WINDOW:window.open(n.params.url,"_blank");break;case r.MVv.RELOAD_PAGE:location.reload()}}},26929:(e,t,n)=>{"use strict";n.d(t,{D:()=>l,jm:()=>s,aZ:()=>d,Fx:()=>u,dH:()=>h,R3:()=>g,Yo:()=>m});var r=n(58697),a=n.n(r);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=e=>null==e?void 0:e.includes("/nui"),s=(e,t)=>l(e)?`${e.replace(`${t}/`,"")}worker_api.js`:`${e}worker_api.js`,c=(e,t,n)=>{let r=[];const a=e.getAttribute("ui-actions"),i=e.getAttribute("ui-tooltip"),l=e.getAttribute("id")||e.getAttribute("name");return a&&(a.split(",").forEach((n=>{const a=e=>{var r;const a=e.target,i=r=>{t.postMessage({action:"event",type:"uiAction",data:{type:n,id:l,event:o({},e,{files:r})}})};null!==(r=a.files)&&void 0!==r&&r.length?(e=>{const t=Array.from(e).map((e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=n=>{const r=n.target.result,{lastModified:a,name:o,size:i,type:l}=e;t({lastModified:a,name:o,size:i,type:l,content:r})},r.onerror=e=>{n(e)},r.readAsArrayBuffer(e)}))));return Promise.all(t)})(a.files).then(i):i()};e.addEventListener(n,a),r.push((()=>{e.removeEventListener(n,a)}))})),e.removeAttribute("ui-actions")),i&&n(i),e.childNodes.forEach((e=>{1===e.nodeType&&(r=r.concat(c(e,t,n)))})),r},d=e=>{let{worker:t,setTooltip:n,innerText:r,html:a,setListenersToReset:o,setHtml:i}=e;const l=document.createElement("div");l.innerHTML=a||r,o(c(l,t,n)),i(l)},p=(e,t)=>(e||[]).some((e=>{const n=new RegExp(`^${e}$`);return e.replace(/\/*$/,"")===t||e&&n.test(t)})),u=e=>{let{workerRef:t,setRequestListeners:n}=e;return{processApiRequest:(e,r,o,i,l)=>{const s=a()();n({url:e,method:r,headers:o,noRequestProcessor:!0},l,s),t.current.postMessage({action:"apiRequest",id:s,url:e,method:r,headers:o,data:i})}}},h=e=>{let{workerRef:t,setResponseListeners:n}=e;return{processApiResponse:(e,r,o,i)=>{const l=a()();n(i,l),t.current.postMessage({action:"apiResponse",id:l,url:e,method:r,data:o})}}},g=e=>{let{apiPath:t,reltioPath:n,tenant:r,processApiRequest:i,workerRef:l,setRequestListeners:s}=e;return e=>{let{options:c={},url:d,next:u}=e;const h=d.startsWith("/")&&!d.startsWith(t)?`${n}/api/${r}${d}`:`${n}${d.replace(t,"")}`;if(p(i,h)){const e=a()();s(c,u,e),l.current.postMessage({action:"apiRequest",id:e,url:h,method:c.method,headers:o({},c.headers,{origin:"ui",requestId:e}),data:c.body})}else u(d,c)}},m=e=>{let{reltioPath:t,apiPath:n,processApiResponse:r,workerRef:o,setResponseListeners:i}=e;return e=>{var l;let{url:s,response:c,next:d,options:u,abort:h}=e;if("ui"===(null==u||null===(l=u.headers)||void 0===l?void 0:l.origin))c.json().then((e=>{var t,n;i(d,u.headers.requestId),o.current.postMessage({action:"response",result:{data:e,status:c.status},id:null==u?void 0:u.id,name:null==u||null===(t=u.task)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.name})})).catch((e=>{h(e)}));else{const e=`${t}${s.replace(n,"")}`;if(p(r,e)){const t=a()();c.json().then((n=>{i(d,t),o.current.postMessage({action:"apiResponse",id:t,url:e,method:u.method,data:n})})).catch((e=>{h(e)}))}else d(c)}}}},9757:(e,t,n)=>{"use strict";n.d(t,{E:()=>w});var r=n(24328),a=n(52730),o=n(59431),i=n(70687),l=n(17440),s=n(22994),c=n(24330),d=n.n(c);const p={attributes:{"*":["accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","y","y1","y2","yChannelSelector","z","zoomAndPan","ui-actions","ui-tooltip"],img:["src","srcset","alt","title","loading"],link:["href","rel"],iframe:["src"],a:["href"]},tags:["animate","animateColor","animateMotion","animateTransform","mpath","set","circle","ellipse","line","polygon","polyline","rect","defs","glyph","g","marker","mask","missing-glyph","pattern","svg","switch","symbol","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","feDistantLight","fePointLight","feSpotLight","circle","ellipse","line","path","polygon","polyline","rect","defs","g","svg","symbol","use","altGlyph","altGlyphDef","altGlyphItem","glyph","glyphRef","textPath","text","tref","tspan","altGlyph","textPath","tref","tspan","clipPath","color-profile","cursor","filter","foreignObject","script","style","view","a","link","input","button","iframe","img"]};function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){h(e,t,n[t])}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g=()=>{const{allowedAttributes:e,allowedTags:t}=d().defaults,{attributes:n,tags:r}=p,a={allowedTags:t.concat(r),allowedAttributes:u({},e,n),allowVulnerableTags:!0};return e=>d()(e,a)};var m=n(97094),f=n(60115),b=n(47872),y=n(53607),x=n(26929);function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){E(e,t,n[t])}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[c,d]=(0,r.useState)(),[p,u]=(0,r.useState)([]),[h,E]=(0,r.useState)([]),[w,T]=(0,r.useState)(!0),[P,I]=(0,r.useState)(),[O,C]=(0,r.useState)(null),[D,k]=(0,r.useState)({}),S=(0,r.useRef)(),N=(0,r.useRef)({}),R=(0,r.useRef)({}),_=(0,a.useDispatch)(),L=g(),M=(0,a.useSelector)(o.ZP.selectors.getUIPath),j=(0,a.useSelector)(o.ZP.selectors.getTenant),A=(0,x.jm)(M,j),V=(0,r.useContext)(m.S),U=(0,r.useContext)(f.Y),F=(0,r.useContext)(b.p),Z=(0,s.Z)(),B=(0,a.useSelector)(o.ZP.selectors.getMetadata)||{},z=(0,a.useSelector)(o.ZP.selectors.getEntity)||{},H=(0,a.useSelector)(o.ZP.selectors.getApiPath),W=(0,a.useSelector)(o.ZP.selectors.getServicesPath),q=(0,a.useSelector)(o.ZP.selectors.getReltioPath),G=(0,a.useSelector)(o.ZP.selectors.getWorkflowPath),K=(0,a.useSelector)(o.ZP.selectors.getUser),Y=(0,a.useSelector)(o.ZP.selectors.getEntityUri),$=(0,a.useSelector)(o.ZP.selectors.getIsEditableMode),Q=(0,a.useSelector)(o.ZP.selectors.getWorkflowEnvironmentUrl),{type:X,data:J}=(0,a.useSelector)(o.ZP.selectors.getSearchProviderData)||{},ee="search"===X?null==J?void 0:J.query:null,te=!(0,x.D)(W),ne=te?U.interceptors:F,re=e=>_(o.ui.actions.openSearch(e));let ae="",oe="";const ie=e=>{let{task:t,worker:r}=e;if(t)switch(t.action){case i.W0P.SET_HTML:{const e=L(t.params.html);t.params.id?document.getElementById(t.params.id).innerHTML=e:ae!==e&&(ae=e,(0,x.aZ)({worker:r,setTooltip:C,html:e,innerText:ae,setListenersToReset:u,setHtml:d}));break}case i.W0P.SHOW_POPUP:{const e=L(t.params);oe=e,(0,x.aZ)({worker:r,setTooltip:C,html:e,innerText:oe,setListenersToReset:E,setHtml:I});break}case i.W0P.HIDE_POPUP:oe="",I(null);break;case i.W0P.SET_VISIBILITY:"visible"===t.params?(T(!0),(0,x.aZ)({worker:r,setTooltip:C,innerText:ae,setListenersToReset:u,setHtml:d})):T(!1);break;case i.W0P.SET_TOOLTIP:C(t.params);break;case i.W0P.SET_HEIGHT:k((e=>v({},e,{height:t.params})));break;case i.W0P.SET_WIDTH:k((e=>v({},e,{width:t.params})));break;case i.W0P.SET_ENABLED:k((e=>t.params?(0,l.omit)(["pointer-events"],e):v({},e,{"pointer-events":"none"})));break;case i.W0P.LOG:console.log(t.params);break;case i.W0P.MESSAGE:V(t.params);break;case i.W0P.REQUEST:var a,o;if("ui"!==(null===(a=t.params)||void 0===a||null===(o=a.headers)||void 0===o?void 0:o.origin))(0,y.U)(v({name:t.params.name,paramObject:t,permissions:n.action.permissions,worker:r,metadata:B,config:n,user:K,servicesPath:W,apiPath:te?H:q,tenant:j,workflowPath:G,entity:z,entityUri:Y,environment:Q,query:ee,openSearch:re,workflowCheckPermission:Z},U));else{const{headers:e,id:n,url:r,method:a,data:o}=t.params,i=r.replace(q,H);N.current[e.requestId]&&(N.current[e.requestId].next(i,{body:o,id:n,task:t,headers:e,method:a}),N.current=(0,l.omit)([e.requestId],N.current))}break;case i.W0P.RETURN_PROCESSED_API_RESPONSE:case i.W0P.RETURN_PROCESSED_API_REQUEST:{const{id:e,data:n}=t.params;R.current[e]&&(R.current[e].next(n),R.current=(0,l.omit)([e],R.current));break}}},le=(e,t,n)=>{N.current=v({},N.current,{[n]:{options:e,next:t,id:n}})},se=(e,t)=>{R.current=v({},R.current,{[t]:{next:e}})},ce=(0,x.Fx)({workerRef:S,setRequestListeners:le}),de=(0,x.dH)({workerRef:S,setResponseListeners:se}),pe=(0,x.R3)({apiPath:H,reltioPath:q,tenant:j,processApiRequest:null==n||null===(e=n.action)||void 0===e?void 0:e.processApiRequest,workerRef:S,setRequestListeners:le}),ue=(0,x.Yo)({reltioPath:q,apiPath:H,processApiResponse:null==n||null===(t=n.action)||void 0===t?void 0:t.processApiResponse,workerRef:S,setResponseListeners:se}),he=(e,t)=>{var n;null===(n=S.current)||void 0===n||n.postMessage({action:"event",type:e,data:t})};(0,r.useEffect)((()=>{(0,i.O27)(n.action)||n.action.platform===i.X1H.CLASSIC||(S.current=(0,i.QWZ)(A,ie,n),he("updateEntity",z))}),[z,n]),(0,r.useEffect)((()=>{he("editMode",$)}),[$]),(0,r.useEffect)((()=>{he("changeSearchQuery",ee)}),[ee]),(0,r.useEffect)((()=>{he("changeVisibility",w)}),[w]),(0,r.useEffect)((()=>()=>{p.forEach((e=>e()))}),[p]),(0,r.useEffect)((()=>()=>{h.forEach((e=>e()))}),[h,p]);const ge=(0,r.useCallback)((()=>{he("execute",null)}),[n]);return(0,r.useEffect)((()=>{var e,t;if(!(0,i.O27)(ne)&&(null!=n&&null!==(e=n.action)&&void 0!==e&&e.processApiRequest||null!=n&&null!==(t=n.action)&&void 0!==t&&t.processApiResponse)){const{addInternalRequestInterceptor:e,addInternalResponseInterceptor:t,removeInternalRequestInterceptor:o,removeInternalResponseInterceptor:i}=ne;var r,a;return te?(e(null==n||null===(r=n.action)||void 0===r?void 0:r.processApiRequest,ce),t(null==n||null===(a=n.action)||void 0===a?void 0:a.processApiResponse,de),()=>{o(ce),i(de)}):(e(pe),t(ue),()=>{o(pe),i(ue)})}}),[n]),{html:c,visible:w,tooltip:O,customStyles:D,onClick:ge,popup:P}}},26313:(e,t,n)=>{"use strict";n.d(t,{Q:()=>p});var r=n(24328),a=n(17440),o=n(52730),i=n(59431),l=n(70687),s=n(85229);function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=e=>{const t=(0,s._)(),n=(0,o.useSelector)(i.ZP.selectors.getEntityUriWithDataTenant),[d,p]=(0,r.useState)({}),u=(0,r.useCallback)((e=>{const n=[{filter:l.j5E.EQUALS,fieldName:"uri",values:e}],r={max:e.length,activeness:l.YJ7.ALL,select:"uri,label,type"};return t((0,l.ZOr)(n,r))}),[t]),h=e=>(0,l.HvW)(e,{options:"uri,label,type"}).then((t=>c({},t,{uri:e}))).catch((()=>({}))),g=(0,r.useCallback)(((e,n)=>t(Promise.all((e||[]).map(h))).then((e=>(0,a.pipe)((0,a.reject)(a.isEmpty),(0,a.concat)(n))(e)))),[t]);return(0,r.useEffect)((()=>{const t=(0,a.pipe)((0,a.reduce)(((e,t)=>{const{objectType:r,relatedObjectUris:a}=t;return"relation"!==r&&"potentialMatch"!==r||(a||[]).forEach((t=>{t!==n&&(0,l.WgC)(t)&&!d[t]&&e.push(t)})),e}),[]),a.uniq)(e||[]);t.length&&u(t).then((e=>{const n=(0,a.pipe)((0,a.map)((0,a.prop)("uri")),(0,a.difference)(t))(e);return g(n,e)})).then((e=>{p((t=>e.reduce(((e,t)=>(e[t.uri]=t,e)),c({},t))))})).catch((()=>{}))}),[u,g,e,n]),d}},52016:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(52730),a=n(59431),o=n(70687),i=n(24328);const l=[],s=()=>{const e=(0,r.useSelector)(a.ZP.selectors.getUserRoles)||l;return{canCreate:(0,i.useCallback)((0,o.ifj)(o.WVQ.CREATE,e),[e]),canRead:(0,i.useCallback)((0,o.ifj)(o.WVQ.READ,e),[e]),canUpdate:(0,i.useCallback)((0,o.ifj)(o.WVQ.UPDATE,e),[e]),canDelete:(0,i.useCallback)((0,o.ifj)(o.WVQ.DELETE,e),[e])}}},37152:(e,t,n)=>{"use strict";n.d(t,{a:()=>h});var r=n(24328),a=n(52730),o=n(17440),i=n(59431),l=n(70687),s=n(85229),c=n(30634);function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=(0,o.when)(o.identity,(0,o.pipe)(l.VGB,o.length,(0,o.times)((e=>e+1)))),h=e=>{let{sorting:t,filter:n,page:p,rowsPerPage:h,config:g,entity:m,relationActivityFilter:f,mode:b,searchByOv:y=!1}=e;const[x,v]=(0,r.useState)(!1),E=(0,a.useDispatch)(),w=(0,a.useSelector)(i.ZP.selectors.getTenant),T=(0,a.useSelector)(i.ZP.selectors.getMetadata),P=(0,a.useSelector)(i.ZP.selectors.getDtssPath),{activityFilter:I,globalFilter:O}=(0,a.useSelector)(i.ZP.selectors.getGlobalSearchRequestOptions)||{},C=(0,s._)(),D=e=>{const t=(0,o.when)(l.Kn2,(0,o.prop)("uri")),n=(0,o.pipe)(t,(0,l.pQZ)(T));return(0,o.evolve)({entityTypes:(0,o.filter)((0,l.kuw)(T)),inRelations:(0,o.filter)(n),outRelations:(0,o.filter)(n),nextEntry:D})(e)},k=g.suggested,S=(0,r.useMemo)((()=>({searchByOv:y})),[y]),N=(0,r.useCallback)((()=>{if(null!=m&&m.uri){const e=d({},D(g.content),{sortBy:null==t?void 0:t.field,order:null==t?void 0:t.order,returnDates:!0,returnObjects:!0,activeness:{relation:f||l.Ng6.ALL,entity:I},max:h,offset:p*h,filter:(0,l.vyX)(O,n)||void 0,suggested:u(k)}),r=[e].concat((0,o.ifElse)(o.identity,(0,o.pipe)(l.VGB,(t=>t.map(((t,n)=>d({},t,{id:e.suggested[n]}))))),(0,o.always)([]))(k)),a=(0,o.cond)([[(0,o.pipe)((0,o.prop)("uri"),l.ZiX),()=>Promise.resolve([{total:0}])],[l.biM,e=>(0,l.n_1)({entityUri:e.uri,configs:r,customerTenant:w,dataTenant:e.dataTenant,dtssPath:P,options:S})],[o.T,e=>(0,l.N6e)(e.uri,r,S)]]);v(!0),C(a(m)).then((e=>{let[{connections:t,total:n}]=e;E(i.N5.relations.actions.relationsLoaded({id:g.id,connections:t,total:n}))})).finally((()=>{v(!1)}))}}),[I,T,g,E,P,null==m?void 0:m.uri,null==m?void 0:m.dataTenant,n,O,p,f,h,C,t,w,S]),R=(0,r.useRef)(!1);R.current=!1,(0,r.useEffect)((()=>{R.current=!0,N()}),[N]);const _=(0,c.D)(b);return(0,r.useEffect)((()=>{b!==l.ARY.Viewing||R.current||_===b||(R.current=!0,N())}),[N,b,_]),{isLoading:x,reload:N}}},76527:()=>{},96969:()=>{},32232:()=>{},24195:()=>{},73443:()=>{}}]);
|
|
2
2
|
//# sourceMappingURL=4115.js.map
|