@reltio/remotes 1.4.1157 → 1.4.1160
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/2700.js +1 -0
- package/4418.js +1 -1
- package/4754.js +1 -1
- package/4843.js +1 -1
- package/5609.js +1 -1
- package/5720.js +1 -1
- package/6971.js +1 -1
- package/8096.js +1 -0
- package/8428.js +1 -1
- package/9431.js +1 -1
- package/9854.js +2 -0
- package/{3435.js.LICENSE.txt → 9854.js.LICENSE.txt} +0 -0
- package/main.js +1 -1
- package/package.json +1 -1
- package/remoteEntry.js +1 -1
- package/1176.js +0 -1
- package/3435.js +0 -2
package/5609.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5609],{58991:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>Is,PY2:()=>vn,Ng6:()=>Qe,YJ7:()=>fn,NlI:()=>an,Xt7:()=>We,wfT:()=>ri,EMD:()=>Yn,HAc:()=>Ye,PEf:()=>Rn,oA3:()=>Wn,$XE:()=>ut,eWf:()=>An,q7e:()=>Be,KVe:()=>ni,WVQ:()=>xr,oZZ:()=>yi,bNA:()=>fi,Rjq:()=>Ti,G39:()=>Sn,X1H:()=>Tt,yn8:()=>at,N0y:()=>it,dZX:()=>ct,bQt:()=>mi,oS0:()=>mt,lL_:()=>pn,Nsj:()=>En,psV:()=>yn,xPW:()=>gn,pyR:()=>Jn,p8l:()=>qn,Wkf:()=>Ge,zHr:()=>Ve,NIO:()=>$e,$26:()=>gO,Esk:()=>Fn,s9T:()=>rt,MEy:()=>du,j5E:()=>nn,vAw:()=>Gn,NMQ:()=>Vn,mNm:()=>Hn,rwv:()=>pi,s_5:()=>Xn,RgZ:()=>Qn,unl:()=>di,Qy0:()=>Ei,pYu:()=>xn,wIJ:()=>qO,GFH:()=>Ke,S91:()=>wn,p3$:()=>vi,wSh:()=>Z,BDP:()=>Ui,pGS:()=>Kn,ARY:()=>ht,XGc:()=>ti,fO_:()=>Yr,wwy:()=>Ze,_XL:()=>Tn,j2V:()=>ii,dMV:()=>Zn,NBX:()=>Wg,OXy:()=>bt,BXd:()=>ot,CJB:()=>si,lXI:()=>yt,nqG:()=>bi,C68:()=>Pn,yxQ:()=>hi,Yj_:()=>et,D25:()=>Xe,ZIY:()=>pt,Tl4:()=>ZO,lwr:()=>Nn,NkU:()=>ai,Rtp:()=>ei,YGx:()=>st,uTS:()=>zn,MCv:()=>qe,IYE:()=>Bn,PiC:()=>ci,h_m:()=>ft,tJI:()=>He,fDt:()=>Je,cNQ:()=>oi,SwE:()=>Mn,ZHR:()=>ui,lD1:()=>In,lVm:()=>lt,vnX:()=>Qb,$x5:()=>Hb,_R1:()=>Bb,wUm:()=>qb,z7V:()=>Oi,dC6:()=>nt,MBD:()=>ze,GmF:()=>la,cKm:()=>dt,iP_:()=>_n,NVC:()=>tt,tPT:()=>nl,tZe:()=>kp,kRE:()=>Fy,psB:()=>My,X0$:()=>rl,zE1:()=>dl,Wm5:()=>qs,vyX:()=>nc,wLZ:()=>il,W4V:()=>se,EtK:()=>bs,Wtd:()=>tl,asT:()=>r_,kGs:()=>ge,ewt:()=>hT,O_f:()=>au,sOy:()=>Wt,Tde:()=>Er,LMI:()=>$u,skb:()=>Gv,sPt:()=>Uu,sH1:()=>Cu,RPM:()=>dE,h27:()=>Ju,Uqd:()=>rc,xG:()=>tg,Z2f:()=>pb,fgW:()=>gv,I69:()=>Qv,ZxB:()=>Kv,mdt:()=>sE,Qbq:()=>Hh,rny:()=>Bi,UEY:()=>wa,Q0T:()=>Sa,Lyr:()=>ka,sBn:()=>Pa,itK:()=>_a,H9$:()=>Ra,KPc:()=>Na,zos:()=>Aa,ELQ:()=>xa,dZs:()=>ya,Cz4:()=>da,z_L:()=>Da,fGe:()=>pa,iuF:()=>va,Wib:()=>ga,Hn0:()=>ja,obS:()=>Fa,E$L:()=>fa,XUh:()=>Oa,Qp_:()=>ha,_jk:()=>Ta,sKE:()=>Ea,WmG:()=>ba,QKx:()=>Ca,Oik:()=>Ua,s0A:()=>ma,o9m:()=>Ia,MCd:()=>La,RsS:()=>Xu,tGK:()=>Dl,lIv:()=>yl,Vg3:()=>zi,mkC:()=>Mi,xv5:()=>ea,a14:()=>Vi,yv0:()=>Zi,Zm0:()=>$i,Nxd:()=>Fi,$mM:()=>Xi,ifj:()=>Mr,NWi:()=>Ib,xr3:()=>wb,wNf:()=>Yl,iJH:()=>Ub,d89:()=>ji,Edd:()=>ki,Z5t:()=>xi,uGe:()=>Li,UoR:()=>Ci,xvW:()=>Sb,$qe:()=>Pb,yPM:()=>ca,$cp:()=>pl,vKJ:()=>ul,VtG:()=>Uc,AID:()=>Lf,B1H:()=>Vg,b7X:()=>Bh,$uE:()=>_e,keo:()=>Qh,C_p:()=>KE,G27:()=>Qm,JA0:()=>Py,b3T:()=>ve,oC6:()=>be,_Zs:()=>Oe,epC:()=>Ne,YYG:()=>Ae,f_2:()=>wy,w3l:()=>_g,QHB:()=>qm,Jso:()=>Ig,RXH:()=>Lm,Vr9:()=>th,lMm:()=>Mh,BlA:()=>d_,fmQ:()=>ps,yRD:()=>dg,NcL:()=>tm,QK6:()=>de,ymd:()=>bp,JV_:()=>zy,XiW:()=>Xf,Yrx:()=>Ey,GPx:()=>el,gjI:()=>Zs,vlo:()=>kT,E_P:()=>rE,aAL:()=>op,NBq:()=>ds,wp9:()=>oE,DsR:()=>ep,MPc:()=>Ff,gWE:()=>Mf,DT_:()=>$f,ipn:()=>Gf,ORg:()=>Si,_wz:()=>Vf,RYR:()=>yT,PP2:()=>by,wS7:()=>hb,cBQ:()=>Mc,pBq:()=>hf,DsO:()=>ee,X78:()=>ef,xZs:()=>Hy,YFy:()=>hy,Gmt:()=>Wy,K$w:()=>Gy,DSj:()=>sp,k9j:()=>Vc,ww$:()=>al,WVU:()=>Vy,hxF:()=>Hs,nwO:()=>T_,Mzk:()=>Dc,aFF:()=>eb,HRH:()=>Tu,EZK:()=>Hp,Kxm:()=>Yp,Z9i:()=>IE,CrF:()=>Dy,DNd:()=>$a,vUy:()=>s_,lJh:()=>hu,zHo:()=>bu,sEJ:()=>Bg,UO$:()=>Af,zeJ:()=>gr,dLR:()=>_s,JQy:()=>Ss,XtP:()=>vs,Ug0:()=>en,A1W:()=>qh,sw:()=>Qp,nv3:()=>Mb,JgD:()=>Fb,nve:()=>qg,SkP:()=>ws,SAs:()=>Of,PWK:()=>Mo,IM5:()=>gs,Mfk:()=>Yh,mB6:()=>fb,p6d:()=>w,o0x:()=>U,ufS:()=>nb,k7L:()=>ib,mrB:()=>I,ncP:()=>xt,Zmi:()=>Ct,hm5:()=>Dt,ECL:()=>Gr,vPL:()=>Xp,qmL:()=>eE,hXd:()=>Qi,OCS:()=>Hi,p2l:()=>Cs,qF1:()=>Op,_X$:()=>vp,yj2:()=>GO,bzh:()=>cE,k66:()=>Ko,kiP:()=>co,pSg:()=>ce,kz_:()=>_y,H_U:()=>Xo,t9e:()=>Qa,j2$:()=>xp,PFL:()=>ar,aJ3:()=>yO,To9:()=>mr,wpo:()=>md,ADq:()=>NE,UUb:()=>_E,tQX:()=>AE,xy8:()=>ur,EUG:()=>_r,AFK:()=>Kt,X3M:()=>vr,WN0:()=>Jo,kDl:()=>As,uDV:()=>ZT,IhQ:()=>Rs,R$r:()=>tE,w80:()=>Po,Pfu:()=>Ba,Gtj:()=>Rl,fyF:()=>Nl,kkq:()=>Ho,u5q:()=>Ft,O$n:()=>Td,ptG:()=>Ed,f4_:()=>lm,uap:()=>sm,d7q:()=>Ty,liG:()=>Oy,$oF:()=>fy,avf:()=>RT,DiQ:()=>NT,cfX:()=>AT,vD3:()=>ST,Qrb:()=>_T,EJQ:()=>PT,HWy:()=>gT,gjS:()=>ET,y6v:()=>vT,JUW:()=>Iy,GtP:()=>hm,_kX:()=>Ga,u1e:()=>Wa,sJj:()=>Xh,CJp:()=>Em,uKF:()=>Jh,wo0:()=>xy,s5:()=>Go,cwx:()=>Vo,Y6b:()=>iy,TTx:()=>qy,UtR:()=>ay,HaQ:()=>Qy,E6I:()=>Ly,Won:()=>sy,vTU:()=>ry,Nsy:()=>ad,KMQ:()=>Zh,Do$:()=>ud,CSV:()=>js,TMe:()=>oy,l1V:()=>vu,VQ1:()=>Nu,z7d:()=>xT,Xaq:()=>es,Sj8:()=>c_,PJj:()=>Ul,k3T:()=>rn,PjQ:()=>Ii,s7l:()=>Rc,GGR:()=>CT,j5q:()=>IT,DnY:()=>_c,RY5:()=>QT,Px$:()=>fT,KPC:()=>Fg,NIY:()=>Cc,HvW:()=>Sc,Fof:()=>Ha,BTI:()=>pd,uie:()=>ed,ChB:()=>Kp,q27:()=>bd,fAQ:()=>af,XkT:()=>gc,lrH:()=>of,nt9:()=>Kr,XH8:()=>fd,XH2:()=>tn,jFi:()=>yd,qhs:()=>Ro,wwR:()=>cd,Uk3:()=>Jt,ev7:()=>Gg,RB9:()=>Ry,iFp:()=>fE,e$p:()=>EE,PcX:()=>mE,SpP:()=>TE,R6_:()=>TO,CY1:()=>_O,Ajk:()=>hc,Yiz:()=>mc,FK9:()=>pc,UOo:()=>ab,aTW:()=>By,uug:()=>Wl,P$2:()=>RO,XS2:()=>jl,Hyb:()=>tu,d3Y:()=>sc,Klp:()=>uc,WxZ:()=>PO,Gzu:()=>Ou,ZOr:()=>vc,uqV:()=>Zd,Pm4:()=>re,hWO:()=>qt,nVD:()=>KT,dED:()=>dy,P2h:()=>py,jrr:()=>oo,mmY:()=>lo,T6O:()=>zo,h6J:()=>Lp,hM2:()=>Lg,XR6:()=>X,jmz:()=>zT,IHt:()=>XT,NZI:()=>wE,wdF:()=>rf,kgP:()=>nf,ZYI:()=>Tp,QXK:()=>vl,efz:()=>gl,Q5d:()=>Ol,Ysv:()=>_l,UWq:()=>$T,ocC:()=>MT,io3:()=>zr,Sbt:()=>wo,roS:()=>So,Ww1:()=>Io,QaS:()=>jc,ERZ:()=>vg,CL1:()=>Dg,idV:()=>qp,nIW:()=>Bt,fjE:()=>EO,sG0:()=>ob,tV7:()=>Cl,g8o:()=>XO,Qy:()=>JO,t2P:()=>dO,wId:()=>ho,LS0:()=>bo,bFH:()=>$d,Rgl:()=>Gd,fW1:()=>rm,Ywp:()=>Yb,pg:()=>_d,WSA:()=>Wd,fed:()=>Ug,tT_:()=>Ps,KbL:()=>Nc,JBA:()=>Zt,aNC:()=>xb,RFJ:()=>fp,Zeh:()=>_f,OT5:()=>Wb,mC3:()=>Tl,kR6:()=>p_,NVY:()=>iE,k6v:()=>gp,FEC:()=>_p,Ob5:()=>Od,KUV:()=>vd,dvH:()=>nE,V3i:()=>ih,VD3:()=>Zr,mm2:()=>Au,rou:()=>yf,izH:()=>Ya,DK$:()=>qa,KMp:()=>ap,c31:()=>gt,mbo:()=>PE,gT8:()=>Nt,CZ8:()=>us,uGi:()=>Ts,Poc:()=>Ot,_9k:()=>hs,ZTM:()=>ys,bwT:()=>Es,tzW:()=>Pt,tF$:()=>At,o96:()=>cs,M4S:()=>ms,_vs:()=>zc,xF8:()=>mT,HQx:()=>tb,ATu:()=>RE,j1S:()=>Ri,V3K:()=>Ai,Lmx:()=>Ni,ZaZ:()=>vt,n_1:()=>ty,N6e:()=>rp,SxO:()=>so,w3p:()=>aE,xU7:()=>pe,Y_p:()=>Lo,$k6:()=>Co,Gdl:()=>lb,U6P:()=>sb,OwB:()=>fO,hTh:()=>JT,xqc:()=>Wo,JvE:()=>Yo,i29:()=>Bu,dzT:()=>Wi,uPS:()=>Fc,cZV:()=>xc,n3B:()=>wv,e6O:()=>_v,s7j:()=>BO,j$Q:()=>Uy,kW2:()=>mm,tH7:()=>$o,Yxg:()=>$s,MaZ:()=>UT,nqN:()=>wT,jWj:()=>GT,o_J:()=>ts,hgZ:()=>Jp,yW4:()=>Dp,uT0:()=>Up,C82:()=>Cp,u9Z:()=>df,J$m:()=>ey,j_Q:()=>yc,OaI:()=>fc,wB1:()=>$g,SP6:()=>gd,ZYr:()=>xg,IMU:()=>yp,FoU:()=>Sy,DVz:()=>yb,mxe:()=>Pv,FHr:()=>vf,D1g:()=>ff,VO3:()=>zb,de5:()=>Xb,Uw1:()=>Te,J6q:()=>SE,XCe:()=>no,Ir:()=>fo,XQO:()=>To,QXb:()=>Ld,P8_:()=>Jy,iiD:()=>ip,MOC:()=>Dd,WF:()=>Cd,xE1:()=>wi,idW:()=>e_,QWZ:()=>rb,YL3:()=>Lc,Fn9:()=>T,j2U:()=>Us,MpE:()=>St,kQw:()=>sr,mfm:()=>ru,vZp:()=>Xt,E8K:()=>Kg,VSb:()=>ss,vr_:()=>or,Vmh:()=>o_,FgW:()=>nh,oDv:()=>ns,kuw:()=>as,eHk:()=>VT,Tt2:()=>rs,T6Y:()=>Cr,_26:()=>zl,YkM:()=>Tr,J6y:()=>Fl,njU:()=>ql,TBP:()=>is,IT0:()=>UE,x_:()=>zh,biM:()=>sd,TMl:()=>ld,Vkd:()=>Kl,WiY:()=>OO,_zi:()=>Jl,J6D:()=>_u,Lt4:()=>Rr,QEi:()=>br,whI:()=>qr,KIu:()=>Hr,JhM:()=>oe,C_0:()=>jr,qIF:()=>Iv,O27:()=>E,aBi:()=>hd,xOX:()=>Bs,EdS:()=>Vt,WgC:()=>$t,eEv:()=>nr,A4t:()=>Ql,YOQ:()=>zt,Wos:()=>Ir,jWr:()=>Ma,Or$:()=>fr,lhE:()=>Xr,CwH:()=>hr,pzC:()=>Gs,ymH:()=>Bl,QZu:()=>dr,rYH:()=>bO,FVt:()=>wr,Kn2:()=>ue,jgw:()=>nu,OXP:()=>os,lS4:()=>Or,g5f:()=>vO,fp6:()=>Vl,Uty:()=>na,YkG:()=>yr,xdS:()=>Rt,kMF:()=>Wf,$NE:()=>Gt,bC9:()=>Mt,Ian:()=>Pi,KVV:()=>Kh,q9e:()=>Uo,iIf:()=>ub,ian:()=>Ks,m6e:()=>kr,OFd:()=>Ws,kqr:()=>lr,fnZ:()=>Br,VFZ:()=>Js,ZiX:()=>jt,j5n:()=>Pr,zkt:()=>_,Pcm:()=>Mg,QDV:()=>Vs,M5u:()=>hO,laD:()=>Sv,mtq:()=>rr,CtB:()=>cb,CBv:()=>ae,I0t:()=>Dr,u1G:()=>jT,gk1:()=>Nv,Bgb:()=>Av,uzs:()=>Qr,v0l:()=>Su,Zqp:()=>ly,j0k:()=>Fo,tCm:()=>Ht,gmx:()=>kl,mOr:()=>yu,TwZ:()=>zO,GyU:()=>$b,zGm:()=>Rd,bMg:()=>Qd,EyD:()=>Nb,FQA:()=>Rb,fZN:()=>Jd,xsF:()=>_b,Lxg:()=>Ab,O3l:()=>Wc,Wni:()=>Gc,wRx:()=>Lb,OxG:()=>xd,uJQ:()=>kd,qWg:()=>db,i96:()=>Ad,zhn:()=>Cb,G8q:()=>gi,Jct:()=>lT,A9Y:()=>te,Y5F:()=>yg,gxP:()=>le,c$P:()=>xl,M7o:()=>tc,BBN:()=>ao,ZBU:()=>J,UkJ:()=>Oo,xkv:()=>Ky,z$M:()=>t_,KAm:()=>Ny,lCl:()=>Df,rkF:()=>JE,IU6:()=>Gp,RGr:()=>h,aYu:()=>m,ije:()=>Il,Buf:()=>np,YLu:()=>wl,ct9:()=>jo,XkY:()=>Hd,T5R:()=>Pd,uQS:()=>Xd,wcJ:()=>Do,d$I:()=>ol,rSp:()=>od,Sx:()=>Ic,Ilm:()=>fl,Ki6:()=>Qs,VGk:()=>Zc,sFD:()=>Dm,eWN:()=>n_,dWE:()=>YO,Lkd:()=>zf,aDL:()=>Nf,yaA:()=>zd,lOh:()=>Ef,DBr:()=>uO,hK$:()=>Ll,TZ_:()=>Vp,CMB:()=>Uv,FU8:()=>wc,J$p:()=>wf,b5s:()=>Sf,h2W:()=>Qt,SL_:()=>uf,oUH:()=>Sp,ck9:()=>Sd,Xs0:()=>Sl,u7I:()=>Tf,rxg:()=>su,bji:()=>lu,oCZ:()=>BE,MjG:()=>Jb,FuV:()=>Pp,$ju:()=>Ip,t6d:()=>wp,m5F:()=>fe,sx:()=>i_,rSc:()=>Tb,U10:()=>Tc,L8n:()=>$y,R9X:()=>ny,rj2:()=>Zy,_C4:()=>Fp,tCj:()=>Xy,uAg:()=>my,wx9:()=>bT,KF3:()=>Mp,ax9:()=>$p,HH7:()=>tp,_6y:()=>$c,AJo:()=>kc,Ixr:()=>Cy,P6Y:()=>E_,Bd_:()=>VE,xkB:()=>$E,W41:()=>pf,WkI:()=>cf,sSE:()=>ME,GMd:()=>Vu,Bxm:()=>WE,FVh:()=>DE,U_T:()=>Yd,FTe:()=>ie,VGB:()=>ne,Wfe:()=>mu,Ls5:()=>Eu,$bd:()=>cu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>H,getStartOfDay:()=>P,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>A,toUtcDate:()=>N});var a={};r.r(a),r.d(a,{applyCrosswalks:()=>ge,collectCrosswalksFromAttributes:()=>_e,compareActivenessAttributes:()=>ve,compareAttributes:()=>be,compareImages:()=>Oe,compareRoles:()=>Ne,compareTags:()=>Ae});var o={};r.r(o),r.d(o,{addAttribute:()=>Se,editAttribute:()=>we,editEndDate:()=>je,editRoles:()=>Ce,editStartDate:()=>De,editTags:()=>Le,removeAttribute:()=>Ue});var s={};r.r(s),r.d(s,{createHistoryManager:()=>Fe});var l=r(17440);const u=e=>"string"==typeof e&&"function"==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,c=(e,t)=>(t=(u(t)||"").toLowerCase(),(e=(u(e)||"").toLowerCase()).includes(t)),p=(0,l.curry)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n="asc"===e.toLowerCase();return t=t.toLowerCase(),r=r.toLowerCase(),t<r?n?-1:1:t>r?n?1:-1:0})),d=(0,l.replace)(/(\r\n|\n|\r)/gm,"");var y=r(95038),f=r.n(y);const T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{startDate:t,endDate:r}=e,n=Date.now();return!(r&&r<n||t&&t>n)},E=(0,l.anyPass)([l.isEmpty,l.isNil]),m=e=>()=>new Promise(e),h=e=>Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e}))).catch((e=>({status:"rejected",reason:e})))))),b=e=>e&&e.isValid(),O=(0,l.either)(b,l.isNil),v=e=>e&&e.toDate(),g=e=>(e&&e.setHours(0,0,0,0),e),_=e=>f()(e).isSame(Date.now(),"day"),A=e=>{const t=new Date(e);return new Date(t.getTime()+60*t.getTimezoneOffset()*1e3)},N=e=>{const t=new Date(e);return new Date(t.getTime()-60*t.getTimezoneOffset()*1e3)},R=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),P=R("startOf"),S=R("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),L=(0,l.equals)("99"),D=(0,l.equals)("9999"),j=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),x=(0,l.test)(/^9+$/),F=(0,l.test)(/^[9az]+$/),M=(0,l.cond)([[C,(0,l.always)("M")],[L,(0,l.always)("MM")],[j,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[F,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[L,(0,l.always)("DD")],[F,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[L,(0,l.always)("YY")],[D,(0,l.always)("YYYY")],[x,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),G=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),C),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),L),(0,l.always)("hh")],[C,(0,l.always)("H")],[L,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),W=(0,l.cond)([[C,(0,l.always)("m")],[L,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),Y=(0,l.cond)([[C,(0,l.always)("s")],[L,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),B=/([9az]+)([^9az]+)*/g,q=e=>{const t=[...e.toLowerCase().matchAll(B)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t);return(0,l.join)("",[M(e),r,$(n),i,V(a),o])}return e},Q=/(9+)([^9]+)*/g,H=e=>{const t=[...e.toLowerCase().matchAll(Q)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[G(e,s),r,W(n),i,a?Y(a):"",o]),c=s?" A":"",p=(0,l.pipe)(l.init,(0,l.append)(c));return(0,l.pipe)((0,l.when)((0,l.always)(s),p),(0,l.join)(""))(u)}return e},K=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${q(t)} ${H(r)}`},J=e=>{const t=Number(e);return Number.isNaN(t)?e:t},X=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt())).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0",z=e=>({isNone:()=>(0,l.isNil)(e),extract:()=>e,orSome:t=>(0,l.isNil)(e)?t:e,map:t=>(0,l.isNil)(e)?Z.None():Z.Some(t(e))}),Z={Some:z,None:()=>z(null),chain:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>t.reduce(((e,t)=>e.map(t)),e)},fromFalsy:function(e){return e?Z.Some(e):Z.None()},fromNull:function(e){return null==e?Z.None():Z.Some(e)},fromUndefined:function(e){return void 0===e?Z.None():Z.Some(e)},fromEmpty:function(e){return E(e)?Z.None():Z.Some(e)}},ee=(e,t)=>{let r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];const o=()=>{e.apply(this,i),r=null};r&&clearTimeout(r),r=setTimeout(o,t)}},te=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},re=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ne=e=>Array.isArray(e)?e:[e],ie=e=>[e],ae=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),oe=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),se=e=>(e=(e||"").toLowerCase(),oe(e)?`mailto:${e}`:!e.includes("://")&&(e.startsWith("www.")||e.split(".").length>2)?`http://${e}`:e),le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;function Ee(e){return e&&void 0!==e.uri}function me(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function he(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function be(e,t,r){var n,i,a,o=[];for(var s in e)if(e.hasOwnProperty(s)){if("paging"===s)continue;var u=e[s];if(void 0===t[s])for(var c in u)u.hasOwnProperty(c)&&o.push.apply(o,m(u[c]));else for(var p in u)if(u.hasOwnProperty(p)){var d=u[p],y=_(d,t[s]);void 0===y?o.push.apply(o,m(d)):d.value===y.value||d.lookupCode&&d.lookupCode===y.lookupCode?d.ignored!==y.ignored&&o.push.apply(o,b(y)):null==y.value||""===y.value?o.push.apply(o,m(d)):"Nested"===g(d)?d.ignored!==y.ignored&&(0,l.equals)(d.value,y.value)?o.push.apply(o,b(y)):o=o.concat(be(d.value,y.value,r)):"Reference"===g(d)?he(d,y)?o.push.apply(o,be(d.value,y.value,r)):(o.push.apply(o,m(d)),o.push(O([y]))):""!==y.value&&(!1===y.ov?o.push.apply(o,(void 0,void 0,i=(n=y).uri.lastIndexOf("/"),a=n.uri.substr(0,i),[{type:"_UPDATE_NON_OV_ATTRIBUTE",uri:n.uri,typeUri:a,value:n.lookupCode||n.value}])):o.push.apply(o,h(y)))}}for(var f in t)if(t.hasOwnProperty(f)){if("paging"===f)continue;var T=(t[f]||[]).filter((function(t){return void 0===_(t,e[f])}));(T=E((0,l.clone)(T))).length&&o.push(O(T))}return o;function E(e){return e?e.map((function(e){var t;if(e){var r=e.value;return null!=r&&(ue(r)?Object.keys(r).forEach((function(e){var n=E(r[e]);n.length>0?r[e]=n:delete r[e],t||(t=0!==n.length)})):t=null!=r&&""!==r),t||e.refEntity?e:null}})).filter((function(e){return null!=e})):[]}function m(e){return[{type:"DELETE_ATTRIBUTE",uri:e.uri}]}function h(e){return[{type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:{value:e.lookupCode||e.value}}]}function b(e){return e&&(e.ignored?function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!1}}]}(e))}function O(e){var t=e[0].uri,n=t.lastIndexOf("/"),i={type:"INSERT_ATTRIBUTE",uri:t=t.substr(0,n),newValue:e.map((function(e){var t,n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),v(n.value),e.refEntity&&(t=e.refEntity,Array.isArray(t)&&(t=t[0]),n.refEntity=t),e.refRelation&&(t=e.refRelation,Array.isArray(t)&&(t=t[0]),r||delete t.objectURI,n.refRelation=t),n}))};return i}function v(e){if(null!==e&&"[object Object]"===e.toString())for(var t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,v(e.value)}))}function g(e){var t=e.value;if(ue(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function _(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function Oe(e,t){var r,n,i=[];return e.defaultProfilePic!==t.defaultProfilePic?i.push({type:"UPDATE_PROFILE_PIC_BY_URI",newValue:{value:t.defaultProfilePic}}):(r=e.defaultProfilePicValue)===(n=t.defaultProfilePicValue)||Ee(r)&&Ee(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function ve(e,t){var r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:"UPDATE_START_DATE",newValue:{value:n}});var i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:"UPDATE_END_DATE",newValue:{value:i}}),r;function a(e,t){var r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function ge(e,t){var r="configuration/sources/Reltio";function n(e,t){return e.crosswalk={type:t.type,value:t.value},e}function i(e){return e.removeIt=!0}var a=e.map((function(e){if(e.crosswalk)return[e];var i=t.filter((function(t){return 1===(t.attributes||t.attributeURIs||[]).filter((function(t){return t===e.uri})).length})),a=i.filter((function(e){return e.type===r})),o=i.filter((function(e){return e.type!==r})),s=[];switch(e.type){case"INSERT_ATTRIBUTE":s.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":s=s.concat(i.map((function(t){return n(e,t)})));break;case"DELETE_ATTRIBUTE":(o.length||0==a.length)&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),s=s.concat(a.map((function(t){return n({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":a.length?s=s.concat(a.map((function(t){return n({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)}))):s.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0}),o.length&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}})}return s})),o=[].concat.apply([],a),s=function(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}(o,"typeUri");for(var l in s)if("undefined"!==l){var u=s[l],c=o.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===l||"INSERT_ATTRIBUTE"===e.type&&e.uri===l})),p=u.filter((function(e){return e.crosswalk&&e.crosswalk.type===r}))[0];!c.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0]&&p&&(o.push({type:"UPDATE_ATTRIBUTE",uri:p.uri,newValue:{value:p.value},crosswalk:p.crosswalk}),c.forEach(i)),u.forEach(i)}return(o=o.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),o}function _e(e,t){for(var r in t=t||[],e)if(e.hasOwnProperty(r))for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if(a.refRelation){var o=a.refRelation[0]||a.refRelation;if(o.crosswalks)for(var s=o.crosswalks.filter((function(e){return e.attributes||e.attributeURIs})),l=0;l<s.length;l++){for(var u=!0,c=0;c<t.length;c++)if(t[c].type===s[l].type&&t[c].value===s[l].value){t[c].attributes=t[c].attributes||t[c].attributeURIs,t[c].attributes=t[c].attributes.concat(s[l].attributes||s[l].attributeURIs),t[c].attributes=Object.keys(t[c].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[c].attributeURIs,u=!1;break}u&&t.push(s[l])}}}return t}function Ae(e,t){return me("UPDATE_TAGS").call(this,e,t)}function Ne(e,t){return me("UPDATE_ROLES").call(this,e,t)}function Re(e,t,r,n){var i={name:e,valueUri:r.substr(0,r.indexOf(t)+t.length)};return n&&n.uri&&(i.uri=n.uri.substr(0,n.uri.indexOf(e)+e.length)),i.hasChildren=i.valueUri!==r,i}function Pe(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Re(r[i],r[i+1],e,t));return n}function Se(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Pe(r,t)[a];if(s.hasChildren){e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]);var l=e[s.name].filter((function(e){return e.uri===s.valueUri}))[0];return Se(l.value,t,r,n,i,a+1,o)}var u=e[t.name];if(u||(u=e[t.name]=[]),null!=n){var c={value:n.refEntity?n.value:n,uri:r,type:t.uri};return n.lookupCode&&(c.value=n.value,c.lookupCode=n.lookupCode),n.refEntity&&(c.refEntity=n.refEntity,c.label=n.label),n.refRelation&&(c.refRelation=n.refRelation),i&&(c.crosswalks=i),u.splice(o||0,0,c),n}}function we(e,t,r,n,i,a){void 0===a&&(a=0);var o=Pe(r,t)[a];if(!o.hasChildren){var s,l=e[t.name],u=l&&l.filter((function(e){return e.uri===r}))[0];return u?("[object Object]"!==u.value.toString()?(Ie(n,u),i&&(u.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&l.filter((function(e){return!1===e.ov})).forEach(Ie.bind(null,n))):n.refEntity?(u.refRelation=n.refRelation,u.refEntity=n.refEntity,u.value=n.value,u.label=n.label):null!==n.value&&void 0!==n.value&&null!==u.value&&"object"==typeof u.value&&(u.value=n.value,u.label=n.label),s=u.value):s=Se(e,t,r,n,i,a),s}var c=we(e,o,o.valueUri,{},i,a);we(c,t,r,n,i,a+1)}function Ie(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function Ue(e,t,r,n){void 0===n&&(n=0);var i=Pe(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&Ue(a.value,t,r,n+1)}else{var o=e[t.name];o&&(o.forEach((function(e,t){e.uri===r&&o.splice(t,1)})),0===o.length&&delete e[t.name])}}function Ce(e,t){e.roles=t||[]}function Le(e,t){e.tags=t||[]}function De(e,t){e.startDate=t||""}function je(e,t){e.endDate=t||""}function ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){xe(e,t,r[t])}))}return e}function xe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Fe=function(e){var t=function(e,r,n,i){if(e&&r)if(n||(n=null),i=!!i,Array.isArray(e))for(var a=0;a<e.length;a++)r.call(n,a,e[a],e),i&&t(e[a],r,n,i);else if(ue(e))for(var o in e)r.call(n,o,e[o],e),i&&t(e[o],r,n,i)},r=function(e,t,r){return function(n){var i=-1!==n.uri.lastIndexOf("/")?n.uri.substring(0,n.uri.lastIndexOf("/")):"";e[i]||(e[i]=[]),e[i].push(n.type),t[n.uri]=n.type,"IGNORE_ATTRIBUTE"===n.type&&r.push(n.uri)}},n=function(e,t,r){var n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf("IGNORE_ATTRIBUTE")&&-1!==e[t].indexOf("INSERT_ATTRIBUTE")}));return Object.keys(t).filter((function(e){var t=-1!==e.lastIndexOf("/")?e.substring(0,e.lastIndexOf("/")):null;return-1!==i.indexOf(t)})).forEach((function(e){-1!==r.indexOf(e)&&n.push(e),t[e]="UPDATE_ATTRIBUTE"})),{appearance:t,ignored:n}},i=function(e,t){var r=Array.isArray(t),n=r?[]:{};return r?(e=e||[]).some((function(e){return e.uri}))?n=function(e,t){var r=e.map((function(e){return e.uri})),n=e.map((function(e){var r,n,a=(n=t.filter((function(t){return t.uri===e.uri}))[0]||{},(r=e)&&n&&r.ignored!==n.ignored&&(delete r.ignored,delete n.ignored,r.ov=!0,n.ov=!0),{a:r,b:n});return i(a.a,a.b)})),a=t.filter((function(e){return-1===r.indexOf(e.uri)}));return n.concat(a)}(e,t):(n=n.concat(e),t.forEach((function(t,r){void 0===n[r]?n[r]=t:ue(t)?n[r]=i(e[r],t):-1===e.indexOf(t)&&n.push(t)}))):(ue(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(r){ue(t[r])&&e[r]?n[r]=i(e[r],t[r]):n[r]=t[r]}))),n},a=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s=JSON.parse(JSON.stringify(a)),l=JSON.parse(JSON.stringify(o)),u=i(a,o),c={},p={},d=[],y=r(p,c,d);e.compareAttributes(u,l).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value&&(e.type="UNDO_IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)})),e.compareAttributes(u,s).map((function(e){return"DELETE_ATTRIBUTE"===e.type&&(e.type="INSERT_ATTRIBUTE"),"IGNORE_ATTRIBUTE"===e.type&&(e.type=e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)}));var f=n(p,c,d);return t(u,(function(e,t){t&&-1!==this.indexOf(t.uri)&&(t.ignored=!0,delete t.ov,t.hidden=!0)}),f.ignored,!0),{attributes:u,appearance:f.appearance}};const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=(0,l.difference)(t,e),n=(0,l.difference)(e,t),i=n.concat(t),a=(e,t)=>(0,l.pipe)((0,l.map)((t=>[t,e])),l.fromPairs)(t),o=ke({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:a,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?a(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[i,s]=o(e?e.roles:[],t.roles),[l,u]=o(e?e.tags:[],t.tags);return{attributes:r,appearance:ke({},n,{roles:s,tags:u}),roles:i,tags:l}}}},Me=r(76665);let $e,Ve,Ge,We,Ye,Be,qe,Qe,He,Ke,Je,Xe,ze,Ze,et,tt,rt,nt,it,at,ot,st,lt,ut,ct,pt,dt,yt,ft,Tt;var Et;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}($e||($e={})),function(e){e.local="local",e.validationService="validationService"}(Ve||(Ve={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(Ge||(Ge={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(We||(We={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(Ye||(Ye={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(Be||(Be={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(qe||(qe={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(Qe||(Qe={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(He||(He={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Ke||(Ke={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Je||(Je={})),function(e){e.PROFILE="profile",e.MAP="map"}(Xe||(Xe={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(ze||(ze={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(Ze||(Ze={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(et||(et={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(tt||(tt={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(rt||(rt={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(nt||(nt={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(it||(it={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(at||(at={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(ot||(ot={})),function(e){e.IN="in",e.OUT="out"}(st||(st={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(lt||(lt={})),function(e){e.BAR="bar",e.DONUT="donut",e.PIE="pie",e.TREE="tree",e.TABLE="table",e.BUBBLE="bubble",e.LINE="line",e.MAP="map",e.CLOUD="cloud"}(ut||(ut={})),function(e){e.ActivitiesViewFacet="ActivitiesViewFacet",e.CustomActionViewFacet="CustomActionViewFacet",e.DashboardFacet="DashboardFacet",e.EntitiesByTypeViewFacet="EntitiesByTypeViewFacet",e.FilteredSavedSearchesFacet="FilteredSavedSearchesFacet",e.FilteredEntitiesViewFacet="FilteredEntitiesViewFacet",e.NotificationInboxFacet="NotificationInboxFacet",e.ProfileStatsFacet="ProfileStatsFacet"}(ct||(ct={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttributeView="com.reltio.plugins.entity.attributes.SingleAttributeView",e.TableAttributeView="com.reltio.plugins.entity.attributes.AttributeTableView",e.CustomView="com.reltio.plugins.ui.CustomActionView",e.MapView="com.reltio.plugins.react.EntityMapView",e.ImageAttributeView="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatchesView="com.reltio.plugins.entity.PotentialMatchesView"}(pt||(pt={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(dt||(dt={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.Search="SearchView"}(yt||(yt={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(ft||(ft={})),function(e){e.NEW="new",e.CLASSIC="classic"}(Tt||(Tt={})),function(e){e.TYPE_STRING="String",e.TYPE_TEXT="Text",e.TYPE_PASSWORD="Password",e.TYPE_LONG="Long",e.TYPE_INT="Int",e.TYPE_DOLLAR="Dollar",e.TYPE_FLOAT="Float",e.TYPE_DOUBLE="Double",e.TYPE_NUMBER="Number",e.TYPE_BOOLEAN="Boolean",e.TYPE_BOOLEAN_RADIO="Boolean_Radio",e.TYPE_DATE="Date",e.TYPE_TIMESTAMP="Timestamp",e.TYPE_ACTIVENESS_DATE="ActivenessDate",e.TYPE_LOCAL_DATE="LocalDate",e.TYPE_BLOB="Blob",e.TYPE_ENUM="Enum",e.TYPE_CIK_ID="cik id",e.TYPE_LOOKUP="Lookup",e.TYPE_TYPEAHEAD="Typeahead",e.TYPE_URL="URL",e.TYPE_BLOG_URL="Blog URL",e.TYPE_IMAGE_URL="Image URL",e.TYPE_EMAIL="Email",e.TYPE_DEPENDENT_LOOKUP="DependentLookup",e.TYPE_ENTITY_ID="EntityId",e.TYPE_RDM_LOOKUPS_NOT_RESOLVED="RdmLookupsNotResolved",e.TYPE_COUNT="Count",e.TYPE_FILE="File",e.TYPE_SELECT="Select",e.TYPE_NESTED="Nested",e.TYPE_REFERENCE="Reference",e.TYPE_IMAGE="Image",e.TYPE_SSN="SSN"}(Et||(Et={}));const mt=Et;let ht,bt;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(ht||(ht={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(bt||(bt={}));const Ot=(0,l.prop)("referencedEntityTypeURI"),vt=(0,l.prop)("relationshipTypeURI"),gt=(0,l.prop)("referencedAttributeURIs"),_t=(0,l.curry)(((e,t)=>(0,l.pipe)(gt,(0,l.filter)((0,l.startsWith)(e)))(t))),At=_t("configuration/relationTypes"),Nt=_t("configuration/entityTypes"),Rt=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),Pt=(0,l.filter)(Rt),St=(e,t)=>!t||t.some((t=>t===e.uri)),wt="1Tempo4rary",It="1Tepmo4Rel",Ut=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),Ct=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,Lt=e=>()=>Ct(e),Dt=(e,t)=>{const r=Ut(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return Ct(n)},jt=e=>e&&e.includes("uri$$"),kt=Lt("entities"),xt=Lt("relations"),Ft=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),Mt=(0,l.startsWith)("relations/"),$t=(0,l.startsWith)("entities/"),Vt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Gt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),Wt=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),Yt=(0,l.pipe)((0,l.split)("/"),l.head),Bt=(0,l.pipe)((0,l.split)("/"),l.last),qt=e=>e.split(".").slice(0,2).join("."),Qt=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},Ht=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),Kt=(e,t)=>{const r=e.split("/"),n=t.split("/");return 2===r.length?t:[n,r.slice(2,3),r.slice(3).map(((e,t)=>t%2?r[2]:e))].flat().slice(0,-1).join("/")},Jt=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},Xt=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),zt=e=>5===e.split("/").length,Zt=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},er=e=>e.replace(/uri\$\$/g,wt);function tr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rr=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,Vt),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",mt.TYPE_STRING)]),nr=(0,l.has)("values"),ir=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(mt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(mt.TYPE_LOOKUP)],[nr,(0,l.always)(mt.TYPE_ENUM)],[rr,(0,l.always)(mt.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",mt.TYPE_BOOLEAN),(0,l.always)(mt.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),ar=(0,l.pipe)((e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){tr(e,t,r[t])}))}return e}({},e,{type:ir(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),or=e=>!!e&&(!!e.autoGenerated&&e.type!==mt.TYPE_NESTED||!!e.parentAutoGenerated),sr=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),lr=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.startsWith)("configuration/"),l.not),ur=e=>sr(e)?"analyticsAttributes":"attributes",cr=(0,l.propEq)("hidden",!0),pr=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("type")),(0,l.equals)(e))(t))),dr=pr(mt.TYPE_NESTED),yr=pr(mt.TYPE_REFERENCE),fr=pr(mt.TYPE_IMAGE),Tr=(0,l.either)(dr,yr),Er=(e,t)=>{const r=sr(e)?"analyticsAttributes":"attributes",n=e.split(`/${r}/`);return[r,...Array.isArray(t)?[...(0,l.chain)((0,l.prop)("name"),t),(0,l.last)(n)]:[...n.slice(1)]].join(".")},mr=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),hr=(0,l.pipe)(mr,Boolean),br=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),Or=(0,l.both)(hr,(0,l.pipe)(mr,("rdm",(0,l.pipe)(Yt,(0,l.equals)("rdm")))));const vr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=ur({uri:t}),i=e=>e.split(`/${n}/`).length,a=(e.entityTypes||[]).concat(e.relationTypes||[]),o=r?a.find((0,l.propEq)("uri",r)):null,s=o?i(o.uri):0,u=(r,i)=>{const o=t.split(`/${n}/`).slice(0,i+1).join(`/${n}/`),s=(0,l.last)(o.split(`/${n}/`)),c=(r?r[n]||_r(e,r)||[]:a).find((e=>{let{uri:t,name:r}=e;return t===o||r===s})),p=c?[c]:[];return c&&o!==t&&p.push(...u(c,i+1)),p},c=u(o,s),p=c.length===i(t)-s;return p?c:[]},gr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=vr(e,t,r);return n.length?(0,l.last)(n):null},_r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;return(0,l.cond)([[(0,l.has)("analyticsAttributes"),(0,l.prop)("analyticsAttributes")],[(0,l.anyPass)([(0,l.propEq)("type",mt.TYPE_NESTED),(0,l.propEq)("type",mt.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(gt,(0,l.map)((t=>gr(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},Ar=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],Nr=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],Rr=e=>Ar.includes(e),Pr=e=>Nr.includes(e),Sr=[mt.TYPE_INT,mt.TYPE_LONG,mt.TYPE_NUMBER,mt.TYPE_FLOAT,mt.TYPE_DOUBLE,mt.TYPE_COUNT],wr=e=>Sr.includes(e),Ir=e=>[mt.TYPE_FLOAT,mt.TYPE_DOUBLE].includes(e),Ur=[mt.TYPE_BOOLEAN,mt.TYPE_BOOLEAN_RADIO,mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Cr=e=>Ur.includes(e),Lr=[mt.TYPE_URL,mt.TYPE_BLOG_URL,mt.TYPE_IMAGE_URL],Dr=e=>Lr.includes(e),jr=pr(mt.TYPE_EMAIL),kr=e=>mt.TYPE_SSN===e;var xr,Fr=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(xr||(xr={}));const Mr=(0,l.curry)(((e,t,r)=>{var n;const i=e===xr.READ?["ROLE_UI_ALL","ROLE_UI_ALL_READONLY"]:["ROLE_UI_ALL"],a=null===(n=r[e])||void 0===n?void 0:n.roles;return!a||a.concat(i).some((e=>t.includes(e)))})),$r=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Vr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),$r),Gr=(0,l.pipe)((0,l.reject)(E),Vr),Wr=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+$r(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f}},Yr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Br=(0,l.equals)(Yr.SUGGESTING),qr=(0,l.equals)(Yr.EDITING),Qr=(0,l.equals)(Yr.VIEWING),Hr=(0,l.either)(qr,Br),Kr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Jr=(0,l.curry)(((e,t)=>(0,l.pipe)(Kr(e),(0,l.prop)("extendsTypeURI"))(t))),Xr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Jr(e,r)));return n(r)})),zr=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Jr(e,n);return r})),Zr=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Zr(e,Kr(e,t.extendsTypeURI),r):void 0,en=(e,t)=>{const r=t.map(zr(e));return(r.length?r.reduce(l.intersection):[])[0]},tn=(e,t)=>Zr(e,(0,l.is)(Object,t)?t:Kr(e,t),"typeImage"),rn=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&Xr(e,t,n.uri)?r.concat(n.uri):r),[]),nn={EQUALS:"equals",NOT_EQUALS:"not equals",EXISTS:"exists",FULL_TEXT:"fullText",HAS_ALL:"hasAll",MISSING_VALUE:"missing",IN_RANGE:"range",LT:"lt",LTE:"lte",GT:"gt",GTE:"gte",STARTS_WITH:"startsWith",COUNT_EQUALS:"count.equals",COUNT_NOT_EQUALS:"count.not.equals",COUNT_LT:"count.less",COUNT_LTE:"count.less.or.equals",COUNT_GT:"count.greater",COUNT_GTE:"count.greater.or.equals",COUNT_RANGE:"count.range",IN_FILE:"in.file",NOT_IN_FILE:"not.in.file",CONTAINS:"contains",ON:"on",BEFORE:"before",AFTER:"after",WITHIN:"within"},an={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},on={[nn.EQUALS]:"equals",[nn.NOT_EQUALS]:"not",[nn.STARTS_WITH]:"starts with",[nn.MISSING_VALUE]:"missing value",[nn.IN_RANGE]:"in range",[nn.HAS_ALL]:"has all",[nn.FULL_TEXT]:"full text",[nn.EXISTS]:"exists",[nn.COUNT_EQUALS]:"count equals",[nn.COUNT_NOT_EQUALS]:"count not equal",[nn.COUNT_LT]:"count less",[nn.COUNT_LTE]:"count less or equal",[nn.COUNT_GT]:"count greater",[nn.COUNT_GTE]:"count greater or equal",[nn.COUNT_RANGE]:"count in range",[nn.LT]:"less than",[nn.LTE]:"less than or equal",[nn.GT]:"greater than",[nn.GTE]:"greater than or equal",[nn.IN_FILE]:"in file",[nn.NOT_IN_FILE]:"not in file",[nn.CONTAINS]:"contains",[nn.ON]:"on",[nn.BEFORE]:"before",[nn.AFTER]:"after",[nn.WITHIN]:"within"},sn="in",ln="notIn",un="not range",cn=e=>({[sn]:nn.EQUALS,[ln]:nn.NOT_EQUALS}[e]||e),pn={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},dn={[pn.LAST_DAY]:"Last 24 hours",[pn.LAST_3DAYS]:"Last 3 days",[pn.LAST_WEEK]:"Last week",[pn.LAST_MONTH]:"Last month",[pn.LAST_YEAR]:"Last year",[pn.PICK_DATE]:"Pick date"},yn={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},fn={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Tn="<No label>",En={IN:"in",OUT:"out"};var mn=r(87918),hn=r.n(mn);function bn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){On(e,t,r[t])}))}return e}function On(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vn={startDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return hn().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return hn().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},gn=bn({id:{type:mt.TYPE_ENTITY_ID,get label(){return hn().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},vn,{roles:{type:mt.TYPE_STRING,get label(){return hn().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:mt.TYPE_STRING,get label(){return hn().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),_n={workflow:{type:mt.TYPE_STRING,get label(){return hn().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:mt.TYPE_STRING,get label(){return hn().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:mt.TYPE_STRING,get label(){return hn().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},An={commenter:{type:mt.TYPE_STRING,get label(){return hn().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Nn={notResolved:{type:mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return hn().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Rn={createdBy:{type:mt.TYPE_STRING,get label(){return hn().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:mt.TYPE_STRING,get label(){return hn().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},Pn={matches:{type:mt.TYPE_COUNT,get label(){return hn().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:mt.TYPE_COUNT,get label(){return hn().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},Sn={sourceSystems:{type:mt.TYPE_STRING,get label(){return hn().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:mt.TYPE_STRING,get label(){return hn().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:mt.TYPE_INT,get label(){return hn().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:mt.TYPE_STRING,get label(){return hn().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}},wn={matchRules:{type:mt.TYPE_STRING,get label(){return hn().text("Match Rules")},uri:"matchRules",name:"matchRules",faceted:!0,hideForDataTenant:!0},MLRecommendedMatch:{type:mt.TYPE_STRING,get label(){return hn().text("Match IQ")},uri:"MLRecommendedMatch",name:"MLRecommendedMatch",faceted:!0,hideForDataTenant:!0}},In=bn({},gn,_n,An,Nn,Rn,Pn,Sn,wn,{type:{type:mt.TYPE_STRING,get label(){return hn().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}});var Un=r(13980),Cn=r.n(Un);function Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Dn(e,t,r[t])}))}return e}function Dn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jn=Cn().oneOf(["mobile","tablet","desktop"]),kn=Cn().shape({deviceTypes:Cn().oneOfType([jn,Cn().arrayOf(jn)]),roles:Cn().arrayOf(Cn().string)}),xn=Cn().shape({value:Cn().string,lookupCode:Cn().string}),Fn=Cn().shape({link:Cn().string,filename:Cn().string}),Mn=Cn().shape({displayName:Cn().string,parent:Cn().string}),$n=Cn().oneOfType([Cn().string,Cn().number,Cn().bool,xn]),Vn=Cn().oneOfType([$n,Cn().arrayOf($n)]),Gn=Cn().shape({fieldName:Cn().string,values:Cn().arrayOf(Vn),filter:Cn().string,type:Cn().string}),Wn=Cn().shape({minValue:Cn().number,maxValue:Cn().number}),Yn=Cn().shape({label:Cn().string,name:Cn().string,description:Cn().string,type:Cn().string,hidden:Cn().bool,faceted:Cn().bool,searchable:Cn().bool,uri:Cn().string,access:Cn().arrayOf(Cn().string),cardinality:Wn}),Bn=Cn().shape({label:Cn().string,uri:Cn().string,typeColor:Cn().string,direction:Cn().string,startObject:Cn().object,endObject:Cn().object}),qn=Cn().shape({typeColor:Cn().string,typeIcon:Cn().string,typeImage:Cn().string,label:Cn().string,uri:Cn().string,attributes:Cn().arrayOf(Yn)}),Qn=Cn().shape({uri:Cn().string,label:Cn().string,memberTypes:Cn().array,extendsTypeUri:Cn().string,attributes:Cn().arrayOf(Yn)}),Hn=Cn().shape({uri:Cn().string,label:Cn().string,extendsTypeUri:Cn().string,relationshipTypeURIs:Cn().arrayOf(Cn().string)}),Kn=Cn().shape({uri:Cn().string,description:Cn().string,label:Cn().string,schemaVersion:Cn().string,entityTypes:Cn().arrayOf(qn),roles:Cn().arrayOf(Cn().object),groupTypes:Cn().arrayOf(Cn().object),relationTypes:Cn().arrayOf(Bn),graphTypes:Cn().arrayOf(Hn),interactionTypes:Cn().arrayOf(Qn),sources:Cn().arrayOf(Cn().object)}),Jn=Cn().shape({uri:Cn().string,type:Cn().string}),Xn=Cn().shape({uri:Cn().string,attributes:Cn().object,type:Cn().string,timestamp:Cn().number,members:Cn().object}),zn=Cn().shape({uri:Cn().string,type:Cn().string}),Zn=Cn().shape({value:Cn().object,ov:Cn().bool,type:Cn().string,uri:Cn().string}),ei=Cn().shape({refEntity:Cn().oneOfType([Cn().array,Cn().object]),refRelation:Cn().oneOfType([Cn().array,Cn().object]),value:Cn().object,ov:Cn().bool,type:Cn().string,uri:Cn().string}),ti=Cn().oneOf((0,l.values)(Yr)),ri=Cn().shape({type:Cn().oneOf(Object.values($e)).isRequired,attributeTypeUri:Cn().string.isRequired,parentUri:Cn().string.isRequired,uri:Cn().string,message:Cn().string}),ni={attributeType:Yn,showEmptyEditors:Cn().bool,lazy:Cn().bool,mode:ti,metadata:Kn,ownError:ri,errors:Cn().arrayOf(ri),crosswalks:Cn().array,onAddAttributes:Cn().func,onAddOneMore:Cn().func,onDeleteAttribute:Cn().func,onChangeAttribute:Cn().func,additionalControlsRenderer:Cn().func,hideDeleteButton:Cn().bool,showNonOv:Cn().bool,state:Cn().oneOf(["deleted","edited"]),expanded:Cn().bool},ii=Ln({attributeValue:Zn},ni),ai=Ln({attributeValue:ei},ni),oi=Cn().shape({value:Cn().oneOfType([Cn().string,Cn().bool,Cn().number]),ov:Cn().bool,type:Cn().string,uri:Cn().string,lookupCode:Cn().string,lookupRawValue:Cn().string}),si=Cn().shape({totalOvValues:Cn().number,totalValues:Cn().number}),li=Cn().shape({inRelations:Cn().arrayOf(Cn().oneOfType([Cn().object,Cn().string])),outRelations:Cn().arrayOf(Cn().oneOfType([Cn().object,Cn().string])),groups:Cn().arrayOf(Cn().string),entityTypes:Cn().arrayOf(Cn().string),nextEntry:Cn().object}),ui=Cn().oneOf(["asc","desc"]),ci=Cn().shape({id:Cn().string,content:li,allowOnlyCreateNew:Cn().bool,sortColumn:Cn().string,sortOrder:ui,"text-empty":Cn().string,max:Cn().number,icon:Cn().string,caption:Cn().string,canCreate:kn,canRead:kn,canUpdate:kn,canDelete:kn,editingEnabled:Cn().bool}),pi=Cn().shape({id:Cn().string,graph:Cn().shape({type:Cn().string,layout:Cn().number,deep:Cn().number,limit:Cn().number,uri:Cn().string,options:Cn().shape({reverseRelations:Cn().bool})}),sortBy:Cn().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:ui,max:Cn().number,icon:Cn().string,caption:Cn().string,canCreate:kn,canRead:kn,canUpdate:kn,canDelete:kn}),di=Cn().shape({id:Cn().string,caption:Cn().string,pageSize:Cn().number,icon:Cn().string,canCreate:kn,canRead:kn,canUpdate:kn,canDelete:kn,attributes:Cn().object}),yi=Cn().shape({entityUri:Cn().string,entityType:Cn().string,entityLabel:Cn().string,object:Jn}),fi=Cn().shape({relationUri:Cn().string,relationType:Cn().string,relationLabel:Cn().string,direction:Cn().string,object:zn}),Ti=Cn().shape({entity:yi,relation:fi}),Ei=Cn().shape({value:Cn().string,isRawFilter:Cn().bool}),mi=Cn().shape({id:Cn().string,label:Cn().string,name:Cn().string,availableEntityTypes:Cn().array}),hi=Cn().shape({id:Cn().string,allowMergeAll:Cn().bool,matchActions:Cn().object,availableTabs:Cn().arrayOf(Cn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),bi=Cn().shape({matchRules:Cn().arrayOf(Cn().string),object:Jn,shortestTransitiveMatchPath:Cn().arrayOf(Cn().shape({matchRules:Cn().arrayOf(Cn().string),match:Cn().string})),direct:Cn().bool,matchScore:Cn().number}),Oi=Cn().arrayOf(bi),vi=Cn().arrayOf(Cn().shape({uri:Cn().string,label:Cn().string})),gi=[{label:hn().text("And"),value:"and"},{label:hn().text("Or"),value:"or"},{label:hn().text("And not"),value:"and not"},{label:hn().text("Or not"),value:"or not"}];function _i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ai=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Ni=(0,l.pipe)(Ai,(0,l.propOr)("","label")),Ri=(0,l.curry)(((e,t)=>{const r=Ai(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Pi=(0,l.curry)(((e,t,r)=>{const[n,i]=Ri(e,r);return Xr(e,n,t)||Xr(e,i,t)})),Si=(0,l.pipe)((0,l.propOr)([],"relationTypes"),(0,l.reduce)(((e,t)=>{let{uri:r,label:n}=t;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){_i(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),wi=function(){let{reversedContextLabels:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},r=r=>n=>{let{label:i}=n;const a=r===(e?En.OUT:En.IN)?"startObject":"endObject",{directionalContext:o}=n[a];return"directed"===n.direction&&1===(0,l.propOr)(0,"length",o)&&(i+=` (${o[0].labelPattern})`),!(i in t)&&(t[i]=!0,!0)},n=r(En.IN),i=r(En.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Ii=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),Ui={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},Ci=(0,l.curry)(((e,t)=>e.every((e=>Li(e,t))))),Li=(0,l.curry)(((e,t)=>{const r=or(t);return!t||(!t.access||t.access.includes(e))&&(e===Ui.READ||!r)})),Di=(0,l.curry)(((e,t,r)=>Li(Ui.READ,r)&&(Br(t)?Li(Ui.INITIATE_CHANGE_REQUEST,r):Li(e,r)))),ji=Di(Ui.CREATE),ki=Di(Ui.DELETE),xi=Di(Ui.UPDATE),Fi=Ci([Ui.CREATE,Ui.MERGE,Ui.READ,Ui.UPDATE]),Mi=Ci([Ui.UPDATE,Ui.READ,Ui.CREATE]),$i=Ci([Ui.UPDATE,Ui.READ]),Vi=Ci([Ui.DELETE,Ui.UPDATE,Ui.READ]),Gi=(0,l.curry)(((e,t,r)=>e[r]||e[((e,t)=>(0,l.pipe)((0,l.propOr)([],"matchGroups"),(0,l.find)((0,l.propEq)("uri",t)),(0,l.defaultTo)({}),(0,l.prop)("type"))(e))(t,r)]||e["*"])),Wi=(e,t,r)=>(0,l.pipe)((0,l.map)(Gi(e,t)),(0,l.filter)(l.identity))(r),Yi=(e,t,r)=>{const n=Wi(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Li(Ui.MERGE,r)},Bi=(0,l.curry)(((e,t,r,n)=>{const i=Ai(e,n),[a,o]=Ri(e,n);return i&&Li(Ui.CREATE,i)&&Xr(e,a,t.type)&&Xr(e,o,r.type)})),qi=(e,t,r,n,i)=>{const a=Kr(e,n.type),o=Wi(t,a,r).map((e=>{let{createRelation:t}=e;return t})).filter(l.identity);return o.some((t=>{let{inRelations:r,outRelations:a}=t;return r.some(Bi(e,n,i))||a.some(Bi(e,i,n))}))},Qi=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Kr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Yi(o,i,a),canAddRelation:qi(e,o,i,r,n),canMark:Li(Ui.UPDATE,a)&&Li(Ui.READ,a)}},Hi=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>Qi(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),Ki=sr,Ji=(0,l.complement)(Ki),Xi=Li(Ui.READ),zi=e=>{let{attributeType:t,mode:r}=e;return Ji(t)&&ji(r,t)&&!cr(t)},Zi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=jt(r.uri),o=xi(n),s=ji(n);return(0,l.cond)([[Ki,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},ea=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=jt(r.uri),s=xi(n),u=ki(n),c=ra(Ui.UPDATE,n,a,r),p=ra(Ui.DELETE,n,a,r);return(0,l.cond)([[Ki,l.F],[(0,l.always)(o),l.T],[(0,l.always)(i),(0,l.allPass)([u,p])],[l.T,(0,l.allPass)([s,u,c,p])]])(t)},ta=(0,l.curry)(((e,t,r,n)=>{const i=_r(t,n);return!i||!(0,l.pipe)((0,l.unless)(Array.isArray,l.of),(0,l.map)((0,l.prop)("value")))(r).some((r=>i.filter((e=>r&&!!r[e.name])).some((n=>!Li(e,n)||!ta(e,t,r[n.name],n)))))})),ra=(0,l.curry)(((e,t,r,n,i)=>Br(t)?ta(Ui.INITIATE_CHANGE_REQUEST,r,n,i):ta(e,r,n,i))),na=(0,l.both)((0,l.complement)(cr),Xi),ia="SuperUser",aa="allTenants",oa=[aa,"allCustomers"],sa=e=>{let{allowedPermissionsNames:t,permissionsNames:r,permissionsConfig:n,superUserEnvironments:i}=e;return t.map((e=>{switch(e){case r.NON_SECURED:return l.T;case r.SECURED:return e=>void 0!==e.userPermissions;default:return(t=n[e])?(e,r)=>{let{params:n}=r;return((e,t,r,n)=>{const i=(0,l.path)(["userPermissions","permissions"],e)||{};return Object.keys(i).filter((e=>{const t=e.split(":"),[n]=t;return n===r.serviceId||n===ia})).filter((e=>{const t=e.split(":"),[i,a=""]=t;let o=a.split(".");return o=(0,l.endsWith)(["*"],o)?o.slice(0,-1):o,(0,l.startsWith)(o,r.resourcePath)||((e,t,r)=>{if(e===ia){const e=r?oa.concat(r.map((e=>`allTenants.${e}`))):oa,n=r&&t[0]===aa?t.slice(0,2):t.slice(0,1);return e.map((e=>e.split("."))).some((e=>(0,l.startsWith)(n,e)))}})(i,o,n)})).some((e=>{const n=i[e];return r.privileges.every((e=>{const r=n[e],i=Array.isArray(r);return t?Array.isArray(r)&&r.some((e=>t=>t===e||"SuperUser:*"===t||t.startsWith("SuperUser:allTenants"))(t)):i}))}))})(e,n.tenant,t,i)}:l.F}var t}))},la={NON_SECURED:"NON_SECURED",SECURED:"SECURED",CAN_EXPORT:"CAN_EXPORT",CAN_EXPORT_ACTIVITIES:"CAN_EXPORT_ACTIVITIES",CAN_IMPORT_ENTITIES_FROM_DT:"CAN_IMPORT_ENTITIES_FROM_DT",CAN_READ_ENTITIES_FROM_DT:"CAN_READ_ENTITIES_FROM_DT",CAN_START_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_START_PROCESS_INSTANCE_SEARCH_QUERY",CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY",CAN_CREATE_ENVIRONMENT_CONFIG_JAR:"CAN_CREATE_ENVIRONMENT_CONFIG_JAR",CAN_CREATE_CONFIG_JAR:"CAN_CREATE_CONFIG_JAR",CAN_VIEW_ENVIRONMENT_CONFIG_JAR:"CAN_VIEW_ENVIRONMENT_CONFIG_JAR",CAN_VIEW_CONFIG_JAR:"CAN_VIEW_CONFIG_JAR",CAN_MANAGE_WORKFLOW_DEFINITION:"CAN_MANAGE_WORKFLOW_DEFINITION",CAN_VIEW_WORKFLOW_DEFINITION:"CAN_VIEW_WORKFLOW_DEFINITION",CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION:"CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION",CAN_UPDATE_WORKFLOW_DATA_TASK:"CAN_UPDATE_WORKFLOW_DATA_TASK",CAN_READ_WORKFLOW_DATA_TASK:"CAN_READ_WORKFLOW_DATA_TASK",CAN_CONFIG_ENVIRONMENT_REGISTER:"CAN_CONFIG_ENVIRONMENT_REGISTER",CAN_UPDATE_PROCESS_INSTANCE:"CAN_UPDATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS:"CAN_EXECUTE_WORKFLOW_JOBS",CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE:"CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA:"CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA",CAN_VIEW_WORKFLOW_JOBS:"CAN_VIEW_WORKFLOW_JOBS",CAN_MAKE_BULK_UPDATE:"CAN_MAKE_BULK_UPDATE",CAN_OPEN_DATA_LOADER_EXECUTE:"CAN_OPEN_DATA_LOADER_EXECUTE",CAN_OPEN_DATA_LOADER_READ:"CAN_OPEN_DATA_LOADER_READ",CAN_BULK_DELETE_PROFILES:"CAN_BULK_DELETE_PROFILES",CAN_READ_MDM_DATA_ENTITIES:"CAN_READ_MDM_DATA_ENTITIES",IS_FREEMIUM_ADMIN:"IS_FREEMIUM_ADMIN",CAN_READ_DVF:"CAN_READ_DVF"},ua={[la.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[la.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[la.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[la.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[la.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[la.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[la.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[la.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[la.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[la.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[la.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[la.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[la.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[la.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[la.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[la.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[la.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[la.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[la.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[la.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[la.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[la.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[la.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[la.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[la.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},ca=(0,l.curry)(((e,t,r)=>sa({allowedPermissionsNames:e,permissionsNames:la,permissionsConfig:ua}).some((e=>e(t,{params:{tenant:r}}))))),pa=ca([la.CAN_EXPORT]),da=ca([la.CAN_EXPORT_ACTIVITIES]),ya=ca([la.CAN_IMPORT_ENTITIES_FROM_DT]),fa=ca([la.CAN_READ_ENTITIES_FROM_DT]),Ta=ca([la.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),Ea=ca([la.CAN_UPDATE_PROCESS_INSTANCE]),ma=ca([la.CAN_VIEW_WORKFLOW_DEFINITION]),ha=ca([la.CAN_CONFIG_ENVIRONMENT_REGISTER]),ba=ca([la.CAN_UPDATE_WORKFLOW_DATA_TASK]),Oa=ca([la.CAN_READ_WORKFLOW_DATA_TASK]),va=ca([la.CAN_MANAGE_WORKFLOW_DEFINITION]),ga=ca([la.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),_a=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),Aa=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Na=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),Ra=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Pa=ca([la.CAN_EXECUTE_WORKFLOW_JOBS]),Sa=ca([la.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),wa=ca([la.CAN_CREATE_CONFIG_JAR]),Ia=ca([la.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),Ua=ca([la.CAN_VIEW_CONFIG_JAR]),Ca=ca([la.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),La=ca([la.CAN_VIEW_WORKFLOW_JOBS]),Da=ca([la.CAN_MAKE_BULK_UPDATE]),ja=ca([la.CAN_OPEN_DATA_LOADER_EXECUTE,la.CAN_OPEN_DATA_LOADER_READ]),ka=ca([la.CAN_BULK_DELETE_PROFILES]),xa=ca([la.CAN_READ_MDM_DATA_ENTITIES]),Fa=ca([la.CAN_READ_DVF]),Ma=ca([la.IS_FREEMIUM_ADMIN]),$a=(0,l.reject)(cr),Va=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),$a,(0,l.filter)(e))(t),Ga=(0,l.curry)(((e,t)=>Va((t=>zi({attributeType:t,mode:e})),t))),Wa=(0,l.curry)(((e,t)=>Va((t=>zi({attributeType:t,mode:e})||na(t)),t))),Ya=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(na)),Ba=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ba(e)])))),qa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(na),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...qa(e)])))),Qa=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Qa(e)])))),Ha=(0,l.pipe)(Kr,(0,l.converge)(l.concat,[qa,Qa]));function Ka(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ja(e,t,r[t])}))}return e}function Ja(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xa=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,Xa(e)))},t))),za=e=>{var t;return Ka({},e,{matchGroups:(e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[])})},Za=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),eo=(0,l.when)(Za,(0,l.dissoc)("values")),to=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return Ka({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["lookupCode"]),{dependentLookupCode:t})})),ro=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},no=(0,Fr.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Ba,t).concat((0,l.chain)(Ba,r)).some(ro)})),io=e=>{let t=!1;const r=Xa((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?Ka({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},ao=e=>{const t=no(e),r=(0,l.map)((e=>Xa((0,l.pipe)(eo,(0,l.when)((0,l.always)(e),to))))(t)),n=(0,l.map)(za),i=(0,l.map)(io);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},oo=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),so=(0,l.prop)("relationshipTypeURIs"),lo=(0,l.curry)(((e,t)=>e.graphTypes.filter(uo(e,t)))),uo=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return n.some(Pi(e,t))},co=(e,t)=>(0,l.pipe)(oo,(0,l.defaultTo)({}),so,(0,l.defaultTo)([]),(0,l.chain)(Ri(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Kr(e)))(e,t),po=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),yo=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),fo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yo((0,l.complement)(po))(e)},To=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yo(po)(e)},Eo=(0,l.pipe)(Kr,(0,l.propOr)([],"matchGroups")),mo=(e,t,r)=>(0,l.pipe)(Eo,(0,l.find)((0,l.propEq)("uri",r)))(e,t),ho=(0,l.curry)(((e,t,r)=>(0,l.pipe)(mo,(0,l.propOr)(r,"label"))(e,t,r))),bo=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Eo,(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),(0,l.includes)(l.__,r))))(e,t),i=(0,l.pipe)((0,l.map)((0,l.prop)("uri")),(0,l.without)(l.__,r),(0,l.map)((e=>({uri:e,label:e}))))(n);return[...n,...i]})),Oo=e=>(0,l.partition)(po,e),vo=(0,l.includes)(l.__,["and","or","not"]),go=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),_o=(0,l.includes)(l.__,["equals","notEquals","in"]),Ao=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return vo(t)?Ao(r):go(t)?r.filter(Vt):_o(t)?r.map((0,l.prop)("uri")).filter(Vt):[]})),l.uniq),No=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(Ao),l.uniq),Ro=(0,l.pipe)(Eo,No),Po=(0,l.pipe)(bo,No),So=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},wo=(0,l.pipe)(So,qa),Io=(e,t)=>(e.interactionTypes||[]).filter(((e,t)=>r=>{let{memberTypes:n}=r;return n.some(((e,t)=>r=>{let{objectTypeURI:n}=r;return n===t||Xr(e,n,t)})(e,t))})(e,t)),Uo=e=>!!e.required,Co=(e,t,r)=>{const n=(0,l.cond)([[Vt,Kr(e)],[Gt,Ai(e)]])(t);return Lo(e,n,r)},Lo=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&Vt(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!or(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===mt.TYPE_REFERENCE){const n=vt(t),a=gt(t);i=Co(e,n,r).filter((e=>a.some(Wt(e.uri))))}else t.attributes&&(i=Lo(e,t,r));i&&n.push(...i)}return n})):t.type===mt.TYPE_REFERENCE?Co(e,vt(t),r):[],Do=e=>{const t=(0,l.pipe)((0,l.pick)(["dataLabelPattern","dataTooltipPattern","secondaryLabelPattern"]),l.values,(0,l.filter)(l.identity))(e);return(0,l.filter)((0,l.anyPass)([e=>{const r=`{${e.name}.`,n=`{${e.name}}`;return(0,l.any)((0,l.anyPass)([(0,l.includes)(n),(0,l.includes)(r)]),t)},t=>(e.businessCardAttributeURIs||[]).includes(t.uri),Uo]),e.attributes||[])},jo=(e,t)=>{const r=Nt(e);return(0,l.pipe)((0,l.filter)((e=>r.includes(e.uri))),(0,l.sort)((n=r,(e,t)=>n.indexOf(e.uri)-n.indexOf(t.uri))))(t.attributes||[]);var n},ko=(0,l.curry)(((e,t)=>{const r=(t,n)=>{if(Array.isArray(n))return n.map((e=>r(t,e)));if(n&&"object"==typeof n){const e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=r(t,n[t]));return e}return"string"==typeof n&&e.includes(t)?hn().text(n):n};return r(null,t)})),xo=["label","description","abbreviation","caption","toolTip"],Fo=e=>ko(xo,e),Mo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Bt(t);return r.find((e=>{let{uri:t}=e;return Bt(t)===n}))})),$o=(0,l.curry)(((e,t)=>{const r=Bt(t);return(0,l.pipe)(Mo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),Vo=e=>{let{sources:t}=e;return(null==t?void 0:t.find((0,l.propEq)("uri","configuration/sources/Reltio")))?t:null==t?void 0:t.concat({uri:"configuration/sources/Reltio",label:"Reltio",icon:"images/source/reltio.png",abbreviation:"Reltio"})},Go=(e,t)=>{let{sources:r=[]}=e;return r.find((e=>{let{uri:r,label:n}=e;return r===t||n===t||r.substring(r.lastIndexOf("/")+1)===t}))},Wo=(0,l.curry)(((e,t)=>{let{roles:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),Yo=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Kr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function Bo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qo(e,t,r[t])}))}return e}function qo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Qo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["attributes"];const i=n.reduce(((e,r)=>e.concat(t[r]||[])),[]);return Ho(i,e,t,r,n)},Ho=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["attributes"];return Z.fromNull(e&&e.length?e:_r(t,r)).map((e=>e.map((e=>{const r=Qo(t,e,n,i);return r.length?Bo({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(Tr),(0,l.prop)("children"))).filter(na).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},Ko=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Qo(e,t,r,["attributes","analyticsAttributes"])},Jo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Qo(e,t,r,["attributes"])},Xo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Qo(e,t,r,["analyticsAttributes"])},zo=(0,l.curry)(((e,t)=>{let{groupTypes:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),Zo=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Bt(r)===e})))),es=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),Zo("LUD")),(0,l.defaultTo)(r))(t||[])},ts=(e,t)=>{let{survivorshipStrategies:r}=e;return Zo(t,r)},rs=(0,l.allPass)([(0,l.complement)(l.isNil),Li(Ui.READ)]),ns=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Li(Ui.READ)]),is=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Li(Ui.CREATE)]),as=(0,l.curryN)(2,(0,l.pipe)(Kr,ns)),os=e=>{let{ov:t}=e;return!1!==t},ss=(e,t)=>((e,t)=>Dr(e.type)&&ae(t))(e,t)||((e,t)=>jr(e.type)&&oe(t))(e,t),ls=(0,l.curry)(((e,t)=>(0,l.cond)([[l.isNil,(0,l.always)(null)],[(0,l.pipe)((0,l.prop)(e),Array.isArray),(0,l.path)([e,0])],[l.T,(0,l.prop)(e)]])(t))),us=ls("refEntity"),cs=ls("refRelation"),ps=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],ds=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},ys=(0,l.prop)("objectURI"),fs=(0,l.prop)("objectURI"),Ts=(0,l.prop)("type"),Es=(0,l.pipe)(us,(0,l.defaultTo)({}),ys),ms=(0,l.pipe)(cs,(0,l.defaultTo)({}),fs),hs=(0,l.pipe)(us,(0,l.defaultTo)({}),Ts),bs=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Os=(0,l.evolve)({refEntity:re,refRelation:re}),vs=(e,t,r,n)=>{const i=vr(e,r),a=Kr(e,t.type)||Ai(e,t.type);if(0===i.length)return null;const o=ur(r);let s=[t],l=1;i[0].uri!==t.type&&(l=0);let u=null;const c=n?[]:null;let p=null;for(let e=l;e<i.length;++e){const t=e===i.length-1,r=i[e];let l=[];if(!St(r,p)){u=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const u=s.value||s[o]||{};let d=[];r.startObject&&r.endObject||r.typeColor?(d=a.attributes.filter((e=>vt(e)===r.uri||Ot(e)===r.uri)),p=d.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(d.push(r),p=null),d.forEach((a=>{const o=u[a.name];o&&(l=l.concat(o)),n&&t&&c.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=l),t&&(u=s)}return c||u},gs=(e,t)=>{const[r,n,...i]=t.split("/"),a=(e[r]||[]).find((e=>{let{uri:t}=e;return t.endsWith("/"+n)})),o=i.join("/");return o&&a?gs(a.value,o):a},_s=(0,l.curry)(((e,t)=>{if(!t.startsWith(e.uri))return;const[r,...n]=t.slice(e.uri.length+1).split("/"),i=n.join("/");return gs(e[r],i)})),As=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value"])],[l.T,(0,l.prop)("value")]]),Ns=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.map)(As),(0,l.when)((()=>i.length>0),(0,l.map)(Ns(e,i))))(r)})),Rs=Ns(null),Ps=Ns(os),Ss=(e,t,r)=>{var n,i,a;return e.uri===t?null==e||null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=_s(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},ws=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Es,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Is=Object.values(vn),Us=(0,l.includes)(l.__,Is),Cs=e=>Is.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function Ls(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ds(e,t,r[t])}))}return e}function Ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const js=(e,t)=>`${e}_${t}`,ks=[In.matches.name,In.matchRules.name],xs=(0,l.values)(_n).map((e=>e.name)),Fs=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,xs)))),Ms=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,ks)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>js(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),$s=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,Fs(r),Ms(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(js(`dtPotentialMatches.${t.name}`,"")))))(In)},Vs=(0,l.propEq)("uri",In.type.uri),Gs=e=>(0,l.values)(wn).some((0,l.propEq)("uri",e.uri)),Ws=(0,l.propEq)("uri",Sn.sourceSystems.uri),Ys=Object.values(gn),Bs=(0,l.includes)(l.__,Ys),qs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ls({},t,{[r.uri]:void 0===n?r.defaultValue:n})},Qs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},Hs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ls({},t,{[r.uri]:n})},Ks=(0,l.propEq)("uri",gn.roles.uri),Js=(0,l.propEq)("uri",gn.tags.uri);function Xs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){zs(e,t,r[t])}))}return e}function zs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Zs=e=>{let{parentUri:t,attributeType:r}=e;return Xs({uri:Dt(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[Tr,(0,l.always)({value:{}})],[hr,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),Rr)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},el=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ga(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),br,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=Zs({parentUri:r,attributeType:e});let s=_r(n,e);s&&(e.type===mt.TYPE_REFERENCE&&(s=Pt(s)),a.value=el({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(0,l.isEmpty)(a.value)&&!br(e)||(o[t]=[a])}return o},tl=e=>{let{entity:t,metadata:r}=e;return Co(r,t.type,!0).filter(br).reduce(((e,t)=>{const n=t.name,i=Zt(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:vs(r,e,i).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,r)=>{let{parentUri:i,attributes:a}=r;return a[n]&&0!==a[n].length?e:nl({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},rl=(0,l.curry)(((e,t)=>{let{metadata:r,attributeTypes:n,parentUri:i,mode:a}=e;const o=n.filter((e=>{let{name:r}=e;return!t[r]})),s=(0,l.mapObjIndexed)(((e,t)=>{const{type:i,attributes:o}=n.find((e=>t===e.name));return e.map((e=>{const{value:t,uri:n}=e;return i===mt.TYPE_NESTED?Xs({},e,{value:rl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return Xs({},s(t),el({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),nl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=Zs({parentUri:n,attributeType:r}),u=As(l);return(0,Me.ZP)(t,(e=>{Se(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},il=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Me.ZP)(t,(e=>{Se(e.attributes||e.value,r,n.uri,As(n),a,o,i)}))},al=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Me.ZP)(t,(e=>{we(e.attributes||e.value,r,n,i,a,o)}))},ol=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Me.ZP)(t,(e=>{Ue(e.attributes||e.value,r,n,i)}))},sl=(0,l.either)((0,l.propSatisfies)((0,l.anyPass)([e=>""===e,l.isNil]),"value"),(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity"))),ll=(0,l.reject)(sl),ul=e=>{let{deleteEmptyComplex:t,valueTransformer:r=l.identity}=e;return(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.map)((0,l.pipe)(r,(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(e=>ul({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),ll)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},cl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ul({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Os),deleteEmptyComplex:e})},pl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(cl(e),(0,l.reject)(l.isEmpty))},dl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Us(r)?qs({entity:e,attributeType:r}):nl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),yl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Us(r)?Hs({entity:e,attributeType:r,value:i}):al({entity:e,attributeType:r,uri:n,value:i})})),fl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Us(r)?Qs({entity:e,attributeType:r}):ol({entity:e,attributeType:r,uri:n})})),Tl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},El="UrlThumbnail",ml="CdnUrlThumbnail",hl=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(os):(0,l.head)(n);return e&&e.value}return null})),bl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>hl(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Ol=bl(["CdnUrl","Url"],!0),vl=bl(["CdnUrlPreview","UrlPreview"],!0),gl=bl([ml,El],!0),_l=bl([ml,El]),Al=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[lr,(0,l.always)(t)],[(0,l.both)(sr,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=lr(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Us(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ne)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Nl=(e,t,r)=>{const n=Ya(e),i=(0,l.any)(r?l.T:os);return Al(n,t,i)},Rl=(e,t,r,n,i,a)=>{const o=jt(null==r?void 0:r.uri)?Ga(t,e):Wa(t,e);return Al(o,r,((e,o)=>{const s=zi({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:os,e)||lr(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let Pl;const Sl=e=>{Pl=e};function wl(e,t){return Pl(e,t)}const Il=e=>(t,r)=>new Promise(((n,i)=>{e(t,r,(e=>{n(e)}),((e,t)=>{i((0,l.when)((0,l.is)(String),(0,l.always)({errorMessage:e,errorCode:t}))(e))}),null)})),Ul=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=50}=e;return wl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i}),headers:{"Content-Type":"application/json"}})},Cl=(0,l.once)((()=>wl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),Ll=e=>wl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Dl=(e,t)=>wl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),jl=e=>Z.fromNull(on[e]).map(hn().text).orSome(""),kl=(0,l.curry)(((e,t)=>`${e}_${t}`)),xl=(0,l.split)("_"),Fl=(0,l.includes)("_"),Ml=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),$l=(0,l.curry)(((e,t)=>e.some(Ml(t)))),Vl=$l([nn.IN_RANGE,nn.COUNT_RANGE,nn.WITHIN]),Gl=$l([nn.EXISTS,nn.MISSING_VALUE]),Wl=(0,l.cond)([[Gl,(0,l.always)(0)],[Vl,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),Yl=(0,l.complement)(Gl),Bl=$l([nn.HAS_ALL,nn.EQUALS,nn.NOT_EQUALS]),ql=$l([nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE,nn.COUNT_RANGE]),Ql=$l([nn.IN_FILE,nn.NOT_IN_FILE]),Hl=e=>{switch(e){case nn.COUNT_EQUALS:return nn.EQUALS;case nn.COUNT_NOT_EQUALS:return nn.NOT_EQUALS;case nn.COUNT_LT:return nn.LT;case nn.COUNT_LTE:return nn.LTE;case nn.COUNT_GT:return nn.GT;case nn.COUNT_GTE:return nn.GTE;case nn.COUNT_RANGE:return nn.IN_RANGE}},Kl=$l([nn.ON,nn.BEFORE,nn.AFTER,nn.WITHIN,nn.NOT_EQUALS]),Jl=$l([nn.WITHIN]),Xl=[[nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE],[nn.NOT_IN_FILE,nn.IN_FILE],[nn.EQUALS,nn.NOT_EQUALS,nn.HAS_ALL],[nn.LT,nn.LTE,nn.GT,nn.GTE],[nn.MISSING_VALUE,nn.EXISTS],[nn.COUNT_RANGE],[nn.IN_RANGE],[nn.STARTS_WITH,nn.CONTAINS],[nn.FULL_TEXT],[nn.ON,nn.BEFORE,nn.AFTER,nn.NOT_EQUALS],[nn.WITHIN]],zl=(e,t)=>Xl.some((r=>r.includes(e)&&r.includes(t))),Zl=(0,l.pipe)(l.omit,l.values),eu={OPTIONS_FOR_STRING:Zl(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_DATE:[nn.ON,nn.BEFORE,nn.AFTER,nn.WITHIN,nn.NOT_EQUALS,nn.MISSING_VALUE,nn.EXISTS,nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE,nn.COUNT_RANGE,nn.IN_FILE,nn.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:Zl(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_BLOB:Zl(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_NUMBER:Zl(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_LOOKUP:Zl(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],nn),OPTIONS_FOR_ENUM:Zl(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_ID:[nn.EQUALS,nn.NOT_EQUALS,nn.IN_FILE,nn.NOT_IN_FILE],OPTIONS_FOR_COUNT:[nn.EQUALS,nn.NOT_EQUALS,nn.LT,nn.LTE,nn.GT,nn.GTE,nn.IN_RANGE],OPTIONS_FOR_COMPLEX:[nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE,nn.COUNT_RANGE,nn.EXISTS,nn.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[nn.EQUALS,nn.NOT_EQUALS,nn.EXISTS,nn.MISSING_VALUE]},tu=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case mt.TYPE_TYPEAHEAD:case mt.TYPE_STRING:case mt.TYPE_PASSWORD:case mt.TYPE_TEXT:case mt.TYPE_CIK_ID:case mt.TYPE_URL:case mt.TYPE_BLOG_URL:case mt.TYPE_IMAGE_URL:case mt.TYPE_EMAIL:return eu.OPTIONS_FOR_STRING;case mt.TYPE_LOOKUP:case mt.TYPE_DEPENDENT_LOOKUP:return eu.OPTIONS_FOR_LOOKUP;case mt.TYPE_ENUM:return eu.OPTIONS_FOR_ENUM;case mt.TYPE_DATE:case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_TIMESTAMP:case mt.TYPE_LOCAL_DATE:return eu.OPTIONS_FOR_DATE;case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:return eu.OPTIONS_FOR_BOOLEAN;case mt.TYPE_BLOB:return eu.OPTIONS_FOR_BLOB;case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_NUMBER:return eu.OPTIONS_FOR_NUMBER;case mt.TYPE_ENTITY_ID:return eu.OPTIONS_FOR_ID;case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[nn.EQUALS];case mt.TYPE_COUNT:return eu.OPTIONS_FOR_COUNT;case mt.TYPE_NESTED:case mt.TYPE_REFERENCE:case mt.TYPE_IMAGE:return eu.OPTIONS_FOR_COMPLEX;default:return eu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(ql,n):n},ru=e=>[He.and,He.andNot].includes(e),nu=e=>[He.or,He.orNot].includes(e),iu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),nu)),au=(ou=[He.and],e=>e.slice(0,-1).every((e=>ou.includes(e.operator))));var ou;const su=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),lu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),uu=e=>{const t=[],r={"{":"}","[":"]","(":")"},n=(0,l.invertObj)(r);for(let i=0;i<e.length;i++){const a=e[i];if(r[a])t.push(a);else if(n[a]&&r[t.pop()]!==a)return!1}return 0===t.length},cu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[He.or,He.orNot],n=t?[He.and,He.andNot,...r]:r,i=n.map((e=>` ${e} `)).some((t=>e.includes(t))),a=e.startsWith("not"),o="("===(0,l.head)(e)&&")"===(0,l.last)(e)&&uu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},pu="and",du=class{constructor(){this.clauses=[]}addClause(e){return e&&(this.clauses=this.clauses.concat(e)),this}build(){return this.clauses.join(" and ")}orBuild(){return`(${this.clauses.join(" or ")})`}buildWithOperators(e){return this.clauses.reduce(((t,r,n)=>{const i=0===t.length,a=(0,l.propOr)(pu,n,e),o=(e=>[He.andNot,He.orNot].includes(e))(a)?cu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},yu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),fu=e=>Array.isArray(e)?e.map(fu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),Tu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),Eu=e=>`'${e}'`,mu=e=>`"${e}"`,hu=(0,l.pipe)(fu,Tu),bu=(0,l.pipe)(hu,Eu),Ou=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Vl(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),vu=(e,t)=>ql(t)?{type:mt.TYPE_INT}:Ql(t)?{type:mt.TYPE_FILE}:Kl(t)&&!Jl(t)&&Pr(e.type)?{type:mt.TYPE_LOCAL_DATE}:e,gu=Object.values(pn),_u=e=>gu.includes(e),Au=e=>hn().text(dn[e]),Nu=e=>{const t=f()();switch(e){case pn.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case pn.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case pn.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case pn.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case pn.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Pu(e,t,r[t])}))}return e}function Pu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Su=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),wu=(0,l.curry)(((e,t,r)=>{const n=r.map(Vl(e)||t.endsWith(".count")?hu:bu).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Iu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Uu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Wl(t);return(0,l.pipe)(Iu(i),(0,l.map)(wu(t,r)),Su(" or "))(n)},Cu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(bu).join(",")})`},Lu=e=>`*${e}*`,Du=e=>`URL:${e}`,ju=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,ku=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===nn.IN_FILE?r:`not ${r}`},xu=(e,t)=>[P(e,t),S(e,t)],Fu=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!Mu(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case nn.ON:return Ru({},e,n?{filter:nn.EQUALS}:{filter:nn.IN_RANGE,values:[xu(i,n)]});case nn.BEFORE:return Ru({},e,{filter:nn.LTE,values:[[S(i,n)]]});case nn.AFTER:return Ru({},e,{filter:nn.GTE,values:[[P(i,n)]]});case nn.WITHIN:return Ru({},e,{filter:nn.IN_RANGE,values:[Nu(i)]})}}return e}),Uu),Mu=(0,l.propSatisfies)(Pr,"type"),$u=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",nn.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Uu({filter:nn.EQUALS,fieldName:t,values:[r]}))),new du).build())),Su(" or "))(r)}],[(0,l.propEq)("filter",nn.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Uu({fieldName:r,filter:t,values:n.map((0,l.pipe)(fu,Lu))})}],[(0,l.propEq)("filter",nn.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Uu(Ru({},e,{values:(0,l.flatten)(r)})):ju(r)?Cu(Ru({},e,{filter:"listEquals"})):Uu(e)}],[(0,l.propEq)("filter",nn.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Wl(t);return(0,l.pipe)(Iu(i),(0,l.map)(wu(t,r)),Su(" and "))(n)})(Ru({},e,{values:(0,l.flatten)(e.values)})):Mu(e)?(e=>{const{values:t}=e,r=!Mu(e),[n]=t;return(new du).addClause(Uu(Ru({},e,{filter:nn.LT,values:[P(n,r)]}))).addClause(Uu(Ru({},e,{filter:nn.GT,values:[S(n,r)]}))).orBuild()})(e):ju(t)?Cu(Ru({},e,{filter:"not listEquals"})):Uu(e)}],[(0,l.propSatisfies)(Ql,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Uu({fieldName:r,filter:ku(t,r),values:n.map((0,l.prop)("link")).map(Du)})}],[(0,l.propSatisfies)(ql,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Uu({fieldName:`${r}.count`,values:n,filter:Hl(t)})}],[(0,l.propSatisfies)(Kl,"filter"),Fu],[(0,l.propEq)("fieldName","geoPolygon"),e=>{let{fieldName:t,values:[r]}=e;const n=(0,l.pipe)((0,l.map)((e=>{let[t,r]=e;return`${t},${r}`})),(0,l.join)(";"))(r);return wu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return wu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Uu]],Vu=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!Yl(e)||Wu(r))},Gu=e=>Array.isArray(e)?Wu(e):null!=e&&fu(e).length>0,Wu=e=>e&&e.length>0&&e.every(Gu);function Yu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bu=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},qu=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Qu=(e,t,r)=>"children"===e?Ku(r,[...t][0],!0):r,Hu=(e,t,r)=>"values"===e?[...r,...t]:r,Ku=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.findIndex((0,l.propEq)("fieldName",t.fieldName));if(n>=0){const i=e[n];if("children"in i&&"children"in t)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Qu,t),e);if(!r&&Bl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Hu,t),e)}return(0,l.append)(t,e)},Ju=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Bu(e),r=e=>e.fieldName===t?e:r({fieldName:qu(e),children:[e]});return r(e)})(t);return Ku(e,r)}),[]),Xu=e=>e&&e.length>1&&!e.some((e=>{let{fieldName:t}=e;return null==t?void 0:t.startsWith("parent.")}))&&!e.every((0,l.has)("rawFilter")),zu=e=>{let[t]=e;return t.children?zu(t.children):t.operator},Zu=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=zu(t)===He.andNot,a=n(t,!1),o=i?`not ${cu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${zu(r)||pu} ${s})`}function n(i){let a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.reduce(((i,o)=>i.addClause((0,l.cond)([[(0,l.has)("children"),e=>{let{children:i}=e;return a&&Xu(i)&&!t?r(i):n(i,a)}],...e])(o))),new du).buildWithOperators(i.map((0,l.prop)("operator")))}return n},ec=(0,l.pipe)((0,l.propOr)("","filter"),Fl),tc=(0,l.map)((0,l.when)(ec,(e=>{const[t,r]=xl(e.filter);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yu(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),rc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(Vu),tc,Ju,Zu([...e,...$u],t))},nc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),ic=[nn.ON,nn.BEFORE,nn.AFTER,nn.WITHIN,nn.NOT_EQUALS,nn.MISSING_VALUE,nn.EXISTS],ac=[nn.EQUALS,nn.NOT_EQUALS,nn.STARTS_WITH,nn.MISSING_VALUE,nn.HAS_ALL,nn.FULL_TEXT,nn.EXISTS],oc=[nn.EQUALS,nn.NOT_EQUALS,nn.LT,nn.LTE,nn.GT,nn.GTE,nn.IN_RANGE],sc=(e,t)=>{const r=ar(e);return(e=>{switch(e){case vn.startDate.name:case vn.endDate.name:case _n.dueDate.name:case Rn.createdTime.name:case Rn.updatedTime.name:case Sn.reltioLoadDate.name:case Sn.createDate.name:case Sn.updateDate.name:case Sn.deleteDate.name:case Sn.publishDate.name:return ic;case Pn.matches.name:case Sn.count.name:return oc;case _n.workflow.name:case _n.assignee.name:case _n.step.name:case An.commenter.name:case Rn.createdBy.name:case Rn.updatedBy.name:case Sn.sourceSystems.name:case Sn.value.name:return ac;default:return null}})(t)||tu(r)},lc=[nn.EQUALS,nn.NOT_EQUALS,nn.CONTAINS,nn.STARTS_WITH,nn.MISSING_VALUE,nn.HAS_ALL,nn.IN_RANGE,nn.WITHIN,nn.EXISTS,nn.ON],uc=(0,l.pipe)(sc,(0,l.filter)((0,l.includes)(l.__,lc))),cc=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),pc=e=>{let{query:t,body:r}=e;return t=cc(t),wl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},dc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e];r&&n.push({filter:"containsWordStartingWith",fieldName:"attributes",values:[r]});const i={filter:(0,l.pipe)(rc(),nc(t.globalFilter))(n),activeness:t.activityFilter||fn.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Gr(i)}`},yc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=dc(e,t,r);return wl(n)},fc=e=>wl(`/entities/_total?${e}`),Tc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(ns),(0,l.map)((0,l.prop)("uri")))(e),i={filter:nn.EQUALS,fieldName:"type",values:n},a={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(rc(),nc(r.globalFilter))([i,a]),s=Gr({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||fn.ACTIVE_ONLY,max:4});return wl("/entities/_typeAheadSearch"+s,{method:"GET"})},Ec=(0,l.pipe)((0,l.reject)(l.isNil),Vr),mc=e=>{let{fieldName:t,searchParams:r=[],options:n={}}=e;const{globalFilter:i,activityFilter:a,searchOptions:o,max:s}=n,u=(0,l.pipe)(rc(),nc(i))(r),c=Ec({filter:u||null,activeness:a||"active",options:o||null}),p=[{fieldName:t,pageSize:s||20,pageNo:1,orderType:n.orderType||"reversedCount"}];return pc({query:c,body:p})},hc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return mc({fieldName:t,searchParams:i,options:n})},bc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Oc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e,{filter:"containsWordStartingWith",fieldName:"attributes",values:[r]}],i={filter:(0,l.pipe)(rc(),nc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||bc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Gr(i)}`},vc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=Oc(e,t,r);return wl(n)},gc=e=>Sc(e,{select:"secondaryLabel"}),_c=(e,t)=>{const{select:r=bc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),wl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Ac=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),jt)),Nc=e=>{const{parentUri:t,attributeTypeUri:r,values:n=[],offset:i,defaultMaxValues:a,tenant:o,apiPath:s,searchQuery:u,filters:c=[],sorting:p,options:d="ovOnly"}=e,y=n.length,f=Ac(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Er(r),m={method:"POST",data:{attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E}},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(rc(),nc(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),wl(`${s}/api/${o}/${t}/_object`,m)},Rc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Pc={options:"sendHidden,addRefAttrUriToCrosswalk"},Sc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pc;return wl(`/${e}${Gr(t)}`)},wc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",data:[e]},n=t("/entities");return wl(n,r)},Ic=e=>wl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Uc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return wl(`/${e}/_clone${Gr({valuesToCopy:r})}`,n)},Cc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return wl(`/entities/_events/_total${Vr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Lc=(e,t)=>wl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Dc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return wl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},jc=e=>{let{entityUri:t,offset:r,max:n,filter:i,sort:a,order:o}=e;const s={offset:r,max:n,filter:i,sort:a,order:o};return wl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Vr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},kc=e=>{const t=new FormData;return t.append("file",e),wl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,hn().text("Can't upload file"));return Promise.reject(t)}))},xc=e=>{let{containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,countResults:s=!1,findPublic:l=!0,includes:u,startsWith:c}=e;return wl(`/personal/findSavedSearches${Vr({countResults:s,findPublic:l})}`,{method:"POST",body:JSON.stringify({containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,includes:u,startsWith:c}),headers:{"Content-Type":"application/json"}})},Fc=e=>wl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),Mc=e=>wl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),$c=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return wl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},Vc=e=>{let{uri:t}=e;return wl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Gc=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),$c)(e),Wc=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),$c)(e);function Yc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bc=["max","offset","filter"],qc=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:qc(e)},t):function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yc(e,t,r[t])}))}return e}({},t,(0,l.pick)(Bc,e)))),Qc=(0,l.omit)(["activeness"]),Hc=(e,t)=>{const r=(e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],Qe.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],Qe.ALL,e)))return!1})(t);return t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(qc(e),(0,l.omit)(Bc))(e))),Qc,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${Gr({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},Kc=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),Jc=(0,l.reject)(l.isNil),Xc=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),zc=e=>wl(Xc(e),{method:"GET",headers:{"Content-Type":"application/json"}}),Zc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,Xc);return wl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},ep=e=>{let{startEntityUri:t,endEntityUri:r,relationType:n,attributes:i,startDate:a,endDate:o,uriPreprocessor:s=l.identity}=e;const u={type:n,startObject:{objectURI:t},endObject:{objectURI:r},attributes:i?pl()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(Jc,ne,JSON.stringify);return wl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},tp=e=>{let{oldRelation:t,newRelation:r,uriPreprocessor:n=l.identity}=e;const i=(0,l.prop)("attributes"),a=(0,l.pipe)((0,l.prop)("uri"),(0,l.concat)(l.__,"/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk"),Xc,n),o=be(i(t),i(r)).concat(ve(t,r));return wl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},rp=(e,t)=>{const{url:r,options:n}=Hc(e,t);return wl(r,n).then(Kc)},np=(e,t)=>wl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),ip=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===En.IN?a.inRelations=[n]:a.outRelations=[n],wl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},ap=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return wl(`${t}/recentSearches${Gr({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},op=e=>wl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),sp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return wl(`/recentSearches${Gr({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function lp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){up(e,t,r[t])}))}return e}function up(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cp={select:"label,secondaryLabel,name,type,startDate,endDate"},pp=(0,l.reject)(l.isNil),dp=(0,l.pipe)(pp,Vr),yp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=lp({},cp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return wl(`/${t}/_tree${dp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},fp=e=>{let{uri:t,graphUri:r}=e;const n=lp({},cp,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return wl(`/${t}/_parents${dp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Tp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=lp({},cp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return wl(`/${t}/_hops${dp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Ep(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const mp=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},hp="/activities",bp=e=>{let{label:t,description:r}=e;return wl(hp,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:mp()}})},Op=e=>{const t=Gr(e);return wl(hp+t,{method:"GET"})},vp=e=>wl(`/activities/_total${Gr(e)}`,{method:"GET"}),gp=e=>{const{entityUri:t}=e,r=Ep(e,["entityUri"]);return wl(`/${t}/_activities${Gr(r)}`,{method:"GET"})},_p=e=>{const{entityUri:t}=e,r=Ep(e,["entityUri"]);return wl(`/${t}/_activities/_total${Gr(r)}`,{method:"GET"})};function Ap(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Np(e,t,r[t])}))}return e}function Np(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Pp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return wl(Rp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Sp=e=>{let{workflowPath:t,url:r,tenant:n,method:i,data:a,headers:o}=e,s=r;return r.includes("http:")||r.includes("https:")||(s=Rp({url:r,workflowPath:t,tenant:n})),wl(s,{method:i||"GET",body:JSON.stringify(a),headers:Ap({"Content-Type":"application/json"},null!=o?o:{})})},wp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Rp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return wl(e,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(n)})}));return(0,l.pipe)((e=>e.map((t=>[e[0],t])).slice(1)),(0,l.map)(s(o,r)),(e=>Promise.all(e)),(0,l.andThen)(l.last))(n)},Ip=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Rp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Ap({},l,{comment:o}):l;return wl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},Up=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Rp({url:`/tasks${s?Gr(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Ap({objectURIs:[i]},(0,l.reject)(E,a)))};return wl(u,Ap({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Cp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return wl(Rp({url:"/tasks",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)({assignee:i,max:a,offset:o})})},Lp=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return wl(Rp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Ap({max:a,offset:o},i))})},Dp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return wl(Rp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},jp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return wl(Rp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},kp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},xp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return wl(Rp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},Fp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},Mp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},$p=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},Vp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return wl(Rp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},Gp=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return wl(Rp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},Wp=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(os);return a&&a[0]&&(r=n.length>0&&a[0].value?Wp(a[0].value,[n.join(".")])[0].value:"string"==typeof a[0].label?a[0].label:Object.prototype.hasOwnProperty.call(a[0],"label")?"":a[0].value||""),{key:t,value:r}}),""),Yp=(e,t)=>{const r=new RegExp("{[^}]*}","g");let n,i=[];for(;null!=(n=r.exec(t));)i.push(n[0]);i=i.map((function(e){return e.substring(1,e.length-1)}));const a=Wp(e.attributes||e.value,i);let o;return a.every((function(e){return void 0===e.value}))?o="":(o=t,o=o.replace(/\[[^\]]*]/g,(e=>{const t=e.match(/\{[^}]*}/g);return t?t.some((function(e){return e=e.substring(1,e.length-1).trim(),a.some((function(t){return t.key===e&&void 0===t.value}))}))?"":e.substring(1,e.length-1):e})),a.forEach((e=>{o=o.replace("{"+e.key+"}",e.value||"")}))),o},Bp=/[,\s]*$/,qp=e=>{const t=hn().text(Tn);if(!e)return t;const r=e.replace(Bp,"");return""===r.toString().trim()?t:r},Qp=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},Hp=(e,t,r)=>{if("string"==typeof t)return t;if("Reference"!==r.type&&"Nested"!==r.type&&"Image"!==r.type)return"";if("Reference"===r.type){const n=Qp(e,r.referencedEntityTypeURI);if(n)return Yp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Yp({attributes:t||{}},r.dataLabelPattern);return""},Kp=e=>{let{uiPath:t,uri:r}=e;const n=new URL(t),[,i]=n.pathname.split("/");return"nui"===i?`${t}profile?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},Jp=e=>{let{uiPath:t,tag:r,entityUri:n}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}tags?entityUri=${encodeURIComponent(n)}&tag=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},Xp=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",zp=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),gl,(0,l.prop)("value"))),Zp=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),zp),ed=(e,t,r)=>{const n=Zp(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(_s(e),zp)))(e))(r)||((e,t)=>{const r=(e=>{const t=t=>`${e.uri}/attributes/${t}`,r=(e=e||{}).imageAttributeURIs||[];return(0,l.uniq)([t("ImageGallery"),...r,t("Image"),t("ImageLinks")])})(Kr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>vs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,zp))(r)})(e,r)||tn(e,r.type);return Xp(t,n)};function td(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rd(e,t,r[t])}))}return e}function rd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nd="DTSS/",id=(0,l.replace)(new RegExp("^entities/"),""),ad=e=>nd+e.dataTenant+"/"+e.uri,od=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),sd=e=>!(!e||!e.dataTenant),ld=(0,l.startsWith)(nd),ud=(0,l.pipe)((0,l.ifElse)(ld,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),cd=(0,l.ifElse)(sd,ad,(0,l.prop)("uri")),pd=e=>e&&e.uri?e.dataTenant?ad(e):id(e.uri):"",dd=(0,l.curry)(((e,t,r)=>(Kr(t,r.type)||{})[e]||"")),yd=dd("label"),fd=dd("typeGraphIcon"),Td=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Kr(e,t.type)||{},n=(r.attributes||[]).reduce(((e,t)=>(e[t.uri]=t,e[t.name]=t,e)),{});return t.attributes&&r.businessCardAttributeURIs?r.businessCardAttributeURIs.map((r=>{const i=n[r];if(!i)return null;let a=t.attributes[i.name];if(!a)return null;Array.isArray(a)&&(a=a.find(os)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:Hp(e,o,i),uri:a.uri}})).filter(l.identity):[]},Ed=(0,l.pipe)(Td,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),md=(0,l.curry)(((e,t)=>{if(!t)return[];if(1===e.length){return t[e[0]]||[]}{const r=t[e[0]];return Array.isArray(r)?r.reduce(((t,r)=>{if((0,l.is)(Object,r.value)){const n=md(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):md(e.slice(1),r)}})),hd=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,bd=e=>(0,l.propOr)([],"matchRules",e),Od=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?td({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},vd=(e,t,r)=>t&&r?r.aEntity:e,gd=e=>{let{entityUri:t,max:r,deep:n,sort:i,order:a,activeness:o,filter:s,markMatchedValues:u,sources:c,rules:p}=e;const d={max:r,deep:n,filter:s,markMatchedValues:u,sort:i,order:a,activeness:o,sources:c,rules:p};return wl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Vr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},_d=e=>{let{entityUri:t,max:r,sort:n,order:i,activeness:a,filter:o}=e;const s={max:r,filter:o,sort:n,order:i,activeness:a};return wl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Vr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ad=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return wl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Nd=(e,t,r)=>Promise.all(t.map((async t=>{await wl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})}))),Rd=async(e,t)=>await Nd(e,t,"NOT"),Pd=async(e,t)=>await Nd(e,t,"MATCH"),Sd=async(e,t)=>await Promise.all(t.map((async t=>{await wl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}})})));function wd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Id(e,t,r[t])}))}return e}function Id(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ud(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const Cd=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return wl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Ld=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return zd({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Dd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return zd({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},jd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return wl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},kd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{dataTenant:a,uri:o}=n;return Promise.all(i.map((e=>{let{uri:n}=e;return jd({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},xd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(sd,i);return Promise.all([s.length?Ad(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return jd({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},Fd=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return r.map((0,l.assoc)("matchRule",t))})),(0,l.reduce)(((e,t)=>{let{matchRule:r}=t,n=Ud(t,["matchRule"]);const i=e.findIndex((e=>{let{object:{uri:t}}=e;return n.uri===t}));return-1===i?e.concat({object:n,matchRules:[r]}):(0,l.adjust)(i,(0,l.evolve)({matchRules:(0,l.append)(r)}),e)}),[])),Md=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),Fd),$d=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return wl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(Md)},Vd=e=>t=>{let{dtssPath:r,dataTenants:n=[],customerTenant:i,entity:a}=t;return Promise.all(n.map((t=>{let{id:n}=t;return e({dtssPath:r,dataTenant:n,customerTenant:i,entity:a}).then((0,l.map)((0,l.assocPath)(["object","dataTenant"],n))).catch((e=>(console.log(e),[])))}))).then(l.flatten)},Gd=Vd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return wl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(Md)})),Wd=Vd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return wl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),Yd=(e,t)=>{let{dtssPath:r,dataTenants:n=[],entity:i,customerTenant:a,dtssRequest:o}=e;return function(){if(r&&n&&n.length){const e=o({dtssPath:r,dataTenants:n,entity:i,customerTenant:a});return Promise.all([t(...arguments),e]).then(l.flatten)}return t(...arguments)}},Bd=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return wl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},qd=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{dataTenant:o,uri:s}=i;return Promise.all(a.map((t=>{let{uri:i}=t;return Bd(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},Qd=qd("NOT"),Hd=qd("MATCH"),Kd=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(sd,a);return Promise.all([Nd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return Bd(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},Jd=Kd("NOT"),Xd=Kd("MATCH");function zd(e){let{requestProvider:t=wl,url:r,options:n,dataTenant:i,customerTenant:a,dtssPath:o}=e;r=o.endsWith("/")&&r.startsWith("/")?r.slice(1):r;const s=n||{},{headers:l}=s;return t(`${o}${r}`,wd({},Ud(s,["headers"]),{headers:wd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const Zd=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return zd({url:Oc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ey=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return zd({url:dc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ty=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=Hc(t,r);return zd({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(Kc,(0,l.map)((0,l.evolve)({connections:(0,l.map)((0,l.pipe)((0,l.assocPath)(["entity","dataTenant"],n),(0,l.assocPath)(["relation","dataTenant"],n)))}))))},ry=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return zd({url:`${Rc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},ny=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return wl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},iy=e=>{let{dtssPath:t,tenant:r}=e;return wl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},ay=e=>{let{dtssPath:t,customerTenant:r}=e;return wl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},oy=e=>{let{dtssPath:t,tenants:r}=e;return wl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},sy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return zd({url:Rc(t),dataTenant:r,customerTenant:n,dtssPath:i})},ly=()=>wl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function uy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cy(e,t,r[t])}))}return e}function cy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const py=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=uy({},n,{ordered:"true",orderBy:"LastName,FirstName",from:0,max:100},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,["select"]));return wl(`${t}/api/${r}/graph/search${Gr({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},dy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return wl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:uy({},n,i),headers:{"Content-Type":"application/json"}})},yy=(e,t)=>`${e}/${t}/comments`,fy=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return wl(`${yy(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},Ty=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return wl(`${yy(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ey=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return wl(yy(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},my=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return wl(`${yy(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},hy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return wl(`${yy(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},by=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return wl(`${yy(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},Oy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Gr({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return wl(`${yy(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function vy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gy(e,t,r[t])}))}return e}function gy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _y=e=>{let{tenant:t,servicesPath:r}=e;return wl(`${r}/oauth/proxy${Gr({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ay="graphExport",Ny=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await wy({servicesPath:e,tenant:t,environment:r,namespace:Ay,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(vy({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await wy({servicesPath:e,tenant:t,environment:r,namespace:Ay,options:vy({method:"PUT"},o)})}catch(e){s=null}return s||(s=await wy({servicesPath:e,tenant:t,environment:r,namespace:Ay,options:vy({method:"POST"},o)})),s},Ry=e=>{let{servicesPath:t,key:r}=e;return wl(`${t}/settings${Gr({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Py=e=>{let{servicesPath:t}=e;return wl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Sy=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return wl(`${n}/plugins${Gr({tenant:t,user:r})}`,{method:"GET"})},wy=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return wl(`${n}/configService${Gr({tenant:t,environment:r,namespace:a,projection:o})}`,i)},Iy=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return wy({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},Uy=e=>{let{servicesPath:t,stateHash:r}=e;return wl(`${t}/searchLink?key=${r}`,{method:"GET"})},Cy=e=>{let{imageServicePath:t,environment:r,tenant:n,image:i}=e;const a=new FormData;return"string"==typeof i?(a.append("sourceUrl",i),a.append("upload","false")):a.append("file",i),wl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Ly=e=>wl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Dy=e=>{let{exportPath:t,tenant:r,options:n}=e;return wl(`${t}/${r}/activities${Gr(n)}`,{method:"POST"})};function jy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ky(e,t,r[t])}))}return e}function ky(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xy=e=>{const{entityUri:t}=e;return wl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},Fy=e=>{let{entityUri:t,crosswalk:r}=e;return wl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},My=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return wl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[jy({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),jy({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},$y=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return wl(`/${r}/_${n}${Gr({contributorURI:t})}`,{method:"POST"})},Vy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return wl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Gy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return wl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Wy=e=>{let{entityUri:t,crosswalkId:r}=e;return wl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function Yy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const By=e=>{let{entityTypeUri:t}=e;return wl(`/dataQuality/fillRates${Vr({entityType:Bt(t)})}`,{method:"GET"})},qy=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i}=e;const a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yy(e,t,r[t])}))}return e}({},n===at.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{});return wl(`/entityType/${Bt(t)}/dataQuality/${n}`,{method:"POST",body:JSON.stringify(a)})},Qy=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return wl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Bt(n)}`,{method:"GET",headers:{env:i}})},Hy=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return wl(`/${t}${Gr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Ky=e=>{let{attributeUri:t,value:r}=e;return wl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},Jy=e=>{let{attributeUri:t,value:r}=e;return wl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},Xy=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return wl(`/${t}${Gr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},zy=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Gr({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=pl()([[{value:a}]]);return wl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Zy=e=>{let{entityUri:t,attributeName:r,value:n}=e;return wl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},ef=e=>{let{entityUri:t,attributeName:r}=e;return wl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function tf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rf=e=>{let{entityUri:t}=e;return wl(`/${t}/_historicURIs`,{method:"GET"})},nf=e=>{let{entityUri:t,historicUris:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["entityUri","historicUris"]);return wl(`/${t}/_changesWithTotal${Gr(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){tf(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},af=(e,t)=>wl(`/${e}/_previousChange${Gr({timestamp:t})}`,{method:"GET"}),of=(e,t)=>wl(`/${e}${Gr({time:t})}`,{method:"GET"});function sf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){lf(e,t,r[t])}))}return e}function lf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const uf=e=>{let{url:t,method:r,data:n,headers:i}=e;return wl(t,sf({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:sf({"Content-Type":"application/json"},null!=i?i:{})}))},cf=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Gr({options:a.join(","),severity:o.join(",")});return wl(`${t}/validate/${i}/entity/${pd({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},pf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return wl(`${t}/validate/${n}/entity${Gr({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},df=e=>{let{tenant:t,apiPath:r}=e;return wl(`${r}/tenants/${t}/name`,{method:"GET"})},yf=e=>{let{tenant:t,apiPath:r}=e;return wl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},ff=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return wl(`${a}/preferences${Gr({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Tf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a,value:o}=e,s={name:t,tenant:r,environment:n,user:i,values:[JSON.stringify(o)]};return wl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Ef=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return wl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})};var mf=r(29524);const hf=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=kt(),s={attributes:el({attributeTypes:n,parentUri:o,metadata:i,mode:a}),uri:o,type:t,timestamp:Date.now()};return r?function(e,t,r){const n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[]).find((e=>!e.lookupCode&&!e.dependentLookupCode&&"String"===e.type));if(n){const i=vs(r,e,n.uri)[0];return i&&i.value?al({entity:e,attributeType:n,uri:i.uri,value:t}):nl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},bf=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Es),(0,l.filter)(jt),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Of=(0,l.curry)(((e,t)=>{const r=bf(e=e||{},t=t||{});return r.concat((0,l.chain)(Of(e),r))})),vf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),gf=vf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),_f=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),jt)),Af=e=>(0,l.pipe)(gf,_f(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),Nf=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(gf,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),Rf=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),jt),(0,l.omit)(["uri","timestamp"])),Pf=(0,l.pipe)(Rf,(0,l.evolve)({attributes:pl(!0)})),Sf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=Af(i);if(a.length>0)for(const t of a)e=Nf(t,r[t].uri,e);const o=await wc(Pf(e[t]),null==n?void 0:n.enhanceUriWithDCR),s=(e=>(0,l.path)([0,"errors"],e))(o);if(s)throw s;const u=(e=>(0,l.pathOr)(e,[0,"object"],e))(o);return null==n||n.updateDCRUriFromResponse(u),u},wf=async(e,t,r)=>{const n=Uf(e,t),i={};for(const t of n)i[t]=await Sf(e,t,i,r);return i},If=(0,l.curry)(((e,t)=>{const r=mf.Node(t);return Af(e[t]).forEach((t=>{const n=If(e,t);r.addEdge(n)})),r})),Uf=(e,t)=>(0,l.pipe)((0,l.map)(If(e)),(0,l.map)(mf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Cf=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Rf))})),Lf=(e,t)=>{const r=Ae(e.tags||[],t.tags||[]),n=Ne(e.roles||[],t.roles||[]),i=Oe(e,t),a=ve(e,t);return[...ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))),...r,...n,...i,...a]},Df=(0,l.pipe)(((e,t)=>{const r=(0,l.toPairs)(e);return(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)((e=>r.reduce(((e,t)=>{let[r,n]=t;return Nf(r,n,e)}),e))))}),t)}),Cf),jf=(0,l.curry)(((e,t)=>(0,l.when)(jt,(0,l.propOr)(l.__,t,e),t)));function kf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){xf(e,t,r[t])}))}return e}function xf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ff=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:ot.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Mf=e=>{let{relationUri:t}=e;return{type:ot.DELETE_RELATION,parameters:{relationUri:t}}},$f=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:ot.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},Vf=e=>{let{oldRelation:t,newRelation:r}=e;return{type:ot.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},Gf=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:ot.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},Wf=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pathEq)(["parameters","relation","uri"],e),l.T],[(0,l.pathEq)(["parameters","relationUri"],e),l.T],[(0,l.pathEq)(["parameters","oldRelation","uri"],e),l.T],[(0,l.pathEq)(["parameters","newRelation","uri"],e),l.T],[l.T,l.F]])(t))),Yf=e=>e.type===ot.DELETE_RELATION,Bf=e=>e.type===ot.CREATE_RELATION,qf=e=>e.type===ot.REPOINT_RELATION,Qf=e=>e.type===ot.UPDATE_RELATION,Hf=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),Kf=e=>{let{type:t,parameters:r,dcrProcessor:n}=e;const{enhanceUriWithDCR:i,updateDCRUriFromResponse:a}=n,o=e=>(a(e),e);switch(t){case ot.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:a,attributes:s,startDate:l,endDate:u}=t;return ep({startEntityUri:e,endEntityUri:n,relationType:a,attributes:s,startDate:l,endDate:u,uriPreprocessor:i}).then(o)};case ot.DELETE_RELATION:return()=>{const{relationUri:e}=r;return Zc(e,i).then(o)};case ot.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return ip(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case ot.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return tp({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case ot.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[Mf({relationUri:o}),Ff({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(Jf(n)),(0,l.map)(Kf),Hf)(s)}}},Jf=e=>t=>kf({dcrProcessor:e},t),Xf=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=Wr({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(Jf(r)),(0,l.map)(Kf),Hf,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},zf=e=>t=>(0,l.map)((t=>kf({},t,{parameters:(0,l.evolve)({parentUri:jf(e),entityUri:jf(e),newEntityUri:jf(e)},t.parameters)})),t),Zf=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},eT=(e,t)=>{const r=e.filter(Bf).find(Wf(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>Qf(o)&&Wf(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!qf(o)||!Wf(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(Zf({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},tT=(e,t)=>{const r=e.filter(qf).filter(Wf(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!Qf(i)||!Wf(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(Zf({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},rT=(e,t)=>{const r=e.filter(Yf).filter(Wf(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!Wf(t,e)))},nT=(e,t)=>{const r=e.filter(Qf).filter(Wf(t));let n=null;const i=e.filter((e=>!r.includes(e)||!Qf(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(Zf({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},iT=e=>{const t=e.filter(Yf).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(rT,e)},aT=e=>{const t=e.filter(Bf).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(eT,e)},oT=e=>{const t=e.filter(qf).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(tT,e)},sT=e=>{const t=e.filter(Qf).map((e=>{let{parameters:{newRelation:{uri:t}}}=e;return t}));return(0,l.pipe)((0,l.filter)((e=>(0,l.count)((0,l.equals)(e),t)>1)),l.uniq,(0,l.reduce)(nT,e))(t)},lT=e=>(0,l.pipe)(iT,aT,oT,sT)(e);function uT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cT(e,t,r[t])}))}return e}function cT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pT=e=>uT({},(0,l.path)(_T(),e),{startDate:(0,l.path)(PT(),e),endDate:(0,l.path)(ST(),e)}),dT=(e,t)=>(0,l.pipe)((0,l.path)(RT()),jf(t))(e),yT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=dT(e,r),i=(0,l.path)(AT(),e)===st.IN,a=e.parentEntityUri||n;return Ff({parentUri:i?t:a,relation:pT(e),entityUri:i?a:t})})),...o.map((t=>{const i=dT(t,r),a=(0,l.path)(AT(),t)===st.IN,o=i!==(0,l.pipe)((0,l.path)(_T()),a?wT:IT)(t),s=LT(e,(0,l.path)(vT(),t)),u=t.parentEntityUri||n,c=jf(r,i);return o?Gf({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(_T(),t),isReversed:!1}):Vf({oldRelation:(0,l.path)(_T(),s),newRelation:pT(t)})})),...i.map((e=>Mf({relationUri:e}))),...s.map((e=>$f({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},fT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return uT({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),TT=(0,l.has)("dataTenant"),ET=(0,l.ifElse)(TT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),mT=(e,t)=>(0,l.pipe)(Ai,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(Is),$a)(e,t),hT=e=>{let{type:{uri:t,label:r},direction:n}=e;return e=>{const i=e.relationUri;return(0,l.pipe)((0,l.assoc)("relationType",t),(0,l.assoc)("relationLabel",r),(0,l.assoc)("object",{type:t,attributes:{},uri:i}),(0,l.assoc)("direction",n))(e)}},bT=(e,t,r)=>{const n=Yp(t,e.dataLabelPattern),i=(0,l.lensProp)("entity");return(0,l.over)(i,(0,l.evolve)({entityLabel:(0,l.always)(n),object:{label:(0,l.always)(n)}}),r)},OT="relation",vT=(0,l.always)([OT,"relationUri"]),gT=(0,l.always)([OT,"relationType"]),_T=(0,l.always)([OT,"object"]),AT=(0,l.always)([OT,"direction"]),NT=(0,l.always)([OT,"object","attributes"]),RT=(0,l.always)(["entity","entityUri"]),PT=(0,l.always)([OT,"startDate"]),ST=(0,l.always)([OT,"endDate"]),wT=(0,l.path)(["startObject","objectURI"]),IT=(0,l.path)(["endObject","objectURI"]),UT=(0,l.path)(["startObject","objectTypeURI"]),CT=(0,l.path)(["endObject","objectTypeURI"]),LT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(vT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=LT(r.connections,t);if(e)return e}}},DT=(0,l.pipe)(LT,(0,l.path)(_T())),jT=(0,l.allPass)([(0,l.pipe)((0,l.path)(RT()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(gT()),(0,l.complement)(E))]),kT=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:xt()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=MT({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=xT(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?hT(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},xT=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length+t.length===1?e.length?{type:e[0],direction:En.IN}:{type:t[0],direction:En.OUT}:null},FT=e=>e.uri||e,MT=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&ji(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===En.IN?"startObject":"endObject",{directionalContext:i}=t[n];return"directed"===t.direction&&1===(0,l.propOr)(0,"length",i)&&(r+=` (${i[0].labelPattern})`),!(r in o)&&(o[r]=!0,!0)}return!1},u=e=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Kr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Kr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(FT,Ai(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(En.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(En.OUT)),(0,l.map)(u))},t)||{}},$T=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=wi({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ri(e,n.uri);return n&&(!t||Xr(e,i,t))&&(!r||Xr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Kr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Kr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(rs,r));return{inRelations:(0,l.pipe)((0,l.filter)(a(e,null,t)),(0,l.filter)(n),(0,l.map)(o))(s),outRelations:(0,l.pipe)((0,l.filter)(a(e,t,null)),(0,l.filter)(i),(0,l.map)(o))(s)}},VT=(0,l.curry)(((e,t,r,n,i)=>{const a=Xr(n,l.__,t.type),o=e?CT:UT,s=Xr(n,l.__,r.type),u=e?UT:CT;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),GT=(e,t,r)=>{const n=e?CT:UT,i=(0,l.pipe)((0,l.map)(n),l.uniq)(r);return(0,l.pipe)((0,l.filter)((e=>{let{uri:r}=e;return i.some(Xr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function WT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){YT(e,t,r[t])}))}return e}function YT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const BT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return WT({},t,{[r]:{parents:n,children:i}})},qT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return WT({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},QT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t[e],a=bf(t,i),o=BT({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>QT(n.uri,t,[e],r)),o)},HT=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.reduce(((e,n)=>{const i=(0,l.path)(vT(),n),a=t?qT({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(RT(),n),s=jt(o)?[o]:[],u=BT({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>QT(t,r,[i],e)),u)}),n)},KT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return HT(r,e,t,QT(e,t))},JT=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return KT(t,r,n);if(Mt(e)){const t=LT(n,e);return t&&HT([t],null,r)}return r[e]?QT(e,r):void 0},XT=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>XT(e,t))))},zT=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>zT(e,t))))},ZT=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=Ft(t),u=KT(r,n,i),c=((e,t,r)=>{let{entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[];let s;for(let e=0;e<t.length;e++){const u=t[e],c=t[e+1]||r;if(Mt(c)){if(s=LT(i,c),!s)return null;o.push({type:Ye.relationConnection,value:s,valueType:Ai(a,(0,l.path)(gT(),s))});continue}if(Mt(u)){const e=n[c];if(!e)return null;o.push({type:Ye.tempEntity,value:e,valueType:Kr(a,e.type)});continue}const p=n[u],d=ws(p,c),y=n[c];if(!d||!y)return null;o.push({type:Ye.attributeValue,value:d,valueType:gr(a,Kt(d.uri,p.type))}),o.push({type:Ye.tempEntity,value:y,valueType:Kr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},zT(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=Mt(s),d=p?DT(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Ai(a,d.type):Kr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:_r(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:Ye.tempEntity,value:T,valueType:Kr(a,T.type)}),o.push({type:Ye.attributeValue,value:s,valueType:E}),m=s.value;const l=Es(s);T=l&&jt(l)?n[l]:null}}return o},eE=e=>e.every((e=>{let{type:t}=e;return[Ye.attributeValue,Ye.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===Ye.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,tE=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?tE(t.value):[]];return e.concat(r)}),[])),rE=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,nE=e=>{const t=[...tE((null==e?void 0:e.attributes)||[]),...tE((null==e?void 0:e.analyticsAttributes)||[])];return e?[cd(e),...t]:[]},iE=(e,t)=>[e,...t.map((t=>rE(e,t)))],aE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return ET(t)}))},oE=(e,t)=>{switch(e){case Be.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case Be.ENTITY_ATTRIBUTE:case Be.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[Jt(t)]})(t);case Be.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case Be.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,cd({uri:n,dataTenant:i}),r]})(t)}},sE=e=>(0,l.pipe)(l.values,(0,l.map)((0,l.map)((0,l.pipe)((0,l.prop)("replies"),l.inc))),(0,l.map)(l.sum),l.sum)(e),lE=(0,l.curry)(((e,t)=>{const r=So(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(lE(e,r.extendsTypeURI)):n})),uE=(0,l.curry)(((e,t)=>(0,l.reduce)(((t,r)=>(0,l.assoc)(r,((e,t)=>(0,l.path)(["members",t],e))(e,r),t)),{},t))),cE=(e,t)=>(0,l.pipe)((0,l.prop)("type"),lE(e),uE(t))(t);function pE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const dE=e=>{let{type:t,attributeType:r,attributeTypeUri:n,parentUri:i,uri:a,message:o,source:s}=e;return{type:t,uri:a,attributeTypeUri:n,attributeType:r,parentUri:i,message:o,source:s}},yE=e=>!e.deactivated,fE=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},TE=e=>fE(e)+e.message,EE=(0,l.unless)(l.isNil,(0,l.prop)("message")),mE=(0,l.unless)(l.isNil,(0,l.prop)("type")),hE=(0,l.curry)(((e,t)=>Wt(t.parentUri,e))),bE=(0,l.curry)(((e,t)=>t.parentUri===e)),OE=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),Wt(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(gt,(0,l.any)(Wt(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),vE=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),gE=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),_E=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([UE,yE,hE(e),OE(t),(0,l.complement)(gE(e,t.uri))]))(r)},AE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([UE,yE,bE(e),vE(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",$e.missed))]))(r);return n&&n.message||""},NE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===$e.missed))},RE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([yE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(vT(),e))]))(t)},PE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([yE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},SE=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([yE,hE(t)]))(r)},wE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([yE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},IE=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?ZT(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case Ye.attributeValue:{const e=a;if(dr(a))return Yp(o,e.dataLabelPattern);if(yr(a)){const t=o,i=Es(t),a=Ot(e),s=Kr(n,a);return jt(i)?Yp(r[i],s.dataLabelPattern):t.label}return""}case Ye.tempEntity:return Yp(o,a.dataLabelPattern);case Ye.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Kr(n,null==e?void 0:e.entityType);return`${qp(i&&jt(i)?Yp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||Ni(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){pE(e,t,r[t])}))}return e}({},e,{label:qp(t)})}))},UE=e=>!e.severity||e.severity===Ge.ERROR,CE=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case mt.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(CE(n))}));case mt.TYPE_REFERENCE:return!!us(t);case mt.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),LE=(e,t)=>e.every((0,l.complement)(CE(t))),DE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Co(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=vs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!os(e.parent))))).forEach((e=>{LE(e.attrValues,n)&&r.push(dE({type:$e.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:hn().text("Attribute is required"),source:Ve.local}))})),r}),[])},jE=(0,l.curry)(((e,t,r)=>vs(e,t,r,!1))),kE=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Kr(e),(0,l.prop)("attributes"),(0,l.reject)(cr),(0,l.filter)(yr),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(jE(e,t)));return(0,l.pipe)(r,(0,l.reject)(Es),(0,l.map)((e=>{let{uri:r}=e;return dE({type:$e.missedRefEntity,uri:"",attributeTypeUri:Kt(r,t.type),parentUri:r,message:hn().text("Entity is required"),source:Ve.local})})))(t)},xE=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Es,jt)).flatMap((n=>{const i=Es(n),a=t[i],o=gr(e,Kt(n.uri,r.type));return FE(e,t,o,a)})),FE=(e,t,r,n)=>{const i=gt(r),a=i.map((t=>gr(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",mt.TYPE_REFERENCE))).flatMap(At).concat(i);return ME(e,t,n,(e=>a.some(Wt(e.uri))))},ME=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=DE(e,r,n),a=kE(e,r),o=xE(e,t,r);return[...i,...a,...o]},$E=(e,t)=>{const r=(0,l.path)(_T(),t)||{};return DE(e,r)},VE=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(RT()),(0,l.ifElse)(jt,(e=>t[e]),(0,l.always)(null)))(r),i=$E(e,r),a=(e=>(0,l.path)(RT(),e)?[]:[dE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(gT(),e),parentUri:(0,l.path)(vT(),e),message:hn().text("Entity is required"),source:Ve.local})])(r),o=((e,t,r)=>r?ME(e,t,r):[])(e,t,n);return[...i,...a,...o]},GE=e=>(0,l.path)(["entity","uri"],e)?[]:[dE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:hn().text("Entity is required"),source:Ve.local})],WE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=DE(e,r),i=GE(t);return[...n,...i]};function YE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const BE=(e,t)=>{var r,n;const i=Kr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||no(e)},qE=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),QE=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(qE(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},HE=(e,t)=>(0,l.when)((0,l.prop)("refEntity"),(0,l.pipe)((0,l.when)((0,l.allPass)([(0,l.prop)("refRelation"),(0,l.always)("INSERT_ATTRIBUTE"===t),(0,l.pipe)(ms,jt,l.not)]),(e=>{const t=(0,l.pipe)(ms,Bt)(e);return QE((e=>e.replace(t,t+It)))(e)})),(0,l.when)((0,l.pipe)(Es,jt),(t=>{const r=Es(t),n=e[r],i=n&&JE(n,e);return null!=i&&i.attributes?(0,l.evolve)({value:e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){YE(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),KE=(e,t,r)=>ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(HE(r,e.type)),(0,l.map)(QE(er))))})(e))),JE=(e,t)=>(0,l.evolve)({attributes:ul({valueTransformer:(0,l.pipe)(Os,HE(t),qE(er)),deleteEmptyComplex:!0}),uri:er})(e);function XE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){zE(e,t,r[t])}))}return e}function zE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ZE=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(wt,"g"),"uri$$$$").replace(new RegExp(It,"g"),""))),em=e=>(0,l.pipe)((0,l.evolve)({objectUri:ZE,objectParentUri:ZE}),(e=>{return XE({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?$e.missed:$e.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&Zt(e.objectUri),uri:e.objectUri,source:Ve.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),tm=(e,t)=>(0,l.map)((0,l.pipe)(em,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=IE(t,s),p=null!=c&&c.length?c.slice(0,-1):IE(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&gr(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===Ye.attributeValue&&(a=e.valueType)}return a})(o,c,e);return XE({},e,{attributeType:d,attributeTypeUri:null==d?void 0:d.uri,uri:c&&(null===(r=(0,l.last)(c))||void 0===r||null===(n=r.value)||void 0===n?void 0:n.uri)||s,parentUri:p&&(null===(i=(0,l.last)(p))||void 0===i||null===(a=i.value)||void 0===a?void 0:a.uri)||u,path:s?c:p})}),(e=>{let{entitiesMap:t,metadata:r}=e;return e=>{const{uri:n,parentUri:i,path:a,attributeTypeUri:o}=e;if(!n&&null!=a&&a.length&&i&&zt(i)){const n=(0,l.last)(a),i=n.valueType;if(yr(i)&&Nt(i).includes(o)){const i=Es(n.value),o=i&&jt(i)?t[i]:null;return o?XE({},e,{parentUri:o.uri,path:a.concat({type:Ye.tempEntity,value:o,valueType:Kr(r,o.type),label:""})}):e}}return e}})(t)))(e),rm=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};function nm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var im;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(im||(im={}));const am={},om={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},random1:{colors:["#fccde5","#ff9acc","#81b2d3","#f8b6b8","#bd81be","#82c55c","#c4e3f1","#7f939e","#ffee91","#fec92f","#ee4272","#2d9ecf","#c4c0e1","#7accca","#cdc393","#f69785","#f0ecc7","#9fd6bf","#6d9a35","#afbc26","#12959f","#aacf99","#056b97","#eab710","#b4d36a","#70bede","#f57f27","#7a843b","#cfd0d2","#555962","#b71137","#ffdc0e","#bea68c","#5f3566"]},spectreYellowCyan:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#7accca","#12959f"]},spectreBlueBrown:{granularity:3,colors:["#c4e3f1","#70bede","#81b2d3","#2d9ecf","#056b97","#aacf99","#b4de6a","#82c55c","#6d9a35","#afbc26","#7a843b","#cfd0d2","#7f939e","#555962","#f0ecc7","#cfc393","#bea68c"]},charts:{colors:["#0072ce","#c4ce00","#ce5c00","#4bafff","#f97061","#9e7ed3","#c34980","#c4ce00","#669977","#ffe16f","#4896df","#40cfbb","#9bc66a","#ce5c00","#4bafff","#f085f2","#bea68c"]},crosswalks:{colors:["#86f2f9","#cae815","#f8a4a4","#fd63c0","#b6c5ec","#8fe98e","#ff9c72","#84cbf3","#a8f384","#d9ffa8","#ace1ff"]}},sm=(0,l.curry)(((e,t)=>{const r=(e=>{if(!am[e]){const t=om[e]||om.random0;am[e]=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nm(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return am[e]})(e);return r.idToColor[t]||(r.idToColor[t]=(e=>{const t=e.counter,r=e.granularity||1;return e.counter+=r,e.counter>=e.colors.length&&(++e.granularityCounter>=r&&(e.granularityCounter=0),e.counter=e.granularityCounter),e.colors[t]})(r)),r.idToColor[t]})),lm=e=>sm(im.Charts,e);var um=r(51404),cm=r.n(um);const pm=Array.from({length:100},((e,t)=>t/100)),dm=e=>{const t=Number(e.replace(/\D/g,""))||0;let r=3735928559^t,n=1103547991^t;for(let t,i=0;i<e.length;i++)t=e.charCodeAt(i),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},ym={},fm=new(cm())({hash:dm,saturation:pm.slice(15,71),lightness:pm.slice(50,90)}),Tm=(0,l.curry)(((e,t,r)=>{t in ym||(ym[t]={});const n=ym[t];r in n||(n[r]=((e,t)=>{const r=String(dm(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),Em=Tm(fm,"crosswalks"),mm=Tm(fm,"sources"),hm=Tm(fm,"contributors");function bm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Om(e,t,r[t])}))}return e}function Om(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vm=(0,l.has)("items"),gm=e=>0===e,_m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.min(Math.max(e,t),r)},Am=e=>e.reduce(((e,t)=>e+t.width),0),Nm=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Rm=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),Pm=e=>e.reduce(((e,t)=>e+t.height),0),Sm=e=>(0,l.is)(String,e)&&e.includes("%"),wm=e=>Boolean(e.spacer),Im=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),Um=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(vm(t)?Um(t):t)),[]),Cm=e=>({id:e.layout}),Lm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cm;const i=(e,t,r,n)=>{let{width:i}=e;const a=t.items.some((e=>e.flex));let o;if(a){const[e,n]=(0,l.partition)((0,l.propIs)(Number,"flex"),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("flex"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/(a+n.length))),u=Math.max(s/Math.max((0,l.length)(n),1),1),c=(e,t,r)=>Math.max(Math.floor(t/r*e),1);o=r.flex?c(i,r.flex,a+n.length):u}else{const[e,n]=(0,l.partition)((0,l.both)((0,l.propIs)(String,"width"),(0,l.pipe)((0,l.propOr)("","width"),(0,l.includes)("%"))),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("width"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/100)),u=Math.max(s/Math.max((0,l.length)(n),1),1);o=Sm(r.width)?Im(i,r.width):u}return _m(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return _m(n,t,r)},o=(e,t)=>vm(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.reduce(((o,s,u)=>{const c=i(t,r,s,vm(s)?n(s.layout):e(s.view)),d=gm(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(vm(s))return o.concat(p(bm({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(bm({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:Am(o),height:Nm(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=vm(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=gm(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(vm(i))return r.concat(p(bm({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(bm({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?_m(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?_m(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Rm(i),height:Pm(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=gm(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return bm({},o,{x:t.x,y:c,width:s,height:u})},i=(e,t)=>{const r=t.reduce(((t,r,i)=>{if("string"==typeof r)t.push(n(e,t,r,i));else if("object"==typeof r){const a=Math.round(e.width/2),o=bm({},e,{width:a}),s=bm({},e,{x:e.x+a,width:a}),u=(0,l.has)("left",r)&&n(o,t,r.left,i),c=(0,l.has)("right",r)&&n(s,t,r.right,i),p=(0,l.propOr)(0,"height"),d=Math.max(p(u),p(c));t.push(bm({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return bm({},e,{height:Pm(r),items:r})},o=i(t,(0,l.propOr)([],"top",r)),s=Math.round(.66*t.width),u=(0,l.isEmpty)(o)?t.y:t.y+o.height,c=i(bm({},t,{y:u,width:s}),(0,l.propOr)([],"center",r)),p=i({x:t.x+s,y:u,width:t.width-s},(0,l.propOr)([],"right",r)),d=o.height+Math.max(c.height,p.height),y=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return bm({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=bm({},t,{items:(0,l.reject)(wm,t.items)});switch(r.layout){case"scroll":return o(e,r);case"hbox":return s(e,r);case"vbox":return u(e,r);default:return null}},d=(0,l.propEq)("layout","profile",t),y={x:0,y:0,width:r.columns},f=d?c(y,t):p(y,t);return Um(f)},Dm=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id))));function jm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){km(e,t,r[t])}))}return e}function km(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xm={BarChart:ut.BAR,BarChartGrouped:ut.BAR,BarChartHorizontal:ut.BAR,LineChart:ut.LINE,Map:ut.MAP,Pie:ut.PIE},Fm=(e,t)=>Xt(e)?Qt(e,t):e,Mm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=xm[r];return jm({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},$m=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return jm({findPublic:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,["findShared"]))},Vm=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return jm({},e,{value:[sn,ln,nn.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:cn(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Xt(t)||!r?n:(n||[]).concat((i=r,{filter:nn.EQUALS,fieldName:"type",values:[i]}));var i},Gm=["https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/world.countries.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/usa_prefix_latlng.topo.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/us-10m.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/zips-us-topo.json"],Wm={"com.reltio.plugins.dashboard.BarChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:Fm(n,r),filters:Vm(a,n,r),chartType:ut.BAR,component:ct.DashboardFacet,title:i}},"com.reltio.plugins.dashboard.BubbleChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:Fm(n,r),filters:Vm(a,n,r),chartType:ut.BUBBLE,component:ct.DashboardFacet,title:i}},"com.reltio.plugins.ui.CustomActionView":e=>{let{id:t,caption:r,canRead:n,url:i}=e;return{id:t,url:i,canRead:n,title:r,component:ct.CustomActionViewFacet}},"com.reltio.plugins.dashboard.FacetChartView":e=>{let{id:t,firstDimension:r,useEntityType:n,caption:i,filter:a,count:o,orderType:s,options:l,canRead:u}=e;const c=ne(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return jm({id:t,count:o,canRead:u,orderType:s,attributeUri:Fm(r,p),filters:Vm(a,r,p),component:ct.DashboardFacet,title:i,showOthers:!0},Mm(l))},"com.reltio.plugins.dashboard.MapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,mapType:l,canRead:u}=e;return{id:t,count:o,canRead:u,orderType:s,attributeUri:Fm(n,r),filters:Vm(a,n,r),chartType:ut.MAP,component:ct.DashboardFacet,title:i,geoUrl:Gm[l||0],projection:"geoMercator"}},"com.reltio.plugins.dashboard.SimpleMapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,map:s,canRead:l,options:u}=e;return jm({id:t,count:o,canRead:l,attributeUri:Fm(n,r),filters:Vm(a,n,r),component:ct.DashboardFacet,title:i,geoUrl:s,chartType:ut.MAP,projection:"geoMercator"},Mm(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.ProfileStatsFacet,title:n}},"com.reltio.plugins.dashboard.FilteredSavedSearchesView":e=>{let{id:t,caption:r,max:n,options:i,canRead:a}=e;return{id:t,canRead:a,options:$m(i),component:ct.FilteredSavedSearchesFacet,title:r,max:n}},"com.reltio.plugins.dashboard.FilteredEntitiesView":e=>{let{id:t,caption:r,filter:n,max:i,entity:a,canRead:o}=e;return{id:t,canRead:o,filters:Vm(n,null,a),component:ct.FilteredEntitiesViewFacet,title:r,max:i}},"com.reltio.plugins.dashboard.MatchedEntitiesView":e=>{let{id:t,caption:r,max:n,canRead:i}=e;return{id:t,canRead:i,filters:[{filter:nn.GTE,fieldName:"matches",values:["1"]}],component:ct.FilteredEntitiesViewFacet,title:r,max:n}},"com.reltio.plugins.dashboard.EntitiesByTypeView":e=>{let{id:t,caption:r,orderType:n="reversedCount",inheritChildren:i,hideEmpty:a,canRead:o}=e;return{id:t,canRead:o,component:ct.EntitiesByTypeViewFacet,orderType:n,inheritChildren:i,hideEmpty:a,title:r}},"com.reltio.plugins.dashboard.EntitiesByTagView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:ut.CLOUD,component:ct.DashboardFacet,attributeUri:"tags"}},"com.reltio.plugins.dashboard.EntitiesByRoleView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:ut.TREE,component:ct.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.NotificationInboxFacet,title:n||hn().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.ActivitiesViewFacet,title:n||hn().text("Activity log")}}},Ym=e=>({id:e,height:10}),Bm=(0,l.pipe)((0,l.map)((e=>{const t=Wm[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),qm=e=>{if("0.1"===e.version){const t=Bm(e.views),r=Lm(Ym,e.layout,{columns:4});return{id:e.id,margin:0,layout:Dm(r,t),views:t}}return e},Qm=e=>(0,l.cond)([[(0,l.propEq)("layout","profile"),(0,l.pipe)((0,l.pick)(["center","right","top"]),l.values,l.flatten,(0,l.map)((0,l.when)((0,l.is)(Object),l.values)),l.flatten)],[(0,l.has)("view"),(0,l.pipe)((0,l.prop)("view"),ne)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>Qm(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function Hm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Km(e,t,r[t])}))}return e}function Km(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Jm=Hm({},pt,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),Xm=e=>e,zm={[Jm.Attributes]:Xm,[Jm.HierarchyTree]:Xm,[Jm.HierarchyPaths]:Xm,[Jm.RelationsTable]:Xm,[Jm.Relations]:e=>Hm({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[Jm.SingleAttributeView]:Xm,[Jm.CustomView]:Xm,[Jm.TableAttributeView]:Xm,[Jm.MapView]:Xm,[Jm.OldTreeView]:e=>Hm({},e,{class:pt.HierarchyTree}),[Jm.OldMapView]:e=>Hm({},e,{class:pt.MapView}),[Jm.ImageAttributeView]:Xm,[Jm.PotentialMatchesView]:Xm},Zm=(0,l.pipe)((0,l.map)((e=>{const t=zm[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),eh=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===pt.MapView?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),th=e=>{if("0.1"===e.version){const t=Zm(e.views),r=Lm(eh(t),e.layout,{columns:4});return{id:e.id,layout:Dm(r,t),views:t,workflow:e.workflow,maxWidth:e.maxWidth,sidePanelViews:e.sidePanelViews,profileBand:e.profileBand}}return e},rh=(e,t)=>e.class===t||e["react-class"]===t,nh=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(rh(t,pt.Attributes))if(t.includeUris)e.includeUris.push(...t.includeUris);else{const r=t.excludeUris||[];e.excludeUris=e.excludeUris?(0,l.intersection)(e.excludeUris,r):r}return rh(t,pt.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.includes(n)||t.includes(n)}},ih=(e,t)=>e.filter((e=>t.some((t=>rh(e,t))))).map((e=>{let{id:t}=e;return t})),ah=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},oh=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),sh=(e,t)=>(e||[]).find((e=>e.activator===t));function lh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uh(e,t,r[t])}))}return e}function uh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ch=(e,t)=>Qm(t).map((t=>(0,l.pipe)((0,l.map)((e=>ah(e,t))),(0,l.reject)(l.isNil),l.head)(e))),ph=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},dh=(e,t)=>{if("scroll"===t.layout.layout){const r=ch(e,t.layout),n=qm(lh({},t,{views:r,version:"0.1"}));return{class:yt.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:yt.Dashboard,views:t.views,layout:t.layout,id:t.id}},yh=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},fh=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},Th=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},Eh=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},mh=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},hh=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions,tableViewModeAvailable:r.tableViewModeAvailable}},bh=(e,t)=>{const r=ch(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=oh(e,"com.reltio.plugins.search.toolbar.component").filter((e=>"com.reltio.plugins.ui.CustomActionButtonView"===e.class&&e.processType));return null==t?void 0:t.processType})(e)};return{class:yt.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"]}},Oh=(e,t)=>({class:yt.Graph,id:t.id}),vh=(e,t)=>{const r=ch(e,t.layout)[0];return{class:yt.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},gh=e=>t=>!!(0,l.intersection)(e,t).length,_h=(0,l.cond)([[gh(["com.reltio.plugins.dashboard.BarChartView","com.reltio.plugins.dashboard.BubbleChartView","com.reltio.plugins.ui.CustomActionView","com.reltio.plugins.dashboard.FacetChartView","com.reltio.plugins.dashboard.MapView","com.reltio.plugins.dashboard.SimpleMapView","com.reltio.plugins.dashboard.ProfileStatsView","com.reltio.plugins.dashboard.FilteredSavedSearchesView","com.reltio.plugins.dashboard.FilteredEntitiesView","com.reltio.plugins.dashboard.EntitiesByTypeView","com.reltio.plugins.dashboard.EntitiesByTagView","com.reltio.plugins.dashboard.EntitiesByRoleView","com.reltio.plugins.inbox.NotificationInboxView","com.reltio.plugins.activities.ActivitiesView","com.reltio.plugins.react.ReactDashboardView"]),()=>dh],[gh(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>yh],[gh(["com.reltio.plugins.graph.GraphView"]),()=>Oh],[gh(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>fh],[gh(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>Th],[gh(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>Eh],[gh(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>mh],[gh(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>hh],[gh(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>bh],[gh(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>vh],[l.T,()=>(0,l.always)(void 0)]]),Ah=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(ph),(0,l.map)((t=>((e,t)=>{const r=ch(e,t.layout),n=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>ah(e,t.side))),(0,l.reject)(l.isNil),l.head)(e);return Qm(r.layout||{})}})(e,t),i=th(lh({},t,{views:r,version:"0.1"})),a=t["entity-type"],o=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e))(e);return(0,l.reject)(l.isNil,{entityType:a,views:i.views,layout:i.layout,sidePanelViews:n,profileBand:o})})(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand"])))(e);return{class:yt.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:ft.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:ft.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>ah(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",yt.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>ah(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;const a=Qm(i.layout),o=(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>a.includes(e.id)))})),(0,l.pluck)("class"),(0,l.reject)(l.isNil))(t);return _h(o)(t,i)},Nh=e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&"com.reltio.plugins.ui.first_level_action"===e.type&&!e.parent))},Rh="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var Ph;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(Ph||(Ph={}));const Sh={[yt.DQDashboard]:`${Rh}DqDashboard.svg`,[yt.Dashboard]:`${Rh}Dashboard.svg`,[yt.Graph]:`${Rh}Graph.svg`,[yt.RelationshipSearch]:`${Rh}GraphSearch.svg`,[yt.Interactions]:`${Rh}Interactions.svg`,[yt.PotentialMatches]:`${Rh}PotentialMatches.svg`,[yt.Profile]:`${Rh}Profile.svg`,[yt.ProfileActivityLog]:`${Rh}ActivityLog.svg`,[yt.Relationships]:`${Rh}Relationships.svg`,[yt.Sources]:`${Rh}Crosswalk.svg`,[yt.Search]:`${Rh}Search.svg`,[Ph.DashboardGroup]:`${Rh}DashboardGroup.svg`,[Ph.ProfileGroup]:`${Rh}ProfileGroup.svg`,[Ph.SearchGroup]:`${Rh}SearchGroup.svg`,DEFAULT:`${Rh}Default.svg`},wh=e=>Sh[null==e?void 0:e.class]||Sh.DEFAULT,Ih=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Sh[Ph.ProfileGroup]:null,Uh=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Sh[yt.Dashboard]||t===Sh[yt.DQDashboard]})),(0,l.always)(Sh[Ph.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Sh[yt.Search]||t===Sh[yt.RelationshipSearch]})),(0,l.always)(Sh[Ph.SearchGroup])],[l.T,()=>null]])(e),Ch=e=>(0,l.pipe)((0,l.chain)(Nh),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>({label:e.label,icon:wh(Ah(e,t)),screen:Ah(e,t),canRead:e.canRead,entityTypes:e["entity-types"]}))),(0,l.filter)((e=>e.screen)))(t))(t,e),n=Ah(t,e);return{label:t.label,icon:Ih(t)||Uh(r)||wh(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function Lh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Dh=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},jh=e=>({id:e,height:10}),kh=e=>{const t=(e=>(0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["attribute-types"]))}))(e))(e),r=(e=>(0,l.pipe)((0,l.chain)(Dh),(0,l.pluck)("pivotingAttributes"),l.flatten)(e))(e);return((e,t)=>{const r=(e=>(e||[]).find((0,l.propEq)("attribute-types","*")))(t);return(0,l.pipe)((0,l.reduce)(((e,n)=>{const i=((e,t)=>e.find((e=>Array.isArray(e["attribute-types"])&&e["attribute-types"].includes(t.uri))))(t,n)||r;return null!=i&&i.id&&(e[i.id]||(e[i.id]={extension:i,attributeTypes:[]}),e[i.id].attributeTypes.push(n)),e}),{}),l.values)(e)})(r,t).map((t=>{let{extension:r,attributeTypes:n}=t;const i=((e,t)=>{if("scroll"===t.layout.layout){const r=Bm(((e,t)=>{const r=Qm(t);return(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>r.includes(e.id)))})),(0,l.filter)((e=>{let{views:t}=e;return t})),(0,l.map)((e=>{let{views:t,id:r}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Lh(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Lm(jh,t.layout,{columns:4});return{views:r,layout:Dm(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))},xh=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,Fh=e=>{const t=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),r=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("enabled"))(e))(e),c=(e=>(0,l.pipe)((e=>sh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("default-perspective"),(0,l.ifElse)(xh,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),p=(e=>(0,l.pipe)((e=>oh(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.pluck)("action"))(e))(e),d=(e=>(0,l.pipe)((e=>sh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkUser"))(e))(e),y=(e=>(0,l.pipe)((e=>sh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkIdle"))(e))(e),f=(e=>(0,l.pipe)((0,l.map)((e=>ah(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e);return{i18n:o,entity:{requestSettings:{defaultMaxValues:t}},image:{attributeFieldsOrder:r},lookups:{autocomplete:n},validate:{levels:i,validateReadMode:a},attributePresentations:s,workflow:{enabled:u},defaultRoute:c,customScripts:p,checkUser:d,checkIdle:y,showSwitchToClassic:f}},Mh=e=>({layout:Ch(e),pivoting:kh(e),properties:Fh(e)});var $h=r(58697),Vh=r.n($h);function Gh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Wh(e,t,r[t])}))}return e}function Wh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Yh=e=>{let{views:t,layout:r}=e;const n={};let i=!1;const a=t.map((e=>{if(n[e.id]){const t=`${e.id}_${Vh()()}`;return n[e.id].push(t),i=!0,Gh({},e,{id:t})}return n[e.id]=[e.id],e})),o={},s=r&&i?r.map((e=>null==o[e.id]?(o[e.id]=0,e):(o[e.id]++,Gh({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}},Bh=e=>{let t=[];var r;return e&&(t.push({uri:e.uri,crosswalks:e.crosswalks,merges:e.merges}),null===(r=e.merges)||void 0===r||r.forEach((e=>{e.losers.forEach((e=>{t=t.concat(Bh(e))}))}))),t},qh=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(Jh,t),(0,l.propOr)([],"crosswalks",e))),e),Qh=(e,t)=>{let r=e.crosswalks||[];var n;return t||null===(n=e.merges)||void 0===n||n.forEach((e=>{var t;null===(t=e.losers)||void 0===t||t.forEach((e=>{r=r.concat(Qh(e))}))})),r},Hh=e=>{let t=0;var r;return e?(null===(r=e.merges)||void 0===r||r.forEach((e=>{var r;null===(r=e.losers)||void 0===r||r.forEach((e=>{const r=Hh(e);r>t&&(t=r)}))})),t+1):t},Kh=(e,t)=>{if(jt(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},Jh=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},Xh=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},zh=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},Zh=(e,t)=>{const r=t.reduce(((e,t)=>(e["configuration/sources/"+t.name]=t,e)),{}),n=t.reduce(((e,t)=>(e[t.id]=t,e)),{});return(0,l.pipe)((0,l.map)((e=>{var t,i;if(r[e.type])return r[e.type];const a=null===(t=e.crosswalkExternalInfo)||void 0===t||null===(i=t.dtssInfo)||void 0===i?void 0:i.tenantId;return a&&n[a]?n[a]:void 0})),(0,l.reject)(l.isNil),l.uniq,(0,l.ifElse)((e=>{let{length:t}=e;return 1===t}),l.head,(()=>{})))(e)},eb=(0,l.eqBy)(Jh),tb=(0,l.pipe)((0,l.propOr)({},"attributes"),l.values,l.flatten,(0,l.filter)((0,l.has)("refRelation")),(0,l.chain)((e=>(0,l.pipe)(cs,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e)))),rb=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${t.join('","')}");\n postMessage({action:'loaded'});`;let i;try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}if(i){let e="";i.addEventListener("message",(t=>{if("loaded"!==t.data.action){const n=JSON.parse(t.data);r(n,i,e),"setHtml"===n.action&&(e=n.params.html)}}))}return i},nb=(0,l.curry)(((e,t)=>{if(null==t)return"";if("string"!=typeof t&&(t=String(t)),e&&t){const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a=""}=e,[o,s]=t.split(".");t=i+o.replace(/\B(?=(\d{3})+(?!\d))/g,r)+(s?n+s:"")+a}else!e&&t&&(t=hn().number(t));return t})),ib=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?hn().number(e,"0,0.0a").toUpperCase():hn().number(e,"0,0"):""},ab=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last)),ob=(e,t)=>t&&e!==t?`${t} (${e})`:e,sb=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),lb=(e,t,r)=>{const n=sb(e,t,r);return ob(r,n)},ub=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),cb=(0,l.complement)(ub),pb=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),db=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.pipe)((0,l.reduce)(((e,t)=>t.reduce(((e,t)=>{let{type:r,codeValues:n}=t;return e[r]={type:r,codeValues:(0,l.uniq)([...(0,l.pathOr)([],[r,"codeValues"],e),...n])},e}),e)),{}),l.values)(t)},yb=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(cb(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),fb=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=r[n.uri],s=i?q(i):"L",u=a?K(a):"L LTS";switch(n.type){case mt.TYPE_NUMBER:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_COUNT:return t&&nb(o,t);case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isNil)(t)?t:le(t)?hn().text("yes"):hn().text("no");case mt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),t&&(_u(t)?Au(t):hn().date(t,s));case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_LOCAL_DATE:return t&&(_u(t)?Au(t):hn().date(t,s));case mt.TYPE_TIMESTAMP:return t&&(_u(t)?Au(t):hn().date(isNaN(t)?t:Number(t),u));case mt.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case mt.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}default:return(0,l.is)(Object,t)?ob((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),Tb={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)"},divider:"rgba(0,0,0,0.38)"},overrides:{MuiFilledInput:{root:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}},MuiInputBase:{input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"}}}},tooltip:{borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.54)"},inactiveBackground:"repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #e9e9e9 15px, #e9e9e9 16px)",inactiveSelectedBackground:"repeating-linear-gradient(45deg, #DBE9F4, #DBE9F4 14px, #CCDAE5 15px, #CCDAE5 16px)",inactiveSelectedHoverBackground:"repeating-linear-gradient(45deg, #D4E2ED, #D4E2ED 14px, #C6D4DF 15px, #C6D4DF 16px)",inactiveHoverBackground:"repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 14px, #e2e2e2 15px, #e2e2e2 16px)",transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},inactive:{opacity:.7},basicView:{boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",borderRadius:"3px",backgroundColor:"#FFFFFF"},suggested:"rgb(237, 246, 251)"},Eb=e=>{const t=e=>{switch(e){case 429:case 502:case 503:case 504:return 4;default:return 0}},r=e=>{const t=Math.random()+1;return new Promise((r=>{const n=Math.min(Math.round(1e3*Math.exp(e)*t),2e4);setTimeout(r,n)}))};return(n,i)=>{const a=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,i).then((e=>{const n=t(e.status);return n>0&&o<n?r(o).then((()=>a(o+1))):e}))};return a()}},mb=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=JSON.parse(t)}catch(n){r={errorMessage:t,errorCode:e.status}}throw r})))),hb=e=>{const{onRequest:t,onResponse:r,addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}=(()=>{const e={onRequest:[],onResponse:[]};return{onRequest:t=>{const{url:r,options:n,abort:i}=t,a=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e})),t.next);a(r,n)},onResponse:t=>{const{response:r,abort:n,url:i,options:a}=t,o=e.onResponse.reduce(((e,t)=>r=>{r instanceof Response?t({response:r,abort:n,next:e,url:i,options:a}):e(r)}),t.next);o(r)},addRequestInterceptor:t=>{e.onRequest.push(t)},addResponseInterceptor:t=>{e.onResponse.push(t)},removeRequestInterceptor:t=>{const r=e.onRequest.indexOf(t);e.onRequest.splice(r,1)},removeResponseInterceptor:t=>{const r=e.onResponse.indexOf(t);e.onResponse.splice(r,1)}}})(),s=(0,l.pipe)((e=>{let t=null;return r=>(n,i)=>{const a=()=>r(n,i),o=()=>{var e;return null===(e=t)||void 0===e?void 0:e.then(a)};return o()||a().then((r=>401===r.status?(t||(t=e().then((()=>{t=null}))),o()):r))}})(e),Eb,mb);return{request:(e,n)=>{const i=s(fetch),a=r?(e,t)=>i(e,t).then((n=>new Promise(((i,a)=>{r({response:n,next:e=>{i(e)},abort:a,url:e,options:t})})))):i;return t?new Promise(((r,i)=>{t({url:e,options:n,next:(e,t)=>{r(a(e,t))},abort:i})})):a(e,n)},addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}},bb="__metadata",Ob=(e=>{const t=[bb,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),vb=(0,l.set)(Ob),gb=(0,l.view)(Ob),_b=vb(yn.NEW),Ab=vb(yn.REMOVED),Nb=vb(yn.EDITED),Rb=vb(yn.IGNORED),Pb=(0,l.pipe)(gb,(0,l.equals)(yn.REMOVED)),Sb=(0,l.pipe)(gb,(0,l.equals)(yn.NEW)),wb=(0,l.pipe)(gb,(0,l.equals)(yn.EDITED)),Ib=(0,l.pipe)(gb,(0,l.complement)(l.isNil)),Ub=(0,l.pipe)(gb,(0,l.equals)(yn.IGNORED)),Cb=(0,l.omit)([bb]),Lb=(e,t)=>e===bb?void 0:t;function Db(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jb=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e(t))return r.concat(t);if(t&&t.children)for(const n of t.children){const i=jb(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},kb=(e,t)=>jb((0,l.propEq)("nodeId",t),e),xb=(e,t)=>jb((0,l.pathEq)(["entity","uri"],t),e),Fb=(e,t)=>{const r=kb(e,t);return r.length>1?r[r.length-2]:null},Mb=(e,t)=>{const r=kb(e,t);return r.length>0?r[r.length-1]:null},$b=(e,t)=>{let{parent:r,childrenProcessing:n=(e=>e),nodeProcessing:i=(e=>e)}=t;return(e=i(e,r)).children&&(e.children=n(e.children.map((t=>$b(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},Vb=()=>{},Gb=(e,t)=>{let{parent:r,nodeProcessing:n=Vb}=t;n(e,r),e.children&&e.children.forEach((t=>Gb(t,{parent:e,nodeProcessing:n})))},Wb=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case Ze.addingParent:var i,a,o,s;return{entityUri:n?null===(i=r.entity)||void 0===i?void 0:i.uri:null===(a=t.relatedEntity)||void 0===a?void 0:a.uri,relation:r.relation,parentEntityUri:n?null===(o=t.relatedEntity)||void 0===o?void 0:o.uri:null===(s=r.entity)||void 0===s?void 0:s.uri};case Ze.addingChild:var l,u,c,p;return{entityUri:n?null===(l=t.relatedEntity)||void 0===l?void 0:l.uri:null===(u=r.entity)||void 0===u?void 0:u.uri,relation:r.relation,parentEntityUri:n?null===(c=r.entity)||void 0===c?void 0:c.uri:null===(p=t.relatedEntity)||void 0===p?void 0:p.uri};case Ze.editing:{var d,y,f,T;const e={oldRelation:t.relation,newRelation:r.relation,isReversed:n},i=null===(d=r.entity)||void 0===d?void 0:d.uri,a=null===(y=t.relatedEntity)||void 0===y?void 0:y.uri;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Db(e,t,r[t])}))}return e}({},e,(null===(f=t.entity)||void 0===f?void 0:f.uri)===(null===(T=r.entity)||void 0===T?void 0:T.uri)?{}:{entityUri:i,newEntityUri:a})}}},Yb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];return Object.values(e).forEach((e=>{const r=e.root;r&&Gb(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===Ze.addingChild||r.editingMode===Ze.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=Wb({node:r,connection:n,isReversed:i}),s=Ff({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ze.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=Wb({node:r,isReversed:i,connection:n}),l=s?Gf({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):Vf({oldRelation:e,newRelation:a});t.push(l)}}})})),t},Bb={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},qb={asc:"asc",desc:"desc"},Qb=Bb.entityLabel,Hb=qb.asc,Kb=(0,l.always)(0),Jb=e=>{let{sortField:t=Qb,sortOrder:r=Hb,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case Bb.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return E_.strings.sort(t,a,o)})(n,r);case Bb.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return E_.strings.sort(e,i,a)})(r);default:return Kb}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},Xb=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(qb)),l.identity,(0,l.always)(Hb))),zb=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(Bb)),l.identity,(0,l.always)(Qb)));var Zb=r(91104);let eO;const tO=(e,t)=>(eO||(eO=Zb.createClient({key:t})),new Promise((t=>{eO.geocode({address:e},((e,r)=>{e&&(console.warn(e),t(null));const{results:n}=r.json,i=(0,l.pathOr)(null,[0,"geometry","location"],n);t(i||null)}))}))),rO=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},nO=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(os).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[rO(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(nO(e.value,t,r))),n})),iO=e=>e&&e.length>0,aO=(e,t)=>[].concat(e&&e.attributes?nO(e.attributes,t):[]).filter(l.identity),oO=(e,t,r,n,i)=>{if(e&&e.type){const t=(Kr(r,e.type).geoLocationAttributes||[]).map((t=>{return r=aO(e,t.latitude),n=aO(e,t.longitude),iO(r)&&iO(n)&&{lat:Number(r[0]),lng:Number(n[0])};var r,n})).filter(l.identity);if(t.length>0)return Promise.resolve(t[0])}const a=t.GeoLocation;if(a){const e=a.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(iO(t)&&t[0].value&&iO(r)&&r[0].value)return{id:e.uri,lat:Number(t[0].value),lng:Number(r[0].value)}})).filter(l.identity);if(e.length>0)return Promise.resolve(e)}return n&&n.label?tO(n.label,i).catch((()=>null)):Promise.resolve(null)},sO=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n={},i=(0,l.flatten)(t.map((t=>{return"configuration/entityTypes/Location"===t.type?{id:t.uri,label:t.label,entity:t,pointSource:t.attributes}:(n[t.type]=n[t.type]||((null===(r=Kr(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>t.attributes[e])).filter(l.identity).flatMap((e=>e.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e}))))));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s}=t;return oO(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?tO(a.label,r).catch((()=>null)):e)).then((e=>{let t=Array.isArray(e)?e:[e];return e&&t.map((e=>({id:e.id||n,label:i,entity:a,point:e})))})).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},lO=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Promise.resolve((0,l.pipe)((0,l.chain)((t=>{const r=Kr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(gr(e,r.latitude,t.type)&&gr(e,r.longitude,t.type)){const e=aO(t,r.latitude),n=aO(t,r.longitude),i=(e,r)=>({id:`${t.uri}_nested_${e}_${r}`,entity:t,label:t.label,point:{lat:Number(e),lng:Number(r)}});return(0,l.zipWith)(i,e,n)}}))})),(0,l.filter)(l.identity),(0,l.uniqBy)((0,l.prop)("id")))(t))},uO=(e,t,r)=>Promise.all([lO(e,t),sO(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lon===e.point.lon))))]}));function cO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){pO(e,t,r[t])}))}return e}function pO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const dO=(e,t)=>t.values.map(ho(e,t.entityTypeUri)),yO=(e,t,r)=>$s(t.fieldName,r)||gr(e,Qt(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),fO=(e,t)=>{const r=(0,l.propOr)([],"values",t),n=(0,l.path)([t.attrType.lookupCode],e);return(0,l.map)((e=>{const t=(0,l.prop)(e,n);return t?ob(e,t):e}),r)},TO=(0,l.path)(["attrType","label"]),EO=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>cO({},e,{[t]:!0})),{});e[r]=e[r]?cO({},e[r],n):n}return e}),{}),mO=(0,l.pipe)((0,l.prop)("values"),E),hO=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",In.type.name)),bO=e=>e.type===gO.NUMERIC_RANGE_FACET,OO=e=>e.type===gO.DATE_RANGE_FACET,vO=(0,l.either)(bO,OO),gO={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},_O=e=>{switch(null==e?void 0:e.name){case In.type.name:return gO.ENTITY_TYPE_FACET;case In.createdBy.name:case In.updatedBy.name:case In.sourceSystems.name:case In.tags.name:case In.roles.name:case In.matchRules.name:case In.MLRecommendedMatch.name:return gO.WITH_DROPDOWN_CHECKBOXES_FACET;case In.createdTime.name:case In.updatedTime.name:case In.startDate.name:case In.endDate.name:return gO.DATE_RANGE_FACET;case In.matches.name:case In.matchScore.name:return gO.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return gO.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return gO.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return gO.DATE_RANGE_FACET;default:return gO.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},AO=(0,l.pipe)(yO,_O),NO=(0,l.pipe)((0,l.path)(["attrType","type"]),Cr),RO=(0,l.cond)([[bO,(0,l.always)(nn.IN_RANGE)],[OO,(0,l.always)(nn.WITHIN)],[(0,l.allPass)([NO,e=>e.values.length>=2]),(0,l.always)(nn.EXISTS)],[l.T,(0,l.always)(nn.EQUALS)]]),PO=(0,l.cond)([[OO,(0,l.prop)("values")],[bO,(0,l.prop)("values")],[NO,e=>1===e.values.length?e.values.map(le):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]);function SO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const wO=(0,l.pipe)((0,l.path)(["attrType","type"]),Rr),IO=(0,l.pipe)((0,l.path)(["attrType","type"]),wr),UO=(0,l.pipe)((0,l.prop)("attrType"),Gs),CO=(0,l.pipe)((0,l.prop)("attrType"),Vs),LO=e=>t=>t.values.map((t=>Kr(e,t).label)).join(" , "),DO=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),jO=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(hn().number),DO)),(0,l.join)(","))(e.values);return`${TO(e)}: ${t}`},kO=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),DO)),(0,l.join)(","))(e.values);return`${TO(e)}: ${t}`},xO=e=>t=>`${TO(t)}: ${dO(e,t).join(", ")}`,FO=e=>t=>{const r=fO(e,t);return`${TO(t)}: ${r.join(", ")}`},MO=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[CO,LO(e)],[IO,jO],[wO,kO],[UO,xO(e)],[l.T,FO(t)]]),r))),$O=(e,t,r,n)=>(0,l.pipe)(l.values,(0,l.reject)((0,l.pipe)((0,l.prop)("values"),E)),(0,l.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){SO(e,t,r[t])}))}return e}({},t,{attrType:yO(e,t,n)}))),MO(e,r))(t),VO=new RegExp(`^${hn().text("Search")}`),GO=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...$O(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(VO,"",u)]},WO=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(pn),YO=e=>(e=>WO.reduce(((e,t)=>{const r=new RegExp(`'{0,1}${encodeURIComponent("${")}${t}${encodeURIComponent("}")}'{0,1}`,"g"),n=new RegExp(`'{0,1}${encodeURIComponent("${")}now${encodeURIComponent("}")}'{0,1}`,"g"),[i,a]=Nu(t);return e.replace(r,i).replace(n,a)}),e))(e),BO=(0,l.curry)(((e,t)=>{const r=new URL(e),[,n]=r.pathname.split("/");return"nui"===n?`${e}search?state=${t}`:`${e}#p~com.reltio.plugins.search.SearchPerspective_s~${t}`})),qO={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},QO=e=>[qO.geoPolygon,qO.onMapMove].includes(e),HO=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},KO=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},JO=(e,t)=>QO(e)?t.map(HO):[KO(t)],XO=e=>QO(e)?hn().text("Geo Polygon"):hn().text("Geo Location"),zO=e=>{switch(e){case qO.geoLocation:return"geoLocation";case qO.geoPolygon:case qO.onMapMove:return"geoPolygon"}},ZO={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},ev=e=>hn().text(e),tv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[nn.EQUALS]:"=",[nn.NOT_EQUALS]:"≠",[nn.STARTS_WITH]:"*",[nn.MISSING_VALUE]:hn().text("missing value"),[nn.HAS_ALL]:hn().text("has all"),[nn.IN_RANGE]:hn().text("in range"),[nn.FULL_TEXT]:hn().text("full text"),[nn.EXISTS]:hn().text("exists"),[nn.COUNT_EQUALS]:`${hn().text("count")} =`,[nn.COUNT_NOT_EQUALS]:`${hn().text("count")} ≠`,[nn.COUNT_LT]:`${hn().text("count")} <`,[nn.COUNT_LTE]:`${hn().text("count")} <=`,[nn.COUNT_GT]:`${hn().text("count")} >`,[nn.COUNT_RANGE]:hn().text("count range"),[nn.LT]:"<",[nn.LTE]:"<=",[nn.GT]:">",[nn.GTE]:">=",[nn.IN_FILE]:hn().text("in file"),[nn.NOT_IN_FILE]:hn().text("not in file"),[nn.CONTAINS]:"~",[an.LIST_EQUALS]:"=",[an.NOT_LIST_EQUALS]:"≠",[an.LIST_EQUALS_CASE_SENSITIVE]:"=",[an.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||hn().text(e.toLowerCase())},rv=e=>({type:ZO.operator,text:e}),nv=e=>({type:ZO.operator,text:ev(e)}),iv=e=>({type:ZO.attributeLabel,text:e}),av=e=>({type:ZO.specialAttributeLabel,text:e}),ov=e=>({type:ZO.attributeFilter,text:tv(e)}),sv=e=>({type:ZO.attributeValue,text:e}),lv=e=>({type:ZO.entityTypeLabel,text:e}),uv=()=>({type:ZO.space,text:" "}),cv=()=>({type:ZO.bracket,text:"("}),pv=()=>({type:ZO.bracket,text:")"}),dv=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),yv=(0,l.curry)(((e,t)=>t.map(dv(e)))),fv=(0,l.curry)(((e,t,r)=>[e,...r,t])),Tv=fv(cv(),pv()),Ev=fv(uv(),uv()),mv=(0,l.curry)(((e,t)=>[e,...t])),hv=e=>mv(lv(e)),bv=e=>mv(lv(`${e}: `)),Ov=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=iu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=ru(s),a=nu(s);!r&&t&&n&&(i.push(cv()),r=!0),i.push(o),r&&a&&(i.push(pv()),r=!1);const l=e?nv(s):rv(s);i.push(...Ev([l]))}else i.push(o),r&&(i.push(pv()),r=!1)}return i}},vv=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),gv=(0,l.pipe)(Ov({localizable:!1}),vv),_v=function(e){let{data:{title:t,pathToTitle:r}}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},Av=e=>{let{data:t,values:r,filter:n}=e;return t&&Vu({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},Nv=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(Av)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),Rv=(0,l.pipe)((0,l.chain)((0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)((e=>(e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.attrType)&&hr(e.data.attrType)})(e)&&[nn.HAS_ALL,nn.EQUALS,nn.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:mr((0,l.path)(["data","attrType"],e)),codeValues:(0,l.flatten)((0,l.propOr)([],"values",e))}))),(0,l.filter)((e=>{let{codeValues:t}=e;return t.length>0})))),db),Pv=(e,t)=>(0,l.pipe)(Rv,yb(t))(e),Sv=(0,l.pathEq)(["data","fieldName"],In.type.name),wv=(0,l.path)(["data","entityTypeUri"]),Iv=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),Uv=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(as(e)),attributes:(0,l.filter)((0,l.pipe)(wv,(0,l.anyPass)([l.isNil,as(e),r=>{const n=(t.entityTypes||[]).filter(as(e));return(n.length>1?en(e,n):null)===r&&!!Kr(e,r)}])))})(t))))),Cv=e=>(0,l.pipe)((0,l.prop)("filter"),Wl,(0,l.equals)(e)),Lv=(0,l.curry)(((e,t,r,n,i,a)=>{const o=$s(n.fieldName)||n.attrType,s=vu(o,i),u=fb({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>hr(s),()=>(0,l.is)(Object,a)&&a.lookupCode?ob(a.lookupCode,a.value):lb(r,mr(o),a)],[()=>Gs(s),()=>ho(e,n.entityTypeUri,a)],[()=>Ws(s),()=>$o(e,a)],[()=>Ks(s),()=>Wo(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>wr(c)||Cr(c)),mu),sv)()})),Dv=(e,t,r,n)=>{const i=Lv(e,t,r,n.data,n.filter);return(0,l.cond)([[Cv(0),(0,l.always)([])],[(0,l.both)(Cv(2),(2,(0,l.pipe)((0,l.prop)("values"),l.flatten,l.length,(0,l.equals)(2)))),e=>{let{values:t}=e;const[r,n]=(0,l.flatten)(t);return[uv(),i(r),{type:ZO.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[uv(),...(0,l.pipe)(l.flatten,(0,l.map)(i),yv({type:ZO.punctuationMark,text:", "}))(t)]}]])(n)},jv=(e,t)=>{const r=!!$s(e.data.fieldName);return(0,l.pipe)(_v,r?av:iv)(e,t)},kv=(e,t,r,n,i)=>[jv(n,i),uv(),ov(n.filter),...Dv(e,t,r,n)],xv=(0,l.addIndex)(l.map),Fv=(0,l.propEq)("length",1),Mv=(0,l.propSatisfies)((0,l.lt)(1),"length"),$v=(0,l.complement)(l.isEmpty),Vv=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(su,(0,l.filter)(Av),lu,(0,l.map)((n=>({operand:kv(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,Ov()))(n)},Gv=(0,l.pipe)(Vv,l.flatten),Wv=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>yd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=Vv(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(hv),(0,l.pipe)(s(bv),(0,l.unless)((()=>Fv(u)||i),Tv)))(u)},Yv=(e,t,r,n)=>(0,l.pipe)(su,(0,l.filter)(Nv),lu,xv(((n,i,a)=>({operand:Wv(e,t,r,n,Fv(a)),operator:n.operator}))),Ov(),l.flatten)(n),Bv=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),Ov(),l.flatten),qv=e=>{let{searchType:t,values:[r]}=e;return JO(t,r).join(", ")},Qv=(e,t,r,n,i,a)=>{const o=(e=>e?[av(e.isRawFilter?hn().text("Raw filter"):hn().text("Search")),...Ev([ov(nn.EQUALS)]),sv(`"${e.value}"`)]:[])(i),s=(e=>e?[av(XO(e.searchType)),uv(),sv(qv(e))]:[])(a),u=(0,l.pipe)(Yv,(0,l.when)((e=>Mv(e)&&($v(o)||$v(s))),Tv))(e,t,r,n);return Bv([o,s,u])},Hv=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),Kv=(0,l.pipe)(Qv,Hv),Jv=(0,l.has)("attributes"),Xv=Array.isArray,zv=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),Zv=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=eg(e,t,r,a,i);return(0,l.when)((0,l.always)((0,l.complement)(l.isNil)(o)),(0,l.pipe)((0,l.when)((0,l.always)((0,l.not)(zv(a))),Tv),(0,l.concat)(Ev([rv(o)]))))(s)},eg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return Jv(n)?Zv(e,t,r,n,i):Xv(n)?n.reduce(((n,a)=>n.concat(eg(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(Ev([rv(n.operator)])))(kv(e,t,r,n,i))},tg=(e,t,r,n,i)=>(0,l.pipe)(eg,l.flatten)(e,t,r,n,i);function rg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ng(e,t,r[t])}))}return e}function ng(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ig=(0,l.complement)(Sv),ag=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(Sv),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(wv),(0,l.reject)(l.isNil),l.uniq)(e),n=0===r.length,i=1===r.length&&(0===t.length||(0,l.equals)(r,t));return{entityTypesFromSpecialAttributes:t,entityTypesFromAttributes:r,areOnlySpecialAttributes:n,areAttributesFromOneEntityType:i}},og=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=ag(t);return(r||n)&&au(t)},sg=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(og)),n=e.filter((e=>{let{attributes:t=[]}=e;return t.length>0}));if(0===r.length||1===r.length&&1===n.length||t.push("Can't convert more than one complex transition advanced search group"),e.some((e=>(e.attributes||[]).filter(Sv).some((0,l.propEq)("filter",nn.NOT_EQUALS))))&&t.push("Can't convert advanced search group with 'Type' attribute and 'not equals' filter."),t.length)throw t;return e}),(0,l.reduce)(((e,t)=>e.concat((e=>{const t=[],r=e.attributes||[],{entityTypesFromSpecialAttributes:n,entityTypesFromAttributes:i}=ag(r);if(og(e))t.push(rg({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(ig)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(Sv,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(wv,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(ig),entityTypes:n,operator:i?a:e.operator,id:Vh()()}}));t.push(...n)}var a;return t})(t))),[]))),lg={[nn.EQUALS]:nn.ON,[nn.IN_RANGE]:nn.WITHIN,[nn.GTE]:nn.AFTER,[nn.GT]:nn.AFTER,[nn.LTE]:nn.BEFORE,[nn.LT]:nn.BEFORE},ug=(0,l.curry)((e=>lg[e]||e)),cg=(0,l.curry)(((e,t)=>{switch(e){case nn.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case nn.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),pg=(0,l.pipe)((0,l.path)(["data","attrType","type"]),Rr),dg=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>rg({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return pg(e)?(0,l.evolve)({filter:ug,values:cg(t)},e):e}))})))})),yg=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),sg,Uv(t),(0,l.map)((0,l.evolve)({attributes:(0,l.pipe)((0,l.map)((0,l.evolve)({data:e(t,n,i)})),(0,l.reject)((0,l.propSatisfies)(l.isNil,"data")))})),dg,(0,l.reject)(Iv))(r)));function fg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Tg(e,t,r[t])}))}return e}function Tg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Eg=(e,t)=>({data:{uri:Xt(e.fieldName)?Qt(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||RO(e),id:Vh()(),values:PO(e)}),mg=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=$s(a,t,r)||gr(e,i);if(!s)return null;if(lr(s))return fg({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=yd(e,{type:o}),i=(vr(e,Qt(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return fg({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),hg=(0,l.curry)(((e,t,r,n)=>yg(mg,e,n,t,r)));function bg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Og(e,t,r[t])}))}return e}function Og(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vg=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},gg=e=>"rdmLookups.not.resolved"===e?In.notResolved.name:e,_g=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===un?nn.IN_RANGE:cn(a),u=gg(n),c=$s(u)||gr(e,i),p=(0,l.cond)([[()=>Ql(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>bg({},e,{filename:ab(e)}))))],[()=>Cr(null==c?void 0:c.type),(0,l.map)(le)],[e=>Bl(s)&&!Array.isArray(e[0])&&!Rr(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:Vh()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===un?"and not":"and",filter:s,values:p}})),Ag=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(_g(e,en(e,i)));return[{id:Vh()(),operator:"or",attributes:a,entityTypes:i}]})),Ng=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Rg=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([Ng("from"),Ng("to")]),(0,l.pipe)((0,l.pick)(["from","to"]),l.values)],[(0,l.pipe)((0,l.prop)("rangeSelection"),E,l.not),(0,l.pipe)((0,l.prop)("rangeSelection"),(0,l.pick)(["start","end"]),l.values)],[l.T,()=>[]]]),Pg=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return bg({},r,{values:Rg(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?js(e.fieldName,n):e.fieldName})},Sg=(e,t)=>{if((0,l.has)("children")(e)){const r=Pg(e,t);return e.children.reduce(((e,n)=>(e.push(Sg(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return Pg(e,t)},wg=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(Pg(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(bg({fieldName:e.fieldName},Pg(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(Sg,l.flatten)],[l.T,Pg]]),Ig=(0,l.pipe)((0,l.map)(wg),l.flatten),Ug=e=>{if(e.every((e=>Array.isArray(e))))return e;if(2===e.length)return[e.map((e=>Number(e)))];if(1===e.length){const t=Number(e[0]);return[[t,t]]}return e},Cg=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=Ag(e,a),[u]=((e,t)=>{if(!t)return[];const[r,n]=(0,l.pipe)((0,l.reject)((e=>"tenants"===e.fieldName)),(0,l.partition)((e=>"type"===e.fieldName)))(t),i=(0,l.chain)((0,l.propOr)([],"values"),r);return[{attributes:Ig(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>bg({},t,{type:AO(e,t)}))).map((e=>bg({},e,{values:vO(e)?Ug(e.values):e.values}))).map((e=>{let{filter:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["filter"]);return Eg(r,t)})),operator:"or",id:Vh()(),entityTypes:i}]})(e,i),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.pipe)(l.keys,(0,l.map)((t=>({[gg(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[bg({},u,{entityTypes:null!=c&&c.type?(0,l.uniq)([...u.entityTypes,...s.entityTypes]):[],attributes:[...u.attributes,...s.attributes].filter((e=>{let{data:{fieldName:t}}=e;return c[t]}))})];return hg(e,t,r,p)},Lg=(e,t,r,n)=>{try{return"2.0"==n.version?((e,t,r,n)=>{const{advanced:i=[],facets:a={}}=n,o=i.some((e=>{let{attributes:t,entityTypes:r=[]}=e;return t.length||r.length}))?i:((e,t)=>{const[[r={}],n]=(0,l.pipe)(l.values,(0,l.reject)(mO),(0,l.partition)(hO))(t),i=n.map((t=>fg({},t,{type:AO(e,t)}))).map((e=>Eg(e))),a=r.values||[];return[{attributes:i,operator:"or",id:Vh()(),entityTypes:a}]})(e,a);return hg(e,t,r,o)})(e,t,r,n):Cg(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},Dg=e=>"2.0"===e.version?e.keyword:vg(e),jg=e=>(0,l.pathEq)(["object","uri"],e),kg=(e,t)=>(0,l.pipe)((0,l.find)(jg(e)),(0,l.prop)("object"))(t),xg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=(0,l.pipe)((0,l.find)((0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),jg(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=kg(r.match,t)||n[r.match];return i?{label:qp((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return mo(e,i.type,t)||{label:t,uri:t}}))}:null};return(0,l.pipe)((0,l.defaultTo)([]),(0,l.when)((0,l.complement)(l.isEmpty),(0,l.map)(a)),(0,l.reject)(l.isNil))(i)},Fg=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),Mg=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),$g=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[]}=t;const a=(0,l.propOr)({},n,r);return{label:qp((0,l.prop)("label",a)),matchRules:i.map((function(t){return mo(e,a.type,t)||{label:t,uri:t}}))}})))(t),Vg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.map)((0,l.prop)("shortestTransitiveMatchPath")),l.flatten,(0,l.filter)(l.identity),(0,l.map)((0,l.prop)("match")),l.uniq);return t(e)},Gg=(0,l.path)(["object","uri"]),Wg=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},Yg=e=>e.getValue(),Bg=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=Bg(n[e],t),!r);e++);return r},qg=(e,t)=>{const r=[],n=(0,l.pipe)(Yg,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(qg,[t]),a);return r.push.apply(r,o),r};function Qg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Hg(e,t,r[t])}))}return e}function Hg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Kg=(e,t)=>!!e[t],Jg=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},Xg=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return 0===t.length&&e?e:(0,l.uniqBy)(r,[...t,...e||[]])},zg=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return Qg({},t,{[r.uri]:Qg({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:Xg(null==o?void 0:o.parents,n),children:Xg(null==o?void 0:o.children,i),values:Xg(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},Zg=e=>e.children?e.children.flatMap(Zg):e,e_=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Kr(r,t)||Ai(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Jo(r,n,i).flatMap(Zg).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>gr(r,e))).filter(l.identity).filter((0,l.prop)("dependentLookupCode"));return(e=>{let{structure:t,parentAttrType:r,childrenAttrTypes:n}=e;const i=n.map((0,l.prop)("uri")),a=zg({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>zg({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},t_=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!jt(e.uri)&&Vt(e.type)&&Vt(t)&&!t.startsWith(e.type))(n,t))return e;const i=vs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(os),(0,l.map)(Jg))(i);return zg({structure:e,attrType:e[t].attrType,values:a})}),t)},r_=e=>{let{structure:t,attributeValue:r}=e;if((0,l.is)(Object,r.value))return Object.values(r.value).reduce(((e,t)=>{const r=t.some((e=>{let{value:t}=e;return(0,l.is)(Object,t)})),n=t.some((t=>{let{type:r}=t;return Kg(e,r)}));return r||n?t.filter(os).reduce(((e,t)=>r_({structure:e,attributeValue:t})),e):e}),t);{const e=r;return Kg(t,e.type)?zg({structure:t,attrType:t[e.type].attrType,values:[Jg(e)]}):t}},n_=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?Qg({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},i_=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=vs(i,n,r)||[];return a.length?zg({structure:t,attrType:t[r].attrType,values:a.filter(os).map(Jg)}):t},a_=(e,t,r)=>{const n=Ft(e),i=Ft(t);return n===i?((e,t)=>{const r=Zt(t),n=Zt(e);return Wt(n,r)})(e,t):!(!r||!zt(t))&&XT(r,i).includes(n)},o_=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},s_=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?KT(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return a_(r,t,o)}))},l_=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>l_(e,t,r)))))},u_=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&o_(n,e)}},c_=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=Ft(n),c=JT(u,o,i,a),p=l_("children",t,l),d=l_("parents",t,l),y=p.flatMap((e=>l_("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return a_(t,n,c)})).map((t=>u_(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return a_(n,t,c)||Ft(t)!==u&&a_(t,n,c)})).map((t=>u_(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=l_("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return f.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&a_(n,t,c)}))})).map((t=>u_(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return a_(t,n,c)})).map((e=>u_(r,n,e,s))),...T,...E,...f]},p_=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=fb({attributePresentations:r,dataTypeDefinition:t}),a=(0,l.pipe)((e=>{const t={};for(const r of e){const[e,n]=Object.entries(r)[0];t[e]=Array.isArray(n)?n.map((e=>({value:e,ov:!0}))):[{value:n,ov:!0}]}return{value:t}}),(e=>Yp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[dr,()=>a(n)],[hr,()=>(e=>{const r=o(e),n=mr(t);return Ll([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return lb(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},d_=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:nn.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(y_(r,t)):i.push(f_([t],r)),i},y_=(e,t)=>{const r=ur(e),n=t=>(e[r]||[]).find((e=>e.uri===t||e.uri.endsWith(`/${t}`)));return t.reduce(((e,t)=>{for(const r in t){const i=n(r),a=dr(i)?y_(i,t[r]):[f_(t[r],i)];return e.push(...a),e}}),[])},f_=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Er(t.uri),filter:t.type===mt.TYPE_BLOB?nn.FULL_TEXT:nn.EQUALS,values:e}:{fieldName:Er(t.uri),filter:nn.MISSING_VALUE},T_={AttributesDiff:a,AttributesEditor:o,HistoryManager:s},E_={Colors:r(33164),DependencyManager:r(29524),strings:n,dates:i}},33164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getColor:()=>i});var n=[[255,235,238,0],[255,205,210,0],[239,154,154,0],[229,115,115,0],[239,83,80,1],[244,67,54,1],[229,57,53,1],[211,47,47,1],[198,40,40,1],[183,28,28,1],[255,138,128,0],[255,82,82,1],[255,23,68,1],[213,0,0,1],[252,228,236,0],[248,187,208,0],[244,143,177,0],[240,98,146,1],[236,64,122,1],[233,30,99,1],[216,27,96,1],[194,24,91,1],[173,20,87,1],[136,14,79,1],[255,128,171,0],[255,64,129,1],[245,0,87,1],[197,17,98,1],[243,229,245,0],[225,190,231,0],[206,147,216,0],[186,104,200,1],[171,71,188,1],[156,39,176,1],[142,36,170,1],[123,31,162,1],[106,27,154,1],[74,20,140,1],[234,128,252,0],[224,64,251,1],[213,0,249,1],[170,0,255,1],[237,231,246,0],[209,196,233,0],[179,157,219,0],[149,117,205,1],[126,87,194,1],[103,58,183,1],[94,53,177,1],[81,45,168,1],[69,39,160,1],[49,27,146,1],[179,136,255,0],[124,77,255,1],[101,31,255,1],[98,0,234,1],[232,234,246,0],[197,202,233,0],[159,168,218,0],[121,134,203,1],[92,107,192,1],[63,81,181,1],[57,73,171,1],[48,63,159,1],[40,53,147,1],[26,35,126,1],[140,158,255,0],[83,109,254,1],[61,90,254,1],[48,79,254,1],[227,242,253,0],[187,222,251,0],[144,202,249,0],[100,181,246,0],[66,165,245,0],[33,150,243,1],[30,136,229,1],[25,118,210,1],[21,101,192,1],[13,71,161,1],[130,177,255,0],[68,138,255,1],[41,121,255,1],[41,98,255,1],[225,245,254,0],[179,229,252,0],[129,212,250,0],[79,195,247,0],[41,182,246,0],[3,169,244,0],[3,155,229,1],[2,136,209,1],[2,119,189,1],[1,87,155,1],[128,216,255,0],[64,196,255,0],[0,176,255,0],[0,145,234,1],[224,247,250,0],[178,235,242,0],[128,222,234,0],[77,208,225,0],[38,198,218,0],[0,188,212,0],[0,172,193,0],[0,151,167,1],[0,131,143,1],[0,96,100,1],[132,255,255,0],[24,255,255,0],[0,229,255,0],[0,184,212,0],[224,242,241,0],[178,223,219,0],[128,203,196,0],[77,182,172,0],[38,166,154,0],[0,150,136,1],[0,137,123,1],[0,121,107,1],[0,105,92,1],[0,77,64,1],[167,255,235,0],[100,255,218,0],[29,233,182,0],[0,191,165,0],[232,245,233,0],[200,230,201,0],[165,214,167,0],[129,199,132,0],[102,187,106,0],[76,175,80,0],[67,160,71,1],[56,142,60,1],[46,125,50,1],[27,94,32,1],[185,246,202,0],[105,240,174,0],[0,230,118,0],[0,200,83,0],[241,248,233,0],[220,237,200,0],[197,225,165,0],[174,213,129,0],[156,204,101,0],[139,195,74,0],[124,179,66,0],[104,159,56,1],[85,139,47,1],[51,105,30,1],[204,255,144,0],[178,255,89,0],[118,255,3,0],[100,221,23,0],[249,251,231,0],[240,244,195,0],[230,238,156,0],[220,231,117,0],[212,225,87,0],[205,220,57,0],[192,202,51,0],[175,180,43,0],[158,157,36,0],[130,119,23,1],[244,255,129,0],[238,255,65,0],[198,255,0,0],[174,234,0,0],[255,253,231,0],[255,249,196,0],[255,245,157,0],[255,241,118,0],[255,238,88,0],[255,235,59,0],[253,216,53,0],[251,192,45,0],[249,168,37,0],[245,127,23,0],[255,255,141,0],[255,255,0,0],[255,234,0,0],[255,214,0,0],[255,248,225,0],[255,236,179,0],[255,224,130,0],[255,213,79,0],[255,202,40,0],[255,193,7,0],[255,179,0,0],[255,160,0,0],[255,143,0,0],[255,111,0,0],[255,229,127,0],[255,215,64,0],[255,196,0,0],[255,171,0,0],[255,243,224,0],[255,224,178,0],[255,204,128,0],[255,183,77,0],[255,167,38,0],[255,152,0,0],[251,140,0,0],[245,124,0,0],[239,108,0,1],[230,81,0,1],[255,209,128,0],[255,171,64,0],[255,145,0,0],[255,109,0,0],[251,233,231,0],[255,204,188,0],[255,171,145,0],[255,138,101,0],[255,112,67,0],[255,87,34,1],[244,81,30,1],[230,74,25,1],[216,67,21,1],[191,54,12,1],[255,158,128,0],[255,110,64,0],[255,61,0,1],[221,44,0,1],[239,235,233,0],[215,204,200,0],[188,170,164,0],[161,136,127,1],[141,110,99,1],[121,85,72,1],[109,76,65,1],[93,64,55,1],[78,52,46,1],[62,39,35,1],[250,250,250,0],[245,245,245,0],[238,238,238,0],[224,224,224,0],[189,189,189,0],[158,158,158,0],[117,117,117,1],[97,97,97,1],[66,66,66,1],[33,33,33,1],[236,239,241,0],[207,216,220,0],[176,190,197,0],[144,164,174,0],[120,144,156,1],[96,125,139,1],[84,110,122,1],[69,90,100,1],[55,71,79,1],[38,50,56,1],[0,0,0,1],[255,255,255,0]];function i(e){var t,r=null,i=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];return n.forEach((function(e){var n=Math.abs(i[0]-e[0])+Math.abs(i[1]-e[1])+Math.abs(i[2]-e[2]);(null===r||n<r)&&(r=n,t=e)})),t?t[3]:0}},29524:(e,t,r)=>{"use strict";function n(e){var t=[];return{getInfo:function(){return e},getEdges:function(){return t},removeEdge:function(e){var r=t.indexOf(e);t.splice(r,1)},addEdge:function(e){t.push(e)}}}function i(e,t){t(e),e.getEdges().forEach((function(e){i(e,t)}))}function a(e){var t=[];return e.getEdges().forEach((function(e){t.push.apply(t,a(e))})),t.push(e),t}function o(e,t){var r=null;if(e.getInfo()===t)return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=o(n[i],t));i++);return r}function s(e,t){var r=null;if(e.getEdges().some((function(e){return e.getInfo()===t})))return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=s(n[i],t));i++);return r}r.r(t),r.d(t,{Node:()=>n,resolve:()=>i,findNode:()=>o,findParentNode:()=>s,getDependencyOrder:()=>a})},33196:()=>{},38087:()=>{},74854:()=>{},66602:()=>{}}]);
|
|
1
|
+
(self.webpackChunk_reltio_remotes=self.webpackChunk_reltio_remotes||[]).push([[5609],{58991:(e,t,r)=>{"use strict";r.d(t,{ViP:()=>Is,PY2:()=>vn,Ng6:()=>He,YJ7:()=>fn,NlI:()=>an,Xt7:()=>We,wfT:()=>ri,EMD:()=>Yn,HAc:()=>Ye,PEf:()=>Rn,oA3:()=>Wn,$XE:()=>ut,eWf:()=>An,q7e:()=>Be,KVe:()=>ni,WVQ:()=>Fr,oZZ:()=>yi,bNA:()=>fi,Rjq:()=>Ti,G39:()=>Sn,X1H:()=>Tt,yn8:()=>at,N0y:()=>it,dZX:()=>ct,bQt:()=>mi,oS0:()=>mt,lL_:()=>pn,Nsj:()=>En,psV:()=>yn,xPW:()=>gn,pyR:()=>Jn,p8l:()=>qn,Wkf:()=>Ge,zHr:()=>Ve,NIO:()=>$e,$26:()=>AO,Esk:()=>xn,s9T:()=>rt,MEy:()=>du,j5E:()=>nn,vAw:()=>Gn,NMQ:()=>Vn,mNm:()=>Qn,rwv:()=>pi,s_5:()=>Xn,RgZ:()=>Hn,unl:()=>di,Qy0:()=>Ei,pYu:()=>Fn,wIJ:()=>QO,GFH:()=>Ke,S91:()=>wn,p3$:()=>vi,wSh:()=>Z,BDP:()=>Ui,pGS:()=>Kn,ARY:()=>ht,XGc:()=>ti,fO_:()=>Yr,wwy:()=>Ze,_XL:()=>Tn,j2V:()=>ii,dMV:()=>Zn,NBX:()=>Bg,OXy:()=>bt,BXd:()=>ot,CJB:()=>si,lXI:()=>yt,nqG:()=>bi,C68:()=>Pn,yxQ:()=>hi,Yj_:()=>et,D25:()=>Xe,ZIY:()=>pt,Tl4:()=>tv,lwr:()=>Nn,NkU:()=>ai,Rtp:()=>ei,YGx:()=>st,uTS:()=>zn,MCv:()=>qe,IYE:()=>Bn,PiC:()=>ci,h_m:()=>ft,tJI:()=>Qe,fDt:()=>Je,cNQ:()=>oi,SwE:()=>Mn,ZHR:()=>ui,lD1:()=>In,lVm:()=>lt,vnX:()=>Kb,$x5:()=>Jb,_R1:()=>Hb,wUm:()=>Qb,z7V:()=>Oi,dC6:()=>nt,MBD:()=>ze,GmF:()=>la,cKm:()=>dt,iP_:()=>_n,NVC:()=>tt,tPT:()=>nl,tZe:()=>kp,kRE:()=>xy,psB:()=>My,X0$:()=>rl,zE1:()=>dl,Wm5:()=>qs,vyX:()=>nc,wLZ:()=>il,W4V:()=>se,EtK:()=>bs,Wtd:()=>tl,asT:()=>i_,kGs:()=>ge,ewt:()=>hT,O_f:()=>au,sOy:()=>Wt,Tde:()=>Er,LMI:()=>$u,skb:()=>Yv,sPt:()=>Uu,sH1:()=>Cu,RPM:()=>dE,h27:()=>Ju,Uqd:()=>rc,xG:()=>ng,Z2f:()=>yb,fgW:()=>Av,I69:()=>Kv,ZxB:()=>Xv,mdt:()=>sE,Qbq:()=>Jh,rny:()=>Bi,UEY:()=>wa,Q0T:()=>Sa,Lyr:()=>ka,sBn:()=>Pa,itK:()=>_a,H9$:()=>Ra,KPc:()=>Na,zos:()=>Aa,ELQ:()=>Fa,dZs:()=>ya,Cz4:()=>da,z_L:()=>Da,fGe:()=>pa,iuF:()=>va,Wib:()=>ga,Hn0:()=>ja,obS:()=>xa,E$L:()=>fa,XUh:()=>Oa,Qp_:()=>ha,_jk:()=>Ta,sKE:()=>Ea,WmG:()=>ba,QKx:()=>Ca,Oik:()=>Ua,s0A:()=>ma,o9m:()=>Ia,MCd:()=>La,RsS:()=>Xu,tGK:()=>Dl,lIv:()=>yl,Vg3:()=>zi,mkC:()=>Mi,xv5:()=>ea,a14:()=>Vi,yv0:()=>Zi,Zm0:()=>$i,Nxd:()=>xi,$mM:()=>Xi,ifj:()=>Mr,NWi:()=>Cb,xr3:()=>Ub,wNf:()=>Yl,iJH:()=>Lb,d89:()=>ji,Edd:()=>ki,Z5t:()=>Fi,uGe:()=>Li,UoR:()=>Ci,xvW:()=>Ib,$qe:()=>wb,yPM:()=>ca,$cp:()=>pl,vKJ:()=>ul,VtG:()=>Uc,AID:()=>Lf,B1H:()=>Wg,b7X:()=>Hh,$uE:()=>_e,keo:()=>Kh,C_p:()=>KE,G27:()=>Km,JA0:()=>Py,b3T:()=>ve,oC6:()=>be,_Zs:()=>Oe,epC:()=>Ne,YYG:()=>Ae,f_2:()=>wy,w3l:()=>Ng,QHB:()=>Qm,Jso:()=>Cg,RXH:()=>Lm,Vr9:()=>nh,lMm:()=>Vh,BlA:()=>f_,fmQ:()=>ps,yRD:()=>fg,NcL:()=>tm,QK6:()=>de,ymd:()=>bp,JV_:()=>zy,XiW:()=>Xf,Yrx:()=>Ey,GPx:()=>el,gjI:()=>Zs,vlo:()=>kT,E_P:()=>rE,aAL:()=>op,NBq:()=>ds,wp9:()=>oE,DsR:()=>ep,MPc:()=>xf,gWE:()=>Mf,DT_:()=>$f,ipn:()=>Gf,ORg:()=>Si,_wz:()=>Vf,RYR:()=>yT,PP2:()=>by,wS7:()=>Ob,cBQ:()=>Mc,pBq:()=>hf,DsO:()=>ee,X78:()=>ef,xZs:()=>Qy,YFy:()=>hy,Gmt:()=>Wy,K$w:()=>Gy,DSj:()=>sp,k9j:()=>Vc,ww$:()=>al,WVU:()=>Vy,hxF:()=>Qs,nwO:()=>m_,Mzk:()=>Dc,aFF:()=>rb,HRH:()=>Tu,EZK:()=>Qp,Kxm:()=>Yp,Z9i:()=>IE,CrF:()=>Dy,DNd:()=>$a,vUy:()=>u_,lJh:()=>hu,zHo:()=>bu,sEJ:()=>Hg,UO$:()=>Af,zeJ:()=>gr,dLR:()=>_s,JQy:()=>Ss,XtP:()=>vs,Ug0:()=>en,A1W:()=>Qh,sw:()=>Hp,nv3:()=>Vb,JgD:()=>$b,nve:()=>Qg,SkP:()=>ws,SAs:()=>Of,PWK:()=>Mo,IM5:()=>gs,Mfk:()=>qh,mB6:()=>Eb,p6d:()=>w,o0x:()=>U,ufS:()=>ab,k7L:()=>ob,mrB:()=>I,ncP:()=>Ft,Zmi:()=>Ct,hm5:()=>Dt,ECL:()=>Gr,vPL:()=>Xp,qmL:()=>eE,hXd:()=>Hi,OCS:()=>Qi,p2l:()=>Cs,qF1:()=>Op,_X$:()=>vp,yj2:()=>YO,bzh:()=>cE,k66:()=>Ko,kiP:()=>co,pSg:()=>ce,kz_:()=>_y,H_U:()=>Xo,t9e:()=>Ha,j2$:()=>Fp,PFL:()=>ar,aJ3:()=>TO,To9:()=>mr,wpo:()=>md,ADq:()=>NE,UUb:()=>_E,tQX:()=>AE,xy8:()=>ur,EUG:()=>_r,AFK:()=>Kt,X3M:()=>vr,WN0:()=>Jo,kDl:()=>As,uDV:()=>ZT,IhQ:()=>Rs,R$r:()=>tE,w80:()=>Po,Pfu:()=>Ba,Gtj:()=>Rl,fyF:()=>Nl,kkq:()=>Qo,u5q:()=>xt,O$n:()=>Td,ptG:()=>Ed,f4_:()=>lm,uap:()=>sm,d7q:()=>Ty,liG:()=>Oy,$oF:()=>fy,avf:()=>RT,DiQ:()=>NT,cfX:()=>AT,vD3:()=>ST,Qrb:()=>_T,EJQ:()=>PT,HWy:()=>gT,gjS:()=>ET,y6v:()=>vT,JUW:()=>Iy,GtP:()=>hm,_kX:()=>Ga,u1e:()=>Wa,sJj:()=>Zh,CJp:()=>Em,uKF:()=>zh,wo0:()=>Fy,s5:()=>Go,cwx:()=>Vo,Y6b:()=>iy,TTx:()=>qy,UtR:()=>ay,HaQ:()=>Hy,E6I:()=>Ly,Won:()=>sy,vTU:()=>ry,Nsy:()=>ad,KMQ:()=>tb,Do$:()=>ud,CSV:()=>js,TMe:()=>oy,l1V:()=>vu,VQ1:()=>Nu,z7d:()=>FT,Xaq:()=>es,Sj8:()=>d_,PJj:()=>Ul,k3T:()=>rn,PjQ:()=>Ii,s7l:()=>Rc,GGR:()=>CT,j5q:()=>IT,DnY:()=>_c,RY5:()=>HT,Px$:()=>fT,KPC:()=>$g,NIY:()=>Cc,HvW:()=>Sc,Fof:()=>Qa,BTI:()=>pd,uie:()=>ed,ChB:()=>Kp,q27:()=>bd,fAQ:()=>af,XkT:()=>gc,lrH:()=>of,nt9:()=>Kr,XH8:()=>fd,XH2:()=>tn,jFi:()=>yd,qhs:()=>Ro,wwR:()=>cd,Uk3:()=>Jt,ev7:()=>Yg,RB9:()=>Ry,iFp:()=>fE,e$p:()=>EE,PcX:()=>mE,SpP:()=>TE,R6_:()=>mO,CY1:()=>NO,Ajk:()=>hc,Yiz:()=>mc,FK9:()=>pc,UOo:()=>sb,aTW:()=>By,uug:()=>Wl,P$2:()=>SO,XS2:()=>jl,Hyb:()=>tu,d3Y:()=>sc,Klp:()=>uc,WxZ:()=>wO,Gzu:()=>Ou,ZOr:()=>vc,uqV:()=>Zd,Pm4:()=>re,hWO:()=>qt,nVD:()=>KT,dED:()=>dy,P2h:()=>py,jrr:()=>oo,mmY:()=>lo,T6O:()=>zo,h6J:()=>Lp,hM2:()=>jg,XR6:()=>X,jmz:()=>zT,IHt:()=>XT,NZI:()=>wE,wdF:()=>rf,kgP:()=>nf,ZYI:()=>Tp,QXK:()=>vl,efz:()=>gl,Q5d:()=>Ol,Ysv:()=>_l,UWq:()=>$T,ocC:()=>MT,io3:()=>zr,Sbt:()=>wo,roS:()=>So,Ww1:()=>Io,QaS:()=>jc,ERZ:()=>_g,CL1:()=>kg,idV:()=>qp,nIW:()=>Bt,fjE:()=>hO,sG0:()=>lb,tV7:()=>Cl,g8o:()=>ZO,Qy:()=>zO,t2P:()=>fO,wId:()=>ho,LS0:()=>bo,bFH:()=>$d,Rgl:()=>Gd,fW1:()=>rm,Ywp:()=>qb,pg:()=>_d,WSA:()=>Wd,fed:()=>Lg,tT_:()=>Ps,KbL:()=>Nc,JBA:()=>Zt,aNC:()=>Mb,RFJ:()=>fp,Zeh:()=>_f,OT5:()=>Bb,mC3:()=>Tl,kR6:()=>y_,NVY:()=>iE,k6v:()=>gp,FEC:()=>_p,Ob5:()=>Od,KUV:()=>vd,dvH:()=>nE,V3i:()=>oh,VD3:()=>Zr,mm2:()=>Au,rou:()=>yf,izH:()=>Ya,DK$:()=>qa,KMp:()=>ap,c31:()=>gt,mbo:()=>PE,gT8:()=>Nt,CZ8:()=>us,uGi:()=>Ts,Poc:()=>Ot,_9k:()=>hs,ZTM:()=>ys,bwT:()=>Es,tzW:()=>Pt,tF$:()=>At,o96:()=>cs,M4S:()=>ms,_vs:()=>zc,xF8:()=>mT,HQx:()=>nb,ATu:()=>RE,j1S:()=>Ri,V3K:()=>Ai,Lmx:()=>Ni,ZaZ:()=>vt,n_1:()=>ty,N6e:()=>rp,SxO:()=>so,w3p:()=>aE,xU7:()=>pe,Y_p:()=>Lo,$k6:()=>Co,Gdl:()=>cb,U6P:()=>ub,OwB:()=>EO,hTh:()=>JT,xqc:()=>Wo,JvE:()=>Yo,i29:()=>Bu,dzT:()=>Wi,uPS:()=>xc,cZV:()=>Fc,n3B:()=>Uv,e6O:()=>Nv,s7j:()=>HO,j$Q:()=>Uy,kW2:()=>mm,tH7:()=>$o,Yxg:()=>$s,MaZ:()=>UT,nqN:()=>wT,jWj:()=>GT,o_J:()=>ts,hgZ:()=>Jp,yW4:()=>Dp,uT0:()=>Up,C82:()=>Cp,u9Z:()=>df,J$m:()=>ey,j_Q:()=>yc,OaI:()=>fc,wB1:()=>Gg,SP6:()=>gd,ZYr:()=>Mg,IMU:()=>yp,FoU:()=>Sy,DVz:()=>Tb,mxe:()=>wv,FHr:()=>vf,D1g:()=>ff,VO3:()=>eO,de5:()=>Zb,Uw1:()=>Te,J6q:()=>SE,XCe:()=>no,Ir:()=>fo,XQO:()=>To,QXb:()=>Ld,P8_:()=>Jy,iiD:()=>ip,MOC:()=>Dd,WF:()=>Cd,xE1:()=>wi,idW:()=>r_,QWZ:()=>ib,YL3:()=>Lc,Fn9:()=>T,j2U:()=>Us,MpE:()=>St,kQw:()=>sr,mfm:()=>ru,vZp:()=>Xt,E8K:()=>Xg,VSb:()=>ss,vr_:()=>or,Vmh:()=>l_,FgW:()=>ah,oDv:()=>ns,kuw:()=>as,eHk:()=>VT,Tt2:()=>rs,T6Y:()=>Cr,_26:()=>zl,YkM:()=>Tr,J6y:()=>xl,njU:()=>ql,TBP:()=>is,IT0:()=>UE,x_:()=>eb,biM:()=>sd,TMl:()=>ld,Vkd:()=>Kl,WiY:()=>gO,_zi:()=>Jl,J6D:()=>_u,Lt4:()=>Rr,QEi:()=>br,whI:()=>qr,KIu:()=>Qr,JhM:()=>oe,C_0:()=>jr,qIF:()=>Cv,O27:()=>E,aBi:()=>hd,xOX:()=>Bs,EdS:()=>Vt,WgC:()=>$t,eEv:()=>nr,A4t:()=>Hl,YOQ:()=>zt,Wos:()=>Ir,jWr:()=>Ma,Or$:()=>fr,lhE:()=>Xr,CwH:()=>hr,pzC:()=>Gs,ymH:()=>Bl,QZu:()=>dr,rYH:()=>vO,FVt:()=>wr,Kn2:()=>ue,jgw:()=>nu,OXP:()=>os,lS4:()=>Or,g5f:()=>_O,fp6:()=>Vl,Uty:()=>na,YkG:()=>yr,xdS:()=>Rt,kMF:()=>Wf,$NE:()=>Gt,bC9:()=>Mt,Ian:()=>Pi,KVV:()=>Xh,q9e:()=>Uo,iIf:()=>pb,ian:()=>Ks,m6e:()=>kr,OFd:()=>Ws,kqr:()=>lr,fnZ:()=>Br,VFZ:()=>Js,ZiX:()=>jt,j5n:()=>Pr,zkt:()=>_,Pcm:()=>Vg,QDV:()=>Vs,M5u:()=>OO,laD:()=>Iv,mtq:()=>rr,CtB:()=>db,CBv:()=>ae,I0t:()=>Dr,u1G:()=>jT,gk1:()=>Pv,Bgb:()=>Rv,uzs:()=>Hr,v0l:()=>Su,Zqp:()=>ly,j0k:()=>xo,tCm:()=>Qt,gmx:()=>kl,mOr:()=>yu,TwZ:()=>ev,GyU:()=>Gb,zGm:()=>Rd,bMg:()=>Hd,EyD:()=>Pb,FQA:()=>Sb,fZN:()=>Jd,xsF:()=>Nb,Lxg:()=>Rb,O3l:()=>Wc,Wni:()=>Gc,wRx:()=>jb,OxG:()=>Fd,uJQ:()=>kd,qWg:()=>fb,i96:()=>Ad,zhn:()=>Db,G8q:()=>gi,Jct:()=>lT,A9Y:()=>te,Y5F:()=>Tg,gxP:()=>le,c$P:()=>Fl,M7o:()=>tc,BBN:()=>ao,ZBU:()=>J,UkJ:()=>Oo,xkv:()=>Ky,z$M:()=>n_,KAm:()=>Ny,lCl:()=>Df,rkF:()=>JE,IU6:()=>Gp,RGr:()=>h,aYu:()=>m,ije:()=>Il,Buf:()=>np,YLu:()=>wl,ct9:()=>jo,XkY:()=>Qd,T5R:()=>Pd,uQS:()=>Xd,wcJ:()=>Do,d$I:()=>ol,rSp:()=>od,Sx:()=>Ic,Ilm:()=>fl,Ki6:()=>Hs,VGk:()=>Zc,sFD:()=>Dm,eWN:()=>a_,dWE:()=>qO,Lkd:()=>zf,aDL:()=>Nf,yaA:()=>zd,lOh:()=>Ef,DBr:()=>pO,hK$:()=>Ll,TZ_:()=>Vp,CMB:()=>Lv,FU8:()=>wc,J$p:()=>wf,b5s:()=>Sf,h2W:()=>Ht,SL_:()=>uf,oUH:()=>Sp,ck9:()=>Sd,k$p:()=>km,Xs0:()=>Sl,u7I:()=>Tf,rxg:()=>su,bji:()=>lu,oCZ:()=>BE,MjG:()=>zb,FuV:()=>Pp,$ju:()=>Ip,t6d:()=>wp,m5F:()=>fe,sx:()=>o_,rSc:()=>mb,U10:()=>Tc,L8n:()=>$y,R9X:()=>ny,rj2:()=>Zy,_C4:()=>xp,tCj:()=>Xy,uAg:()=>my,wx9:()=>bT,KF3:()=>Mp,ax9:()=>$p,HH7:()=>tp,_6y:()=>$c,AJo:()=>kc,Ixr:()=>Cy,P6Y:()=>h_,Bd_:()=>VE,xkB:()=>$E,W41:()=>pf,WkI:()=>cf,sSE:()=>ME,GMd:()=>Vu,Bxm:()=>WE,FVh:()=>DE,U_T:()=>Yd,FTe:()=>ie,VGB:()=>ne,Wfe:()=>mu,Ls5:()=>Eu,$bd:()=>cu});var n={};r.r(n),r.d(n,{normalize:()=>u,removeLineBreaks:()=>d,search:()=>c,sort:()=>p});var i={};r.r(i),r.d(i,{clearDateTime:()=>g,formatDate:()=>w,formatDateTime:()=>U,formatTime:()=>I,getEndOfDay:()=>S,getMomentFormatFromDateMask:()=>q,getMomentFormatFromDateTimeMask:()=>K,getMomentFormatFromTimeMask:()=>Q,getStartOfDay:()=>P,isToday:()=>_,isValidMomentDate:()=>b,isValidMomentDateOrNull:()=>O,momentToDate:()=>v,parseTimestamp:()=>J,toLocalDate:()=>A,toUtcDate:()=>N});var a={};r.r(a),r.d(a,{applyCrosswalks:()=>ge,collectCrosswalksFromAttributes:()=>_e,compareActivenessAttributes:()=>ve,compareAttributes:()=>be,compareImages:()=>Oe,compareRoles:()=>Ne,compareTags:()=>Ae});var o={};r.r(o),r.d(o,{addAttribute:()=>Se,editAttribute:()=>we,editEndDate:()=>je,editRoles:()=>Ce,editStartDate:()=>De,editTags:()=>Le,removeAttribute:()=>Ue});var s={};r.r(s),r.d(s,{createHistoryManager:()=>xe});var l=r(17440);const u=e=>"string"==typeof e&&"function"==typeof e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,c=(e,t)=>(t=(u(t)||"").toLowerCase(),(e=(u(e)||"").toLowerCase()).includes(t)),p=(0,l.curry)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n="asc"===e.toLowerCase();return t=t.toLowerCase(),r=r.toLowerCase(),t<r?n?-1:1:t>r?n?1:-1:0})),d=(0,l.replace)(/(\r\n|\n|\r)/gm,"");var y=r(95038),f=r.n(y);const T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{startDate:t,endDate:r}=e,n=Date.now();return!(r&&r<n||t&&t>n)},E=(0,l.anyPass)([l.isEmpty,l.isNil]),m=e=>()=>new Promise(e),h=e=>Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e}))).catch((e=>({status:"rejected",reason:e})))))),b=e=>e&&e.isValid(),O=(0,l.either)(b,l.isNil),v=e=>e&&e.toDate(),g=e=>(e&&e.setHours(0,0,0,0),e),_=e=>f()(e).isSame(Date.now(),"day"),A=e=>{const t=new Date(e);return new Date(t.getTime()+60*t.getTimezoneOffset()*1e3)},N=e=>{const t=new Date(e);return new Date(t.getTime()-60*t.getTimezoneOffset()*1e3)},R=e=>(t,r)=>(r?f().utc(t):f()(t))[e]("day").valueOf(),P=R("startOf"),S=R("endOf"),w=e=>f()(e).format(f().localeData().longDateFormat("L")),I=e=>f()(e).format(f().localeData().longDateFormat("LTS")),U=e=>`${w(e)} ${I(e)}`,C=(0,l.equals)("9"),L=(0,l.equals)("99"),D=(0,l.equals)("9999"),j=(0,l.test)(/^[az][az][az]$/),k=(0,l.test)(/^[az][az][az][az]$/),F=(0,l.test)(/^9+$/),x=(0,l.test)(/^[9az]+$/),M=(0,l.cond)([[C,(0,l.always)("M")],[L,(0,l.always)("MM")],[j,(0,l.always)("MMM")],[k,(0,l.always)("MMMM")],[x,(0,l.always)("Mo")],[l.T,(0,l.always)("MM")]]),$=(0,l.cond)([[C,(0,l.always)("D")],[L,(0,l.always)("DD")],[x,(0,l.always)("Do")],[l.T,(0,l.always)("DD")]]),V=(0,l.cond)([[C,(0,l.always)("y")],[L,(0,l.always)("YY")],[D,(0,l.always)("YYYY")],[F,(0,l.always)("YYYYYY")],[l.T,(0,l.always)("YYYY")]]),G=(e,t)=>(0,l.cond)([[(0,l.both)((0,l.always)(t),C),(0,l.always)("h")],[(0,l.both)((0,l.always)(t),L),(0,l.always)("hh")],[C,(0,l.always)("H")],[L,(0,l.always)("HH")],[l.T,(0,l.always)(t?"hh":"HH")]])(e),W=(0,l.cond)([[C,(0,l.always)("m")],[L,(0,l.always)("mm")],[l.T,(0,l.always)("mm")]]),Y=(0,l.cond)([[C,(0,l.always)("s")],[L,(0,l.always)("ss")],[l.T,(0,l.always)("ss")]]),B=/([9az]+)([^9az]+)*/g,q=e=>{const t=[...e.toLowerCase().matchAll(B)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t);return(0,l.join)("",[M(e),r,$(n),i,V(a),o])}return e},H=/(9+)([^9]+)*/g,Q=e=>{const t=[...e.toLowerCase().matchAll(H)];if(E(e)||t.length>0){const[,e="",r=""]=(0,l.propOr)([],0,t),[,n="",i=""]=(0,l.propOr)([],1,t),[,a="",o=""]=(0,l.propOr)([],2,t),s=(0,l.pipe)(l.last,(0,l.propOr)("",2),(0,l.test)(/^[^9]+$/))(t),u=(0,l.reject)(l.isEmpty,[G(e,s),r,W(n),i,a?Y(a):"",o]),c=s?" A":"",p=(0,l.pipe)(l.init,(0,l.append)(c));return(0,l.pipe)((0,l.when)((0,l.always)(s),p),(0,l.join)(""))(u)}return e},K=e=>{const[t="",r=""]=(0,l.pipe)((0,l.indexOf)(" "),l.inc,(0,l.splitAt)(l.__,e),(0,l.map)(l.trim))(e);return`${q(t)} ${Q(r)}`},J=e=>{const t=Number(e);return Number.isNaN(t)?e:t},X=e=>e&&0!=e.length?e.split("").map((e=>e.charCodeAt())).reduce(((e,t)=>0|(e=(e<<5)-e+t)),0)+"":"0",z=e=>({isNone:()=>(0,l.isNil)(e),extract:()=>e,orSome:t=>(0,l.isNil)(e)?t:e,map:t=>(0,l.isNil)(e)?Z.None():Z.Some(t(e))}),Z={Some:z,None:()=>z(null),chain:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>t.reduce(((e,t)=>e.map(t)),e)},fromFalsy:function(e){return e?Z.Some(e):Z.None()},fromNull:function(e){return null==e?Z.None():Z.Some(e)},fromUndefined:function(e){return void 0===e?Z.None():Z.Some(e)},fromEmpty:function(e){return E(e)?Z.None():Z.Some(e)}},ee=(e,t)=>{let r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];const o=()=>{e.apply(this,i),r=null};r&&clearTimeout(r),r=setTimeout(o,t)}},te=(e,t)=>(r,n)=>{const i=t?(0,l.prop)(t):l.identity;return e.indexOf(i(r))-e.indexOf(i(n))},re=(0,l.when)((0,l.is)(Array),(0,l.prop)(0)),ne=e=>Array.isArray(e)?e:[e],ie=e=>[e],ae=e=>!!e&&["www.","http://","https://","ftp://","ftps://","smb://","data:"].some((t=>String(e).toLowerCase().startsWith(t))),oe=e=>/^\S+@\S+\.\S+$/.test(String(e).toLowerCase()),se=e=>(e=(e||"").toLowerCase(),oe(e)?`mailto:${e}`:!e.includes("://")&&(e.startsWith("www.")||e.split(".").length>2)?`http://${e}`:e),le=(0,l.when)((0,l.is)(String),(e=>""===e?void 0:"true"===e.toLowerCase())),ue=e=>null!=e&&["object","function"].includes(typeof e),ce=function(e){const t=[],r=(e,n)=>{n=n||[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Array.isArray(e)&&(i=parseInt(i,10)),ue(e[i])?r(e[i],n.concat(i)):t.push(n.concat(i)))};return r(e),t},pe=(e,t,r)=>{const n=[r,"errorDetailMessage","errorMessage","error"];return(0,l.cond)([...n.map((e=>[(0,l.prop)(e),(0,l.prop)(e)])),[(0,l.always)(t),(0,l.always)(t)],[l.T,(0,l.always)(e)]])(e)},de=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(0,l.sum)(e);if(0===r)return[];const n=e=>+e.toFixed(t),i=e.map(((e,t)=>{const i=e/r*100,a=n(i);return{index:t,percent:a,diff:a-i}})),a=i.reduce(((e,t)=>{let{percent:r}=t;return e+r}),0);let o=n(100-a);if(0===o)return(0,l.pluck)("percent",i);const s=Math.sign(o),u=i.sort(((e,t)=>(e.diff-t.diff)*s||e.index-t.index)),c=(0===t?1:1/Math.pow(10,t))*s;for(let e=0;0!==o&&e<u.length;e++)u[e].percent=n(u[e].percent+c),o=n(o-c);return(0,l.pipe)((0,l.sortBy)((0,l.prop)("index")),(0,l.pluck)("percent"))(u)},ye=/[\n\r%#()<>?[\\\]^`{}|]/g,fe=e=>`data:image/svg+xml;utf8,${e.replace(/["']\);{0,}$/,"").replace(/'/g,'"').replace(/>\s{1,}</g,"><").replace(/\s{2,}/g," ").replace(ye,encodeURIComponent)}`,Te=e=>`data:image/gif;base64,${e}`;function Ee(e){return e&&void 0!==e.uri}function me(e){return function(t,r){var n,i,a=[];return i=r,!(n=t)&&!i||!(!n||!i)&&n.length===i.length&&n.every((function(e,t){return e===i[t]}))||a.push({type:e,newValue:r}),a}}function he(e,t){function r(r){if(e[r]&&t[r])if(Array.isArray(e[r])&&Array.isArray(t[r])){if(e[r].length!==t[r].length)return!1;if(e[r][0]&&t[r][0]&&e[r][0].objectURI!==t[r][0].objectURI)return!1}else if(e[r].objectURI!==t[r].objectURI)return!1;return!0}return r("refEntity")&&r("refRelation")}function be(e,t,r){var n,i,a,o=[];for(var s in e)if(e.hasOwnProperty(s)){if("paging"===s)continue;var u=e[s];if(void 0===t[s])for(var c in u)u.hasOwnProperty(c)&&o.push.apply(o,m(u[c]));else for(var p in u)if(u.hasOwnProperty(p)){var d=u[p],y=_(d,t[s]);void 0===y?o.push.apply(o,m(d)):d.value===y.value||d.lookupCode&&d.lookupCode===y.lookupCode?d.ignored!==y.ignored&&o.push.apply(o,b(y)):null==y.value||""===y.value?o.push.apply(o,m(d)):"Nested"===g(d)?d.ignored!==y.ignored&&(0,l.equals)(d.value,y.value)?o.push.apply(o,b(y)):o=o.concat(be(d.value,y.value,r)):"Reference"===g(d)?he(d,y)?o.push.apply(o,be(d.value,y.value,r)):(o.push.apply(o,m(d)),o.push(O([y]))):""!==y.value&&(!1===y.ov?o.push.apply(o,(void 0,void 0,i=(n=y).uri.lastIndexOf("/"),a=n.uri.substr(0,i),[{type:"_UPDATE_NON_OV_ATTRIBUTE",uri:n.uri,typeUri:a,value:n.lookupCode||n.value}])):o.push.apply(o,h(y)))}}for(var f in t)if(t.hasOwnProperty(f)){if("paging"===f)continue;var T=(t[f]||[]).filter((function(t){return void 0===_(t,e[f])}));(T=E((0,l.clone)(T))).length&&o.push(O(T))}return o;function E(e){return e?e.map((function(e){var t;if(e){var r=e.value;return null!=r&&(ue(r)?Object.keys(r).forEach((function(e){var n=E(r[e]);n.length>0?r[e]=n:delete r[e],t||(t=0!==n.length)})):t=null!=r&&""!==r),t||e.refEntity?e:null}})).filter((function(e){return null!=e})):[]}function m(e){return[{type:"DELETE_ATTRIBUTE",uri:e.uri}]}function h(e){return[{type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:{value:e.lookupCode||e.value}}]}function b(e){return e&&(e.ignored?function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}]}(e):function(e){return[{type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!1}}]}(e))}function O(e){var t=e[0].uri,n=t.lastIndexOf("/"),i={type:"INSERT_ATTRIBUTE",uri:t=t.substr(0,n),newValue:e.map((function(e){var t,n={value:JSON.parse(JSON.stringify(e.lookupCode||e.value))};return r&&(n.uri=e.uri),v(n.value),e.refEntity&&(t=e.refEntity,Array.isArray(t)&&(t=t[0]),n.refEntity=t),e.refRelation&&(t=e.refRelation,Array.isArray(t)&&(t=t[0]),r||delete t.objectURI,n.refRelation=t),n}))};return i}function v(e){if(null!==e&&"[object Object]"===e.toString())for(var t in e)e.hasOwnProperty(t)&&"paging"!==t&&e[t].forEach((function(e){delete e.crosswalks,delete e.type,r||delete e.uri,v(e.value)}))}function g(e){var t=e.value;if(ue(t))return e.hasOwnProperty("refEntity")?"Reference":"Nested"}function _(e,t){if(void 0!==t)return t.filter((function(t){return t.uri===e.uri}))[0]}}function Oe(e,t){var r,n,i=[];return e.defaultProfilePic!==t.defaultProfilePic?i.push({type:"UPDATE_PROFILE_PIC_BY_URI",newValue:{value:t.defaultProfilePic}}):(r=e.defaultProfilePicValue)===(n=t.defaultProfilePicValue)||Ee(r)&&Ee(n)&&r.uri===n.uri||i.push({type:"UPDATE_PROFILE_PIC_BY_URL",newValue:{value:t.defaultProfilePicValue}}),i}function ve(e,t){var r=[],n=a(e.startDate,t.startDate);void 0!==n&&r.push({type:"UPDATE_START_DATE",newValue:{value:n}});var i=a(e.endDate,t.endDate);return void 0!==i&&r.push({type:"UPDATE_END_DATE",newValue:{value:i}}),r;function a(e,t){var r;return e!=t&&(r=(0,l.isNil)(t)?"":t+""),r}}function ge(e,t){var r="configuration/sources/Reltio";function n(e,t){return e.crosswalk={type:t.type,value:t.value},e}function i(e){return e.removeIt=!0}var a=e.map((function(e){if(e.crosswalk)return[e];var i=t.filter((function(t){return 1===(t.attributes||t.attributeURIs||[]).filter((function(t){return t===e.uri})).length})),a=i.filter((function(e){return e.type===r})),o=i.filter((function(e){return e.type!==r})),s=[];switch(e.type){case"INSERT_ATTRIBUTE":s.push(e);break;case"_UPDATE_NON_OV_ATTRIBUTE":s=s.concat(i.map((function(t){return n(e,t)})));break;case"DELETE_ATTRIBUTE":(o.length||0==a.length)&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}}),s=s.concat(a.map((function(t){return n({type:"DELETE_ATTRIBUTE",uri:e.uri},t)})));break;case"UPDATE_ATTRIBUTE":a.length?s=s.concat(a.map((function(t){return n({type:"UPDATE_ATTRIBUTE",uri:e.uri,newValue:e.newValue},t)}))):s.push({type:"INSERT_ATTRIBUTE",uri:e.uri.substr(0,e.uri.lastIndexOf("/")),newValue:[e.newValue],insteadOfUpdate:!0}),o.length&&s.push({type:"IGNORE_ATTRIBUTE",uri:e.uri,newValue:{value:!0}})}return s})),o=[].concat.apply([],a),s=function(e,t){return e.reduce((function(e,r){return(e[r[t]]=e[r[t]]||[]).push(r),e}),{})}(o,"typeUri");for(var l in s)if("undefined"!==l){var u=s[l],c=o.filter((function(e){return"_UPDATE_NON_OV_ATTRIBUTE"!==e.type})).filter((function(e){return e.uri.substr(0,e.uri.lastIndexOf("/"))===l||"INSERT_ATTRIBUTE"===e.type&&e.uri===l})),p=u.filter((function(e){return e.crosswalk&&e.crosswalk.type===r}))[0];!c.filter((function(e){return"UPDATE_ATTRIBUTE"===e.type}))[0]&&p&&(o.push({type:"UPDATE_ATTRIBUTE",uri:p.uri,newValue:{value:p.value},crosswalk:p.crosswalk}),c.forEach(i)),u.forEach(i)}return(o=o.filter((function(e){return!e.removeIt}))).forEach((function(e){delete e.insteadOfUpdate})),o}function _e(e,t){for(var r in t=t||[],e)if(e.hasOwnProperty(r))for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if(a.refRelation){var o=a.refRelation[0]||a.refRelation;if(o.crosswalks)for(var s=o.crosswalks.filter((function(e){return e.attributes||e.attributeURIs})),l=0;l<s.length;l++){for(var u=!0,c=0;c<t.length;c++)if(t[c].type===s[l].type&&t[c].value===s[l].value){t[c].attributes=t[c].attributes||t[c].attributeURIs,t[c].attributes=t[c].attributes.concat(s[l].attributes||s[l].attributeURIs),t[c].attributes=Object.keys(t[c].attributes.reduce((function(e,t){return e[t]=!0,e}),{})),delete t[c].attributeURIs,u=!1;break}u&&t.push(s[l])}}}return t}function Ae(e,t){return me("UPDATE_TAGS").call(this,e,t)}function Ne(e,t){return me("UPDATE_ROLES").call(this,e,t)}function Re(e,t,r,n){var i={name:e,valueUri:r.substr(0,r.indexOf(t)+t.length)};return n&&n.uri&&(i.uri=n.uri.substr(0,n.uri.indexOf(e)+e.length)),i.hasChildren=i.valueUri!==r,i}function Pe(e,t){for(var r=e.substr(e.indexOf("/attributes/")+12).split("/"),n=[],i=0;i<r.length;i+=2)n.push(Re(r[i],r[i+1],e,t));return n}function Se(e,t,r,n,i,a,o){void 0===a&&(a=0);var s=Pe(r,t)[a];if(s.hasChildren){e[s.name]||(e[s.name]=[{uri:s.valueUri,value:{},type:s.uri}]);var l=e[s.name].filter((function(e){return e.uri===s.valueUri}))[0];return Se(l.value,t,r,n,i,a+1,o)}var u=e[t.name];if(u||(u=e[t.name]=[]),null!=n){var c={value:n.refEntity?n.value:n,uri:r,type:t.uri};return n.lookupCode&&(c.value=n.value,c.lookupCode=n.lookupCode),n.refEntity&&(c.refEntity=n.refEntity,c.label=n.label),n.refRelation&&(c.refRelation=n.refRelation),i&&(c.crosswalks=i),u.splice(o||0,0,c),n}}function we(e,t,r,n,i,a){void 0===a&&(a=0);var o=Pe(r,t)[a];if(!o.hasChildren){var s,l=e[t.name],u=l&&l.filter((function(e){return e.uri===r}))[0];return u?("[object Object]"!==u.value.toString()?(Ie(n,u),i&&(u.crosswalks=i),t.cardinality&&1===t.cardinality.minValue&&1===t.cardinality.maxValue&&l.filter((function(e){return!1===e.ov})).forEach(Ie.bind(null,n))):n.refEntity?(u.refRelation=n.refRelation,u.refEntity=n.refEntity,u.value=n.value,u.label=n.label):null!==n.value&&void 0!==n.value&&null!==u.value&&"object"==typeof u.value&&(u.value=n.value,u.label=n.label),s=u.value):s=Se(e,t,r,n,i,a),s}var c=we(e,o,o.valueUri,{},i,a);we(c,t,r,n,i,a+1)}function Ie(e,t){ue(e)?(t.value=e.value,t.lookupCode=e.lookupCode):(t.value=e,t.lookupCode&&(t.lookupCode=e))}function Ue(e,t,r,n){void 0===n&&(n=0);var i=Pe(r)[n];if(i.hasChildren){var a=(e[i.name]||[]).filter((function(e){return e.uri===i.valueUri}))[0];a&&Ue(a.value,t,r,n+1)}else{var o=e[t.name];o&&(o.forEach((function(e,t){e.uri===r&&o.splice(t,1)})),0===o.length&&delete e[t.name])}}function Ce(e,t){e.roles=t||[]}function Le(e,t){e.tags=t||[]}function De(e,t){e.startDate=t||""}function je(e,t){e.endDate=t||""}function ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Fe(e,t,r[t])}))}return e}function Fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xe=function(e){var t=function(e,r,n,i){if(e&&r)if(n||(n=null),i=!!i,Array.isArray(e))for(var a=0;a<e.length;a++)r.call(n,a,e[a],e),i&&t(e[a],r,n,i);else if(ue(e))for(var o in e)r.call(n,o,e[o],e),i&&t(e[o],r,n,i)},r=function(e,t,r){return function(n){var i=-1!==n.uri.lastIndexOf("/")?n.uri.substring(0,n.uri.lastIndexOf("/")):"";e[i]||(e[i]=[]),e[i].push(n.type),t[n.uri]=n.type,"IGNORE_ATTRIBUTE"===n.type&&r.push(n.uri)}},n=function(e,t,r){var n=[],i=Object.keys(e).filter((function(t){return-1!==e[t].indexOf("IGNORE_ATTRIBUTE")&&-1!==e[t].indexOf("INSERT_ATTRIBUTE")}));return Object.keys(t).filter((function(e){var t=-1!==e.lastIndexOf("/")?e.substring(0,e.lastIndexOf("/")):null;return-1!==i.indexOf(t)})).forEach((function(e){-1!==r.indexOf(e)&&n.push(e),t[e]="UPDATE_ATTRIBUTE"})),{appearance:t,ignored:n}},i=function(e,t){var r=Array.isArray(t),n=r?[]:{};return r?(e=e||[]).some((function(e){return e.uri}))?n=function(e,t){var r=e.map((function(e){return e.uri})),n=e.map((function(e){var r,n,a=(n=t.filter((function(t){return t.uri===e.uri}))[0]||{},(r=e)&&n&&r.ignored!==n.ignored&&(delete r.ignored,delete n.ignored,r.ov=!0,n.ov=!0),{a:r,b:n});return i(a.a,a.b)})),a=t.filter((function(e){return-1===r.indexOf(e.uri)}));return n.concat(a)}(e,t):(n=n.concat(e),t.forEach((function(t,r){void 0===n[r]?n[r]=t:ue(t)?n[r]=i(e[r],t):-1===e.indexOf(t)&&n.push(t)}))):(ue(e)&&Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(r){ue(t[r])&&e[r]?n[r]=i(e[r],t[r]):n[r]=t[r]}))),n},a=function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var s=JSON.parse(JSON.stringify(a)),l=JSON.parse(JSON.stringify(o)),u=i(a,o),c={},p={},d=[],y=r(p,c,d);e.compareAttributes(u,l).map((function(e){return"IGNORE_ATTRIBUTE"===e.type&&!1===e.newValue.value&&(e.type="UNDO_IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)})),e.compareAttributes(u,s).map((function(e){return"DELETE_ATTRIBUTE"===e.type&&(e.type="INSERT_ATTRIBUTE"),"IGNORE_ATTRIBUTE"===e.type&&(e.type=e.newValue.value?"UNDO_IGNORE_ATTRIBUTE":"IGNORE_ATTRIBUTE"),e})).forEach((function(e){y(e)}));var f=n(p,c,d);return t(u,(function(e,t){t&&-1!==this.indexOf(t.uri)&&(t.ignored=!0,delete t.ov,t.hidden=!0)}),f.ignored,!0),{attributes:u,appearance:f.appearance}};const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=(0,l.difference)(t,e),n=(0,l.difference)(e,t),i=n.concat(t),a=(e,t)=>(0,l.pipe)((0,l.map)((t=>[t,e])),l.fromPairs)(t),o=ke({},a("INSERT_ATTRIBUTE",r),a("DELETE_ATTRIBUTE",n));return[i,o]};return{computeHistoryDiff:a,computeEntityHistoryDiff:(e,t)=>{const{attributes:r,appearance:n}=e?a(e.attributes,t.attributes):{attributes:t.attributes,appearance:{}},[i,s]=o(e?e.roles:[],t.roles),[l,u]=o(e?e.tags:[],t.tags);return{attributes:r,appearance:ke({},n,{roles:s,tags:u}),roles:i,tags:l}}}},Me=r(76665);let $e,Ve,Ge,We,Ye,Be,qe,He,Qe,Ke,Je,Xe,ze,Ze,et,tt,rt,nt,it,at,ot,st,lt,ut,ct,pt,dt,yt,ft,Tt;var Et;!function(e){e.missed="missed",e.missedRefEntity="missedRefEntity",e.invalid="invalid"}($e||($e={})),function(e){e.local="local",e.validationService="validationService"}(Ve||(Ve={})),function(e){e.ERROR="ERROR",e.WARNING="WARNING"}(Ge||(Ge={})),function(e){e[e.OBJECT_NOT_FOUND=101]="OBJECT_NOT_FOUND",e[e.CROSSWALK_NOT_FOUND=102]="CROSSWALK_NOT_FOUND",e[e.TENANT_NOT_CONFIGURED=127]="TENANT_NOT_CONFIGURED",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.DVF_NOT_CONFIGURED=902]="DVF_NOT_CONFIGURED",e[e.DCR_ALREADY_EXISTS=10015]="DCR_ALREADY_EXISTS",e[e.WORKFLOW_IS_NOT_REGISTERED_ERROR=10061]="WORKFLOW_IS_NOT_REGISTERED_ERROR"}(We||(We={})),function(e){e.attributeValue="attributeValue",e.tempEntity="tempEntity",e.relationConnection="relationConnection"}(Ye||(Ye={})),function(e){e.ENTITY_ATTRIBUTE="entityAttribute",e.ENTITY="entity",e.RELATION="relation",e.POTENTIAL_MATCH="potentialMatch",e.RELATION_ATTRIBUTE="relationAttribute"}(Be||(Be={})),function(e){e.directed="directed",e.undirected="undirected",e.bidirectional="bidirectional"}(qe||(qe={})),function(e){e.ACTIVE_ONLY="active",e.INACTIVE_ONLY="not_active",e.ALL="all"}(He||(He={})),function(e){e.or="or",e.orNot="or not",e.and="and",e.andNot="and not"}(Qe||(Qe={})),function(e){e.geoPolygon="geoPolygon",e.geoLocation="geoLocation",e.onMapMove="onMapMove"}(Ke||(Ke={})),function(e){e.TABLE="table",e.List="list",e.MAP="map"}(Je||(Je={})),function(e){e.PROFILE="profile",e.MAP="map"}(Xe||(Xe={})),function(e){e.Unmerge="unmerge",e.TreeUnmerge="treeUnmerge"}(ze||(ze={})),function(e){e.editing="editing",e.addingParent="addingParent",e.addingChild="addingChild"}(Ze||(Ze={})),function(e){e.potentialMatchReview="potentialMatchReview",e.dataChangeRequestReview="dataChangeRequestReview",e.recommendForDelete="recommendForDelete"}(et||(et={})),function(e){e[e.low=1]="low",e[e.medium=50]="medium",e[e.high=100]="high",e[e.urgent=1e3]="urgent"}(tt||(tt={})),function(e){e.EXISTS="exists",e.MISSING="missing"}(rt||(rt={})),function(e){e.UNIQUE="unique",e.NOT_UNIQUE="notUnique"}(nt||(nt={})),function(e){e.FILL_RATE="fillRate",e.LENGTH_STATISTIC="lengthStatistics",e.VALUE_DISTRIBUTION="valueDistribution",e.CROSSWALK_ANALYSIS="crosswalkAnalysis",e.DATA_VALIDATION="dataValidationFunctions",e.FREQUENCY="frequency",e.UNIQUENESS="uniqueness",e.PATTERN="pattern",e.CONSOLIDATION_RATE="consolidationRate"}(it||(it={})),function(e){e.ENTITY_TYPE="entityLevel",e.ATTRIBUTE_TYPE="attributeLevel"}(at||(at={})),function(e){e.DELETE_RELATION="DELETE_RELATION",e.CREATE_RELATION="CREATE_RELATION",e.UPDATE_RELATION="UPDATE_RELATION",e.REPOINT_RELATION="REPOINT_RELATION",e.IGNORE_RELATION="IGNORE_RELATION"}(ot||(ot={})),function(e){e.IN="in",e.OUT="out"}(st||(st={})),function(e){e.ACTIVE="ACTIVE",e.INACTIVE="INACTIVE"}(lt||(lt={})),function(e){e.BAR="bar",e.DONUT="donut",e.PIE="pie",e.TREE="tree",e.TABLE="table",e.BUBBLE="bubble",e.LINE="line",e.MAP="map",e.CLOUD="cloud"}(ut||(ut={})),function(e){e.ActivitiesViewFacet="ActivitiesViewFacet",e.CustomActionViewFacet="CustomActionViewFacet",e.DashboardFacet="DashboardFacet",e.EntitiesByTypeViewFacet="EntitiesByTypeViewFacet",e.FilteredSavedSearchesFacet="FilteredSavedSearchesFacet",e.FilteredEntitiesViewFacet="FilteredEntitiesViewFacet",e.NotificationInboxFacet="NotificationInboxFacet",e.ProfileStatsFacet="ProfileStatsFacet"}(ct||(ct={})),function(e){e.Attributes="com.reltio.plugins.entity.attributes.AttributesView",e.HierarchyTree="com.reltio.plugins.react.ReactHierarchyTreeView",e.HierarchyPaths="com.reltio.plugins.entity.HierarchyPathsView",e.RelationsTable="com.reltio.plugins.react.ReactRelationshipTableView",e.Relations="com.reltio.plugins.entity.relations.RelationsView",e.SingleAttributeView="com.reltio.plugins.entity.attributes.SingleAttributeView",e.TableAttributeView="com.reltio.plugins.entity.attributes.AttributeTableView",e.CustomView="com.reltio.plugins.ui.CustomActionView",e.MapView="com.reltio.plugins.react.EntityMapView",e.ImageAttributeView="com.reltio.plugins.entity.attributes.ImageAttributeView",e.PotentialMatchesView="com.reltio.plugins.entity.PotentialMatchesView"}(pt||(pt={})),function(e){e.preserveURIs="preserveURIs",e.updateAttributeUpdateDates="updateAttributeUpdateDates",e.validateDataPermissions="validateDataPermissions"}(dt||(dt={})),function(e){e.DQDashboard="DQDashboardView",e.Dashboard="DashboardView",e.RelationshipSearch="RelationshipSearch",e.ProfileActivityLog="ProfileActivityLogView",e.Interactions="InteractionsView",e.Graph="GraphView",e.Relationships="RelationshipsView",e.PotentialMatches="PotentialMatchesView",e.Sources="SourcesView",e.Profile="ProfileView",e.Search="SearchView"}(yt||(yt={})),function(e){e.CustomAction="CustomAction",e.ConsoleAppAction="ConsoleAppAction"}(ft||(ft={})),function(e){e.NEW="new",e.CLASSIC="classic"}(Tt||(Tt={})),function(e){e.TYPE_STRING="String",e.TYPE_TEXT="Text",e.TYPE_PASSWORD="Password",e.TYPE_LONG="Long",e.TYPE_INT="Int",e.TYPE_DOLLAR="Dollar",e.TYPE_FLOAT="Float",e.TYPE_DOUBLE="Double",e.TYPE_NUMBER="Number",e.TYPE_BOOLEAN="Boolean",e.TYPE_BOOLEAN_RADIO="Boolean_Radio",e.TYPE_DATE="Date",e.TYPE_TIMESTAMP="Timestamp",e.TYPE_ACTIVENESS_DATE="ActivenessDate",e.TYPE_LOCAL_DATE="LocalDate",e.TYPE_BLOB="Blob",e.TYPE_ENUM="Enum",e.TYPE_CIK_ID="cik id",e.TYPE_LOOKUP="Lookup",e.TYPE_TYPEAHEAD="Typeahead",e.TYPE_URL="URL",e.TYPE_BLOG_URL="Blog URL",e.TYPE_IMAGE_URL="Image URL",e.TYPE_EMAIL="Email",e.TYPE_DEPENDENT_LOOKUP="DependentLookup",e.TYPE_ENTITY_ID="EntityId",e.TYPE_RDM_LOOKUPS_NOT_RESOLVED="RdmLookupsNotResolved",e.TYPE_COUNT="Count",e.TYPE_FILE="File",e.TYPE_SELECT="Select",e.TYPE_NESTED="Nested",e.TYPE_REFERENCE="Reference",e.TYPE_IMAGE="Image",e.TYPE_SSN="SSN"}(Et||(Et={}));const mt=Et;let ht,bt;!function(e){e.Viewing="Viewing",e.Editing="Editing",e.Suggesting="Suggesting"}(ht||(ht={})),function(e){e.Saving="Saving",e.Cloning="Cloning"}(bt||(bt={}));const Ot=(0,l.prop)("referencedEntityTypeURI"),vt=(0,l.prop)("relationshipTypeURI"),gt=(0,l.prop)("referencedAttributeURIs"),_t=(0,l.curry)(((e,t)=>(0,l.pipe)(gt,(0,l.filter)((0,l.startsWith)(e)))(t))),At=_t("configuration/relationTypes"),Nt=_t("configuration/entityTypes"),Rt=(0,l.pipe)((0,l.prop)("uri"),(0,l.startsWith)("configuration/relationTypes")),Pt=(0,l.filter)(Rt),St=(e,t)=>!t||t.some((t=>t===e.uri)),wt="1Tempo4rary",It="1Tepmo4Rel",Ut=(0,l.cond)([[l.isNil,(0,l.always)("")],[(0,l.test)(/[^/]$/),(0,l.concat)(l.__,"/")]]),Ct=e=>`${e}/uri$$${Date.now()+Math.round(1e3*Math.random())}`,Lt=e=>()=>Ct(e),Dt=(e,t)=>{const r=Ut(e),n=r+(r.includes("/attributes/")?"":"attributes/")+t;return Ct(n)},jt=e=>e&&e.includes("uri$$"),kt=Lt("entities"),Ft=Lt("relations"),xt=(0,l.pipe)((0,l.split)("/attributes/"),(0,l.prop)("0")),Mt=(0,l.startsWith)("relations/"),$t=(0,l.startsWith)("entities/"),Vt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/entityTypes/")),Gt=(0,l.pipe)((0,l.defaultTo)(""),(0,l.startsWith)("configuration/relationTypes/")),Wt=(0,l.curry)(((e,t)=>e===t||(e||"").startsWith(`${t||""}/`))),Yt=(0,l.pipe)((0,l.split)("/"),l.head),Bt=(0,l.pipe)((0,l.split)("/"),l.last),qt=e=>e.split(".").slice(0,2).join("."),Ht=(e,t)=>{const[r,...n]=e.split("."),i=n.join(`/${r}/`);return`${t||""}/${r+(i&&`/${i}`)}`},Qt=(0,l.curry)(((e,t)=>`${e}/attributes/${t}`)),Kt=(e,t)=>{const r=e.split("/"),n=t.split("/");return 2===r.length?t:[n,r.slice(2,3),r.slice(3).map(((e,t)=>t%2?r[2]:e))].flat().slice(0,-1).join("/")},Jt=e=>{var t;return null===(t=e.match(/.+?(?=\/attributes|\/analyticsAttributes)/gm))||void 0===t?void 0:t[0]},Xt=(0,l.either)((0,l.startsWith)("attributes."),(0,l.startsWith)("analyticsAttributes.")),zt=e=>5===e.split("/").length,Zt=e=>{const t=e.startsWith("configuration/")?3:2,r=e.split("/"),n=r.length<=5?t:-2;return r.slice(0,n).join("/")},er=e=>e.replace(/uri\$\$/g,wt);function tr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rr=(0,l.allPass)([(0,l.propSatisfies)((0,l.either)(l.isNil,Vt),"uri"),(0,l.prop)("faceted"),(0,l.propEq)("type",mt.TYPE_STRING)]),nr=(0,l.has)("values"),ir=(0,l.cond)([[(0,l.has)("dependentLookupCode"),(0,l.always)(mt.TYPE_DEPENDENT_LOOKUP)],[(0,l.has)("lookupCode"),(0,l.always)(mt.TYPE_LOOKUP)],[nr,(0,l.always)(mt.TYPE_ENUM)],[rr,(0,l.always)(mt.TYPE_TYPEAHEAD)],[(0,l.propEq)("type",mt.TYPE_BOOLEAN),(0,l.always)(mt.TYPE_BOOLEAN_RADIO)],[l.T,(0,l.prop)("type")]]),ar=(0,l.pipe)((e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){tr(e,t,r[t])}))}return e}({},e,{type:ir(e)})),(0,l.pick)(["type","values","lookupCode","uri","dependentLookupCode","singleValue"])),or=e=>!!e&&(!!e.autoGenerated&&e.type!==mt.TYPE_NESTED||!!e.parentAutoGenerated),sr=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.test)(/\/analyticsAttributes\//)),lr=(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("uri")),(0,l.startsWith)("configuration/"),l.not),ur=e=>sr(e)?"analyticsAttributes":"attributes",cr=(0,l.propEq)("hidden",!0),pr=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.when)((0,l.pipe)(l.type,(0,l.test)(/Object/)),(0,l.prop)("type")),(0,l.equals)(e))(t))),dr=pr(mt.TYPE_NESTED),yr=pr(mt.TYPE_REFERENCE),fr=pr(mt.TYPE_IMAGE),Tr=(0,l.either)(dr,yr),Er=(e,t)=>{const r=sr(e)?"analyticsAttributes":"attributes",n=e.split(`/${r}/`);return[r,...Array.isArray(t)?[...(0,l.chain)((0,l.prop)("name"),t),(0,l.last)(n)]:[...n.slice(1)]].join(".")},mr=(0,l.either)((0,l.prop)("lookupCode"),(0,l.prop)("dependentLookupCode")),hr=(0,l.pipe)(mr,Boolean),br=(0,l.pipe)((0,l.prop)("dependentLookupCode"),Boolean),Or=(0,l.both)(hr,(0,l.pipe)(mr,("rdm",(0,l.pipe)(Yt,(0,l.equals)("rdm")))));const vr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=ur({uri:t}),i=e=>e.split(`/${n}/`).length,a=(e.entityTypes||[]).concat(e.relationTypes||[]),o=r?a.find((0,l.propEq)("uri",r)):null,s=o?i(o.uri):0,u=(r,i)=>{const o=t.split(`/${n}/`).slice(0,i+1).join(`/${n}/`),s=(0,l.last)(o.split(`/${n}/`)),c=(r?r[n]||_r(e,r)||[]:a).find((e=>{let{uri:t,name:r}=e;return t===o||r===s})),p=c?[c]:[];return c&&o!==t&&p.push(...u(c,i+1)),p},c=u(o,s),p=c.length===i(t)-s;return p?c:[]},gr=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=vr(e,t,r);return n.length?(0,l.last)(n):null},_r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{entityTypes:[]},t=arguments.length>1?arguments[1]:void 0;return(0,l.cond)([[(0,l.has)("analyticsAttributes"),(0,l.prop)("analyticsAttributes")],[(0,l.anyPass)([(0,l.propEq)("type",mt.TYPE_NESTED),(0,l.propEq)("type",mt.TYPE_IMAGE)]),(0,l.prop)("attributes")],[(0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(gt,(0,l.map)((t=>gr(e,t))),(0,l.reject)(l.isNil))],[l.T,(0,l.always)(null)]])(t)},Ar=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],Nr=[mt.TYPE_ACTIVENESS_DATE,mt.TYPE_TIMESTAMP,mt.TYPE_LOCAL_DATE],Rr=e=>Ar.includes(e),Pr=e=>Nr.includes(e),Sr=[mt.TYPE_INT,mt.TYPE_LONG,mt.TYPE_NUMBER,mt.TYPE_FLOAT,mt.TYPE_DOUBLE,mt.TYPE_COUNT],wr=e=>Sr.includes(e),Ir=e=>[mt.TYPE_FLOAT,mt.TYPE_DOUBLE].includes(e),Ur=[mt.TYPE_BOOLEAN,mt.TYPE_BOOLEAN_RADIO,mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED],Cr=e=>Ur.includes(e),Lr=[mt.TYPE_URL,mt.TYPE_BLOG_URL,mt.TYPE_IMAGE_URL],Dr=e=>Lr.includes(e),jr=pr(mt.TYPE_EMAIL),kr=e=>mt.TYPE_SSN===e;var Fr,xr=r(36631);!function(e){e.CREATE="canCreate",e.READ="canRead",e.UPDATE="canUpdate",e.DELETE="canDelete"}(Fr||(Fr={}));const Mr=(0,l.curry)(((e,t,r)=>{var n;const i=e===Fr.READ?["ROLE_UI_ALL","ROLE_UI_ALL_READONLY"]:["ROLE_UI_ALL"],a=null===(n=r[e])||void 0===n?void 0:n.roles;return!a||a.concat(i).some((e=>t.includes(e)))})),$r=(0,l.compose)((0,l.join)("&"),(0,l.map)((0,l.join)("=")),(0,l.map)((0,l.map)(encodeURIComponent)),l.toPairs),Vr=(0,l.compose)((0,l.unless)(l.isEmpty,(e=>`?${e}`)),$r),Gr=(0,l.pipe)((0,l.reject)(E),Vr),Wr=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r={dcrObjectUris:[],dcrUri:t},n=e=>e&&e.includes("changeRequest"),i=(0,l.propSatisfies)(n,"uri"),a=(0,l.pipe)((0,l.prop)("changes"),l.keys),o=(0,l.when)(i,(0,l.applySpec)({dcrObjectUris:a,dcrUri:(0,l.prop)("uri")})),s=e=>{let{dcrObjectUris:t,dcrUri:n}=e;r.dcrObjectUris=r.dcrObjectUris.concat(t),r.dcrUri=r.dcrUri||n},u=(0,l.pipe)(o,s),c=(0,l.pipe)((0,l.prop)("dcrUri"),(0,l.unless)(l.isNil,(0,l.pipe)((0,l.split)("/"),(0,l.prop)(1)))),p=(e,t)=>(e+=e.includes("?")?"&":"?")+$r(t),d=t=>{const n=c(r);return n?p(t,{changeRequestId:n}):e?p(t,{alwaysCreateDCR:!0}):t},y=()=>r.dcrObjectUris,f=()=>r.dcrUri;return{updateDCRUriFromResponse:u,enhanceUriWithDCR:d,getDCRObjectUris:y,getDCRUri:f}},Yr={EDITING:"Editing",SUGGESTING:"Suggesting",VIEWING:"Viewing"},Br=(0,l.equals)(Yr.SUGGESTING),qr=(0,l.equals)(Yr.EDITING),Hr=(0,l.equals)(Yr.VIEWING),Qr=(0,l.either)(qr,Br),Kr=(0,l.curry)(((e,t)=>{let{entityTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Jr=(0,l.curry)(((e,t)=>(0,l.pipe)(Kr(e),(0,l.prop)("extendsTypeURI"))(t))),Xr=(0,l.curry)(((e,t,r)=>{const n=r=>!!r&&(r===t||n(Jr(e,r)));return n(r)})),zr=(0,l.curry)(((e,t)=>{const r=[];let n=t;for(;n;)r.push(n),n=Jr(e,n);return r})),Zr=(e,t,r)=>(0,l.prop)(r,t)?t[r]:(0,l.prop)("extendsTypeURI",t)?Zr(e,Kr(e,t.extendsTypeURI),r):void 0,en=(e,t)=>{const r=t.map(zr(e));return(r.length?r.reduce(l.intersection):[])[0]},tn=(e,t)=>Zr(e,(0,l.is)(Object,t)?t:Kr(e,t),"typeImage"),rn=(e,t)=>e.entityTypes.reduce(((r,n)=>n.uri!==t&&Xr(e,t,n.uri)?r.concat(n.uri):r),[]),nn={EQUALS:"equals",NOT_EQUALS:"not equals",EXISTS:"exists",FULL_TEXT:"fullText",HAS_ALL:"hasAll",MISSING_VALUE:"missing",IN_RANGE:"range",LT:"lt",LTE:"lte",GT:"gt",GTE:"gte",STARTS_WITH:"startsWith",COUNT_EQUALS:"count.equals",COUNT_NOT_EQUALS:"count.not.equals",COUNT_LT:"count.less",COUNT_LTE:"count.less.or.equals",COUNT_GT:"count.greater",COUNT_GTE:"count.greater.or.equals",COUNT_RANGE:"count.range",IN_FILE:"in.file",NOT_IN_FILE:"not.in.file",CONTAINS:"contains",ON:"on",BEFORE:"before",AFTER:"after",WITHIN:"within"},an={LIST_EQUALS:"listEquals",NOT_LIST_EQUALS:"not listEquals",LIST_EQUALS_CASE_SENSITIVE:"listEqualsCaseSensitive",NOT_LIST_EQUALS_CASE_SENSITIVE:"not listEqualsCaseSensitive"},on={[nn.EQUALS]:"equals",[nn.NOT_EQUALS]:"not",[nn.STARTS_WITH]:"starts with",[nn.MISSING_VALUE]:"missing value",[nn.IN_RANGE]:"in range",[nn.HAS_ALL]:"has all",[nn.FULL_TEXT]:"full text",[nn.EXISTS]:"exists",[nn.COUNT_EQUALS]:"count equals",[nn.COUNT_NOT_EQUALS]:"count not equal",[nn.COUNT_LT]:"count less",[nn.COUNT_LTE]:"count less or equal",[nn.COUNT_GT]:"count greater",[nn.COUNT_GTE]:"count greater or equal",[nn.COUNT_RANGE]:"count in range",[nn.LT]:"less than",[nn.LTE]:"less than or equal",[nn.GT]:"greater than",[nn.GTE]:"greater than or equal",[nn.IN_FILE]:"in file",[nn.NOT_IN_FILE]:"not in file",[nn.CONTAINS]:"contains",[nn.ON]:"on",[nn.BEFORE]:"before",[nn.AFTER]:"after",[nn.WITHIN]:"within"},sn="in",ln="notIn",un="not range",cn=e=>({[sn]:nn.EQUALS,[ln]:nn.NOT_EQUALS}[e]||e),pn={LAST_DAY:"lastDay",LAST_3DAYS:"last3Days",LAST_WEEK:"lastWeek",LAST_MONTH:"lastMonth",LAST_YEAR:"lastYear",PICK_DATE:"pickDate"},dn={[pn.LAST_DAY]:"Last 24 hours",[pn.LAST_3DAYS]:"Last 3 days",[pn.LAST_WEEK]:"Last week",[pn.LAST_MONTH]:"Last month",[pn.LAST_YEAR]:"Last year",[pn.PICK_DATE]:"Pick date"},yn={NEW:"new",REMOVED:"removed",EDITED:"edited",IGNORED:"ignored"},fn={ACTIVE_ONLY:"active",INACTIVE_ONLY:"not_active",ALL:"all"},Tn="<No label>",En={IN:"in",OUT:"out"};var mn=r(87918),hn=r.n(mn);function bn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){On(e,t,r[t])}))}return e}function On(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vn={startDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return hn().text("Start date")},uri:"startDate",name:"activeness.startDate",defaultValue:null,singleValue:!0,faceted:!0},endDate:{type:mt.TYPE_ACTIVENESS_DATE,get label(){return hn().text("End date")},uri:"endDate",name:"activeness.endDate",defaultValue:null,singleValue:!0,faceted:!0}},gn=bn({id:{type:mt.TYPE_ENTITY_ID,get label(){return hn().text("Entity ID")},uri:"id",name:"id",singleValue:!0}},vn,{roles:{type:mt.TYPE_STRING,get label(){return hn().text("Roles")},uri:"roles",name:"roles",faceted:!0},tags:{type:mt.TYPE_STRING,get label(){return hn().text("Tags")},uri:"tags",name:"tags",faceted:!0}}),_n={workflow:{type:mt.TYPE_STRING,get label(){return hn().text("Workflow")},uri:"workflow",name:"businessProcessData.businessProcessName",faceted:!0},assignee:{type:mt.TYPE_STRING,get label(){return hn().text("Assignee")},uri:"assignee",name:"businessProcessData.tasks.taskAssignee",faceted:!0},step:{type:mt.TYPE_STRING,get label(){return hn().text("Step")},uri:"step",name:"businessProcessData.tasks.taskName",faceted:!0},dueDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Due Date")},uri:"dueDate",name:"businessProcessData.tasks.taskDueDate"}},An={commenter:{type:mt.TYPE_STRING,get label(){return hn().text("Commenter")},uri:"commenter",name:"attributes.Commenters",faceted:!0}},Nn={notResolved:{type:mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED,get label(){return hn().text("Records with RDM Transcode Error")},uri:"notResolved",name:"rdmLookups.resolved"}},Rn={createdBy:{type:mt.TYPE_STRING,get label(){return hn().text("Created by")},uri:"createdBy",name:"createdBy",singleValue:!0,faceted:!0},updatedBy:{type:mt.TYPE_STRING,get label(){return hn().text("Updated by")},uri:"updatedBy",name:"updatedBy",singleValue:!0,faceted:!0},createdTime:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Created time")},uri:"createdTime",name:"createdTime",singleValue:!0,faceted:!0},updatedTime:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Updated time")},uri:"updatedTime",name:"updatedTime",singleValue:!0,faceted:!0}},Pn={matches:{type:mt.TYPE_COUNT,get label(){return hn().text("Potential Matches")},uri:"matches",name:"matches",singleValue:!0,hideForDataTenant:!0,faceted:!0},matchScore:{type:mt.TYPE_COUNT,get label(){return hn().text("Match scores")},uri:"matchScore",name:"potentialMatches.matchScore",singleValue:!0,hideForDataTenant:!0,faceted:!0}},Sn={sourceSystems:{type:mt.TYPE_STRING,get label(){return hn().text("Source System Name")},uri:"sourceSystems",name:"sourceSystems",singleValue:!0,faceted:!0},value:{type:mt.TYPE_STRING,get label(){return hn().text("ID Value")},uri:"value",name:"crosswalks.value"},count:{type:mt.TYPE_INT,get label(){return hn().text("Crosswalk Count")},uri:"count",name:"crosswalks_count"},reltioLoadDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Reltio Load Date")},uri:"reltioLoadDate",name:"crosswalks.reltioLoadDate"},createDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Create Date")},uri:"createDate",name:"crosswalks.createDate"},updateDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Update Date")},uri:"updateDate",name:"crosswalks.updateDate"},deleteDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Delete Date")},uri:"deleteDate",name:"crosswalks.deleteDate"},publishDate:{type:mt.TYPE_TIMESTAMP,get label(){return hn().text("Publish Date")},uri:"publishDate",name:"crosswalks.sourcePublishDate"},sourceTable:{type:mt.TYPE_STRING,get label(){return hn().text("Source Table")},uri:"sourceTable",name:"crosswalks.sourceTable"}},wn={matchRules:{type:mt.TYPE_STRING,get label(){return hn().text("Match Rules")},uri:"matchRules",name:"matchRules",faceted:!0,hideForDataTenant:!0},MLRecommendedMatch:{type:mt.TYPE_STRING,get label(){return hn().text("Match IQ")},uri:"MLRecommendedMatch",name:"MLRecommendedMatch",faceted:!0,hideForDataTenant:!0}},In=bn({},gn,_n,An,Nn,Rn,Pn,Sn,wn,{type:{type:mt.TYPE_STRING,get label(){return hn().text("Type")},uri:"type",name:"type",singleValue:!0,faceted:!0}});var Un=r(13980),Cn=r.n(Un);function Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Dn(e,t,r[t])}))}return e}function Dn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const jn=Cn().oneOf(["mobile","tablet","desktop"]),kn=Cn().shape({deviceTypes:Cn().oneOfType([jn,Cn().arrayOf(jn)]),roles:Cn().arrayOf(Cn().string)}),Fn=Cn().shape({value:Cn().string,lookupCode:Cn().string}),xn=Cn().shape({link:Cn().string,filename:Cn().string}),Mn=Cn().shape({displayName:Cn().string,parent:Cn().string}),$n=Cn().oneOfType([Cn().string,Cn().number,Cn().bool,Fn]),Vn=Cn().oneOfType([$n,Cn().arrayOf($n)]),Gn=Cn().shape({fieldName:Cn().string,values:Cn().arrayOf(Vn),filter:Cn().string,type:Cn().string}),Wn=Cn().shape({minValue:Cn().number,maxValue:Cn().number}),Yn=Cn().shape({label:Cn().string,name:Cn().string,description:Cn().string,type:Cn().string,hidden:Cn().bool,faceted:Cn().bool,searchable:Cn().bool,uri:Cn().string,access:Cn().arrayOf(Cn().string),cardinality:Wn}),Bn=Cn().shape({label:Cn().string,uri:Cn().string,typeColor:Cn().string,direction:Cn().string,startObject:Cn().object,endObject:Cn().object}),qn=Cn().shape({typeColor:Cn().string,typeIcon:Cn().string,typeImage:Cn().string,label:Cn().string,uri:Cn().string,attributes:Cn().arrayOf(Yn)}),Hn=Cn().shape({uri:Cn().string,label:Cn().string,memberTypes:Cn().array,extendsTypeUri:Cn().string,attributes:Cn().arrayOf(Yn)}),Qn=Cn().shape({uri:Cn().string,label:Cn().string,extendsTypeUri:Cn().string,relationshipTypeURIs:Cn().arrayOf(Cn().string)}),Kn=Cn().shape({uri:Cn().string,description:Cn().string,label:Cn().string,schemaVersion:Cn().string,entityTypes:Cn().arrayOf(qn),roles:Cn().arrayOf(Cn().object),groupTypes:Cn().arrayOf(Cn().object),relationTypes:Cn().arrayOf(Bn),graphTypes:Cn().arrayOf(Qn),interactionTypes:Cn().arrayOf(Hn),sources:Cn().arrayOf(Cn().object)}),Jn=Cn().shape({uri:Cn().string,type:Cn().string}),Xn=Cn().shape({uri:Cn().string,attributes:Cn().object,type:Cn().string,timestamp:Cn().number,members:Cn().object}),zn=Cn().shape({uri:Cn().string,type:Cn().string}),Zn=Cn().shape({value:Cn().object,ov:Cn().bool,type:Cn().string,uri:Cn().string}),ei=Cn().shape({refEntity:Cn().oneOfType([Cn().array,Cn().object]),refRelation:Cn().oneOfType([Cn().array,Cn().object]),value:Cn().object,ov:Cn().bool,type:Cn().string,uri:Cn().string}),ti=Cn().oneOf((0,l.values)(Yr)),ri=Cn().shape({type:Cn().oneOf(Object.values($e)).isRequired,attributeTypeUri:Cn().string.isRequired,parentUri:Cn().string.isRequired,uri:Cn().string,message:Cn().string}),ni={attributeType:Yn,showEmptyEditors:Cn().bool,lazy:Cn().bool,mode:ti,metadata:Kn,ownError:ri,errors:Cn().arrayOf(ri),crosswalks:Cn().array,onAddAttributes:Cn().func,onAddOneMore:Cn().func,onDeleteAttribute:Cn().func,onChangeAttribute:Cn().func,additionalControlsRenderer:Cn().func,hideDeleteButton:Cn().bool,showNonOv:Cn().bool,state:Cn().oneOf(["deleted","edited"]),expanded:Cn().bool},ii=Ln({attributeValue:Zn},ni),ai=Ln({attributeValue:ei},ni),oi=Cn().shape({value:Cn().oneOfType([Cn().string,Cn().bool,Cn().number]),ov:Cn().bool,type:Cn().string,uri:Cn().string,lookupCode:Cn().string,lookupRawValue:Cn().string}),si=Cn().shape({totalOvValues:Cn().number,totalValues:Cn().number}),li=Cn().shape({inRelations:Cn().arrayOf(Cn().oneOfType([Cn().object,Cn().string])),outRelations:Cn().arrayOf(Cn().oneOfType([Cn().object,Cn().string])),groups:Cn().arrayOf(Cn().string),entityTypes:Cn().arrayOf(Cn().string),nextEntry:Cn().object}),ui=Cn().oneOf(["asc","desc"]),ci=Cn().shape({id:Cn().string,content:li,allowOnlyCreateNew:Cn().bool,sortColumn:Cn().string,sortOrder:ui,"text-empty":Cn().string,max:Cn().number,icon:Cn().string,caption:Cn().string,canCreate:kn,canRead:kn,canUpdate:kn,canDelete:kn,editingEnabled:Cn().bool}),pi=Cn().shape({id:Cn().string,graph:Cn().shape({type:Cn().string,layout:Cn().number,deep:Cn().number,limit:Cn().number,uri:Cn().string,options:Cn().shape({reverseRelations:Cn().bool})}),sortBy:Cn().oneOf(["relationTypeLabel","entityLabel"]),sortOrder:ui,max:Cn().number,icon:Cn().string,caption:Cn().string,canCreate:kn,canRead:kn,canUpdate:kn,canDelete:kn}),di=Cn().shape({id:Cn().string,caption:Cn().string,pageSize:Cn().number,icon:Cn().string,canCreate:kn,canRead:kn,canUpdate:kn,canDelete:kn,attributes:Cn().object}),yi=Cn().shape({entityUri:Cn().string,entityType:Cn().string,entityLabel:Cn().string,object:Jn}),fi=Cn().shape({relationUri:Cn().string,relationType:Cn().string,relationLabel:Cn().string,direction:Cn().string,object:zn}),Ti=Cn().shape({entity:yi,relation:fi}),Ei=Cn().shape({value:Cn().string,isRawFilter:Cn().bool}),mi=Cn().shape({id:Cn().string,label:Cn().string,name:Cn().string,availableEntityTypes:Cn().array}),hi=Cn().shape({id:Cn().string,allowMergeAll:Cn().bool,matchActions:Cn().object,availableTabs:Cn().arrayOf(Cn().oneOf(["findMatches","potentialMatches","notAMatch"]))}),bi=Cn().shape({matchRules:Cn().arrayOf(Cn().string),object:Jn,shortestTransitiveMatchPath:Cn().arrayOf(Cn().shape({matchRules:Cn().arrayOf(Cn().string),match:Cn().string})),direct:Cn().bool,matchScore:Cn().number}),Oi=Cn().arrayOf(bi),vi=Cn().arrayOf(Cn().shape({uri:Cn().string,label:Cn().string})),gi=[{label:hn().text("And"),value:"and"},{label:hn().text("Or"),value:"or"},{label:hn().text("And not"),value:"and not"},{label:hn().text("Or not"),value:"or not"}];function _i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ai=(0,l.curry)(((e,t)=>{let{relationTypes:r}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),Ni=(0,l.pipe)(Ai,(0,l.propOr)("","label")),Ri=(0,l.curry)(((e,t)=>{const r=Ai(e,t);return[(0,l.path)(["startObject","objectTypeURI"],r),(0,l.path)(["endObject","objectTypeURI"],r)]})),Pi=(0,l.curry)(((e,t,r)=>{const[n,i]=Ri(e,r);return Xr(e,n,t)||Xr(e,i,t)})),Si=(0,l.pipe)((0,l.propOr)([],"relationTypes"),(0,l.reduce)(((e,t)=>{let{uri:r,label:n}=t;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){_i(e,t,r[t])}))}return e}({},e,{[r]:n})}),{})),wi=function(){let{reversedContextLabels:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},r=r=>n=>{let{label:i}=n;const a=r===(e?En.OUT:En.IN)?"startObject":"endObject",{directionalContext:o}=n[a];return"directed"===n.direction&&1===(0,l.propOr)(0,"length",o)&&(i+=` (${o[0].labelPattern})`),!(i in t)&&(t[i]=!0,!0)},n=r(En.IN),i=r(En.OUT);return{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}},Ii=(0,l.pathOr)("",["directionalContext",0,"labelPattern"]),Ui={CREATE:"CREATE",READ:"READ",UPDATE:"UPDATE",DELETE:"DELETE",INITIATE_CHANGE_REQUEST:"INITIATE_CHANGE_REQUEST",MERGE:"MERGE",UNMERGE:"UNMERGE"},Ci=(0,l.curry)(((e,t)=>e.every((e=>Li(e,t))))),Li=(0,l.curry)(((e,t)=>{const r=or(t);return!t||(!t.access||t.access.includes(e))&&(e===Ui.READ||!r)})),Di=(0,l.curry)(((e,t,r)=>Li(Ui.READ,r)&&(Br(t)?Li(Ui.INITIATE_CHANGE_REQUEST,r):Li(e,r)))),ji=Di(Ui.CREATE),ki=Di(Ui.DELETE),Fi=Di(Ui.UPDATE),xi=Ci([Ui.CREATE,Ui.MERGE,Ui.READ,Ui.UPDATE]),Mi=Ci([Ui.UPDATE,Ui.READ,Ui.CREATE]),$i=Ci([Ui.UPDATE,Ui.READ]),Vi=Ci([Ui.DELETE,Ui.UPDATE,Ui.READ]),Gi=(0,l.curry)(((e,t,r)=>e[r]||e[((e,t)=>(0,l.pipe)((0,l.propOr)([],"matchGroups"),(0,l.find)((0,l.propEq)("uri",t)),(0,l.defaultTo)({}),(0,l.prop)("type"))(e))(t,r)]||e["*"])),Wi=(e,t,r)=>(0,l.pipe)((0,l.map)(Gi(e,t)),(0,l.filter)(l.identity))(r),Yi=(e,t,r)=>{const n=Wi(e,r,t);return(0===n.length||n.some((e=>{let{allowMerge:t}=e;return!1!==t})))&&Li(Ui.MERGE,r)},Bi=(0,l.curry)(((e,t,r,n)=>{const i=Ai(e,n),[a,o]=Ri(e,n);return i&&Li(Ui.CREATE,i)&&Xr(e,a,t.type)&&Xr(e,o,r.type)})),qi=(e,t,r,n,i)=>{const a=Kr(e,n.type),o=Wi(t,a,r).map((e=>{let{createRelation:t}=e;return t})).filter(l.identity);return o.some((t=>{let{inRelations:r,outRelations:a}=t;return r.some(Bi(e,n,i))||a.some(Bi(e,i,n))}))},Hi=function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=Kr(e,r.type),o=(0,l.propOr)({},"matchActions",t);return{canMerge:Yi(o,i,a),canAddRelation:qi(e,o,i,r,n),canMark:Li(Ui.UPDATE,a)&&Li(Ui.READ,a)}},Qi=(e,t,r,n)=>(0,l.pipe)((0,l.map)((n=>Hi(e,t,n.object,r,n.matchRules))),(0,l.reduce)((0,l.mergeWith)(l.and),{}))(n),Ki=sr,Ji=(0,l.complement)(Ki),Xi=Li(Ui.READ),zi=e=>{let{attributeType:t,mode:r}=e;return Ji(t)&&ji(r,t)&&!cr(t)},Zi=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0}=e;const a=jt(r.uri),o=Fi(n),s=ji(n);return(0,l.cond)([[Ki,l.F],[(0,l.always)(a),l.T],[(0,l.always)(i),o],[l.T,(0,l.allPass)([o,s])]])(t)},ea=e=>{let{attributeType:t,attributeValue:r,mode:n,isReltioCrosswalk:i=!0,metadata:a}=e;const o=jt(r.uri),s=Fi(n),u=ki(n),c=ra(Ui.UPDATE,n,a,r),p=ra(Ui.DELETE,n,a,r);return(0,l.cond)([[Ki,l.F],[(0,l.always)(o),l.T],[(0,l.always)(i),(0,l.allPass)([u,p])],[l.T,(0,l.allPass)([s,u,c,p])]])(t)},ta=(0,l.curry)(((e,t,r,n)=>{const i=_r(t,n);return!i||!(0,l.pipe)((0,l.unless)(Array.isArray,l.of),(0,l.map)((0,l.prop)("value")))(r).some((r=>i.filter((e=>r&&!!r[e.name])).some((n=>!Li(e,n)||!ta(e,t,r[n.name],n)))))})),ra=(0,l.curry)(((e,t,r,n,i)=>Br(t)?ta(Ui.INITIATE_CHANGE_REQUEST,r,n,i):ta(e,r,n,i))),na=(0,l.both)((0,l.complement)(cr),Xi),ia="SuperUser",aa="allTenants",oa=[aa,"allCustomers"],sa=e=>{let{allowedPermissionsNames:t,permissionsNames:r,permissionsConfig:n,superUserEnvironments:i}=e;return t.map((e=>{switch(e){case r.NON_SECURED:return l.T;case r.SECURED:return e=>void 0!==e.userPermissions;default:return(t=n[e])?(e,r)=>{let{params:n}=r;return((e,t,r,n)=>{const i=(0,l.path)(["userPermissions","permissions"],e)||{};return Object.keys(i).filter((e=>{const t=e.split(":"),[n]=t;return n===r.serviceId||n===ia})).filter((e=>{const t=e.split(":"),[i,a=""]=t;let o=a.split(".");return o=(0,l.endsWith)(["*"],o)?o.slice(0,-1):o,(0,l.startsWith)(o,r.resourcePath)||((e,t,r)=>{if(e===ia){const e=r?oa.concat(r.map((e=>`allTenants.${e}`))):oa,n=r&&t[0]===aa?t.slice(0,2):t.slice(0,1);return e.map((e=>e.split("."))).some((e=>(0,l.startsWith)(n,e)))}})(i,o,n)})).some((e=>{const n=i[e];return r.privileges.every((e=>{const r=n[e],i=Array.isArray(r);return t?Array.isArray(r)&&r.some((e=>t=>t===e||"SuperUser:*"===t||t.startsWith("SuperUser:allTenants"))(t)):i}))}))})(e,n.tenant,t,i)}:l.F}var t}))},la={NON_SECURED:"NON_SECURED",SECURED:"SECURED",CAN_EXPORT:"CAN_EXPORT",CAN_EXPORT_ACTIVITIES:"CAN_EXPORT_ACTIVITIES",CAN_IMPORT_ENTITIES_FROM_DT:"CAN_IMPORT_ENTITIES_FROM_DT",CAN_READ_ENTITIES_FROM_DT:"CAN_READ_ENTITIES_FROM_DT",CAN_START_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_START_PROCESS_INSTANCE_SEARCH_QUERY",CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY:"CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY",CAN_CREATE_ENVIRONMENT_CONFIG_JAR:"CAN_CREATE_ENVIRONMENT_CONFIG_JAR",CAN_CREATE_CONFIG_JAR:"CAN_CREATE_CONFIG_JAR",CAN_VIEW_ENVIRONMENT_CONFIG_JAR:"CAN_VIEW_ENVIRONMENT_CONFIG_JAR",CAN_VIEW_CONFIG_JAR:"CAN_VIEW_CONFIG_JAR",CAN_MANAGE_WORKFLOW_DEFINITION:"CAN_MANAGE_WORKFLOW_DEFINITION",CAN_VIEW_WORKFLOW_DEFINITION:"CAN_VIEW_WORKFLOW_DEFINITION",CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION:"CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION",CAN_UPDATE_WORKFLOW_DATA_TASK:"CAN_UPDATE_WORKFLOW_DATA_TASK",CAN_READ_WORKFLOW_DATA_TASK:"CAN_READ_WORKFLOW_DATA_TASK",CAN_CONFIG_ENVIRONMENT_REGISTER:"CAN_CONFIG_ENVIRONMENT_REGISTER",CAN_UPDATE_PROCESS_INSTANCE:"CAN_UPDATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS:"CAN_EXECUTE_WORKFLOW_JOBS",CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE:"CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE",CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS:"CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS",CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA:"CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA",CAN_VIEW_WORKFLOW_JOBS:"CAN_VIEW_WORKFLOW_JOBS",CAN_MAKE_BULK_UPDATE:"CAN_MAKE_BULK_UPDATE",CAN_OPEN_DATA_LOADER_EXECUTE:"CAN_OPEN_DATA_LOADER_EXECUTE",CAN_OPEN_DATA_LOADER_READ:"CAN_OPEN_DATA_LOADER_READ",CAN_BULK_DELETE_PROFILES:"CAN_BULK_DELETE_PROFILES",CAN_READ_MDM_DATA_ENTITIES:"CAN_READ_MDM_DATA_ENTITIES",IS_FREEMIUM_ADMIN:"IS_FREEMIUM_ADMIN",CAN_READ_DVF:"CAN_READ_DVF"},ua={[la.CAN_EXPORT]:{serviceId:"export",resourcePath:["data","entities"],privileges:["EXECUTE"]},[la.CAN_EXPORT_ACTIVITIES]:{serviceId:"export",resourcePath:["data","activities"],privileges:["EXECUTE"]},[la.CAN_IMPORT_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ","UPDATE"]},[la.CAN_READ_ENTITIES_FROM_DT]:{serviceId:"dtss",resourcePath:["data","entities"],privileges:["READ"]},[la.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["CREATE"]},[la.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["READ"]},[la.CAN_CREATE_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["CREATE","DELETE"]},[la.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["CREATE","DELETE"]},[la.CAN_VIEW_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["config","jar"],privileges:["READ"]},[la.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]:{serviceId:"workflow",resourcePath:["environment","config","jar"],privileges:["READ"]},[la.CAN_MANAGE_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["CREATE","DELETE"]},[la.CAN_VIEW_WORKFLOW_DEFINITION]:{serviceId:"workflow",resourcePath:["config","definition"],privileges:["READ"]},[la.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]:{serviceId:"workflow",resourcePath:["environment","config","definition"],privileges:["CREATE","DELETE"]},[la.CAN_UPDATE_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["UPDATE"]},[la.CAN_READ_WORKFLOW_DATA_TASK]:{serviceId:"workflow",resourcePath:["data","tasks"],privileges:["READ"]},[la.CAN_CONFIG_ENVIRONMENT_REGISTER]:{serviceId:"workflow",resourcePath:["environment","config","register"],privileges:["CREATE","DELETE"]},[la.CAN_UPDATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["data","process"],privileges:["UPDATE","DELETE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]:{serviceId:"workflow",resourcePath:["jobs","terminateProcessInstances"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","updateTasks"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]:{serviceId:"workflow",resourcePath:["jobs","validateTasks"],privileges:["EXECUTE"]},[la.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]:{serviceId:"workflow",resourcePath:["jobs","syncBusinessProcessData"],privileges:["EXECUTE"]},[la.CAN_VIEW_WORKFLOW_JOBS]:{serviceId:"workflow",resourcePath:["jobs"],privileges:["READ"]},[la.CAN_MAKE_BULK_UPDATE]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["EXECUTE"]},[la.CAN_OPEN_DATA_LOADER_EXECUTE]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["EXECUTE"]},[la.CAN_OPEN_DATA_LOADER_READ]:{serviceId:"dataloader",resourcePath:["tasks","jobs"],privileges:["READ"]},[la.CAN_BULK_DELETE_PROFILES]:{serviceId:"MDM",resourcePath:["tasks","bulk"],privileges:["DELETE"]},[la.IS_FREEMIUM_ADMIN]:{serviceId:"pms",resourcePath:["config","freetier","user"],privileges:["CREATE","DELETE","UPDATE"]},[la.CAN_READ_MDM_DATA_ENTITIES]:{serviceId:"MDM",resourcePath:["data","entities"],privileges:["READ"]},[la.CAN_READ_DVF]:{serviceId:"DVF",resourcePath:["functionsManagement"],privileges:["READ"]}},ca=(0,l.curry)(((e,t,r)=>sa({allowedPermissionsNames:e,permissionsNames:la,permissionsConfig:ua}).some((e=>e(t,{params:{tenant:r}}))))),pa=ca([la.CAN_EXPORT]),da=ca([la.CAN_EXPORT_ACTIVITIES]),ya=ca([la.CAN_IMPORT_ENTITIES_FROM_DT]),fa=ca([la.CAN_READ_ENTITIES_FROM_DT]),Ta=ca([la.CAN_START_PROCESS_INSTANCE_SEARCH_QUERY]),Ea=ca([la.CAN_UPDATE_PROCESS_INSTANCE]),ma=ca([la.CAN_VIEW_WORKFLOW_DEFINITION]),ha=ca([la.CAN_CONFIG_ENVIRONMENT_REGISTER]),ba=ca([la.CAN_UPDATE_WORKFLOW_DATA_TASK]),Oa=ca([la.CAN_READ_WORKFLOW_DATA_TASK]),va=ca([la.CAN_MANAGE_WORKFLOW_DEFINITION]),ga=ca([la.CAN_MANAGE_WORKFLOW_ENVIRONMENT_DEFINITION]),_a=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_SYNC_BUSINESS_PROCESS_DATA]),Aa=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_VALIDATE_TASKS]),Na=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_UPDATE_TASKS]),Ra=ca([la.CAN_EXECUTE_WORKFLOW_JOBS_TERMINATE_PROCESS_INSTANCE]),Pa=ca([la.CAN_EXECUTE_WORKFLOW_JOBS]),Sa=ca([la.CAN_CREATE_ENVIRONMENT_CONFIG_JAR]),wa=ca([la.CAN_CREATE_CONFIG_JAR]),Ia=ca([la.CAN_VIEW_ENVIRONMENT_CONFIG_JAR]),Ua=ca([la.CAN_VIEW_CONFIG_JAR]),Ca=ca([la.CAN_VIEW_PROCESS_INSTANCE_SEARCH_QUERY]),La=ca([la.CAN_VIEW_WORKFLOW_JOBS]),Da=ca([la.CAN_MAKE_BULK_UPDATE]),ja=ca([la.CAN_OPEN_DATA_LOADER_EXECUTE,la.CAN_OPEN_DATA_LOADER_READ]),ka=ca([la.CAN_BULK_DELETE_PROFILES]),Fa=ca([la.CAN_READ_MDM_DATA_ENTITIES]),xa=ca([la.CAN_READ_DVF]),Ma=ca([la.IS_FREEMIUM_ADMIN]),$a=(0,l.reject)(cr),Va=(e,t)=>(0,l.pipe)((0,l.defaultTo)([]),$a,(0,l.filter)(e))(t),Ga=(0,l.curry)(((e,t)=>Va((t=>zi({attributeType:t,mode:e})),t))),Wa=(0,l.curry)(((e,t)=>Va((t=>zi({attributeType:t,mode:e})||na(t)),t))),Ya=(0,l.pipe)((0,l.defaultTo)([]),(0,l.filter)(na)),Ba=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...Ba(e)])))),qa=(0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)(na),(0,l.chain)((0,l.when)((0,l.has)("attributes"),(e=>[e,...qa(e)])))),Ha=(0,l.pipe)((0,l.propOr)([],"analyticsAttributes"),(0,l.chain)((0,l.when)((0,l.has)("analyticsAttributes"),(e=>[e,...Ha(e)])))),Qa=(0,l.pipe)(Kr,(0,l.converge)(l.concat,[qa,Ha]));function Ka(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ja(e,t,r[t])}))}return e}function Ja(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xa=(0,l.curry)(((e,t)=>(0,l.evolve)({attributes:(0,l.map)((0,l.pipe)(e,Xa(e)))},t))),za=e=>{var t;return Ka({},e,{matchGroups:(e.matchGroups||[]).concat((null===(t=e.hidden)||void 0===t?void 0:t.matchGroups)||[])})},Za=(0,l.both)((0,l.has)("values"),(0,l.has)("lookupCode")),eo=(0,l.when)(Za,(0,l.dissoc)("values")),to=(0,l.when)((0,l.has)("lookupCode"),(e=>{let{lookupCode:t}=e;return Ka({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["lookupCode"]),{dependentLookupCode:t})})),ro=e=>{let{hidden:t,dependentLookupAttributes:r}=e;return!t&&r},no=(0,xr.Z)((e=>{const{entityTypes:t=[],relationTypes:r=[]}=e;return(0,l.chain)(Ba,t).concat((0,l.chain)(Ba,r)).some(ro)})),io=e=>{let t=!1;const r=Xa((e=>e.cardinality&&(t=!0,e.cardinality.minValue)?Ka({},e,{required:!0}):e))(e);return t&&(r.forceValidate=!0),r},ao=e=>{const t=no(e),r=(0,l.map)((e=>Xa((0,l.pipe)(eo,(0,l.when)((0,l.always)(e),to))))(t)),n=(0,l.map)(za),i=(0,l.map)(io);return(0,l.evolve)({entityTypes:(0,l.pipe)(r,n,i),relationTypes:(0,l.pipe)(r,i)},e)},oo=(0,l.curry)(((e,t)=>{let{graphTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)})),so=(0,l.prop)("relationshipTypeURIs"),lo=(0,l.curry)(((e,t)=>e.graphTypes.filter(uo(e,t)))),uo=(e,t)=>r=>{let{relationshipTypeURIs:n}=r;return n.some(Pi(e,t))},co=(e,t)=>(0,l.pipe)(oo,(0,l.defaultTo)({}),so,(0,l.defaultTo)([]),(0,l.chain)(Ri(e)),(0,l.reject)(l.isNil),l.uniq,(0,l.map)(Kr(e)))(e,t),po=(0,l.allPass)([(0,l.propEq)("matchMethod","match_iq"),(0,l.anyPass)([(0,l.propEq)("scope","ALL"),(0,l.propEq)("scope","INTERNAL")])]),yo=e=>(0,l.pipe)((0,l.defaultTo)({}),(0,l.prop)("matchGroups"),(0,l.defaultTo)([]),(0,l.any)(e)),fo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yo((0,l.complement)(po))(e)},To=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yo(po)(e)},Eo=(0,l.pipe)(Kr,(0,l.propOr)([],"matchGroups")),mo=(e,t,r)=>(0,l.pipe)(Eo,(0,l.find)((0,l.propEq)("uri",r)))(e,t),ho=(0,l.curry)(((e,t,r)=>(0,l.pipe)(mo,(0,l.propOr)(r,"label"))(e,t,r))),bo=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(Eo,(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),(0,l.includes)(l.__,r))))(e,t),i=(0,l.pipe)((0,l.map)((0,l.prop)("uri")),(0,l.without)(l.__,r),(0,l.map)((e=>({uri:e,label:e}))))(n);return[...n,...i]})),Oo=e=>(0,l.partition)(po,e),vo=(0,l.includes)(l.__,["and","or","not"]),go=(0,l.includes)(l.__,(0,l.values)({EXACT:"exact",EXACT_OR_NULL:"exactOrNull",EXACT_OR_ALL_NULL:"exactOrAllNull",NOT_EXACT_SAME:"notExactSame",FUZZY:"fuzzy"})),_o=(0,l.includes)(l.__,["equals","notEquals","in"]),Ao=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return vo(t)?Ao(r):go(t)?r.filter(Vt):_o(t)?r.map((0,l.prop)("uri")).filter(Vt):[]})),l.uniq),No=(0,l.pipe)((0,l.pluck)("rule"),(0,l.chain)(Ao),l.uniq),Ro=(0,l.pipe)(Eo,No),Po=(0,l.pipe)(bo,No),So=(e,t)=>{let{interactionTypes:r=[]}=e;return(0,l.find)((0,l.propEq)("uri",t),r)},wo=(0,l.pipe)(So,qa),Io=(e,t)=>(e.interactionTypes||[]).filter(((e,t)=>r=>{let{memberTypes:n}=r;return n.some(((e,t)=>r=>{let{objectTypeURI:n}=r;return n===t||Xr(e,n,t)})(e,t))})(e,t)),Uo=e=>!!e.required,Co=(e,t,r)=>{const n=(0,l.cond)([[Vt,Kr(e)],[Gt,Ai(e)]])(t);return Lo(e,n,r)},Lo=(e,t,r)=>!t||t.hidden&&!(e=>e.uri&&Vt(e.uri)&&3===e.uri.split("/").length)(t)?[]:t.attributes?t.attributes.filter((e=>!e.hidden&&!or(e))).flatMap((t=>{const n=t.required?[t]:[];if(r){let i;if(t.type===mt.TYPE_REFERENCE){const n=vt(t),a=gt(t);i=Co(e,n,r).filter((e=>a.some(Wt(e.uri))))}else t.attributes&&(i=Lo(e,t,r));i&&n.push(...i)}return n})):t.type===mt.TYPE_REFERENCE?Co(e,vt(t),r):[],Do=e=>{const t=(0,l.pipe)((0,l.pick)(["dataLabelPattern","dataTooltipPattern","secondaryLabelPattern"]),l.values,(0,l.filter)(l.identity))(e);return(0,l.filter)((0,l.anyPass)([e=>{const r=`{${e.name}.`,n=`{${e.name}}`;return(0,l.any)((0,l.anyPass)([(0,l.includes)(n),(0,l.includes)(r)]),t)},t=>(e.businessCardAttributeURIs||[]).includes(t.uri),Uo]),e.attributes||[])},jo=(e,t)=>{const r=Nt(e);return(0,l.pipe)((0,l.filter)((e=>r.includes(e.uri))),(0,l.sort)((n=r,(e,t)=>n.indexOf(e.uri)-n.indexOf(t.uri))))(t.attributes||[]);var n},ko=(0,l.curry)(((e,t)=>{const r=(t,n)=>{if(Array.isArray(n))return n.map((e=>r(t,e)));if(n&&"object"==typeof n){const e={};for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=r(t,n[t]));return e}return"string"==typeof n&&e.includes(t)?hn().text(n):n};return r(null,t)})),Fo=["label","description","abbreviation","caption","toolTip"],xo=e=>ko(Fo,e),Mo=(0,l.curry)(((e,t)=>{const{sources:r}=e,n=Bt(t);return r.find((e=>{let{uri:t}=e;return Bt(t)===n}))})),$o=(0,l.curry)(((e,t)=>{const r=Bt(t);return(0,l.pipe)(Mo(l.__,t),(0,l.unless)(l.isNil,(0,l.propOr)(r,"label")))(e)})),Vo=e=>{let{sources:t}=e;return(null==t?void 0:t.find((0,l.propEq)("uri","configuration/sources/Reltio")))?t:null==t?void 0:t.concat({uri:"configuration/sources/Reltio",label:"Reltio",icon:"images/source/reltio.png",abbreviation:"Reltio"})},Go=(e,t)=>{let{sources:r=[]}=e;return r.find((e=>{let{uri:r,label:n}=e;return r===t||n===t||r.substring(r.lastIndexOf("/")+1)===t}))},Wo=(0,l.curry)(((e,t)=>{let{roles:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),Yo=(e,t)=>(e.roles||[]).filter((r=>{var n;return((null===(n=Kr(e,t))||void 0===n?void 0:n.entityTypeRoleURIs)||[]).includes(r.uri)}));function Bo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){qo(e,t,r[t])}))}return e}function qo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ho=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["attributes"];const i=n.reduce(((e,r)=>e.concat(t[r]||[])),[]);return Qo(i,e,t,r,n)},Qo=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["attributes"];return Z.fromNull(e&&e.length?e:_r(t,r)).map((e=>e.map((e=>{const r=Ho(t,e,n,i);return r.length?Bo({},e,{children:r}):e})))).orSome([]).filter((0,l.either)((0,l.complement)(Tr),(0,l.prop)("children"))).filter(na).filter(n).filter((0,l.either)((0,l.prop)("label"),(0,l.prop)("name")))},Ko=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Ho(e,t,r,["attributes","analyticsAttributes"])},Jo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Ho(e,t,r,["attributes"])},Xo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return Ho(e,t,r,["analyticsAttributes"])},zo=(0,l.curry)(((e,t)=>{let{groupTypes:r}=e;return(0,l.pipe)((0,l.find)((0,l.propEq)("uri",t)),(0,l.prop)("label"))(r)})),Zo=(0,l.curry)(((e,t)=>(t||[]).find((t=>{let{uri:r}=t;return Bt(r)===e})))),es=e=>{let{survivorshipStrategies:t}=e;const[r]=t||[];return(0,l.pipe)((0,l.either)((0,l.find)((0,l.propEq)("default",!0)),Zo("LUD")),(0,l.defaultTo)(r))(t||[])},ts=(e,t)=>{let{survivorshipStrategies:r}=e;return Zo(t,r)},rs=(0,l.allPass)([(0,l.complement)(l.isNil),Li(Ui.READ)]),ns=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Li(Ui.READ)]),is=(0,l.allPass)([(0,l.complement)(l.isNil),(0,l.complement)((0,l.prop)("abstract")),(0,l.complement)((0,l.propEq)("uiConfigHiddenType",!0)),Li(Ui.CREATE)]),as=(0,l.curryN)(2,(0,l.pipe)(Kr,ns)),os=e=>{let{ov:t}=e;return!1!==t},ss=(e,t)=>((e,t)=>Dr(e.type)&&ae(t))(e,t)||((e,t)=>jr(e.type)&&oe(t))(e,t),ls=(0,l.curry)(((e,t)=>(0,l.cond)([[l.isNil,(0,l.always)(null)],[(0,l.pipe)((0,l.prop)(e),Array.isArray),(0,l.path)([e,0])],[l.T,(0,l.prop)(e)]])(t))),us=ls("refEntity"),cs=ls("refRelation"),ps=e=>(0,l.isEmpty)(e)?[]:[{objectURI:e.uri,type:e.type}],ds=e=>{let{uri:t}=e;return[{type:"configuration/sources/Reltio",objectURI:`relations/${(0,l.pipe)((0,l.split)("/"),l.last)(t)}`}]},ys=(0,l.prop)("objectURI"),fs=(0,l.prop)("objectURI"),Ts=(0,l.prop)("type"),Es=(0,l.pipe)(us,(0,l.defaultTo)({}),ys),ms=(0,l.pipe)(cs,(0,l.defaultTo)({}),fs),hs=(0,l.pipe)(us,(0,l.defaultTo)({}),Ts),bs=(e,t)=>{const r=(t&&t.crosswalks||[]).map((e=>({attributes:e.attributeURIs||[],type:e.type})));return(e||[]).concat(r)},Os=(0,l.evolve)({refEntity:re,refRelation:re}),vs=(e,t,r,n)=>{const i=vr(e,r),a=Kr(e,t.type)||Ai(e,t.type);if(0===i.length)return null;const o=ur(r);let s=[t],l=1;i[0].uri!==t.type&&(l=0);let u=null;const c=n?[]:null;let p=null;for(let e=l;e<i.length;++e){const t=e===i.length-1,r=i[e];let l=[];if(!St(r,p)){u=n?[]:null;break}Array.isArray(s)&&(s.forEach((s=>{const u=s.value||s[o]||{};let d=[];r.startObject&&r.endObject||r.typeColor?(d=a.attributes.filter((e=>vt(e)===r.uri||Ot(e)===r.uri)),p=d.reduce(((e,t)=>{const r=t.referencedAttributeURIs&&t.referencedAttributeURIs.filter((function(t){return-1===e.indexOf(t)}));return r?e.concat(r):e}),[])):(d.push(r),p=null),d.forEach((a=>{const o=u[a.name];o&&(l=l.concat(o)),n&&t&&c.push({attrValues:o||[],parent:s,attrType:r,parentType:i[e-1],typePath:i})}))})),s=l),t&&(u=s)}return c||u},gs=(e,t)=>{const[r,n,...i]=t.split("/"),a=(e[r]||[]).find((e=>{let{uri:t}=e;return t.endsWith("/"+n)})),o=i.join("/");return o&&a?gs(a.value,o):a},_s=(0,l.curry)(((e,t)=>{if(!t.startsWith(e.uri))return;const[r,...n]=t.slice(e.uri.length+1).split("/"),i=n.join("/");return gs(e[r],i)})),As=(0,l.cond)([[(0,l.has)("lookupCode"),(0,l.pick)(["value","lookupCode"])],[(0,l.has)("refEntity"),(0,l.pick)(["refEntity","label","value"])],[l.T,(0,l.prop)("value")]]),Ns=(0,l.curry)(((e,t,r)=>{const[n,...i]=t;return(0,l.pipe)((0,l.defaultTo)({}),(0,l.propOr)([],n),(t=>e?t.filter(e):t),(0,l.map)(As),(0,l.when)((()=>i.length>0),(0,l.map)(Ns(e,i))))(r)})),Rs=Ns(null),Ps=Ns(os),Ss=(e,t,r)=>{var n,i,a;return e.uri===t?null==e||null===(n=e.attributes)||void 0===n?void 0:n[r]:null===(i=_s(e,t))||void 0===i||null===(a=i.value)||void 0===a?void 0:a[r]},ws=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.find)((0,l.pipe)(Es,(0,l.equals)(t))))((null==e?void 0:e.attributes)||{}),Is=Object.values(vn),Us=(0,l.includes)(l.__,Is),Cs=e=>Is.reduce(((t,r)=>{let{uri:n}=r;return void 0!==e[n]?(0,l.assoc)(n,e[n],t):t}),{});function Ls(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ds(e,t,r[t])}))}return e}function Ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const js=(e,t)=>`${e}_${t}`,ks=[In.matches.name,In.matchRules.name],Fs=(0,l.values)(_n).map((e=>e.name)),xs=e=>(0,l.when)((0,l.always)(!e),(0,l.reject)((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,Fs)))),Ms=(0,l.curry)(((e,t)=>{const r=t.filter((0,l.pipe)((0,l.prop)("name"),(0,l.includes)(l.__,ks)));return(e||[]).flatMap((e=>r.map((0,l.evolve)({label:(0,l.concat)(`${e.label} `),name:t=>js(`dtPotentialMatches.${t}`,e.id)})))).concat(t)})),$s=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(0,l.pipe)(l.values,xs(r),Ms(t),(0,l.find)((0,l.either)((0,l.propEq)("name",e),t?l.F:t=>e.startsWith(js(`dtPotentialMatches.${t.name}`,"")))))(In)},Vs=(0,l.propEq)("uri",In.type.uri),Gs=e=>(0,l.values)(wn).some((0,l.propEq)("uri",e.uri)),Ws=(0,l.propEq)("uri",Sn.sourceSystems.uri),Ys=Object.values(gn),Bs=(0,l.includes)(l.__,Ys),qs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ls({},t,{[r.uri]:void 0===n?r.defaultValue:n})},Hs=e=>{let{entity:t,attributeType:r}=e;return(0,l.dissoc)(r.uri,t)},Qs=e=>{let{entity:t,attributeType:r,value:n}=e;return Ls({},t,{[r.uri]:n})},Ks=(0,l.propEq)("uri",gn.roles.uri),Js=(0,l.propEq)("uri",gn.tags.uri);function Xs(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){zs(e,t,r[t])}))}return e}function zs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Zs=e=>{let{parentUri:t,attributeType:r}=e;return Xs({uri:Dt(t,r.name),ov:!0,type:r.uri},(e=>{const t=(0,l.propOr)("","defaultValue",e);return(0,l.cond)([[Tr,(0,l.always)({value:{}})],[hr,()=>t?{value:"",lookupCode:t}:{value:""}],[(0,l.both)((0,l.propEq)("defaultValue","now"),(0,l.pipe)((0,l.prop)("type"),Rr)),(0,l.always)({value:Date.now()})],[l.T,(0,l.always)({value:t})]])(e)})(r))},el=e=>{let{attributeTypes:t,parentUri:r,metadata:n,mode:i}=e;const a=(0,l.pipe)(Ga(i),(0,l.filter)((0,l.anyPass)([(0,l.has)("defaultValue"),br,(0,l.propEq)("required",!0)])))(t),o={};for(const e of a){const{name:t}=e,a=Zs({parentUri:r,attributeType:e});let s=_r(n,e);s&&(e.type===mt.TYPE_REFERENCE&&(s=Pt(s)),a.value=el({parentUri:a.uri,attributeTypes:s,metadata:n,mode:i})),(0,l.isEmpty)(a.value)&&!br(e)||(o[t]=[a])}return o},tl=e=>{let{entity:t,metadata:r}=e;return Co(r,t.type,!0).filter(br).reduce(((e,t)=>{const n=t.name,i=Zt(t.uri);return(i===e.type?[{parentUri:e.uri,attributes:e.attributes}]:vs(r,e,i).map((e=>{let{value:t,uri:r}=e;return{parentUri:r,attributes:t}}))).reduce(((e,r)=>{let{parentUri:i,attributes:a}=r;return a[n]&&0!==a[n].length?e:nl({entity:e,attributeType:t,parentUri:i,index:0})}),e)}),t)},rl=(0,l.curry)(((e,t)=>{let{metadata:r,attributeTypes:n,parentUri:i,mode:a}=e;const o=n.filter((e=>{let{name:r}=e;return!t[r]})),s=(0,l.mapObjIndexed)(((e,t)=>{const{type:i,attributes:o}=n.find((e=>t===e.name));return e.map((e=>{const{value:t,uri:n}=e;return i===mt.TYPE_NESTED?Xs({},e,{value:rl({attributeTypes:o,parentUri:n,metadata:r,mode:a},t)}):e}))}));return Xs({},s(t),el({attributeTypes:o,parentUri:i,metadata:r,mode:a}))})),nl=e=>{let{entity:t,attributeType:r,parentUri:n,index:i,crosswalks:a,value:o,nestingLevel:s}=e;const l=Zs({parentUri:n,attributeType:r}),u=As(l);return(0,Me.ZP)(t,(e=>{Se(e.attributes||e.value,r,l.uri,void 0!==o?o:u,a,s,i)}))},il=e=>{let{entity:t,attributeType:r,newAttribute:n,index:i,crosswalks:a,nestingLevel:o}=e;return(0,Me.ZP)(t,(e=>{Se(e.attributes||e.value,r,n.uri,As(n),a,o,i)}))},al=e=>{let{entity:t,attributeType:r,uri:n,value:i,crosswalks:a,nestingLevel:o}=e;return(0,Me.ZP)(t,(e=>{we(e.attributes||e.value,r,n,i,a,o)}))},ol=e=>{let{entity:t,attributeType:r,uri:n,nestingLevel:i}=e;return(0,Me.ZP)(t,(e=>{Ue(e.attributes||e.value,r,n,i)}))},sl=(0,l.either)((0,l.propSatisfies)((0,l.anyPass)([e=>""===e,l.isNil]),"value"),(0,l.both)((0,l.propSatisfies)(l.isEmpty,"value"),(0,l.propSatisfies)((0,l.either)(l.isNil,l.isEmpty),"refEntity"))),ll=(0,l.reject)(sl),ul=e=>{let{deleteEmptyComplex:t,valueTransformer:r=l.identity}=e;return(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.map)((0,l.pipe)(r,(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(e=>ul({deleteEmptyComplex:t,valueTransformer:r})(e)))}))),ll)),(0,l.when)((0,l.always)(t),(0,l.reject)(l.isEmpty)))},cl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ul({valueTransformer:(0,l.pipe)((0,l.omit)(["type","uri"]),Os),deleteEmptyComplex:e})},pl=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,l.pipe)(cl(e),(0,l.reject)(l.isEmpty))},dl=(0,l.curry)(((e,t)=>t.reduce(((e,t)=>{const{attributeType:r,parentUri:n,index:i}=t;return Us(r)?qs({entity:e,attributeType:r}):nl({entity:e,attributeType:r,parentUri:n,index:i})}),e))),yl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n,value:i}=t;return Us(r)?Qs({entity:e,attributeType:r,value:i}):al({entity:e,attributeType:r,uri:n,value:i})})),fl=(0,l.curry)(((e,t)=>{const{attributeType:r,uri:n}=t;return Us(r)?Hs({entity:e,attributeType:r}):ol({entity:e,attributeType:r,uri:n})})),Tl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.pipe)((0,l.filter)((0,l.pipe)((0,l.pathOr)([],["roles"]),(0,l.either)((0,l.propEq)("length",0),(0,l.any)((e=>t.includes(e)))))),(0,l.map)((0,l.pathOr)([],["attributes"])),l.flatten)(e)},El="UrlThumbnail",ml="CdnUrlThumbnail",hl=(0,l.curry)(((e,t,r)=>{const n=(0,l.prop)(e,t);if(Array.isArray(n)){const e=r?n.find(os):(0,l.head)(n);return e&&e.value}return null})),bl=(e,t)=>(0,l.pipe)((0,l.propOr)({},"value"),(r=>e.map((e=>hl(e,r,t)))),(0,l.filter)(l.identity),l.head,(0,l.defaultTo)("")),Ol=bl(["CdnUrl","Url"],!0),vl=bl(["CdnUrlPreview","UrlPreview"],!0),gl=bl([ml,El],!0),_l=bl([ml,El]),Al=(e,t,r)=>{const{attributes:n={}}=t,{analyticsAttributes:i={}}=t;return e.reduce(((e,a)=>{const o=(0,l.cond)([[lr,(0,l.always)(t)],[(0,l.both)(sr,(0,l.always)(i)),(0,l.always)(i)],[l.T,(0,l.always)(n)]])(a),s=lr(a)?"uri":"name",u=(0,l.pipe)((0,l.prop)(a[s]),(0,l.when)((0,l.both)((0,l.always)(Us(a)),(e=>null===e)),(0,l.always)([""])),(0,l.defaultTo)([]),ne)(o);return(0,l.when)((0,l.always)(r(u,a)),(0,l.append)({attrType:a,values:u}),e)}),[])},Nl=(e,t,r)=>{const n=Ya(e),i=(0,l.any)(r?l.T:os);return Al(n,t,i)},Rl=(e,t,r,n,i,a)=>{const o=jt(null==r?void 0:r.uri)?Ga(t,e):Wa(t,e);return Al(o,r,((e,o)=>{const s=zi({attributeType:o,mode:t});return n&&s||o.required&&s||(0,l.any)(i?l.T:os,e)||lr(o)&&(0,l.has)(o.uri,r)||(null==a?void 0:a.includes(o.uri))}))};let Pl;const Sl=e=>{Pl=e};function wl(e,t){return Pl(e,t)}const Il=e=>(t,r)=>new Promise(((n,i)=>{e(t,r,(e=>{n(e)}),((e,t)=>{i((0,l.when)((0,l.is)(String),(0,l.always)({errorMessage:e,errorCode:t}))(e))}),null)})),Ul=e=>{let{type:t,parents:r=[],displayNamePrefix:n,max:i=50}=e;return wl("/lookups/list",{method:"POST",body:JSON.stringify({type:t,parents:r,displayNamePrefix:n,max:i}),headers:{"Content-Type":"application/json"}})},Cl=(0,l.once)((()=>wl("/lookups",{method:"GET",headers:{"Content-Type":"application/json"}}))),Ll=e=>wl("/lookups/resolveList",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}),Dl=(e,t)=>wl("/lookups/cascadeUpdate",{method:"POST",body:JSON.stringify({state:e,updatedValue:t}),headers:{"Content-Type":"application/json"}}),jl=e=>Z.fromNull(on[e]).map(hn().text).orSome(""),kl=(0,l.curry)(((e,t)=>`${e}_${t}`)),Fl=(0,l.split)("_"),xl=(0,l.includes)("_"),Ml=(0,l.curry)(((e,t)=>e&&(e===t||e.endsWith(`_${t}`)))),$l=(0,l.curry)(((e,t)=>e.some(Ml(t)))),Vl=$l([nn.IN_RANGE,nn.COUNT_RANGE,nn.WITHIN]),Gl=$l([nn.EXISTS,nn.MISSING_VALUE]),Wl=(0,l.cond)([[Gl,(0,l.always)(0)],[Vl,(0,l.always)(2)],[l.T,(0,l.always)(1)]]),Yl=(0,l.complement)(Gl),Bl=$l([nn.HAS_ALL,nn.EQUALS,nn.NOT_EQUALS]),ql=$l([nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE,nn.COUNT_RANGE]),Hl=$l([nn.IN_FILE,nn.NOT_IN_FILE]),Ql=e=>{switch(e){case nn.COUNT_EQUALS:return nn.EQUALS;case nn.COUNT_NOT_EQUALS:return nn.NOT_EQUALS;case nn.COUNT_LT:return nn.LT;case nn.COUNT_LTE:return nn.LTE;case nn.COUNT_GT:return nn.GT;case nn.COUNT_GTE:return nn.GTE;case nn.COUNT_RANGE:return nn.IN_RANGE}},Kl=$l([nn.ON,nn.BEFORE,nn.AFTER,nn.WITHIN,nn.NOT_EQUALS]),Jl=$l([nn.WITHIN]),Xl=[[nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE],[nn.NOT_IN_FILE,nn.IN_FILE],[nn.EQUALS,nn.NOT_EQUALS,nn.HAS_ALL],[nn.LT,nn.LTE,nn.GT,nn.GTE],[nn.MISSING_VALUE,nn.EXISTS],[nn.COUNT_RANGE],[nn.IN_RANGE],[nn.STARTS_WITH,nn.CONTAINS],[nn.FULL_TEXT],[nn.ON,nn.BEFORE,nn.AFTER,nn.NOT_EQUALS],[nn.WITHIN]],zl=(e,t)=>Xl.some((r=>r.includes(e)&&r.includes(t))),Zl=(0,l.pipe)(l.omit,l.values),eu={OPTIONS_FOR_STRING:Zl(["IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_DATE:[nn.ON,nn.BEFORE,nn.AFTER,nn.WITHIN,nn.NOT_EQUALS,nn.MISSING_VALUE,nn.EXISTS,nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE,nn.COUNT_RANGE,nn.IN_FILE,nn.NOT_IN_FILE],OPTIONS_FOR_BOOLEAN:Zl(["STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","FULL_TEXT","LT","LTE","GT","GTE","CONTAINS","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_BLOB:Zl(["EQUALS","NOT_EQUALS","STARTS_WITH","IN","NOT_IN","HAS_ALL","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_NUMBER:Zl(["STARTS_WITH","FULL_TEXT","CONTAINS","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_LOOKUP:Zl(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN","CONTAINS"],nn),OPTIONS_FOR_ENUM:Zl(["STARTS_WITH","FULL_TEXT","IN_RANGE","LT","LTE","GT","GTE","ON","BEFORE","AFTER","WITHIN"],nn),OPTIONS_FOR_ID:[nn.EQUALS,nn.NOT_EQUALS,nn.IN_FILE,nn.NOT_IN_FILE],OPTIONS_FOR_COUNT:[nn.EQUALS,nn.NOT_EQUALS,nn.LT,nn.LTE,nn.GT,nn.GTE,nn.IN_RANGE],OPTIONS_FOR_COMPLEX:[nn.COUNT_EQUALS,nn.COUNT_NOT_EQUALS,nn.COUNT_LT,nn.COUNT_LTE,nn.COUNT_GT,nn.COUNT_GTE,nn.COUNT_RANGE,nn.EXISTS,nn.MISSING_VALUE],OPTIONS_FOR_UNKNOWN_TYPE:[nn.EQUALS,nn.NOT_EQUALS,nn.EXISTS,nn.MISSING_VALUE]},tu=e=>{const{type:t,singleValue:r=!1}=e,n=(e=>{switch(e){case mt.TYPE_TYPEAHEAD:case mt.TYPE_STRING:case mt.TYPE_PASSWORD:case mt.TYPE_TEXT:case mt.TYPE_CIK_ID:case mt.TYPE_URL:case mt.TYPE_BLOG_URL:case mt.TYPE_IMAGE_URL:case mt.TYPE_EMAIL:return eu.OPTIONS_FOR_STRING;case mt.TYPE_LOOKUP:case mt.TYPE_DEPENDENT_LOOKUP:return eu.OPTIONS_FOR_LOOKUP;case mt.TYPE_ENUM:return eu.OPTIONS_FOR_ENUM;case mt.TYPE_DATE:case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_TIMESTAMP:case mt.TYPE_LOCAL_DATE:return eu.OPTIONS_FOR_DATE;case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:return eu.OPTIONS_FOR_BOOLEAN;case mt.TYPE_BLOB:return eu.OPTIONS_FOR_BLOB;case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_NUMBER:return eu.OPTIONS_FOR_NUMBER;case mt.TYPE_ENTITY_ID:return eu.OPTIONS_FOR_ID;case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return[nn.EQUALS];case mt.TYPE_COUNT:return eu.OPTIONS_FOR_COUNT;case mt.TYPE_NESTED:case mt.TYPE_REFERENCE:case mt.TYPE_IMAGE:return eu.OPTIONS_FOR_COMPLEX;default:return eu.OPTIONS_FOR_UNKNOWN_TYPE}})(t);return r?(0,l.reject)(ql,n):n},ru=e=>[Qe.and,Qe.andNot].includes(e),nu=e=>[Qe.or,Qe.orNot].includes(e),iu=e=>e.slice(0,-1).some((0,l.pipe)((0,l.prop)("operator"),nu)),au=(ou=[Qe.and],e=>e.slice(0,-1).every((e=>ou.includes(e.operator))));var ou;const su=e=>e.map(((e,t,r)=>{const n=0===t;return(0,l.assoc)("operator",n?null:r[t-1].operator,e)}),[]),lu=e=>e.map(((e,t,r)=>{const n=t===r.length-1;return(0,l.assoc)("operator",n?null:r[t+1].operator,e)}),[]),uu=e=>{const t=[],r={"{":"}","[":"]","(":")"},n=(0,l.invertObj)(r);for(let i=0;i<e.length;i++){const a=e[i];if(r[a])t.push(a);else if(n[a]&&r[t.pop()]!==a)return!1}return 0===t.length},cu=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=[Qe.or,Qe.orNot],n=t?[Qe.and,Qe.andNot,...r]:r,i=n.map((e=>` ${e} `)).some((t=>e.includes(t))),a=e.startsWith("not"),o="("===(0,l.head)(e)&&")"===(0,l.last)(e)&&uu(e.slice(1,-1));return!i&&!a||o?e:`(${e})`},pu="and",du=class{constructor(){this.clauses=[]}addClause(e){return e&&(this.clauses=this.clauses.concat(e)),this}build(){return this.clauses.join(" and ")}orBuild(){return`(${this.clauses.join(" or ")})`}buildWithOperators(e){return this.clauses.reduce(((t,r,n)=>{const i=0===t.length,a=(0,l.propOr)(pu,n,e),o=(e=>[Qe.andNot,Qe.orNot].includes(e))(a)?cu(r):r;return i?o:`${t} ${a} ${o}`}),"")}},yu=(0,l.curry)(((e,t)=>{const r=(0,l.unless)(l.isNil,e);return Array.isArray(t)?t.map(r):r(t)})),fu=e=>Array.isArray(e)?e.map(fu).toString():"object"==typeof e&&"lookupCode"in e?e.lookupCode:e.toString().trim(),Tu=(0,l.replace)(/./g,(e=>{switch(e){case"\\":e="\\\\";break;case"'":e="\\'";break;case'"':e='\\"'}return e})),Eu=e=>`'${e}'`,mu=e=>`"${e}"`,hu=(0,l.pipe)(fu,Tu),bu=(0,l.pipe)(hu,Eu),Ou=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.allPass)([(0,l.always)(Vl(e)),Array.isArray]),()=>`${t[0]} - ${t[1]}`],[Array.isArray,()=>t.join(", ")],[l.T,l.identity]])(t))),vu=(e,t)=>ql(t)?{type:mt.TYPE_INT}:Hl(t)?{type:mt.TYPE_FILE}:Kl(t)&&!Jl(t)&&Pr(e.type)?{type:mt.TYPE_LOCAL_DATE}:e,gu=Object.values(pn),_u=e=>gu.includes(e),Au=e=>hn().text(dn[e]),Nu=e=>{const t=f()();switch(e){case pn.LAST_DAY:return[f()(t).subtract(1,"day").valueOf(),t.valueOf()];case pn.LAST_3DAYS:return[f()(t).subtract(3,"day").valueOf(),t.valueOf()];case pn.LAST_WEEK:return[f()(t).subtract(1,"week").valueOf(),t.valueOf()];case pn.LAST_MONTH:return[f()(t).subtract(1,"month").valueOf(),t.valueOf()];case pn.LAST_YEAR:return[f()(t).subtract(1,"year").valueOf(),t.valueOf()]}return e};function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Pu(e,t,r[t])}))}return e}function Pu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Su=(0,l.curry)(((e,t)=>t.length>1?`(${t.join(e)})`:t.toString())),wu=(0,l.curry)(((e,t,r)=>{const n=r.map(Vl(e)||t.endsWith(".count")?hu:bu).join(",");return n?`${e}(${t},${n})`:`${e}(${t})`})),Iu=e=>t=>{switch(e){case 0:return[[]];case 1:return t.map((e=>[e]));default:return t}},Uu=e=>{let{filter:t,fieldName:r,values:n}=e;const i=Wl(t);return(0,l.pipe)(Iu(i),(0,l.map)(wu(t,r)),Su(" or "))(n)},Cu=e=>{let{filter:t,fieldName:r,values:n}=e;return`${t}(${r},${(0,l.flatten)(n).map(bu).join(",")})`},Lu=e=>`*${e}*`,Du=e=>`URL:${e}`,ju=e=>e.length>1||Array.isArray(e[0])&&e[0].length>1,ku=(e,t)=>{const r="id"===t?"listEqualsCaseSensitive":"listEquals";return e===nn.IN_FILE?r:`not ${r}`},Fu=(e,t)=>[P(e,t),S(e,t)],xu=(0,l.pipe)((e=>{const{values:t,filter:r}=e,n=!Mu(e);if(!(0,l.isEmpty)(t)){const[i]=t;switch(r){case nn.ON:return Ru({},e,n?{filter:nn.EQUALS}:{filter:nn.IN_RANGE,values:[Fu(i,n)]});case nn.BEFORE:return Ru({},e,{filter:nn.LTE,values:[[S(i,n)]]});case nn.AFTER:return Ru({},e,{filter:nn.GTE,values:[[P(i,n)]]});case nn.WITHIN:return Ru({},e,{filter:nn.IN_RANGE,values:[Nu(i)]})}}return e}),Uu),Mu=(0,l.propSatisfies)(Pr,"type"),$u=[[(0,l.prop)("rawFilter"),(0,l.prop)("rawFilter")],[(0,l.propEq)("filter",nn.HAS_ALL),e=>{let{fieldName:t,values:r}=e;return(0,l.pipe)((0,l.map)((e=>e.reduce(((e,r)=>e.addClause(Uu({filter:nn.EQUALS,fieldName:t,values:[r]}))),new du).build())),Su(" or "))(r)}],[(0,l.propEq)("filter",nn.CONTAINS),e=>{let{filter:t,fieldName:r,values:n}=e;return Uu({fieldName:r,filter:t,values:n.map((0,l.pipe)(fu,Lu))})}],[(0,l.propEq)("filter",nn.EQUALS),e=>{const{fieldName:t,values:r}=e;return"type"===t?Uu(Ru({},e,{values:(0,l.flatten)(r)})):ju(r)?Cu(Ru({},e,{filter:"listEquals"})):Uu(e)}],[(0,l.propEq)("filter",nn.NOT_EQUALS),e=>{const{values:t}=e;return"type"===e.fieldName?(e=>{let{filter:t,fieldName:r,values:n}=e;const i=Wl(t);return(0,l.pipe)(Iu(i),(0,l.map)(wu(t,r)),Su(" and "))(n)})(Ru({},e,{values:(0,l.flatten)(e.values)})):Mu(e)?(e=>{const{values:t}=e,r=!Mu(e),[n]=t;return(new du).addClause(Uu(Ru({},e,{filter:nn.LT,values:[P(n,r)]}))).addClause(Uu(Ru({},e,{filter:nn.GT,values:[S(n,r)]}))).orBuild()})(e):ju(t)?Cu(Ru({},e,{filter:"not listEquals"})):Uu(e)}],[(0,l.propSatisfies)(Hl,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Uu({fieldName:r,filter:ku(t,r),values:n.map((0,l.prop)("link")).map(Du)})}],[(0,l.propSatisfies)(ql,"filter"),e=>{let{filter:t,fieldName:r,values:n}=e;return Uu({fieldName:`${r}.count`,values:n,filter:Ql(t)})}],[(0,l.propSatisfies)(Kl,"filter"),xu],[(0,l.propEq)("fieldName","geoPolygon"),e=>{let{fieldName:t,values:[r]}=e;const n=(0,l.pipe)((0,l.map)((e=>{let[t,r]=e;return`${t},${r}`})),(0,l.join)(";"))(r);return wu(t,n,[])}],[(0,l.propEq)("fieldName","geoLocation"),e=>{let{fieldName:t,values:[[r,n,i]],filter:a}=e;return wu(a,`${t},'${r},${n}',0,${i}`,[])}],[l.T,Uu]],Vu=function(){let{filter:e,fieldName:t,values:r,rawFilter:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n||e&&t&&(!Yl(e)||Wu(r))},Gu=e=>Array.isArray(e)?Wu(e):null!=e&&fu(e).length>0,Wu=e=>e&&e.length>0&&e.every(Gu);function Yu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bu=e=>{let{fieldName:t=""}=e;const r=t.split("."),n=r.indexOf("attributes");return n>=0?r.slice(0,n+2).join("."):t},qu=(0,l.pipe)((0,l.propOr)("","fieldName"),(0,l.split)("."),(0,l.slice)(0,-1),(0,l.join)(".")),Hu=(e,t,r)=>"children"===e?Ku(r,[...t][0],!0):r,Qu=(e,t,r)=>"values"===e?[...r,...t]:r,Ku=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e.findIndex((0,l.propEq)("fieldName",t.fieldName));if(n>=0){const i=e[n];if("children"in i&&"children"in t)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Hu,t),e);if(!r&&Bl(t.filter)&&t.filter===i.filter)return(0,l.adjust)(n,(0,l.mergeDeepWithKey)(Qu,t),e)}return(0,l.append)(t,e)},Ju=(0,l.reduce)(((e,t)=>{const r=(e=>{const t=Bu(e),r=e=>e.fieldName===t?e:r({fieldName:qu(e),children:[e]});return r(e)})(t);return Ku(e,r)}),[]),Xu=e=>e&&e.length>1&&!e.some((e=>{let{fieldName:t}=e;return null==t?void 0:t.startsWith("parent.")}))&&!e.every((0,l.has)("rawFilter")),zu=e=>{let[t]=e;return t.children?zu(t.children):t.operator},Zu=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function r(e){const[t,r]=(0,l.splitAt)(1,e),i=zu(t)===Qe.andNot,a=n(t,!1),o=i?`not ${cu(a)}`:a,s=n(r,!1);return`inSameAttributeValue(${o} ${zu(r)||pu} ${s})`}function n(i){let a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i.reduce(((i,o)=>i.addClause((0,l.cond)([[(0,l.has)("children"),e=>{let{children:i}=e;return a&&Xu(i)&&!t?r(i):n(i,a)}],...e])(o))),new du).buildWithOperators(i.map((0,l.prop)("operator")))}return n},ec=(0,l.pipe)((0,l.propOr)("","filter"),xl),tc=(0,l.map)((0,l.when)(ec,(e=>{const[t,r]=Fl(e.filter);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yu(e,t,r[t])}))}return e}({},e,{fieldName:`${e.fieldName}.${t}`,filter:r})}))),rc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,l.pipe)((0,l.filter)(Vu),tc,Ju,Zu([...e,...$u],t))},nc=(0,l.curry)(((e,t)=>(e&&(t=t?`(${t}) and (${e})`:e),t))),ic=[nn.ON,nn.BEFORE,nn.AFTER,nn.WITHIN,nn.NOT_EQUALS,nn.MISSING_VALUE,nn.EXISTS],ac=[nn.EQUALS,nn.NOT_EQUALS,nn.STARTS_WITH,nn.MISSING_VALUE,nn.HAS_ALL,nn.FULL_TEXT,nn.EXISTS],oc=[nn.EQUALS,nn.NOT_EQUALS,nn.LT,nn.LTE,nn.GT,nn.GTE,nn.IN_RANGE],sc=(e,t)=>{const r=ar(e);return(e=>{switch(e){case vn.startDate.name:case vn.endDate.name:case _n.dueDate.name:case Rn.createdTime.name:case Rn.updatedTime.name:case Sn.reltioLoadDate.name:case Sn.createDate.name:case Sn.updateDate.name:case Sn.deleteDate.name:case Sn.publishDate.name:return ic;case Pn.matches.name:case Sn.count.name:return oc;case _n.workflow.name:case _n.assignee.name:case _n.step.name:case An.commenter.name:case Rn.createdBy.name:case Rn.updatedBy.name:case Sn.sourceSystems.name:case Sn.value.name:return ac;default:return null}})(t)||tu(r)},lc=[nn.EQUALS,nn.NOT_EQUALS,nn.CONTAINS,nn.STARTS_WITH,nn.MISSING_VALUE,nn.HAS_ALL,nn.IN_RANGE,nn.WITHIN,nn.EXISTS,nn.ON],uc=(0,l.pipe)(sc,(0,l.filter)((0,l.includes)(l.__,lc))),cc=(0,l.unless)((0,l.startsWith)("?"),(0,l.concat)("?")),pc=e=>{let{query:t,body:r}=e;return t=cc(t),wl(`/entities/_facets${t}`,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}})},dc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e];r&&n.push({filter:"containsWordStartingWith",fieldName:"attributes",values:[r]});const i={filter:(0,l.pipe)(rc(),nc(t.globalFilter))(n),activeness:t.activityFilter||fn.ACTIVE_ONLY};return t.searchOptions&&(i.options=t.searchOptions),`/entities/_total${Gr(i)}`},yc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=dc(e,t,r);return wl(n)},fc=e=>wl(`/entities/_total?${e}`),Tc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,l.pipe)((0,l.filter)(ns),(0,l.map)((0,l.prop)("uri")))(e),i={filter:nn.EQUALS,fieldName:"type",values:n},a={filter:"containsWordStartingWith",fieldName:"attributes",values:[t]},o=(0,l.pipe)(rc(),nc(r.globalFilter))([i,a]),s=Gr({filter:o,select:"uri,label,type,roles,secondaryLabel,defaultProfilePicValue",scoreEnabled:!0,activeness:r.activityFilter||fn.ACTIVE_ONLY,max:4});return wl("/entities/_typeAheadSearch"+s,{method:"GET"})},Ec=(0,l.pipe)((0,l.reject)(l.isNil),Vr),mc=e=>{let{fieldName:t,searchParams:r=[],options:n={}}=e;const{globalFilter:i,activityFilter:a,searchOptions:o,max:s}=n,u=(0,l.pipe)(rc(),nc(i))(r),c=Ec({filter:u||null,activeness:a||"active",options:o||null}),p=[{fieldName:t,pageSize:s||20,pageNo:1,orderType:n.orderType||"reversedCount"}];return pc({query:c,body:p})},hc=e=>{let{fieldName:t,searchValue:r="",options:n}=e;const i=r.length?[{filter:"containsWordStartingWith",fieldName:t,values:[r]}]:[];return mc({fieldName:t,searchParams:i,options:n})},bc="uri,label,type,roles,secondaryLabel,defaultProfilePicValue",Oc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=[...e,{filter:"containsWordStartingWith",fieldName:"attributes",values:[r]}],i={filter:(0,l.pipe)(rc(),nc(t.globalFilter))(n),max:t.max||5,offset:t.offset,activeness:t.activityFilter||"active",select:t.select||bc,scoreEnabled:null==t.scoreEnabled||t.scoreEnabled,sort:t.sort||null,order:t.order||null};return t.searchOptions&&(i.options=t.searchOptions),`/entities${Gr(i)}`},vc=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;const n=Oc(e,t,r);return wl(n)},gc=e=>Sc(e,{select:"secondaryLabel"}),_c=(e,t)=>{const{select:r=bc,searchOptions:n,defaultMaxValues:i}=t||{},a={select:r,uris:e,options:n};return i&&(a.defaultMaxValues=i),wl("/entities/_byUris",{method:"POST",body:a,headers:{"Content-Type":"application/json"}})},Ac=(0,l.filter)((0,l.pipe)((0,l.prop)("uri"),jt)),Nc=e=>{const{parentUri:t,attributeTypeUri:r,values:n=[],offset:i,defaultMaxValues:a,tenant:o,apiPath:s,searchQuery:u,filters:c=[],sorting:p,options:d="ovOnly"}=e,y=n.length,f=Ac(n).length,T={[r]:{max:a,offset:(0,l.isNil)(i)?y-f:i}},E=Er(r),m={method:"POST",data:{attributesPaging:T,defaultMaxValues:a,options:d,select:"crosswalks,"+E}},h=[...c,{filter:"containsWordStartingWith",fieldName:E,values:[u]}],b=(0,l.pipe)(rc(),nc(d.globalFilter))(h);return b&&(m.data.filter=b),p&&(m.data.sort=p.field,m.data.order=p.order),wl(`${s}/api/${o}/${t}/_object`,m)},Rc=e=>`entities?filter=equals(uri,'${e}')&offset=0`,Pc={options:"sendHidden,addRefAttrUriToCrosswalk"},Sc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pc;return wl(`/${e}${Gr(t)}`)},wc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r={method:"POST",data:[e]},n=t("/entities");return wl(n,r)},Ic=e=>wl(`/${e}?options=sendHidden,addRefAttrUriToCrosswalk`,{method:"DELETE"}),Uc=(e,t,r)=>{const n={method:"POST",body:JSON.stringify(t)};return wl(`/${e}/_clone${Gr({valuesToCopy:r})}`,n)},Cc=e=>{let{facet:t,startTime:r,endTime:n,types:i}=e;return wl(`/entities/_events/_total${Vr({facet:t,startTime:r,endTime:n,types:i})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Lc=(e,t)=>wl(`/${e}/_setDefaultProfilePicByAttributeValueURI`,{method:"PUT",data:t}),Dc=e=>{let{uri:t,diff:r,uriPreprocessor:n=l.identity}=e;return wl(n(`/${t}/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk`),{method:"POST",data:r})},jc=e=>{let{entityUri:t,offset:r,max:n,filter:i,sort:a,order:o}=e;const s={offset:r,max:n,filter:i,sort:a,order:o};return wl(`/${t}/_interactions${(0,l.pipe)((0,l.reject)(E),Vr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},kc=e=>{const t=new FormData;return t.append("file",e),wl("/valueList",{method:"POST",headers:{"Content-Type":null},body:t}).catch((e=>{const t=pe(e,hn().text("Can't upload file"));return Promise.reject(t)}))},Fc=e=>{let{containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,countResults:s=!1,findPublic:l=!0,includes:u,startsWith:c}=e;return wl(`/personal/findSavedSearches${Vr({countResults:s,findPublic:l})}`,{method:"POST",body:JSON.stringify({containsWordStartingWith:t,sortBy:r,sortOrder:n,favoriteOnly:i,offset:a,max:o,includes:u,startsWith:c}),headers:{"Content-Type":"application/json"}})},xc=e=>wl(`/personal/savedSearches/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}}),Mc=e=>wl("/personal/savedSearches",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),$c=e=>{const{uri:t}=e,r=(0,l.pick)(["description","isFavorite","isPublic","name","query","uiState"]);return wl(`/personal/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r(e))})},Vc=e=>{let{uri:t}=e;return wl(`/personal/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Gc=(e,t)=>(0,l.pipe)((0,l.evolve)({isPublic:(0,l.always)(t)}),$c)(e),Wc=(e,t)=>(0,l.pipe)((0,l.evolve)({isFavorite:(0,l.always)(t)}),$c)(e);function Yc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Bc=["max","offset","filter"],qc=(0,l.curry)(((e,t)=>t.nextEntry?(0,l.evolve)({nextEntry:qc(e)},t):function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yc(e,t,r[t])}))}return e}({},t,(0,l.pick)(Bc,e)))),Hc=(0,l.omit)(["activeness"]),Qc=(e,t)=>{const r=(e=>{if(1===e.length&&((0,l.pathEq)([0,"activeness","entity"],He.ALL,e)||(0,l.pathEq)([0,"activeness","relation"],He.ALL,e)))return!1})(t);return t=(0,l.map)((0,l.pipe)((0,l.when)((0,l.prop)("nextEntry"),(e=>(0,l.pipe)(qc(e),(0,l.omit)(Bc))(e))),Hc,(0,l.omit)(["labels"])))(t),{url:`/${e}/_connections${Gr({limitCreditsConsumption:!0,activeness_enabled:r})}`,options:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}}},Kc=(0,l.map)((e=>{let t=e;for(;t&&t.nextEntry;)t=t.nextEntry;return t})),Jc=(0,l.reject)(l.isNil),Xc=(0,l.unless)((0,l.startsWith)("/"),(0,l.concat)("/")),zc=e=>wl(Xc(e),{method:"GET",headers:{"Content-Type":"application/json"}}),Zc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.identity;const r=(0,l.pipe)(t,Xc);return wl(r(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})},ep=e=>{let{startEntityUri:t,endEntityUri:r,relationType:n,attributes:i,startDate:a,endDate:o,uriPreprocessor:s=l.identity}=e;const u={type:n,startObject:{objectURI:t},endObject:{objectURI:r},attributes:i?pl()(i):null,startDate:a,endDate:o},c=(0,l.pipe)(Jc,ne,JSON.stringify);return wl(s("/relations"),{method:"POST",headers:{"Content-Type":"application/json"},body:c(u)})},tp=e=>{let{oldRelation:t,newRelation:r,uriPreprocessor:n=l.identity}=e;const i=(0,l.prop)("attributes"),a=(0,l.pipe)((0,l.prop)("uri"),(0,l.concat)(l.__,"/_update?options=sendHidden,updateAttributeUpdateDates,addRefAttrUriToCrosswalk"),Xc,n),o=be(i(t),i(r)).concat(ve(t,r));return wl(a(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},rp=(e,t)=>{const{url:r,options:n}=Qc(e,t);return wl(r,n).then(Kc)},np=(e,t)=>wl(`/${e}/rate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),ip=(e,t)=>{let{relatedEntityUri:r,relationType:n,relationDirection:i}=t;const a={uri:r};return i===En.IN?a.inRelations=[n]:a.outRelations=[n],wl(`/${e}/_ignoreSuggestedRelationship`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},ap=e=>{let{servicesPath:t="",environment:r,tenant:n,application:i}=e;return wl(`${t}/recentSearches${Gr({environment:r,tenant:n})}`,{method:"GET",application:i,headers:{"Content-Type":"application/json"}})},op=e=>wl("/recentSearches",{method:"POST",application:"explorer",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),sp=e=>{let{environment:t,tenant:r,createdDate:n}=e;return wl(`/recentSearches${Gr({environment:t,tenant:r,createdDate:n})}`,{method:"DELETE",application:"explorer",headers:{"Content-Type":"application/json"}})};function lp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){up(e,t,r[t])}))}return e}function up(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cp={select:"label,secondaryLabel,name,type,startDate,endDate"},pp=(0,l.reject)(l.isNil),dp=(0,l.pipe)(pp,Vr),yp=e=>{let{uri:t,graphTypes:r,activenessDate:n,isReversed:i}=e;const a=lp({},cp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},i?{options:"reverseRelations"}:{},{limitCreditsConsumption:!0});return wl(`/${t}/_tree${dp(a)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},fp=e=>{let{uri:t,graphUri:r}=e;const n=lp({},cp,r?{graphTypeURIs:r}:{},{select:"label,secondaryLabel,name,type"});return wl(`/${t}/_parents${dp(n)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Tp=e=>{let{uri:t,graphTypes:r,activenessDate:n,filterLastLevel:i=!1,deep:a=1,limitCreditsConsumption:o,max:s}=e;const l=lp({},cp,r?{graphTypeURIs:r}:{},n?{activeness_date:n}:{},o?{limitCreditsConsumption:o}:{},s?{max:s}:{},{filterLastLevel:i,deep:a});return wl(`/${t}/_hops${dp(l)}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function Ep(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const mp=()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+"-"+e()+"-"+e()+e()},hp="/activities",bp=e=>{let{label:t,description:r}=e;return wl(hp,{method:"POST",body:{label:t,description:r},headers:{"Content-Type":"application/json",ActivityID:mp()}})},Op=e=>{const t=Gr(e);return wl(hp+t,{method:"GET"})},vp=e=>wl(`/activities/_total${Gr(e)}`,{method:"GET"}),gp=e=>{const{entityUri:t}=e,r=Ep(e,["entityUri"]);return wl(`/${t}/_activities${Gr(r)}`,{method:"GET"})},_p=e=>{const{entityUri:t}=e,r=Ep(e,["entityUri"]);return wl(`/${t}/_activities/_total${Gr(r)}`,{method:"GET"})};function Ap(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Np(e,t,r[t])}))}return e}function Np(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Rp=e=>{let{workflowPath:t,tenant:r,url:n}=e;return`${t}/workflow/${r?`${r}${n}`:n}`},Pp=e=>{let{workflowPath:t,processType:r,searchString:n,tenant:i,environment:a}=e;const o={processType:r,searchString:n};return wl(Rp({url:"/processInstances/_generateFromQuery?background=true",workflowPath:t,tenant:i}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(o)})},Sp=e=>{let{workflowPath:t,url:r,tenant:n,method:i,data:a,headers:o}=e,s=r;return r.includes("http:")||r.includes("https:")||(s=Rp({url:r,workflowPath:t,tenant:n})),wl(s,{method:i||"GET",body:JSON.stringify(a),headers:Ap({"Content-Type":"application/json"},null!=o?o:{})})},wp=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a}=e;const o=Rp({url:"/processInstances",workflowPath:t,tenant:i}),s=(0,l.curry)(((e,t,r)=>{const n={processType:t,objectURIs:r};return wl(e,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(n)})}));return(0,l.pipe)((e=>e.map((t=>[e[0],t])).slice(1)),(0,l.map)(s(o,r)),(e=>Promise.all(e)),(0,l.andThen)(l.last))(n)},Ip=e=>{let{workflowPath:t,processType:r,objectURIs:n,tenant:i,environment:a,comment:o}=e;const s=Rp({url:"/processInstances",workflowPath:t,tenant:i}),l={processType:r,objectURIs:n},u=o?Ap({},l,{comment:o}):l;return wl(s,{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:a},body:JSON.stringify(u)})},Up=e=>{let{workflowPath:t,environment:r,tenant:n,entityUri:i,filter:a={},includeClosed:o}=e;const s=o;o&&(a.objectURI=i);const u=Rp({url:`/tasks${s?Gr(a):""}`,workflowPath:t,tenant:n}),c=s?{}:{body:JSON.stringify(Ap({objectURIs:[i]},(0,l.reject)(E,a)))};return wl(u,Ap({method:s?"GET":"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r}},c))},Cp=e=>{let{workflowPath:t,environment:r,tenant:n,assignee:i,max:a,offset:o}=e;return wl(Rp({url:"/tasks",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)({assignee:i,max:a,offset:o})})},Lp=e=>{let{workflowPath:t,environment:r,tenant:n,filters:i,max:a,offset:o}=e;return wl(Rp({url:"/groupTasks",workflowPath:t,tenant:n}),{method:"POST",headers:{EnvironmentURL:r},body:(0,l.pipe)((0,l.reject)(l.isNil),JSON.stringify)(Ap({max:a,offset:o},i))})},Dp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;return wl(Rp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:r}})},jp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,body:a}=e;return wl(Rp({url:`/tasks/${i}`,workflowPath:t,tenant:n}),{method:"PUT",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},kp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,comment:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{processInstanceComment:a}})},Fp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i}=e;const a={tasks:[i]};return wl(Rp({url:"/assignee",workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify(a)})},xp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,assignee:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{assignee:a}})},Mp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,dueDate:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{dueDate:a}})},$p=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,priority:a}=e;return jp({workflowPath:t,environment:r,tenant:n,taskId:i,body:{priority:a}})},Vp=e=>{let{workflowPath:t,environment:r,tenant:n,taskId:i,action:a}=e;return wl(Rp({url:`/tasks/${i}/_action`,workflowPath:t,tenant:n}),{method:"POST",headers:{"Content-Type":"application/json",EnvironmentURL:r},body:JSON.stringify({action:a})})},Gp=e=>{let{workflowPath:t,tenant:r,environment:n}=e;return wl(Rp({url:"/processDefinitions",workflowPath:t,tenant:r}),{method:"GET",headers:{"Content-Type":"application/json",EnvironmentURL:n}})},Wp=(e,t)=>t.map((t=>{let r;const n=t.split("."),i=n.shift(),a=(e[i]||[]).filter(os);return a&&a[0]&&(r=n.length>0&&a[0].value?Wp(a[0].value,[n.join(".")])[0].value:"string"==typeof a[0].label?a[0].label:Object.prototype.hasOwnProperty.call(a[0],"label")?"":a[0].value||""),{key:t,value:r}}),""),Yp=(e,t)=>{const r=new RegExp("{[^}]*}","g");let n,i=[];for(;null!=(n=r.exec(t));)i.push(n[0]);i=i.map((function(e){return e.substring(1,e.length-1)}));const a=Wp(e.attributes||e.value,i);let o;return a.every((function(e){return void 0===e.value}))?o="":(o=t,o=o.replace(/\[[^\]]*]/g,(e=>{const t=e.match(/\{[^}]*}/g);return t?t.some((function(e){return e=e.substring(1,e.length-1).trim(),a.some((function(t){return t.key===e&&void 0===t.value}))}))?"":e.substring(1,e.length-1):e})),a.forEach((e=>{o=o.replace("{"+e.key+"}",e.value||"")}))),o},Bp=/[,\s]*$/,qp=e=>{const t=hn().text(Tn);if(!e)return t;const r=e.replace(Bp,"");return""===r.toString().trim()?t:r},Hp=(e,t)=>{let{entityTypes:r}=e;const n=r.find((e=>{let{uri:r}=e;return r.endsWith(t)}));return n&&n.dataLabelPattern},Qp=(e,t,r)=>{if("string"==typeof t)return t;if("Reference"!==r.type&&"Nested"!==r.type&&"Image"!==r.type)return"";if("Reference"===r.type){const n=Hp(e,r.referencedEntityTypeURI);if(n)return Yp({attributes:t||{}},n)}else if(("Nested"===r.type||"Image"===r.type)&&r.dataLabelPattern)return Yp({attributes:t||{}},r.dataLabelPattern);return""},Kp=e=>{let{uiPath:t,uri:r}=e;const n=new URL(t),[,i]=n.pathname.split("/");return"nui"===i?`${t}profile?entityUri=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.entity.default.DefaultPerspective_e~${r}`},Jp=e=>{let{uiPath:t,tag:r,entityUri:n}=e;const i=new URL(t),[,a]=i.pathname.split("/");return"nui"===a?`${t}tags?entityUri=${encodeURIComponent(n)}&tag=${encodeURIComponent(r)}`:`${t}#p~com.reltio.plugins.tags.TagPerspective_e~${encodeURIComponent(n)}_tag~${encodeURIComponent(r)}`},Xp=(e,t)=>t?t.startsWith("http:")||t.startsWith("https:")?t:e+"/"+t.replace(/^\/+/,""):"",zp=(0,l.when)((0,l.is)(Object),(0,l.ifElse)((0,l.pipe)((0,l.prop)("value"),(0,l.is)(Object)),gl,(0,l.prop)("value"))),Zp=(0,l.pipe)((0,l.prop)("defaultProfilePicValue"),zp),ed=(e,t,r)=>{const n=Zp(r)||(e=>(0,l.pipe)((0,l.prop)("defaultProfilePic"),(0,l.when)(l.identity,(0,l.pipe)(_s(e),zp)))(e))(r)||((e,t)=>{const r=(e=>{const t=t=>`${e.uri}/attributes/${t}`,r=(e=e||{}).imageAttributeURIs||[];return(0,l.uniq)([t("ImageGallery"),...r,t("Image"),t("ImageLinks")])})(Kr(e,t.type));return(0,l.pipe)((0,l.map)((0,l.pipe)((r=>vs(e,t,r)),(0,l.defaultTo)([]),l.head)),(0,l.reject)(l.isNil),l.head,(0,l.when)(l.identity,zp))(r)})(e,r)||tn(e,r.type);return Xp(t,n)};function td(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){rd(e,t,r[t])}))}return e}function rd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const nd="DTSS/",id=(0,l.replace)(new RegExp("^entities/"),""),ad=e=>nd+e.dataTenant+"/"+e.uri,od=(0,l.replace)(new RegExp("^DTSS/.+?/"),""),sd=e=>!(!e||!e.dataTenant),ld=(0,l.startsWith)(nd),ud=(0,l.pipe)((0,l.ifElse)(ld,(0,l.pipe)((0,l.split)("/"),(0,l.nth)(1)),(0,l.always)(null))),cd=(0,l.ifElse)(sd,ad,(0,l.prop)("uri")),pd=e=>e&&e.uri?e.dataTenant?ad(e):id(e.uri):"",dd=(0,l.curry)(((e,t,r)=>(Kr(t,r.type)||{})[e]||"")),yd=dd("label"),fd=dd("typeGraphIcon"),Td=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Kr(e,t.type)||{},n=(r.attributes||[]).reduce(((e,t)=>(e[t.uri]=t,e[t.name]=t,e)),{});return t.attributes&&r.businessCardAttributeURIs?r.businessCardAttributeURIs.map((r=>{const i=n[r];if(!i)return null;let a=t.attributes[i.name];if(!a)return null;Array.isArray(a)&&(a=a.find(os)||"");const o=null!=a.label?(a.relationshipLabel?a.relationshipLabel+", ":"")+a.label:a.value;return{text:Qp(e,o,i),uri:a.uri}})).filter(l.identity):[]},Ed=(0,l.pipe)(Td,(0,l.map)((0,l.prop)("text")),(0,l.join)(", ")),md=(0,l.curry)(((e,t)=>{if(!t)return[];if(1===e.length){return t[e[0]]||[]}{const r=t[e[0]];return Array.isArray(r)?r.reduce(((t,r)=>{if((0,l.is)(Object,r.value)){const n=md(e.slice(1),r.value);n&&(Array.isArray(n)?t=t.concat(n):t.push(n))}return t}),[]):md(e.slice(1),r)}})),hd=e=>!!e&&!!e.ctSubscribedUris&&e.ctSubscribedUris.length>0,bd=e=>(0,l.propOr)([],"matchRules",e),Od=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t&&r?td({},r.aEntity,{attributes:n.attributes||{},roles:n.roles||[],tags:n.tags||[]}):e},vd=(e,t,r)=>t&&r?r.aEntity:e,gd=e=>{let{entityUri:t,max:r,deep:n,sort:i,order:a,activeness:o,filter:s,markMatchedValues:u,sources:c,rules:p}=e;const d={max:r,deep:n,filter:s,markMatchedValues:u,sort:i,order:a,activeness:o,sources:c,rules:p};return wl(`/${t}/_transitiveMatches${(0,l.pipe)((0,l.reject)(E),Vr)(d)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},_d=e=>{let{entityUri:t,max:r,sort:n,order:i,activeness:a,filter:o}=e;const s={max:r,filter:o,sort:n,order:i,activeness:a};return wl(`/${t}/_notMatch${(0,l.pipe)((0,l.reject)(E),Vr)(s)}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ad=(e,t)=>{const r=(0,l.map)((0,l.prop)("uri"))(t);return wl("/entities/_same",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r.concat(e))})},Nd=(e,t,r)=>Promise.all(t.map((async t=>{await wl(`/${t.uri}/_notMatch?uri=${e}`,{method:"NOT"===r?"POST":"DELETE",headers:{"Content-Type":"application/json"}})}))),Rd=async(e,t)=>await Nd(e,t,"NOT"),Pd=async(e,t)=>await Nd(e,t,"MATCH"),Sd=async(e,t)=>await Promise.all(t.map((async t=>{await wl(`/${t.uri}/_setAMatch?uri=${e}`,{method:"POST",headers:{"Content-Type":"application/json"}})})));function wd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Id(e,t,r[t])}))}return e}function Id(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ud(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const Cd=e=>{let{dtssPath:t,customerTenant:r,entity:{dataTenant:n,uri:i}}=e;return wl(`${t}entities/_import?dataEntityUri=${i}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},Ld=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return zd({url:`entities/_connections/_hasNonImported?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},Dd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,entityUri:i,content:a}=e;return zd({url:`entities/_connections/_import?customerEntityUri=${i}`,dataTenant:n,customerTenant:r,dtssPath:t,options:{method:"POST",headers:{"Content-Type":"application/json"},data:JSON.stringify(a)}})},jd=e=>{let{dtssPath:t,customerTenant:r,dataTenant:n,dataEntityUri:i,customerEntityUri:a}=e;return wl(`${t}entities/_merge?dataEntityUri=${i}&customerEntityUri=${a}`,{method:"POST",headers:{DataTenant:n,CustomerTenant:r,"Content-Type":"application/json"}})},kd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{dataTenant:a,uri:o}=n;return Promise.all(i.map((e=>{let{uri:n}=e;return jd({dtssPath:t,customerTenant:r,dataTenant:a,customerEntityUri:n,dataEntityUri:o})})))},Fd=e=>{let{dtssPath:t,customerTenant:r,entity:n,entities:i}=e;const{uri:a}=n,[o,s]=(0,l.partition)(sd,i);return Promise.all([s.length?Ad(a,s):Promise.resolve(),...o.map((e=>{let{uri:n,dataTenant:i}=e;return jd({dtssPath:t,customerTenant:r,dataTenant:i,customerEntityUri:a,dataEntityUri:n})}))])},xd=(0,l.pipe)(l.toPairs,(0,l.chain)((e=>{let[t,r]=e;return r.map((0,l.assoc)("matchRule",t))})),(0,l.reduce)(((e,t)=>{let{matchRule:r}=t,n=Ud(t,["matchRule"]);const i=e.findIndex((e=>{let{object:{uri:t}}=e;return n.uri===t}));return-1===i?e.concat({object:n,matchRules:[r]}):(0,l.adjust)(i,(0,l.evolve)({matchRules:(0,l.append)(r)}),e)}),[])),Md=(0,l.pipe)((0,l.find)((0,l.propEq)("index",0)),(0,l.propOr)({},"object"),xd),$d=e=>{let{dtssPath:t,customerTenant:r,entity:n}=e;const{uri:i,dataTenant:a}=n;return wl(`${t}entities/_matchesForDtEntities?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:a,CustomerTenant:r,"Content-Type":"application/json"},body:JSON.stringify([i])}).then(Md)},Vd=e=>t=>{let{dtssPath:r,dataTenants:n=[],customerTenant:i,entity:a}=t;return Promise.all(n.map((t=>{let{id:n}=t;return e({dtssPath:r,dataTenant:n,customerTenant:i,entity:a}).then((0,l.map)((0,l.assocPath)(["object","dataTenant"],n))).catch((e=>(console.log(e),[])))}))).then(l.flatten)},Gd=Vd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a,type:o}=i;return wl(`${t}entities/_matches?skipAllImportedEntities=true`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{uri:a,type:o}])}).then(Md)})),Wd=Vd((e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,entity:i}=e;const{uri:a}=i;return wl(`${t}entities/_notMatch?returnObjects=true&customerEntityUri=${a}`,{method:"GET",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"}})})),Yd=(e,t)=>{let{dtssPath:r,dataTenants:n=[],entity:i,customerTenant:a,dtssRequest:o}=e;return function(){if(r&&n&&n.length){const e=o({dtssPath:r,dataTenants:n,entity:i,customerTenant:a});return Promise.all([t(...arguments),e]).then(l.flatten)}return t(...arguments)}},Bd=e=>t=>{let{dtssPath:r,customerTenant:n,dataTenant:i,dataEntityUri:a,customerEntityUri:o}=t;return wl(`${r}entities/_notMatch?dataEntityUri=${a}&customerEntityUri=${o}`,{method:"NOT"===e?"POST":"DELETE",headers:{DataTenant:i,CustomerTenant:n,"Content-Type":"application/json"}})},qd=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{dataTenant:o,uri:s}=i;return Promise.all(a.map((t=>{let{uri:i}=t;return Bd(e)({dtssPath:r,customerTenant:n,dataTenant:o,customerEntityUri:i,dataEntityUri:s})})))},Hd=qd("NOT"),Qd=qd("MATCH"),Kd=e=>t=>{let{dtssPath:r,customerTenant:n,entity:i,entities:a}=t;const{uri:o}=i,[s,u]=(0,l.partition)(sd,a);return Promise.all([Nd(o,u,e),...s.map((t=>{let{uri:i,dataTenant:a}=t;return Bd(e)({dtssPath:r,customerTenant:n,dataTenant:a,customerEntityUri:o,dataEntityUri:i})}))])},Jd=Kd("NOT"),Xd=Kd("MATCH");function zd(e){let{requestProvider:t=wl,url:r,options:n,dataTenant:i,customerTenant:a,dtssPath:o}=e;r=o.endsWith("/")&&r.startsWith("/")?r.slice(1):r;const s=n||{},{headers:l}=s;return t(`${o}${r}`,wd({},Ud(s,["headers"]),{headers:wd({},l,{SearchMetadata:"AUTO",DataTenant:i,customerTenant:a})}))}const Zd=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return zd({url:Oc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ey=e=>{let{filters:t,options:r,value:n="",dataTenant:i,customerTenant:a,dtssPath:o}=e;return zd({url:dc(t,r,n),dataTenant:i,customerTenant:a,dtssPath:o})},ty=e=>{let{entityUri:t,configs:r,dataTenant:n,customerTenant:i,dtssPath:a}=e;const{options:o}=Qc(t,r);return zd({url:`entities/_connections/_getConnections?dataEntityUri=${t}`,options:o,dataTenant:n,customerTenant:i,dtssPath:a}).then((0,l.pipe)(Kc,(0,l.map)((0,l.evolve)({connections:(0,l.map)((0,l.pipe)((0,l.assocPath)(["entity","dataTenant"],n),(0,l.assocPath)(["relation","dataTenant"],n)))}))))},ry=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return zd({url:`${Rc(t)}&select=secondaryLabel`,dataTenant:r,customerTenant:n,dtssPath:i})},ny=e=>{let{dtssPath:t,dataTenant:r,customerTenant:n,value:i,type:a,sourceTable:o}=e;return wl(`${t}entities/_unmerge`,{method:"POST",headers:{DataTenant:r,CustomerTenant:n,"Content-Type":"application/json"},body:JSON.stringify([{value:i,type:a,sourceTable:o}])})},iy=e=>{let{dtssPath:t,tenant:r}=e;return wl(`${t}tenants/customerTenants?id=${r}&useCache=true`,{method:"GET"})},ay=e=>{let{dtssPath:t,customerTenant:r}=e;return wl(`${t}subscriptions?useCache=true`,{method:"GET",headers:{CustomerTenant:r}})},oy=e=>{let{dtssPath:t,tenants:r}=e;return wl(`${t}tenants/dataTenants?id=${r}&useCache=true`,{method:"GET"})},sy=e=>{let{entityUri:t,dataTenant:r,customerTenant:n,dtssPath:i}=e;return zd({url:Rc(t),dataTenant:r,customerTenant:n,dtssPath:i})},ly=()=>wl("/configuration?options=showAccess&showHiddenMatchRules=true",{method:"GET"});function uy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cy(e,t,r[t])}))}return e}function cy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const py=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i}=e;const{select:a}=i,o=uy({},n,{ordered:"true",orderBy:"LastName,FirstName",from:0,max:100},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(i,["select"]));return wl(`${t}/api/${r}/graph/search${Gr({select:a})}`,{method:"POST",body:o,headers:{"Content-Type":"application/json"}})},dy=e=>{let{apiPath:t,tenant:r,searchBody:n,options:i={}}=e;return wl(`${t}/api/${r}/graph/search/count`,{method:"POST",body:uy({},n,i),headers:{"Content-Type":"application/json"}})},yy=(e,t)=>`${e}/${t}/comments`,fy=e=>{let{collaborationPath:t,tenant:r,uris:n}=e;return wl(`${yy(t,r)}/count`,{method:"POST",body:n,headers:{"Content-Type":"application/json"}})},Ty=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return wl(`${yy(t,r)}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ey=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return wl(yy(t,r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([n])})},my=e=>{let{collaborationPath:t,tenant:r,data:n}=e;return wl(`${yy(t,r)}/${n.commentId}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})},hy=e=>{let{collaborationPath:t,tenant:r,commentId:n}=e;return wl(`${yy(t,r)}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},by=e=>{let{collaborationPath:t,tenant:r,commentId:n,data:i}=e;return wl(`${yy(t,r)}/${n}/replies`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([i])})},Oy=e=>{let{collaborationPath:t,tenant:r,maxResults:n=10,relatedObjectUri:i,sort:a="modifiedTime",order:o="desc",pageToken:s=null}=e;const l=Gr({maxResults:n,relatedObjectUri:i,sort:a,order:o,pageToken:s});return wl(`${yy(t,r)}${l}`,{method:"GET",headers:{"Content-Type":"application/json"}})};function vy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gy(e,t,r[t])}))}return e}function gy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _y=e=>{let{tenant:t,servicesPath:r}=e;return wl(`${r}/oauth/proxy${Gr({url:"/oauth/users/tenant/{0}",params:t})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Ay="graphExport",Ny=async(e,t,r,n,i)=>{let a;try{const{data:n={}}=await wy({servicesPath:e,tenant:t,environment:r,namespace:Ay,options:{method:"GET",headers:{"Content-Type":"application/json"}}});a=n}catch(e){a={}}const o={body:JSON.stringify(vy({},a,{[n]:i})),headers:{"Content-Type":"application/json"}};let s;try{s=await wy({servicesPath:e,tenant:t,environment:r,namespace:Ay,options:vy({method:"PUT"},o)})}catch(e){s=null}return s||(s=await wy({servicesPath:e,tenant:t,environment:r,namespace:Ay,options:vy({method:"POST"},o)})),s},Ry=e=>{let{servicesPath:t,key:r}=e;return wl(`${t}/settings${Gr({key:r})}`,{method:"GET",headers:{"Content-Type":"application/json"}})},Py=e=>{let{servicesPath:t}=e;return wl(`${t}/version/collect`,{method:"POST",headers:{"Content-Type":"application/json"}})},Sy=e=>{let{tenant:t,userName:r,servicesPath:n}=e;return wl(`${n}/plugins${Gr({tenant:t,user:r})}`,{method:"GET"})},wy=e=>{let{tenant:t,environment:r,servicesPath:n,options:i,namespace:a,projection:o}=e;return wl(`${n}/configService${Gr({tenant:t,environment:r,namespace:a,projection:o})}`,i)},Iy=e=>{let{tenant:t,environment:r,servicesPath:n}=e;return wy({tenant:t,environment:r,servicesPath:n,projection:"apps",options:{method:"GET"}})},Uy=e=>{let{servicesPath:t,stateHash:r}=e;return wl(`${t}/searchLink?key=${r}`,{method:"GET"})},Cy=e=>{let{imageServicePath:t,environment:r,tenant:n,image:i}=e;const a=new FormData;return"string"==typeof i?(a.append("sourceUrl",i),a.append("upload","false")):a.append("file",i),wl(`${t}/${r}/${n}`,{body:a,method:"POST",application:"common",headers:{"Content-Type":null}})},Ly=e=>wl(`/${e}?showObjectsInfo=true`,{method:"GET"}),Dy=e=>{let{exportPath:t,tenant:r,options:n}=e;return wl(`${t}/${r}/activities${Gr(n)}`,{method:"POST"})};function jy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ky(e,t,r[t])}))}return e}function ky(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fy=e=>{const{entityUri:t}=e;return wl(`/${t}/_crosswalkTree`,{method:"GET",headers:{"Content-Type":"application/json"}})},xy=e=>{let{entityUri:t,crosswalk:r}=e;return wl(`/${t}/crosswalks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([r])})},My=e=>{let{entityTypeUri:t,contributorCrosswalkType:r,contributorCrosswalkValue:n,contributorCrosswalkSourceTable:i,crosswalkType:a,crosswalkValue:o,crosswalkSourceTable:s,crosswalkDeleteDate:l}=e;return wl("/entities?options=partialOverride",{method:"POST",headers:{"Content-Type":"application/json"},noReltioSourceSystem:!0,body:JSON.stringify([{attributes:{},crosswalks:[jy({type:r,value:n,dataProvider:!1,contributorProvider:!0},i&&{sourceTable:i}),jy({type:a,value:o,dataProvider:!0},s&&{sourceTable:s},l&&{deleteDate:l})],type:t}])})},$y=e=>{const{contributorUri:t,entityUri:r,operationType:n}=e;return wl(`/${r}/_${n}${Gr({contributorURI:t})}`,{method:"POST"})},Vy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n,value:i}=e;return wl(`/${t}/crosswalks/${r}/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:i})})},Gy=e=>{let{entityUri:t,crosswalkId:r,attributeName:n}=e;return wl(`/${t}/crosswalks/${r}/${n}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})},Wy=e=>{let{entityUri:t,crosswalkId:r}=e;return wl(`/${t}/crosswalks/${r}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})};function Yy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const By=e=>{let{entityTypeUri:t}=e;return wl(`/dataQuality/fillRates${Vr({entityType:Bt(t)})}`,{method:"GET"})},qy=e=>{let{entityTypeUri:t,attributes:r,dataLevel:n,metrics:i}=e;const a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Yy(e,t,r[t])}))}return e}({},n===at.ATTRIBUTE_TYPE?{attributes:r}:{},i?{metrics:i}:{});return wl(`/entityType/${Bt(t)}/dataQuality/${n}`,{method:"POST",body:JSON.stringify(a)})},Hy=e=>{let{dvfPath:t,tenant:r,entityTypeUri:n,env:i}=e;return wl(`${t}/api/${r}/dataValidationFunctions/entityTypes/${Bt(n)}`,{method:"GET",headers:{env:i}})},Qy=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i}=e;return wl(`/${t}${Gr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"DELETE",headers:r?{"Source-System":r}:{}})},Ky=e=>{let{attributeUri:t,value:r}=e;return wl(`/${t}/pin`,{method:"PUT",body:JSON.stringify({value:r})})},Jy=e=>{let{attributeUri:t,value:r}=e;return wl(`/${t}/ignore`,{method:"PUT",body:JSON.stringify({value:r})})},Xy=e=>{let{attributeUri:t,sourceUri:r,crosswalkValue:n,crosswalkSourceTable:i,value:a}=e;return wl(`/${t}${Gr({crosswalkValue:n,crosswalkSourceTable:i})}`,{method:"PUT",headers:r?{"Source-System":r}:{},body:JSON.stringify({value:a})})},zy=e=>{let{attributeUri:t,crosswalkValue:r,crosswalkSourceTable:n,sourceUri:i,value:a}=e;const o=Gr({crosswalkValue:r,crosswalkSourceTable:n}),s=t.split("/").slice(0,-1).join("/"),[l]=pl()([[{value:a}]]);return wl(`/${s}${o}`,{method:"POST",headers:i?{"Source-System":i}:{},body:JSON.stringify(l)})},Zy=e=>{let{entityUri:t,attributeName:r,value:n}=e;return wl(`/${t}/activeness`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:n})})},ef=e=>{let{entityUri:t,attributeName:r}=e;return wl(`/${t}/activeness/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})};function tf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const rf=e=>{let{entityUri:t}=e;return wl(`/${t}/_historicURIs`,{method:"GET"})},nf=e=>{let{entityUri:t,historicUris:r}=e,n=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["entityUri","historicUris"]);return wl(`/${t}/_changesWithTotal${Gr(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){tf(e,t,r[t])}))}return e}({},n,{historicURIs:null==r?void 0:r.join(",")}))}`,{method:"GET"})},af=(e,t)=>wl(`/${e}/_previousChange${Gr({timestamp:t})}`,{method:"GET"}),of=(e,t)=>wl(`/${e}${Gr({time:t})}`,{method:"GET"});function sf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){lf(e,t,r[t])}))}return e}function lf(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const uf=e=>{let{url:t,method:r,data:n,headers:i}=e;return wl(t,sf({method:r||"GET"},n?{body:JSON.stringify(n)}:{},{headers:sf({"Content-Type":"application/json"},null!=i?i:{})}))},cf=e=>{let{validationServicePath:t,uri:r,diff:n,tenant:i,options:a=[],severity:o=[]}=e;const s=Gr({options:a.join(","),severity:o.join(",")});return wl(`${t}/validate/${i}/entity/${pd({uri:r})}${s}`,{method:"POST",headers:{"Content-Type":"application/json"},body:n})},pf=e=>{let{validationServicePath:t,entity:r,tenant:n,options:i=[],severity:a=[]}=e;return wl(`${t}/validate/${n}/entity${Gr({options:i.join(","),severity:a.join(",")})}`,{method:"POST",headers:{"Content-Type":"application/json"},body:r})},df=e=>{let{tenant:t,apiPath:r}=e;return wl(`${r}/tenants/${t}/name`,{method:"GET"})},yf=e=>{let{tenant:t,apiPath:r}=e;return wl(`${r}/tenants/${t}/_rdmTenants`,{method:"GET"})},ff=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e;return wl(`${a}/preferences${Gr({name:t,tenant:r,environment:n,user:i})}`,{method:"GET"})},Tf=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a,value:o}=e,s={name:t,tenant:r,environment:n,user:i,values:[JSON.stringify(o)]};return wl(`${a}/preferences`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})},Ef=e=>{const{name:t,tenant:r,environment:n,user:i,servicesPath:a}=e,o={name:t,tenant:r,environment:n,user:i};return wl(`${a}/preferences`,{method:"DELETE",body:JSON.stringify(o)})};var mf=r(29524);const hf=e=>{let{entityTypeUri:t,initValue:r,attributeTypes:n,metadata:i,mode:a}=e;const o=kt(),s={attributes:el({attributeTypes:n,parentUri:o,metadata:i,mode:a}),uri:o,type:t,timestamp:Date.now()};return r?function(e,t,r){const n=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[]).find((e=>!e.lookupCode&&!e.dependentLookupCode&&"String"===e.type));if(n){const i=vs(r,e,n.uri)[0];return i&&i.value?al({entity:e,attributeType:n,uri:i.uri,value:t}):nl({entity:e,attributeType:n,parentUri:e.uri,value:t,index:0})}return e}(s,r,i,n):s},bf=(e,t)=>(0,l.pipe)(l.values,l.flatten,(0,l.filter)((0,l.has)("refEntity")),(0,l.map)(Es),(0,l.filter)(jt),(0,l.map)((t=>e[t])),(0,l.reject)(l.isNil))((null==t?void 0:t.attributes)||{}),Of=(0,l.curry)(((e,t)=>{const r=bf(e=e||{},t=t||{});return r.concat((0,l.chain)(Of(e),r))})),vf=(0,l.curry)(((e,t)=>(0,l.pipe)(ce,(0,l.filter)(e))(t))),gf=vf((e=>"objectURI"===e[e.length-1]&&e.includes("refEntity"))),_f=e=>(0,l.filter)((0,l.pipe)((t=>(0,l.path)(t,e)),jt)),Af=e=>(0,l.pipe)(gf,_f(e),(0,l.map)((t=>(0,l.path)(t,e))))(e),Nf=(0,l.curry)(((e,t,r)=>{const n=(0,l.pipe)(gf,(0,l.find)((t=>(0,l.pathSatisfies)((t=>t===e),t,r))))(r);return n?(0,l.set)((0,l.lensPath)(n),t,r):r})),Rf=(0,l.when)((0,l.pipe)((0,l.prop)("uri"),jt),(0,l.omit)(["uri","timestamp"])),Pf=(0,l.pipe)(Rf,(0,l.evolve)({attributes:pl(!0)})),Sf=async(e,t,r,n)=>{const i=e[t];if(!i)return null;const a=Af(i);if(a.length>0)for(const t of a)e=Nf(t,r[t].uri,e);const o=await wc(Pf(e[t]),null==n?void 0:n.enhanceUriWithDCR),s=(e=>(0,l.path)([0,"errors"],e))(o);if(s)throw s;const u=(e=>(0,l.pathOr)(e,[0,"object"],e))(o);return null==n||n.updateDCRUriFromResponse(u),u},wf=async(e,t,r)=>{const n=Uf(e,t),i={};for(const t of n)i[t]=await Sf(e,t,i,r);return i},If=(0,l.curry)(((e,t)=>{const r=mf.Node(t);return Af(e[t]).forEach((t=>{const n=If(e,t);r.addEdge(n)})),r})),Uf=(e,t)=>(0,l.pipe)((0,l.map)(If(e)),(0,l.map)(mf.getDependencyOrder),l.flatten,(0,l.map)((e=>e.getInfo())))(t),Cf=(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)(Rf))})),Lf=(e,t)=>{const r=Ae(e.tags||[],t.tags||[]),n=Ne(e.roles||[],t.roles||[]),i=Oe(e,t),a=ve(e,t);return[...ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!1),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))),...r,...n,...i,...a]},Df=(0,l.pipe)(((e,t)=>{const r=(0,l.toPairs)(e);return(0,l.map)((0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.map)((e=>r.reduce(((e,t)=>{let[r,n]=t;return Nf(r,n,e)}),e))))}),t)}),Cf),jf=(0,l.curry)(((e,t)=>(0,l.when)(jt,(0,l.propOr)(l.__,t,e),t)));function kf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ff(e,t,r[t])}))}return e}function Ff(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xf=e=>{let{parentUri:t,relation:r,entityUri:n}=e;return{type:ot.CREATE_RELATION,parameters:{parentUri:t,relation:r,entityUri:n}}},Mf=e=>{let{relationUri:t}=e;return{type:ot.DELETE_RELATION,parameters:{relationUri:t}}},$f=e=>{let{parentUri:t,entityUri:r,relationType:n,relationDirection:i}=e;return{type:ot.IGNORE_RELATION,parameters:{parentUri:t,entityUri:r,relationType:n,relationDirection:i}}},Vf=e=>{let{oldRelation:t,newRelation:r}=e;return{type:ot.UPDATE_RELATION,parameters:{oldRelation:t,newRelation:r}}},Gf=e=>{let{entityUri:t,newEntityUri:r,relation:n,isReversed:i}=e;return{type:ot.REPOINT_RELATION,parameters:{entityUri:t,newEntityUri:r,relation:n,isReversed:i}}},Wf=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pathEq)(["parameters","relation","uri"],e),l.T],[(0,l.pathEq)(["parameters","relationUri"],e),l.T],[(0,l.pathEq)(["parameters","oldRelation","uri"],e),l.T],[(0,l.pathEq)(["parameters","newRelation","uri"],e),l.T],[l.T,l.F]])(t))),Yf=e=>e.type===ot.DELETE_RELATION,Bf=e=>e.type===ot.CREATE_RELATION,qf=e=>e.type===ot.REPOINT_RELATION,Hf=e=>e.type===ot.UPDATE_RELATION,Qf=e=>e.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve()),Kf=e=>{let{type:t,parameters:r,dcrProcessor:n}=e;const{enhanceUriWithDCR:i,updateDCRUriFromResponse:a}=n,o=e=>(a(e),e);switch(t){case ot.CREATE_RELATION:return()=>{const{parentUri:e,relation:t,entityUri:n}=r,{type:a,attributes:s,startDate:l,endDate:u}=t;return ep({startEntityUri:e,endEntityUri:n,relationType:a,attributes:s,startDate:l,endDate:u,uriPreprocessor:i}).then(o)};case ot.DELETE_RELATION:return()=>{const{relationUri:e}=r;return Zc(e,i).then(o)};case ot.IGNORE_RELATION:return()=>{const{entityUri:e,parentUri:t,relationType:n,relationDirection:i}=r;return ip(t,{relatedEntityUri:e,relationType:n,relationDirection:i}).then(o)};case ot.UPDATE_RELATION:return()=>{const{oldRelation:e,newRelation:t}=r;return tp({oldRelation:e,newRelation:t,uriPreprocessor:i}).then(o)};case ot.REPOINT_RELATION:return()=>{const{entityUri:e,newEntityUri:t,relation:i,isReversed:a}=r,{uri:o}=i,s=[Mf({relationUri:o}),xf({parentUri:a?e:t,relation:i,entityUri:a?t:e})];return(0,l.pipe)((0,l.map)(Jf(n)),(0,l.map)(Kf),Qf)(s)}}},Jf=e=>t=>kf({dcrProcessor:e},t),Xf=function(){let{alwaysCreateDCR:e=!1,dcrUri:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysCreateDCR:!1,dcrUri:null};const r=Wr({alwaysCreateDCR:e,dcrUri:t});return{commandExecutor:(0,l.pipe)(l.flatten,(0,l.map)(Jf(r)),(0,l.map)(Kf),Qf,(0,l.otherwise)((e=>({errorMessage:e})))),dcrProcessor:r}},zf=e=>t=>(0,l.map)((t=>kf({},t,{parameters:(0,l.evolve)({parentUri:jf(e),entityUri:jf(e),newEntityUri:jf(e)},t.parameters)})),t),Zf=e=>{let{condition:t,updater:r}=e;return e=>t(e)?r(e):e},eT=(e,t)=>{const r=e.filter(Bf).find(Wf(t));let n=null,i=null,a=null;const o=e.filter(((o,s)=>Hf(o)&&Wf(t,o)?(s>e.indexOf(r)&&(n=o.parameters.newRelation),!1):!qf(o)||!Wf(t,o)||(s>e.indexOf(r)&&(n=o.parameters.relation,i=o.parameters.isReversed?o.parameters.entityUri:o.parameters.newEntityUri,a=o.parameters.isReversed?o.parameters.newEntityUri:o.parameters.entityUri),!1)));return n?o.map(Zf({condition:e=>r===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n),parentUri:e=>i||e,entityUri:e=>a||e})})(e)})):o},tT=(e,t)=>{const r=e.filter(qf).filter(Wf(t));let n=null;const i=e.filter(((i,a)=>r.includes(i)?(0,l.last)(r)===i:!Hf(i)||!Wf(t,i)||(a>e.indexOf((0,l.last)(r))&&(n=i.parameters.newRelation),!1)));return n?i.map(Zf({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({relation:(0,l.always)(n)})})(e)})):i},rT=(e,t)=>{const r=e.filter(Yf).filter(Wf(t));return e.filter((e=>r.includes(e)?(0,l.last)(r)===e:!Wf(t,e)))},nT=(e,t)=>{const r=e.filter(Hf).filter(Wf(t));let n=null;const i=e.filter((e=>!r.includes(e)||!Hf(e)||(n=n||e.parameters.oldRelation,(0,l.last)(r)===e)));return n?i.map(Zf({condition:e=>(0,l.last)(r)===e,updater:e=>(0,l.evolve)({parameters:(0,l.evolve)({oldRelation:(0,l.always)(n)})})(e)})):i},iT=e=>{const t=e.filter(Yf).map((e=>{let{parameters:{relationUri:t}}=e;return t}));return(0,l.uniq)(t).reduce(rT,e)},aT=e=>{const t=e.filter(Bf).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(eT,e)},oT=e=>{const t=e.filter(qf).map((e=>{let{parameters:{relation:{uri:t}}}=e;return t}));return(0,l.uniq)(t).reduce(tT,e)},sT=e=>{const t=e.filter(Hf).map((e=>{let{parameters:{newRelation:{uri:t}}}=e;return t}));return(0,l.pipe)((0,l.filter)((e=>(0,l.count)((0,l.equals)(e),t)>1)),l.uniq,(0,l.reduce)(nT,e))(t)},lT=e=>(0,l.pipe)(iT,aT,oT,sT)(e);function uT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){cT(e,t,r[t])}))}return e}function cT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const pT=e=>uT({},(0,l.path)(_T(),e),{startDate:(0,l.path)(PT(),e),endDate:(0,l.path)(ST(),e)}),dT=(e,t)=>(0,l.pipe)((0,l.path)(RT()),jf(t))(e),yT=(e,t,r,n)=>{let{removedUris:i=[],addedConnections:a=[],editedConnections:o=[],ignoredRelationData:s=[]}=t;return[...a.map((e=>{const t=dT(e,r),i=(0,l.path)(AT(),e)===st.IN,a=e.parentEntityUri||n;return xf({parentUri:i?t:a,relation:pT(e),entityUri:i?a:t})})),...o.map((t=>{const i=dT(t,r),a=(0,l.path)(AT(),t)===st.IN,o=i!==(0,l.pipe)((0,l.path)(_T()),a?wT:IT)(t),s=LT(e,(0,l.path)(vT(),t)),u=t.parentEntityUri||n,c=jf(r,i);return o?Gf({entityUri:a?u:c,newEntityUri:a?c:u,relation:(0,l.path)(_T(),t),isReversed:!1}):Vf({oldRelation:(0,l.path)(_T(),s),newRelation:pT(t)})})),...i.map((e=>Mf({relationUri:e}))),...s.map((e=>$f({parentUri:n,entityUri:e.entityUri,relationType:e.relationType,relationDirection:e.relationDirection})))]},fT=e=>(e||[]).reduce(((e,t)=>{let{entity:r}=t;const n=r.dataTenant;return uT({},e,{[r.entityUri]:{uri:r.entityUri,label:r.entityLabel,type:r.entityType,dataTenant:n}})}),{}),TT=(0,l.has)("dataTenant"),ET=(0,l.ifElse)(TT,(e=>{let{relationUri:t,dataTenant:r}=e;return`DTSS/${r}/${t}`}),(0,l.prop)("relationUri")),mT=(e,t)=>(0,l.pipe)(Ai,(0,l.defaultTo)({}),(0,l.propOr)([],"attributes"),(0,l.concat)(Is),$a)(e,t),hT=e=>{let{type:{uri:t,label:r},direction:n}=e;return e=>{const i=e.relationUri;return(0,l.pipe)((0,l.assoc)("relationType",t),(0,l.assoc)("relationLabel",r),(0,l.assoc)("object",{type:t,attributes:{},uri:i}),(0,l.assoc)("direction",n))(e)}},bT=(e,t,r)=>{const n=Yp(t,e.dataLabelPattern),i=(0,l.lensProp)("entity");return(0,l.over)(i,(0,l.evolve)({entityLabel:(0,l.always)(n),object:{label:(0,l.always)(n)}}),r)},OT="relation",vT=(0,l.always)([OT,"relationUri"]),gT=(0,l.always)([OT,"relationType"]),_T=(0,l.always)([OT,"object"]),AT=(0,l.always)([OT,"direction"]),NT=(0,l.always)([OT,"object","attributes"]),RT=(0,l.always)(["entity","entityUri"]),PT=(0,l.always)([OT,"startDate"]),ST=(0,l.always)([OT,"endDate"]),wT=(0,l.path)(["startObject","objectURI"]),IT=(0,l.path)(["endObject","objectURI"]),UT=(0,l.path)(["startObject","objectTypeURI"]),CT=(0,l.path)(["endObject","objectTypeURI"]),LT=(e,t)=>{for(const r of e){if((0,l.pipe)((0,l.path)(vT()),(0,l.equals)(t))(r))return r;if(r.connections){const e=LT(r.connections,t);if(e)return e}}},DT=(0,l.pipe)(LT,(0,l.path)(_T())),jT=(0,l.allPass)([(0,l.pipe)((0,l.path)(RT()),(0,l.complement)(E)),(0,l.pipe)((0,l.path)(gT()),(0,l.complement)(E))]),kT=e=>{let{config:t,mode:r,metadata:n,parentEntityUri:i}=e;const a={relation:{relationUri:Ft()},entity:{},isNew:!0},{relationType:o,direction:s}=a.relation,{inRelations:u,outRelations:c}=MT({content:i?t.contentSecondLevel:t.content,direction:s,relationType:o,mode:r,metadata:n}),p=FT(u,c);return(0,l.pipe)((0,l.evolve)({relation:p?hT(p):l.identity}),(0,l.defaultTo)({}),(0,l.when)((0,l.always)(i),(0,l.assoc)("parentEntityUri",i)))(a)},FT=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length+t.length===1?e.length?{type:e[0],direction:En.IN}:{type:t[0],direction:En.OUT}:null},xT=e=>e.uri||e,MT=e=>{let{content:t,direction:r,relationType:n,mode:i,metadata:a}=e;const o={},s=e=>t=>{const a=t&&ji(i,t),s=t&&n===t.uri&&r===e;if(a||s){let{label:r}=t;const n=e===En.IN?"startObject":"endObject",{directionalContext:i}=t[n];return"directed"===t.direction&&1===(0,l.propOr)(0,"length",i)&&(r+=` (${i[0].labelPattern})`),!(r in o)&&(o[r]=!0,!0)}return!1},u=e=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Kr(a,e.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Kr(a,e.endObject.objectTypeURI)))(e),c=(0,l.pipe)(xT,Ai(a));return(0,l.evolve)({inRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(En.IN)),(0,l.map)(u)),outRelations:(0,l.pipe)((0,l.map)(c),(0,l.filter)(s(En.OUT)),(0,l.map)(u))},t)||{}},$T=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const{isNotDuplicatedInRelation:n,isNotDuplicatedOutRelation:i}=wi({reversedContextLabels:!0}),a=(0,l.curry)(((e,t,r,n)=>{const[i,a]=Ri(e,n.uri);return n&&(!t||Xr(e,i,t))&&(!r||Xr(e,a,r))})),o=t=>(0,l.pipe)((0,l.assocPath)(["startObject","objectType"],Kr(e,t.startObject.objectTypeURI)),(0,l.assocPath)(["endObject","objectType"],Kr(e,t.endObject.objectTypeURI)))(t),s=(e.relationTypes||[]).filter((0,l.both)(rs,r));return{inRelations:(0,l.pipe)((0,l.filter)(a(e,null,t)),(0,l.filter)(n),(0,l.map)(o))(s),outRelations:(0,l.pipe)((0,l.filter)(a(e,t,null)),(0,l.filter)(i),(0,l.map)(o))(s)}},VT=(0,l.curry)(((e,t,r,n,i)=>{const a=Xr(n,l.__,t.type),o=e?CT:UT,s=Xr(n,l.__,r.type),u=e?UT:CT;return(0,l.both)((0,l.pipe)(o,a),(0,l.pipe)(u,s))(i)})),GT=(e,t,r)=>{const n=e?CT:UT,i=(0,l.pipe)((0,l.map)(n),l.uniq)(r);return(0,l.pipe)((0,l.filter)((e=>{let{uri:r}=e;return i.some(Xr(t,l.__,r))})),(0,l.reject)((0,l.prop)("abstract")),(0,l.map)((0,l.prop)("uri")))(t.entityTypes||[])};function WT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){YT(e,t,r[t])}))}return e}function YT(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const BT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return WT({},t,{[r]:{parents:n,children:i}})},qT=e=>{let{hierarchy:t,uri:r,parents:n=[],children:i=[]}=e;return WT({},t,{[r]:{parents:t[r].parents.concat(n),children:t[r].children.concat(i)}})},HT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=t[e],a=bf(t,i),o=BT({hierarchy:n,uri:e,children:a.map((0,l.prop)("uri")),parents:r});return a.reduce(((r,n)=>HT(n.uri,t,[e],r)),o)},QT=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.reduce(((e,n)=>{const i=(0,l.path)(vT(),n),a=t?qT({hierarchy:e,uri:t,children:[i]}):e,o=(0,l.path)(RT(),n),s=jt(o)?[o]:[],u=BT({hierarchy:a,uri:i,children:s,parents:t?[t]:[]});return s.reduce(((e,t)=>HT(t,r,[i],e)),u)}),n)},KT=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return QT(r,e,t,HT(e,t))},JT=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return KT(t,r,n);if(Mt(e)){const t=LT(n,e);return t&&QT([t],null,r)}return r[e]?HT(e,r):void 0},XT=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.children)||[];return n.concat(n.flatMap((t=>XT(e,t))))},zT=(e,t)=>{var r;const n=(null===(r=e[t])||void 0===r?void 0:r.parents)||[];return n.concat(n.flatMap((t=>zT(e,t))))},ZT=(e,t)=>{let{entityUri:r,entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[],s=xt(t),u=KT(r,n,i),c=((e,t,r)=>{let{entitiesMap:n={},connections:i=[],metadata:a}=e;const o=[];let s;for(let e=0;e<t.length;e++){const u=t[e],c=t[e+1]||r;if(Mt(c)){if(s=LT(i,c),!s)return null;o.push({type:Ye.relationConnection,value:s,valueType:Ai(a,(0,l.path)(gT(),s))});continue}if(Mt(u)){const e=n[c];if(!e)return null;o.push({type:Ye.tempEntity,value:e,valueType:Kr(a,e.type)});continue}const p=n[u],d=ws(p,c),y=n[c];if(!d||!y)return null;o.push({type:Ye.attributeValue,value:d,valueType:gr(a,Kt(d.uri,p.type))}),o.push({type:Ye.tempEntity,value:y,valueType:Kr(a,y.type)})}return o})({entitiesMap:n,connections:i,metadata:a},zT(u,s).reverse(),s);if(!c)return null;o.push(...c);const p=Mt(s),d=p?DT(i,s):n[s],[y,f]=t!==s?(e=>{const t=e.split("/attributes/").slice(1).join("/attributes/");if(!t)return[];const[r,n]=t.split("/").reduce(((e,t,r)=>(e[r%2==0?0:1].push(t),e)),[[],[]]);return r.length!==n.length?[]:[r,n]})(t):[[],[]];if(!d||!y||!f)return null;let T,E=p?Ai(a,d.type):Kr(a,d.type),m=d.attributes;for(let e=0;e<y.length;e++){const t=0===e?E.attributes:_r(a,E);if(E=null==t?void 0:t.find((0,l.propEq)("name",y[e])),!E)return null;{var h,b,O,v;const t=t=>{let{uri:r}=t;return r.endsWith(`/${f[e]}`)},r=null===(h=m[E.name])||void 0===h?void 0:h.find(t),i=null===(b=T)||void 0===b||null===(O=b.attributes)||void 0===O||null===(v=O[E.name])||void 0===v?void 0:v.find(t),s=i||r;if(!s)return null;i&&o.push({type:Ye.tempEntity,value:T,valueType:Kr(a,T.type)}),o.push({type:Ye.attributeValue,value:s,valueType:E}),m=s.value;const l=Es(s);T=l&&jt(l)?n[l]:null}}return o},eE=e=>e.every((e=>{let{type:t}=e;return[Ye.attributeValue,Ye.tempEntity].includes(t)}))?e.filter((e=>{let{type:t}=e;return t===Ye.attributeValue})).reduce(((e,t)=>{const r=t.value.uri;return e?`${e}/${r.split("/").slice(-2).join("/")}`:r}),""):null,tE=(0,l.pipe)(l.values,l.flatten,(0,l.reduce)(((e,t)=>{const r=[t.uri,...(0,l.is)(Object,t.value)?tE(t.value):[]];return e.concat(r)}),[])),rE=(e,t)=>t>e?`${t}-${e}`:`${e}-${t}`,nE=e=>{const t=[...tE((null==e?void 0:e.attributes)||[]),...tE((null==e?void 0:e.analyticsAttributes)||[])];return e?[cd(e),...t]:[]},iE=(e,t)=>[e,...t.map((t=>rE(e,t)))],aE=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>{let{relation:t}=e;return ET(t)}))},oE=(e,t)=>{switch(e){case Be.ENTITY:return(e=>{let{entityUri:t}=e;return[t]})(t);case Be.ENTITY_ATTRIBUTE:case Be.RELATION_ATTRIBUTE:return(e=>{let{uri:t}=e;return[Jt(t)]})(t);case Be.POTENTIAL_MATCH:return(e=>{let{entityUri:t,matchEntityUri:r}=e;return[t,r]})(t);case Be.RELATION:return(e=>{let{entityUri:t,connection:{relation:{relationType:r},entity:{entityUri:n,dataTenant:i}}}=e;return[t,cd({uri:n,dataTenant:i}),r]})(t)}},sE=e=>(0,l.pipe)(l.values,(0,l.map)((0,l.map)((0,l.pipe)((0,l.prop)("replies"),l.inc))),(0,l.map)(l.sum),l.sum)(e),lE=(0,l.curry)(((e,t)=>{const r=So(e,t),n=(0,l.pipe)((0,l.prop)("memberTypes"),(0,l.chain)((0,l.prop)("name")))(r);return r.extendsTypeURI?n.concat(lE(e,r.extendsTypeURI)):n})),uE=(0,l.curry)(((e,t)=>(0,l.reduce)(((t,r)=>(0,l.assoc)(r,((e,t)=>(0,l.path)(["members",t],e))(e,r),t)),{},t))),cE=(e,t)=>(0,l.pipe)((0,l.prop)("type"),lE(e),uE(t))(t);function pE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const dE=e=>{let{type:t,attributeType:r,attributeTypeUri:n,parentUri:i,uri:a,message:o,source:s}=e;return{type:t,uri:a,attributeTypeUri:n,attributeType:r,parentUri:i,message:o,source:s}},yE=e=>!e.deactivated,fE=e=>{let{attributeTypeUri:t,uri:r,parentUri:n}=e;return`${t}-${r}-${n}`},TE=e=>fE(e)+e.message,EE=(0,l.unless)(l.isNil,(0,l.prop)("message")),mE=(0,l.unless)(l.isNil,(0,l.prop)("type")),hE=(0,l.curry)(((e,t)=>Wt(t.parentUri,e))),bE=(0,l.curry)(((e,t)=>t.parentUri===e)),OE=(0,l.curry)(((e,t)=>(0,l.cond)([[(0,l.pipe)((0,l.prop)("uri"),Wt(t.attributeTypeUri)),l.T],[(0,l.both)((0,l.propEq)("type",mt.TYPE_REFERENCE),(0,l.pipe)(gt,(0,l.any)(Wt(t.attributeTypeUri)))),l.T],[l.T,l.F]])(e))),vE=(0,l.curry)(((e,t)=>t.attributeTypeUri===e)),gE=(0,l.curry)(((e,t,r)=>e===r.parentUri&&t!==r.attributeTypeUri)),_E=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(0,l.filter)((0,l.allPass)([UE,yE,hE(e),OE(t),(0,l.complement)(gE(e,t.uri))]))(r)},AE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=(0,l.find)((0,l.allPass)([UE,yE,bE(e),vE(t.uri),(0,l.complement)((0,l.prop)("uri")),(0,l.complement)((0,l.propEq)("type",$e.missed))]))(r);return n&&n.message||""},NE=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const{uri:i}=e,a=(0,l.find)((0,l.propEq)("uri",i))(n);return a||0!==t?a:n.find((e=>e.attributeTypeUri===r&&e.type===$e.missed))},RE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([yE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(vT(),e))]))(t)},PE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([yE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",e.uri)]))(t)},SE=function(e){let{uri:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.any)((0,l.allPass)([yE,hE(t)]))(r)},wE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,l.find)((0,l.allPass)([yE,(0,l.propEq)("type",$e.missedRefEntity),(0,l.propEq)("parentUri",(0,l.path)(["relation","uri"],e))]))(t)},IE=(e,t)=>{const{entitiesMap:r,metadata:n}=e,i=t?ZT(e,t):null;return i&&i.map((e=>{const t=((e,t)=>{let{entitiesMap:r,metadata:n}=e;const{type:i,valueType:a,value:o}=t;switch(i){case Ye.attributeValue:{const e=a;if(dr(a))return Yp(o,e.dataLabelPattern);if(yr(a)){const t=o,i=Es(t),a=Ot(e),s=Kr(n,a);return jt(i)?Yp(r[i],s.dataLabelPattern):t.label}return""}case Ye.tempEntity:return Yp(o,a.dataLabelPattern);case Ye.relationConnection:{const{entity:e,relation:t}=o,i=null==e?void 0:e.entityUri,a=Kr(n,null==e?void 0:e.entityType);return`${qp(i&&jt(i)?Yp(r[i],null==a?void 0:a.dataLabelPattern):null==e?void 0:e.entityLabel)}, ${(null==t?void 0:t.relationLabel)||Ni(n,null==t?void 0:t.relationType)}`}}})({entitiesMap:r,metadata:n},e);return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){pE(e,t,r[t])}))}return e}({},e,{label:qp(t)})}))},UE=e=>!e.severity||e.severity===Ge.ERROR,CE=(0,l.curry)(((e,t)=>{let r=t.value;switch(e.type){case mt.TYPE_NESTED:return Object.keys(r).some((t=>{const n=e.attributes.find((0,l.propEq)("name",t));return r[t].some(CE(n))}));case mt.TYPE_REFERENCE:return!!us(t);case mt.TYPE_BOOLEAN:return!0===r||!1===r||"true"===r||"false"===r;default:return"string"==typeof r&&(r=r.trim()),null!=r&&""!==r}})),LE=(e,t)=>e.every((0,l.complement)(CE(t))),DE=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;const n=Co(e,t.type||t.relationType,!0).filter(r);return n.reduce(((r,n)=>{const i=vs(e,t,n.uri,!0);return i&&i.filter((e=>!(e.parent&&(e.parent.ignored||!os(e.parent))))).forEach((e=>{LE(e.attrValues,n)&&r.push(dE({type:$e.missed,uri:"",attributeType:n,attributeTypeUri:n.uri,parentUri:e.parent.uri,message:hn().text("Attribute is required"),source:Ve.local}))})),r}),[])},jE=(0,l.curry)(((e,t,r)=>vs(e,t,r,!1))),kE=(e,t)=>{const r=(0,l.pipe)((0,l.prop)("type"),Kr(e),(0,l.prop)("attributes"),(0,l.reject)(cr),(0,l.filter)(yr),(0,l.map)((0,l.prop)("uri")),(0,l.chain)(jE(e,t)));return(0,l.pipe)(r,(0,l.reject)(Es),(0,l.map)((e=>{let{uri:r}=e;return dE({type:$e.missedRefEntity,uri:"",attributeTypeUri:Kt(r,t.type),parentUri:r,message:hn().text("Entity is required"),source:Ve.local})})))(t)},FE=(e,t,r)=>Object.values(r.attributes||{}).flat().filter((0,l.has)("refEntity")).filter((0,l.pipe)(Es,jt)).flatMap((n=>{const i=Es(n),a=t[i],o=gr(e,Kt(n.uri,r.type));return xE(e,t,o,a)})),xE=(e,t,r,n)=>{const i=gt(r),a=i.map((t=>gr(e,t))).filter((0,l.both)(l.identity,(0,l.propEq)("type",mt.TYPE_REFERENCE))).flatMap(At).concat(i);return ME(e,t,n,(e=>a.some(Wt(e.uri))))},ME=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.identity;const i=DE(e,r,n),a=kE(e,r),o=FE(e,t,r);return[...i,...a,...o]},$E=(e,t)=>{const r=(0,l.path)(_T(),t)||{};return DE(e,r)},VE=(e,t,r)=>{t=t||{};const n=(0,l.pipe)((0,l.path)(RT()),(0,l.ifElse)(jt,(e=>t[e]),(0,l.always)(null)))(r),i=$E(e,r),a=(e=>(0,l.path)(RT(),e)?[]:[dE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(gT(),e),parentUri:(0,l.path)(vT(),e),message:hn().text("Entity is required"),source:Ve.local})])(r),o=((e,t,r)=>r?ME(e,t,r):[])(e,t,n);return[...i,...a,...o]},GE=e=>(0,l.path)(["entity","uri"],e)?[]:[dE({type:$e.missedRefEntity,uri:"",attributeTypeUri:(0,l.path)(["relation","type"],e),parentUri:(0,l.path)(["relation","uri"],e),message:hn().text("Entity is required"),source:Ve.local})],WE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{relation:r}=t,n=DE(e,r),i=GE(t);return[...n,...i]};function YE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const BE=(e,t)=>{var r,n;const i=Kr(e,t);return i.forceValidate||!(null==i||null===(r=i.lifecycleActions)||void 0===r||null===(n=r.validate)||void 0===n||!n.length)||no(e)},qE=e=>(0,l.evolve)({uri:e,refEntity:{objectURI:e},refRelation:{objectURI:e}}),HE=e=>{const t=r=>(0,l.ifElse)(Array.isArray,(0,l.map)(t),(0,l.pipe)(qE(e),(0,l.evolve)({value:(0,l.when)((0,l.is)(Object),(0,l.map)(t))})))(r);return t},QE=(e,t)=>(0,l.when)((0,l.prop)("refEntity"),(0,l.pipe)((0,l.when)((0,l.allPass)([(0,l.prop)("refRelation"),(0,l.always)("INSERT_ATTRIBUTE"===t),(0,l.pipe)(ms,jt,l.not)]),(e=>{const t=(0,l.pipe)(ms,Bt)(e);return HE((e=>e.replace(t,t+It)))(e)})),(0,l.when)((0,l.pipe)(Es,jt),(t=>{const r=Es(t),n=e[r],i=n&&JE(n,e);return null!=i&&i.attributes?(0,l.evolve)({value:e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){YE(e,t,r[t])}))}return e}({},e,i.attributes)})(t):t})))),KE=(e,t,r)=>ge(be((0,l.clone)(e.attributes),(0,l.clone)(t.attributes),!0),_e((0,l.clone)(t.attributes),(0,l.clone)(t.crosswalks))).map((e=>(0,l.evolve)({newValue:(0,l.when)(Array.isArray,(0,l.pipe)((0,l.filter)((e=>!e.refRelation||e.refEntity)),(0,l.map)(QE(r,e.type)),(0,l.map)(HE(er))))})(e))),JE=(e,t)=>(0,l.evolve)({attributes:ul({valueTransformer:(0,l.pipe)(Os,QE(t),qE(er)),deleteEmptyComplex:!0}),uri:er})(e);function XE(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){zE(e,t,r[t])}))}return e}function zE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const ZE=(0,l.unless)(l.isNil,(e=>e.replace(new RegExp(wt,"g"),"uri$$$$").replace(new RegExp(It,"g"),""))),em=e=>(0,l.pipe)((0,l.evolve)({objectUri:ZE,objectParentUri:ZE}),(e=>{return XE({type:(t=e.errorType,"MISSED"===(t=(t||"").toUpperCase())?$e.missed:$e.invalid),attributeTypeUri:e.objectTypeUri,parentUri:e.objectParentUri||e.objectUri&&Zt(e.objectUri),uri:e.objectUri,source:Ve.validationService},(0,l.pick)(["message","severity"],e));var t}))(e),tm=(e,t)=>(0,l.map)((0,l.pipe)(em,(e=>{var r,n,i,a;const{metadata:o}=t,{uri:s,parentUri:u}=e,c=IE(t,s),p=null!=c&&c.length?c.slice(0,-1):IE(t,u),d=((e,t,r)=>{let{uri:n,attributeTypeUri:i}=r,a=i&&gr(e,i);if(!a&&n&&t&&t.length){const e=(0,l.last)(t);e.type===Ye.attributeValue&&(a=e.valueType)}return a})(o,c,e);return XE({},e,{attributeType:d,attributeTypeUri:null==d?void 0:d.uri,uri:c&&(null===(r=(0,l.last)(c))||void 0===r||null===(n=r.value)||void 0===n?void 0:n.uri)||s,parentUri:p&&(null===(i=(0,l.last)(p))||void 0===i||null===(a=i.value)||void 0===a?void 0:a.uri)||u,path:s?c:p})}),(e=>{let{entitiesMap:t,metadata:r}=e;return e=>{const{uri:n,parentUri:i,path:a,attributeTypeUri:o}=e;if(!n&&null!=a&&a.length&&i&&zt(i)){const n=(0,l.last)(a),i=n.valueType;if(yr(i)&&Nt(i).includes(o)){const i=Es(n.value),o=i&&jt(i)?t[i]:null;return o?XE({},e,{parentUri:o.uri,path:a.concat({type:Ye.tempEntity,value:o,valueType:Kr(r,o.type),label:""})}):e}}return e}})(t)))(e),rm=e=>{const t=r=>r.reduce(((r,n)=>Math.max(r,(t=>106+16*(t.level||0)+6.5*t.item[e].length)(n),t(n.items?n.items.flat(1/0):[]))),0);return t};function nm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var im;!function(e){e.Random0="random0",e.Random1="random1",e.SpectreYellowCyan="spectreYellowCyan",e.SpectreBlueBrown="spectreBlueBrown",e.Charts="charts",e.Crosswalks="crosswalks"}(im||(im={}));const am={},om={random0:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#8accca","#12959f"]},random1:{colors:["#fccde5","#ff9acc","#81b2d3","#f8b6b8","#bd81be","#82c55c","#c4e3f1","#7f939e","#ffee91","#fec92f","#ee4272","#2d9ecf","#c4c0e1","#7accca","#cdc393","#f69785","#f0ecc7","#9fd6bf","#6d9a35","#afbc26","#12959f","#aacf99","#056b97","#eab710","#b4d36a","#70bede","#f57f27","#7a843b","#cfd0d2","#555962","#b71137","#ffdc0e","#bea68c","#5f3566"]},spectreYellowCyan:{granularity:3,colors:["#ffee91","#ffdc0e","#fec92f","#eab710","#f69785","#f57f27","#fccde5","#f8b6b8","#ff9acc","#ee4272","#b71137","#c4c0e1","#bd81be","#5f3577","#9fd6bf","#7accca","#12959f"]},spectreBlueBrown:{granularity:3,colors:["#c4e3f1","#70bede","#81b2d3","#2d9ecf","#056b97","#aacf99","#b4de6a","#82c55c","#6d9a35","#afbc26","#7a843b","#cfd0d2","#7f939e","#555962","#f0ecc7","#cfc393","#bea68c"]},charts:{colors:["#0072ce","#c4ce00","#ce5c00","#4bafff","#f97061","#9e7ed3","#c34980","#c4ce00","#669977","#ffe16f","#4896df","#40cfbb","#9bc66a","#ce5c00","#4bafff","#f085f2","#bea68c"]},crosswalks:{colors:["#86f2f9","#cae815","#f8a4a4","#fd63c0","#b6c5ec","#8fe98e","#ff9c72","#84cbf3","#a8f384","#d9ffa8","#ace1ff"]}},sm=(0,l.curry)(((e,t)=>{const r=(e=>{if(!am[e]){const t=om[e]||om.random0;am[e]=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nm(e,t,r[t])}))}return e}({counter:0,granularityCounter:0,idToColor:{}},t)}return am[e]})(e);return r.idToColor[t]||(r.idToColor[t]=(e=>{const t=e.counter,r=e.granularity||1;return e.counter+=r,e.counter>=e.colors.length&&(++e.granularityCounter>=r&&(e.granularityCounter=0),e.counter=e.granularityCounter),e.colors[t]})(r)),r.idToColor[t]})),lm=e=>sm(im.Charts,e);var um=r(51404),cm=r.n(um);const pm=Array.from({length:100},((e,t)=>t/100)),dm=e=>{const t=Number(e.replace(/\D/g,""))||0;let r=3735928559^t,n=1103547991^t;for(let t,i=0;i<e.length;i++)t=e.charCodeAt(i),r=Math.imul(r^t,2654435761),n=Math.imul(n^t,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},ym={},fm=new(cm())({hash:dm,saturation:pm.slice(15,71),lightness:pm.slice(50,90)}),Tm=(0,l.curry)(((e,t,r)=>{t in ym||(ym[t]={});const n=ym[t];r in n||(n[r]=((e,t)=>{const r=String(dm(t));return e.hsl(r)})(e,r));const[i,a,o]=n[r];return`hsl(${i}, ${100*a}%, ${100*o}%)`})),Em=Tm(fm,"crosswalks"),mm=Tm(fm,"sources"),hm=Tm(fm,"contributors");function bm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Om(e,t,r[t])}))}return e}function Om(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const vm=(0,l.has)("items"),gm=e=>0===e,_m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.min(Math.max(e,t),r)},Am=e=>e.reduce(((e,t)=>e+t.width),0),Nm=e=>e.reduce(((e,t)=>Math.max(e,t.height)),0),Rm=e=>e.reduce(((e,t)=>Math.max(e,t.width)),0),Pm=e=>e.reduce(((e,t)=>e+t.height),0),Sm=e=>(0,l.is)(String,e)&&e.includes("%"),wm=e=>Boolean(e.spacer),Im=(e,t)=>Math.max(Math.floor(parseFloat(t)/100*e),1),Um=e=>((null==e?void 0:e.items)||[]).reduce(((e,t)=>e.concat(vm(t)?Um(t):t)),[]),Cm=e=>({id:e.layout}),Lm=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cm;const i=(e,t,r,n)=>{let{width:i}=e;const a=t.items.some((e=>e.flex));let o;if(a){const[e,n]=(0,l.partition)((0,l.propIs)(Number,"flex"),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("flex"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/(a+n.length))),u=Math.max(s/Math.max((0,l.length)(n),1),1),c=(e,t,r)=>Math.max(Math.floor(t/r*e),1);o=r.flex?c(i,r.flex,a+n.length):u}else{const[e,n]=(0,l.partition)((0,l.both)((0,l.propIs)(String,"width"),(0,l.pipe)((0,l.propOr)("","width"),(0,l.includes)("%"))),t.items),a=(0,l.pipe)((0,l.map)((0,l.pipe)((0,l.prop)("width"),parseInt)),l.sum)(e),s=Math.round(i-i*(a/100)),u=Math.max(s/Math.max((0,l.length)(n),1),1);o=Sm(r.width)?Im(i,r.width):u}return _m(o,(0,l.prop)("minWidth",n),(0,l.prop)("maxWidth",n))},a=e=>{let{minHeight:t,maxHeight:r,height:n=1}=e;return _m(n,t,r)},o=(e,t)=>vm(t.items[0])?p(e,t.items[0]):null,s=(t,r)=>{const o=r.items.reduce(((o,s,u)=>{const c=i(t,r,s,vm(s)?n(s.layout):e(s.view)),d=gm(u)?t.x:(0,l.last)(o).x+(0,l.propOr)(c,"width",(0,l.last)(o));if(vm(s))return o.concat(p(bm({},t,{x:d,width:c}),s));{const r=e(s.view);return o.push(bm({y:t.y,x:d,height:a(r),width:c},r)),o}}),[]);return{x:t.x,y:t.y,width:Am(o),height:Nm(o),items:o}},u=(t,r)=>{const i=r.items.reduce(((r,i,o)=>{const s=vm(i)?n(i.layout):e(i.view),u=t.width,c=a(s),d=gm(o)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||c);if(vm(i))return r.concat(p(bm({},t,{y:d,width:u}),i));{const n=e(i.view);return r.push(bm({},n,{y:d,x:t.x,height:c,width:u,minWidth:(0,l.is)(Number,n.minWidth)?_m(n.minWidth,n.minWidth,u):void 0,maxWidth:(0,l.is)(Number,n.maxWidth)?_m(n.maxWidth,n.maxWidth,u):void 0})),r}}),[]);return{x:t.x,y:t.y,width:Rm(i),height:Pm(i),items:i}},c=(t,r)=>{const n=(t,r,n,i)=>{const o=e(n),s=t.width,u=a(o),c=gm(i)?t.y:(0,l.last)(r).y+((0,l.last)(r).height||u);return bm({},o,{x:t.x,y:c,width:s,height:u})},i=(e,t)=>{const r=t.reduce(((t,r,i)=>{if("string"==typeof r)t.push(n(e,t,r,i));else if("object"==typeof r){const a=Math.round(e.width/2),o=bm({},e,{width:a}),s=bm({},e,{x:e.x+a,width:a}),u=(0,l.has)("left",r)&&n(o,t,r.left,i),c=(0,l.has)("right",r)&&n(s,t,r.right,i),p=(0,l.propOr)(0,"height"),d=Math.max(p(u),p(c));t.push(bm({},e,{height:d,items:(0,l.filter)(l.identity,[u,c])}))}return t}),[]);return bm({},e,{height:Pm(r),items:r})},o=i(t,(0,l.propOr)([],"top",r)),s=Math.round(.66*t.width),u=(0,l.isEmpty)(o)?t.y:t.y+o.height,c=i(bm({},t,{y:u,width:s}),(0,l.propOr)([],"center",r)),p=i({x:t.x+s,y:u,width:t.width-s},(0,l.propOr)([],"right",r)),d=o.height+Math.max(c.height,p.height),y=(0,l.pipe)((0,l.prop)("items"),l.length,(0,l.equals)(0));return bm({},t,{height:d,items:(0,l.reject)(y,[o,c,p])})},p=(e,t)=>{const r=bm({},t,{items:(0,l.reject)(wm,t.items)});switch(r.layout){case"scroll":return o(e,r);case"hbox":return s(e,r);case"vbox":return u(e,r);default:return null}},d=(0,l.propEq)("layout","profile",t),y={x:0,y:0,width:r.columns},f=d?c(y,t):p(y,t);return Um(f)},Dm=(e,t)=>(e||[]).filter((e=>t.some((t=>t.id===e.id)))),jm=[ct.FilteredEntitiesViewFacet,ct.ActivitiesViewFacet,ct.ProfileStatsFacet,ct.FilteredSavedSearchesFacet],km=(e,t)=>e.map((e=>{let{height:r=0,minHeight:n=0}=e,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["height","minHeight"]);const a=t.find((e=>e.id===i.id)),o=jm.includes(a.component)?8:4;return bm({},i,{height:Math.max(r,o),minHeight:Math.max(n,o)})}));function Fm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){xm(e,t,r[t])}))}return e}function xm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Mm={BarChart:ut.BAR,BarChartGrouped:ut.BAR,BarChartHorizontal:ut.BAR,LineChart:ut.LINE,Map:ut.MAP,Pie:ut.PIE},$m=(e,t)=>Xt(e)?Ht(e,t):e,Vm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{chartId:r,geoIdName:n,showLegend:i}=t,a=Mm[r];return Fm({},a?{chartType:a}:{},{showLegend:i,isHorizontal:"BarChartHorizontal"===r||void 0,geoIdName:n})},Gm=e=>{if(!e)return;const t=Array.isArray(e)?e[0]:e,{findShared:r}=t;return Fm({findPublic:r},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,["findShared"]))},Wm=(e,t,r)=>{const n=(e=>e&&ne(e).map((e=>{const{type:t,value:r}=e;return Fm({},e,{value:[sn,ln,nn.HAS_ALL].includes(t)&&"string"==typeof r?r.split(","):r})})).map((e=>{let{type:t,attribute:r,value:n}=e;return{filter:cn(t),fieldName:r,values:n?ne(n):void 0}})))(e);return t&&Xt(t)||!r?n:(n||[]).concat((i=r,{filter:nn.EQUALS,fieldName:"type",values:[i]}));var i},Ym=["https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/world.countries.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/usa_prefix_latlng.topo.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/us-10m.json","https://reltio-ui-files.s3.amazonaws.com/map_resources/new_dashboard/zips-us-topo.json"],Bm={"com.reltio.plugins.dashboard.BarChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:$m(n,r),filters:Wm(a,n,r),chartType:ut.BAR,component:ct.DashboardFacet,title:i}},"com.reltio.plugins.dashboard.BubbleChartView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,canRead:l}=e;return{id:t,count:o,canRead:l,orderType:s,attributeUri:$m(n,r),filters:Wm(a,n,r),chartType:ut.BUBBLE,component:ct.DashboardFacet,title:i}},"com.reltio.plugins.ui.CustomActionView":e=>{let{id:t,caption:r,canRead:n,url:i}=e;return{id:t,url:i,canRead:n,title:r,component:ct.CustomActionViewFacet}},"com.reltio.plugins.dashboard.FacetChartView":e=>{let{id:t,firstDimension:r,useEntityType:n,caption:i,filter:a,count:o,orderType:s,options:l,canRead:u}=e;const c=ne(a).find((e=>"type"===(null==e?void 0:e.attribute))),p=n||(null==c?void 0:c.value);return Fm({id:t,count:o,canRead:u,orderType:s,attributeUri:$m(r,p),filters:Wm(a,r,p),component:ct.DashboardFacet,title:i,showOthers:!0},Vm(l))},"com.reltio.plugins.dashboard.MapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,orderType:s,mapType:l,canRead:u}=e;return{id:t,count:o,canRead:u,orderType:s,attributeUri:$m(n,r),filters:Wm(a,n,r),chartType:ut.MAP,component:ct.DashboardFacet,title:i,geoUrl:Ym[l||0],projection:"geoMercator"}},"com.reltio.plugins.dashboard.SimpleMapView":e=>{let{id:t,entity:r,attribute:n,caption:i,filter:a,count:o,map:s,canRead:l,options:u}=e;return Fm({id:t,count:o,canRead:l,attributeUri:$m(n,r),filters:Wm(a,n,r),component:ct.DashboardFacet,title:i,geoUrl:s,chartType:ut.MAP,projection:"geoMercator"},Vm(u))},"com.reltio.plugins.dashboard.ProfileStatsView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.ProfileStatsFacet,title:n}},"com.reltio.plugins.dashboard.FilteredSavedSearchesView":e=>{let{id:t,caption:r,max:n,options:i,canRead:a}=e;return{id:t,canRead:a,options:Gm(i),component:ct.FilteredSavedSearchesFacet,title:r,max:n}},"com.reltio.plugins.dashboard.FilteredEntitiesView":e=>{let{id:t,caption:r,filter:n,max:i,entity:a,canRead:o}=e;return{id:t,canRead:o,filters:Wm(n,null,a),component:ct.FilteredEntitiesViewFacet,title:r,max:i}},"com.reltio.plugins.dashboard.MatchedEntitiesView":e=>{let{id:t,caption:r,max:n,canRead:i}=e;return{id:t,canRead:i,filters:[{filter:nn.GTE,fieldName:"matches",values:["1"]}],component:ct.FilteredEntitiesViewFacet,title:r,max:n}},"com.reltio.plugins.dashboard.EntitiesByTypeView":e=>{let{id:t,caption:r,orderType:n="reversedCount",inheritChildren:i,hideEmpty:a,canRead:o}=e;return{id:t,canRead:o,component:ct.EntitiesByTypeViewFacet,orderType:n,inheritChildren:i,hideEmpty:a,title:r}},"com.reltio.plugins.dashboard.EntitiesByTagView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:ut.CLOUD,component:ct.DashboardFacet,attributeUri:"tags"}},"com.reltio.plugins.dashboard.EntitiesByRoleView":e=>{let{id:t,caption:r,orderType:n,canRead:i}=e;return{id:t,canRead:i,orderType:n,title:r,chartType:ut.TREE,component:ct.DashboardFacet,attributeUri:"roles"}},"com.reltio.plugins.inbox.NotificationInboxView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.NotificationInboxFacet,title:n||hn().text("Notifications")}},"com.reltio.plugins.activities.ActivitiesView":e=>{let{id:t,canRead:r,caption:n}=e;return{id:t,canRead:r,component:ct.ActivitiesViewFacet,title:n||hn().text("Activity log")}}},qm=e=>({id:e,height:10}),Hm=(0,l.pipe)((0,l.map)((e=>{const t=Bm[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),Qm=e=>{if("0.1"===e.version){const t=Hm(e.views),r=Lm(qm,e.layout,{columns:4});return{id:e.id,margin:0,layout:Dm(r,t),views:t}}return e},Km=e=>(0,l.cond)([[(0,l.propEq)("layout","profile"),(0,l.pipe)((0,l.pick)(["center","right","top"]),l.values,l.flatten,(0,l.map)((0,l.when)((0,l.is)(Object),l.values)),l.flatten)],[(0,l.has)("view"),(0,l.pipe)((0,l.prop)("view"),ne)],[(0,l.prop)("items"),(0,l.pipe)((0,l.prop)("items"),(0,l.map)((e=>Km(e))),l.flatten)],[l.T,(0,l.always)([])]])(e);function Jm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Xm(e,t,r[t])}))}return e}function Xm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const zm=Jm({},pt,{OldMapView:"com.reltio.plugins.entity.EntityMapView",OldTreeView:"com.reltio.plugins.entity.TreeView"}),Zm=e=>e,eh={[zm.Attributes]:Zm,[zm.HierarchyTree]:Zm,[zm.HierarchyPaths]:Zm,[zm.RelationsTable]:Zm,[zm.Relations]:e=>Jm({},(0,l.omit)(["recordClass"],e),{isComplex:"com.reltio.plugins.entity.relations.ComplexRelationRecord"===e.recordClass}),[zm.SingleAttributeView]:Zm,[zm.CustomView]:Zm,[zm.TableAttributeView]:Zm,[zm.MapView]:Zm,[zm.OldTreeView]:e=>Jm({},e,{class:pt.HierarchyTree}),[zm.OldMapView]:e=>Jm({},e,{class:pt.MapView}),[zm.ImageAttributeView]:Zm,[zm.PotentialMatchesView]:Zm},th=(0,l.pipe)((0,l.map)((e=>{const t=eh[null==e?void 0:e.class];return t?t(e):null})),(0,l.reject)(l.isNil)),rh=(0,l.curry)(((e,t)=>(0,l.pipe)((0,l.defaultTo)([]),(0,l.find)((0,l.propEq)("id",t)),(0,l.prop)("class"))(e)===pt.MapView?{id:t,height:5,minHeight:5}:{id:t,autosizing:!0})),nh=e=>{if("0.1"===e.version){const t=th(e.views),r=Lm(rh(t),e.layout,{columns:4});return{id:e.id,layout:Dm(r,t),views:t,workflow:e.workflow,maxWidth:e.maxWidth,sidePanelViews:e.sidePanelViews,profileBand:e.profileBand}}return e},ih=(e,t)=>e.class===t||e["react-class"]===t,ah=e=>{const{includeUris:t,excludeUris:r}=(e=>e.reduce(((e,t)=>{if(ih(t,pt.Attributes))if(t.includeUris)e.includeUris.push(...t.includeUris);else{const r=t.excludeUris||[];e.excludeUris=e.excludeUris?(0,l.intersection)(e.excludeUris,r):r}return ih(t,pt.SingleAttributeView)&&e.includeUris.push(t.attributeUri),e}),{includeUris:[],excludeUris:null}))(e);return e=>{let{uri:n}=e;return r&&!r.includes(n)||t.includes(n)}},oh=(e,t)=>e.filter((e=>t.some((t=>ih(e,t))))).map((e=>{let{id:t}=e;return t})),sh=(e,t)=>{let{extensions:r}=e;return(r||[]).find((e=>e.id===t))},lh=(e,t)=>e.flatMap((e=>{let{extensions:r=[]}=e;return r.filter((e=>{let{point:r}=e;return r===t}))})),uh=(e,t)=>(e||[]).find((e=>e.activator===t));function ch(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ph(e,t,r[t])}))}return e}function ph(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const dh=(e,t)=>Km(t).map((t=>(0,l.pipe)((0,l.map)((e=>sh(e,t))),(0,l.reject)(l.isNil),l.head)(e))),yh=e=>{let{extensions:t=[]}=e;return t.filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["entity-type"]))},fh=(e,t)=>{if("scroll"===t.layout.layout){const r=dh(e,t.layout),n=Qm(ch({},t,{views:r,version:"0.1"}));return{class:yt.Dashboard,id:t.id,views:n.views,layout:n.layout}}return{class:yt.Dashboard,views:t.views,layout:t.layout,id:t.id}},Th=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.DQDashboard,id:t.id,viewsByDataLevel:r.viewsByDataLevel,layoutsByDataLevel:r.layoutsByDataLevel}},Eh=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.RelationshipSearch,id:t.id,options:r.options,consoleExportApp:r.consoleExportApp}},mh=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.Interactions,id:t.id,sortOrder:r.sortOrder,sortColumn:r.sortColumn,max:r.max,attributes:r.attributes,caption:r.caption}},hh=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.Relationships,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},bh=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.Sources,id:t.id,canCreate:r.canCreate,canUpdate:r.canUpdate,canRead:r.canRead,canDelete:r.canDelete,profileBand:r.profileBand}},Oh=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.PotentialMatches,id:t.id,availableTabs:r.availableTabs,allowMergeAll:r.allowMergeAll,matchActions:r.matchActions,tableViewModeAvailable:r.tableViewModeAvailable}},vh=(e,t)=>{const r=dh(e,t.layout)[0],n=r.potentialMatchesReview||{processType:(e=>{const[t]=lh(e,"com.reltio.plugins.search.toolbar.component").filter((e=>"com.reltio.plugins.ui.CustomActionButtonView"===e.class&&e.processType));return null==t?void 0:t.processType})(e)};return{class:yt.Search,id:t.id,consoleExportApp:r.consoleExportApp,mapSearchEnabled:r.mapSearchEnabled,canRead:r.canRead,"bulk-update":r["bulk-update"],potentialMatchesReview:n,options:r.options,"entity-types":r["entity-types"]}},gh=(e,t)=>({class:yt.Graph,id:t.id}),_h=(e,t)=>{const r=dh(e,t.layout)[0];return{class:yt.ProfileActivityLog,id:t.id,exportTypes:r.exportTypes,caption:r.caption}},Ah=e=>t=>!!(0,l.intersection)(e,t).length,Nh=(0,l.cond)([[Ah(["com.reltio.plugins.dashboard.BarChartView","com.reltio.plugins.dashboard.BubbleChartView","com.reltio.plugins.ui.CustomActionView","com.reltio.plugins.dashboard.FacetChartView","com.reltio.plugins.dashboard.MapView","com.reltio.plugins.dashboard.SimpleMapView","com.reltio.plugins.dashboard.ProfileStatsView","com.reltio.plugins.dashboard.FilteredSavedSearchesView","com.reltio.plugins.dashboard.FilteredEntitiesView","com.reltio.plugins.dashboard.EntitiesByTypeView","com.reltio.plugins.dashboard.EntitiesByTagView","com.reltio.plugins.dashboard.EntitiesByRoleView","com.reltio.plugins.inbox.NotificationInboxView","com.reltio.plugins.activities.ActivitiesView","com.reltio.plugins.react.ReactDashboardView"]),()=>fh],[Ah(["com.reltio.plugins.react.ReactDQDashboardView"]),()=>Th],[Ah(["com.reltio.plugins.graph.GraphView"]),()=>gh],[Ah(["com.reltio.plugins.react.ReactRelationshipSearchView"]),()=>Eh],[Ah(["com.reltio.plugins.react.ReactInteractionsView","com.reltio.plugins.interactions.InteractionsView"]),()=>mh],[Ah(["com.reltio.plugins.react.ReactRelationshipsView","com.reltio.plugins.relationships.RelationshipsView"]),()=>hh],[Ah(["com.reltio.plugins.sources.SourcesView","com.reltio.plugins.react.ReactSourcesView"]),()=>bh],[Ah(["com.reltio.plugins.sameas.SameAsView","com.reltio.plugins.react.ReactPotentialMatchesView"]),()=>Oh],[Ah(["com.reltio.plugins.react.ReactSearchView","com.reltio.plugins.search.dev.SearchView"]),()=>vh],[Ah(["com.reltio.plugins.activities.ProfileActivitiesView","com.reltio.plugins.react.ReactProfileActivityLog"]),()=>_h],[l.T,()=>(0,l.always)(void 0)]]),Rh=(e,t)=>{const{class:r}=e;if("com.reltio.plugins.entity.ProfileAction"===r)return((e,t)=>{const r=(0,l.pipe)((0,l.chain)(yh),(0,l.map)((t=>((e,t)=>{const r=dh(e,t.layout),n=((e,t)=>{if(t.side){const r=(0,l.pipe)((0,l.chain)((e=>sh(e,t.side))),(0,l.reject)(l.isNil),l.head)(e);return Km(r.layout||{})}})(e,t),i=nh(ch({},t,{views:r,version:"0.1"})),a=t["entity-type"],o=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.entity.ProfileBand"))),(0,l.reject)(l.isNil),l.head)(e))(e);return(0,l.reject)(l.isNil,{entityType:a,views:i.views,layout:i.layout,sidePanelViews:n,profileBand:o})})(e,t))),(0,l.indexBy)((0,l.prop)("entityType")),(0,l.map)((0,l.pick)(["layout","views","sidePanelViews","profileBand"])))(e);return{class:yt.Profile,id:t.id,entityTypes:r}})(t,e);if("com.reltio.plugins.ui.actions.CustomAction"===r)return{id:e.id,type:ft.CustomAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};if("com.reltio.plugins.ui.actions.ConsoleAppAction"===r)return{id:e.id,type:ft.ConsoleAppAction,config:(0,l.omit)(["class","id","point","parent","type"],e)};const n=(e=>{if(e.perspective)return e.perspective})(e);if((0,l.isNil)(n))return;if("com.reltio.plugins.dashboard.DashboardPerspective"===n){const e=(0,l.find)((0,l.propEq)("id","com.reltio.plugins.newDashboard"))(t);if(e)return(0,l.pipe)((e=>sh(e,"com.reltio.plugins.newDashboard.NewDashboardView")),(0,l.pick)(["id","views","layout"]),(0,l.assoc)("class",yt.Dashboard))(e)}const i=(0,l.pipe)((0,l.map)((e=>sh(e,n))),(0,l.reject)(l.isNil),l.head)(t);if((0,l.isNil)(i))return;const a=Km(i.layout),o=(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>a.includes(e.id)))})),(0,l.pluck)("class"),(0,l.reject)(l.isNil))(t);return Nh(o)(t,i)},Ph=e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&"com.reltio.plugins.ui.first_level_action"===e.type&&!e.parent))},Sh="https://reltio-ui-files.s3.amazonaws.com/new-ui/";var wh;!function(e){e[e.DashboardGroup=0]="DashboardGroup",e[e.ProfileGroup=1]="ProfileGroup",e[e.SearchGroup=2]="SearchGroup"}(wh||(wh={}));const Ih={[yt.DQDashboard]:`${Sh}DqDashboard.svg`,[yt.Dashboard]:`${Sh}Dashboard.svg`,[yt.Graph]:`${Sh}Graph.svg`,[yt.RelationshipSearch]:`${Sh}GraphSearch.svg`,[yt.Interactions]:`${Sh}Interactions.svg`,[yt.PotentialMatches]:`${Sh}PotentialMatches.svg`,[yt.Profile]:`${Sh}Profile.svg`,[yt.ProfileActivityLog]:`${Sh}ActivityLog.svg`,[yt.Relationships]:`${Sh}Relationships.svg`,[yt.Sources]:`${Sh}Crosswalk.svg`,[yt.Search]:`${Sh}Search.svg`,[wh.DashboardGroup]:`${Sh}DashboardGroup.svg`,[wh.ProfileGroup]:`${Sh}ProfileGroup.svg`,[wh.SearchGroup]:`${Sh}SearchGroup.svg`,DEFAULT:`${Sh}Default.svg`},Uh=e=>Ih[null==e?void 0:e.class]||Ih.DEFAULT,Ch=e=>"com.reltio.plugins.entity.ProfileFirstAction"===e.class?Ih[wh.ProfileGroup]:null,Lh=e=>(0,l.cond)([[(0,l.any)((e=>{let{icon:t}=e;return t===Ih[yt.Dashboard]||t===Ih[yt.DQDashboard]})),(0,l.always)(Ih[wh.DashboardGroup])],[(0,l.any)((e=>{let{icon:t}=e;return t===Ih[yt.Search]||t===Ih[yt.RelationshipSearch]})),(0,l.always)(Ih[wh.SearchGroup])],[l.T,()=>null]])(e),Dh=e=>(0,l.pipe)((0,l.chain)(Ph),(0,l.sortBy)((0,l.propOr)(1/0,"position")))(e).map((t=>{const r=((e,t)=>(0,l.pipe)((0,l.chain)((t=>((e,t)=>{let{extensions:r}=e;return(r||[]).filter((e=>"com.reltio.plugins.ui.action"===e.point&&e.parent===t))})(t,e.id))),(0,l.sortBy)((0,l.propOr)(1/0,"position")),(0,l.map)((e=>({label:e.label,icon:Uh(Rh(e,t)),screen:Rh(e,t),canRead:e.canRead,entityTypes:e["entity-types"]}))),(0,l.filter)((e=>e.screen)))(t))(t,e),n=Rh(t,e);return{label:t.label,icon:Ch(t)||Lh(r)||Uh(n),menu:r.length?{type:"side",items:r}:void 0,screen:n,canRead:t.canRead}}));function jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const kh=e=>{let{extensions:t}=e;return(t||[]).filter((0,l.propEq)("id","com.reltio.plugins.pivoting.PivotingSettings"))},Fh=e=>({id:e,height:10}),xh=e=>{const t=(e=>(0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>"com.reltio.plugins.ui.perspective"===e.point&&e["attribute-types"]))}))(e))(e),r=(e=>(0,l.pipe)((0,l.chain)(kh),(0,l.pluck)("pivotingAttributes"),l.flatten)(e))(e);return((e,t)=>{const r=(e=>(e||[]).find((0,l.propEq)("attribute-types","*")))(t);return(0,l.pipe)((0,l.reduce)(((e,n)=>{const i=((e,t)=>e.find((e=>Array.isArray(e["attribute-types"])&&e["attribute-types"].includes(t.uri))))(t,n)||r;return null!=i&&i.id&&(e[i.id]||(e[i.id]={extension:i,attributeTypes:[]}),e[i.id].attributeTypes.push(n)),e}),{}),l.values)(e)})(r,t).map((t=>{let{extension:r,attributeTypes:n}=t;const i=((e,t)=>{if("scroll"===t.layout.layout){const r=Hm(((e,t)=>{const r=Km(t);return(0,l.pipe)((0,l.chain)((e=>{let{extensions:t}=e;return(t||[]).filter((e=>r.includes(e.id)))})),(0,l.filter)((e=>{let{views:t}=e;return t})),(0,l.map)((e=>{let{views:t,id:r}=e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){jh(e,t,r[t])}))}return e}({id:r},t[0])})),(0,l.uniqBy)((0,l.prop)("id")))(e)})(e,t.layout)),n=Lm(Fh,t.layout,{columns:4});return{views:r,layout:Dm(n,r)}}return t})(e,r);return{"attribute-types":n,views:i.views,layout:i.layout}}))},Mh=e=>"com.reltio.plugins.dashboard.DashboardPerspective"===e,$h=e=>{const t=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.entity.EntityRequestSettings"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("defaultMaxValues"))(e))(e),r=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.imageattribute.fieldsorder"))),(0,l.reject)(l.isNil),l.head,(0,l.omit)(["point","id"]))(e))(e),n=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.ui.LookupAutocomplete"))),(0,l.reject)(l.isNil),l.head,(0,l.defaultTo)({}),(0,l.pick)(["includeAttributes","excludeAttributes"]))(e))(e),i=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.entity.ValidationServiceLevels"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("levels"))(e))(e),a=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.entity.Validation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("validateReadMode"))(e))(e),o=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.ui.LocalizationServer"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"))(e))(e),s=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.ui.AttributePresentation"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("configuration"),(0,l.defaultTo)({}),(0,l.filter)((0,l.propEq)("format","none")),(0,l.map)((0,l.always)({thousandSeparator:""})))(e))(e),u=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.workflow.configuration"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("enabled"))(e))(e),c=(e=>(0,l.pipe)((e=>uh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("default-perspective"),(0,l.ifElse)(Mh,(0,l.always)("dashboard"),(0,l.always)("search")))(e))(e),p=(e=>(0,l.pipe)((e=>lh(e,"com.reltio.plugins.ui.custom_script")),(0,l.reject)(E),(0,l.pluck)("action"))(e))(e),d=(e=>(0,l.pipe)((e=>uh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkUser"))(e))(e),y=(e=>(0,l.pipe)((e=>uh(e,"com.reltio.plugins.ui.Activator")),(0,l.prop)("checkIdle"))(e))(e),f=(e=>(0,l.pipe)((0,l.map)((e=>sh(e,"com.reltio.plugins.ui.configuration.FeatureManagement"))),(0,l.reject)(l.isNil),l.head,(0,l.prop)("preferNewUI"),l.not)(e))(e);return{i18n:o,entity:{requestSettings:{defaultMaxValues:t}},image:{attributeFieldsOrder:r},lookups:{autocomplete:n},validate:{levels:i,validateReadMode:a},attributePresentations:s,workflow:{enabled:u},defaultRoute:c,customScripts:p,checkUser:d,checkIdle:y,showSwitchToClassic:f}},Vh=e=>({layout:Dh(e),pivoting:xh(e),properties:$h(e)});var Gh=r(58697),Wh=r.n(Gh);function Yh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Bh(e,t,r[t])}))}return e}function Bh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const qh=e=>{let{views:t,layout:r}=e;const n={};let i=!1;const a=t.map((e=>{if(n[e.id]){const t=`${e.id}_${Wh()()}`;return n[e.id].push(t),i=!0,Yh({},e,{id:t})}return n[e.id]=[e.id],e})),o={},s=r&&i?r.map((e=>null==o[e.id]?(o[e.id]=0,e):(o[e.id]++,Yh({},e,{id:n[e.id][o[e.id]]})))):r;return i?{views:a,layout:s}:{views:t,layout:r}},Hh=e=>{let t=[];var r;return e&&(t.push({uri:e.uri,crosswalks:e.crosswalks,merges:e.merges}),null===(r=e.merges)||void 0===r||r.forEach((e=>{e.losers.forEach((e=>{t=t.concat(Hh(e))}))}))),t},Qh=(e,t)=>(0,l.find)((e=>(0,l.find)((0,l.eqBy)(zh,t),(0,l.propOr)([],"crosswalks",e))),e),Kh=(e,t)=>{let r=e.crosswalks||[];var n;return t||null===(n=e.merges)||void 0===n||n.forEach((e=>{var t;null===(t=e.losers)||void 0===t||t.forEach((e=>{r=r.concat(Kh(e))}))})),r},Jh=e=>{let t=0;var r;return e?(null===(r=e.merges)||void 0===r||r.forEach((e=>{var r;null===(r=e.losers)||void 0===r||r.forEach((e=>{const r=Jh(e);r>t&&(t=r)}))})),t+1):t},Xh=(e,t)=>{if(jt(t.uri))return!0;const r=(e||[]).find((e=>e.attributes&&e.attributes.includes(t.uri)));return!r||"configuration/sources/Reltio"===r.type},zh=e=>{let{sourceTable:t,type:r,value:n}=e;return`${t||""}/${r}/${n}`},Zh=e=>{const t="attributes"in e&&e.attributes,r="attributeURIs"in e&&e.attributeURIs;return t||r||[]},eb=e=>{let{deleteDate:t}=e;return!!t&&f().utc(t).valueOf()<Date.now()},tb=(e,t)=>{const r=t.reduce(((e,t)=>(e["configuration/sources/"+t.name]=t,e)),{}),n=t.reduce(((e,t)=>(e[t.id]=t,e)),{});return(0,l.pipe)((0,l.map)((e=>{var t,i;if(r[e.type])return r[e.type];const a=null===(t=e.crosswalkExternalInfo)||void 0===t||null===(i=t.dtssInfo)||void 0===i?void 0:i.tenantId;return a&&n[a]?n[a]:void 0})),(0,l.reject)(l.isNil),l.uniq,(0,l.ifElse)((e=>{let{length:t}=e;return 1===t}),l.head,(()=>{})))(e)},rb=(0,l.eqBy)(zh),nb=(0,l.pipe)((0,l.propOr)({},"attributes"),l.values,l.flatten,(0,l.filter)((0,l.has)("refRelation")),(0,l.chain)((e=>(0,l.pipe)(cs,(0,l.propOr)([],"crosswalks"),(0,l.map)((0,l.when)((0,l.pipe)((0,l.prop)("attributeURIs"),E),(0,l.assoc)("attributeURIs",[e.uri]))))(e)))),ib=(e,t,r)=>{const n=`\n importScripts("${e}");\n importScripts("${t.join('","')}");\n postMessage({action:'loaded'});`;let i;try{const e=window.webkitURL||window.URL;i=new Worker(e.createObjectURL(new Blob([n],{type:"application/javascript"})))}catch(e){i=new Worker("data:application/javascript,"+encodeURIComponent(n))}if(i){let e="";i.addEventListener("message",(t=>{if("loaded"!==t.data.action){const n=JSON.parse(t.data);r(n,i,e),"setHtml"===n.action&&(e=n.params.html)}}))}return i},ab=(0,l.curry)(((e,t)=>{if(null==t)return"";if("string"!=typeof t&&(t=String(t)),e&&t){const{thousandSeparator:r="",decimalSeparator:n=".",prefix:i="",suffix:a=""}=e,[o,s]=t.split(".");t=i+o.replace(/\B(?=(\d{3})+(?!\d))/g,r)+(s?n+s:"")+a}else!e&&t&&(t=hn().number(t));return t})),ob=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;return(0,l.is)(Number,e)?e>t?hn().number(e,"0,0.0a").toUpperCase():hn().number(e,"0,0"):""},sb=(0,l.ifElse)((0,l.has)("filename"),(0,l.prop)("filename"),(0,l.pipe)((0,l.prop)("link"),(0,l.split)("/"),l.last)),lb=(e,t)=>t&&e!==t?`${t} (${e})`:e,ub=(e,t,r)=>(0,l.path)([t,r,"displayName"],e),cb=(e,t,r)=>{const n=ub(e,t,r);return lb(r,n)},pb=(0,l.curry)(((e,t,r)=>(0,l.hasPath)([t,r],e))),db=(0,l.complement)(pb),yb=e=>(0,l.pipe)((0,l.propOr)({},e),Object.entries,(0,l.map)((e=>{let[t,{displayName:r}]=e;return{lookupCode:t,value:r}}))),fb=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.pipe)((0,l.reduce)(((e,t)=>t.reduce(((e,t)=>{let{type:r,codeValues:n}=t;return e[r]={type:r,codeValues:(0,l.uniq)([...(0,l.pathOr)([],[r,"codeValues"],e),...n])},e}),e)),{}),l.values)(t)},Tb=(0,l.curry)(((e,t)=>t.map((t=>{let{type:r,codeValues:n}=t;return{type:r,codeValues:n.filter(db(e,r))}})).filter((e=>{let{codeValues:t}=e;return t.length>0})))),Eb=(0,l.curry)(((e,t)=>{let{attributePresentations:r={},dataTypeDefinition:n={},dateMask:i,dateTimeMask:a}=e;const o=r[n.uri],s=i?q(i):"L",u=a?K(a):"L LTS";switch(n.type){case mt.TYPE_NUMBER:case mt.TYPE_FLOAT:case mt.TYPE_DOUBLE:case mt.TYPE_LONG:case mt.TYPE_INT:case mt.TYPE_COUNT:return t&&ab(o,t);case mt.TYPE_BOOLEAN:case mt.TYPE_BOOLEAN_RADIO:case mt.TYPE_RDM_LOOKUPS_NOT_RESOLVED:return(0,l.isNil)(t)?t:le(t)?hn().text("yes"):hn().text("no");case mt.TYPE_DATE:return(0,l.is)(Number,t)&&(t=A(Number(t)).getTime()),t&&(_u(t)?Au(t):hn().date(t,s));case mt.TYPE_ACTIVENESS_DATE:case mt.TYPE_LOCAL_DATE:return t&&(_u(t)?Au(t):hn().date(t,s));case mt.TYPE_TIMESTAMP:return t&&(_u(t)?Au(t):hn().date(isNaN(t)?t:Number(t),u));case mt.TYPE_FILE:return(0,l.propOr)(null,"filename",t);case mt.TYPE_SELECT:{const e=n.options.find((0,l.propEq)("value",t));return(0,l.propOr)(null,"label",e)}default:return(0,l.is)(Object,t)?lb((0,l.propOr)(null,"lookupCode",t),(0,l.propOr)(null,"value",t)):t}})),mb={palette:{primary:{main:"#0072CE",light:"#0072CE",dark:"#0072CE"},secondary:{main:"#0072CE"},error:{main:"#FF1744"},background:{paper:"#FFF",default:"#FAFAFA"},action:{hover:"rgba(0,0,0,0.04)",hoverOpacity:.04},text:{primary:"rgba(0,0,0,0.87)",secondary:"rgba(0,0,0,0.54)",disabled:"rgba(0,0,0,0.26)"},divider:"rgba(0,0,0,0.38)"},overrides:{MuiFilledInput:{root:{backgroundColor:"rgba(0, 0, 0, 0.03)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.03)"},"&.focused":{backgroundColor:"rgba(0, 0, 0, 0.03)"}}},MuiInputBase:{input:{"&::placeholder":{color:"currentColor !important"},"&::-ms-clear":{display:"none"}}}},tooltip:{borderRadius:"4px",backgroundColor:"rgba(0,0,0,0.54)"},inactiveBackground:"repeating-linear-gradient(45deg, #f5f5f5, #f5f5f5 14px, #e9e9e9 15px, #e9e9e9 16px)",inactiveSelectedBackground:"repeating-linear-gradient(45deg, #DBE9F4, #DBE9F4 14px, #CCDAE5 15px, #CCDAE5 16px)",inactiveSelectedHoverBackground:"repeating-linear-gradient(45deg, #D4E2ED, #D4E2ED 14px, #C6D4DF 15px, #C6D4DF 16px)",inactiveHoverBackground:"repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 14px, #e2e2e2 15px, #e2e2e2 16px)",transitions:{duration:{shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195}},inactive:{opacity:.7},basicView:{boxShadow:"0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2)",borderRadius:"3px",backgroundColor:"#FFFFFF"},suggested:"rgb(237, 246, 251)"},hb=e=>{const t=e=>{switch(e){case 429:case 502:case 503:case 504:return 4;default:return 0}},r=e=>{const t=Math.random()+1;return new Promise((r=>{const n=Math.min(Math.round(1e3*Math.exp(e)*t),2e4);setTimeout(r,n)}))};return(n,i)=>{const a=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e(n,i).then((e=>{const n=t(e.status);return n>0&&o<n?r(o).then((()=>a(o+1))):e}))};return a()}},bb=e=>(t,r)=>e(t,r).then((e=>e.ok?e:e.text().then((t=>{let r;try{r=JSON.parse(t)}catch(n){r={errorMessage:t,errorCode:e.status}}throw r})))),Ob=e=>{const{onRequest:t,onResponse:r,addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}=(()=>{const e={onRequest:[],onResponse:[]};return{onRequest:t=>{const{url:r,options:n,abort:i}=t,a=e.onRequest.reduce(((e,t)=>(r,n)=>t({url:r,options:n,abort:i,next:e})),t.next);a(r,n)},onResponse:t=>{const{response:r,abort:n,url:i,options:a}=t,o=e.onResponse.reduce(((e,t)=>r=>{r instanceof Response?t({response:r,abort:n,next:e,url:i,options:a}):e(r)}),t.next);o(r)},addRequestInterceptor:t=>{e.onRequest.push(t)},addResponseInterceptor:t=>{e.onResponse.push(t)},removeRequestInterceptor:t=>{const r=e.onRequest.indexOf(t);e.onRequest.splice(r,1)},removeResponseInterceptor:t=>{const r=e.onResponse.indexOf(t);e.onResponse.splice(r,1)}}})(),s=(0,l.pipe)((e=>{let t=null;return r=>(n,i)=>{const a=()=>r(n,i),o=()=>{var e;return null===(e=t)||void 0===e?void 0:e.then(a)};return o()||a().then((r=>401===r.status?(t||(t=e().then((()=>{t=null}))),o()):r))}})(e),hb,bb);return{request:(e,n)=>{const i=s(fetch),a=r?(e,t)=>i(e,t).then((n=>new Promise(((i,a)=>{r({response:n,next:e=>{i(e)},abort:a,url:e,options:t})})))):i;return t?new Promise(((r,i)=>{t({url:e,options:n,next:(e,t)=>{r(a(e,t))},abort:i})})):a(e,n)},addRequestInterceptor:n,addResponseInterceptor:i,removeRequestInterceptor:a,removeResponseInterceptor:o}},vb="__metadata",gb=(e=>{const t=[vb,"draft"];return(0,l.lens)((0,l.pathOr)(null,t),(0,l.assocPath)(t))})(),_b=(0,l.set)(gb),Ab=(0,l.view)(gb),Nb=_b(yn.NEW),Rb=_b(yn.REMOVED),Pb=_b(yn.EDITED),Sb=_b(yn.IGNORED),wb=(0,l.pipe)(Ab,(0,l.equals)(yn.REMOVED)),Ib=(0,l.pipe)(Ab,(0,l.equals)(yn.NEW)),Ub=(0,l.pipe)(Ab,(0,l.equals)(yn.EDITED)),Cb=(0,l.pipe)(Ab,(0,l.complement)(l.isNil)),Lb=(0,l.pipe)(Ab,(0,l.equals)(yn.IGNORED)),Db=(0,l.omit)([vb]),jb=(e,t)=>e===vb?void 0:t;function kb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Fb=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e(t))return r.concat(t);if(t&&t.children)for(const n of t.children){const i=Fb(e,n,r);if(i.length>0)return[t].concat(...i)}return[]},xb=(e,t)=>Fb((0,l.propEq)("nodeId",t),e),Mb=(e,t)=>Fb((0,l.pathEq)(["entity","uri"],t),e),$b=(e,t)=>{const r=xb(e,t);return r.length>1?r[r.length-2]:null},Vb=(e,t)=>{const r=xb(e,t);return r.length>0?r[r.length-1]:null},Gb=(e,t)=>{let{parent:r,childrenProcessing:n=(e=>e),nodeProcessing:i=(e=>e)}=t;return(e=i(e,r)).children&&(e.children=n(e.children.map((t=>Gb(t,{parent:e,childrenProcessing:n,nodeProcessing:i}))))),e},Wb=()=>{},Yb=(e,t)=>{let{parent:r,nodeProcessing:n=Wb}=t;n(e,r),e.children&&e.children.forEach((t=>Yb(t,{parent:e,nodeProcessing:n})))},Bb=e=>{let{node:t,connection:r,isReversed:n}=e;switch(t.editingMode){case Ze.addingParent:var i,a,o,s;return{entityUri:n?null===(i=r.entity)||void 0===i?void 0:i.uri:null===(a=t.relatedEntity)||void 0===a?void 0:a.uri,relation:r.relation,parentEntityUri:n?null===(o=t.relatedEntity)||void 0===o?void 0:o.uri:null===(s=r.entity)||void 0===s?void 0:s.uri};case Ze.addingChild:var l,u,c,p;return{entityUri:n?null===(l=t.relatedEntity)||void 0===l?void 0:l.uri:null===(u=r.entity)||void 0===u?void 0:u.uri,relation:r.relation,parentEntityUri:n?null===(c=r.entity)||void 0===c?void 0:c.uri:null===(p=t.relatedEntity)||void 0===p?void 0:p.uri};case Ze.editing:{var d,y,f,T;const e={oldRelation:t.relation,newRelation:r.relation,isReversed:n},i=null===(d=r.entity)||void 0===d?void 0:d.uri,a=null===(y=t.relatedEntity)||void 0===y?void 0:y.uri;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kb(e,t,r[t])}))}return e}({},e,(null===(f=t.entity)||void 0===f?void 0:f.uri)===(null===(T=r.entity)||void 0===T?void 0:T.uri)?{}:{entityUri:i,newEntityUri:a})}}},qb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[];return Object.values(e).forEach((e=>{const r=e.root;r&&Yb(r,{nodeProcessing:r=>{const n=(0,l.path)(["editingConnections",(0,l.path)(["relation","uri"],r)],e),i=Boolean(e.isReversed);if(r.editingMode===Ze.addingChild||r.editingMode===Ze.addingParent){const{entityUri:e,relation:a,parentEntityUri:o}=Bb({node:r,connection:n,isReversed:i}),s=xf({parentUri:o,relation:a,entityUri:e});t.push(s)}if(r.editingMode===Ze.editing){const{oldRelation:e,newRelation:a,entityUri:o,newEntityUri:s}=Bb({node:r,isReversed:i,connection:n}),l=s?Gf({entityUri:o,newEntityUri:s,relation:a,isReversed:i}):Vf({oldRelation:e,newRelation:a});t.push(l)}}})})),t},Hb={relationTypeLabel:"relationTypeLabel",entityLabel:"entityLabel"},Qb={asc:"asc",desc:"desc"},Kb=Hb.entityLabel,Jb=Qb.asc,Xb=(0,l.always)(0),zb=e=>{let{sortField:t=Kb,sortOrder:r=Jb,typesLabelsMap:n}=e;return e=>e.slice().sort((e=>{let{sortField:t,sortOrder:r,typesLabelsMap:n}=e;switch(t){case Hb.relationTypeLabel:return((e,t)=>(r,n)=>{const i=(0,l.path)(["relation","type"]),a=e[i(r)],o=e[i(n)];return h_.strings.sort(t,a,o)})(n,r);case Hb.entityLabel:return(e=>(t,r)=>{const n=(0,l.path)(["entity","label"]),i=n(t),a=n(r);return h_.strings.sort(e,i,a)})(r);default:return Xb}})({sortField:t,sortOrder:r,typesLabelsMap:n}))},Zb=(0,l.pipe)((0,l.defaultTo)(""),l.toLower,(0,l.ifElse)((0,l.includes)(l.__,Object.values(Qb)),l.identity,(0,l.always)(Jb))),eO=(0,l.pipe)((0,l.defaultTo)(""),(0,l.ifElse)((0,l.includes)(l.__,Object.values(Hb)),l.identity,(0,l.always)(Kb)));var tO=r(91104);let rO;const nO=(e,t)=>(rO||(rO=tO.createClient({key:t})),new Promise((t=>{rO.geocode({address:e},((e,r)=>{e&&(console.warn(e),t(null));const{results:n}=r.json,i=(0,l.pathOr)(null,[0,"geometry","location"],n);t(i||null)}))}))),iO=e=>{let t=e.label||e.value||"";return Array.isArray(t)?t=t.join(", "):(0,l.is)(Object,t)&&(t=""),t},aO=(e,t,r)=>Object.values(e).filter(Array.isArray).flat(1/0).filter(os).flatMap((e=>{let n;return e.type==t&&(n=r?[e]:[iO(e)]),(0,l.is)(Object,e.value)&&(n=(n||[]).concat(aO(e.value,t,r))),n})),oO=e=>e&&e.length>0,sO=(e,t)=>[].concat(e&&e.attributes?aO(e.attributes,t):[]).filter(l.identity),lO=(e,t,r,n,i)=>{if(e&&e.type){const t=(Kr(r,e.type).geoLocationAttributes||[]).map((t=>{return r=sO(e,t.latitude),n=sO(e,t.longitude),oO(r)&&oO(n)&&{lat:Number(r[0]),lng:Number(n[0])};var r,n})).filter(l.identity);if(t.length>0)return Promise.resolve(t[0])}const a=t.GeoLocation;if(a){const e=a.map((e=>{const t=e.value.Latitude,r=e.value.Longitude;if(oO(t)&&t[0].value&&oO(r)&&r[0].value)return{id:e.uri,lat:Number(t[0].value),lng:Number(r[0].value)}})).filter(l.identity);if(e.length>0)return Promise.resolve(e)}return n&&n.label?nO(n.label,i).catch((()=>null)):Promise.resolve(null)},uO=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const n={},i=(0,l.flatten)(t.map((t=>{return"configuration/entityTypes/Location"===t.type?{id:t.uri,label:t.label,entity:t,pointSource:t.attributes}:(n[t.type]=n[t.type]||((null===(r=Kr(e,t.type))||void 0===r?void 0:r.attributes)||[]).filter((e=>"configuration/entityTypes/Location"===e.referencedEntityTypeURI)).map((e=>{let{name:t}=e;return t})),n[t.type].map((e=>t.attributes[e])).filter(l.identity).flatMap((e=>e.map((e=>({id:e.uri,label:e.label,entity:t,pointSource:e.value,refAttribute:e}))))));var r})));return Promise.all(i.map((t=>{let{id:n,label:i,entity:a,pointSource:o,refAttribute:s}=t;return lO(a,o,e,s,r).then((e=>!e&&a.label&&""!==a.label?nO(a.label,r).catch((()=>null)):e)).then((e=>{let t=Array.isArray(e)?e:[e];return e&&t.map((e=>({id:e.id||n,label:i,entity:a,point:e})))})).catch((()=>null))}))).then((e=>e.flat(1/0).filter(l.identity)))},cO=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Promise.resolve((0,l.pipe)((0,l.chain)((t=>{const r=Kr(e,t.type);return((null==r?void 0:r.geoLocationAttributes)||[]).flatMap((r=>{if(gr(e,r.latitude,t.type)&&gr(e,r.longitude,t.type)){const e=sO(t,r.latitude),n=sO(t,r.longitude),i=(e,r)=>({id:`${t.uri}_nested_${e}_${r}`,entity:t,label:t.label,point:{lat:Number(e),lng:Number(r)}});return(0,l.zipWith)(i,e,n)}}))})),(0,l.filter)(l.identity),(0,l.uniqBy)((0,l.prop)("id")))(t))},pO=(e,t,r)=>Promise.all([cO(e,t),uO(e,t,r)]).then((e=>{const[t,r]=e;return[...t,...r.filter((e=>0===t.length||!t.some((t=>t.entity===e.entity&&t.point.lat===e.point.lat&&t.point.lon===e.point.lon))))]}));function dO(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yO(e,t,r[t])}))}return e}function yO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fO=(e,t)=>t.values.map(ho(e,t.entityTypeUri)),TO=(e,t,r)=>$s(t.fieldName,r)||gr(e,Ht(t.fieldName,(0,l.propOr)("","entityTypeUri",t)),(0,l.propOr)("","entityTypeUri",t)),EO=(e,t)=>{const r=(0,l.propOr)([],"values",t),n=(0,l.path)([t.attrType.lookupCode],e);return(0,l.map)((e=>{const t=(0,l.prop)(e,n);return t?lb(e,t):e}),r)},mO=(0,l.path)(["attrType","label"]),hO=(0,l.reduce)(((e,t)=>{const r=(0,l.path)(["attrType","lookupCode"],t);if(r){const n=t.values.reduce(((e,t)=>dO({},e,{[t]:!0})),{});e[r]=e[r]?dO({},e[r],n):n}return e}),{}),bO=(0,l.pipe)((0,l.prop)("values"),E),OO=(0,l.pipe)((0,l.defaultTo)({}),(0,l.propEq)("fieldName",In.type.name)),vO=e=>e.type===AO.NUMERIC_RANGE_FACET,gO=e=>e.type===AO.DATE_RANGE_FACET,_O=(0,l.either)(vO,gO),AO={NUMERIC_RANGE_FACET:"numericRangeFacet",DATE_RANGE_FACET:"dateRangeFacet",WITH_DROPDOWN_CHECKBOXES_FACET:"facetWithDropdownCheckboxes",COMPLEX_FACET:"complexFacet",ENTITY_TYPE_FACET:"entityTypeFacet"},NO=e=>{switch(null==e?void 0:e.name){case In.type.name:return AO.ENTITY_TYPE_FACET;case In.createdBy.name:case In.updatedBy.name:case In.sourceSystems.name:case In.tags.name:case In.roles.name:case In.matchRules.name:case In.MLRecommendedMatch.name:return AO.WITH_DROPDOWN_CHECKBOXES_FACET;case In.createdTime.name:case In.updatedTime.name:case In.startDate.name:case In.endDate.name:return AO.DATE_RANGE_FACET;case In.matches.name:case In.matchScore.name:return AO.NUMERIC_RANGE_FACET;default:return(e=>{switch(e){case"Image":case"Nested":case"Reference":return AO.COMPLEX_FACET;case"Int":case"Float":case"Double":case"Long":case"Number":case"Count":return AO.NUMERIC_RANGE_FACET;case"Date":case"Timestamp":case"ActivenessDate":return AO.DATE_RANGE_FACET;default:return AO.WITH_DROPDOWN_CHECKBOXES_FACET}})(null==e?void 0:e.type)}},RO=(0,l.pipe)(TO,NO),PO=(0,l.pipe)((0,l.path)(["attrType","type"]),Cr),SO=(0,l.cond)([[vO,(0,l.always)(nn.IN_RANGE)],[gO,(0,l.always)(nn.WITHIN)],[(0,l.allPass)([PO,e=>e.values.length>=2]),(0,l.always)(nn.EXISTS)],[l.T,(0,l.always)(nn.EQUALS)]]),wO=(0,l.cond)([[gO,(0,l.prop)("values")],[vO,(0,l.prop)("values")],[PO,e=>1===e.values.length?e.values.map(le):[]],[(0,l.pipe)((0,l.path)(["values",0]),Array.isArray),(0,l.prop)("values")],[l.T,e=>[e.values]]]);function IO(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const UO=(0,l.pipe)((0,l.path)(["attrType","type"]),Rr),CO=(0,l.pipe)((0,l.path)(["attrType","type"]),wr),LO=(0,l.pipe)((0,l.prop)("attrType"),Gs),DO=(0,l.pipe)((0,l.prop)("attrType"),Vs),jO=e=>t=>t.values.map((t=>Kr(e,t).label)).join(" , "),kO=(0,l.when)((0,l.propSatisfies)((0,l.gt)(l.__,1),"length"),(0,l.join)(" – ")),FO=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(hn().number),kO)),(0,l.join)(","))(e.values);return`${mO(e)}: ${t}`},xO=e=>{const t=(0,l.pipe)((0,l.map)((0,l.pipe)(l.uniq,(0,l.map)(w),kO)),(0,l.join)(","))(e.values);return`${mO(e)}: ${t}`},MO=e=>t=>`${mO(t)}: ${fO(e,t).join(", ")}`,$O=e=>t=>{const r=EO(e,t);return`${mO(t)}: ${r.join(", ")}`},VO=(0,l.curry)(((e,t,r)=>(0,l.map)((0,l.cond)([[DO,jO(e)],[CO,FO],[UO,xO],[LO,MO(e)],[l.T,$O(t)]]),r))),GO=(e,t,r,n)=>(0,l.pipe)(l.values,(0,l.reject)((0,l.pipe)((0,l.prop)("values"),E)),(0,l.map)((t=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){IO(e,t,r[t])}))}return e}({},t,{attrType:TO(e,t,n)}))),VO(e,r))(t),WO=new RegExp(`^${hn().text("Search")}`),YO=(e,t,r,n)=>{let{uiState:i}=t;const{facets:a,keyword:o,advanced:s,readableQuery:u}=i;return(0,l.isEmpty)(s)?[...GO(e,a,r,n),...o?[o.value]:[]]:[(0,l.replace)(WO,"",u)]},BO=(0,l.pipe)((0,l.omit)(["PICK_DATE"]),l.values)(pn),qO=e=>(e=>BO.reduce(((e,t)=>{const r=new RegExp(`'{0,1}${encodeURIComponent("${")}${t}${encodeURIComponent("}")}'{0,1}`,"g"),n=new RegExp(`'{0,1}${encodeURIComponent("${")}now${encodeURIComponent("}")}'{0,1}`,"g"),[i,a]=Nu(t);return e.replace(r,i).replace(n,a)}),e))(e),HO=(0,l.curry)(((e,t)=>{const r=new URL(e),[,n]=r.pathname.split("/");return"nui"===n?`${e}search?state=${t}`:`${e}#p~com.reltio.plugins.search.SearchPerspective_s~${t}`})),QO={geoPolygon:"geoPolygon",geoLocation:"geoLocation",onMapMove:"onMapMove"},KO=e=>[QO.geoPolygon,QO.onMapMove].includes(e),JO=e=>{let[t,r]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)})`},XO=e=>{let[t,r,n]=e;return`(${+t.toFixed(6)}, ${+r.toFixed(6)}) ${+n.toFixed(1)}`},zO=(e,t)=>KO(e)?t.map(JO):[XO(t)],ZO=e=>KO(e)?hn().text("Geo Polygon"):hn().text("Geo Location"),ev=e=>{switch(e){case QO.geoLocation:return"geoLocation";case QO.geoPolygon:case QO.onMapMove:return"geoPolygon"}},tv={operator:"operator",attributeLabel:"attributeLabel",specialAttributeLabel:"specialAttributeLabel",attributeFilter:"attributeFilter",attributeValue:"attributeValue",entityTypeLabel:"entityTypeLabel",space:"space",bracket:"bracket",punctuationMark:"punctuationMark"},rv=e=>hn().text(e),nv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{[nn.EQUALS]:"=",[nn.NOT_EQUALS]:"≠",[nn.STARTS_WITH]:"*",[nn.MISSING_VALUE]:hn().text("missing value"),[nn.HAS_ALL]:hn().text("has all"),[nn.IN_RANGE]:hn().text("in range"),[nn.FULL_TEXT]:hn().text("full text"),[nn.EXISTS]:hn().text("exists"),[nn.COUNT_EQUALS]:`${hn().text("count")} =`,[nn.COUNT_NOT_EQUALS]:`${hn().text("count")} ≠`,[nn.COUNT_LT]:`${hn().text("count")} <`,[nn.COUNT_LTE]:`${hn().text("count")} <=`,[nn.COUNT_GT]:`${hn().text("count")} >`,[nn.COUNT_RANGE]:hn().text("count range"),[nn.LT]:"<",[nn.LTE]:"<=",[nn.GT]:">",[nn.GTE]:">=",[nn.IN_FILE]:hn().text("in file"),[nn.NOT_IN_FILE]:hn().text("not in file"),[nn.CONTAINS]:"~",[an.LIST_EQUALS]:"=",[an.NOT_LIST_EQUALS]:"≠",[an.LIST_EQUALS_CASE_SENSITIVE]:"=",[an.NOT_LIST_EQUALS_CASE_SENSITIVE]:"≠"}[e]||hn().text(e.toLowerCase())},iv=e=>({type:tv.operator,text:e}),av=e=>({type:tv.operator,text:rv(e)}),ov=e=>({type:tv.attributeLabel,text:e}),sv=e=>({type:tv.specialAttributeLabel,text:e}),lv=e=>({type:tv.attributeFilter,text:nv(e)}),uv=e=>({type:tv.attributeValue,text:e}),cv=e=>({type:tv.entityTypeLabel,text:e}),pv=()=>({type:tv.space,text:" "}),dv=()=>({type:tv.bracket,text:"("}),yv=()=>({type:tv.bracket,text:")"}),fv=(0,l.curry)(((e,t,r,n)=>((e,t)=>e===t.length-1)(r,n)?t:[t,e])),Tv=(0,l.curry)(((e,t)=>t.map(fv(e)))),Ev=(0,l.curry)(((e,t,r)=>[e,...r,t])),mv=Ev(dv(),yv()),hv=Ev(pv(),pv()),bv=(0,l.curry)(((e,t)=>[e,...t])),Ov=e=>bv(cv(e)),vv=e=>bv(cv(`${e}: `)),gv=function(){let{localizable:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{let r=!1;const n=iu(t),i=[];for(let a=0;a<t.length;a++){const{operand:o,operator:s}=t[a];if(a!==t.length-1){const t=ru(s),a=nu(s);!r&&t&&n&&(i.push(dv()),r=!0),i.push(o),r&&a&&(i.push(yv()),r=!1);const l=e?av(s):iv(s);i.push(...hv([l]))}else i.push(o),r&&(i.push(yv()),r=!1)}return i}},_v=(0,l.pipe)((0,l.map)((0,l.when)((0,l.has)("text"),(0,l.prop)("text"))),(0,l.join)("")),Av=(0,l.pipe)(gv({localizable:!1}),_v),Nv=function(e){let{data:{title:t,pathToTitle:r}}=e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r&&n?r.slice(1).join(" / "):t},Rv=e=>{let{data:t,values:r,filter:n}=e;return t&&Vu({filter:n,fieldName:(0,l.prop)("fieldName",t),values:r})},Pv=(0,l.anyPass)([(0,l.pipe)((0,l.prop)("attributes"),(0,l.any)(Rv)),(0,l.pipe)((0,l.path)(["entityTypes","length"]),(0,l.lt)(0))]),Sv=(0,l.pipe)((0,l.chain)((0,l.pipe)((0,l.propOr)([],"attributes"),(0,l.filter)((e=>(e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.attrType)&&hr(e.data.attrType)})(e)&&[nn.HAS_ALL,nn.EQUALS,nn.NOT_EQUALS].includes(e.filter))),(0,l.map)((e=>({type:mr((0,l.path)(["data","attrType"],e)),codeValues:(0,l.flatten)((0,l.propOr)([],"values",e))}))),(0,l.filter)((e=>{let{codeValues:t}=e;return t.length>0})))),fb),wv=(e,t)=>(0,l.pipe)(Sv,Tb(t))(e),Iv=(0,l.pathEq)(["data","fieldName"],In.type.name),Uv=(0,l.path)(["data","entityTypeUri"]),Cv=(0,l.pipe)((0,l.props)(["entityTypes","attributes"]),(0,l.all)(l.isEmpty)),Lv=(0,l.curry)(((e,t)=>t.map((t=>(0,l.evolve)({entityTypes:(0,l.filter)(as(e)),attributes:(0,l.filter)((0,l.pipe)(Uv,(0,l.anyPass)([l.isNil,as(e),r=>{const n=(t.entityTypes||[]).filter(as(e));return(n.length>1?en(e,n):null)===r&&!!Kr(e,r)}])))})(t))))),Dv=e=>(0,l.pipe)((0,l.prop)("filter"),Wl,(0,l.equals)(e)),jv=(0,l.curry)(((e,t,r,n,i,a)=>{const o=$s(n.fieldName)||n.attrType,s=vu(o,i),u=Eb({attributePresentations:t,dataTypeDefinition:s}),{type:c}=s;return(0,l.pipe)((0,l.cond)([[()=>hr(s),()=>(0,l.is)(Object,a)&&a.lookupCode?lb(a.lookupCode,a.value):cb(r,mr(o),a)],[()=>Gs(s),()=>ho(e,n.entityTypeUri,a)],[()=>Ws(s),()=>$o(e,a)],[()=>Ks(s),()=>Wo(e,a)],[()=>"referenced_entity_id"===n.fieldName,()=>a.entityLabel],[l.T,()=>u(a)]]),(0,l.unless)((()=>wr(c)||Cr(c)),mu),uv)()})),kv=(e,t,r,n)=>{const i=jv(e,t,r,n.data,n.filter);return(0,l.cond)([[Dv(0),(0,l.always)([])],[(0,l.both)(Dv(2),(2,(0,l.pipe)((0,l.prop)("values"),l.flatten,l.length,(0,l.equals)(2)))),e=>{let{values:t}=e;const[r,n]=(0,l.flatten)(t);return[pv(),i(r),{type:tv.punctuationMark,text:" — "},i(n)]}],[l.T,e=>{let{values:t}=e;return[pv(),...(0,l.pipe)(l.flatten,(0,l.map)(i),Tv({type:tv.punctuationMark,text:", "}))(t)]}]])(n)},Fv=(e,t)=>{const r=!!$s(e.data.fieldName);return(0,l.pipe)(Nv,r?sv:ov)(e,t)},xv=(e,t,r,n,i)=>[Fv(n,i),pv(),lv(n.filter),...kv(e,t,r,n)],Mv=(0,l.addIndex)(l.map),$v=(0,l.propEq)("length",1),Vv=(0,l.propSatisfies)((0,l.lt)(1),"length"),Gv=(0,l.complement)(l.isEmpty),Wv=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return(0,l.pipe)(su,(0,l.filter)(Rv),lu,(0,l.map)((n=>({operand:xv(e,t,r,n,i),operator:n.operator}))),(0,l.unless)(l.isEmpty,gv()))(n)},Yv=(0,l.pipe)(Wv,l.flatten),Bv=(e,t,r,n,i)=>{let{attributes:a,entityTypes:o=[]}=n;const s=t=>{const r=o.map((t=>yd(e,{type:t}))).join(", ");return r?t(r):l.identity},u=Wv(e,t,r,a);return(0,l.ifElse)(l.isEmpty,s(Ov),(0,l.pipe)(s(vv),(0,l.unless)((()=>$v(u)||i),mv)))(u)},qv=(e,t,r,n)=>(0,l.pipe)(su,(0,l.filter)(Pv),lu,Mv(((n,i,a)=>({operand:Bv(e,t,r,n,$v(a)),operator:n.operator}))),gv(),l.flatten)(n),Hv=(0,l.pipe)((0,l.reject)(l.isEmpty),(0,l.map)((e=>({operand:e,operator:"and"}))),gv(),l.flatten),Qv=e=>{let{searchType:t,values:[r]}=e;return zO(t,r).join(", ")},Kv=(e,t,r,n,i,a)=>{const o=(e=>e?[sv(e.isRawFilter?hn().text("Raw filter"):hn().text("Search")),...hv([lv(nn.EQUALS)]),uv(`"${e.value}"`)]:[])(i),s=(e=>e?[sv(ZO(e.searchType)),pv(),uv(Qv(e))]:[])(a),u=(0,l.pipe)(qv,(0,l.when)((e=>Vv(e)&&(Gv(o)||Gv(s))),mv))(e,t,r,n);return Hv([o,s,u])},Jv=(0,l.pipe)((0,l.map)((0,l.prop)("text")),(0,l.join)("")),Xv=(0,l.pipe)(Kv,Jv),zv=(0,l.has)("attributes"),Zv=Array.isArray,eg=(0,l.allPass)([(0,l.propEq)("length",1),(0,l.pathSatisfies)((0,l.startsWith)("not"),[0,"filter"])]),tg=(e,t,r,n,i)=>{const{attributes:a,operator:o}=n,s=rg(e,t,r,a,i);return(0,l.when)((0,l.always)((0,l.complement)(l.isNil)(o)),(0,l.pipe)((0,l.when)((0,l.always)((0,l.not)(eg(a))),mv),(0,l.concat)(hv([iv(o)]))))(s)},rg=function(e,t,r,n){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return zv(n)?tg(e,t,r,n,i):Zv(n)?n.reduce(((n,a)=>n.concat(rg(e,t,r,a,i))),[]):(0,l.when)((0,l.always)((0,l.has)("operator",n)),(0,l.concat)(hv([iv(n.operator)])))(xv(e,t,r,n,i))},ng=(e,t,r,n,i)=>(0,l.pipe)(rg,l.flatten)(e,t,r,n,i);function ig(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ag(e,t,r[t])}))}return e}function ag(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const og=(0,l.complement)(Iv),sg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.filter)(Iv),(0,l.map)((0,l.prop)("values")),l.flatten,l.uniq)(e),r=(0,l.pipe)((0,l.map)(Uv),(0,l.reject)(l.isNil),l.uniq)(e),n=0===r.length,i=1===r.length&&(0===t.length||(0,l.equals)(r,t));return{entityTypesFromSpecialAttributes:t,entityTypesFromAttributes:r,areOnlySpecialAttributes:n,areAttributesFromOneEntityType:i}},lg=e=>{const t=e.attributes||[],{areOnlySpecialAttributes:r,areAttributesFromOneEntityType:n}=sg(t);return(r||n)&&au(t)},ug=(0,l.ifElse)((0,l.all)((0,l.has)("entityTypes")),l.identity,(0,l.pipe)((e=>{const t=[],r=e.filter((0,l.complement)(lg)),n=e.filter((e=>{let{attributes:t=[]}=e;return t.length>0}));if(0===r.length||1===r.length&&1===n.length||t.push("Can't convert more than one complex transition advanced search group"),e.some((e=>(e.attributes||[]).filter(Iv).some((0,l.propEq)("filter",nn.NOT_EQUALS))))&&t.push("Can't convert advanced search group with 'Type' attribute and 'not equals' filter."),t.length)throw t;return e}),(0,l.reduce)(((e,t)=>e.concat((e=>{const t=[],r=e.attributes||[],{entityTypesFromSpecialAttributes:n,entityTypesFromAttributes:i}=sg(r);if(lg(e))t.push(ig({},e,{entityTypes:(0,l.uniq)((0,l.concat)(n,i)),attributes:r.filter(og)}));else{const n=r.map((a=e.operator,(e,t,r)=>{const n=(0,l.pipe)((0,l.ifElse)(Iv,(0,l.pipe)((0,l.prop)("values"),l.flatten),(0,l.pipe)(Uv,(e=>[e]),(0,l.reject)(l.isNil))))(e),i=t===r.length-1;return{attributes:[e].filter(og),entityTypes:n,operator:i?a:e.operator,id:Wh()()}}));t.push(...n)}var a;return t})(t))),[]))),cg={[nn.EQUALS]:nn.ON,[nn.IN_RANGE]:nn.WITHIN,[nn.GTE]:nn.AFTER,[nn.GT]:nn.AFTER,[nn.LTE]:nn.BEFORE,[nn.LT]:nn.BEFORE},pg=(0,l.curry)((e=>cg[e]||e)),dg=(0,l.curry)(((e,t)=>{switch(e){case nn.LT:return[f()(t[0]).subtract(1,"day").valueOf()];case nn.GT:return[f()(t[0]).add(1,"day").valueOf()];default:return t}})),yg=(0,l.pipe)((0,l.path)(["data","attrType","type"]),Rr),fg=(0,l.curry)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((e=>ig({},e,{attributes:(e.attributes||[]).map((e=>{const{filter:t}=e;return yg(e)?(0,l.evolve)({filter:pg,values:dg(t)},e):e}))})))})),Tg=(0,l.curryN)(3,((e,t,r,n,i)=>(0,l.pipe)((0,l.defaultTo)([]),ug,Lv(t),(0,l.map)((0,l.evolve)({attributes:(0,l.pipe)((0,l.map)((0,l.evolve)({data:e(t,n,i)})),(0,l.reject)((0,l.propSatisfies)(l.isNil,"data")))})),fg,(0,l.reject)(Cv))(r)));function Eg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){mg(e,t,r[t])}))}return e}function mg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const hg=(e,t)=>({data:{uri:Xt(e.fieldName)?Ht(e.fieldName,e.entityTypeUri):void 0,fieldName:e.fieldName,entityTypeUri:e.entityTypeUri},operator:"and",filter:t||SO(e),id:Wh()(),values:wO(e)}),bg=(0,l.curry)(((e,t,r,n)=>{const{uri:i,fieldName:a,entityTypeUri:o}=n,s=$s(a,t,r)||gr(e,i);if(!s)return null;if(lr(s))return Eg({},n,{attrType:s,title:s.label});{const t=s.label||s.name,r=yd(e,{type:o}),i=(vr(e,Ht(a,o),o)||[]).map((0,l.pick)(["label","name"])).slice(0,-1);return Eg({},n,{attrType:s,title:t,pathToTitle:Array.isArray(i)?[r,...(0,l.chain)((0,l.prop)("label"),i),t]:[r,t]})}})),Og=(0,l.curry)(((e,t,r,n)=>Tg(bg,e,n,t,r)));function vg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gg(e,t,r[t])}))}return e}function gg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _g=e=>{const{keyword:t,isRawFilter:r=!1}=e;return t?{value:t,isRawFilter:r}:null},Ag=e=>"rdmLookups.not.resolved"===e?In.notResolved.name:e,Ng=(0,l.curry)(((e,t,r)=>{let{fieldName:n,uri:i,filter:a,values:o=[]}=r;const s=a===un?nn.IN_RANGE:cn(a),u=Ag(n),c=$s(u)||gr(e,i),p=(0,l.cond)([[()=>Hl(s),(0,l.map)((0,l.when)((0,l.both)((0,l.has)("link"),(0,l.complement)((0,l.has)("filename"))),(e=>vg({},e,{filename:sb(e)}))))],[()=>Cr(null==c?void 0:c.type),(0,l.map)(le)],[e=>Bl(s)&&!Array.isArray(e[0])&&!Rr(null==c?void 0:c.type),ie],[l.T,l.identity]])(o);return{id:Wh()(),data:{uri:i,fieldName:u,entityTypeUri:t},operator:a===un?"and not":"and",filter:s,values:p}})),Rg=(0,l.curry)(((e,t)=>{const{searchParams:r=[],fastSearchParams:n=[],entityTypes:i=[]}=t,a=[...r,...n].map(Ng(e,en(e,i)));return[{id:Wh()(),operator:"or",attributes:a,entityTypes:i}]})),Pg=e=>(0,l.pipe)((0,l.prop)(e),(0,l.is)(Number)),Sg=(0,l.cond)([[(0,l.has)("values"),(0,l.prop)("values")],[(0,l.allPass)([Pg("from"),Pg("to")]),(0,l.pipe)((0,l.pick)(["from","to"]),l.values)],[(0,l.pipe)((0,l.prop)("rangeSelection"),E,l.not),(0,l.pipe)((0,l.prop)("rangeSelection"),(0,l.pick)(["start","end"]),l.values)],[l.T,()=>[]]]),wg=(e,t)=>{const r=(0,l.pick)(["fieldName","entityType","attrType","filter"])(e),n=e.potentialMatchesDataTenant;return vg({},r,{values:Sg(e),entityType:(0,l.propOr)(t,"entityType",r),fieldName:n?js(e.fieldName,n):e.fieldName})},Ig=(e,t)=>{if((0,l.has)("children")(e)){const r=wg(e,t);return e.children.reduce(((e,n)=>(e.push(Ig(n,(0,l.propOr)(t,"entityType",r))),e)),[])}return wg(e,t)},Ug=(0,l.cond)([[(0,l.has)("searchParameters"),e=>{const t=[];return(0,l.has)("values",e)&&t.push(wg(e)),(0,l.propOr)([],"searchParameters",e).forEach((r=>t.push(vg({fieldName:e.fieldName},wg(r,e.entityType))))),t}],[(0,l.has)("children"),(0,l.pipe)(Ig,l.flatten)],[l.T,wg]]),Cg=(0,l.pipe)((0,l.map)(Ug),l.flatten),Lg=e=>{if(e.every((e=>Array.isArray(e))))return e;if(2===e.length)return[e.map((e=>Number(e)))];if(1===e.length){const t=Number(e[0]);return[[t,t]]}return e},Dg=(e,t,r,n)=>{const{facets:i=[],advanced:a={},model:o}=n,[s]=Rg(e,a),[u]=((e,t)=>{if(!t)return[];const[r,n]=(0,l.pipe)((0,l.reject)((e=>"tenants"===e.fieldName)),(0,l.partition)((e=>"type"===e.fieldName)))(t),i=(0,l.chain)((0,l.propOr)([],"values"),r);return[{attributes:Cg(n).map((e=>{let{fieldName:t,entityType:r,values:n,filter:i}=e;return{fieldName:t,entityTypeUri:r,values:n,filter:i}})).map((t=>vg({},t,{type:RO(e,t)}))).map((e=>vg({},e,{values:_O(e)?Lg(e.values):e.values}))).map((e=>{let{filter:t}=e,r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,["filter"]);return hg(r,t)})),operator:"or",id:Wh()(),entityTypes:i}]})(e,i),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.pipe)(l.keys,(0,l.map)((t=>({[Ag(t)]:e[t]}))),l.mergeAll)(e)}(o),p=[vg({},u,{entityTypes:null!=c&&c.type?(0,l.uniq)([...u.entityTypes,...s.entityTypes]):[],attributes:[...u.attributes,...s.attributes].filter((e=>{let{data:{fieldName:t}}=e;return c[t]}))})];return Og(e,t,r,p)},jg=(e,t,r,n)=>{try{return"2.0"==n.version?((e,t,r,n)=>{const{advanced:i=[],facets:a={}}=n,o=i.some((e=>{let{attributes:t,entityTypes:r=[]}=e;return t.length||r.length}))?i:((e,t)=>{const[[r={}],n]=(0,l.pipe)(l.values,(0,l.reject)(bO),(0,l.partition)(OO))(t),i=n.map((t=>Eg({},t,{type:RO(e,t)}))).map((e=>hg(e))),a=r.values||[];return[{attributes:i,operator:"or",id:Wh()(),entityTypes:a}]})(e,a);return Og(e,t,r,o)})(e,t,r,n):Dg(e,t,r,n)}catch(e){return console.error("Failed to convert search state to groups",e),[]}},kg=e=>"2.0"===e.version?e.keyword:_g(e),Fg=e=>(0,l.pathEq)(["object","uri"],e),xg=(e,t)=>(0,l.pipe)((0,l.find)(Fg(e)),(0,l.prop)("object"))(t),Mg=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=(0,l.pipe)((0,l.find)((0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),Fg(r.uri),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)])),(0,l.propOr)([],"shortestTransitiveMatchPath"))(t),a=r=>{const i=xg(r.match,t)||n[r.match];return i?{label:qp((0,l.prop)("label",i)),matchRules:(0,l.propOr)([],"matchRules",r).map((function(t){return mo(e,i.type,t)||{label:t,uri:t}}))}:null};return(0,l.pipe)((0,l.defaultTo)([]),(0,l.when)((0,l.complement)(l.isEmpty),(0,l.map)(a)),(0,l.reject)(l.isNil))(i)},$g=e=>e.reduce(((e,t)=>{let{object:r}=t;return e[r.uri]=(0,l.pick)(["uri","type","label"],r),e}),{}),Vg=(0,l.allPass)([(0,l.has)("shortestTransitiveMatchPath"),(0,l.pipe)((0,l.propOr)(!1,"direct"),l.not)]),Gg=(e,t,r)=>(0,l.pipe)((0,l.propOr)([],"shortestTransitiveMatchPath"),(0,l.map)((t=>{let{match:n,matchRules:i=[]}=t;const a=(0,l.propOr)({},n,r);return{label:qp((0,l.prop)("label",a)),matchRules:i.map((function(t){return mo(e,a.type,t)||{label:t,uri:t}}))}})))(t),Wg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,l.pipe)((0,l.map)((0,l.prop)("shortestTransitiveMatchPath")),l.flatten,(0,l.filter)(l.identity),(0,l.map)((0,l.prop)("match")),l.uniq);return t(e)},Yg=(0,l.path)(["object","uri"]),Bg=e=>{let t=[];return{addChild:e=>{t=(0,l.append)(e,t)},getValue:()=>e,getChildren:()=>t,removeChild:e=>{t=(0,l.without)([e],t)}}},qg=e=>e.getValue(),Hg=(e,t)=>{let r=null;if(t(e.getValue()))return e;const n=e.getChildren();for(let e=0;e<n.length&&(r=Hg(n[e],t),!r);e++);return r},Qg=(e,t)=>{const r=[],n=(0,l.pipe)(qg,t),i=(0,l.pipe)(l.map,l.flatten),a=e.getChildren();a.some(n)&&r.push(e);const o=i((0,l.partialRight)(Qg,[t]),a);return r.push.apply(r,o),r};function Kg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Jg(e,t,r[t])}))}return e}function Jg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Xg=(e,t)=>!!e[t],zg=e=>{let{uri:t,lookupCode:r,value:n}=e;return{uri:t,value:r||n}},Zg=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.identity;return 0===t.length&&e?e:(0,l.uniqBy)(r,[...t,...e||[]])},e_=e=>{let{structure:t,attrType:r,parents:n=[],children:i=[],values:a=[]}=e;const o=t[r.uri];return Kg({},t,{[r.uri]:Kg({},o,{attrType:(null==o?void 0:o.attrType)||r,parents:Zg(null==o?void 0:o.parents,n),children:Zg(null==o?void 0:o.children,i),values:Zg(null==o?void 0:o.values,a,(0,l.prop)("uri"))})})},t_=e=>e.children?e.children.flatMap(t_):e,r_=e=>{let{structure:t={},metadata:r,typeUris:n,alreadyAddedTypeUris:i=[]}=e;return n.filter((e=>!i.includes(e))).reduce(((e,t)=>{const n=Kr(r,t)||Ai(r,t),i=(0,l.either)((0,l.both)((0,l.prop)("dependentLookupAttributes"),(0,l.prop)("dependentLookupCode")),(0,l.prop)("children"));return Jo(r,n,i).flatMap(t_).reduce(((e,t)=>{const n=t.dependentLookupAttributes.map((e=>gr(r,e))).filter(l.identity).filter((0,l.prop)("dependentLookupCode"));return(e=>{let{structure:t,parentAttrType:r,childrenAttrTypes:n}=e;const i=n.map((0,l.prop)("uri")),a=e_({structure:t,attrType:r,children:i});return n.reduce(((e,t)=>e_({structure:e,attrType:t,parents:[r.uri]})),a)})({structure:e,parentAttrType:t,childrenAttrTypes:n})}),e)}),t)},n_=e=>{let{structure:t,metadata:r,entityOrRelation:n}=e;return Object.keys(t).reduce(((e,t)=>{if(((e,t)=>!jt(e.uri)&&Vt(e.type)&&Vt(t)&&!t.startsWith(e.type))(n,t))return e;const i=vs(r,n,t)||[],a=(0,l.pipe)((0,l.filter)(os),(0,l.map)(zg))(i);return e_({structure:e,attrType:e[t].attrType,values:a})}),t)},i_=e=>{let{structure:t,attributeValue:r}=e;if((0,l.is)(Object,r.value))return Object.values(r.value).reduce(((e,t)=>{const r=t.some((e=>{let{value:t}=e;return(0,l.is)(Object,t)})),n=t.some((t=>{let{type:r}=t;return Xg(e,r)}));return r||n?t.filter(os).reduce(((e,t)=>i_({structure:e,attributeValue:t})),e):e}),t);{const e=r;return Xg(t,e.type)?e_({structure:t,attrType:t[e.type].attrType,values:[zg(e)]}):t}},a_=e=>{let{structure:t,uri:r}=e;return(0,l.map)((e=>e.values.some((e=>{let{uri:t}=e;return t.startsWith(r)}))?Kg({},e,{values:e.values.filter((e=>{let{uri:t}=e;return!t.startsWith(r)}))}):e))(t)},o_=e=>{let{structure:t,attrTypeUri:r,entityOrRelation:n,metadata:i}=e;const a=vs(i,n,r)||[];return a.length?e_({structure:t,attrType:t[r].attrType,values:a.filter(os).map(zg)}):t},s_=(e,t,r)=>{const n=xt(e),i=xt(t);return n===i?((e,t)=>{const r=Zt(t),n=Zt(e);return Wt(n,r)})(e,t):!(!r||!zt(t))&&XT(r,i).includes(n)},l_=(e,t)=>{if(e){if(e.includeAttributes)return e.includeAttributes.includes(t);if(e.excludeAttributes)return!e.excludeAttributes.includes(t)}return!1},u_=e=>{let{parentValues:t,valueUri:r,entityUri:n,modifiedEntities:i,connections:a}=e;const o=n?KT(n,i,a):null;return t.filter((e=>{let{uri:t}=e;return s_(r,t,o)}))},c_=(e,t,r)=>{const n=r[e].map((e=>t[e]));return(0,l.uniq)(n.concat(n.flatMap((r=>c_(e,t,r)))))},p_=(e,t,r,n)=>{let{uri:i,value:a}=r;return{type:e,uri:i,lookupValue:a,autopopulate:i!==t&&l_(n,e)}},d_=e=>{let{structure:t,typeUri:r,valueUri:n,modifiedEntities:i,connections:a,entityUri:o,config:s}=e;const l=t[r],u=xt(n),c=JT(u,o,i,a),p=c_("children",t,l),d=c_("parents",t,l),y=p.flatMap((e=>c_("parents",t,e))).filter((e=>![...d,l,...p].includes(e))),f=p.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return s_(t,n,c)})).map((t=>p_(e.attrType.uri,n,t,s)))));if(!f.length)return[];const T=d.flatMap((e=>e.values.filter((e=>{let{uri:t}=e;return s_(n,t,c)||xt(t)!==u&&s_(t,n,c)})).map((t=>p_(e.attrType.uri,n,t,s))))),E=y.flatMap((e=>{const r=c_("children",t,e).map((e=>{let{attrType:t}=e;return t.uri}));return e.values.filter((e=>{let{uri:t}=e;return f.some((e=>{let{uri:n,type:i}=e;return r.includes(i)&&s_(n,t,c)}))})).map((t=>p_(e.attrType.uri,n,t,s)))}));return[...l.values.filter((e=>{let{uri:t}=e;return s_(t,n,c)})).map((e=>p_(r,n,e,s))),...T,...E,...f]},y_=async e=>{let{attributeType:t,attributePresentations:r,value:n}=e;const i=Eb({attributePresentations:r,dataTypeDefinition:t}),a=(0,l.pipe)((e=>{const t={};for(const r of e){const[e,n]=Object.entries(r)[0];t[e]=Array.isArray(n)?n.map((e=>({value:e,ov:!0}))):[{value:n,ov:!0}]}return{value:t}}),(e=>Yp(e,t.dataLabelPattern))),o=e=>Object.values(e[0])[0],s=(0,l.pipe)(o,i),u=(0,l.cond)([[dr,()=>a(n)],[hr,()=>(e=>{const r=o(e),n=mr(t);return Ll([{codeValue:r,type:n}]).then((e=>{if(Array.isArray(e))return cb(e[0],n,r)}))})(n)],[l.T,()=>s(n)]]);return await u(t)},f_=e=>{let{value:t,attributeType:r,entityType:n=""}=e,i=[{fieldName:"type",filter:nn.EQUALS,values:[n]}];return Array.isArray(t)?i=i.concat(T_(r,t)):i.push(E_([t],r)),i},T_=(e,t)=>{const r=ur(e),n=t=>(e[r]||[]).find((e=>e.uri===t||e.uri.endsWith(`/${t}`)));return t.reduce(((e,t)=>{for(const r in t){const i=n(r),a=dr(i)?T_(i,t[r]):[E_(t[r],i)];return e.push(...a),e}}),[])},E_=(e,t)=>e&&e.length&&!(0,l.isNil)(e[0])&&""!==e[0]?{fieldName:Er(t.uri),filter:t.type===mt.TYPE_BLOB?nn.FULL_TEXT:nn.EQUALS,values:e}:{fieldName:Er(t.uri),filter:nn.MISSING_VALUE},m_={AttributesDiff:a,AttributesEditor:o,HistoryManager:s},h_={Colors:r(33164),DependencyManager:r(29524),strings:n,dates:i}},33164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getColor:()=>i});var n=[[255,235,238,0],[255,205,210,0],[239,154,154,0],[229,115,115,0],[239,83,80,1],[244,67,54,1],[229,57,53,1],[211,47,47,1],[198,40,40,1],[183,28,28,1],[255,138,128,0],[255,82,82,1],[255,23,68,1],[213,0,0,1],[252,228,236,0],[248,187,208,0],[244,143,177,0],[240,98,146,1],[236,64,122,1],[233,30,99,1],[216,27,96,1],[194,24,91,1],[173,20,87,1],[136,14,79,1],[255,128,171,0],[255,64,129,1],[245,0,87,1],[197,17,98,1],[243,229,245,0],[225,190,231,0],[206,147,216,0],[186,104,200,1],[171,71,188,1],[156,39,176,1],[142,36,170,1],[123,31,162,1],[106,27,154,1],[74,20,140,1],[234,128,252,0],[224,64,251,1],[213,0,249,1],[170,0,255,1],[237,231,246,0],[209,196,233,0],[179,157,219,0],[149,117,205,1],[126,87,194,1],[103,58,183,1],[94,53,177,1],[81,45,168,1],[69,39,160,1],[49,27,146,1],[179,136,255,0],[124,77,255,1],[101,31,255,1],[98,0,234,1],[232,234,246,0],[197,202,233,0],[159,168,218,0],[121,134,203,1],[92,107,192,1],[63,81,181,1],[57,73,171,1],[48,63,159,1],[40,53,147,1],[26,35,126,1],[140,158,255,0],[83,109,254,1],[61,90,254,1],[48,79,254,1],[227,242,253,0],[187,222,251,0],[144,202,249,0],[100,181,246,0],[66,165,245,0],[33,150,243,1],[30,136,229,1],[25,118,210,1],[21,101,192,1],[13,71,161,1],[130,177,255,0],[68,138,255,1],[41,121,255,1],[41,98,255,1],[225,245,254,0],[179,229,252,0],[129,212,250,0],[79,195,247,0],[41,182,246,0],[3,169,244,0],[3,155,229,1],[2,136,209,1],[2,119,189,1],[1,87,155,1],[128,216,255,0],[64,196,255,0],[0,176,255,0],[0,145,234,1],[224,247,250,0],[178,235,242,0],[128,222,234,0],[77,208,225,0],[38,198,218,0],[0,188,212,0],[0,172,193,0],[0,151,167,1],[0,131,143,1],[0,96,100,1],[132,255,255,0],[24,255,255,0],[0,229,255,0],[0,184,212,0],[224,242,241,0],[178,223,219,0],[128,203,196,0],[77,182,172,0],[38,166,154,0],[0,150,136,1],[0,137,123,1],[0,121,107,1],[0,105,92,1],[0,77,64,1],[167,255,235,0],[100,255,218,0],[29,233,182,0],[0,191,165,0],[232,245,233,0],[200,230,201,0],[165,214,167,0],[129,199,132,0],[102,187,106,0],[76,175,80,0],[67,160,71,1],[56,142,60,1],[46,125,50,1],[27,94,32,1],[185,246,202,0],[105,240,174,0],[0,230,118,0],[0,200,83,0],[241,248,233,0],[220,237,200,0],[197,225,165,0],[174,213,129,0],[156,204,101,0],[139,195,74,0],[124,179,66,0],[104,159,56,1],[85,139,47,1],[51,105,30,1],[204,255,144,0],[178,255,89,0],[118,255,3,0],[100,221,23,0],[249,251,231,0],[240,244,195,0],[230,238,156,0],[220,231,117,0],[212,225,87,0],[205,220,57,0],[192,202,51,0],[175,180,43,0],[158,157,36,0],[130,119,23,1],[244,255,129,0],[238,255,65,0],[198,255,0,0],[174,234,0,0],[255,253,231,0],[255,249,196,0],[255,245,157,0],[255,241,118,0],[255,238,88,0],[255,235,59,0],[253,216,53,0],[251,192,45,0],[249,168,37,0],[245,127,23,0],[255,255,141,0],[255,255,0,0],[255,234,0,0],[255,214,0,0],[255,248,225,0],[255,236,179,0],[255,224,130,0],[255,213,79,0],[255,202,40,0],[255,193,7,0],[255,179,0,0],[255,160,0,0],[255,143,0,0],[255,111,0,0],[255,229,127,0],[255,215,64,0],[255,196,0,0],[255,171,0,0],[255,243,224,0],[255,224,178,0],[255,204,128,0],[255,183,77,0],[255,167,38,0],[255,152,0,0],[251,140,0,0],[245,124,0,0],[239,108,0,1],[230,81,0,1],[255,209,128,0],[255,171,64,0],[255,145,0,0],[255,109,0,0],[251,233,231,0],[255,204,188,0],[255,171,145,0],[255,138,101,0],[255,112,67,0],[255,87,34,1],[244,81,30,1],[230,74,25,1],[216,67,21,1],[191,54,12,1],[255,158,128,0],[255,110,64,0],[255,61,0,1],[221,44,0,1],[239,235,233,0],[215,204,200,0],[188,170,164,0],[161,136,127,1],[141,110,99,1],[121,85,72,1],[109,76,65,1],[93,64,55,1],[78,52,46,1],[62,39,35,1],[250,250,250,0],[245,245,245,0],[238,238,238,0],[224,224,224,0],[189,189,189,0],[158,158,158,0],[117,117,117,1],[97,97,97,1],[66,66,66,1],[33,33,33,1],[236,239,241,0],[207,216,220,0],[176,190,197,0],[144,164,174,0],[120,144,156,1],[96,125,139,1],[84,110,122,1],[69,90,100,1],[55,71,79,1],[38,50,56,1],[0,0,0,1],[255,255,255,0]];function i(e){var t,r=null,i=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];return n.forEach((function(e){var n=Math.abs(i[0]-e[0])+Math.abs(i[1]-e[1])+Math.abs(i[2]-e[2]);(null===r||n<r)&&(r=n,t=e)})),t?t[3]:0}},29524:(e,t,r)=>{"use strict";function n(e){var t=[];return{getInfo:function(){return e},getEdges:function(){return t},removeEdge:function(e){var r=t.indexOf(e);t.splice(r,1)},addEdge:function(e){t.push(e)}}}function i(e,t){t(e),e.getEdges().forEach((function(e){i(e,t)}))}function a(e){var t=[];return e.getEdges().forEach((function(e){t.push.apply(t,a(e))})),t.push(e),t}function o(e,t){var r=null;if(e.getInfo()===t)return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=o(n[i],t));i++);return r}function s(e,t){var r=null;if(e.getEdges().some((function(e){return e.getInfo()===t})))return e;for(var n=e.getEdges(),i=0;i<n.length&&!(r=s(n[i],t));i++);return r}r.r(t),r.d(t,{Node:()=>n,resolve:()=>i,findNode:()=>o,findParentNode:()=>s,getDependencyOrder:()=>a})},33196:()=>{},38087:()=>{},74854:()=>{},66602:()=>{}}]);
|